Correction of spherical surface measurements by confocal microscopy

Refractive microlenses are nowadays widely used in optical systems. Characterizing their surface is essential to ensure their quality and to optimize their fabrication process. This is realized by optical surface profilers thanks to their vertical resolution, short measurement time and areal information. However, when measuring non-flat surfaces, errors appear caused by aberrations of the microscope objective used in such systems, which significantly limit the achievable quality of the manufactured spherical surfaces. Approaches have been proposed to tackle these errors, but none of them demonstrated its validity for measurements of high quality microlenses. In this work, we demonstrate that the surface error depends on the surface position within the field of view of the microscope objective and on the surface slope. We then explain how to record the value of this error experimentally: this can be done by measuring a reference ball placed at different positions in the field of view. We finally use a machine learning algorithm to fit the experimental data in order to correct subsequent measurements. We apply this approach to measurements performed by a 20× numerical aperture 0.6 microscope objective of a confocal microscope. The effectiveness of the proposed method is demonstrated by showing that the surface error corresponds to a RMS wavefront error of λ/7 before correction and of λ/50 after correction for glass microlenses used in the visible range. This method thus allows the use of high numerical aperture microscope objectives for an accurate characterization of microlenses. Likewise, the fabrication capability of microlenses in terms of slope and quality is greatly extended, which is especially important for aspheres or freeforms.


Introduction
Refractive micro-optics [1] is a key technology for many applications, such as fiber coupling, beam shaping, imaging and illumination systems [2][3][4]. Because spherical and aspherical surfaces at the microscale level are the principal component of refractive microlenses, their characterization is of Original Content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI. central importance. On the one hand, it provides the essential feedback for fabrication process optimization [5]. On the other hand, it evaluates the optical performance of the element. For these two reasons, the quality of such surfaces is ultimately limited by the accuracy of the measurement instrument.
Among the different surface texture measuring instruments, confocal microscopes (CMs) [6] and coherence scanning interferometers (CSIs) [7] are especially suited to perform this task. Both techniques possess a vertical nanometric resolution and provide areal topography contrarily to contact stylus scanning instruments that are developed to measure line profiles. Moreover, their measurement speed and their non-contact measurement render these tools suited for large volume production.
These optical scanning surface profilers record images of the surface at different heights. Thanks to intensity or phase information stored in these images, the surface vertical position is retrieved [6,7]. This means that the quality of the imaging system, which is principally related to the quality of the microscope objective (MO) of the instrument, is a limiting factor of the measurement accuracy.
High numerical aperture (NA) microscope objectives are required to characterize smooth surfaces with steep slopes. However, for a given field of view (FOV), the higher the NA the higher are the aberrations and the higher are the errors in the surface measurement [8]. To avoid these errors, the FOV can be reduced, but this implies the need of image stitching. This means in particular longer measurements which is undesirable in a high volume production environment.
These errors have already been discussed and methods have been proposed to correct them [9][10][11]. Here, we discuss these methods and explain why we believe none of them is suited for our particular measurement system.
The alternative correction method we propose is based on the assumption that the surface can be locally approximated by planes. Under this assumption, the surface errors can be described as a function of the position within the field of view and the slopes of these planes.
In this work, this error function is experimentally recorded for a 20× MO of a CM by using multiple measurements of a single reference ball across the entire FOV. A machine learning algorithm is used to perform a multivariate regression of the recorded surface error values and to correct subsequent measurements. Improvement is demonstrated for reference balls with radius of curvature (ROCs) in the range 450-875 µm as well as for an aspherical surface. Impact on the optical performance assessment is also evaluated. Section 2 discusses the surface error origins and motivates the proposed correction method. Section 3 develops on practical details of the implementation of the proposed approach. Section 4 presents experimental results and discusses them from an optical perspective. Finally, section 5 gives a brief conclusion of this work.

Surface error investigation
In this paper, we address the surface errors that are caused by the optical system of a confocal microscope working in reflection; see figure 1. Consequently, we assume the mechanical vertical scanning, which is usually performed by a piezoactuator, ideal.
Similar errors are found in optical testing by interferometry. In this case, these errors are called retrace errors and different methods exist to correct them in the non-null configuration [12,13]. However, these interferometers are systems devoid of MO and of scanning mechanism, thus rendering these correction methods meaningless in the present case.
To correct these errors, an elegant approach would be to model the formation of surface images at different heights as well as how the surface vertical position is derived from this images collection. The parameters of the model could then be obtained by measuring adapted calibration artifacts. However, such a process is not trivial. Some works have already been published, notably by taking a linear filtering operation approach [10,14]. However, the assumption that the point spread function (PSF) of the imaging system is identical throughout the FOV (shift invariance) is required which is not necessarily valid, especially for high NA MO or when the Petzval field curvature is not corrected [15]. Moreover, image distortion in the imaging system is not considered even though it is clear that distortion also produces a surface error. It is possible to correct the distortion by using many different techniques [16,17]. However, these methods assume the distortion to be constant. When measuring slopes, the back scattered rays do not fill the entire objective lens pupil and the distortion might thus slightly change compared to the flat surface case. Hence, the distortion is expected to also depend on the measured object. Figure 2 presents the surface error of two tilted mirror measurements. These errors cannot be explained by a shift invariant PSF since the surface is itself shift invariant. Indeed, the z difference between two positions of a tilted plane surface is only a function of the distance between them, not of their locations in the FOV. Because the shape of the surface residual is different for the two tilts, a constant distortion cannot explain it neither.
If the assumption of shift invariance is abandoned and the distortion is considered function of the object, a full theoretical description of the system would become even more complex and has to be developed. Also, this would mean more parameters to determine in order to calibrate the system and we can doubt that calibration artifacts would easily be available.
To avoid such complexity, empirical approaches could be considered. Some work has been published [11], but it is limited to surface slopes below 10 • and the demonstrated accuracy after correction does not reach the required level for high quality microlens fabrication. Indeed, to manufacture MO. An aberrated shift invariant PSF would not provoke any surface error in this case because the surface is also shift invariant. Either distortion has to be considered or shift invariance rejected. Moreover, because the shape of the surface error is different for the two tilts, a fixed distortion alone cannot explain these errors. Illustration of the local plane approximation made in this work. On the left, it can be seen that an aberrated PSF with distortion provokes almost the same error for the spherical surface and for the plane approximation thanks to the small surface curvature. In other words, the effect of the surface curvature on the light-surface interaction is neglected. An example of a local plane approximation for a sphere is presented on the right. diffraction limited microlenses, surface deviations RMS in the order of 50 nm have to be measured [18]. The exact value depends on the microlens material and on the operating wavelength.
In this work, we follow a similar empirical approach. It is based on the assumption that the spatial extension of the PSF and of the distortion should be in the range of a few microns. It means that any spherical surface, denoted z = s(x, y), can be approximated by planes within this range of a few microns when its radius of curvature is hundreds of microns, see figure 3. In this paper, we typically consider ROCs above 400 µm. In other words, this assumption allows the surface error ε to be seen as a function of the surface gradient as well as of the position within the FOV: Consequently, if this function can be recorded experimentally for all positions within the FOV and slopes within the NA, then the system is characterized and subsequent measurements can be corrected.
Correcting a measurement necessitates the knowledge of the surface error, which itself requires a corrected measurement of the surface. To solve this vicious circle, we note that the calculation of the error based on the uncorrected and corrected surfaces gives almost equivalent results when the amplitude of the surface error is much smaller than the surface itself. Since this is the case in practice, the correction procedure consists of determining the error based on the uncorrected measurement and to subtract it.
In this work, measurements performed with the confocal microscope system µsurf custom manufactured by NanoFocus [19] are evaluated. In particular, measurements are carried out using a 20× NA 0.6 FOV 800 µm × 800 µm MO. However, the approach is derived in a general way such that it can be applied to other types of scanning optical surface profilers such as CSIs.
The remaining challenge is the recording of the surface error function ε. An intuitive way to do this would be to measure tilted planes with different slopes and orientations.
Actually, this may not be the most reasonable approach for two reasons: firstly, the error from tilted planes is obtained as the deviation from the best plane fit. As it is in this case, the residual has always a mean of zero by definition of least square minimization. Consequently, only the relative error between the different locations is known, which is insufficient. Indeed, measurements from the different tilts have to be combined and for this an additional assumption would be required, e.g. that the surface error is zero at the center of the FOV for all tilt values. Secondly, this approach requires measurements of a reference flat mirror with a lot of different angles and orientations. This is long, tedious and presents the risk to crash the MO into the mirror.
As a consequence, the following approach is proposed: the surface of a reference ball with a known ROC is measured at different locations within the FOV. For each measurement, the surface error is taken to be the residual of the best sphere fit with the nominal ROC. However, by definition of least square fit, the residual has an average of zero but the surface error does not. An undetermined offset links thus the two quantities.
To determine this unknown offset, we have to note that a flat surface has no error thanks to residual flatness calibration [20]. This is the operation which consists of measuring a reference flat, then determining and recording the height error and finally subtracting this error in subsequent measurements. Because of this calibration, the top of the reference ball presents no error because it is flat. Consequently, the unknown offset, that has to be subtracted to the best sphere fit residual, is the value of the fit residual at the top of the ball.
The second advantage of the ball approach is practical: the error function is recorded only by moving the ball within the FOV. This is easily done for every CM outfitted with an automated xy-moving stage.
Obviously, the deviation of the reference ball surface from a sphere must be negligible compared to the surface error. In this work, this condition is fulfilled by using ruby balls of the highest grade manufactured by Saphirwerk which have a peak-to-valley roundness deviation under 50 nm according to METAS (Swiss federal institute of metrology) certification. This condition can be experimentally confirmed by a random ball test [21]. This means measuring different parts of the ball surface by rotating it. Because of the closed geometry, the real surface deviations cancel out and the average surface residual corresponds to the surface error from the measurement instrument. This error can then be subtracted to all measurements, which allows the assessment of the real surface deviation.

Practical implementation of the correction method
The choice of the reference ball to record the surface error is based on dimensional considerations: the field of view when using the 20× NA 0.6 microscope objective under consideration is 800 µm × 800 µm. The maximum measurable slope is 36 • , but for noise consideration the limit is fixed at 25 • . Therefore, balls with ROC values R = 400 µm can be measured only on a diameter of 320 µm, which corresponds to the FOV of In the CM we use, confocal images are created with the help of a multi-pinhole rotating disk and are recorded on a CCD camera. Because images consist of 512× 512 pixels, the surface error function ε is obtained for more than 2.5 · 10 8 observations after the 961 measurements. To simplify the data processing, we only consider surface slopes that have exclusively a component along the gradient ∂s/∂ρ, with ρ = (x 2 + y 2 ) 1 2 the radial distance defined with respect to the FOV center. This simplification is relevant since spherical objects are usually positioned at the center of the FOV. This placement is ensured by noting that the reflected light in confocal mode describes a circle on the spherical surface in focus, thus allowing to manually position the circle center at the FOV center. This simplification can nevertheless be suppressed without difficulty.
With this simplification, the dataset is reduced to a design matrix of dimension 2.3 · 10 5 -by-4. Figure 4 shows the surface error as a function of the slope, which is analytically derived from the spherical equation, for the different recorded positions x and y. This dataset is used to correct subsequent measurements which consist of < 2.5 · 10 5 pixels. Since frames are corrected pixel by pixel, a look up table approach to calculate the surface error of a single measurement would render the correction procedure too slow to be practical in this configuration. An alternative approach is to perform a regression of the function ϵ = ϵ(x, y, ∂s/∂ρ) with a neural network [22]. This task is performed using the Neural Net Fitting app included in the Deep Learning toolbox of Matlab. The feed-forward neural network has a single hidden layer which contains a chosen number of neurons equal to 50. 70% of the dataset is used for the training, 15% for the validation and 15% for the testing. The data partitioning is realized randomly.
The training step depends on the initial conditions which are also randomized. For several independent training processes, the number of completed epochs is between 500 and 1000, making the training time to be about 5-15 min on a standard commercial computer. Prediction rate of the trained network is about 4 · 10 5 examples per seconds. This corresponds to a maximum correction time of 0.625 s when the surface occupies the entire FOV. Such a short time renders this procedure practical, especially for high volume production. The main steps of the correction method are summarized in figure 5.

Spherical surfaces
To illustrate the benefit of this method, measurements of different reference balls with nominal ROCs R n ranging from 450-875 µm are corrected. Results, comprising the corrected The effect of aberrations can be divided into a ROC shift and a residual deviation r from the spherical shape. Before correction, the relative ROC shift seems to be a constant function. Its average value is 1.22%. After correction, its average value decreases to 0.24%. However, the corrected shift is not constant and increases when R n deviates from 550 µm, the ROC of the ball used to record the error function. This is not surprising since the curvature of the ball is not taken into consideration.  These values have to be put in perspective with the uncertainty of the ROC nominal value R n of the reference balls when measured by an ideal system. It can be estimated by combining [23] the standard uncertainty of the nominal value and the standard uncertainty coming from the CM calibration. The latest is calculated based on the uncertainty values of the cross-grating and step height artifacts used to calibrate the MO magnification, respectively the linearity of the z-axis mechanical scanning device [20]. This gives approximately a value of 0.28% and shows that a for R > 875 µm and R < 450 µm the ROC shift with respect to the nominal value ∆R is not completely corrected.
The RMS value of the spherical fit residual r rms is quite constant before correction with an average value of 139.3 nm. In the corrected case, this average value drops to 21.5 nm, i.e. a reduction by a factor > 6. As an illustration, the residual deviation of the 500 µm ROC ball is depicted in figure 6.

Aspherical surface
More generally, a microlens consists of an aspherical surface defined by its ROC R and its conic constant κ [24]. To illustrate the correction method for this extended geometry, the case of an aspherical microlens is presented.
Evaluation of the correction method accuracy is more tricky in this case since no reference surface exists. A workaround is to measure this aspherical surface with an almost aberration free imaging system. This task is completed by using the CSI Nexview by Zygo configured with its 50× NA 0.55 Mirau MO and a 0.5× zoom lens. However, the FOV in this configuration is reduced to 340 µm × 340 µm. In order to measure the full surface, image stitching has to be used. 50% overlap between images is used to get rid of stitching artifacts. In the present case, this corresponds to a measurement of nine frames, taking 243 s to capture compared to 25 s for the CM measurement.
To show that this measurement system can be a reference, it is used to measure the 600 µm ROC reference ball. Results are presented in figure 7: measured ROC shift ∆R is 0.3 µm and RMS value of the residual is 6.3 nm. Both values are within the uncertainty values and negligible compared to the ones obtained with the CM measurement. Again, a random ball test can confirm this conclusion. Even though it may be surprising that the more complex Mirau objective gives better results, it should be noted that the FOV is reduced by a factor > 2 for almost the same NA and magnification. Figure 8 presents the aspherical fit residual of the reference, the uncorrected and the corrected measurements. Table 2 presents values for R and κ for these three measurements. After correction, CM and CSI measurements are consistent. Indeed, the RMS value of the difference between the corrected CM and the CSI surfaces is only 14 nm. Such a good agreement is not obvious since the measurements are carried out with two different instruments with different working principles. Moreover, their calibration is not performed using the same artifacts.

Impact on the evaluation of the optical performance
In the context of micro-optics, the role of the characterization is also to control the optical quality of the surface. It is thus important to evaluate the accuracy of the correction method in terms of the optical performance. A way to do this is to translate ROC shifts into focal length shifts and the residual surface  deviation into wavefront aberration [25]. Quantitatively, the focal shift is approximated by where n is the refractive index of the lens. In the uncorrected case, for n = 1.5, values presented in table 1 lead to an average defocus of 2.44%, which is corrected up to the calibration uncertainty with the proposed approach. On the other hand, the value of the wavefront error can be estimated using the thin element approximation. This estimate is appropriate since it is applied only to the surface deviation and not to the surface itself. Indeed, the surface deviation and the corresponding slope deviation are much smaller than the surface height, respectively than the surface slope. With this approximation, the phase shift ∆Φ under plane wave illumination [26] is given by with the residual surface deviation r. Without correction, the RMS surface deviation attributed to the measurement system is about 140 nm and about 20 nm after correction, see table 1. For λ = 500 nm and n = 1.5, this leads to a RMS wavefront error of λ/7 (Strehl Ratio~0.45). After correction, the wavefront aberration is λ/50 (Strehl Ratiõ 0.98). This demonstrates that this method is suited for the characterization of diffraction limited microlenses.
Direct evaluation of wavefront aberration is usually performed by interferometric measurement [27,28]. However, this technique also suffers from retrace error [29], difficult to correct since MOs are required for microlenses testing. A way to solve this issue is the null testing [30]. This approach necessitates a reference surface for each different tested geometries. Obtaining such a reference surface, if this is possible, takes time and is expensive, thus rendering this approach unsuitable in practice.
Another advantage of the proposed method compared to optical testing is the availability of commercial tools fully automated. This makes the proposed characterization method relatively easy to implement and fast, thus making it suited for high volume production.
In conclusion, this method offers a characterization with an accuracy which can compete with the best optical testing, but with the crucial following advantages: firstly, the implementation is simple because no hardware modification of the instrument is needed. Secondly, the cost of this method is low because the only necessary expense is one reference ball. Finally and most importantly, the measurement time is reduced because the FOV is enlarged, allowing to get rid of image stitching that may be necessary otherwise. In the presented example, the measurement time is reduced by a factor of 10.

Possible improvements
The RMS value of the spherical deviation after correction is about 20 nm; see table 1. The reference balls specification as well as CSI measurements, see figure 7 for example, show that the actual surface deviation RMS of reference balls is below 10 nm. This suggests that this method can still be improved. Two points are believed to potentially offer improvement. First, the second derivative of the surface could be taken into account. Practically, this means that the surface error needs to be recorded for different curvatures for a given slope. This can be achieved by measuring not only one, but several reference balls with different ROCs across the FOV. Secondly, since only aberrations of the imaging systems have been considered, errors of the mechanical displacement could also be taken into account. For instance, a misalignment between the optical and mechanical axis could have an effect on the measurement.
It has also to be noted that this method can be extended directly to characterize cylindrical or freeform surfaces.

Conclusion
In this work, we propose a method to correct errors that occur in spherical and aspherical surface measurements by optical surface profilers. Our approach is based on measurements of a reference ball at different locations within the FOV of the microscope objective to record this surface error for multiple locations and slopes. This dataset is fitted with a neural network and used to correct subsequent measurements.
We illustrate this correction method for measurements performed by a confocal microscope equipped with a 20× NA 0.6 microscope objective. We demonstrate its effectiveness by showing that the surface error goes from 140 nm RMS before correction to approximately 20 nm RMS after correction. Optically speaking, the residual surface error corresponds to a wavefront aberration of about λ/50 RMS, which demonstrates that this confocal microscope in combination with the correction method can be used to characterize diffraction limited microlenses. Several suggestions to improve this approach are also made.
This method is especially important for the characterization of large and steep microlenses that require high NA microscope objectives and large FOVs, thus aberrated imaging systems. Here, we show that it is in particular useful for microlenses with a diameter > 340 µm and a maximum surface slope > 20 • . For this reason, we are strongly convinced that this method is a real asset towards the fabrication of high NA refractive microlenses.