Authored By: Mark Nicholson
IntroductionUpdated December 2009. Tolerancing is the process by which the effects of manufacturing defects and alignment errors are considered. This article is an overview of the entire process, and is intended to be the first article a new user would read to start to understand the process. Other Knowledge Base articles give more specific advice.
Let us assume that our task is to design a laser beam expander for volume production. An Argon-ion laser beam of 2.5 mm 1/e
2 full width is to be expanded x3, and the resulting wavefront error must not exceed
l/20 RMS over two full beam widths (i.e. measured over a total beam diameter of 5 mm).
This file, which can be downloaded from the link on the last page of this article, uses two plano-vex lenses:

The nominal system performance greatly exceeds that required in production:

Note that the maximum scale is 0.01 waves, so the peak-to-valley OPD error is less than
l/200. The RMS wavefront error (found by building a default wavefront merit function) is 2.15 10
-3 waves, which may be lower than you might expect by visual inspection of the OPD plot. Note however that the aperture definition of this system uses
Gaussian apodization. The entrance pupil diameter is 5 mm, and an apodization factor of 2 is used, so at the edge of the pupil the beam intensity has fallen to 1/e
4 = 1.8% of peak intensity.
That is why the specifications of the manufactured system matters so much. The RMS OPD of the system when illuminated by a laser beam of 5 mm 1/e
2 diameter (~2.10
-3 waves) is different to that of the same system uniformly illuminated (3.10
-3 waves) because of the fast-varying spherical at the edge of the pupil, which is less important with Gaussian illumination than with uniform illumination.
We will now go on to consider the effects that manufacturing tolerances have on this system's performance.
Manufacturing TolerancesTolerancing is about accounting for manufacturing error, so that the 'as built' design meets its intended specification. In order to tolerance successfully, you should know what manufacturing and test methods will be used in the production of the lens, so that your model of the production process matches reality.
There are many diferent methods used to manufacture and test lenses, and Zemax gives you ways to model all of them. In this case, we will assume that the lenses are made through traditional hand-polishing methods, and make further assumptions as stated below.
Manufacturing tolerances are entered through Editors...Tolerance Data and then clicking on Tools...Default Tolerances in that editor. The Default Tolerances dialog allows you to enter system-wide tolerances, which you can then edit by hand if necessary:

'Surface' tolerances are those tolerances placed on an optical surface itself, e.g radius, irregularity etc. 'Element' tolerances are positional tolerances on the element as it is placed in the optical system.
The default tolerances chosen to start this tolerancing run with are as follows:
Radii of curvature tolerances will be measured by using a test plate and looking at interference fringes in double-pass, using a He-Ne light source. This is a standard manufacturing test method. Let's assume we choose to measure radius tolerances in fringes, and to allow a maximum of 1 fringe difference between the surface under test and the test plate.
As this measurement is performed at He-Ne wavelengths, set the test wavelength to 0.6328. Note that this is not the wavelength the system itself operates at (which is the Ar+ line at 0.5145 microns): this is the wavelength at which the surface is tested.
The default center thickness tolerance os 0.2 mm: we also need to account for how the lens is mounted, and this will be discussed further later in this article.
Zemax then allows you to enter the surface decentration and tilt. Care is needed here. An aspheric surface may have separate decentration and tilt. For example, a parabolic mirror may be seperably decentered and tilted, as it has only a single axis of rotational symmetry. A sphere has an infinite number of axes of symmetry, and tilts and decenters are therefore degenerate.
It is usual in lens manufacture to measure the wedge of a lens holding the lens in a vacuum chuck and either (a) projecting a laser beam through the center, and observing the precession of the beam on a distant wall and the lens is rotated, or (b) using a dial gauge to measure the variation in lens edge thickness as the lens is rotated. The lens is then centered and edged to minimize either variation.
In this case, I assume that the manufacturer will use edge-thickness variation as the test method. I have entered a maximum tilt in both x and y of 0.2mm, so that the maximum radial tilt is SQRT(0.22 + 0.22) = 0.28 mm.
Surface irregularity can be defined as a sum of spherical and astigmatism (which is usually what is done when test-plate interferograms are 'eyeballed') or using Zernike coefficients (which is usual when measurements are made with an interferometer). In this case I assume the 'eyeball' method, and set a surface irregularity of l/5 initially.
Element tolerances measure how misaligned the elements are with respect to the 'mechanical axis' of the system.
Index tolerances describe how different the actual glass used is, compared to the catalog values. As this design is used at only one wavelength, we don't need the Abbe tolerance and simply tolerance the refractive index value itself.
Zemax also offers to build a back-focus compensator. As this lens is afocal this is not needed, and so it is unchecked. When the OK button is pressed, a set of default tolerances is produced.
In the next section we will discuss mechanical mounting and compensation.
Mechanical Mounts and CompensationBoth lenses are plano-vex, so it is reasonable to assume that the flat face of each lens will be the mounting face, i.e. the face that is held against the lens mount. Let us also assume that the 200 mm spacing between the lenses can be adjusted during assembly, and in use. This would allow the beam expander to be used at different wavelengths, for example. This has some important consequences.
Consider the lens formed by surfaces 2 and 3. As surface 3 is flat, it will be the one placed in the lens mount. As a result, surface 2 is wedged with respect to surface 3 by whatever the TIRX, TIRY on surface 2 is. We should not specify a TIRX, TIRY on surface 3 as well: these should be deleted.
Similarly for the lens formed by surfaces 4 and 5: surface 4 is flat and is held against the mount. Surface 5 is then wedged with respect to surface 4: which means that the TIRX, TIRY on surface 4 should be removed.
Thickness tolerances affect not only the surface being toleranced, but also other surfaces. 'Thickness' defines the z-shift between components, and we must consider how the mounting arrangement makes thickness tolerances accumulate. As the first lens is mounted on its rear face, any extra thickness gained during tolerancing will mean that the lens grows 'backwards', and the total length of the optical system will increase.

Now the TTHI (thickness) tolerance allows you to specify an 'adjustment surface' for thickness variations. For example, if the lens were mounted on its front face, extra thickness added during tolerancing would make the lens protrude further into the 200 mm air gap between lenses, which would make this thickness slightly shorter. Zemax accounts for this with the 'Adjust' setting:

The Default Tolerances tool assumes that all glass thicknesses are compensated by the next following air thickness: which basically means it assumes the lens is mounted on its front face. The adjustment is optional; to disable it, set the adjustment to the same surface number as the tolerance, such as TTHI 2 2. In this case, neither glass thickness is compensated by any other thickness, and so we disable compensation in this example.
Furthermore the thickness of surface 1 and surface 5 do not matter, as these simply show light entering and leaving the optical system. These tolerances may be deleted.
The thickness of surface 3 (the 200 mm air gap between lenses) will be used as a compensator, in that it can be adjusted to minimize the wavefront error either duting assembly or in use. It should not be toleranced, so the TTHI on surface 3 can be deleted. Instead, a compensator on the thickness of surface 3 should be defined instead:
COMP 3 0 0 -.2 +.2

This defines a thickness compensator of range -0.2 to +0.2 mm.
The file is saved as 'Beam Expander Ready for Tolerancing.zmx' in the zip file at the end of this article.
Testing the Tolerancing SetupThis step is often overlooked. It is important to test that the tolerances have been set up correctly. To do this, we will build some Monte-Carlo files and examine what it is doing.
Click on Tools...Tolerancing...Tolerancing to open the Tolerancing dialog box. Click the 'Reset' button to restore the default settings of this dialog, and then set it as follows (only changed settings are highlighted:




This means that Zemax will only build Monte-Carlo files. The files will have the name test prepended to MC_Txxxx, where xxxx is the file number. If you run the tolerancer open one of the M-C files, you will see something similar (actual numbers will vary as they are random) to this:

See what Zemax has done. Element tolerances (TE** operands) have been converted to coordinate breaks to implement element tilts and decenters. The (previously) STANDARD surface types have been converted to IRREGULAR surface types so that surface tilts and irregularity can be accounted for. Various lens data (like thicknesses, radii, glass type etc.) have been perturbed from their nominal value. Note that the thickness of the interlens separation has become a variable, and that a merit function has been defined:

The Monte Carlo files should be carefully inspected at this stage so that you are sure you understand and agree with all the changes that have been made.
The Set-Up TabRe-open the original Beam Expander Prior to Tolerancing.zmx file, and open up an OPD plot, configured as follows:


We will use this in conjunction with the Monte-carlo feature soon. Then, re-open the tolerancing dialog box. Press RESET to undo the changes we made and restore the default settings. The Set-Up tab shows:

The 'Mode' setting controls the tolerancer as follows:
Sensitivity mode computes the change in the tolerancing criterion (merit function) for each of the extreme values of the tolerances. The tolerancing criterion is defined on the next tab, labelled 'Criterion'
Inverse Limit computes the value of each tolerance that will yield a criterion equal to the value specified by the Limit parameter on the Criterion tab. Inverse mode will change the min and max values of the tolerance operands.
Inverse Increment computes the value of each tolerance that will yield a change in the criterion equal to the value specified by the Increment parameter on the Criterion tab. Inverse mode will change the min and max values of the tolerance operands.
Skip Sensitivity will bypass the sensitivity analysis and proceed to the Monte Carlo analysis.
We will not discuss the other parameters in this dialog box in this article. Consult the User's Guide for more details.
For the purposes of this article, select the Mode as 'Sensitivity', and then move to the Criterion tab.
The Criterion TabThe Criterion tab is used to define the figure-of-merit used for the tolerancing. This is usually related to, but not the same as, the Optimization merit function.
The Tolerancing Criterion is usually purely optical (whereas the Optimization merit Function may contain many boundary conditions that must be satisfed). For convenience, Zemax offers some of the most common tolerancing criteria as selections from a drop-down list, including parameters like:
- spot radius
- wavefront error
- MTF
- boresight error
- angular radius
Whatever you choose is ultimately expressed as a merit function, and you can choose to create your own tolerancing criterion in the merit function and use that if you wish.
For the purposes of this article, configure this tab as follows:

We want the manufactured system to have RMS wavefront error better than l/20, or 0.05 waves. Therefore, we will use RMS wavefront error as the tolerancing criterion, and we will optimize the interlens separation using the DLS optimizer. We will perform just three cycles of optimization, because on the shopfloor the separation will not be adjusted exhaustively: three cycles of optimization is plenty.
The Monte-Carlo TabUnlike the sensitivity and inverse sensitivity analysis, the Monte-Carlo analysis simulates the effect of all perturbations simultaneously. For each Monte-Carlo cycle, all of the parameters which have specified tolerances are randomly set using the defined range of the parameter and a statistical model of the distribution of that parameter over the specified range. Also, by default, all parameters are assumed to follow the same normal distribution with a total width of four standard deviations between the extreme minimum and maximum allowed values.
This default model may be changed using the STAT command, however this is outside the scope of this article. For the purposes of this article, configure the Monte-Carlo tab as follows:

The 'Overlay MC graphics' control will automatically update and overlay any open graphic window with the results from the Monte Carlo run. This is extremely useful as a way of establishing whether tolerances are close to giving good results or not.
The Display tabThe Display tab does not affect the tolerancing calculation, it simply defines the amount of data to be shown on the tolerancing report. Set it up like so:

Then press OK to run the tolerancer!
The First Tolerancing RunAs we chose to overlay Monte-Carlo graphics, and had an opern OPD plot on the desktop, the resulting OPDs of the 20 Monte-Carlo files can be clearly seen: we are a long way from our target performance of 0.05 waves RMS (l/20)!
During Sensitivity Analysis, Zemax measured the tolerancing criterion of the nominal system, and then takes the first tolerance, puts it to the minimum value and adjusts compensators, and reports the tolerancing criterion value. It does this again for the tolerance set to its maximum value. It then steps through each tolerance in turn, computing the sensitivity of the tolerancing criterion to each tolerance. It gives a report like so:
Worst offenders:Type Value Criterion ChangeTIND 4 0.00100000 0.05833928 0.05605037TIND 4 -0.00100000 0.05820220 0.05591329TFRN 5 1.00000000 0.01142861 0.00913970TFRN 5 -1.00000000 0.01123322 0.00894430TFRN 4 -1.00000000 0.00973898 0.00745007TFRN 4 1.00000000 0.00966774 0.00737883TIRY 5 -0.20000000 0.00579322 0.00350431TIRY 5 0.20000000 0.00579322 0.00350431TIRX 5 -0.20000000 0.00579322 0.00350431TIRX 5 0.20000000 0.00579322 0.00350431Estimated Performance Changes based upon Root-Sum-Square method:Nominal RMS Wavefront : 0.00228891Estimated change : 0.05743935Estimated RMS Wavefront : 0.05972826
Now the nominal system has a tolerace criterion of 0.0022, or l/400. We require l/20, or 0.05 waves in production. However some tolerances produce more than this by themselves: the refractive index tolerance of the second lens alone causes the wavefront error to degrade to 0.058 waves after adjustment of the compensator.After all the individual tolerances are computed, Zemax then computes a variety of statistics, the most important of which is the estimated change in the criterion and associated estimated performance. Zemax uses a Root Sum Square (RSS) assumption for computing the estimated changes in the performance. For each tolerance, the change in performance from the nominal is squared and then averaged between the min and max tolerance values. The average of the min and max squared change is taken because the min and the max tolerance cannot both occur simultaneously, and so summing the squares would result in an overly pessimistic prediction. The final predicted, as-built performance is then computed.For this system, the RSS calculation predicts a system performance of 0.0597 waves compared to our specification of 0.05.The Monte-Carlo analysis is in broad agreement:
Nominal 0.00228891Best 0.00298017 Trial 5Worst 0.09331313 Trial 16Mean 0.02347745Std Dev 0.02705254
although with only 20 samples, this is a crude assessment. The estimated yield of lenses below 0.05 RMS wavefront error is less than 80%:
90% < 0.07108262 80% < 0.05020169 50% < 0.01194052 20% < 0.00368450 10% < 0.00344164
Clearly some tolerances need to be tightened if the yield is to be improved. We can do this by hand, and re-run the sensitivity analysis if desired, or we can ask Zemax to automatically tighten the tolerances for us, in a process called Inverse Sensitivity Tolerancing.
Inverse SensitivityIn Sensitivity mode, Zemax takes the tolerances and predicts the degradation of performance. In Inverse Sensitivity mode, Zemax is given a target degradation of the merit function, and must find the tolerances that achieve it. Set up the tolerancer like so. In the Set-Up tab:

In the Criterion tab note that the 'Limit' box is now available. Press the CHECK button to get the nominal system tolerancing criterion:

and enter a target value of say 0.0075 so that each tolerance can degrade the tolerancing criterion to no more than l/130:

Leave all other settings fixed and re-run the tolerancer.The root-sum-square results show greatly improved performance:
Estimated Performance Changes based upon Root-Sum-Square method:Nominal RMS Wavefront : 0.00228891Estimated change : 0.01048970Estimated RMS Wavefront : 0.01277861
And this is also seen in the Monte-Carlo results
Nominal 0.00228891Best 0.00302033 Trial 11Worst 0.06366188 Trial 5Mean 0.01112674Std Dev 0.01500476
However, 20 Monte-Carlo files is not enough. Roughly speaking, if there are n tolerances, you need at least n
2 Monte-Carlo files to sample the probability distributions adequately. As we have 24 tolerances, we need at least 24
2 = 576 Monte-Carlo files. I chose to perform 1000 Monte-Carlo samples, and obtained this result:
Number of traceable Monte Carlo files generated: 1000Nominal 0.00228891Best 0.00206051 Trial 255Worst 0.06980077 Trial 889Mean 0.01088548Std Dev 0.0124553498% < 0.05416390 90% < 0.02866021 80% < 0.01660707 50% < 0.00528991 20% < 0.00357509 10% < 0.00308147 2% < 0.00253455
A review of the tolerances indicates that none are unreasonably tight as a result of the inverse tolerancing.
Note also that running 1000 Monte-Carlo files took only 26 seconds on the author's 8-CPU machine. Zemax uses no first-order or other approximations to guess at the effect of tolerances on the wavefront produced by the perturbed lens. Each merit function is a full accuracy computation of the wavefront error of the lens.
SummaryTolerancing is a complex procedure. This article serves as an overview of the process, which is:
- Optimize your design until it exceeds the target specification by some reasonable margin
- Build a set of default tolerances. Where Zemax offers more than one way to tolerance the same parameter, choose the one that represents the method used in actual manufacture, test or assembly
- Edit the tolerances to account for the mounting arrangements and add any compensators
- Define a tolerance criterion that represents what the actual test on the shopfloor is
- Build some Monte-Carlo files and test that the tolerances are being implemented in the way you expect.
- Perform a Sensitivity analysis
- Tighten troublesome tolerances by hand, or use Inverse Sensitivity
- Once you have confidence in your tolerances, build at least n2 Monte-Carlo files, where n is the number of tolerances
- Review the tolerances produced by inverse tolerancing, and ensure they are reasonable.
Remember that not every design you start with will be buildable with cost-effective tolerances. It may be that in order to achieve your goal of a buildable design, you need to analyze several competing designs. See the many other articles in the Knowledge Base Tolerancing category, and the User's Guide for more information.