How to perform a sequential tolerance analysis

This article is part of the Imaging System Fundamentals free tutorial.

This article provides an overview of the entire process of tolerancing a lens. It is the first article you should read about tolerancing if you are new to tolerancing.

For more information, see the the OpticStudio Help Files Section The Tolerance Tab > Tolerancing Overview.

Authored By Mark Nicholson


Article Attachments


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 Knowledgebase articles give more specific advice.

System setup

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/e2 full width is to be expanded x3, and the resulting wavefront error must not exceed 1/20 RMS over two full beam widths (i.e. measured over a total beam diameter of 5 mm).

This file, saved as 'Beam Expander.zmx' in the Article attachments, 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 1/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/e4 = 1.8% of peak intensity.

That is why the specification of the manufactured system matters so much. The RMS OPD of the system when illuminated by a laser beam of 5 mm 1/e2 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 tolerances

Tolerancing 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 different methods used to manufacture and test lenses, and OpticStudio 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 the Tolerance tab clicking on Tolerance Wizard. The Tolerance Wizard 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:

Radius 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 is 0.2 mm: we also need to account for how the lens is mounted, and this will be discussed further later in this article.

OpticStudio 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 as 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.2 mm, 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 1/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.

OpticStudio 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 compensation

Both 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. OpticStudio 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 during 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:


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 Article attachments.

Testing the tolerancing setup

This 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 the Tolerancing tab...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 OpticStudio 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 and open one of the MC files, you will see something similar (actual numbers will vary as they are random) to the image below. (Please note that when running the tolerancer you will see the warning message "Solves should be removed prior to tolerancing. Semi-diameter should be fixed". This should generally be done but ignore this message in this case).


See what OpticStudio 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 tab

Re-open the original Beam Expander Prior to Tolerancing.zmx file, and open up an OPD plot, configured to a maximum scale of 0.1 waves. Make sure this is set manually in the Plot Scale setting, so it does not auto-scale.


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 Help Files for more details.

For the purposes of this article, select the Mode as 'Sensitivity', and then move to the Criterion tab.

The Criterion tab

The 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 satisfied). For convenience, OpticStudio 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 1/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 tab

Unlike 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 Monte Carlo 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 tab

The 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 run

As we chose to overlay Monte Carlo graphics, and had an open 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 (1/20)!


During Sensitivity Analysis, OpticStudio 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:


Now the nominal system has a tolerance criterion of 0.0023, or 1/400. We require 1/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, OpticStudio then computes a variety of statistics, the most important of which is the estimated change in the criterion and associated estimated performance. OpticStudio 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:


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%:

bis report3

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 OpticStudio to automatically tighten the tolerances for us, in a process called Inverse Sensitivity Tolerancing.

Inverse sensitivity

In Sensitivity mode, OpticStudio takes the tolerances and predicts the degradation of performance. In Inverse Sensitivity mode, OpticStudio 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 1/130:


Leave all other settings fixed and re-run the tolerancer. The root-sum-square results show greatly improved performance:


And this is also seen in the Monte Carlo results:


However, 20 Monte Carlo files is not enough. Roughly speaking, if there are n tolerances, you need at least n2 Monte Carlo files to sample the probability distributions adequately. As we have 24 tolerances, we need at least 242 = 576 Monte Carlo files. I chose to perform 1000 Monte Carlo samples, and obtained this result:


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 18 seconds on the author's 8-CPU machine. OpticStudio 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.


1. Video tutorial - Tolerancing

This article is part of the Imaging System Fundamentals free tutorial.

Previous article: How to design a singlet lens, Part 3: Optimization
Next article: How to export a lens to CAD


Was this article helpful?
38 out of 41 found this helpful



Please sign in to leave a comment.