Comparison of beam generation techniques using a phase only spatial light modulator

: Whether in art or for QR codes, images have proven to be both powerful and efﬁcient carriers of information. Spatial light modulators allow an unprecedented level of control over the generation of optical ﬁelds by using digital holograms. There is no unique way of obtaining a desired light pattern however, leaving many competing methods for hologram generation. In this paper, we test six hologram generation techniques in the creation of a variety of modes as well as a photographic image: rating the methods according to obtained mode quality and power. All techniques compensate for a non-uniform mode proﬁle of the input laser and incorporate amplitude scaling. We ﬁnd that all methods perform well and stress the importance of appropriate spatial ﬁltering. We expect these results to be of interest to those working in the contexts of microscopy, optical trapping or quantum image creation.


Introduction
Light has been manipulated to solve a vast range of problems throughout history. In the past such control was largely achieved with static optics: lenses, prisms, apertures and mirrors in particular; and while these have an incredible range of application, producing completely arbitrary optical fields requires much finer control. As a first step, one can gain control of the shape of a beam through careful sculpting of the light amplitude: an idea that pioneered the technique of holography [1,2], where amplitude masks can be used to reproduce a 'writing' laser beam. Although eminently useful, such generation was restricted to pre-determined beam designs.
It was the advent of spatial light modulators (SLMs) which made the breakthrough to arbi-trary beam generation, allowing flexible beam shaping in a wide range of applications including optical tweezers [3], quantum information [4], coherence tuning, atom trapping [5][6][7][8] and storage [9,10] amongst others. Light, by nature, is intrinsically complex, and to gain full control of a light field one must be able to arbitrarily specify both the phase and amplitude profile. SLMs allow full spatial control over the phase directly, but amplitude control must be achieved indirectly. For instance one can use two SLMs in series to create any arbitrary field by exploiting polarisation optics to convert phase to amplitude information [11,12] and there are more advanced techniques, which can manipulate the amplitude and phase with only a single phase-only SLM [13][14][15][16][17][18][19][20][21][22].
Here, we concentrate on deterministic methods based on single-pass, digital holograms, aiming for the highest possible accuracy in field reconstruction. These techniques rely on the use of phase gratings, which deflect a tunable portion of the light away from straight reflection. Therefore, simply by modifying the grating depth and by spatially selecting the first-order deflection, precise amplitude control can be achieved, independently of the phase control. This also significantly improves the mode purity, by spatially decoupling the shaped and unshaped light.
There is no unique way to completely control both the amplitude and phase of a field using phase-only holograms and as such, there have been many techniques suggested in the literature throughout the years [13,[23][24][25]. In this paper we test several of these methods, under the same conditions, both numerically and experimentally, in order to elucidate each of their strengths and weaknesses. We note that a previous study [26] compared some of these methods in the specific case of a single Laguerre-Gauss mode. Here, we generate a range of beams to cover likely applications, including fundamental Gaussians, Laguerre-Gaussian (LG) modes, ring lattices and photographic images, and investigate the relative beam quality achieved by six different techniques.
The paper starts with an introduction to the different hologram generation methods under discussion. We will then introduce the theoretical framework for phase-only hologram generation and use it to make initial predictions before describing the experimental set-up and procedure. The results will then be discussed and the generation methods will be assessed against two separate criteria in order that the reader may choose the technique best suited to their application. We conclude by analysing some of the challenges arising from real laboratory experiments.

Hologram generation
We wish to use a phase-only hologram H = H(x, y) to generate a desired field E des (x, y) = A des (x, y) exp(iΦ des (x, y)) from an input field E in (x, y) = A in (x, y) exp(iΦ in (x, y)). Imposing that the desired field after the SLM should be spatially separated from the zeroth-order reflection to maximise the field purity, then: wherer = (x,ŷ,ẑ) and k in and k des are the wavevectors of the input and desired beam respectively when considering the SLM in a transmissive picture with angle of incidence θ = 0 ( see inset of Fig. 1 ). The effect of the hologram, ignoring a uniform attenuation caused by reflection of the beam on the SLM surface, then follows as: spectively and we are assuming a small angle between k des and k in . In our setup, the spatial offset is achieved by applying a phase grating Φ g (x, y) of the form where the Λ = 2π/(k des − k in ) is the grating period which in our experiments and simulations were taken to be Λ = 4 pixels. The most naïve approach to generating an input-corrected hologram would then simply be to imprint the relative phase i.e.
Although this approach generates a beam with the desired phase and spatial offset, the intensity profile remains that of the input beam, with dark areas developing only after propagation around the position of phase discontinuities (steps, vortices etc.), as shown in Fig. 2 Eq. (2) however, confirms that amplitude modulation is necessary and this can be introduced by modulating the depth of the total phase profile, with a function f (A(x, y)). Spatially lowering the grating height degrades the diffraction efficiency, and thus by intelligent choice of the function f (A(x, y)), the diffracted intensity in the first order can be manipulated for full beam shaping. This typically results in holograms H(x, y) of the form There are many methods for generating holograms of this form and although analytical solutions may appear to be exact we note that various experimental effects, including spatial filtering and SLM pixelation, render all methods imperfect. A numerical and experimental comparison of a selection of such methods are therefore outlined below.

Method A
The first method we consider is designed as a benchmark where we simply scale the relative phase hologram by the relative amplitude at each point i.e.
For a grating depth of 2π, theoretically all light can be diffracted into the first order, but as the grating depth decreases, light is removed from the first order and appears in the zeroth order. In this way, the scaling function f (A(x, y)) = A rel (x, y) is used to encode the relative amplitude of the desired and input fields. This naïve approach assumes a direct linear relationship between grating depth and amplitude, which although incorrect, produces surprisingly good light modes, and the technique is widely used, often even without taking into account the spatial shape of the input beam.

Method B
The next method we consider takes its inspiration from techniques used when holography was first introduced by Gabor in 1947. Traditional holographic methods record the scattered light from an object by interfering the light with a coherent reference beam on a fine-grained photographic film [2]. Once developed, the film's transparency is related to the intensity of the interference pattern at every given point, such that subsequent illumination of the developed film with the reference beam produces a reconstruction of the light scattered from the object. A similar method can be used in the context of SLMs. In this case however, the phase information in the interference pattern is used as the hologram, rather than the intensity information. The hologram is then calculated by taking the argument of the complex superposition, such that where E dg (x, y) = A des (x, y)e i(Φ des (x,y)+Φ g (x,y)) and N is a normalisation factor to ensure E dg (x, y) never exceeds E in (x, y). It should be noted that this hologram encodes both phase and amplitude information as it sums the fields before taking the argument.

Method C
Along the same lines as method A, a more rigorous hologram generation technique was put forward by Davis et al. [23]. Fourier analysis of a phase grating shows that the amplitude of the light diffracted into the first order is given by where we use the standard definition: sinc(w) = sin(w)/w. Omitting the exponential term, numerical inversion of Eq. (8) then gives where f (A(x, y)) is the amplitude modulation defined in Eq. (5) and sinc −1 denotes the appropriate inverse function defined on [0, π] thereby scaling the amplitude between 0 and 1. Using Eq. (5) gives 2.4. Method D Later work carried out by Bolduc et al. [25] however, points out that the phase term in Eq. (8) may also have an effect on the generated field, adding an unwanted amplitude dependent term to the phase profile. They suggest that an improved technique would include a correction for this and therefore propose a hologram given by 2.5. Method E Anotherl approach to generating holograms was proposed by Arrizòn et al. [24] where the authors show that holograms of forms other than H(x, y) = f (A(x, y))Φ relg (x, y) are also possible. One technique they suggest is based on a hologram of the form They show that, in order to create the desired output field in the first order of the diffraction pattern, f (A rel (x, y)) must be obtained from where J 0 is the zero-order Bessel function and f (A rel (x, y)) can be recovered by numerical inversion.

Method F
Arrizòn et al. [24] also considered holograms of the form where f (A rel (x, y)) must be obtained from Here a is a constant between 0 and 0.5819, the maximum of the first order Bessel function J 1 (x).

Numerical model
To assess the methods outlined above we define a set of test beams including 3 modes based on Laguerre-Gauss (LG) [27] modes and their superpositions and 1 photographic image.
LG modes contain optical vortices associated with dark regions in amplitude and a winding in phase. They are characterised by two parameters, a winding number and a radial order p, however for this investigation we restrict ourselves to modes with p = 0 and define a Laguerre-Gaussian mode of order to be LG . Within this set we have chosen three test beams: a simple fundamental Gaussian LG 0 , a single Laguerre-Gaussian mode of moderate order (LG 10 ) and a spatially intricate superposition of LG modes |LG 3 + αLG 11 | 2 ; α = | 11 3 | 1 4 , known as an optical Ferris wheel [6]. A final test is made with a non-propagating field shape: a scene of an appropriately named 'Laser class' sailboat.
In our simulations, we use the LabVIEW development environment to both generate the holograms and to predict the resulting intensity and phase profiles after spatial filtering and propagation. We begin by defining the input beam E in (x, y) and the desired beam E des (x, y)(as shown in Figs. 3(a) and 3(b) respectively) and use these to calculate H(x, y) according to the methods outlined above (see Fig. 3(c) for an example hologram). The output field is then given by applying the hologram phase to the input field such that: As discussed, our desired beam is produced in the first diffracted order of the grating which has to be separated from the rest of the field. This is achieved by spatially filtering the beam in the far field, where the diffraction orders are well separated. Numerically, we model this by taking the Fourier transform of E out (x, y) and multiplying the resulting field by a circular mask (set to 1 mm diameter for these results), setting all of the values outside the circular region to zero. The exact size of this filter plays a significant role in the beam quality and is discussed in more depth in the final section on experimental details. Using an inverse Fourier transform on the filtered data then gives the amplitude and phase of the new light field at the imaging plane of the SLM, as shown for method A in Fig. 3(d). We note that after the selection of the first order, we subtract the grating phase from the field in order to remove the associated tilt, where of course in practice the selected order will continue to propagate at an angle to the pure reflection.
Using this model, we predict the intensity profile of the light at the imaging plane of the SLM as well as for propagation of 0.5 and 1.0 Rayleigh ranges, for methods A-F. These predictions are then compared to the intensity of the desired mode using the peak signal-to-noise ratio (PSNR) (as described in the results section) as a beam quality metric. The results are plotted in Fig. 3(e) we infer that all of the methods, with the significant exception of method E, should produce reasonable results. Method F in particular, somewhat surprisingly, should give the best results for all propagation distances by approximately 10dB, with method C predicted to yield the next best overall results. Additionally, we see that method D's performance should deteriorate steeply after half a Rayleigh range of propagation and yet maintain the same beam quality after a full Rayleigh range. Finally, we note that naïve amplitude scaling, method A, is predicted to do quite well, very slightly outperforming method C outside of the imaging plane. We next test these predictions in experiment.

Experimental setup
The experimental setup is shown in Fig. 1. The light (generated from a 776 nm Toptica DL100) passes through a single-mode fibre, to spatially filter the beam, before passing through a beam expanding telescope which increases the beam waist to 4.65 mm. The beam is then reflected off an SLM (Hamamatsu LCOS X13138-01 ) at approximately three degrees before it propagates through a final telescope. In the Fourier plane of this telescope we filter the first order with an aperture set to a diameter of ∼ 1 mm. The intensity patterns are then recorded on a camera (Point Gray Chameleon CMLN-13S2M-CS) at the image plane of the SLM, followed by measurements 0.5 and 1.0 Rayleigh ranges away from this image plane.

Input intensity measurement
Amplitude modulation relies on an accurate knowledge of the input profile, which in most experiments will be a Gaussian, large enough to provide adequate power over the appropriate hologram region. Beam quality (as measured by PSNR) decreases considerably if instead a plane wave input field is assumed. A cursory simulation shows that assuming a plane wave leads to a loss of as much as 10dB of image quality (as discussed in the final section). The easiest way of measuring an incoming beam's intensity profile would be to take an image with a camera, positioned at the exact location of the SLM -however this is experimentally inconvenient and requires rescaling and thorough alignment. To avoid these issues a more general and, as far as the authors are aware, original method was used.
Single-pixel imaging techniques [28,29] effectively turn the SLM into an in situ camera, giving an image of the input beam which has perfect pixel registration and scaling, however at the cost of resolution. A sequence of patterned masks are displayed, such that each mask blocks a particular spatial region of the input field and the remaining light is measured with a power meter. By using an orthogonal set of masks, namely the Hadamard set, full spatial information of the intensity field can be recovered, with N 2 measurements required to reconstruct an image with N × N resolution. We use this method to record an image with 32 × 32 resolution and use bicubic interpolation to expand this up to the 600 × 600 resolution of the SLM. This image is then used as the input intensity profile for all future hologram generation.

Results
The hologram generation methods are tested by displaying each hologram consecutively and recording the obtained intensity patterns in three different planes as described in the experimental set-up section. Figure 4 shows a full set of images for the Ferris wheel beam, including the simulation of the intensity in the image plane in the top row as well as the measured intensity pattern in the image plane of the SLM (second row), after propagating half a Rayleigh range (285 mm, third row) and after propagating a full Rayleigh range (569 mm, bottom row). These are all intensity measurements however the propagation images reveal the accuracy of the phase reproduction as any phase imperfections will result in a deviation from the desired mode. Similar measurements have been taken for the Gaussian beam (LG 0 ), the Laguerre-Gaussian beam (LG 10 ) and the photograph; a subset of which are shown in Fig. 5.
We perform a quantitative analysis of the generation methods by assessing them against two criteria: the accuracy of the beam generation and the distribution of power.

Beam generation accuracy
To measure the accuracy of each method we compare the generated intensity with the desired beam. The methods should be able to accurately reproduce both intensity and phase, and while we do not measure the phase profiles directly, the intensity measurements after propagation indicate the accuracy of the phase. For the laser modes we perform a 2D fit of the intensity data with the relevant function (|LG 0 | 2 , |LG 10 | 2 or |LG 3 + αLG 11 | 2 ), specifying the waist and setting the centre position, offset, rotational phase and amplitude as free parameters. For the photograph, we instead use the Mathematica IMAGEALIGN function to scale and align the reference image with the intensity data.
The intensity data is then compared to the fitted function by employing the Peak Signal-to-Noise Ratio (PSNR) as a quality metric [30]. The PSNR is a well-established metric, originally employed by signal engineers and later maintained as a tool to quantify the quality of reconstruction of lossy compression codecs. We note that, in order to compare the different results, the data has to be normalised with respect to each other and as such, the background (taken from the numerical fits) was first subtracted before normalising the data. The normalisation was accomplished by dividing each image by its corresponding fitted amplitude and rescaling the data and fit such that each fit has the same maximum value. The data however was allowed to go outside the boundaries of the fit.
We then employ the PSNR quality metric, which is based on the mean square error (MSE) given by: where I is the perfect m by n monochrome reference image and K is the approximation under study. This allows us to define the PSNR per decibel: where MAX I is the maximum value of I. We apply this metric to the data for each generation method, desired image and propagation distance, see Fig. 6.

Distribution of power
In many applications one is not only concerned with the spatial mode quality, but requires as much power as possible. Our second assessment criteria is therefore to find how much power there is in the desired mode for each method. We first measure the total power at the output compared to the total power impinging on the SLM, which gives the total efficiency. We define the 'mode efficiency' as the fraction of this power which contains our desired mode, determined by calculating the projection of our generated mode onto our desired mode (details can be found in Section 3A of [31]). Using the Ferris wheel as our test beam, the results are illustrated in Fig.  7.  Fig. 7. The variation in mode efficiency across the different hologram generation methods, as measured for different propagation distances of an optical Ferris wheel. The total power after the spatial filter for each method is scaled by the associated cross-correlation between each mode and its fit, before being expressed as a percentage of the measured input power of 26.4 mW.

Discussion
We begin by considering the ability for each of the methods to produce an accurate representation of the intensity of the desired modes. Inspection of Fig. 6 reveals that methods A-D and F perform well in general, with only method E showing a clear dip in quality. We attribute this deviation to a high sensitivity to small imperfections in the input phase, which we assume to be flat. This is perhaps natural as the method does not modulate the depth of the grating, instead relying on interference to achieve intensity modulation, and therefore shows increased sensitivity to phase.
Taking a closer look at the creation of the Ferris wheel mode (top of Fig. 6) we can see that in general the mode is best in the image plane and the quality degrades slightly as it propagates, showing a small deviation from the desired phase. Looking at specific methods, the absolute best performance is achieved by methods C and D, very closely followed by method A. The strong performance of methods C and D is not surprising, however our naïve benchmark, method A, performs extremely well for all propagation distances. Method B is a little less accurate in the image plane, but seems to be more robust to propagation; with method F also propagating well, indicating an accurate generation of the phase profile.
Turning to the LG 10 mode generation (second row of Fig. 6) we once again see that all methods except for method E perform similarly well. Once again method A performs surprisingly well, with the other methods very close behind. The Gaussian mode generation again shows similar results (third row of Fig. 6). Turning finally to the recreation of the boat (bottom row of Fig. 6) we see methods A,C and D performing well with the other methods falling close behind, with a range of only 5 dB. We note in particular that the relatively poor performance of method B here seems to arise from a sensitivity to our aberration correction, which can be seen by the presence of an overall cylindrical lens pattern (see Fig. 5

bottom row).
We next consider the power in the desired mode. The mode efficiencies of the six hologram generation methods are shown in Fig. 7 and we see that method E contains the most power with more than 35% of the input power, while the other methods all contain between 12% and 18%. It should be noted that these numbers are specific to the exact input beam and desired mode, with an upper limit being placed on the mode efficiency equal to the projection of the input beam onto the output mode, which in this case is 53%. These numbers can therefore be increased by appropriate tuning of the input and output modes to optimise overlap.
From this analysis we can draw several conclusions; for the generation of laser modes, if beam accuracy is your primary concern, methods C and D perform very well. Surprisingly however, these methods do not significantly outperform our naïve method A. While this result may be specific to the modes chosen here, this is a significant result particularly in applications where hologram generation has to be performed quickly, as method A does not involve the numerical inversion present for methods C and D.
If one cares primarily about the power present in the desired mode then method E is the clear winner, however this comes at the cost of significant loss in beam quality. For small, but significant gains in power, method A may also be of interest.

Experimental details
In addition to the various different generation methods, the experimental implementation also plays an important role. In this section we discuss the relevance of choosing the correct aperture size, aberration corrections and maximal mode overlap.
7.1. Mode quality and power with aperture size All of the generation methods presented rely on spatially filtering the desired mode in the first order diffracted spot. Whereas other beam shaping techniques explicitly rely on the use of apertures [32], we simply wish to remove all of the unwanted parts of the field. We find that the exact size of this spatial filter has a significant impact on the quality of the mode and we use our numerical simulation to investigate this effect more rigourously.
We generate a hologram for the Ferris wheel mode using method A and monitor the beam quality as we increase the size of our spatial filter. The results are plotted in Fig. 8(a) and here we see that where the aperture is not cutting the beam (contrary to the first data point), a lower filter radius can significantly improve the mode quality. Additionally, we see that under the same conditions there is an associated pseudo-linear decrease in power, but with a very shallow gradient. In most situations therefore, we would assume that the quality gain justifies the small loss in power. For illustration, we also visualize the full Fourier plane ( Fig. 8(b) ) and a subection of the Fourier plane including the spatial filter size with respect to the first order ( Fig. 8(c). The resulting intensity patterns are also displayed in the right hand column of Figs. 8(b) and 8(c).

Aberration correction
A perfect SLM would have an optically flat front surface. In reality however, small surface imperfections lead to an astigmatic output beam, even when the SLM is switched off. The effect of this is most pronounced in the far field and is therefore easily observable at the focus of a lens. In general, this astigmatism can be corrected by first characterising these astigmatisms using typically a Zernike mode decomposition and then correcting for these by applying the appropriate inverse phase [33,34]. Here however we find that the introduced astigmatism is very well approximated by a cylindrical lens and can be corrected by incorporating an appropriate cylindrical lens into the holograms. To demonstrate the astigmatism introduced by the SLM we have deflected a Gaussian input beam via a uniform grating displayed across the whole SLM. Applying the cylindrical lens phase correction to the SLM removes most of the aberrations, as shown in Fig. 9.

Limited beam overlap
We have stated previously that producing an accurate E out (x, y) requires knowledge of E in (x, y). Methods (A-D and F) modulate the grating in order to remove power where it is not wanted. As a consequence, on a pixel by pixel basis, the desired beam amplitude cannot exceed the input beam amplitude. If perfect beam accuracy is desired then this forces the output beam to be scaled in intensity such that E out (x, y) never exceeds E in (x, y) at any position, thereby limiting the amount of light in the output mode. For high power applications this is undesired and we therefore propose a method which can increase the output power at the expense of some beam accuracy. This can be achieved by misrepresenting the form of E in (x, y) used for the calculation of the relative field. The peak value of the relative field and therefore the output power is limited by the low amplitude regions of E in (x, y). Therefore if these low amplitude values are removed, by setting all values below a particular threshold to the threshold value, the total power in the output mode will increase. This however misrepresents the input beam and therefore reduces the accuracy of the mode generation, as is shown in Fig. 10. It should be noted that the data shown previously in this paper was taken with a threshold level of 0.01, i.e. 1%, serving only to remove the effects of the noise associated with our intensity measurement. Fig. 10 clearly shows two regimes; a stable region for a threshold value below 0.2 and a transition to a scaling region beyond. This transition point depends on the relative size of E in (x, y) and E des (x, y) and can be understood to occur when E des (x, y) begins to overlap with the thresholded region (flat parts in the top row of Fig. 10(b)). In the latter region we see that it is possible to trade beam generation accuracy for more power.

Conclusions
We have tested six different methods of digital hologram generation and find that all are capable of producing high quality beams. Experimental testing of each method's ability to generate a Gaussian mode, LG modes and an arbitrary image reveals the strengths of each particular method; we find that method A, though the simplest and most naïve performs extremely well in all tests and would be well suited to applications requiring fast calculations of holograms. Methods B, C and D all perform very well across all tests with C and D having a slight advantage in the generation of arbitrary images. Method E, while producing a low quality mode, provides the most power and method F performs well and requires a reduced phase range, making it useful for low-cost SLMs. In addition we have stressed the importance of accounting for the form of the input beam and introduced a new way of detecting this in situ. We also find that the intensity profile of the input beam can place restrictions on the output power when the desired beam is large and have introduced and demonstrated a method to increase the output power at the expense of beam generation accuracy. Finally we have shown that the spatial filter size plays a crucial role in the beam generation accuracy and have shown that optimal filtering can achieve an increase in beam generation accuracy without significant loss of power.
We believe that these results will be useful across the many applications which rely on digital holograms, including optical trapping, atomic potential shaping, microscopy and beyond.