Summary
The error function, also called the merit function, is a single number that characterizes an optical system during optimization. In a previous design note, we described OSLOs GENII error function, a 31-term expert designer error function that requires only 10 rays to compute.
The standard error function used in OSLO since 1988 is based on quadrature methods, recently extended to cover systems without symmetry. Unlike the GENII error function, the OSLO standard error function is based more on mathematics than optics, using rays laid out in a ring-spoke pattern to minimize the spot size or rms wavefront averaged over the field of view. This might seem a reasonable criterion, but the default symmetric function requires 32 rays to evaluate, so it is notably less efficient than the GENII error function. Nevertheless, lenses designed using OSLO have consistently ranked in the top group at lens design contests, and the reliability of its standard error function has been a major contributor to the popularity of OSLO among the worlds top lens designers.
Discussion
The principal default error function in OSLO PRO and OSLO SIX uses ray tracing to build an error function that optimizes the system for either minimum geometrical spot size, or minimum wavefront variance, as described below. The quadrature integration scheme [1], number of field points to be included, as well as the number or rays to be used, is controlled by the user as indicated in the following dialog box. As an option, the user can define a custom set of field points, and use a ray pattern laid out in a square grid.

The RMS spot size is estimated by tracing a number of exact rays through the optical system from one or more field points and measuring the standard deviation of the positions at which the rays intersect the image surface. An ideal system will focus all rays from any given field point in the field of view to a single point on the image surface and will therefore have a zero spot size. Let X(h, l, r) and Y(h, l, r) represent the x- and y-intercepts on the image surface of a ray in wavelength l from fractional object coordinates h (h means the object position (hx, hy)) that passes through fractional entrance-pupil coordinates r (r means the pupil position (rx, ry)). In these terms, an expression for the estimated mean-square spot size, averaged over the field, is given by

Here, wijk is the (normalized) weight of the ray, and the coordinates of the centroid of the spot from field point h, are given by


To construct an error function that estimates the spot size, a scheme must be used to determine the sampling to be used (i.e. the number of field points and their positions in the field, the number of rays to be traced from each field point and their positions in the pupil, and the number of colors and their wavelength values) and the values of the weights.
Another characteristic of optical systems that produce sharp point images is that the shape of the wavefront emerging from the system for a given field point is that of a sphere centered about a point on the image surface. The imaging quality of a system can then be measured by calculating the deviation from this reference sphere of the emerging wavefront.
The optical path difference, or OPD, for a single ray from a given field point is the distance along the ray from the reference sphere to the wavefront, times the refractive index in image space. To measure the imaging performance of the system as a whole, we create an error function that measures RMS OPD, averaged over the field, as follows. Let d(h, l, r) represent the OPD of a ray in wavelength l from fractional object coordinates h that passes through fractional entrance-pupil coordinates r. An expression for the estimated mean-square OPD, averaged over the field, is then given by

Again, wijk is the (normalized) weight of the ray, and the average OPD of the rays from field point h is given by

As with the estimation of the mean-square spot size, a scheme must be used to determine appropriate field, wavelength, and pupil samples and the appropriate weights. The quadrature integration schemes available for this purpose in OSLO are similar to the ones for computing spot size.
The summation over all the defined colors of course reduces the speed of error function evaluation proportional to the number of colors. Accordingly the Conrady D-d method [2] is supplied as an alternative option, which provides a reasonable level of chromatic correction without the requirement to trace rays in other than the primary color.
The spot size or wavefront variance terms don't depend on the distortion in the system. To control distortion, a set of additional terms can be added to the error function as indicated in the dialog box above. These are one-sided terms that are only active if their value falls outside the allowed limit. Another option permits one-sided terms that control the edge thicknesses of elements. Error function terms can be generated for all zoom configurations at once, or added to previously defined terms, thereby permitting customization of the default error function.
Under default conditions, the OSLO Error function contains 68 terms, of which 58 are active. The error function is thus somewhat less efficient than the GENII error function used in OSLO EDU and OSLO Light. On the other hand, the OSLO error function is much more versatile, and can easily handle large zoom systems where there may be a requirement for more than a thousand terms in the error function.
References
1. G.W. Forbes, J.Opt.Soc.Am. A 5, p1943 (1988).
2. W.T. Welford, "Aberrations of Optical Systems", p200, Adam Hilger Ltd, (1986).