## Abstract

We present a method for converting the desired phase values of a hologram to the correct pixel addressing values of a spatial light modulator (SLM), taking into account detailed spatial variations in the phase response of the SLM. In addition to thickness variations in the liquid crystal layer of the SLM, we also show that these variations in phase response can be caused by a non-uniform electric drive scheme in the SLM or by local heating caused by the incident laser beam. We demonstrate that the use of a global look-up table (LUT), even in combination with a spatially varying scale factor, generally does not yield sufficiently accurate conversion for applications requiring highly controllable output fields, such as holographic optical trapping (HOT). We therefore propose a method where the pixel addressing values are given by a three-dimensional polynomial, with two of the variables being the (*x*, *y*)-positions of the pixels, and the third their desired phase values. The coefficients of the polynomial are determined by measuring the phase response in 8×8 sub-sections of the SLM surface; the degree of the polynomial is optimized so that the polynomial expression nearly replicates the measurement in the measurement points, while still showing a good interpolation behavior in between. The polynomial evaluation increases the total computation time for hologram generation by only a few percent. Compared to conventional phase conversion methods, for an SLM with varying phase response, we found that the proposed method increases the control of the trap intensities in HOT, and efficiently prevents the appearance of strong unwanted 0th order diffraction that commonly occurs in SLM systems.

© 2013 Optical Society of America

## 1. Introduction

Since the 1980s, liquid crystal (LC) based spatial light modulators (SLMs) have been used for holographic beam steering in optical communication applications [1–3]. Since the late 1990s the technique has also been used in optical trapping systems to obtain multiple, independently controllable traps. This technique is called holographic optical trapping (HOT) [4, 5]. Common for all these applications is the desire to efficiently distribute the incident optical power into a number of spots/traps (in this work referred to as “spots”, except in the optical trapping experiments described in Section 5.4.3). For some of of these applications, and HOT in particular, it is not sufficient just to be able to position the spots at the desired locations but it is also important to obtain aberration free spots with well specified optical power.

Similar to static diffractive optical elements, the SLMs used for holographic beam steering are generally only capable of phase modulation, and holograms with good performance are thus achieved only if an iterative optimization algorithm is used. A multitude of algorithms that optimize spot-generating phase-only holograms have been developed, most of which are either direct search algorithms [6–8] or, more commonly, variations of the Gerchberg-Saxton algorithm [9–14]. To obtain the desired relative optical power distribution among the spots, most of the above-mentioned algorithms include a weighting procedure in their iterative cycle; a few different approaches have been suggested, all of them with the same purpose, to force the power in the individual spots to approach their desired values [10–14].

While many such algorithms provide virtually perfect distribution of light to the desired positions, it is ultimately the hologram physically realized by the SLM that determines the performance of the system. In short, an LC-SLM is typically addressed with a two-dimensional matrix of 8-bit integers. Each matrix position represents one SLM pixel, and the integer value corresponds to the desired phase that should be realized. To assure that the realized hologram accurately resembles the desired one, it is crucial to find the correct relation between desired pixel phase and pixel value in the addressing matrix. Commonly, all pixels are assumed to behave identically and thus a global look-up-table (LUT) is used to convert the desired phase, from the hologram optimization algorithm, to the corresponding pixel value for all pixels.

Although a global LUT may work adequately for some SLM types and applications, local variations in the phase response of the SLM often degrade the realized hologram. If the pixel response varies over the SLM and this is not accounted for when the SLM is addressed the optical power in the realized spots will differ from the desired values. Also, an unwanted side effect is that a relatively high optical power generally ends up on the optical axis of the system as the 0th order diffraction. As will be described in more detail in Section 3.1, earlier work has shown that it is possible to correct for a spatially varying phase response, provided the relation between phase and pixel addressing value only changes by a space-dependent constant [15, 16]. However, a more complex spatially varying phase response of the SLM is frequently occurring and must be compensated for by space dependent LUTs for optimal performance [17, 18]. The importance of accounting for a spatially dependent phase response of the SLM is emphasized in Ref. 19 with the particular application of holographic imaging, which in this context can be viewed as an SLM producing a very large number of spots where the exact intensities of the individual spots are of less importance. Compared to our work, the spatially resolved characterization of the phase response of the SLM is done differently as well as the pixel value generation, but also here an improved phase modulation accuracy over the entire SLM is achieved, which, in this case, shows as a much improved visual quality of the holographic images, although no quantitative data are given for this improvement. Further, also Ref. 20 deals with compensation for spatially varying response in phase-only SLMs using a space dependent LUT, resulting in improved diffraction efficiency and reduced crosstalk (in other orders than the 0th, which is not measured). However, they only demonstrate single point beam steering with their calibrated system, so it is not clear to what extent their approach would improve the intensity uniformity of multispot patterns and suppress the 0th diffraction order intensity – two factors that are crucially important in HOT applications.

In this work we demonstrate the detrimental impact of a spatially varying phase response and how such response occurs in LC-based SLMs, in Sections 2 and 3, respectively. Our method, applicable for any type of phase modulating SLM, is explained in detail in Section 4 and verified by numerous experiments in Section 5. Finally, the conclusions are given in Section 6.

## 2. Impact of a spatially varying phase response on ideal holograms

To illustrate how an ideal hologram, i.e., the spatial phase distribution from the hologram optimization, is affected by a spatially varying phase response of the SLM we have simulated the performance of two different holograms, see Fig. 1. The ideal performance of holograms producing a circle of 14 spots and an array of 24 out of 5×5 spots is shown in Figs. 1(d) and 1(g), respectively. Note that neither of the holograms ideally produces a spot on the optical axis. The spot patterns are almost perfect with a uniformity

*P*

_{0}, is very low, 0.2% and 0.1% of the total power for the circle and array, respectively.

If the SLM induces a static aberration, i.e., the zero-level for the phase varies over the SLM surface, see Fig. 1(b) the spot shape is strongly affected while the uniformity and *P*_{0} are hardly affected at all, see Figs. 1(e) and 1(h). By compensating for such aberrations it has been shown that it is possible to restore the ideal shape of the spots [21, 22].

A second type of possible error induced by the SLM is a spatially varying phase response, see Fig. 1(c). This type of phase error increases the power in the zeroth order quite drastically, see Figs. 1(f) and 1(i). The zeroth order is ∼3.5 and ∼5 times stronger than the average spot in the circle and array pattern, respectively. Also, the uniformity among the 24 desired spots of the array drops to ∼72%. Thus, it is important that the phase mapping, i.e., the conversion between desired and realized phase, is accurate also locally on the SLM.

## 3. Spatial variations in phase response of LC SLMs

In a reflective LC-based SLM, by far the most commonly used type of SLM for phase modulation, the LC layer is typically sandwiched between a reflective backplane with pixelated electrodes and a transmissive front glass with a common electrode. The modulated phase *φ* of the polarized light exiting such a reflective SLM (thus passing the LC layer twice) is given by

*λ*is the used wavelength, Δ

*n*=

*n*

_{eff}−

*n*

_{o}is the difference between the effective and the ordinary refractive index of the LC material, and

*d*is the thickness of the LC layer. The effective refractive index, and consequently the phase, for each pixel can be varied (

*n*

_{o}≤

*n*

_{eff}≤

*n*

_{e};

*n*

_{e}being the extraordinary refractive index) by rotating the rod-shaped LC molecules in a plane normal to the polarization of the incident beam. This is achieved by controlling the electric field over the pixel, in turn accomplished by applying a voltage over the pixel electrode and the common electrode. The SLM is addressed with an 8 or 16-bit number for each pixel, hereafter referred to as the pixel value (PV), which is converted into voltage by the SLM driving hardware.

Since the pixel phase does not correspond linearly to the PV, and hence the applied voltage, a LUT is typically applied to the hologram, in some cases by the SLM driver itself. Typically a global LUT, which only takes the desired phase as input, is used, and consequently the SLM pixels are addressed according to

*φ*

_{desired}(

*x*,

*y*) is the phase of the ideal hologram in position (

*x*,

*y*). The LUT can either be provided by the SLM manufacturer or determined by measuring the phase response of the SLM [23–26].

Applying a global LUT implies that a pixel’s position on the SLM does not affect its phase response. However, this is not always true. In the remainder of this section three experimentally verified reasons why LC-based SLMs often show spatial variations in their phase response are described.

#### 3.1. Thickness variations in liquid crystal SLMs

Due to manufacturing issues, the pixelated backplane of the SLM can become slightly nonflat [27]. Combined with a flat front glass, a non-flat backplane yields an LC layer with varying thickness *d*(*x*, *y*). Such a thickness variation also affects the electric field applied across the pixels, resulting in a spatially dependent effective refractive index *n*_{eff}(*x*, *y*). Thus, Eq. (2) becomes dependent on *x* and *y* and therefore a non-flat backplane results in a spatially varying phase response.

In previously presented work, which focused on such a non-flat backplane imperfection, it has been shown that to compensate for this effect it is sufficient to use a global LUT multiplied by a spatially varying scaling factor *f*(*x*, *y*), hereafter referred to as the “scaling matrix method” [15, 16]. The SLM is then addressed according to

*x*,

*y*),

*f*(

*x*,

*y*) is chosen such that Eq. (4) is exactly fulfilled for some fixed value of

*φ*

_{desired}(

*x*,

*y*), e.g.,

*π*or 2

*π*.

#### 3.2. Non-uniform electric drive scheme

For nematic LCs only the absolute value of the drive voltage matters for the induced birefringence. To avoid degradation of the LC over time (due to ion migrations) it is, however, crucial that the material is kept DC-balanced, i.e., that the time-averaged applied voltage is 0 V. As an example, in most SLMs fabricated by Boulder Nonlinear Systems this is accomplished by keeping the common electrode (positioned on the front glass of the SLM) at a voltage of 2.5 V while the pixelated backplane electrode is switched between 2.5 −*U*_{pixel} V and 2.5 +*U*_{pixel} V at a frequency of 1 kHz. This results in a maximum usable voltage *U*_{pixel} of 2.5 V, for backplane electrode voltage switching between 0 and 5 V.

To allow for real-time experiments, e.g., position clamps, [28] a short response time of the SLM is crucial. For an LC-based device the response time *τ* is proportional to *d*^{2}/(*E*_{LC} + *C*_{LC}) where *E*_{LC} is the electric field applied over the LC and *C*_{LC} is a material constant [29]. Thus, it is beneficial to increase the electric voltage applied across the SLM pixels. Recently, the company introduced a new drive scheme that allows twice as large applied electric field without increasing the backplane voltage. By time sequentially toggling the voltage on the common electrode between 0 V and 5 V and the backplane voltage between *U*_{pixel} and 5 − *U*_{pixel}, the full backplane voltage of 5 V can be utilized while the LC is still DC-balanced [30]. However, since the pixel electrodes are switched sequentially (row by row, or similarly), i.e., at slightly different times relative to the switching of the common electrode, the latter approach often induces a spatially varying phase behavior.

This effect is exemplified in Fig. 2, which shows the realized phase response from 8×8 regions of an SLM. As all the curve shapes are different, no spatial scaling function can yield an accurate phase mapping.

#### 3.3. LC heating induced by high laser power

For applications requiring high optical power in the incident beam, heating of the LC material can affect the phase response. Since the intensity usually varies across the surface of the SLM, e.g. for a Gaussian beam, the change in phase response may also be spatially different. Figure 3 shows the measured local phase response in different locations of an SLM for an incident power of 50 mW and 1 W. The measurements show a rather complicated relation between realized phase and pixel value; a region can demand a relatively high pixel value to reach a phase of *π*/2 but a relatively low value to reach 2*π*. It is also evident that the LUT (or a more advanced addressing scheme) must be determined using the same power of the incident beam as in subsequent experiments.

## 4. Method

Here we first describe how the phase response of the SLM is spatially characterized and then how a hologram is converted to a PV matrix using a 3D polynomial prior to being addressed to the SLM.

#### 4.1. Phase modulation characterization

In order to characterize the SLM *in-situ* with a minimum of modifications of the setup, a diffraction-based method was used. This avoids the problems with an interferometric approach or mapping of the phase as a grayscale intensity [19], both of which techniques require additional optical components to be inserted or repositioning of the camera. In a diffraction based method, a set of simple holograms is displayed on the SLM, and the phase modulation is determined by measuring the varying intensity in the resulting diffraction spots [25, 26].

To determine the localized phase response, the SLM is divided into subregions, typically 8×8, and a sequence of holograms with only two phase levels, realized as linear gratings with 50% duty cycle, is displayed on one subregion at a time, while the rest of the SLM is blank, see Fig. 4(a). In each sequence, one phase level is kept constant and the other is stepped through the range of pixel values to be characterized. For each displayed hologram, the intensity is measured in either the +1st or −1st diffraction order, see Fig. 4(b). The measured data from each region is then normalized such that the maxima corresponding to a phase of *π* equal one; a typical result is shown in Fig. 4(c). Finally, the phase is calculated according to

*i*is the region index and ${p}_{i,\pm 1}^{\text{norm}}\left(\text{PV}\right)\in \left[0,1\right]$ is the normalized power in the ±1st order for region

*i*.

#### 4.2. Fitting a 3D polynomial to the measured data

The aim here is to find a 3D polynomial *f*(*φ*_{desired}, *x*, *y*) that gives the optimal PV for a desired phase value *φ*_{desired} at the position on the SLM given by *x* and *y*. To do this, the determined relations between *φ*_{desired} and PV for all measured SLM regions are arranged in a linear equation system. Exemplified using a polynomial of the seventh order we end up with

*N*is the number of SLM subregions used for the fit,

*K*is the number of measured phase levels,

**c**= [

*c*

_{0}

*c*

_{1}···

*c*]

_{M}*contains the coefficients that determine the polynomial, and*

^{T}*M*is the number of terms in the polynomial. In the example given above, with a polynomial of the seventh order,

*M*= 120. Each row in the matrix on the left side contains the polynomial terms for a set (

*φ*,

*x*,

_{i}*y*) and on the same row in the vector on the right side is the corresponding PV that yielded the phase

_{i}*φ*. Here,

*x*and

_{i}*y*correspond to the coordinates defining the center of SLM subregion

_{i}*i*. Finally, the coefficients are obtained by solving the, generally overdetermined, linear equation system in Eq. (6).

#### 4.3. Phase compensation using the 3D polynomial

Once the polynomial coefficients are determined, it is straightforward to convert a desired phase hologram, *φ*_{desired}(*x*, *y*), to the suitable PV matrix; for each SLM pixel the PV is given by the polynomial

For test purposes the conversion was done either in Matlab or LabVIEW. The calculation time needed to convert a 512×512 element phase hologram to an equally large PV matrix was roughly 10 s. For real applications, such as the trapping experiments presented in Section 5.4.3, the method was implemented in the parallel programming language CUDA for C. In the latter case the calculation time was ∼0.13 ms and thus it is possible to generate optimized holograms and convert them using the 3D polynomial at a rate higher than 100 Hz [14, 31]. In most cases this means that the SLM response time, rather than the hologram and PV calculation time, is the bottleneck of the HOT setup.

## 5. Experiments and results

#### 5.1. Optical setup

The optical tweezers setup, illustrated in Fig. 5, was built around a motorized inverted epifluorescence microscope (DMI6000B, Leica Microsystems). The laser beam (1070 nm, IPG Photonics) was first magnified by an afocal telescope to match the beam diameter to the full width of the SLM (HSPDM512 1064-PCIe, Boulder Nonlinear Systems). The SLM has a flat, highly reflective dielectric mirror that covers the backplane electrodes. A second afocal telescope was used to image the SLM plane onto the back focal plane of the microscope objective (100×, NA 1.3). The magnification of the second telescope was chosen such that the output beam slightly overfilled the back aperture of the microscope objective. The microscope objective then forms the spots/traps in the vicinity of its imaging/trapping plane. A camera (Photon-focus MV-D1024E-160-CL, pixel size 10.6*μ*m×10.6*μ*m) was used for capturing bright field images except for the trapping experiments described in Section 5.4.3.

Following the approach described in Section 4.1, we characterized our SLM *in-situ* within the HOT setup. Only minor adjustments of the HOT setup were made, see Fig. 5(b). First, the IR filter positioned in front of the bright field camera was removed in order to image the reflection of the trapping laser. Second, the 0th order spot was blocked outside the microscope. For measurements with high optical power incident on the SLM, *P*_{SLM} ≥ 0.5 W, a reflective ND filter (optical density 2–3) was also placed in the beam path outside the microscope. The latter modifications were done in order to reduce the amount of light incident on the camera. Since only 1/64 of the SLM area is used to diffract light to the 1st order in each sequence, the optical power in the 0th order is very high and might even damage the camera sensor.

A cover glass (or a mirror in case of a full SLM evaluation) was placed in the image plane of the microscope so that the reflection of the diffraction spots in its upper surface was focused on the camera sensor. As the corners of the SLM were blocked by the circular aperture stop of the microscope objective, only the central 52 of the 8×8 subregions were characterized and used for fitting the polynomial coefficients.

#### 5.2. Phase characterization

Characterization was done at a number of different optical powers incident on the SLM. The binary gratings used had a large period of 16 pixels to minimize pixel crosstalk [8, 32]. Figure 6(a,c) shows the normalized power in the 1st diffraction order as function of PV for the different subregions of the SLM, measured at incident powers of 50 mW and 1 W. Each curve corresponds to the measurement for a certain subregion. To obtain this normalized curve, the directly obtained intensity versus PV curve was first used to find the PV values at which the different local minima and maxima occurred, corresponding to values of *φ _{i}* =

*π*, 2

*π*, etc. This raw data curve was then normalized in segments between these PV values, by subtracting a constant “dark intensity” and multiplying by an appropriate constant, such that the value is either zero or one at the beginning and end of each segment, depending on whether

*φ*is an even or odd integer of

_{i}*π*in that position. The phase

*φ*(PV) was then extracted from the normalized curve according to Eq. (5) and is shown in Figs. 6(b) and 6(d) for all subregions. Table 1 shows the ranges of PV that yield a phase of

_{i}*π*, 2

*π*, and 3

*π*somewhere on the SLM. From these measurements, it is evident that the phase response varies drastically across the surface of the SLM. In some cases, the obtained phase modulation differs by

*π*for the same PV in different positions on the SLM. As a remark, this spatial variation in the phase response is larger than for the SLM used in Ref. 19, so its correction should be at least as difficult. We also note that the phase response is highly dependent on the optical power of the incident beam. This underlines our statement in Section 3.3; the SLM should be characterized using the same optical power as used in the real application.

#### 5.3. Polynomial fitting and accuracy

To determine the optimal polynomial order, the error between the measurements and the polynomial fit for orders between 3 and 9 were calculated, see Fig. 7. First, each polynomial was used to calculate the PV matrix (512×512 elements) for 20 equidistant phase values between 0 and 2*π*; Fig. 7(a) shows the error in PV between the measurements (averaged for each sub-region) and the polynomial of 7th order for four of these phase values. By averaging the PVs obtained from the polynomial for each subregion and phase value, the phase response could be determined from the measurements. For each subregion the mean and maximal phase error (among the 20 phase values) were determined. The largest mean and maximal phase error from all 52 subregions and 32 most central subregions are shown in Figs. 7(b) and 7(c), respectively.

As seen, for the central part of the SLM the phase error decreases with higher orders, while if all measured subregions are used the error increases for polynomials of orders 7–9. This is caused by Runge’s phenomenon [33], i.e., the polynomial fitting starting to induce oscillations at the edges of the fitting region as the polynomial becomes higher; this is seen in the top parts of the sub figures in Fig. 7(a). Runge’s phenomenon is one disadvantage of using a single continuous polynomial for the entire SLM, but on the other hand this makes the number of parameters in the phase-to-pixel value conversion method quite small, 120 in our case for a seventh order polynomial. Also in Ref. 19 global polynomials are used, but in this case each of 256 desired phase levels is associated with a globally defined polynomial which gives the required pixel value in any position of the SLM. Since a rather well-behaved SLM is used in this case, it is sufficient to use a polynomial which is the sum of only the four lowest Legendre polynomials, and thus the total number of parameters in their method is 4×256. As a contrast, in Ref. 20 a LUT is created for each pixel and each desired phase, yielding a much larger number of parameters. For pixels that are not located precisely at a measurement position (this SLM is characterized by measuring in 4×3 positions on the SLM surface, just as for the SLM in Ref. 19) linear interpolation between the nearest measurement positions is used, so Runge’s phenomenon will not appear.

As the number of terms in the polynomial increases rapidly with the polynomial order and the decrease in phase error (Fig. 7(c)) is negligible for orders 7–9 we decided to use a polynomial of 7th order. We disregard the small increase in phase error for polynomial orders 5–7 seen in Fig. 7(b) since most of the laser power falls on the center of the SLM. For a polynomial of 7th order the largest maximum phase error is 0.46 (0.33) rad and the largest mean phase error is 0.33 (0.11) rad if the 52 (32) central SLM subregions are used in the analysis.

#### 5.4. Method evaluation

The performance of the 3D polynomial method was evaluated using three different methods: by applying sequences of binary gratings to subregions of the SLM, by applying full-frame holograms and comparing the desired and obtained spot intensities, and finally in optical trapping experiments, where the obtained trap stiffness for each trap was determined by Brownian motion analysis. In the binary grating and full frame hologram measurements, the method was compared to the use of a global LUT and to the use of the scaling matrix method, where *f*(*x*, *y*) is chosen such that Eq. (4) is fulfilled for *φ*_{desired} = *π*. In the optical trapping experiment, the method was compared to the use of a global LUT.

### 5.4.1. Binary gratings covering a subregion of the SLM

The binary grating measurements were done similarly to the presented calibration method. The grating period was still 16 pixels and a sequence of gratings was used; one of the two grating levels was changed in the sequence. However, instead of stepping the PV from 0 to 255, the desired phase *φ*_{desired} was stepped from 0 to 2*π*. The three tested methods for converting desired phase to PV were then used to convert each grating to the corresponding PV matrix. Finally, the power in one of the 1st diffraction orders was measured and normalized to the maximum value and the realized phase was calculated using Eq. (5).

In Fig. 8, the normalized power and realized phase are plotted against the desired phase for the three methods. Ideally, the normalized power, see Figs. 8(a)–8(c), should follow a sine-squared curve with a period of 2*π*, and the phase response curves, see Figs. 8(d)–8(f), should have a constant slope of 1 and no offset. While the scaling matrix method brings the phase response curves closer to the ideal line – the maximum error is reduced from 0.8*π* to 0.6*π* – it fails to compensate for their varying shapes. With the 3D polynomial method, the response curves are brought much closer to the ideal line and the maximum error is reduced to 0.3*π*.

### 5.4.2. Holograms covering the full SLM

The PV calculation methods were then evaluated by studying the spot intensities for full frame holograms. In these measurements, the zeroth order was not blocked. Its intensity was instead measured and used to further judge the performance of the used methods. The measurements were performed using 1 W optical power incident onto the SLM. This power yields a stronger phase response variation over the SLM area than ≤0.5 W and is also a more realistic power used for trapping.

Binary gratings covering the entire SLM were first used in a way similar to the previously described sub-region measurements; the desired phase in one of the grating levels was kept at zero and the other level was stepped from zero to 2*π*. Again, a grating period of 16 SLM pixels were used. The powers in the zeroth and the two first diffraction orders were measured using a camera. The power in the two first diffraction orders should then ideally vary as *P*_{tot}(2/*π*)^{2} sin^{2}(*φ*/2) and the zeroth order should vary as *P*_{tot} cos^{2}(*φ*/2), where *P*_{tot} is the total power in the trapping plane. Thus, the zeroth order should completely vanish at *φ* = *π* and equal *P*_{tot} at *φ* = 2*π* and the first diffraction orders should completely vanish at *φ* = 2*π*. In Fig. 9, the powers for the three measured diffraction orders are plotted for each of the three methods.

The difference between the three methods can be seen most clearly in the extreme values. For the zeroth order, the minima equal 0.19*P*_{tot}, 0.26*P*_{tot}, and 0.074*P*_{tot} for the three methods, respectively. At *φ* = 2*π* the zeroth order equals 0.91*P*_{tot}, 0.96*P*_{tot}, and 0.97*P*_{tot} and the highest of the two 1st order powers equals 0.16*P*_{tot}, 0.069*P*_{tot}, and 0.028*P*_{tot}, respectively. The phase for which the 0th order minimum and ±1st order maxima is found equals 1.05*π*, 0.88*π*, and 0.93*π* radians for the three methods, respectively. Also, an analysis of the shapes of the curves shows that the global LUT and the 3D polynomial give an equally decent fit to the ideal sine-squared shapes while the scaling matrix method degrades the curve shapes. As seen, none of the methods removes the 0th order completely for a phase step of *π* radians, nor do the first orders completely vanish when the phase step reaches 2*π*. The reason for this might be that the spatial phase response is still not perfectly corrected for. However, a more pronounced effect is likely that the realized phase gratings are smeared out due to pixel crosstalk resulting in non-ideal “binary” gratings [8, 32]. In summary, the measured results on binary gratings show that the 3D polynomial gives the best results while the scaling matrix method actually yields slightly worse results than the global LUT. Similar results were obtained for *P*_{SLM} = 50 mW, 0.5 W, and 1.5 W.

Two holograms with a more complicated phase modulation were also used. One producing 14 spots equidistantly distributed on a circle with radius 0.1875*α*_{max} and one producing 24 spots forming a regular 5×5 grid with a spacing of 0.125*α*_{max}; the center position excluded. Here, *α*_{max} = sin^{−1}(*λ*/2*p*) is the maximal steering angle allowed by the pixelated SLM; *p* is the pixel pitch. Both spot arrangements were centered on the optical axis. The two holograms were optimized using a modified Gerchberg-Saxton algorithm to obtain nearly perfect theoretical uniformity [14]. For each hologram and phase conversion method, the power in the desired spot positions and the 0th order spot were measured. The uniformity of the spot powers and the power in the 0th order spot were used to assess the performance of the three methods.

In Figs. 10(a)–10(c) measured results are shown for the hologram producing a circle containing 14 spots. First of all, it is clear that the unwanted optical power on the optical axis decreases as the phase-to-PV conversion method becomes more accurate. For the data shown in Figs. 10(a)–10(c), 8.9%, 6.9%, and 2.9% of the captured power falls into the zeroth order. Furthermore, a power uniformity of the 14 spots of 85%, 84%, and 85% is obtained for the three different conversions methods, respectively. Similar results were obtained also for the hologram producing 24 traps out of a 5×5 grid, see Figs. 10(d)–10(f). The measurements show that 7.5%, 6.7%, and 2.7% of the captured power falls into the zeroth order and the uniformity (among the 24 desired traps) was 70%, 69%, and 70% for the three methods, respectively. Here, a higher uniformity was expected for the 3D polynomial method (see simulated results in Fig. 1). However, the reflective measurements are very sensitive to the mirror position and orientation. Thus, with this method it is very difficult to verify any possible increase in the uniformity.

### 5.4.3. Holographic optical trapping

Finally, the 3D polynomial method was used for trapping and its performance was compared to the use of a global LUT. Since the scaling matrix method had not shown any real improvement over the global LUT method, as described in previous subsections, it was not implemented in CUDA and thus not tested for optical trapping. Prior to the measurements, an IR-filter was mounted onto the camera to block the trapping laser and make it possible to capture clear bright field images, see Fig. 5(a). Also, a camera allowing for a faster frame rate was used (EoSens CL MC1362, Mikrotron GmbH, pixel size 14*μ*m×14*μ*m).

Five silica beads (diameter of 2.56 *μ*m) suspended in water were trapped and positioned with a spacing of 7.6 *μ*m along the *x*-axis; the central bead coinciding with the optical axis. To obtain bright field images suitable for bead position determination the traps were positioned in a plane 2.4 *μ*m in front of the imaging/trapping plane of the microscope objective. The latter plane coincides with the imaged Fourier plane of the SLM, which is the plane where the 0th order spot is located. The 2.4 *μ*m longitudinal displacement of the traps was accomplished by including a spherical phase curvature when optimizing the hologram. Finally, the sample was placed such that the beads were positioned 10 *μ*m above the glass substrate.

Keeping the incident laser power onto the SLM at 1 W this was repeated for two different holograms designed to yield 10% and 20% of the total power in each of the traps, respectively. To achieve 10% of the total power in each of the 5 traps, the hologram dumped half of the laser power outside the measurement window. By allowing for power to be dumped when calculating the hologram, the intensity distribution within the measurement window can be even closer to the desired one. In particular, the theoretical power in the five traps can be virtually identical, yielding a perfectly uniform trap stiffness [14]. The second case, 5 traps each containing 20% of the total power, means that the algorithm tries to maximize the diffraction efficiency without deliberate power dumping, giving very nearly, but not quite, uniform intensity in the trap positions.

The beads were monitored by capturing bright field images at a rate of 8192 frames per second for a duration of 100 s. The positions of the beads were determined in each frame using a center-of-mass calculation after subtraction of the dark signal non uniformity and a constant threshold value. Although the conditions are static the beads move due to Brownian motion. The power spectrum of the position of a bead gives information about the trap stiffness, i.e., how strongly the bead is held in the trap, which in turn is an indication of the intensity of the focused light in the trap position. To minimize the impact of drift the position data was divided into 0.25 s long segments that were used to calculate the power spectrum. In Fig. 11 the average of 100 such power spectra are shown for each of the five beads.

From Figs. 11(a)–11(d) it is clear that the 3D polynomial method yields more similar trapping conditions in the five traps than the global LUT method, as evidenced by the more similar power spectral density curves for the five beads. This is primarily an indication of a considerably more uniform trap stiffness. For a desired trap power of 10% of the total power the mean trap stiffness is 0.33·10^{−3} pN/nm and 0.36·10^{−3} pN/nm for the global LUT and the 3D polynomial, respectively; the trap stiffness uniformity, calculated with the maximum and minimum stiffness values similarly to Eq. (1), is 90% and 96%, respectively. For a desired trap power of 20% of the total power the mean trap stiffness is 0.65·10^{−3} pN/nm and 0.68*·*10^{−3} pN/nm for the global LUT and the 3D polynomial, respectively. Furthermore, the trap stiffness uniformity is 81% and 94%, respectively. Thus, the 3D polynomial method increases both the trap stiffness of the traps and the uniformity thereof.

As seen in Figs. 11(a)–11(d), all five beads have roughly the same behavior. Thus, the bead in the middle trap, coinciding with the optical axis, is not strongly influenced by the 0th diffraction order spot positioned in the imaging/trapping plane 2.4 *μ*m behind it. However, when a hologram optimized to yield five traps with a desired power in each trap equal to only 2% of the total power, for the global LUT method the 0th diffraction order spot is strong enough to capture the bead from the middle trap, see Fig. 11(e). When the 3D polynomial method was used, the 0th diffraction order was still too weak to affect the bead in the middle trap, see Fig. 11(f). Thus, with this method very weak traps can be efficiently used also in close vicinity to the 0th diffraction order; this is important, e.g., if sensitive living cells are to be trapped.

## 6. Conclusions

We have shown that the phase response can vary over the SLM surface and that this can depend not only on variations in the active LC layer thickness but also on variations in the incident laser power, i.e., induced heating of the LC, and a non-uniform electrical driving scheme. As a consequence, independent of which phase-to-PV conversion method is used, the data used to derive the conversion parameters should always be measured at the same power, and – if applicable – same SLM electric drive settings as used in the real application.

To compensate for such spatial phase response variations, we suggest a method that converts the desired phase to pixel value using a 3D polynomial with variables being the (*x*, *y*)-coordinates and the desired phase of each pixel. Experimental evaluations of holographically generated configurations of intensity spots and optically trapped beads confirm that the SLM behaves more ideally than when previously proposed conversion methods are used. The main advantages are that the unwanted 0th diffraction order, i.e., optical power on the optical axis of the system, is strongly suppressed, and that the optical power is more accurately distributed among the desired spots/traps. In HOT, the suppression of the 0th diffraction order is a major improvement as it means that unwanted particles being drawn into the optical axis, typically in the center of the measurement region, is no longer such a severe problem. Thus, there is no need to block the 0th diffraction order outside the microscope. Instead, traps close to – or even coinciding with – the optical axis behave as any other trap. Furthermore, the 3D polynomial method has shown to increase both the trap stiffness and the trap uniformity.

Since the conversion method is applied only after the desired phase pattern/hologram has been found, the optimization method used to calculate the hologram is not critical to the conversion method. Hence, the method can be used with holograms optimized with any algorithm. For instance, we are currently using the method together with an algorithm that creates holograms that minimize the pixel crosstalk effect [32].

Even though this work has focused on HOT, the benefits of the scheme presented here can be utilized in any applications in which an SLM is used for phase modulation. As a straightforward further development of the method, to improve the behavior of the polynomial in the outer parts of the SLM, i.e., decrease the impact of Runge’s phenomenon, dummy data points may be introduced outside the measured area of the SLM.

The 3D polynomial method adds calculation time to the hologram generation cycle. However, utilizing our implementation in CUDA, the conversion time for a 512×512 element hologram is merely ∼0.13 ms. This means that if holograms are created at a rate of 100 Hz, the PV conversion needs less than 2% of the time window, leaving enough time to use an accurate optimization algorithm resulting in holograms with a near-ideal performance.

## Acknowledgments

This work was supported by the Swedish Research Council (M.G.). D.E. acknowledges the Royal Swedish Academy of Sciences for financial support. We thank Anna Linnenberger and Teresa Ewing at Boulder Nonlinear Systems for their help linking our software to the SLM hardware and for discussions regarding BNS SLM systems. Finally, we thank Rebecca Mayer for interesting discussions.

## References and links

**1. **E. Marom and N. Konforti, “Dynamic optical interconnections,” Opt. Lett. **12**, 539–541 (1987) [CrossRef] [PubMed] .

**2. **P. F. McManamon, T. A. Dorschner, D. L. Corkum, L. J. Friedman, D. S. Hobbs, M. Holtz, S. Liberman, H. Q. Nguyen, D. P. Resler, R. C. Sharp, and E. A. Watson, “Optical phased array technology,” Proc. SPIE **84**, 268–298 (1996).

**3. **E. Hällstig, J. Öhgren, L. Allard, L. Sjöqvist, D. Engström, S. Hård, D. Ågren, S. Junique, Q. Wang, and B. Noharet, “Retrocommunication utilizing electroabsorption modulators and non-mechanical beam steering,” Opt.Eng. **44**, 045001 (2005) [CrossRef] .

**4. **M. Reicherter, T. Haist, E. U. Wagemann, and H. J. Tiziani, “Optical particle trapping with computer-generated holograms written on a liquid-crystal display,” Opt. Lett. **24**, 608–610 (1999) [CrossRef] .

**5. **E. R. Dufresne, G. C. Spalding, M. T. Dearing, S. A. Sheets, and D. G. Grier, “Computer-generated holographic optical tweezer arrays,” Rev. Sci. Instrum. **72**, 1810–1816 (2001) [CrossRef] .

**6. **M. A. Seldowitz, J. P. Allebach, and D. W. Sweeney, “Synthesis of digital holograms by direct binary search,” Appl. Opt. **26**, 2788–2798 (1987) [CrossRef] [PubMed] .

**7. **B. K. Jennison, J. P. Allebach, and D. W. Sweeney, “Efficient design of direct-binary-search computer-generated holograms,” J. Opt. Soc. Am. A **8**, 652–660 (1991) [CrossRef] .

**8. **G. Milewski, D. Engström, and J. Bengtsson, “Diffractive optical elements designed for highly precise far-field generation in the presence of artifacts typical for pixelated spatial light modulators,” Appl. Opt. **46**, 95–105 (2007) [CrossRef] .

**9. **R. W. Gerchberg and W. O. Saxton, “A Practical Algorithm for the Determination of Phase from Image and Diffraction Plane Pictures,” Optik **35**, 237–246 (1972).

**10. **M. W. Farn, “New iterative algorithm for the design of phase-only gratings,” Proc. SPIE **1555**, 34–42 (1991) [CrossRef] .

**11. **J. E. Curtis, B. A. Koss, and D. G. Grier, “Dynamic holographic optical tweezers,” Opt. Commun. **207**, 169–175 (2002) [CrossRef] .

**12. **D. Engström, A. Frank, J. Backsten, M. Goksör, and Jörgen Bengtsson, “Grid-free 3D multiple spot generation with an efficient single-plane FFT-based algorithm,” Opt. Express **17**, 9989–10000 (2009) [CrossRef] [PubMed] .

**13. **S. Bianchi and R. Di Leonardo, “Real-time optical micro-manipulation using optimized holograms generated on the GPU,” Comput. Phys. Commun. **181**, 1442–1446 (2010) [CrossRef] .

**14. **M. Persson, D. Engström, and M. Goksör, “Real-time generation of fully optimized holograms for optical trapping applications,” Proc. SPIE **8097**,80971H (2011) [CrossRef] .

**15. **X. D. Xun and R. W. Cohn, “Phase calibration of spatially nonuniform spatial light modulators,” Appl. Opt. **43**, 6400–6406 (2004) [CrossRef] [PubMed] .

**16. **J. Oton, P. Ambs, M. S. Millan, and E. Perez-Cabre, “Multipoint phase calibration for improved compensation of inherent wavefront distortion in parallel aligned liquid crystal on silicon displays,” Appl. Opt. **46**, 5667–5679 (2007) [CrossRef] [PubMed] .

**17. **D. Engström, M. Persson, and M. Goksör, “Spatial phase calibration used to improve holographic optical trapping,” in *Biomedical Optics and 3-D Imaging*, OSA Technical Digest (Optical Society of America, 2012), paper DSu2C.3 [CrossRef] .

**18. **G. Thalhammer, R. W. Bowman, G. D. Love, M. J. Padgett, and M. Ritsch-Marte, “Speeding up liquid crystal SLMs using overdrive with phase change reduction,” Opt. Express **21**, 1779–1797 (2013) [CrossRef] [PubMed] .

**19. **S. Reichelt, “Spatially resolved phase-response calibration of liquid-crystal-based spatial light modulators,” Appl. Opt. **52**, 2610–2618 (2013) [CrossRef] [PubMed] .

**20. **Z. Zhang, H. Yang, B. Robertson, M. Redmond, M. Pivnenko, N. Collings, W. A. Crossland, and D. Chu, “Diffraction based phase compensation method for phase-only liquid crystal on silicon devices in operation,” Appl. Opt. **51**, 3837–3846 (2012) [CrossRef] [PubMed] .

**21. **T. Cizmar, M. Mazilu, and K. Dholakia, “In situ wavefront correction and its application to micromanipulation,” Nat. Photonics **4**, 388–394 (2010) [CrossRef] .

**22. **R. W. Bowman, A. J. Wright, and M. J. Padgett, “An SLM-based ShackHartmann wavefront sensor for aberration correction in optical tweezers,” J. Opt. **12**, 124004 (2010) [CrossRef] .

**23. **T. H. Barnes, K. Matsumoto, T. Eijo, K. Matsuda, and N. Ooyama, “Grating interferometer with extremely high stability, suitable for measuring small refractive index changes,” Appl. Opt. **30**, 745–751 (1991) [CrossRef] [PubMed] .

**24. **A. Bergeron, J. Gauvin, F. Gagnon, D. Gingras, H. H. Arsenault, and M. Doucet, “Phase calibration and applications of a liquid-crystal spatial light modulator,” Appl. Opt. **34**, 5133–5139 (1995) [CrossRef] [PubMed] .

**25. **Z. Zhang, G. Lu, and F. T. S. Yu, “Simple method for measuring phase modulation in liquid crystal televisions,” Opt. Eng. **33**, 3018–3022 (1994) [CrossRef] .

**26. **D. Engström, G. Milewski, J. Bengtsson, and S. Galt, “Diffraction-based determination of the phase modulation for general spatial light modulators,” Appl. Opt. **45**, 7195–7204 (2006) [CrossRef] [PubMed] .

**27. **A. Linnenberger, S. Serati, and J. Stockley, “Advances in Optical Phased Array Technology,” Proc. SPIE **6304**,63040T (2006).

**28. **D. Preece, R. Bowman, A. Linnenberger, G. Gibson, S. Serati, and M. Padgett, “Increasing trap stiffness with position clamping in holographic optical tweezers,” Opt. Express **17**, 22718–22725 (2009) [CrossRef] .

**29. **M. Schadt and W. Helfrich, “Voltage-dependent optical activity of a twisted nematic liquid crystal,” Appl. Phys. Lett. **18**, 127–128 (1971) [CrossRef] .

**30. **A. Linnenberger and Teresa Ewing, Boulder Nonlinear Systems, 450 Courtney Way, #107 Lafayette, CO 80026, USA (personal communication, February 2013).

**31. **Software available at http://www.physics.gu.se/forskning/komplexa-system/biophotonics/download/hotlab/

**32. **M. Persson, D. Engström, and M. Goksör, “Reducing the effect of pixel crosstalk in phase only spatial light modulators,” Opt. Express **20**, 22334–22343 (2012) [CrossRef] [PubMed] .

**33. **C. Runge, “Über empirische Funktionen und die Interpolation zwischen äquidistanten Ordinaten,” in*Zeitschrift für Mathematik und Physik*46,R. Mehmke and C. Runge, eds. (Druck und verlag von B. G. Teubner, Leipzig, 1901), 224–243.