Position and displacement sensing with ... - OSA Publishing

1 downloads 0 Views 967KB Size Report
The use of a Shack–Hartmann wave-front sensor as a position-sensing device is proposed and demon- strated. The coordinates of a pointlike object are ...
Position and displacement sensing with Shack–Hartmann wave-front sensors Jorge Ares, Teresa Mancebo, and Salvador Bara´

The use of a Shack–Hartmann wave-front sensor as a position-sensing device is proposed and demonstrated. The coordinates of a pointlike object are determined from the modal Zernike coefficients of the wave fronts emitted by the object and detected by the sensor. The position of the luminous centroid of a moderately extended incoherent flat object can also be measured with this device. Experimental results with off-the-shelf CCD cameras and conventional relay optics as well as inexpensive diffractive microlens arrays show that axial positioning accuracies of 74 ␮m rms at 300 mm and angular accuracies of 4.3 ␮rad rms can easily be achieved. © 2000 Optical Society of America OCIS codes: 010.7350, 120.3930, 220.4840.

1. Introduction

Shack–Hartmann wave-front sensors 共SH’s兲 are finding increasingly more uses as multipurpose optical laboratory tools. Besides having specialized applications in the field of adaptive optics,1,2 they have proved their suitability for a wide variety of applications in the fields of imaging and wave-front analysis,3–10 in some instances replacing conventional interferometric systems and beginning to develop their own market segment. They belong to a class of optical sensors that estimate the shape of an incoming wave front from a set of measurements of its local slopes, with a data-reduction approach essentially similar to those of other sensing procedures such as lateral shearing interferometers11–13 and laser ray-tracing methods.14 –16 Their present popularity is correlated with three main factors: their inherent conceptual simplicity, their specific features 共in particular, the possibility of working with a wide range of sources, from monochromatic pointlike to extended incoherent, without the need for a coherent reference wave front兲, and the availability of the key components required for gathering data 共CCD detec-

´ rea de O ´ ptica, Departamento de The authors are with the A Fı´sica Aplicada, Facultade de Fı´sica, Universidade de Santiago de Compostela, E-15706 Santiago de Compostela, Galicia, Spain. S. Bara’s e-mail address is [email protected]. Received 5 October 1999; revised manuscript received 14 January 2000. 0003-6935兾00兾101511-10$15.00兾0 © 2000 Optical Society of America

tors and microlens arrays兲 and processing them at a reasonable speed. In this paper we study the use of a SH as a position and displacement sensor for moderately extended self-luminous objects located at intermediate distances 共tens of centimeters兲 from the sensor. The coordinates of pointlike sources radiating in an isotropic homogeneous medium can be determined by a SH analyzing the spherical wave fronts emitted by them. The coordinates of the luminous centroid of a flat and moderately extended incoherent object can be determined in a similar way. From a complementary viewpoint, a SH applied to positioning can be described as a highly redundant triangulation setup in which each sampling subaperture gives the relevant parameters 共position and slope兲 of a ray coming from the object’s centroid. Obviously other competing technologies 共time of flight, classic triangulation, depth of focus, etc.兲 are also able to perform this positioning task successfully. However, the strategic advantage of the SH stems from its flexibility as an optical tool. Whereas most competing techniques require dedicated hardware, specific for the positioning function, a SH can be used, essentially with the same hardware configuration and with the same software resources, to accomplish a variety of tasks in the optical lab. The structure of this paper is as follows: in Section 2 the principles of wave-front estimation by use of a SH and its application to positioning are briefly described. In Section 3 the main positioning-error sources, as well as the calibration procedures used to remove the most influential systematic errors, are discussed. In Section 4 we present a practical im1 April 2000 兾 Vol. 39, No. 10 兾 APPLIED OPTICS

1511

rolens is for practical purposes constant, the factors A2共r兲 in Eq. 共1兲 cancel 共that inside the integrand with the one in In⫺1兲, resulting in

xn兾z ⫽ Sn⫺1



ⵜW共r兲d2r,

(2)

L

Fig. 1. Basic schematic of a SH setup.

plementation of this sensor and the experimental results obtained with it. Finally, in Section 5 some additional remarks are made regarding the limits of applicability of this method and possible improvements in the wave-front estimation procedures. 2. Position and Displacement Sensing with the Shack–Hartmann Wave-Front Sensor A.

Determination of Wave-Front Slopes

The basic SH setup is shown in Fig. 1. The incoming field, of amplitude A共r兲 and phase kW共r兲, k ⫽ 2␲兾␭, is spatially sampled by microlens array MA, and the position of the centroid of the irradiance distribution produced by each microlens in a given observation plane 共usually the common focal plane F兲 is determined by use of a suitable detector, in most cases a CCD array. For any generic detection plane C 共not necessarily the focal one兲, located at a finite distance z from the microlens array, it is easy to show within the range of validity of the Fresnel approximation 共see Appendix A for details; a different derivation of this result can be found in Ref. 17兲 that position xn of the centroid of irradiance distribution I共x兲 produced at C by the nth microlens relates to the amplitude and the phase of the incoming wave front through the expression xn ⬅ In⫺1



C

xI共x兲d2x ⫽ zIn⫺1



A2共r兲关ⵜW共r兲 ⫹ Dr兴d2r,

L

(1)

where the subscripts denote integration on the detector plane 共C兲 and on the microlens pupil 共L兲, the spatial coordinates r are measured from the microlens center 共x are measured from its projection along the Z axis in C兲, In ⫽ 兰C I共x兲d2x is a normalization factor that is equal to the total radiant flux associated with the field produced by nth microlens at C 关if there are no losses, 兰C I共x兲 d2x ⫽ 兰L A2共r兲d2r兴 and D ⫽ 1兾z ⫺ 1兾f is the excess reciprocal distance of the detection plane with respect to the microlens focal plane. Note that in the general case the centroid position contains information about the spatial average of the wave-front slope, ⵜW共r兲, but this average is weighted by the local irradiance at the microlens, A2共r兲, and biased by the term Dr in the integrand. However, for any z, if the irradiance over the mic1512

APPLIED OPTICS 兾 Vol. 39, No. 10 兾 1 April 2000

where Sn is the area of microlens pupil L. This result indicates that, if the irradiance at the microlens pupil is uniform, one can determine the unbiased local wave-front slope 共spatially averaged over L兲 by measuring xn at any plane behind the microlens, not necessarily at its focal plane. In other words, the centroid propagates along Z following a straight line of slope Sn⫺1 兰L ⵜW共r兲d2r intersecting the center of the microlens pupil. To deduce Eq. 共2兲 we have taken into account that r is measured from the center of the microlens, so 兰L rd2r ⫽ 0. In practice the relevant data gathered by the sensor are not single centroid positions but rather the centroid’s displacements xn ⫺ xnp with respect to its nominal position xnp, usually taken as the centroid produced by a collimated plane reference wave front 共for which ⵜW ⫽ 0兲. We deduced all the above results by assuming diffraction-limited microlenses. In general, however, microlenses will show some amount of aberration, which will bias the centroid with respect to that given in Eq. 共1兲. Nevertheless, because a SH performs differential measurements, this bias is not particularly harmful. In fact, it has no noticeable influence in centroid displacements if the microlenses can be regarded as thin optical elements: In this case the actual phase ⌽l共r兲 ⫽ kWl共r兲 of the microlens transmittance function can be written as the sum of a diffraction-limited phase kWd共r兲 plus an aberration term kWa共r兲. Equation 共1兲 still holds, provided that Wa共r兲 is added to the incoming wave front W共r兲, showing that in this case the centroid will be biased proportionally to the averaged microlens aberration gradient, ⵜWa共r兲. As this bias will be the same for the unknown and the reference wave fronts 共in the framework of the thin-lens approximation兲 its effect will cancel out for the substraction xn ⫺ xnp. Note that, because Wa共r兲 is arbitrary, in principle any kind of phase element and even binary amplitude mask can be used to measure the local wave-front slopes. In the limiting case when Wl共r兲 ⫽ 0 关Wa共r兲 ⫽ ⫺Wd共r兲兴, the sampling subapertures are simply clear holes and the SH becomes a traditional Hartmann setup.18 Nevertheless, the use of microlenses19 has noticeable advantages; among them are the higher dynamic range of the sensor and the increased signalto-noise ratio achievable in case of photon-limited noise. B.

Calculation of Object Coordinates

We can estimate wave front W共r兲 in a modal way by expanding it as a linear combination of a given set of

basis functions 共e.g., Zernike polynomials20 –22 for sensors with circular pupils of radius R兲 as ⬁

W共r兲 ⫽

兺 a Z 共r兾R兲 i

i

the paraxial region of the sensor from the modal coefficients associated with tilts 共a2, a3兲 and defocusing 共a4兲 as z0 ⫽ R2兾共4 冑3a4兲,

(3)

i⫽1

and estimating the first M coefficients from the 2N measurements mn ⫽ 共xn ⫺ xnp兲兾z 共n ⫽ 1, . . . , N, where N is the number of microlenses in the array兲 given by the sensor. The use of Zernike polynomials is particularly helpful in many optical applications, because the lowest-order terms of this expansion can be identified with well-known optical aberrations. Furthermore, for spherical wave fronts in the paraxial domain, the first modal coefficients 共corresponding to tilts and defocus兲 give direct information about the location of the point source. Different estimation procedures can be applied to yield reasonable estimates aˆi of wave front modal coefficients ai . Using a linear estimation, we calculate the modal coefficients as a linear combination of the sensor data by

x0 ⫽ ⫺2z0 a2兾R, y0 ⫽ ⫺2z0 a3兾R.

(7)

Once the reconstruction matrix for the Zernike polynomials and a given sensor geometry has been computed, the coefficients aˆi estimated from Eq. 共4兲 can be substituted into Eqs. 共7兲 to yield an estimation of the pointlike source coordinates 共xˆ0, yˆ0, zˆ0兲. C. Application to Flat and Moderately Extended Incoherent Objects

If the object is extended and spatially incoherent, irradiance I共x兲 in Eq. 共1兲 is replaced by I共x兲 ⫽



I共x; r0兲d2r0,

(8)

S0

aˆ ⫽ ␰m,

(4)

where aˆ is a column vector of dimension 共M ⫻ 1兲 whose elements are the estimated coefficients, m is a column vector of dimension 共2N ⫻ 1兲 whose elements are the sensor measurements, and ␰ is an 共M ⫻ 2N兲 reconstruction matrix. This reconstruction matrix can be constructed in any of several ways, depending on the merit figure adopted to define an optimum estimation criterion. It is particularly useful to minimize residual variance ␴2 between the actual 关Eq. M ˆ 共r兲 ⫽ ¥i⫽1 共3兲兴 and the estimated W aˆi Zi共r兾R兲 wave fronts, spatially averaged over the whole sensor pupil area 共S兲 and statistically averaged 共具 典兲 over all possible incoming wave fronts: ␴2 ⫽

1 S



ˆ 共r兲兴2典d2r. 具关W共r兲 ⫺ W

(5)

S

The calculation of the reconstruction matrix can be done in this case by direct application of the Gauss– Markov linear minimum-mean-square error theorem,23 which requires information about the statistical parameters of the random process.24 –29 When this statistical information is not available, a reasonable option is to use an equally weighted leastsquares estimator. In this case the reconstruction matrix adopts the simple form23,30,31 ␰ ⫽ 共 ATA兲⫺1AT,

(6)

where A is a 2N ⫻ M matrix whose elements are the derivatives of the basis functions averaged over the subpupils 兵Anq ⫽ Sn⫺1 兰L关⳵Zq共r兾R兲兾⳵ x兴d2r for n ⫽ 1, . . . , N and Anq ⫽ Sn⫺1 兰L关⳵Zq共r兾R兲兾⳵ y兴d2r for n ⫽ N ⫹ 1, . . . , 2N其. The superscript T stands for transpose. Using the Zernike polynomials as a basis of orthonormal functions, we can calculate the coordinates 共 x0, y0, z0兲 of a pointlike object located at r0 in

where I共x; r0兲d2r0 is the irradiance produced at x in the detector plane by an elementary region of area d2r0 centered at point r0 of the object. The integral is extended to the whole object area, S0. In this case Eq. 共1兲 becomes xn ⫽ zIn⫺1

兰兰 L

A2共r; r0兲关ⵜW共r; r0兲 ⫹ Dr兴d2rd2r0,

S0

(9)

where A共r; r0兲exp W共r; r0兲d2r0 is the complex field at r produced by d2r0. If the object points radiate isotropically 共at least for the solid angle subtended from them by the microlens pupil兲 and the object lies in the paraxial region of the microlens, each point will produce a uniform irradiance over the microlens pupil, so, to a good approximation, A2共r; r0兲 does not depend on r and is proportional to object irradiance I共r0兲. Also within this approximation, the optical path difference between a given point of the object and a given point in the microlens pupil W共r; r0兲 is related to the optical path difference that originates from any other object point W共r; r0⬘兲 by an expansion at most quadratic in 兩r0 ⫺ r0⬘兩, so the corresponding wavefront gradients are linearly related. In this framework, Eq. 共9兲 reduces to



xn兾z ⫽ SL⫺1

ⵜW共r; rco兲d2r,

(10)

L

where rco is the position of the object luminous centroid, defined by

rco ⫽

兰 兰

r0I共r0兲d2r0

S0

.

(11)

I共r0兲d r0 2

S0

1 April 2000 兾 Vol. 39, No. 10 兾 APPLIED OPTICS

1513

Equation 共10兲 shows that, for a moderately extended object, xn gives us direct information about the averaged wave-front slope produced by an effective point source located at the centroid of the object, rco, allowing its coordinates to be determined from Eqs. 共7兲 in the same way as described above. This result is intuitive in the framework of incoherent imaging with diffraction-limited optically thin lenses, where a linear mapping of irradiances between the object and the image planes takes place. The centroid of the image determines the geometrical ray that is coming from the centroid of the object and passing through the center of the lens.

3. Error Sources and Calibration Procedures

The positioning results obtained experimentally with the procedure mentioned above are affected by various error sources. Several of them are systematic and can be removed by calibration. From a practical viewpoint, the relevant errors include A. Errors that arise from uncertainties in the geometrical parameters of the sensor 共e.g., exact distance z between the microlens array and the detection plane, conversion factor pixel units兾length, and radius R of the sensor pupil兲. B. Errors associated with the creation of the nominally flat reference wave, which translate into a biased position of reference centroids xnr. C. Angular misalignments by rotations of the microlens array with respect to the CCD axes. D. Undersampling and undermodeling errors 共owing to use of a finite number of measurement points and to the finite number of modes M included in the computation of reconstruction matrix ␰兲. E. Statistical errors in centroid determination 关which are due mainly to jitter, thermal noise, mechanical vibrations, spatial quantization 共CCD pixelization兲 and gray-level quantization兴. In this study we developed a calibration procedure to deal with systematic errors of kinds A, B, and D, once the behavior of errors D was checked by numerical calculation. Systematic errors C, thoroughly studied by Pfund et al,32 were corrected as much as possible by careful alignment of the sensor elements. Random uncertainties that arose from error E were minimized by averaging, and they set an upper limit on the accuracy in positioning achieved by the sensor. We do the calibration by recording the sensor outputs 关Eq. 共4兲兴 for a set of known object positions. It can be shown that for errors A, B, and 共under not very restrictive assumptions兲 also for errors D, the modal coefficients retrieved by the sensor are linearly related to the actual coefficients. Once the parameters of this linear relationship are determined, they can be used to correct the raw modal coefficient estimates. This approach is based on the following results: Let ai be the actual ith Zernike coefficient of an in1514

APPLIED OPTICS 兾 Vol. 39, No. 10 兾 1 April 2000

coming wave front W共r兲. From the orthonormality of the Zernike basis, it can be expressed as ai ⫽

1 ␲R2



W共r兲 Zi 共r兾R兲d2r.

(12)

S

On the other hand, let 2N

aˆi ⫽

兺␰

in

mn

(13)

n⫽1

be the modal coefficient that would be determined by the sensor if neither noise nor systematic errors A, B, and C were present 共errors D are not excluded兲, where ␰in are the elements of the reconstruction matrix 关calculated as in Eq. 共6兲 with the correct parameters of the sensor, namely, a correct value for R and positions of the centers of the microlenses兴 and mn are the noiseless and error-free sensor measurements, defined by mn ⫽ 共xn ⫺ xnp兲兾z for n ⫽ 1, . . . , N and mn ⫽ 共 yn ⫺ ynp兲兾z for n ⫽ N ⫹ 1, . . . , 2N. 共xn, yn兲 are the exact coordinates of the centroid produced by microlens n associated with the unknown incoming wave front, and 共xnp, ynp兲 are those that correspond to a perfectly plane reference wave front. In practice, however, the modal coefficient retrieved by the sensor can be modeled as 2N

aˆi ⬘ ⫽

兺␰

in

⬘mn⬘,

(14)

n⫽1

where ␰in⬘ are the elements of the reconstruction matrix 共computed possibly with some error of kind A兲. mn⬘ are the actual measurements provided by the sensor, modeled as mn⬘ ⫽ 共xn⬘ ⫺ xn⬘r兲兾z⬘ ⫹ ␮n for n ⫽ 1, . . . , N and mn⬘ ⫽ 共 yn⬘ ⫺ yn⬘r兲兾z⬘ ⫹ ␯n for n ⫽ N ⫹ 1, . . . , 2N, where 共 xn⬘, yn⬘兲 and 共xn⬘r, yn⬘r兲 the measured centroid coordinates 关affected by systematic errors A that are due to the conversion factor 共pixel units兾units of length兲兴. 共xn⬘r, yn⬘r兲 correspond to the centroid produced by the actual reference wave front 共not necessarily a plane collimated one, error B兲, z⬘ is the assumed distance microlens–CCD 共possibly affected by a systematic error, A兲, and 共␮p, ␯p兲 are the noise components that are due to random effects E. Additive zero-mean uncorrelated noise is assumed in this model. Expressing these magnitudes as functions of the actual ones as z⬘ ⫽ ␣z z, R⬘ ⫽ ␣R R, and xn⬘ ⫽ ␣s xn 共with the same ␣s factor affecting all transversal spatial positions yn⬘, xn⬘r, etc.兲, we have ␰in⬘ ⫽ ␣R␰in

(15)

关see above Eq. 共6兲 and the definition of Anq for the dependence of matrix elements ␰in on R兴 and mn⬘ ⫽ 共 xn⬘ ⫺ xn⬘r兲兾z⬘ ⫹ ␮n ⫽ 共␣s兾␣z兲共 xn ⫺ xnr兲兾z ⫹ ␮n ⫽ 共␣s兾␣z兲共 xn ⫺ xnp兲兾z ⫺ 共␣s兾␣z兲共 xnr ⫺ xnp兲兾z ⫹ ␮n (16)

for n ⫽ 1, . . . , N 共analogous expressions for y with n ⫽ N ⫹ 1, . . . , 2N兲. Substituting Eqs. 共15兲 and 共16兲 into Eq. 共14兲, using Eq. 共13兲, and averaging measurements to cancel noise, we get ∧ aˆi ⬘ ⫽ 共␣s␣R兾␣z兲共aˆi ⫺ air兲,

(17)

∧ where a ir is given by Eq. 共13兲 applied to the actual reference wave front. But aˆi is not the exact coefficient ai. The difference is in the modeling and undersampling error 共D兲, whose magnitude is ⑀i ⫽ ai ⫺ aˆi. If, as in the case described in Section 4 below, this error is small or depends linearly on ai in the range of interest 共including for simplicity air, although this is not a necessary condition兲 such that ⑀i ⫽ ␬ai ⫹ b 共␬ and b constants兲, we get aˆi ⬘ ⫽ 共␣s␣R兾␣z兲共1 ⫺ ␬兲共ai ⫺ air兲 ⬅ Aai ⫹ B.

(18)

This linear relationship is the basis of the calibration procedure applied in Section 4. A set of estimations aˆi ⬘ of the ith Zernike coefficient are made with the SH by use of a given 共and possibly unknown兲 reference wave front and a set of different incoming wave fronts of known ai . Fitting Eq. 共18兲 to the experimental data, we compute constant parameters A and B. Equation 共18兲 is subsequently inverted and used in the actual measurement runs to yield calibrated estimations aical, which correct the raw estimates aˆi ⬘ provided by the sensor as aical ⫽ A⫺1共aˆi⬘ ⫺ B兲. These general results for Zernike coefficients can alternatively be extrapolated to paraxial point source coordinates by use of Eqs. 共7兲, giving rise to the following expressions for the calibration-corrected object coordinates 共x0, y0, z0兲: z0 ⫽

z0rz0⬘ , ␥z0r ⫹ z0⬘

(19a)

x0 ⫽ 共␴z0兾z0⬘兲x0⬘ ⫹ z0 x0r兾z0r,

(19b)

y0 ⫽ 共␴z0兾z0⬘兲y0⬘ ⫹ z0 y0 兾z0 ,

(19c)

r

r

where 共 x0⬘, y0⬘, z0⬘兲 are the coordinate estimates given by the sensor 共before calibration兲. We determine the constant parameters that appear in Eqs. 共19兲 关which are combinations of 共x0r, y0r, z0r兲 共coordinates of the reference wave-front source兲, ␥ ⫽ ␣z␣R兾 关␣s共1 ⫺ ␬兲兴, and ␴ ⫽ ␥兾␣R兴 by fitting these curves to sets of experimentally measured 共z0, z0⬘兲, 共x0, x0⬘兲, and 共 y0, y0⬘兲 pairs. The factor ␬ that arises in ␥ is the slope of the ⑀i 共ai 兲 linear dependence, and it is expected to be much smaller than 1 for practical setups 共see Section 4兲. 4. Experimental Results

The feasibility of the proposed method was experimentally assessed by a SH built with a low-cost approach, with off-the-shelf CCD detectors and cheap diffractive optical elements. A schematic of the sensor is shown in Fig. 2共a兲. It uses a 5 ⫻ 5 array of diffractive microlenses, with square pupils with a

Fig. 2. Experimental setup: 共a兲 sensor configuration, 共b兲 diffractive microlens array.

side of 0.95 and a focal length of 36 mm 共at ␭ ⫽ 644 nm兲. We made this diffractive structure by photoreducing onto conventional silver-halide film 共Agfa APX25兲 a laser-printed gray-scale mask 关Fig. 2共b兲兴. The detector is a CCD camera 共Pulnix TM6-AS兲 with a DT3155 acquisition card. A well-corrected lens, L1, serves as a relay, projecting the image of the focal plane of the microlenses onto the detector chip. This relay lens is useful for matching the size of the microlens array 共MA兲 to the area of the CCD, accomodating the expected dynamic range of centroid displacements. It also provides an additional degree of flexibility, allowing microlens arrays of different sizes to be used. The object to position was the active area of a visible LED emitting at 644 nm 共shown in Fig. 3兲, mounted upon a motor-driven XZ micropositioning stage in an optical bench. Although amplitude diffractive microlenses in general have low diffraction efficiency, the LED provides enough power at the first focal plane of the microlens array for successful centroid detection. The images of the irradiance distribution on the CCD plane 共located at a conjugate of the common 1 April 2000 兾 Vol. 39, No. 10 兾 APPLIED OPTICS

1515

Fig. 3. Emitting region of the LED used as the object.

focal plane of the microlens array兲 were acquired and processed with specifically designed software, which allows for several options for image capture and display, preliminary processing 共including automatic thresholding and focal regions identification兲, centroid location, and data reduction to produce the desired Zernike coefficients and paraxial coordinates. A typical spot field after thresholding is shown in Fig. 4共a兲. The microlens array is illuminated by the LED located at a distance z0 ⫽ 300 mm. Figure 4共b兲 shows an enlarged image of an individual focus. The space initially allocated to each microlens in the CCD plane was approximately 80 ⫻ 80 pixels; the typical size of the focal region where centroid is computed after thresholding is approximately 15 ⫻ 15 pixels. We computed the reconstruction matrix for this sensor by including the first M ⫽ 20 Zernike polynomials in the wave-front expansion 共piston excluded兲. Before calibrating the sensor, and to check the validity of the assumptions about the behavior of the undersampling and undermodeling error, we made a numerical evaluation of ⑀i , using Eqs. 共12兲 and 共13兲 for a wide range of incoming spherical wave fronts. We computed Zernike coefficient ai by numerically evaluating the modal projection integral 关Eq. 共12兲兴; we calculated aˆi from Eq. 共13兲, using the correct reconstruction matrix and simulated sets of noiseless sensor measurements computed by numerical evaluation of Eq. 共2兲. Figure 5 shows the dependence of ⑀i on ai for the mode i ⫽ 4 共defocus兲 for an object point located on optical axis Z and moving from z ⫽ 1000 mm to 50 ⫽ mm toward the sensor. The linear dependence of the error mentioned above is well verified, with a slight deviation in the region of high ai 共i.e., for points too close to the sensor兲. Other modes of interest behave in a quite similar way. Even with this slight deviation from linearity the calibration procedure can be confidently applied here because the error in this example has a small magnitude 共notice the different scales of the axes兲: On one hand this is due to the fact that a point source at these distances of a microlens array with barely a 5-mm side produces wave fronts that can be reasonably well fitted by a parabolic expansion 共Zernike terms 2, 3, and 4兲; higher-order terms make a small, if not negligible, contribution to the phase. Because 20 modes have been included in the reconstruction matrix, un1516

APPLIED OPTICS 兾 Vol. 39, No. 10 兾 1 April 2000

Fig. 4. 共a兲 Typical spot field 共after thresholding兲 of the microlens array illuminated by a LED located at a z0 ⫽ 300 mm. 共b兲 Enlarged image of an individual focus.

dermodeling errors are of no special concern. On the other hand, the microlens array has 25 evenly spaced sampling points, which provide for 50 measurements at each frame. This number of points is enough for estimating the first three Zernike coefficients, which

Fig. 5. Undersampling and undermodeling error ⑀i versus actual modal coefficient for i ⫽ 4 共defocus兲. The range of values of ai corresponds to a set of pointlike objects located on the optical axis from z ⫽ 1000 mm to z ⫽ 50 mm away from the sensor.

Fig. 6. Calibration curves. 共a兲 Filled circles, actual z0 versus estimated 共before calibration兲 z0⬘ for a z displacement of 5 mm in increments of 250 ␮m; solid line, fit of Eq. 共19a兲 to the experimental data. 共c兲 Filled circles, actual x0 versus estimated 共before calibration兲 x0⬘ for an x displacement of 1.05 mm in increments of 250 ␮m at z ⫽ 300 mm; solid line, fit of Eq. 共19b兲 to the experimental data. 共e兲 Same as 共c兲 but for an x displacement of 120 ␮m in increments of 5 ␮m. 共b兲, 共d兲, 共f 兲 Residuals of the fits for 共a兲, 共c兲, and 共d兲, respectively.

correspond to modes that have low spatial frequency, and, in consequence, the undersampling error is also small. Figure 6共a兲 shows experimental results of axial positioning calibration. The object was displaced along the Z axis in increments of 250 ␮m for a 5-mm range about a position located 300 mm from the sensor. The horizontal axis is the z0⬘ coordinates esti-

mated by the sensor 共before calibration兲. The vertical axis corresponds to the actual source positions, determined from the micropositioning stage readouts. Error bars represent the 1␴ uncertainties in z0⬘ that are due to the propagation of the uncertainties of the measured centroids xnr. The rms residual between the actual positions and those provided by the sensor after calibration is 74 ␮m 关Fig. 1 April 2000 兾 Vol. 39, No. 10 兾 APPLIED OPTICS

1517

6共b兲兴, which in relative terms amounts to 2.5 ⫻ 10⫺4. Note that, when the SH is used as a triangulation device, for a given uncertainty in microlens centroid lateral displacement measurements the relative uncertainties in Z positioning of objects lying upon the optical axis will, to a first approximation, scale with z兾h, where h is the lateral size of the microlens array. Two similar measurement runs, in this case along transversal direction X 共at z ⫽ 300 mm兲, are shown in Figs. 5共c兲–5共f 兲. In the first run, the object was displaced along 1.05 mm in 50-␮m increments. 3␴ error bars owing to the propagation of measurement noise are not visible at this scale. In the second run, smaller increments 共5 ␮m兲 were used, spanning a range of 120 ␮m. The corresponding 3␴ error bars are shown. After calibration, the rms residuals between the actual positions and the sensor estimates were 1.4 and 1.2 ␮m rms, respectively. At this working distance these results translate into an angular positioning uncertainty of 4.3 ␮rad rms. 5. Additional Remarks

The results presented here are based on the use of the paraxial approximation to describe the field propagation from the object to the microlens array and from this array to the focal plane. This assumption sets some limits to the range of object positions whose determination can be described with this model. In particular, it is required that the object lie inside the paraxial region of all and every microlens, which simultaneously limits the object spatial extent, the maximum allowable lateral displacement from the optical axis for any distance z0, and the minimum measurable z0 共for an on-axis object point兲. As an order-of-magnitude estimation, accepting a limiting angle of incidence of ⫾5 deg on the rim of the microlens array yields a minimum z0 distance for an onaxis pointlike object measured with the setup described in Section 4 of 38.4 mm. With the same parameters, the maximum off-axis displacements at z0 ⫽ 300 mm should be restricted to ⫾22.9 mm. The maximum z0 distance that can be measured with this sensor is limited not by the paraxial constraint but by the progressive loss of precision that is common to all triangulation setups as the angle subtended by the baseline as viewed from the object point decreases. For the setup described here, the expected relative rms uncertainty in z0 scales with z0 as ␴共z0兲兾z0 ⯝ 8 ⫻ 10⫺7 关mm⫺1兴z0 for points far enough off the microlens array, as can be deduced from the analysis of the noise propagation from centroid measurements to modal coefficient estimates. The discussion of Subsection 2.C requires that the resolvable points of the extended object radiate isotropically, at least for all angles involved in the propagation to the microlens array. In practice this constraint is not particularly strong insofar as only paraxial positioning is considered. Some care should be taken, however, if the object presents an inhomogeneous and highly directional emitting pattern; in such case, amplitude variations across the microlens pupils 关Eq. 共9兲兴 can appear, and, addition1518

APPLIED OPTICS 兾 Vol. 39, No. 10 兾 1 April 2000

ally, the luminous centroid of the object can become dependent on the observation angle, so no unique position can be assigned to it as viewed from all the microlenses. Throughout this study it has also been assumed that there is no noticeable cross talk between neighboring microlenses, such that the measured position of the nth microlens centroid is not affected by the amplitude distributions of the contiguous focal regions. This puts an upper limit 共dependent on ␭兲 on the f-numbers of the microlenses used in the SH. In the setup described, the separation between neighboring microlens centers is ⬃39 times the distance between zeros of the diffraction pattern of any individual microlens pupil and, additionally, the thresholding and focal region identification routines allow the spurious light present far from the main lobes of the focal area to be excluded from the centroid. In such a way, possible centroid perturbations owing to neighboring foci are minimized. A detailed study of the effects that arise from cross talk can be found in Ref. 33. The linear least-squares estimation used in this study is by no means the unique possibility for data reduction. Several other methods could bring better accuracy to position estimation. Among the linear methods, as was briefly pointed out in Section 2, the least-squares estimation can be refined by inclusion of statistical information in the estimator, becoming a minimum-variance estimation. This can be done in practice if the probability-density distribution of object positions is known. This distribution allows for computing the corresponding phase correlation function and from it—and the statistics of measurement noise—the minimum-variance reconstruction matrix. In many cases of interest, even if this probability distribution is not completely known, some reasonable guess can be made 共e.g., the object point will not be outside a certain volume兲, and this information can be introduced in the model. Alternatively, nonlinear estimations could also be done with the SH data: An example would be to minimize the averaged squared difference between the sensor measurements and those expected from a perfect spherical wave front with unknown focal coordinates, without applying paraxial expansions to the phase. Whether these procedures can lead to a practical improvement of the estimation, for different levels of measurement noise, remains a subject for future research. However, the results presented here deal with positioning of a highly cooperative object. The application of this method to objects that are not selfluminuos requires careful design of the illumination system. 6. Conclusions

The positions of pointlike or moderately extended flat objects can be accurately determined by use of Shack–Hartmann wave-front sensors. In the modal estimation approach the coordinates of the object are extracted from the modal coefficients associated with

the wave fronts emitted by it and detected by the sensor. It has been shown that, as far as the irradiance distribution can be considered uniform over each microlens 共although it may vary from one to another兲, the distance of the CCD detection plane to the microlens array is not critical. Whereas most angular misalignments between the SH elements have to be corrected carefully a priori, the effects of other important sources of systematic errors can be calibrated by the procedure described here. In the example presented here, a low-cost SH built with off-the-shelf optics and cheap diffractive microlenses allowed us to obtain relative positioning uncertainties of 2.5 ⫻ 10⫺4 共at z ⫽ 300 mm兲 in the axial direction and of 4.3 ␮rad in the transversal direction. SH’s offer several interesting features as positioning devices for self-luminous objects located at a short range 共centimeters to meters, depending on the size of the microlens array兲. Among them are their conceptual simplicity, ease of implementation and data reduction, and the possibility of working with extended incoherent sources. Additionally, they can be used, essentially with the same hardware and software configurations, to accomplish a wide variety of tasks 共e.g., testing optics and collimation checking兲. Appendix A. Deduction of Eq. 共1兲

Ui 共r兲 ⫽ A共r兲exp关ikW共r兲兴 be the field incoming on a microlens of transmittance function tL共r兲 ⫽ exp关⫺i共k兾2f 兲共xL2 ⫹ yL2兲兴, where position vector r ⫽ 共xL, yL兲 is measured from the center of the microlens. To simplify the notation somewhat, we can include the finite aperture of the lens in A共r兲 through the usual Kirchhoff boundary conditions. At a distance z behind the lens, the amplitude field distribution in the parabolic 共Fresnel兲 approximation will be given by 1 exp共ikz兲 i␭z

where x ⫽ 共 x, y兲. proportional to





tL共r兲Ui 共r兲exp

L



ik 兩x ⫺ r兩2 d2r, 2z

The associated irradiance will be

I共x兲 ⫽ U共x兲U*共x兲 ⫽ 共␭z兲⫺2

兰兰 L



xI共x兲d2x ⫽ 共␭z兲⫺2

C

兰兰 L

F共r1, r2兲

L



x exp兵共⫺ik兾z兲

C

⫻ 关x 䡠 共r1 ⫺ r2兲兴其d2xd2r1d2r2. For the x component of xn, this expression involves the product of the integrals



x exp关共ik兾z兲共xL1 ⫺ xL2兲x兴dx

C





exp关共ik兾z兲共 yL1 ⫺ yL2兲y兴dy,

C

which, assuming that the extension of the detector area over which the centroid is computed is infinite 关i.e., for practical purposes that I共x兲 is zero outside the area allocated for measuring the centroid of each microlens兴, can be evaluated with the help of



xn exp共⫺icx兲dx ⫽ 2␲共⫺i兲⫺n␦共n兲共c兲

where ␦共n兲 is an operator acting on a function f as34

Let

U共x兲 ⫽

bution produced by the microlens at plane z requires evaluation of the integral

F共r1, r2兲exp兵共⫺ik兾z兲

L

⫻ 关x 䡠 共r1 ⫺ r2兲兴其d2r1d2r2, where F共r1, r2兲 ⫽ A共r1兲A共r2兲exp兵ik关W共r1兲 ⫺ W共r2兲兴其 ⫻ exp关共ikD兾2兲兩r1 ⫺ r2兩2兴; D ⫽ 1兾z ⫺ 1兾f. The position of centroid xn of the irradiance distri-



f 共 x兲␦共n兲关c共 x ⫺ x0兲兴dx ⫽ 共⫺1兲nc⫺n⫺1

⳵n f 共x0兲. ⳵xn

Using those expressions, or the analogous ones for the y component of the centroid, and taking into account that xn is real valued, yields Eq. 共1兲. This research was supported by grant TIC98-0925C02-02 from Spanish Comisio´n Interministerial de Ciencia y Tecnologı´a. References 1. R. K. Tyson, Principles of Adaptive Optics 共Academic, Boston, Mass., 1991兲. 2. F. Merkle, “Adaptive optics,” in International Trends in Optics, J. W. Goodman, ed. 共Academic, New York, 1991兲, Chap. 26, pp. 375–390. 3. J. Primot, G. Rousset, and J. C. Fontanella, “Deconvolution from wave-front sensing: a new technique for compensating turbulence-degraded images,” J. Opt. Soc. Am. A. 7, 1589 – 1608 共1990兲. 4. H. J. Tiziani and J. H. Chen, “Shack–Hartmann sensor for fast infrared wave-front testing,” J. Mod. Opt. 44, 535–541 共1997兲. 5. G. Artzner, “Aspherical wavefront measurements: Shack– Hartmann numerical and practical experiments,” Pure Appl. Opt. 7, 435– 448 共1998兲. 6. J. Pfund, N. Lindlein, J. Schwider, R. Burow, Th. Blu¨mel, and K.-E. Elssner, “Absolute sphericity measurement: a comparative study of the use of interferometry and a Shack– Hartmann sensor,” Opt. Lett. 23, 742–744 共1998兲. 7. T. Kohno and S. Tanaka, “Figure measurement of concave mirror by fiber-grating Hartmann test,” Opt. Rev. 1, 118 –120 共1994兲. 8. N. S. Prasad, S. M. Doyle, and M. K. Giles, “Collimation and beam alignment: testing and estimation using liquid-crystal televisions,” Opt. Eng. 35, 1815–1819 共1996兲. 1 April 2000 兾 Vol. 39, No. 10 兾 APPLIED OPTICS

1519

9. J. Liang, B. Grimm, S. Goelz, and J. F. Bille, “Objective measurement of wave aberrations of the human eye with the use of a Hartmann–Shack wavefront sensor,” J. Opt. Soc. Am. A. 11, 1949 –1957 共1994兲. 10. L. Diaz and J. C. Dainty, “Single-pass measurements of the wave-front aberrations of the human eye by use of retinal lipofuscin autofluorescence,” Opt. Lett. 24, 61– 63 共1999兲. 11. M. P. Rimmer and J. C. Wyant, “Evaluation of large aberrations using a lateral-shear interferometer having variable shear,” Appl. Opt. 14, 142–150 共1975兲. 12. G. Ha¨usler, J. Hutfless, M. Maul, and H. Weissmann, “Range sensing based on shearing interferometry,” Appl. Opt. 27, 4638 – 4644 共1988兲. 13. G. Harbers, P. J. Kunst, and G. W. R. Leibbrandt, “Analysis of lateral shearing interferograms by use of Zernike polynomials,” Appl. Opt. 35, 6162– 6172 共1996兲. 14. R. Navarro and E. Moreno-Barriuso, “A laser ray tracing method for optical testing,” Opt. Lett. 24, 951–953 共1999兲. 15. C. Castellini, F. Francini, and B. Tiribilli, “Hartmann test modification for measuring ophtalmic progressive lenses,” Appl. Opt. 33, 4120 – 4124 共1994兲. 16. G. Ha¨usler and G. Schneider, “Testing optics by experimental ray tracing with a lateral effect photodiode,” Appl. Opt. 27, 5160 –5164 共1988兲. 17. M. R. Teague, “Irradiance moments: their propagation and use for unique retrieval of phase,” J. Opt. Soc. Am. 72, 1199 – 1209 共1982兲. 18. J. Hartmann, “Objectivuntersuchungen,” Z. Instrum. XXIV, 1–21, 3– 47, 98 –117 共1904兲. 19. G. Y. Yoon, T. Jitsuno, M. Nakatsuka, and S. Nakai, “Shack Hartmann wave-front measurement with a large F-number plastic microlens array,” Appl. Opt. 35, 188 –192 共1996兲. 20. M. Born and E. Wolf, Principles of Optics, 6th ed. 共Pergamon, Oxford, 1993兲, pp. 464 – 466, 767–772. 21. J. Y. Wang and D. E. Silva, “Wave-front interpretation with Zernike polynomials,” Appl. Opt. 19, 1510 –1518 共1980兲.

1520

APPLIED OPTICS 兾 Vol. 39, No. 10 兾 1 April 2000

22. D. Malacara and S. L. DeVore, “Interferogram evaluation and wavefront fitting,” in Optical Shop Testing, 2nd ed, D. Malacara, ed. 共Wiley, New York, 1992兲, Chap. 13, pp. 455– 499. 23. P. B. Liebelt, An Introduction to Optimal Estimation 共AddisonWesley, Reading, Mass., 1967兲, pp. 135–172. 24. E. P. Wallner, “Optimal wave-front correction using slope measurements,” J. Opt. Soc. Am. 73, 1771–1776 共1983兲. 25. M. C. Roggemann, “Optical performance of fully and partially compensated adaptive optics systems using least-squares and minimum variance phase reconstructors,” Comput. Electr. Eng. 18, 451– 466 共1992兲. 26. D. P. Petersen and K. H. Cho, “Sampling and reconstruction of a turbulence-distorted wave front,” J. Opt. Soc. Am. A 3, 818 – 825 共1986兲. 27. V. V. Voitsekhovich, S. Bara´, S. Rı´os, and E. Acosta, “Minimum-variance phase reconstruction from Hartmann sensors with circular subpupils,” Opt. Commun. 148, 225–229 共1998兲. 28. P. A. Bakut, V. E. Kirakoshyants, V. A. Loginov, C. J. Solomon, and J. C. Dainty, “Optimal wavefront reconstruction from a Shack–Hartmann sensor by use of a Bayesian algorithm,” Opt. Commun. 109, 10 –15 共1994兲. 29. C. J. Solomon, J. C. Dainty, and N. Wooder, “Bayesian estimation of atmospherically distorted wavefronts using Shack– Hartmann sensors,” Opt. Rev. 2, 217–220 共1995兲. 30. J. Herrmann, “Least-squares wave front errors of minimum norm,” J. Opt. Soc. Am. 70, 28 –35 共1980兲. 31. W. H. Southwell, “Wave-front estimation from wave-front slope measurements,” J. Opt. Soc. Am. 70, 998 –1006 共1980兲. 32. J. Pfund, N. Lindlein, and J. Schwider, “Misalignment effects of the Shack–Hartmann sensor,” Appl. Opt. 37, 22–27 共1998兲. 33. G. Roblin and D. Horville, “Study of the aberration induced by a microlens array,” J. Opt. 24, 77– 87 共1993兲. 34. Ref. 20, p. 757.