## Abstract

Spatial light modulators (SLMs) based on liquid crystals are widely used for wavefront shaping. Their large number of pixels allows one to create complex wavefronts. The crosstalk between neighboring pixels, also known as fringing field effect, however, can lead to strong deviations. The realized wavefront may deviate significantly from the prediction based on the idealized assumption that the response across a pixel is uniform and independent of its neighbors. Detailed numerical simulations of the SLM response based on a full 3D *physical* model accurately match the measured response and properly model the pixel crosstalk. The full model is then used to validate a simplified model that enables much faster crosstalk evaluation and pattern optimization beyond standard performance. General conclusions on how to minimize crosstalk in liquid crystal on silicon (LCoS) SLM systems are derived, as well as a readily accessible estimation of the amount of fringing in a given SLM.

Published by The Optical Society under the terms of the Creative Commons Attribution 4.0 License. Further distribution of this work must maintain attribution to the author(s) and the published article's title, journal citation, and DOI.

## 1. Introduction

Spatial light modulators (SLMs) are versatile tools to dynamically control amplitude and phase of a light field [1, 2]. Devices based on liquid crystals (LC) are widely used, since they offer continuous modulation of the phase with high spatial resolution up to 10^{6} pixels, and thus are used, e.g., as programmable diffractive optical elements to create complex light patterns with high light efficiency, see [3] for an in-depth review.

The high resolution is important for a variety of applications that use phase patterns with strong variations on short spatial scale to fully exploit the available space-bandwidth product. An example is holographic optical trapping, where the SLM resolution limits the volume in which particles can be addressed; this limit also applies to pattern projection or laser manufacturing. Many applications of wavefront shaping, such as adaptive optics or optical metrology, where one has smooth but large wavefront modulations also require patterns with frequent large changes between neighboring pixels, resulting from phase wrapping to adapt to the limited phase stroke of typically 2*π*. Furthermore, a common approach to realize full complex modulation (i.e., amplitude and phase modulation) with a pure phase modulator is to add a high spatial frequency modulation, e.g., a “sawtooth” blazed grating, the modulation depth of which can be made spatially varying to indirectly implement amplitude modulations.

#### Pixel crosstalk in liquid crystal based spatial light modulators

Liquid crystal based SLMs show a response that deviates from the idealized presumption that each pixel has a uniform response across the pixel area that is independent of the state of its neighbors. In reality there is a crosstalk between neighboring pixels which leads to a non-ideal response, smoothing out the phase at the border between two pixels, with significant effects especially for patterns with strong variations [4–7].

This can be explained by the design of an LC-based SLM, see Fig. 1. The orientation of nematic liquid crystals is controlled by applying an electric field which affects the effective refractive index of the material and thereby the phase and polarization state of light passing through. The liquid crystal layer is contained between a cover glass with a transparent conductive coating and another substrate with patterned electrodes. For liquid crystal on silicon (LCoS) devices the substrate is made of silicon and contains all integrated electronics and wiring needed to individually control the voltage on each electrode.

Two mechanisms contribute to the pixel crosstalk, which is also known as *fringing field effect*: First, the electrical field pattern within the liquid crystal layer, which drives the optical response of the SLM, is smoothed out compared to the voltage at the electrodes. Second, the elastic interaction between the molecules of the LC layer hampers sudden changes of the orientation, also leading to a smoothing effect, as there is no separation between neighboring pixels. Due to these mechanisms SLM models with small pixels (for high resolution) or thick LC layer thickness (for high phase stroke or use at large wavelengths) suffer more from pixel crosstalk, rendering some SLM models hardly usable for applications requiring phase patterns with high spatial frequency content.

As a consequence the diffracted light field deviates quite severely from the expectations based on the idealized SLM response. The phase across a single pixel is commonly assumed to be constant. Due to the large number of pixels this is a very common assumption, because then for each pixel the phase can be represented by a single number, and the diffracted light in the far-field can be computed with a discrete Fourier transform (FFT).

As an example, for a binary grating with small period, instead of the ideal step-like pattern a more sinusoidal phase distribution is realized, with a significant effect on the diffraction efficiency. For an ideal binary phase grating with a phase difference of *π* all the light should be diffracted, with no light remaining in the zeroth order; yet in an experiment with a grating with a period of 2 pixels we instead observe that about 30 % of the light remains in the zeroth diffraction order, see Fig. 2. For a checkerboard pattern of period 2, which has the highest possible spatial frequency content, it may even reach 50 %. Large phase differences between neighboring pixels are more strongly affected, which applies in particular to the jumps of about 2*π* introduced by wrapping the phase in the range from 0 to 2*π*. For a binary grating with a 2*π* phase stroke one would expect no diffraction for an ideal SLM, i.e. 100 % of the incoming light stays in the zeroth diffraction order, but instead we observe only 20 %–30 %. Details of the experiment are given in Secs. 2.1 and 3.2.

#### Impact of pixel crosstalk on the diffraction of light by the SLM

For more complex SLM patterns, e.g., those used to create a regular array of spots, the pixel crosstalk typically leads not only to reduced diffraction efficiency, but also to strong variations of the individual spot intensities, which has detrimental effects e.g. for material processing applications.

A way to partly defeat the impact of the pixel crosstalk is to increase the phase stroke. For the example of a binary grating, as shown in Fig. 2, one could instead use settings where the diffraction into the desired order is maximized, or where the zero order is minimized (but unlike the ideal case these conditions cannot be fulfilled simultaneously). Several such approaches have been realized, for instance to *experimentally* optimize the settings for selected patterns such as binary or blazed gratings with various periods. A more general approach is to apply some (linear) high-pass filtering to the ideal pattern to compensate for the fringing effect [5,8,9].

For complex diffraction patterns often iterative algorithms are used that try to find a suitable phase pattern which creates the desired diffraction pattern in an optimal manner. Including a suitable model for the pixel crosstalk allows one to amend some of its detrimental consequences [6, 10, 11]. Persson *et al.* [10] showed that the uniformity of the intensity of spot arrays can be strongly increased, and Nakajima *et al.* [11] demonstrated reduction of diffraction into unwanted orders. A standard approach to model the crosstalk is to apply a linear low-pass filtering to the idealized pattern, which can be implemented efficiently as a convolution with a suitable kernel.

Nevertheless, the common approach of linear filtering to model the pixel crosstalk, which to some extent is preferable due to its simplicity and computational efficiency, has its limitations. The response of a liquid crystal material to an electric field is a strongly nonlinear process. In the presence of strong anchoring of the molecules at the boundaries, below a certain threshold of the electric field the orientation is unchanged, but changes quickly when this critical value is exceeded (Fréedericksz transition [12]), and saturates when all molecules are aligned at high field strengths. In practice, this nonlinear response of the phase shift versus control voltage is compensated by a linearization element in the control electronics of the SLM that adjusts the pixel voltage such that the phase shift (for a uniform pattern) is proportional to the control value given by the user. As a consequence of this nonlinearity, the strength and range of the fringing effect between pixels with target phase shifts *φ*_{1} and *φ*_{2} depends on both, *φ*_{1} and *φ*_{2}, in a nonlinear manner.

Furthermore, we observe a pronounced asymmetry in the diffraction efficiency between positive and negative diffraction orders for symmetric (binary) gratings, see Fig. 2. This behavior can be explained by the fact that the LC director configuration is not symmetric, although the applied voltage pattern is symmetric. Anchoring of the LC molecules at the surface, with some pre-tilt angle, essentially limits the orientation of the molecules to within a single quadrant. The horizontal component of the electric field at the electrodes borders increases the tilt angle on one side, but decreases it at the opposite side. Such an asymmetric response cannot be modeled by a convolution, not even with an asymmetric kernel.

As a consequence, the limitation of the linear modeling of the fringing effect leads to deviations between the expected and the actual response, which limits how accurately target light patterns can be realized. Therefore, some applications that are particularly sensitive to such errors (e.g. multi-photon laser writing [13]) correct such errors experimentally by measuring the realized light field and iteratively feeding it back to the pattern calculation. However, this is slow and inconvenient, and it reduces flexibility. Moreover, often the target pattern cannot be measured easily or is altogether inaccessible *in situ* (for example inside a tissue layer).

To obtain an accurate model for pixel crosstalk we resort to physically modeling the liquid crystal director configuration at high spatial resolution by numerical simulations, see Sec. 2 for a more detailed explanation. The model is able to accurately reproduce experimental results we obtained for basic patterns, see Sec. 3.

Since these numerical simulations are computationally expensive and only feasible for a small number of pixels (extending this to a complete SLM pattern, typical size 512 × 512 pixels, would be unpractical and prohibitively slow), we have developed a method to apply the results of the rigorous calculations in a much faster way to simulate the pixel crosstalk and to accurately predict the diffracted light field (amplitude and phase), as will be shown in Sec. 4. With this fast, but accurate model for the SLM-response we are able to use iterative methods to obtain optimized SLM patterns, which efficiently and accurately create the desired light field, as discussed in Sec. 5.

## 2. Physical modeling of a liquid crystal spatial light modulator

#### 2.1. Design of liquid crystal spatial light modulator

The typical structural design of reflective liquid crystal based spatial light modulators is shown in Fig. 1. A layer of nematic liquid crystal material is sandwiched between a cover glass and a dielectric mirror. The liquid crystal material consists of rod-like molecules, which due to their shape tend to align themselves. A coating with a special surface treatment (rubbing along a direction) forces the molecules at the interface to be oriented along the predominant direction of the surface, with the long axis nearly parallel to the surface, somewhat inclined by the so called pre-tilt angle. The predominant direction at the bottom and top interface is the same in our parallel aligned SLM, which enables pure phase modulation for light linearly polarized parallel to this direction.

The LC possess anisotropic properties such as optical birefringence and dielectric anisotropy. Accordingly, the molecules can be reoriented by applying an electric field, and the (effective) refractive index depends on the angle between the orientation of the long axis of the molecules and direction of the light propagation. This is used to modulate the phase of an incoming (plane) wave of light. The electric field controlling the orientation of the liquid crystal molecules is created between pixelated electrodes below the mirror and a transparent electrode (made of ITO) on the cover glass.

We use an LCoS spatial light modulator from Meadowlark Optics, model HSPDM512, which is designed for use at a light wavelength of 1064 nm. Our approach is also applicable to other models, we also tested our approach with an SLM from Hamamatsu, model X10468-07, which omits the dielectric mirror layer and also uses the metal electrodes to reflect the light for operation in a broad wavelength range.

#### 2.2. Modeling the director distribution of the liquid crystal

A key step to model the SLM response in terms of induced phase shift is to calculate the orientation of the liquid crystals, which is described by the director ** n**, a unit vector pointing into the (average) direction of the long molecule axis. For simulating the LC director distribution under the influence of an electric field

**, we closely follow the approach described in [12]. We seek a director configuration that minimizes the total free energy**

*E**f*contains contributions from the Frank-Oseen free energy density, described by the elastic constants

*K*, and the interaction with an electric field

_{ii}**inside the liquid crystal. The dielectric tensor**

*E**ε*of the LC material also depends on the director

**via**

*n**ε*

_{||}and

*ε*

_{⊥}denote the relative permeability for liquid crystals aligned parallel and perpendicular to the electric field direction. The electric field

**= −**

*E***∇Φ**itself is given as a solution of Gauss’s law

*ε*=

_{ij}*ε*

_{mirror}is purely diagonal. The minimal energy solution for the director distribution fulfills the Euler-Lagrange equations

*x*

_{1},

*x*

_{2},

*x*

_{3}denote the spatial coordinates in the

*x, y,*and

*z*directions, respectively, and ${n}_{i,j}=\frac{\partial {n}_{i}}{\partial {x}_{j}}$. With Eq. (2) the explicit expressions are

#### 2.3. Numerical solution of the director configuration

The above set of coupled nonlinear partial differential equations, Eqs. (4) and (5), is solved numerically for a small region, typically only covering 2 × 2 pixels, which is sufficient to model the response to simple patterns, such as phase gratings with a period of 2 pixels.

For this we discretize the director ** n** and the electric potential Φ on a regular grid with a discretization size of 30 × 30 × 10 and 30 × 30 × 16 per SLM-pixel. Derivatives are approximated by central finite differences, where possible. In the lateral direction we employ periodic boundary conditions, whereas at the top and bottom the values for Φ are constrained by the given voltages at the cover glass electrode (Φ = 0) and the pixelated control electrodes. The director

**at the interfaces is set to $\mathbf{n}=\left(\mathrm{cos}\left({\vartheta}_{\mathrm{p}}\right),0,\mathrm{sin}\left({\vartheta}_{\mathrm{p}}\right)\right)$, i.e., essentially pointing into the**

*n**x*-direction and slightly inclined by the pre-tilt angle

*ϑ*

_{p}≈ 10°.

To find solution we iteratively update **Φ** and ** n** by

*α*= 0.005 Δ

*x*

_{1}Δ

*x*

_{2}Δ

*x*

_{3}. After each update we renormalize

**to unit length, since the length is not conserved by this update scheme. As starting value for the iteration we choose for the electric potential Φ a linear ramp along**

*n**z*between the boundary values, and for

**a configuration with a sinusoidal tilt with a single maximum in the center of about 60°. This roughly corresponds to the solution for a uniform control voltage of moderate strength. Typically we need to perform several thousand steps until the maximum change between subsequent iterations drops below 10**

*n*^{−5}, where we stop the iteration. For patterns that vary only along the

*x*-direction the solution fulfills the same symmetry, and the computational effort can be strongly reduced by using $\frac{\partial \mathbf{n}}{\partial {x}_{2}}=0$ and

*n*

_{2}= 0 and performing the calculations only for a single 2D slice in the (

*x, z*)-plane.

#### 2.4. Calculation of the phase shift resulting from the director configuration

For (nearly) normal incidence of the light the induced accumulated phase shift can be calculated from the tilt angle *θ* against the horizontal direction of the director configuration, the refractive indices *n*_{e} and *n*_{e} of the liquid crystal material, and LC layer thickness *d*_{LC} by evaluating

This assumes that the director orientation is confined in the (*x, z*) plane, and that the light is linearly polarized parallel to the predominant LC orientation.

In a more generally applicable approach we also use the Berreman 4 × 4 matrix method [12] to calculate the phase shift, which also provides information about changes of the polarization state. However, we found that such polarization conversion effects are minor and can be neglected in most cases.

#### 2.5. Determination of the model parameters

To perform the simulations the values for numerous parameters describing the material properties (elastic coefficients, dielectric and optical anisotropies) and design parameters of the SLM (layer thicknesses) are needed. Unfortunately the manufacturers do not publish these values.

Instead we obtained values for the unknown parameters by matching simulations with experimental data, starting from an initial guess taken from published data in the literature for the liquid crystal material 5CB [14]. For this we used two types of measurements: First, we measured the induced phase shift against the applied control voltage for a uniform pattern, and second for binary gratings (horizontal and vertical) with periods of 2 and 4 we measured the diffraction efficiencies (up to diffraction order 2) against the phase difference *φ*_{1} − *φ*_{2}, for several values of *φ*_{1} covering the available range, where *φ*_{1} and *φ*_{2} denotes the low and high phase value of the binary grating. We have been able to achieve very good agreement between experimental observations and numerical results for phase shift against control voltage, as will be discussed later in more detail (cf. Fig. 4). It will also be shown (cf. Fig. 5) that the diffraction efficiency of simple test patterns is correctly predicted, describing well the asymmetry of diffraction into positive and negative orders and the different behavior for small and large *φ*_{1}. The parameters used for the simulations are given in Table 2.5. But one should take note that the *individual* values cannot be determined unambiguously.

The simulations showed that by far the most important parameters dominating the pixel crosstalk effect, and hence the diffraction efficiency as a function of phase difference, are the thicknesses of the liquid crystal and the mirror layers. The birefringence of the LC material has a smaller impact on the amount of asymmetry between positive and negative diffraction orders, presumably in a more indirect way, as a higher birefringence allows one to choose a thinner layer to achieve the same phase shift. Our analysis of the data provides an indication that an LC material with high birefringence has been used by the manufacturer.

We found that modifying the LC material parameters *K*_{11} and *K*_{33} has surprisingly little effect on how the diffraction efficiency depends on the phase difference. In this presentation changing, e.g., the elastic coefficients by a factor of 2 hardly changes the outcome, although the phase shift versus control voltage is drastically influenced. Most noticeable is the impact of the *K*_{22} coefficient for gratings in the symmetric direction, since *K*_{22} describes the strength of the elastic energy for a twist deformation mode. For a uniform pattern no twist deformation mode is present, but for transitions along the y directions the twist mode is responsible for the contribution to crosstalk due to the elastic interaction.

## 3. Comparison of model calculations and measurements

#### 3.1. Uniform pattern

A basic measurement is to characterize the phase shift resulting from a uniform voltage pattern. To perform such a measurement we employ an interferometric setup as shown in Fig. 3. The mirror in the reference arm is tilted and we record off-axis interferograms for a series of uniform patterns with different control voltage values.

The interferograms are analyzed in a standard approach by first normalizing them by the product of the amplitudes of individual arms, followed by a Hilbert transform to recover the complex analytic signal and from this the phase shift. Since the phase stroke exceeds 2*π*, a phase unwrapping procedure is applied afterwards. Localized outliers due to small distortions (dust particles) are removed by median filtering, which also reduces the effect of noise. This procedure provides the spatially resolved phase response of the SLM.

We observe that the phase response is subject to considerable spatial variations, e.g., in the center the maximum phase stroke reaches about 3*π*, whereas towards the borders it is reduced to about 2*π* in a smooth transition. We attribute this to a varying thickness of the planarization layer added beneath the mirror, which corrects for the non-flat SLM surface, and the electronic driving scheme, which leads to a reduced electric field strength at the borders.

To store the needed control voltage to realize a target phase shift we calculate several “regional” look-up tables, each valid for a subregion of a 30 × 30 grid covering the SLM. The values of neighboring regions are combined by linear interpolation. With this *spatially dependent* calibration we are able to accurately realize a given phase shift across the full area of the SLM. Nevertheless, for our measurements we typically used only a smaller area in the center of the SLM to make full use of the larger phase stroke at the center.

Figure 4 plots the measured phase against the control voltage together with model calculations for the center region of the SLM. The experimental data are well matched by the simulations. A more closer look reveals some small undulatory deviations, which we attribute to weak reflections already at the cover glass/LC layer interface that interfere with the reflected light. This is supported by the observation that the maxima/minima of the deviation appear at a regular spacing of *π* phase shift.

#### 3.2. Phase gratings

Pixel crosstalk has the strongest impact on patterns with large differences between neighboring pixels. Simple patterns with pronounced crosstalk are binary gratings with a period of 2 pixels. Directly measuring the crosstalk between neighboring pixels in a quantitative manner is difficult due to the small spatial extent of a few microns, instead we measure the intensities of the individual diffraction orders of the phase gratings, as already shown in Fig. 2. The setup for this kind of measurements is rather simple, but one needs to be careful to get accurate results, as, e.g., an etalon effect at the protective glass window of the sensor (which has no suitable anti-reflective coating) can affect the observed intensity. We found that a robust way to measure the diffraction efficiency is to select a given order by a pinhole, to place a ground glass plate acting as a diffuser in front of the sensor, and to measure the total power of the light scattered across a larger area. One can also conveniently measure the spatially dependent diffraction efficiency by omitting the ground glass and reimaging the SLM on the camera after selecting a diffraction order. For our system we did not see significant spatial variations of the diffraction efficiency.

A comparison of the diffraction efficiency measurements with model calculations is shown in Fig. 5 for period 2 phase gratings oriented along the *x* and y direction. The model is able to accurately replicate the experimental data.

In particular, the asymmetry between positive and negative diffraction orders arising when grating vector and predominant director orientation are parallel is correctly described. Looking at the detailed simulation results provides more insight, see Fig. 6. The pre-tilt angle of the liquid crystal at the interfaces breaks the symmetry in this configuration. At the pixel electrode borders the electric field exhibits a significant component along the horizontal *x*-direction, which either tends to increase (left side) or lower (right side) the director angle in the transition zone. As a result, the phase shift transition between adjacent pixels is either steepened or flattened, depending on the sign of the change in control voltage.

When applying a grating in the orthogonal direction, positive and negative diffraction orders show the same strength, as the configuration is mirror symmetric. However, the horizontal component of the fringing electric field at the pixel borders leads to an additional twist of the LC director around the *z*-axis, and the director is not anymore constrained to the *xz*-plane. This has the effect that in the transition zone the polarization of the light is affected. Usually light with linear polarization parallel to the alignment direction is used, but for such patterns some light in the other, orthogonal polarization state is detectable after reflection at the SLM. With up to 8 % of the incident light this effect can grow to significant strength for period 2 gratings, but for smoother patterns the change of the polarization is often negligibly small.

## 4. Simplified approach for fast evaluation of the pixel crosstalk

As shown before, the full 3D simulations provide an accurate way to model the SLM response. However, they are computationally demanding, it takes us about 1 minute per pixel to find a solution numerically with the approach described in Sec. 2. Although there is ample room for optimization, extending this approach to model the response over the full SLM area of (typically) 512 × 512 pixels appears impracticable.

We therefore developed a simpler and much faster way to model the pixel crosstalk. We pre-calculate the pixel crosstalk for many classes of simple situations, namely for period 2 gratings, and use this information to estimate the response for arbitrary patterns.

This approach is implicitly based on several simplifying assumptions. We observed that the crosstalk has a rather short range, smaller than a single SLM-pixel. Most of the effect takes place close to the edge lines connecting two pixels, where the phase mainly varies only along a single direction. This can be approximated by the response to gratings aligned at the *x* or y direction, which can be more efficiently simulated by models with reduced dimensionality, and performing full 3D model calculations is not necessary.

Previous work [8, 10, 15] demonstrated experimentally that the 1D SLM response can be approximately described by a convolution with a (properly scaled) kernel of the shape *e*^{−|}^{x}^{|}. We observed that the transition shape of the model calculations can clearly be better matched by a parameterized kernel shape

*x*

_{0}, raising the exponent to the power of

*n*, and choosing different scaling factors

*ξ*

_{−}and

*ξ*

_{+}to the left and right of the peak. The transition between two areas with uniform target phase

*φ*

_{0}for

*x <*0 and

*φ*

_{1}for

*x >*0 is then given by

*φ*

_{0}+ (

*φ*

_{1}−

*φ*

_{0})

*K*(

*x*) with the integrated kernel

In our approach the parameters *x*_{0}, *ξ*_{−}, *ξ*_{+} and *n* depend on the target phase values *φ*_{0} and *φ*_{1} of the neighboring pixels and the direction (transition along *x* or y axis). The parameter values are obtained from the simulations for period 2 gratings, which contains information about both the up-transition *K*_{up} from *φ*_{0} to *φ*_{1} and *K*_{down} from *φ*_{1} down to *φ*_{0}. To extract the information about the single up- and down-transitions we fit the simulation results by the model

We pre-calculate the transition parameters for both grating directions and for several (33 × 33) combinations of values for the low and high levels *φ*_{0} and *φ*_{1}. Typical values for the parameters are *x*_{0} ≈ −1 µm *…* 0 µm, *ξ*_{±} ≈ 2 µm *…* 4 µm, and *n* ≈ 1.3. We use this information about the transition in a single direction to estimate the pixel crosstalk for arbitrary patterns. For this we roughly follow the approach that would be valid if modeled as a linear convolution, and assume that the convolution kernel is separable, i.e., the 2D kernel can be written as a product of 1D kernels *k*(*x, y*) = *k _{x}*(

*x*)

*k*(

_{y}*y*).

Let us consider being close to the (upper right) corner of a pixel with value *φ*_{00}, and just consider the transition to the closest neighbors with values, *φ*_{10}, *φ*_{01}, and *φ*_{11}. Due to the short range of the crosstalk the situation hardly changes when we extend the pixel size to infinity, where the ideal phase distribution can be described by step functions

*x*) = 1 if

*x*≥ 0 and Θ (

*x*) = 0 if

*x <*0. After convolving this with a separable 2D kernel

*k*(

*x, y*) =

*k*(

_{x}*x*)

*k*(

_{y}*y*), where the 1D kernels are as described by Eq. (9), the phase with crosstalk is approximately described by

The contributions from all other neighboring pixels are dealt with correspondingly.

Now, to model the nonlinear response of the SLM on the pixel values, the integrated 1D transition functions *K _{ij}*

_{,}

*are made to depend on the values of*

_{kl}*all 4*pixels. To construct, e.g., the 1D transition

*K*

_{00,10}along the

*x*direction we take each tabulated transition parameter

*p*

_{00,10}for

*φ*

_{00}to

*φ*

_{10}and

*p*

_{01,11}for

*φ*

_{01}to

*φ*

_{11}and combine it linearly, i.e., we use $\tilde{p}=\alpha {p}_{00,10}+\left(1-\alpha \right){p}_{01,11}$ where the weight

*α*is varied along the y-direction according to the expression

*d*denotes the pixel size. This gives a smooth change of the transition parameters within a range of 1/3 of the pixel size from the border to ensure continuity of the estimated phase response. The range of 1/3 of a pixel has been chosen empirically such that the results of the approximate model closely match the full model calculations.

#### Assessment of the performance of the approximate but faster model

The approximate model can be computed many orders of magnitude faster than the underlying 3D simulations. We implemented it to run on a GPU, where it takes about 20 ms to compute the fast crosstalk model for a full SLM pattern of size 512 × 512 on a 16 × 16 larger grid using a GPU card AMD Radeon R9 290.

It is designed such that for gratings or patterns that vary only along the *x* or y direction it accurately matches the underlying, more stringent simulations. To assess the validity for more general patterns we compare the outcome of the fast and the full model calculations. As an example we choose a checkerboard pattern of pixel period 2, as this possesses the largest possible spatial frequency content and is therefore most sensitive to pixel crosstalk. In Fig. 8 we compare the results of both models, showing the predictions in the spatial domain as well as for the diffraction efficiencies. The fast model gives a good approximation to the full 3D simulations, although it only uses information from 2D simulations. The largest differences occur close to the pixel corners, but due to the small area this hardly affects the prediction for the diffraction efficiencies. Both models agree well with experimental measurements of the diffraction efficiencies.

## 5. Compensation of pixel crosstalk

Having available an accurate and fast model to predict the effects the pixel crosstalk allows us to compute SLM patterns that create a light field as close as possible to a target intensity distribution. Thus the error introduced by assuming an ideal behavior of the SLM instead of the real response with pixel crosstalk can be eliminated to a large extent.

The task at hand can be expressed as an optimization problem. Commonly one wants to minimize the total (weighted) sum of the squared difference *R* between the target intensity *I*_{0} and the actual intensity *I* at some distance from the SLM, often combined with custom weight *w*,

The actual intensity *I* can be predicted from the SLM control pattern by taking into account phase modulation by the SLM including pixel crosstalk, and light propagation to the final plane, where the intensity is detected. More formal, this is expressed as

*φ*denotes the idealized SLM control phase, $\widehat{\phi}$ the actual SLM phase with crosstalk,

*f*the actual complex light field at SLM,

*F*the light field at detector plane,

*I*the light intensity at detector, and

*R*the cost function. For reasons of simplicity we assume that the detector is placed at a Fourier plane of the SLM, i.e., light propagation can be represented by a Fourier transform. We only consider the intensity in the Fourier plane contained within the Nyquist range.

A simpler approach is to choose a cost function that minimizes the difference of the real phase pattern including pixel crosstalk to the ideal, step like pattern, i.e., to minimize $R={\displaystyle \sum {\left(\widehat{\phi}-{\phi}_{0}\right)}^{2}}$. The ideal pattern *φ*_{0} can be obtained from an optimized pattern, e.g. calculated by a conventional Gerchberg-Saxton algorithm by upsampling (tiling) it to the denser grid required for representing the pattern including pixel crosstalk. This avoids the computational costs for calculating the far-field diffraction efficiency and its gradient. Gradient based iterative minimization routines such as steepest descent are commonly used to find optimal patterns. In a broader sense, this also includes the popular Gerchberg-Saxton algorithm, which can be seen as a special variant of a gradient descent method [16].

Previous work [10] used a modified variant of the Gerchberg-Saxton algorithm to calculate optimized phase patterns, where they introduced a model for the pixel crosstalk in the forward path. By this they were able to strongly improve the uniformity of regular spot arrays. In their approach the backward path, consisting mainly of backpropagation of the field at the detector (modified to fulfill the target intensity constraint at the detector plane) is unchanged. As a final step of the backward path, the phase of the back propagated light field at the SLM is taken as a new *control* phase for the SLM. As such, the control phase is constrained within 2*π*. However, to compensate for the crosstalk in an optimal manner, it is required that the control phase utilizes an extended range to counteract the spatial lowpass filter effect of pixel crosstalk. As a result, this modified Gerchberg-Saxton algorithm generates SLM patterns with somewhat reduced diffraction efficiency.

Our approach relies on the more general approach of the gradient based optimization such as steepest descent. A key element is the calculation of the gradient of the cost function *R* with respect to the control phase at each SLM pixel *φ _{nm}*. Via the rules for algorithmic differentiation [17] this is rather straightforwardly accomplished by gradient backpropagation. For the fast crosstalk model, Eq. (14), the transition functions

*K*as given by Eq. (10) only weakly depend on the phase values, and by only taking into account the dominant dependence on the control phase values the gradient with respect to a single pixel at position

*φ*

_{00}as in Sec. 4 can be efficiently calculated as

Here, the sum is taken over all subpixel grid positions of this SLM-pixel, and ${\overline{\widehat{\phi}}}_{ij}\left({x}_{k},{y}_{l}\right)$ denotes the value of the backpropagated gradient $\overline{\widehat{\phi}}=\frac{\partial R}{\partial \widehat{\phi}}=\mathcal{J}\left({\mathcal{F}}^{-1}\left(4F\left({\left|F\right|}^{2}-{I}_{0}\right)\right){f}^{*}\right)$ at the (subpixel) position (*x _{k},* y

*) relative to the origin of the pixel with index (*

_{l}*i, j*). Here $\mathcal{J}\left(z\right)$ denotes the imaginary part of

*z*. Similar to Eq. (14), corresponding terms, which have been left out to improve clarity, need to be added to take into account crosstalk with all 8 neighboring pixels.

To find an optimum pattern that minimizes the cost function *R*, a straightforward algorithm is gradient descent, i.e., iteratively update the phase pattern using the gradient of the cost function, ${\phi}^{\left(k+1\right)}={\phi}^{\left(k\right)}-\alpha \overline{\phi}$ with a properly chosen step-size *α*, and initial guess *φ*^{(0)}. Instead of the simple gradient descent algorithm, a more refined gradient-based optimization algorithm such as conjugate gradient, BFGS and its variant L-BFGS, or Nesterov accelerated gradient descent [18, 19] can significantly improve convergence speed. We prefer the last one due to its decent performance and its simplicity.

With this optimization approach it is also possible to take into account additional constraints by adding a suitable penalty term to the cost function, e.g., $\sum {\left(\phi -{\phi}_{0}\right)}^{2}$ to coerce the range of phase values to a narrower range close to *φ*_{0}. This is useful to allow for the fact that an SLM only provides a limited range of phase values.

#### 5.1. Examples of pixel crosstalk compensation for simple patterns

We demonstrate the achievable performance in pixel crosstalk compensation for simple patterns. One of the simplest phase patterns is a blazed grating, where the phase shift repeatedly ramps up linearly from 0 to 2*π*. Ideally, all of the incoming light is diverted into a different direction, the first order diffraction beam. Pixelation of the SLM and pixel crosstalk lead to deviations from this ideal behavior: some light remains in the direction of the incoming beam (zero order diffraction beam), some light is diffraction into other orders.

For short periods the adverse effects are more pronounced. As an extreme case, for a period of 2 pixels a pixelated blazed grating actually becomes a binary (Ronchi) grating, and the observations shown in Fig. 2 for such a binary grating apply. Inevitably, the pixelation leads to roughly equal diffraction into order +1 and −1, with about 40 % of the light in each of these orders. Pixel crosstalk further reduces diffraction efficiency. As a counter measure, one can increase the phase difference between the two levels of a period 2 grating. Depending on the value of the phase difference, the amount of the light in order 0 is minimized, or the diffraction efficiency into the orders +1 or −1 is maximized, but it is not possible to fulfill all these conditions at the same time. Consequently, depending on the requirements of an application, it is necessary to choose a cost function with weights, Eq. (16), that properly reflects the specific needs.

In real applications such high spatial frequency patterns should be avoided, and instead gratings with larger periods are typically used. In the following we study blazed gratings with a period of 5 pixels in more detail. In particular, we use a grating aligned such that it diffracts into the weak asymmetric direction, see Fig. 2, where the effects of crosstalk are most prominent.

The optimization algorithm finds a trade-off between all the contributions to the cost function *R*, Eq. (16). The outcome can be influenced by choosing the target values for the diffraction orders and the corresponding weights. For the examples we have chosen a target value for the first order that is at 82 % of the ideally achievable value for a pixelated blazed grating, and 0 as target for the unwanted other orders. In the experiments we observe that reflections at the cover glass of the SLM add a contribution to the zeroth order that cannot be controlled by the SLM pattern. Therefore, for the zero-order diffraction we give weight 0, and equal weights everywhere else.

In the ideal case without pixel crosstalk we would expect a diffraction efficiency of about 86 % into the first order. With pixel crosstalk, but without compensation, we expect and observe a reduced diffraction efficiency in the first order. Small but non-negligible amounts of light arise in the other orders, which in the ideal case are empty. By performing the optimization procedure, this additional spots can be significantly suppressed, see Fig. 9, to a level of about 1 % and less. The experimental results nicely match the expected performance, except for the diffraction into the zeroth order, where additional reflections occur, as stated above. The corresponding phase pattern of the SLM pattern are shown in Fig. 10. Achieving such a level of suppression of diffraction into unwanted orders requires a well calibrated SLM, see Sec. 3.1.

The simpler approach of minimizing the difference of the phase to the pixelated blazed grating is remarkably successful at reducing the intensity in the unwanted orders, except for the second order, where we observe a significant increase, affecting the efficiency into the desired first order. As a target phase pattern we used the blazed grating, pixelated on both a low and a high resolution grid. We found that both targets give very similar results, however, for the high resolution grid one needs to take care that the large phase jumps due to phase wrapping are aligned with a pixel border.

### Required phase range for crosstalk compensation

To minimize the impact of pixel crosstalk in general a phase stroke range larger than 2*π* is needed. For example, for the optimized blazed grating shown in Fig. 10 we need to increase the phase stroke by up to 30 % to minimize the effects of crosstalk. Figure 11 depicts the phase shift needed to maximize the zeroth or the first orders for a (period 2) checkerboard pattern in dependence of the total SLM thickness *d*_{LC} + *d*_{mirror} (*d*_{mirror}/*d*_{LC} = 0.5), where the intensities of the maxima are encoded in the color.

We propose to use the phase difference needed to *actually* maximize the zero order diffraction spot for a binary grating with a period of 2 pixels (which would occur at 2*π* phase difference in an ideal SLM) as an accessible and predictive measure for the amount of crosstalk in the SLM. This value roughly describes the phase stroke required to realize a general phase pattern with compensation for the crosstalk. If this exceeds the maximum phase stroke offered by a given SLM, one can alternatively measure the phase difference for the first minimum of the zero order diffraction efficiency (ideally at *π* phase shift).

SLMs with thick liquid crystal layers that provide maximum phase shifts (significantly) larger than 2*π* enable powerful methods such as speeding up the SLM response [20], color hologram projection [21], or encoding of several holograms with separate readout via wavelength [22] or tilt angle [23]. But, thick LC layers show increased crosstalk, which reduces the effective resolution of the SLM. As a general rule, an SLM that provides about 3*π* phase stroke leaves enough headroom to minimize the effect of crosstalk for general patterns, while for a thicker SLM the diffraction efficiency would quickly vanish, even with compensation.

## Conclusions

To conclude, we have shown that the pixel crosstalk in LCoS spatial light modulators induces significant effects that cannot be included in a simple way, e.g., by linear low-pass filtering. This holds particularly for the asymmetry in the diffraction into positive and negative orders for symmetric patterns. Our *physical* 3D model is able to accurately match the experimental results, and it provides deeper insights into the behavior of the SLM at the sub-pixel level, which is difficult to observe directly.

We found that—fortunately—complete knowledge of the design and the material parameters of the SLM at hand is not needed. The most important parameter is the thickness of the LC layer, which typically differs in different models depending on the specific design wavelength. Crosstalk is also influenced by the thickness of the dielectric mirror and planarization layer of the SLM, which is (deliberately) not uniform across the SLM.

Solving the full model is computationally expensive and therefore not practical to predict the response for arbitrary patterns utilizing the full SLM display resolution. Thus we have developed an approximate *simplified model*, which is many orders of magnitude faster to evaluate. The simplified model, which uses tables of (pre-calculated) parameter values, leads to satisfactory predictions, as could be assessed by comparison with the full model. It is feasible to use a set of such lookup tables to include, e.g., variations of the LC layer thickness across the SLM surface.

In LCoS-SLMs a planarization layer is applied to obtain a flat mirror surface and to minimize wavefront aberrations. Our findings indicate that this layer should be kept as thin as possible to keep the pixel crosstalk low; aberrations could alternatively be compensated by incorporating them into the phase pattern displayed on the SLM. We also observed that the strong in-plane component of the electric field for SLMs without mirror layer can lead to strong crosstalk, especially for thick LC layers and when the control voltages are low.

As a general rule, patterns with low control voltages show stronger crosstalk. This can easily be avoided by adding a constant value to the pattern to shift the phase range in use to the upper limit. Additionally, we recommend to apply phase wrapping in such a manner that the phase range actually covered by the pattern lies close to the (spatially variable) maximum value. Moreover, pixel cross talk is most prominent for phase patterns with high spatial frequency content. In this sense, on-axis configurations of digital holograms are more favorable than off-axis configurations.

Pixel crosstalk limits the extent to which the pixel size can be reduced in order to increase the resolution of LCoS SLMs while keeping production costs low. Much is to be gained by taking crosstalk into account: With a well calibrated SLM implementing crosstalk compensation the often annoying zero order spot can be reduced to an often insignificant level of a few percent. Applications which involve the generation of 3D patterned light structures with LC-SLMs, e.g., for optogenetic stimulation [24], for multi-spot trapping [25], for cold atom assembly [26], or for direct laser writing [27], are typically affected by adverse fringing field effects, and thus can greatly profit from the presented approach.

## Funding

Austrian Science Fund (FWF) (P 29936, F 6806-N36); Tyrolean Science Fund (TWF) (UNI-0404/1689).

## References

**1. **C. Maurer, A. Jesacher, S. Bernet, and M. Ritsch-Marte, “What spatial light modulators can do for optical microscopy,” Laser Photonics Rev. **5**, 81–101 (2010). [CrossRef]

**2. **A. Jesacher and M. Ritsch-Marte, “Synthetic holography in microscopy: opportunities arising from advanced wavefront shaping,” Contemp. Phys. **57**, 46–59 (2016). [CrossRef]

**3. **G. Lazarev, P.-J. Chen, J. Strauss, N. Fontaine, and A. Forbes, “Beyond the display: phase-only liquid crystal on Silicon devices and their applications in photonics [Invited],” Opt. Express **27**, 16206–16249 (2019). [CrossRef] [PubMed]

**4. **X. Wang, B. Wang, P. J. Bos, J. E. Anderson, J. J. Pouch, and F. A. Miranda, “Finite-difference time-domain simulation of a liquid-crystal optical phased array,” J. Opt. Soc. Am. A **22**, 346–354 (2005). [CrossRef]

**5. **E. Ronzitti, M. Guillon, V. d. Sars, and V. Emiliani, “LCoS nematic SLM characterization and modeling for diffraction efficiency optimization, zero and ghost orders suppression,” Opt. Express **20**, 17843–17855 (2012). [CrossRef] [PubMed]

**6. **C. Lingel, T. Haist, and W. Osten, “Optimizing the diffraction efficiency of SLM-based holography with respect to the fringing field effect,” Appl. Opt. **52**, 6877–6883 (2013). [CrossRef] [PubMed]

**7. **T. Lu, M. Pivnenko, B. Robertson, and D. Chu, “Pixel-level fringing-effect model to describe the phase profile and diffraction efficiency of a liquid crystal on silicon device,” Appl. Opt. **54**, 5903–5910 (2015). [CrossRef] [PubMed]

**8. **B. Apter, U. Efron, and E. Bahat-Treidel, “On the fringing-field effect in liquid-crystal beam-steering devices,” Appl. Opt. **43**, 11–19 (2004). [CrossRef] [PubMed]

**9. **E. Hällstig, J. Stigwall, T. Martin, L. Sjöqvist, and M. Lindgren, “Fringing fields in a liquid crystal spatial light modulator for beam steering,” J. Mod. Opt. **51**, 1233–1247 (2004). [CrossRef]

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

**11. **M. Nakajima, N. Nemoto, K. Yamaguchi, H. Kudo, J. Yamaguchi, K. Suzuki, and T. Hashimoto, “Analysis and suppression of high-order diffractions in liquid-crystal-based spatial light modulator for photonic switch application,” Jpn. J. Appl. Phys. **56**, 09NC01 (2017). [CrossRef]

**12. **S.-T. Wu and D.-K. Yang, *Fundamentals of Liquid Crystal Devices* (Wiley, 2006).

**13. **A. Jesacher, G. D. Marshall, T. Wilson, and M. J. Booth, “Adaptive optics for direct laser writing with plasma emission aberration sensing,” Opt. Express **18**, 656–661 (2010). [CrossRef] [PubMed]

**14. **J. Chen, W. Cranton, and M. Fihn, eds., *Handbook of visual display technology*, Springer references (Springer, 2012). [CrossRef]

**15. **U. Efron, B. Apter, and E. Bahat-Treidel, “Fringing-field effect in liquid-crystal beam-steering devices: an approximate analytical model,” J. Opt. Soc. Am. A **21**, 1996–2008 (2004). [CrossRef]

**16. **J. R. Fienup, “Phase retrieval algorithms: a comparison,” Appl. Opt. **21**, 2758–2769 (1982). [CrossRef] [PubMed]

**17. **A. S. Jurling and J. R. Fienup, “Applications of algorithmic differentiation to phase retrieval algorithms,” J. Opt. Soc. Am. A **31**, 1348–1359 (2014). [CrossRef]

**18. **J. Nocedal and S. J. Wright, *Numerical optimization*, Springer series in operations research (Springer, 1999).

**19. **Y. Nesterov, *Introductory Lectures on Convex Optimization, vol. 87 of Applied Optimization* (Springer, 2004). [CrossRef]

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

**21. **A. Jesacher, S. Bernet, and M. Ritsch-Marte, “Colour hologram projection with an SLM by exploiting its full phase modulation range,” Opt. Express **22**, 20530–20541 (2014). [CrossRef] [PubMed]

**22. **W. Harm, A. Jesacher, G. Thalhammer, S. Bernet, and M. Ritsch-Marte, “How to use a phase-only spatial light modulator as a color display,” Opt. Lett. **40**, 581–584 (2015). [CrossRef] [PubMed]

**23. **W. Harm, C. Roider, S. Bernet, and M. Ritsch-Marte, “Tilt-effect of holograms and images displayed on a spatial light modulator,” Opt. Express **23**, 30497–30511 (2015). [CrossRef] [PubMed]

**24. **E. Ronzitti, C. Ventalon, M. Canepari, B. C. Forget, E. Papagiakoumou, and V. Emiliani, “Recent advances in patterned photostimulation for optogenetics,” J. Opt. **19**, 113001 (2017). [CrossRef]

**25. **M. P. Lee and M. J. Padgett, “Optical tweezers: a light touch,” J. Microsc. **248**, 219–222 (2012). [CrossRef] [PubMed]

**26. **D. Barredo, V. Lienhard, S. de Léséleuc, T. Lahaye, and A. Browaeys, “Synthetic three-dimensional atomic structures assembled atom by atom,” Nature **561**, 79–82 (2018). [CrossRef] [PubMed]

**27. **L. Yang, A. El-Tamer, U. Hinze, J. Li, Y. Hu, W. Huang, J. Chu, and B. N. Chichkov, “Parallel direct laser writing of micro-optical and photonic structures using spatial light modulator,” Opt. Lasers Eng. **70**, 26–32 (2015). [CrossRef]