## Abstract

Nematic liquid crystal spatial light modulators (SLMs) with fast switching times and high diffraction efficiency are important to various applications ranging from optical beam steering and adaptive optics to optical tweezers. Here we demonstrate the great benefits that can be derived in terms of speed enhancement without loss of diffraction efficiency from two mutually compatible approaches. The first technique involves the idea of overdrive, that is the calculation of intermediate patterns to speed up the transition to the target phase pattern. The second concerns optimization of the target pattern to reduce the required phase change applied to each pixel, which in addition leads to a substantial reduction of variations in the intensity of the diffracted light during the transition. When these methods are applied *together*, we observe transition times for the diffracted light fields of about 1 ms, which represents up to a tenfold improvement over current approaches. We experimentally demonstrate the improvements of the approach for applications such as holographic image projection, beam steering and switching, and real-time control loops.

© 2013 OSA

## 1. Introduction

Spatial light modulators (SLMs) are widely used for light shaping in a variety of applications (see [1, 2] for an overview), such as image display, beam steering and shaping, or aberration control [3–5]. Among the different possibilities to realize a SLM, devices based on electrically driven nematic liquid crystals have found widespread use due to their high flexibility: they offer high resolution with millions of pixels, where each individually addressable element allows one to modify the phase of the light with a typical precision of better than *λ*/100. Such devices are typically used as programmable diffractive optical elements, yielding a high diffraction efficiency > 80%. However, these advantages of SLMs based on nematic liquid crystals come at the cost of comparatively slow response times on the order of 10 ms. Many applications where speed is important would benefit from improved response times. This work on improving the response time was motivated by the desire for higher speed for holographic optical tweezers, but the results are widely applicable for all applications that employ nematic SLMs.

In this work we present the implementation of a method for reducing the effective response time of a phase-only SLM based on nematic liquid crystals. There are two key components. The first is the well-known overdrive method [6–8], which is related to the transient nematic effect [9]. We demonstrate here a successful implementation of a real-time multi-frame overdrive method. The second component is an algorithm to reduce the phase changes when switching from one SLM pattern to another. We show the counter-intuitive result that increasing the liquid crystal thickness can actually lead to a reduced switching time and reduced unwanted diffraction.

The idea behind the overdrive method is intuitive: to speed up the transition from one phase value to another, instead of simply switching the voltage to the value necessary to reach the desired phase in the static case, we apply for a certain time the maximum (or minimum) available driving voltage and then switch to the required static level. Other approaches to increase the speed of phase modulators based on nematic liquid crystals, such as *π*-cells [10], or using the dual frequency effect [11–13], or embedding the liquid crystal fluid in a polymer matrix [14,15], require modifications or demanding technologies, which are difficult to implement in pixelated devices. Our implementation can easily be applied to existing setups based on SLMs such as those from *Boulder Nonlinear Systems* with a PCIe interface by changing only the control software running on the host computer.

With the overdrive method the time needed for the transition depends on the initial and final phase value of each pixel and on the available phase stroke. The maximum phase stroke depends on the thickness of the liquid crystal layer and on the maximum available control voltage. Typically the manufactures of SLMs maximize the control voltage and choose a minimal thickness such that the phase stroke is just 2*π* for the design wavelength, which minimizes the transition time if one uses the simple method of switching between static values. However, with the overdrive method a thicker liquid crystal layer with a larger phase stroke gives shorter transition times, as explained in more detail in section 2.

The smaller the difference between two subsequent phase values, the faster the transition occurs with the overdrive method. In order to maximally exploit this feature we additionally implemented a simple but effective method to reduce the (average) change of phase between two subsequent patterns, which we call phase change reduction. When switching, e.g., from a phase value of 1.9*π* to 0.1*π*, it is equivalent, but much faster to switch to a final value of 2.1*π*. For this method a maximum phase stroke larger than 2*π* is required, which is anyway a necessity for the overdrive method to achieve optimum speed. This phase change reduction not only *further* decreases the transition time, it also ameliorates the characteristic drop in diffraction efficiency during the transition time. Under some circumstances the intensity drop is nearly eliminated, e.g. for small subsequent changes in trap position, a situation which is quite common in optical trapping, when one wants to move trapped particles.

Both the overdrive and phase change reduction method can be applied individually. However, the phase change reduction method alone may lead to a slow down of the response (see results presented in section 4.5), only when applied *together* with the overdrive is the response time reduced.

Our implementation is also useful to speed up applications where a nematic SLM is employed to control the polarization state of the light, which in turn can also be used to change the intensity of light, e.g. for image projection. However, in this work we concentrate on the situation where a SLM is used as a phase modulator.

## 2. Working principle and implementation of the overdrive method

Figure 1 explains the working principle of the overdrive method. Let us first recall the usual phase control action: At some time *t*_{0} we apply a voltage *U*_{1} to a pixel of the SLM. As a response the phase value changes and after some time it approaches a steady state value *φ*_{1} (note that in this work for the sake of simplicity we adopt the sign convention that a positive voltage induces a positive phase shift). The transition can be well approximated by an exponential

*τ*. As shown in Fig. 1(b) the final phase value can be reached much faster by first increasing the voltage to the maximum available level

*U*

_{max}for some time Δ

*t*

_{1}, until the phase reaches the desired value

*φ*

_{1}, and then switching back to the steady state voltage

*U*

_{1}. Especially for small changes in phase this is much faster than simply switching on the voltage to the steady state value

*U*

_{1}and following the slowly rising exponential. For the case of switching to a lower final phase

*φ*

_{1}<

*φ*

_{0}we use an analogous strategy, but set the voltage during the transition to the minimum value (zero).

To determine the time Δ*t*_{1} during which the voltage needs to be switched to the maximum or minimum level, we measured the responses *φ*_{up}(*t*) and *φ*_{down}(*t*) for switching the voltage between the minimum to the maximum value and reverse. The response of the SLM when the voltage is switched to an extremal value always follows the same curve, independent of the starting phase value *φ*_{0}, as we verified experimentally. Therefore we easily obtain Δ*t*_{1} from

*t*(

*φ*) denotes the inverse function of

*φ*

_{up}(

*t*) or

*φ*

_{down}(

*t*), depending whether

*φ*

_{0}<

*φ*

_{1}or

*φ*

_{0}>

*φ*

_{1}. Assuming an exponential response as in Eq. (1) this can be expressed as

*φ*

_{m}=

*φ*

_{max}or

*φ*

_{min}and

*τ*=

*τ*

_{up}or

*τ*

_{up}, depending on the direction. The time Δ

*t*(

*φ*

_{0},

*φ*

_{1}) during which the extremal voltage is applied defines the transition time for a single pixel from phase

*φ*

_{0}to

*φ*

_{1}with overdrive. After this time period the phase has reached the target value. This is contrary to the switching between static values, where the target phase is only approached, approximately exponentially with time constant

*τ*.

#### 2.1. SLM control hardware and software

To successfully realize the overdrive method as described above it is necessary to control the applied voltage for each pixel at a time resolution that is faster than the typical transition time during which the voltage is switched to the extremal values. The driving electronics of our SLM (model P512-1064 from *Boulder Nonlinear Systems*), which is connected to the controlling host computer by a fast PCI Express interface, fulfills this requirement. It allows us to update the phase pattern every 0.5 ms (2 kHz rate), which is much faster than using a DVI-interface with a typical update rate of 60 Hz up to 200 Hz.

Another challenge with our approach is to calculate and transfer the phase patterns at this high rate. We met this requirement by employing the high computational speed of recent graphics cards (GPU), in our case a consumer device *AMD Radeon HD6950*. We use OpenCL as a platform- and vendor-independent programming environment for GPU calculations. The control software for the host computer is implemented in the Python programming language.

Fully exploiting the high update rate of the SLM results in a significant improvement compared to previous approaches [7, 8], which used only a single phase pattern to speed up the transition of an SLM. This additional pattern is displayed for a fixed period of time corresponding to the longest expected transition time (for a phase difference of 2*π*). The voltage during the transition period is chosen such that each pixel reaches the target value at the end of this period. The driving electronics for computer or TV displays based on liquid crystal technology typically also implement such or a similar single transient frame method, which is commonly called *response time compensation* (RTC) and marketed as *overdrive*. Compared to such methods controlling the driving voltage of a single transient frame, the use of many frames at a high display rate has the advantage that each pixel reaches its destination phase value within the shortest period. Depending on the difference between two subsequent phase patterns (the smaller the better) this can lead to an effective response time of the SLM that is much shorter than the longest expected transition time.

#### 2.2. Algorithm the for calculation of transient patterns

For every switch between two phase patterns we first calculate the desired target phase pattern and then a batch of typically 10 transient frames, which are subsequently transferred from the GPU device memory to the main memory of the host computer and then transfered to and displayed on the SLM sequentially. We found that calculating and transferring all the transient frames together is more efficient than doing this separately for each frame, especially since latencies for starting OpenCL kernels and initiating data transfers to the host computer memory are avoided (see also Table 1). Since the SLM electronics allows us to control the duration of the applied overdrive voltage only in discrete steps of 0.5 ms, we also modify the overdrive voltage at the end of the transition period to correct for the error which would be introduced otherwise.

The essential steps we perform to calculate the output value of each pixel are summarized as follows:

- Fetch the current phase
*φ*_{0}and the target phase*φ*_{1}from memory. - Perform pre-processing of the target phase value such as aberration correction, phase change reduction (see section 3) and calculate the output value
*U*_{1}to realize the (corrected) phase*φ*_{1}for the steady state case. - Calculate Δ
*t*=*t*(*φ*_{1}) −*t*(*φ*_{0}), (see Eq. (2)), looking up the values of*t*(*φ*) in a table (with linear interpolation). - Calculate the output value for a sequence of transient frames:
- For the first integer number of transient frames
*n*_{tr}= ⌊Δ*t/t*_{fr}⌋ that are completely contained in the transition period Δ*t*, where each is displayed for a period*t*_{fr}, set the output value to*U*=_{m}*U*_{max}or*U*_{min}. - For the following frame that is only partially contained in the transition period set the output value to
*U*=*fU*_{1}+ (1 −*f*)*U*, where_{m}*f*= Δ*t/t*_{fr}−*n*_{tr}is the fractional part of Δ*t/t*_{fr}. - For the remaining frames set the output value to
*U*_{1}.

Due to variations of the SLM pixel response across the surface [16,17] the device parameters necessary for performing the calculations, such as the dynamic response *φ*(*t*) or the control voltage *U*(*φ*) to realize a phase shift, depend on the position of the pixel. Therefore we take the parameters from tabulated data. To keep the amount of table data reasonably small, allowing for efficient data access with caching, we use linear interpolation of more coarsely sampled data (21 entries for the phase argument at spatial resolution of 29 × 29 is sufficient), which is efficiently supported by the GPU hardware.

We calculate not only the transition patterns, but also the target phase patterns on the GPU. We have implemented procedures to realize patterns useful for optical trapping, which diffract a single incoming laser beam into several beams with independently controllable beam intensity, direction and divergence. When focussed with a lens this light configuration creates several independent foci at the desired positions in space. Such patterns are also useful, e.g., for dynamic beam steering or for beam multiplexing. Optionally we use a procedure based on the iterative Gerchberg-Saxton algorithm to optimize the diffraction efficiency and uniformity of the spot intensities [18].

## 3. Phase change reduction

As already stated previously, the overdrive method explained above gives the strongest gain for small phase differences between two subsequent patterns. Therefore another key ingredient to optimize the response speed lies in a simple but effective method to reduce the phase difference. This also leads to a notable reduction of intensity variations when switching to a new phase pattern. Somehow counter-intuitive, to realize this phase change reduction an extended available phase range, larger than 2*π*, is required.

Changing the phase of an SLM pixel by 2*π* does not change the diffracted light field (when using monochromatic light). Therefore after phase wrapping, i.e., taking the phase modulo 2*π*, a maximum range of 2*π* is sufficient to realize any continuous phase pattern compatible with the sampling restrictions given by the pixel size of the SLM. Often, patterns are naturally phase wrapped, e.g., when calculated as the angle of a complex field. Because of this the manufactures of SLMs typically offer models with a maximum phase stroke of 2*π*, which can be realized with a thin LC layer and therefor offer a small time constant *τ* (see Eq. (1)).

As a result of phase wrapping, the difference between any two patterns is bounded by ±2*π*. Yet in some cases phase wrapping can introduce unnecessarily large phase changes. As shown in Fig. 2 phase values near the edge of the range are most sensitive to this effect. For example, after phase wrapping an originally small change from 1.9*π* to 2.1*π* is replaced by a much larger change from 1.9*π* to 0.1*π*. This can be easily avoided if an extended phase range larger than 2*π* is utilized.

#### 3.1. Algorithm for phase change reduction

The algorithm we propose to reduce phase changes is straightforward, it is based on the idea of adding or subtracting multiples of 2*π*, which does not alter the generated diffraction pattern, such that the phase difference is minimized. This is only possible if an extended phase [*φ*_{min}, *φ*_{max}] range larger than 2*π* is available. Let *φ*_{0} denote the current phase value and *φ*_{1} the next, as before. Then we proceed as follows:

- Modify the target phase value by adding multiples of ±2
*π*, such that the phase difference is minimized.This modification can be expressed as ${\overline{\phi}}_{1}={\phi}_{1}-2\pi \lfloor \frac{{\phi}_{1}-{\phi}_{0}}{2\pi}+\frac{1}{2}\rfloor $, where ⌊

*x*⌋ denotes the floor operator, giving the largest integer number smaller than*x*. - In the case that the modified target phase
*φ*̄_{1}lies outside the extended range [*φ*_{min},*φ*_{max}], add or subtract 2*π*such that it falls within this range.

This method is easy to implement and requires very little computation. Note that the boundaries of the extended range can be chosen arbitrarily and independently for every pixel, as we indeed do to take into account the spatially varying maximum phase stroke of the SLM, see section 4.1.

#### 3.2. Effect of the phase change reduction method on the mean phase difference

Under the simplifying assumptions that the extended range is much larger than 2*π* such that the folding back of the phase into the extended range (step 2 of the algorithm above) is rarely necessary, it is easy to see that the maximum phase change, which defines an upper limit of the response time of the SLM, is reduced to *π* instead of 2*π*. On the other hand, choosing a narrow range only slightly larger than 2*π* will diminish the effectiveness of the phase change reduction. In this section we study the effect of the phase change reduction method for realistic choices of the extended range between these extreme cases. A detailed discussion of the optimal choice of the extended range and the implications for the design of the SLM is given in section 3.4.

We consider two cases, uncorrelated and correlated phase patterns. Let us first discuss the case when subsequent phase patterns are uncorrelated, as it occurs, e.g., when moving beam positions by amounts larger than the beam diameter. In Fig. 3 we present histograms of occurring phase values and phase differences between subsequent patterns. Without phase change reduction the phase histogram shows a uniform distribution of values in the range [0, 2*π*], and the histogram for the *difference* has a triangular shape, extending from −2*π* to 2*π*. With phase change reduction the distribution of phase values is not anymore uniformly distributed. The continuous folding back of the phase values into the extended range of permitted phase values (last step in the phase change reduction algorithm) reduces the number of pixels with phase values near the border of the extended range. The number of pixels that undergo a change greater than *π* is markedly reduced. In the limit of a very large extended range the histogram for the phase difference would show a uniform distribution over the range [−*π*, +*π*] instead of the triangular shape within [−2*π*, +2*π*]. In this case the mean change in phase 〈|*φ*_{1} − *φ*_{0}|〉 is reduced from
$\frac{2}{3}\pi $ to
$\frac{1}{2}\pi $, the root mean square difference 〈(*φ*_{1} − *φ*_{2})^{2}〉^{1/2} is reduced from
$\sqrt{2/3}\pi $ to
$\sqrt{1/3}\pi $.

For the other case, when the phase patterns have some similarities, the phase change reduction leads to even more pronounced results. In this case the histogram for the phase difference is peaked around zero, with additional satellite peaks near ±2*π* that are introduced due to phase wrapping, see Fig. 3(b). When the phase change reduction algorithm is applied, these large phase changes, which have the strongest impact on the effective response time, are eliminated to a large extent.

To illustrate the effect of the phase change reduction method we produced simulations where we changed the phase pattern by random values, taken from a normal distribution with standard deviation *σ*, applied phase wrapping, and then performed the phase change reduction algorithm with different amounts of extra margin *m* for the extended phase range [−*m*, 2*π* + *m*]. In Fig. 4(a) we show the results for the root mean square phase difference. A zero margin *m* = 0 corresponds to performing no phase change reduction at all. In this case the phase wrapping increases the mean phase change
${\u3008\mathrm{\Delta}{\phi}^{2}\u3009}^{\frac{1}{2}}$ compared to the value *σ* before phase wrapping. This increase is most striking for small values of *σ*. Instead, with phase change reduction
${\u3008\mathrm{\Delta}{\phi}^{2}\u3009}^{\frac{1}{2}}$ closely follows *σ*, even for a rather small additional margin of *π*/2. For highly uncorrelated phase patterns (large *σ*) the value of
${\u3008\mathrm{\Delta}{\phi}^{2}\u3009}^{\frac{1}{2}}$ saturates to the values already mentioned above.

#### 3.3. Reduction of variations in the intensity of the diffracted light by the phase change reduction method

When applied together with the overdrive method, the phase change reduction not only improves the effective response speed, it also reduces the intensity drop during the transition period. For applications this has important implications, e.g., while dragging an optically trapped particle, an intensity drop may lead to a loss of the particle, therefore if the intensity drop is reduced, a higher dragging speed can be achieved, especially in a low-damping situation, such as optical trapping in air or at high power.

Let us for the sake of simplicity assume that during the transition period the phase of each pixel linearly changes from the initial to the final value, then about halfway the transient phase pattern shows the largest deviation from the optimized phase patterns and the largest drop in diffraction efficiency is expected. There the phase value of each pixel is
${e}^{i\frac{1}{2}\left({\phi}_{0}+{\phi}_{1}\right)}={e}^{i{\phi}_{0}}{e}^{i\frac{1}{2}\mathrm{\Delta}\phi}$. The diffracted light field, which is essentially given by a Fourier transform of the field at the SLM, is then described by *E*_{0}** E*_{1/2}, i.e., the target field *E*_{0} convolved with a kernel given by the diffracted transient field *E*_{1/2}. In general the diffracted light outside the zero order component of the transient field *E*_{1/2} deteriorates the light pattern. Therefore the diffraction efficiency into the desired target pattern during the transition can roughly be estimated as the amount of non-diffracted light of *E*_{1/2}, which is given by the zero order coefficient of the Fourier transform of
${E}_{1/2}={e}^{i\frac{1}{2}\mathrm{\Delta}\phi}$,

*N*pixels. For small average changes 〈Δ

*φ*

^{2}〉 ≪ 1 this can be approximated by expanding the exponential into a power series, yielding From this discussion it is obvious that a reduction of the average phase difference ${\u3008\mathrm{\Delta}{\phi}^{2}\u3009}^{\frac{1}{2}}$ will reduce the intensity loss during the transition.

In addition to the discussion in section 3.3 we present in Fig. 4(b) the diffraction efficiency, Eq. (4), for the simulation as described above. The behavior of the diffraction efficiency *p*_{0} during the transition for small phase changes (small *σ*) is quite noteworthy. Without phase change reduction the efficiency shows an approximately linear reduction, whereas with it we observe the quadratic dependence on *σ* as expected from Eq. (5), which leads to a substantial improvement of the intensity stability during the transition period.

To efficiently reduce intensity variations we apply the phase change reduction method in addition to other approaches that increase the similarity of subsequent phase patterns. For optical trapping or beam steering, when moving the positions of the individual diffracted beams by less than a spot diameter in order not to lose a trapped particle, the desired target intensity distribution is changing only slightly. However, an iterative Gerchberg-Saxton algorithm with random starting conditions, which are usually adopted, gives rise to disparate subsequent phase patterns. Therefore, instead, we use the last result for the phase pattern as a starting point for the calculation of the next to obtain a pattern which only shows small differences compared to the previous one [19]. For the simple and fast “prism and lenses” method [20] to create phase patterns it is recommended to locate the origin of the coordinate system at the center of the SLM.

In [19] the so called restricted phase change (RPC) method is introduced, which is a modified Gerchberg-Saxton algorithm to calculate SLM patterns for optical trapping where SLM pixels with phase changes larger than a threshold value of 2*πα* are forcedly set to the previous value, with 0 < *α* < 1. This leads to a reduction in the mean phase difference and consequently, as discussed above, to a significant reduction of the intensity variations. The diffraction efficiency is slightly reduced, but the uniformity of trap intensities is not affected. As we will demonstrate in section 4 our phase change reduction method yields a suppression of intensity fluctuation comparable with the RPC method, but does not decrease the diffraction efficiency. The RPC method is recommended if by any reason an extended phase range larger than 2*π* is not accessible.

In fact, both methods can be applied together, restricting phase changes *after* having applied the phase change reduction method. By this the transition time in combination with the overdrive method can be further minimized, without affecting the diffraction efficiency too strongly.

#### 3.4. SLM design considerations

To achieve a substantial speed-up with the overdrive method a large enough phase stroke, ideally greater than 2*π*, is required. Similarly, the phase change reduction method requires an additional margin. However, this requires a thick enough liquid crystal layer which in turn increases the response time constant. So there is some optimal layer thickness where the transition time is minimized [21]. In contrast to other parameters that influence the speed, such as the liquid crystal material or the driving voltage, the thickness can be more easily changed, and SLM manufactures typically offer several models aimed at the use with different wavelengths that differ in the LC layer thickness. In this section we will give some estimates for choosing the optimal thickness to achieve maximum speed.

We performed simulations based on the numerical integration of the Leslie-Ericksen equations that govern the dynamics of a nematic SLM [22]. Depending on the LC layer thickness we calculated the transition time and determined the optimum settings with respect to the position of the used phase range. These optimum values depend on the size of the extended phase range used. For these optimizations we took into account the longest transition times that occur for large phase changes near the border of the used phase range. If we apply the phase reduction method, the largest possible phase changes are a 2*π* change *away* from the upper or lower border of the extended range, but only *π towards* the upper or lower border. Depending on where the used (extended) phase range is situated within the available range, one of these four cases limits the response time.

Without an additional margin, *m* = 0, the optimum values yield a maximum phase stroke of about 2.8*π*. For an extra margin of *m* = *π*/2 on each side, or total 3*π* range, the optimum setting is 3.6*π*, with a speed penalty of only 12 % for the worst case compared to the previous setting. With *m* = *π* (4*π* total used range) the optimum is reached for 5.5*π*. This is approximately the maximum phase stroke we observe for our SLM. Compared to the optimum settings for a 2*π* range we calculate a speed penalty of 50 %. However, since this is only the increase in transition time for the largest possible phase change, and as argued in section 3 with the phase change reduction method such large phase changes are markedly less frequent, on average this speed penalty is largely compensated.

Similar results can already be obtained by a simpler argument, using the exponential approximation leading to Eq. (3) to calculate transition times, and taking into account that the time constants *τ*_{up} and *τ*_{down} both scale quadratically with the square *d*^{2} of the LC layer thickness, and that the maximum phase stroke *φ*_{m} scales linearly with *d*. In addition we included the experimental observation for our SLM that
$\frac{{\tau}_{\text{down}}}{{\tau}_{\text{up}}}\approx 3$.

As a possible drawback of increasing the liquid crystal layer thickness the cross-talk between neighboring pixels is negatively affected. As a consequence the diffracted light field for phase patterns with high spatial frequency content is distorted and the diffraction efficiency is reduced. It needs further investigations to quantify to which extent counter-measures, of which some require a phase stroke larger than 2*π*, can compensate for this effect.

## 4. Experiments

This section starts with a characterization of the basic properties of our experimental setup. As the main topic we present several experimental results that illustrate the improvements regarding higher switching speed and reduced intensity variations that can be achieved when we apply the overdrive and phase change reduction methods in our setup. We study typical situations that commonly appear in applications employing SLMs, such as holographic image projection, beam switching, and steering of multiple beams. Finally we present a closed-loop real-time holographic beam pointing stabilization, demonstrating a possible use case for dynamic aberration correction.

#### 4.1. SLM characterization

For our experimental realization we use a nematic, phase-only SLM, specifically model P512-1064 from *Boulder Nonlinear Systems*. It offers a resolution of 512 × 512 pixels, and the manufacturer recommends this model for the use at a wavelength of 1064 nm, where it offers a maximum phase stroke of about 3*π*. Thus, operated at a wavelength of 640 nm with a maximum phase shift of about 5.4*π*, this SLM represents a convenient system to demonstrate our approach. The measured time constant *τ*_{up} for the dynamic response, see Eq. (1), is about 3.6 ms for going from zero to maximum voltage, and about *τ*_{down} = 10 ms for maximum to zero voltage. For a 2*π* range corresponding to a phase shift from 2.9*π* to 4.9*π* (at the center of the SLM) the transition time with the overdrive method is 5 ms both for going from low to high voltages and vice versa, which represents an upper limit for the switching time with the overdrive method. For our setup we typically chose the extended range from 2*π* to 5*π* (valid for the center of the SLM). As described in section 3.4, an additional total margin of about *π* is sufficient to exploit most of the benefits of the phase change reduction method.

We also characterized the dynamic response of another SLM (model P512-532), which is designed for 532 nm, and which differs essentially only by its thinner liquid crystal layer. It offers a maximum phase stroke of 3.4*π* at 640 nm when used with the control electronics for the 1064 nm SLM, which applies an alternating voltage also to the cover glass electrode to effectively double the driving voltage and thereby increase the maximum phase stroke. In this configuration we measure response time constants of *τ*_{up} ≈ 0.5 ms and *τ*_{down} ≈ 3.6 ms. When used with the original control electronics the maximum phase stroke is reduced to 2.8*π* at 640 nm (or 3.4*π* at 532 nm), and the response time constant *τ*_{up} rises to *τ*_{up} ≈ 2.8 ms while *τ*_{down} remains unaltered.

Although the SLM designed for 532 nm shows significantly reduced time constants, with overdrive the optimum time for a 2*π* transition is only lowered to about 4 ms (for high to low voltages). Compared with this model the speed penalty of using a SLM designed for 1064 nm with a thicker liquid crystal layer is only 20 %, whereas we gain an increase in maximum phase stroke of 60 %. As discussed in section 3 and as we will show later, this additional margin allows us to use the phase change reduction algorithm, which leads to a decreased response time that over-compensates the speed penalty. We expect a further increased performance by using an SLM with a higher maximum driving voltage, such as a model from the HSP256 series made by *Boulder Nonlinear Systems*, which uses double the control voltage compared to the P512 series, since it allows to use a thinner liquid crystal layer.

We also carried out some procedures which are in principle independent of the approach put forward in this work, but which are usually required for good overall performance. The silicon substrate of the SLM, for instance, is not optically flat but shows a deviation of a few μm. To correct for this the manufacturer adds a planarization layer with a dielectric reflective coating. But this reflective coating is designed for a wavelength of 1064 nm and is mostly transparent at the wavelength of 640 nm we have chosen. Therefore we observe in our setup significant aberrations of the light, which is in our case reflected at the metallization layer. We interferometrically measured the surface variations and correct for them by adding a static pattern to the phase patterns we calculate. We also observe significant variations of the SLM properties across the surface, specifically the phase response *φ*(*U*) against the control voltage is spatially varying [16, 17], leading, e.g., to a maximum phase stroke of about 5.6*π* in the center and 4*π* at the borders. We characterized the static response *φ*(*U*) as well as the dynamic response *φ*(*t*) spatially resolved across the surface and take this into account for calculating the SLM control patterns. Furthermore, we only use a circular area with a diameter of 70% of the SLM size where the SLM properties are sufficiently homogenous. By all these means the aberrations introduced by the SLM are well corrected, allowing us to accurately realize the target phase patterns and to achieve diffraction limited conditions.

#### 4.2. Performance of control software

Beside the response time of the SLM the time needed to calculate and transfer the phase patterns limits the achievable rate at which changes to the light field can be realized. Table 1 gives typical values that we observe with our setup. The typical total time of about 1.8 ms needed to prepare all the data for one new phase pattern is significantly less than the 5 ms needed for the SLM to complete the transition to a new phase pattern. The total calculation time depends on the number of Gerchberg-Saxton iterations. We found that three iterations are sufficient for favorable settings such as asymmetric arrangements of spots (see section 4.5) with reusing old phase patterns as starting point (see section 3.3). Symmetric spot arrangements or stronger changes between subsequent spot configurations require more (typically 10–15) iterations.

#### 4.3. Measurement of dynamic SLM response

In Fig. 5 we compare the dynamic response of the SLM with and without the overdrive method. At a rate of about 85 Hz we changed the target phase to various different values within a range of 2*π* and interferometrically measured the response of the SLM. Without overdrive the response shows a distorted shape. The phase does not settle to the target value within the available time. In contrast, with the overdrive method the step-like target shape is well realized, with a fast, nearly linear phase change during the transition and the phase stays constant as soon as the target value is reached. The transition time depends on the step size, the smaller the shorter. Typical values are approximately 5 ms for a 2*π* step up, and 1.5 ms for a *π*/2 step. We have placed the used 2*π* range within the available phase range of the SLM such that the transition times for going low to high and reverse are similar, which gives the best overall performance, as discussed in sections 3.4 and 4.3.

#### 4.4. Fast holographic image projection

As a first application we demonstrate the improvement in switching speed for holographic image projection, see Fig. 6 and
Media 1. By using a (modified) Gerchberg-Saxton iterative algorithm we holographically encoded the logos of our research institutes into phase patterns, which we sequentially displayed on the SLM. For the reconstruction we illuminated the SLM with a plane wave and imaged the far-field diffraction pattern with a *f* = 200 mm lens onto a fast camera placed at the infinite conjugate plane. As shown in Fig. 6 the transition time is significantly reduced from roughly 10 ms to 1 ms if we apply the overdrive and phase change reduction methods.

A more quantitative characterization of the switching speed enhancement with phase change optimized overdrive is given in the next section.

#### 4.5. Spot switching

A common task for a SLM is to create several focal spots with dynamically adjustable (3D) positions and intensities. This is useful, e.g., for holographic optical trapping, microfabrication or image multiplexing.

As an example we consider a configuration of six spots that are equidistantly distributed along a line, where we sequentially switch off and back on again each of these spots, one at a time at a rate of about 60 Hz. The SLM patterns are calculated in real-time with a GPU based implementation of a modified Gerchberg-Saxton algorithm (GSW) [18], which provides high diffraction efficiency and uniformity of the spot intensities. As discussed in section 3 we maximized the similarity between subsequent SLM patterns by reusing the last result of the GSW-algorithm for one spot configuration as the starting condition for the next configuration, leading to a rather small mean phase difference between two patterns of about ${\u3008\mathrm{\Delta}{\phi}^{2}\u3009}^{\frac{1}{2}}=0.6\pi $ (before phase change reduction).

We record the intensities of all these spots with a fast camera at 5 kHz acquisition rate. For this we first subtracted a background image and then determined the spot intensities by summing the signal over smaller rectangular regions centered on each spot. The results for various settings are shown in Fig. 7. For comparison we show in Fig. 7(a) the response *without* overdrive and phase change reduction. For practical applications the transition time for the spot switching and the duration and amount of intensity variations of the other spots are of relevance. Especially for optically trapping a crucial issue is that during the switching of one spot the others are not affected, otherwise trapped particles may get lost. It typically takes about 10 ms (switching on), respectively 4.5 ms (switching off), until the intensities reach 90% of the steady state values. During the spot switching the intensity of the other spots can drop by more than 50 %. These values are vastly improved when we apply the combined overdrive and phase change reduction method (Fig. 7(b)). The 90 % transition times are reduced to about 1 ms (on) and 0.85 ms (off), the intensity variations are always less than 20 % and typically settle in about 3 ms. Due to experimental imperfections, such as inaccurate calibration or exceeding the maximum phase stroke of the SLM at the border, in some cases intensity deviations (typically less then 10 %) remain after the overdrive has completed, which then decay with a time constant of about 10 ms. For comparison we also show in Fig. 7(c) and (d) the results if we apply either only the overdrive or the phase change reduction method. Overdrive without the phase change reduction shows larger and longer prevailing intensity variations, the switching on time is nearly doubled to 1.8 ms.

In Fig. 7(f) we show the result if we combine the overdrive with the RPC [19] method, which was devised to reduce intensity variations (see also section 3). We show the data for a threshold value of *α* = 0.75 for the RPC method, which reduces the intensity fluctuations by a similar amount like the phase change reduction method. With these settings the phase change reduction method performs on a par with the RPC method, but it shows a better diffraction efficiency, i.e., less light is diffracted into unwanted ghost traps or pollutes the background.

The highly symmetric, equidistant spot configuration is in some sense a “worst case scenario”, because it is quite sensitive to experimental imperfections since unwanted ghost spots coincide with others spot positions, leading to unequal spot intensities and increased variations during the transition. If the spot positions are randomly displaced by a few spot diameters, even lower intensity variations are obtained, as shown in Fig. 8. Transition times for switching off are further reduced to 0.65 ms, intensity variations settle within about 2 ms, and we observe maximum variations of 30 % without phase change reduction and nearly negligible variations (less than 10 %) with phase change reduction, which is in good agreement with the expected behaviour from Eq. (5), see Fig. 4.

#### 4.6. Beam steering

In this section we present the performance for beam steering. For optical micro-manipulation such a situation arises very frequently, e.g., when dragging a trapped particle. For active trapping force calibration or micro-rheology one wants to quickly displace the trap, similar actions are required for active feedback (position clamping) to suppress position fluctuations of trapped particles.

Some results are shown in Fig. 9. Specifically we were moving the beam between two positions at a rate of 200 Hz. The behavior depends on the distance Δ*x* between these two positions: if it is significantly larger than the spot diameter *d _{s}*, then the phase patterns are essentially un-correlated, since displacing the spot position by one spot diameter

*d*corresponds to adding a linear 2

_{s}*π*phase ramp across the SLM. With overdrive and phase change reduction we observe 10 %/90 % transition times of 1.2 ms and small variations of the total intensity of at most 20 %, dying out after about 2.5 ms. The rectangular shape of the position change is well preserved. On the other hand, without these methods the position trace shows a triangular shape, not even reaching the desired target positions. The total intensity is reduced to about 50 %.

For a smaller distance the phase patterns are getting more similar, leading to even shorter transition times of 0.7 ms and invisible intensity variations with overdrive and phase change reduction. In this case it is possible to reduce the number of transient frames without affecting the result, reaching a toggling rate of 250 Hz. Without overdrive the position of the spot is only barely moving, in turn the intensity is getting larger and more stable compared to the large distance case.

At the cost of diffraction efficiency the difference between two subsequent patterns can be reduced by simply scaling down the phase variations of the SLM patterns. Under such conditions and using pre-calculated patterns we achieved update rates up to 400 Hz, while still maintaining the full distance for the beam position change. By reducing the phase pattern contrast to half the speed is doubled, and the diffraction efficiency is reduced to about 60 %.

#### 4.7. Real-time control loop

As a final example we want to demonstrate the benefits of improved response speed of a SLM for applications that employ a real-time feedback loop. Examples for such applications are, e.g., adaptive optics, where in a typical setting wavefront distortions, which are measured by a sensor, are fed back to a device that corrects for the aberrations. In astronomy adaptive optics has become a key element to correct for fluctuations caused by atmospheric turbulences, which severely affect the performance of optical telescopes [8, 12, 23]. In optical trapping applications feedback loops have been implemented that measure the position of trapped particles and act back on the properties of the optical trap [24–26]. In that way the effective trap stiffness is enhanced and position fluctuations, e.g., due to Brownian motion are diminished. In all cases the response time is a key parameter for obtaining good performance. From the results presented in the previous sections it should have become clear that the overdrive method offers a major improvement for applications employing a SLM. In this section we want to demonstrate that with phase change optimized overdrive our setup is indeed able to react to external changes within the order of 4 ms, which includes sensor data acquisition and analysis, calculation of a modified pattern, transferring to and displaying on the SLM, and the response of the SLM itself.

For demonstration purposes we implemented a real-time feedback on the position of one of two focused spots, which is measured by image analysis of camera images. The setup is very simple, it consists of the SLM, a lens, and a fast camera. The camera acquires images at a rate of up to 5 kHz and delivers them to the host computer by a GigE Vision (Ethernet based) interface. A Labview program processes the images and extracts the spot positions (for performance reasons with a custom extension written in C, such that image analysis only requires about 300 μs), which are then forwarded to the SLM control program. This program, which is implemented in the Python programming language, contains the feedback control and performs the calculation of the patterns (employing the GPU) and the interface to the SLM. This control loop runs at approximately 200 Hz, similar to the rate we achieve for beam steering as described in section 4.6.

For evaluation of the performance the first image analysis program also creates a stream of target spot positions. In this way we mimic an external disturbance of the spot position with a well defined temporal shape. The SLM control program tries to minimize the deviation of the actual and the target spot positions. Some results are shown in Fig. 10, which shows the spot position and the target position. With phase change optimization the actual position follows quite closely the target position, whereas without we observe much larger deviations.

In the remaining part of this section we discuss in more detail the limiting factors that determine the performance. For our setup with overdrive the response time of the SLM represents only a smaller part of the total latency of the feedback loop. This can be seen as the step-like behavior of the measured beam position. In this case a simple integrator with gain 1 for the feedback control logic already gives good results. Basically in every step of the control loop it changes the position of the beam to where it ought to be about 4 ms (total latency) earlier. Additionally we employ the fact that the beam position measurement runs at a higher rate than the SLM control loop to estimate the rate of change of the spot position deviation from the target position and use this to compensate for the lag until the actual beam position has changed. By this we are able to reduce the position error to zero at least for the moment when the beam position change takes effect in situations where the target position changes smoothly and predictably. Without overdrive the position error is much greater, we had to reduce the integrator gain to about 0.5 to assure the stability of the control loop due to the much slower response of the SLM.

In summary, with combined overdrive and phase change reduction the achievable spot transition time, given by the SLM properties is not anymore the limiting factor for the real-time feedback loop we studied, which is running at a rate of 200 Hz. Instead other latencies such as image acquisition and transfer, GPU calculations and data transfers limit the performance, which could be avoided using already available faster devices.

## 5. Conclusions

To summarize, we have presented a method to improve the dynamic response, i.e., shorten the transition time and reduce unwanted changes in intensity, of a commercially available pixelated phase-modulator (SLM). For this we implemented an overdrive method by controlling the duration during which the control voltage is set to the extreme values for each pixel individually. This exploits the high update speed of 2 kHz of the control electronics. This overdrive method is complemented by a method to reduce the phase difference between one pattern and the next. This phase change reduction further increases the switching speed and reduces the intensity distortions of the diffracted light during the transition, without affecting the diffraction efficiency.

We demonstrate the improvements that can be achieved with several typical tasks, such as image projection, beam switching and steering, yielding effective transition times of less than 1 ms and update rates up to 250 Hz. To perform the necessary calculations at these high update rates in real-time, we implemented an efficient software solution. It utilizes an inexpensive consumer GPU card and includes the calculation of optimized phase patterns suitable for beam steering or optical trapping with multiple beams or spots. Our implementation does not require any hardware modifications and can easily be applied to existing setups utilizing a similar SLM. This promises significant improvements for various applications where SLMs are used in a dynamic manner, such as optical trapping and micro-manipulation, adaptive optics, or aberration control. We envisage that with further improvements, such as software optimizations, use of the latest computing hardware and faster SLM models, it will be possible to achieve even higher speed.

## Acknowledgments

This work was supported by the
ERC Advanced Grant 247024 *catchIT*. We thank M. Thalhammer for advice on performing the numerical calculations in section 3.4.

## References and links

**1. **N. Savage, “Digital spatial light modulators,” Nat. Photonics **3**, 170–172 (2009). [CrossRef]

**2. **G. Lazarev, A. Hermerschmidt, S. Krüger, and S. Osten, “LCOS spatial light modulators: Trends and applications,” in *Optical Imaging and Metrology: Advanced Technologies*, W. Osten and N. Reingand, eds. (Wiley-VCH, 2012), chap. 1, pp. 1–30. [CrossRef]

**3. **G. D. Love, “Wave-front correction and production of Zernike modes with a liquid-crystal spatial light modulator,” Appl. Opt. **36**, 1517–1520 (1997). [CrossRef] [PubMed]

**4. **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]

**5. **A. Jesacher, A. Schwaighofer, S. Fürhapter, C. Maurer, S. Bernet, and M. Ritsch-Marte, “Wavefront correction of spatial light modulators using an optical vortex image,” Opt. Express **15**, 5801–5808 (2007). [CrossRef] [PubMed]

**6. **G. Love, J. Major, and A. Purvis, “Liquid-crystal prisms for tip-tilt adaptive optics,” Opt. Lett. **19**, 1170–1172 (1994). [CrossRef] [PubMed]

**7. **X. Xun, D. J. Cho, and R. W. Cohn, “Spiking voltages for faster switching of nematic liquid-crystal light modulators,” Appl. Opt. **45**, 3136–3143 (2006). [CrossRef] [PubMed]

**8. **H. Hu, L. Hu, Z. Peng, Q. Mu, X. Zhang, C. Liu, and L. Xuan, “Advanced single-frame overdriving for liquid-crystal spatial light modulators,” Opt. Lett. **37**, 3324–3326 (2012). [CrossRef]

**9. **S.-T. Wu and C.-S. Wu, “High-speed liquid-crystal modulators using transient nematic effect,” J. Appl. Phys. **65**, 527–532 (1989). [CrossRef]

**10. **P. Bos and K. Koehler, “The pi-cell: a fast liquid-crystal optical-switching device,” Mol. Cryst. Liq. Cryst. **113**, 329–339 (1984). [CrossRef]

**11. **H. K. Bucher, R. T. Klingbiel, and J. P. VanMeter, “Frequency-addressed liquid crystal field effect,” Appl. Phys. Lett. **25**, 186–188 (1974). [CrossRef]

**12. **D. Dayton, S. Browne, J. Gonglewski, and S. Restaino, “Characterization and control of a multielement dual-frequency liquid-crystal device for high-speed adaptive optical wave-front correction,” Appl. Opt. **40**, 2345–2355 (2001). [CrossRef]

**13. **A. K. Kirby and G. D. Love, “Fast, large and controllable phase modulation using dual frequency liquid crystals,” Opt. Express **12**, 1470–1475 (2004). [CrossRef] [PubMed]

**14. **Y.-H. Wu, Y.-H. Lin, Y.-Q. Lu, H. Ren, Y.-H. Fan, J. Wu, and S.-T. Wu, “Submillisecond response variable optical attenuator based on sheared polymer network liquid crystal,” Opt. Express **12**, 6382–6389 (2004). [CrossRef] [PubMed]

**15. **B. Wang, G. Zhang, A. Glushchenko, J. West, P. Bos, and P. McManamon, “Stressed liquid-crystal optical phased array for fast tip-tilt wavefront correction,” Appl. Opt. **44**, 7754–7759 (2005). [CrossRef] [PubMed]

**16. **J. Otón, P. Ambs, M. S. Millán, and E. Pérez-Cabré, “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 *Digital Holography and Three-Dimensional Imaging* (Optical Society of America, 2012), p. DSu2C.3.

**18. **R. D. Leonardo, F. Ianni, and G. Ruocco, “Computer generation of optimal holograms for optical trap arrays,” Opt. Express **15**, 1913–1922 (2007). [CrossRef] [PubMed]

**19. **M. Persson, D. Engström, A. Frank, J. Backsten, J. Bengtsson, and M. Goksör, “Minimizing intensity fluctuations in dynamic holographic optical tweezers by restricted phase change,” Opt. Express **18**, 11250–11263 (2010). [CrossRef] [PubMed]

**20. **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]

**21. **Z. Peng, Y. Liu, L. Yao, Z. Cao, Q. Mu, L. Hu, and L. Xuan, “Improvement of the switching frequency of a liquid-crystal spatial light modulator with optimal cell gap,” Opt. Lett. **36**, 3608–3610 (2011). [CrossRef] [PubMed]

**22. **S.-T. Wu, “Phase retardation dependent optical response time of parallel-aligned liquid crystals,” J. Appl. Phys. **60**, 1836–1838 (1986). [CrossRef]

**23. **Z. Cao, Q. Mu, L. Hu, D. Li, Z. Peng, Y. Liu, and L. Xuan, “Preliminary use of nematic liquid crystal adaptive optics with a 2.16-meter reflecting telescope,” Opt. Express **17**, 2530–2537 (2009). [CrossRef] [PubMed]

**24. **K. D. Wulff, D. G. Cole, and R. L. Clark, “Servo control of an optical trap,” Appl. Opt. **46**, 4923–4931 (2007). [CrossRef] [PubMed]

**25. **G. M. Gibson, J. Leach, S. Keen, A. J. Wright, and M. J. Padgett, “Measuring the accuracy of particleposition and force in optical tweezers using high-speed video microscopy,” Opt. Express **16**, 14561–14570 (2008). [CrossRef] [PubMed]

**26. **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]