We present a fast and flexible non-interferometric method for the correction of small surface deviations on spatial light modulators, based on the Gerchberg-Saxton algorithm. The surface distortion information is extracted from the shape of a single optical vortex, which is created by the light modulator. The method can be implemented in optical tweezers systems for an optimization of trapping fields, or in an imaging system for an optimization of the point-spread-function of the entire image path.
©2007 Optical Society of America
Spatial light modulators (SLM) are important tools for the manipulation of light. They are widely used for altering the phase profile of a laser, e.g. for beam steering and wave front shaping. Application examples include holographic optical tweezers  and image filtering tasks . Many devices are reflective, which has advantages such as shorter reaction times or a higher fill factor. The reflective geometry may even allow optical addressing from the back side of the panel. However, due to the production process, the reflective surfaces often show a significant deviation from flatness which leads to unwanted, mostly astigmatic distortions in the light phase. These aberrations have to be dealt with, because they may decrease the trapping performance . Especially Laguerre-Gaussian (LG) laser modes of small helical charge are very sensitive to such distortions and even small phase irregularities cause significant deviations from their rotational symmetric “doughnut” shape, which makes it a delicate task to produce them in high quality with a SLM.
In this paper we suggest utilizing this high sensitivity of LG modes to determine the phase errors just from the distorted shape of a focussed doughnut mode. The basic idea is that we use a phase retrieval algorithm to find the hologram that would produce the observed distorted doughnut if displayed on a perfectly flat SLM and imaged with “perfect” optics. Consequently, the acquired hologram will include the information about imperfections like the surface deviation of our “real” SLM or phase errors of the additional imaging optics. Once the phase errors are known, a corrective phase pattern can be calculated, which can be superposed to each subsequently produced phase pattern to compensate for any phase errors of the SLM or the optical pathway.
Although such a phase retrieval is normally not unique, i.e., there are a lot of SLM phase patterns that would produce the observed intensity distribution at the CCD, there is a high probability of finding the correct aberration pattern, since the algorithm starts with the well-known phase distribution that would generate a “perfect” doughnut mode, assuming that the correct solution lies close enough to this starting pattern for the algorithm to converge.
Figure 1 sketches the experimental setup. The reflective SLM shows a diffractive vortex lens, which transforms a collimated laser beam into an optical vortex of helical charge L = 1 and focusses it on a CCD. The vortex lens is superposed by a blazed grating in order to spatially separate the optical vortex generated in the first diffraction order from other orders. According to surface aberrations of the light modulator, the doughnut appears distorted. A CCD image of this doughnut is taken as input for the Gerchberg-Saxton (GS) algorithm  – an iterative phase retrieval algorithm – which is able to find the corresponding phase hologram that would produce the observed intensity pattern, if it were displayed on a non-distorted SLM. The acquired hologram will then consist of an ideal phase vortex pattern overlaid by the phase errors that are retrieved with this method.
Although in principle this procedure does not require LG modes and could also be per-formed on the basis of other light field patterns, we found that using doughnuts delivers much better results in simulations and experiments than for instance using an image of the point spread function. The main advantage of this method, besides its simplicity, is the fact that it corrects not only the surface curvature of the SLM, but also other phase errors that are introduced by the other optical components in the optical pathway. The resulting correction hologram will therefore also compensate phase errors introduced by these additional parts (however, it is clear that not every error can be completely compensated by a phase-only modulator).
Phase retrieval techniques like the GS algorithm deal with the problem of finding the phase H(x,y) of a light field by just knowing the modulus A(kx,ky) of its Fourier transform:
In our special case, H(x,y) corresponds to the hologram function, and A(kx,ky) to the amplitude of the observed doughnut mode. The problem is of relevance in many fields of research, for instance electron microscopy or astronomy, which led to the development of various techniques to solve this problem [5, 6].
Unfortunately, there may exist many phase patterns whose Fourier transform show a similar amplitude function, just slightly deviating from A(kx,ky). The deviation can be quantified by the root-mean-square deviation as an error function ε. Since ε depends on the phase value of every single pixel of H(x,y), it can be understood as a scalar field in a M × N dimensional space where each pixel of the phase pattern H(x,y) corresponds to an independent axis. Phase functions which produce amplitude fields similar to A(kx,ky) can correspond to local minima of ε in this multidimensional space. The GS algorithm, as well as so-called “steepest-descent” methods like for instance the direct binary search  will in every iterative step reduce the error function ε, until it reaches a minimum. Which minimum is finally reached, depends solely on the initial hologram phase, which corresponds to an initial starting position in the space of ε. To handle this problem, one can define detailed boundary conditions  in order to find the “true” solution, i.e., the global minimum of ε.
The method presented here uses just the “standard” boundary conditions for the GS algorithm, i.e., the amplitude fields in the SLM plane and the image plane. It turns out that (for small phase errors) choosing the ideal phase vortex as initial hologram phase is – together with these boundary conditions – sufficient to find the correct hologram function. In a more descriptive view, this corresponds to the choice of an initial position in the ε-space, which lies close enough to the global minimum of ε for the algorithm to find it.
2. Phase retrieval procedure
Figure 2 sketches the operation of the GS algorithm. The initial complex field is a phase vortex arg(x + i y) with a finite circular aperture in the SLM plane, where arg denotes the complex phase angle (in a range between 0 and 2π) of a complex number. The aperture is necessary, since we want the algorithm to find a phase hologram which produces a doughnut mode of the size we observe. Because the size of the experimentally produced focussed doughnut depends on the numerical aperture of the imaging pathway, a correspondingly matched numerical aperture has to be introduced in the numerical algorithm by limiting the theoretically assumed illumination aperture by a circular mask. Additional information about why such an aperture has to be used and how the right aperture size can be determined will follow later.
The first step of the algorithm is an FFT of the initial complex field in order to determine the corresponding field distribution in the image plane. Then the amplitude Â(kx,ky) is replaced by the square root of the doughnut intensity image, followed by an inverse Fourier transform. In the SLM plane, the amplitude a(x,y) is replaced by a constant value (including the aperture), which corresponds to a homogenous illumination of the SLM hologram in the experiment. The cycle is performed until ε converges (i.e., until it decreases less than a certain percentage per iterative step, which is 1% in our case). The resulting pattern H(x,y) corresponds to a pure phase hologram, that would produce the observed distorted doughnut pattern. In order to find the corresponding wavefront distortion C(x,y) introduced by the non-optimal surface of the SLM and the remaining optical components, the phase wavefront of an ideal doughnut mode has to be subtracted from H(x,y), i.e., C(x,y) = H(x,y) - arg(x + i y). Finally, in order to program the SLM such that it compensates these distortions, C(x,y) has to be subtracted from every hologram function, that is displayed on the SLM.
3. Simulation results
Figure 3 summarizes the results of a numerical simulation. A randomly chosen phase pattern represents the surface distortion of a SLM. For the pattern we assumed only low spatial frequencies like a real SLM surface is likely to show. The GS algorithm was able to reconstruct the phase pattern with high accuracy. The remaining phase difference (Fig. 3(C)) shows a standard deviation of less than 0.3 mrad. Apparently, the optimization works slightly better at the outer regions of the circular aperture than in its center. This is probably due to the vortex phase structure, which leads to a violation of the sampling criteria in the center region.
Figure 4 gives an overview of the experimental results, gained with the setup of Fig. 1. The reflective SLM (LC-R 720 from Holoeye, with a resolution of 1280×768 pixels at a pixel size of 20 μm) is illuminated by the beam of a helium-neon laser, which was expanded to a diameter much larger than the displayed phase hologram, which has a diameter of MHolo=512 pixels. Thus the light intensity is approximately constant over the whole diffraction pattern. The linear polarization state of the laser is rotated to maximize the diffraction efficiency. The SLM then shows efficient phase modulation (and a small residual polarization modulation).
The diffractive phase pattern to be displayed has the form
which corresponds to a phase spiral of topological charge L, superposed by a grating of periodicity 2π/k, and a lens with focal length f. λ represents the wavelength of the used light. If f is chosen to match the distance between SLM and CCD, the modulus of the light field on the CCD is that of the Fourier transform of the hologram on the SLM:
with D(x,y) denoting the phase distortion function of the SLM.
The two (inverted) intensity images of the first column in Fig. 4 show the CCD snapshots of a doughnut mode and a focal spot, which are produced by the hologram function of Eq. 2 for the cases L=1 and L=0, respectively. The doughnut mode seems to be much more distorted than the focussed spot corresponding to the point spread function of the setup.
After some preliminary image processing steps, this doughnut snapshot acts as input information for the GS algorithm. The first step is precise centering of the mode, which makes it simpler for the algorithm to reconstruct the mode, because linear phase shifts corresponding to trivial displacements are removed. This is followed by tight clipping of the mode and subsequent padding with zeroes to a quadratic data array of reasonable size MArray, e.g. MArray = 1024 pixels. This step gets rid of the noise outside the relevant part of the image, greatly improving the performance of the approach. It is necessary to “mask” the simulation hologram with a circular aperture, as sketched in Fig. 2, in order to ensure that the computer-simulated light field has exactly the same size (in pixels) as the real image on the CCD. The masking thus represents a correction for the different size scaling factors of the software (numerical FFT) and hardware (optical lens) Fourier transform. The optical FT incorporates length scaling factors which the FFT disregards, like wavelength, focal lengths, and the pixel size ratio between SLM and CCD. Because of the aperture masking, the correction pattern (which has the size of the aperture) will always be smaller than MArray. Consequently it is reasonable to choose MArray larger than the hologram size in the first place.
The choice of the right diameter of the aperture is crucial. Experimentally, it can easily be determined by subsequently displaying two gratings on the SLM, the grating vectors of which differ by ∆k (in inverse pixels), and measuring the corresponding spatial shift of the laser spot on the CCD. The desired aperture diameter A (in pixel units) is then determined by
where ∆ℓ is the focus-shift on the CCD in pixel units, MArray the side length of the data array, and MHolo the diameter of the hologram on the SLM, both measured in pixels. Eq. 4 loses its validity if additional apertures narrow the beam diameter. According to Eq. 4, the aperture diameter (and hence the size of the correction pattern) depends linearly on MArray. Consequently the resolution of the correction pattern increases with the size of MArray, however, at the cost of higher computational effort. If MArray is chosen to be 2π∆ℓ/∆k, the correction pattern will have the resolution of the SLM hologram. However, for our experiments, this value is in the range of 5000 pixels, i.e. too large for reasonably fast computation. Thus we choose MArray = 1024 pixels, and “re-sample” the achieved correction pattern to the size of MHolo.
The image in the second column of Fig. 4 shows a doughnut mode which was created by the corrected hologram. In some experiments it was possible to improve the result by performing a second run of the algorithm, where the correction pattern acquired by the first cycle was displayed at the SLM and the resulting image served as starting image. This is also the case in the example of Fig. 4. The final correction function is calculated as the sum of the output functions of both cycles (left colored image in (B)). Similar to the simulations, a small discontinuity emerged near the center of the phase function. The two images in the third column of Fig. 4(A) represent a doughnut and the point spread function, produced by adding the correction pattern to the hologram function of Eq. 2. Both images are very close to their ideal shapes, which are shown in the darker shaded box on the right.
In a next step, a tilted glass plate (microscope slide) was placed into the converging beam path in order to introduce astigmatism. This again significantly distorted the doughnut mode (fourth column). However, the doughnut shape could be restored perfectly by adding a second corrective phase pattern (colored image on the right), which was achieved by another run of the GS algorithm.
The second experiment (Fig. 5) demonstrates the optimization of a simple imaging system, where the SLM is directly integrated into the optical pathway. If the SLM displays just a grating, lens 2 places a magnified image of the test object on the CCD. The grating constant is chosen in a way that the first diffraction order enters the CCD (for simplicity other orders were neglected in the sketch).
Before the correction, the upper right image of the test object (cypher 4) appears blurred, which mainly originates from the SLM distortion. In order to create a doughnut test image to “feed” into the GS algorithm, a diffractive vortex lens is superposed on the SLM grating which focusses a doughnut beam directly on the imaging chip (upper image in the small box).
After the achieved correction function was superposed on the grating on the SLM, the imaging quality showed significant enhancement. The image of the test object shows much less blurring than before the correction. In contrast to the first experiment of Fig. 4, a second run of the algorithm did not lead to further improvement.
We present a fast and accurate method for the surface correction of spatial light modulators. The method uses one single image of a focussed doughnut beam, created by the SLM, to find the corresponding phase hologram with the Gerchberg Saxton algorithm. A doughnut beam of helical charge L=1 has proven to be much more suitable for this technique than LG modes of significantly higher order, and also more suitable than trying to optimize the point spread function directly. A possible reason for this may lie in the fact that the point spread function has too small an extension to be clearly resolved by the CCD, and intensity deviations due to phase errors have little impact on the scale of the very intense center of the spot. On the other hand, LG modes of higher order show violation of the Nyquist criteria in a larger zone around the hologram center. Generally, it seems plausible that the L=1 doughnut mode hologram is an “optimal” test pattern for obtaining a phase correction function, since it generates an extended doughnut image with an isotropic structure that is created purely by interference and depends critically on the perfect phase relation between all field components in its Fourier plane, i.e., the SLM plane.
We have demonstrated, both experimentally and in computer simulations, that the GS algorithm is able to reconstruct hardware phase errors on the order of one or two wavelengths. If the phase distortions are larger, the algorithm tends to find wrong solutions corresponding to local minima of the error function ε. This is expected because the phase vortex is in this case no longer an adequate initial condition. Using more sophisticated search algorithms like for example Simulated Annealing  promises improvement in this case. This algorithm is able to overcome local minima and has a greater likelihood to find the global minimum of ε. Alternatively, after each iterative step, the correction function could be directly applied to the SLM. The convergence to wrong solutions can immediately be noticed by an abruptly decreasing doughnut quality.
The presented method promises applicability in research areas where the light phase has to be modified by flexible devices like SLMs or micro mirror arrays with high accuracy, as it is the case in interferometry, laser mode shaping, STED microscopy  or optical trapping. The method could also be used to optimize the entire optical setup, since the determined correction function also corrects distortions which are introduced by other optical elements.
This work was supported by the Austrian Academy of Sciences (A.J.), and by the Austrian Science Fund (FWF) Projects No. P18051-N02, and P19582-N20.
References and links
1. E. R. Dufresne and D. G. Grier, “Optical tweezer arrays and optical substrates created with diffractive optics,” Rev. Sci. Instrum. 69, 1974–1977 (1998). [CrossRef]
3. K. D. Wulff, D. G. Cole, R. L. Clark, R. DiLeonardo, J. Leach, J. Cooper, G. Gibson, and M. J. Padgett, “Aberration correction in holographic optical tweezers,” Opt. Express 14, 4169–4174 (2006). [CrossRef] [PubMed]
4. R. W. Gerchberg and W. O. Saxton, “A practical algorithm for the determination of phase from image and diffraction plane pictures,” Optik 35, 237246 (1972).
6. A. Muller and A. Buffington, “Real-time correction of atmospherically degraded telescope images through image sharpening,” J. Opt. Soc. Am. 64, 1200–1210 (1974). [CrossRef]
8. J. R. Fienup, “Phase retrieval using boundary conditions,” J. Opt. Soc. Am. A 3, 284–288 (1985). [CrossRef]
9. S. Kirkpatrick, C. D. Gelatt Jr., and M. P. Vecchi, “Optimization by Simulated Annealing,” Science 220, 4598 (1983). [CrossRef]
10. S. W. Hell and J. Wichmann, “Breaking the diffraction resolution limit by stimulated emission: stimulated-emission-depletion fluorescence microscopy,” Opt. Lett. 19, 780–782 (1994). [CrossRef] [PubMed]