## Abstract

Arbitrary two-dimensional complex modulation of an optical field is a powerful tool for coherent optical systems. No single spatial light modulator (SLM) offers true arbitrary complex modulation, but they can be combined in order to achieve this. In this work, two sides of a twisted nematic (TN) liquid crystal SLM are used sequentially to implement different arbitrary modulation schemes. In order to fully explore and exploit the rich modulation behavior offered by a TN device, a generalized Jones matrix approach is used. A method for *in situ* characterization of the SLM inside the two-pass system is demonstrated, where each side of the SLM is independently characterized. This characterization data is then used to design appropriate polarizer configurations to implement arbitrary complex modulation schemes (albeit without 100% efficiency). Finally, an *in situ* optimization technique that corrects states by applying a translation in the complex plane is demonstrated. This technique can correct both for variations across the SLM and bulk changes in the SLM behavior due to the changing temperature.

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

There are many applications in the field of optics where arbitrary two-dimensional (2D) complex modulation of an optical field is required. Spatial light modulators (SLMs) are widely used in display, information processing, optical communication, and imaging systems. Often, these systems are constrained by the fact that an individual pixel on an SLM is fundamentally a one-parameter device; an arbitrary complex number needs two parameters to specify it. (Although arguably one number would suffice if the states lie along a tight spiral in the Argand plane, this is hard to realize physically.) One must resort to optimizing the performance of the system given this constrained modulation capability [1–3], or to methods that give the illusion of arbitrary complex control using a constrained modulation capability, such as carrier-based [4] or phase-detour (cell based) approaches [5–7].

The availability of arbitrary complex modulation permits better holographic manipulation of light without having to optimize or compensate for the restricted modulation capability. It also opens up new options for algorithms in optical information processing by allowing complete control and the encoding of arbitrary functions onto the optical field.

Of course, by combining two SLMs together in some scheme whereby the effect of two pixels is combined, one can achieve two-parameter modulation. In an appropriate system arbitrary complex modulation can be achieved. The fundamental architectures are outlined by Juday and Florence [8]. A combination of two one-parameter SLMs can be considered to be either additive or multiplicative.

In this work, we consider a two-pass twisted nematic (TN) SLM architecture, where, for the first time to our knowledge, a full Jones matrix characterization is used to fully explore and exploit the modulation capability of the device. In the additive case, either a beam splitter arrangement is used to direct each part of the wavefront through two SLMs before recombining it [9,10], or the SLM over-samples an under-resolved light field [7,11]. The different optical architectures appropriately control the direction and polarization of the light through the SLMs in order to split and then recombine the optical field. The resulting modulation is due to the average of the two devices; hence, the effective modulation can be considered to be due to adding the modulation due to each SLM with a factor of $\frac{1}{2}$.

In the multiplicative case used here, the light passes through two SLMs sequentially, picking up a complex modulation each time. Two previous works by Neto *et al.* [12] and Gregory *et al.* [13] have considered an architecture similar to the one proposed in this work, with sequential TN liquid crystal display (LCD) panels. The critical difference in this work is that a full Jones matrix characterization is used to fully unlock the coupled polarization-amplitude-phase modulation behavior of these devices. TN displays are particularly relevant, as they offer generally higher switching speeds than other continuous liquid crystal operating modes. Thus, they represent a good technology for high-throughput optical information processing systems.

The modulation space accessed by a given SLM across its operating range is often represented as a curve on an Argand diagram. Each level of the SLM modulates the optical field with a different complex number $r{e}^{i\phi}$ (assuming initially that the SLM is homogeneous). Necessarily, for a passive device, all points lie within the unit circle. These operating curves can be used to obtain the modulation states offered by a two-SLM system [8]. In the case of the additive configuration, we need to average all combinations of states from the two curves and then halve the magnitude. This is equivalent to dilating the two operating curves and then halving the magnitude of the resulting region. Similarly, for the multiplicative architecture, we can make use of the fact that $\mathrm{log}(A\times B)=\mathrm{log}(A)+\mathrm{log}(B)$ and dilate the logarithms of the two operating curves before exponentiating. In this context, dilation is a commutative morphological operation whereby, in turn, one curve is centered at each point on the other curve, until a new set of points has been defined.

However, the concept of an operating curve does not fully describe the behavior of an SLM as it neglects polarization modulation. To convey the modulation ability of a device as a simple complex number, one must consider light as a scalar quantity. In general, an SLM can modulate polarization just as well as it can be considered to modulate amplitude and phase. The operating curve description is only valid for a defined input and output polarization. In previous works, this has been achieved either by using intermediate polarizers or operating the devices in modes where the input polarization is an eigenvector of the SLM (such as pure phase modulation).

The full modulation ability of an SLM is best described using the Jones matrix formalism [14]. Here, fully polarized light is described by a two-element complex vector ${({E}_{\mathrm{x}},{E}_{\mathrm{y}})}^{T}$ that encapsulates the magnitudes and phases of the horizontal and vertical components of the optical electric field, respectively. In this formalism, the SLM states are fully described by a complex $2\times 2$ Jones matrix which operates on the Jones vector. Using this full description of the modulation capability of an SLM, we can more fully analyze the modulation capability of a two-TN SLM system than with using the operating curve alone.

In this work, we consider a transmissive TN device (Holoeye LC 2012). This is configured such that light passes through the SLM on one side in one direction before being relayed to the opposite side, where it passes through in the opposite direction (a multiplicative system). We are splitting our SLM up into two halves (hence, we are sacrificing resolution). A schematic of this setup is shown in Fig. 1. A TN device has rich modulation behavior and is impossible to adequately describe if one neglects its significant polarization modulation capability. Unlike vertically or planar-aligned nematic devices, its polarization eigenstates are non-trivial elliptical states [15]. Hence, by considering the system from a full Jones matrix perspective, we are able to implement arbitrary complex modulation with minimal optical components.

In this paper, we first measure the full Jones matrix representation of the SLM, accounting for gross variation across the device. This characterization data is then used to design systems with arbitrary modulation capability, which are then characterized. Finally, further *in situ* optimization is conducted to refine the modulation performance, accounting for local variations across the SLM.

#### A. Experimental Setup

The system in Fig. 1 is a free-space optical system built on an optical table. The collimation lens is a 25 mm asphere. The relay lens is a $f=100\text{\hspace{0.17em}\hspace{0.17em}}\mathrm{mm}$ achromatic doublet.

One-to-one pixel mapping is achieved such that a pixel on the first half is imaged uniquely onto a specific pixel on the second half of the SLM. The numerical aperture of the system is small and aberrations are negligible. Alignment is aided by the construction of the SLM. The pitch is somewhat coarse at 36 μm, and the pixels have a relatively low fill factor of 58%. The dead space consists of an opaque wire grid, so there is minimal crosstalk between pixels on the different halves. Any slight misalignment corresponds to a global decrease in transmitted intensity as, in effect, two “screen doors” are slid across each other. This effect significantly simplifies alignment; without it, some kind of Fourier plane spatial filter and bandwidth limiting of the system would likely be required. Alignment is achieved by using a telescope in the position of the red arrow in Fig. 1 to image the second half of the SLM. Patterns are shown on the SLM, with the polarizer and analyzer aligned horizontally. In this configuration, to a first approximation, similar gray values on corresponding pixels result in a high-intensity transmission, and different values result in a lower transmission. Having obtained a good, non-diffracted image of a pattern displayed on the second half of the SLM, the pattern is then displayed on the first half and the relay lens and mirror adjusted to achieve an equally scaled non-diffracted image. If the input light is collimated, the scaling of the image of the first half of the SLM onto the second half is determined by the relay lens-mirror distance and then the diffraction by the SLM-lens distance. By viewing the appropriate patterns, rotation and scaling can be eliminated, and the two images of the SLM overlaid.

During initial characterization, an aperture is placed at the first half of the SLM to select only a small region of the SLM on each half, near the center of the illumination beam. This region is approximately 60 pixels (2 mm) across. This ensures we initially characterize an essentially homogeneous region of the SLM.

The intensities are measured using an amplified photodetector and a lock-in amplifier used with an optical chopper. This provides low-noise data and avoids the need to calibrate for the DC offset of the photodiode.

## 2. *IN SITU* CHARACTERIZATION OF THE TN-LCD SLM

The overall objective is to describe the system in Fig. 1 with a Jones calculus representation [14]:

This model makes explicit that this system cannot be considered simply by combining two operating curves. The operating curve of the second SLM is polarization dependent, and the intermediate polarization state depends on the polarization modulation of the first SLM. Thus, the two SLMs do not apply an independent complex modulation of the optical field: they are coupled through polarization modulation. We would require the complex modulation of the second SLM to be independent of the first to apply the dilation approach to understanding the modulation space accessed by this system [8].

The general operating principle of a TN-LC cell is shown in the inset panel of Fig. 1. To a first order, this system can be understood as operating as follows. The in-plane ($\theta $) alignment of the birefringent rod-like LC molecules near each of the surfaces (electrodes) is orthogonal, with the LC director field rotating between the two surfaces in order that it is continuous. The application of an electric field reorientates the LCs azimuthally ($\phi $) throughout the device, changing the refractive index presented to the optical field. However, there are anchoring effects at the surfaces defining some tilt preference of the molecules. Thus, the LC director field throughout the device as a function of depth is rather complicated, depending on the interplay of the electric field and anchoring conditions. Both the effective birefringence seen by light propagating through the cell—determined by $\phi $—and the optical axis—determined by $\theta $—are changing throughout the cell. A simple theoretical model of such a system is non-trivial and depends on at least some experimentally derived quantities [16,17]. Fundamentally, the action of the device can at least assumed to be that of some collection of birefringent layers. More specifically, it will apply some phase delay, rotation, and circularization to the incoming light.

In this work, rather than modeling a TN LCD (which would require experimentally derived physical parameters, and be nonetheless imperfect), we directly measure the Jones matrices at each gray level agnostic to the specific LC behavior. This technique could be applied broadly across SLM technologies and would allow imperfectly manufactured SLMs to be used effectively. As in previous approaches [15,18–20], the method used here is to first determine the Jones matrix aside from the global phase and then to find the relative global phase between the different gray levels.

Neglecting the global phase, the form of the Jones matrix is found by measuring the transmitted intensity for different linear polarizer and analyzer angles. A Jones matrix for each gray level $n$ is then found parametrized as

where $i$ is the imaginary unit and $c(n)$, $f(n)$, $g(n)$, $h(n)$, and $j(n)$ are real numbers. These values are found by minimizing the error between the measured intensity and the intensity predicted by an appropriate system model containing $\mathbf{J}(n)$. The scalar $c$ captures the amplitude scaling, and the form of the matrix ensures that ${J}^{\u2020}J=\alpha \left(\begin{array}{cc}1& 0\\ 0& 1\end{array}\right)$, where $\alpha $ is some scalar. This is expected because a lossless system consisting of uniaxial birefringent layers—such as a TN SLM—should be represented by a unitary matrix to within a global phase term [21].For example, consider a simple system consisting of a device under test illuminated by light linearly polarized at an angle ${\theta}_{\mathrm{pol}}$ and analyzed with a linear polarizer at an angle ${\theta}_{\mathrm{ana}}$. The Jones matrix representation of this system is given by

The procedure used to measure the terms in Eq. (1), excluding the global phase, requires 3 different experimental configurations, as shown in Fig. 2(a):

- (1) The Jones matrix describing the 45° mirror, ${\mathbf{J}}_{\mathrm{mirror}}$, is determined. The system simply consists of the mirror between a polarizer and analyzer, as shown along with measured intensities in Fig. 2(a). The corresponding system model is$${\mathbf{E}}_{\mathrm{out}}=\mathbf{P}({\theta}_{\mathrm{ana}})\xb7{\mathbf{J}}_{\mathrm{mirror}}\xb7{\mathbf{E}}_{\mathbf{0}}({\theta}_{\mathrm{pol}}),$$where ${\mathbf{E}}_{\mathbf{0}}({\theta}_{\mathrm{pol}})$ represents the input linearly polarized light, and ${\mathbf{J}}_{\mathrm{mirror}}$ is modeled as $(\begin{array}{cc}{r}_{p}& 0\\ 0& -{r}_{s}\end{array})$; the diagonal components are the complex reflection coefficients of the $p$ and $s$ polarizations, and the minus sign comes from the coordinate change on reflection [22]. Numerical optimization (using the MATLAB fminsearch function) is performed to find these complex reflection coefficients by solving the minimization problem$$\underset{{r}_{p},{r}_{s}}{\mathrm{arg}\mathrm{min}}\sum _{{\theta}_{\mathrm{pol}},{\theta}_{\mathrm{ana}}}{|{I}_{\mathrm{model}}({\theta}_{\mathrm{pol}},{\theta}_{\mathrm{ana}})-{I}_{\mathrm{expt}.}({\theta}_{\mathrm{pol}},{\theta}_{\mathrm{ana}})|}^{2},$$where ${I}_{\mathrm{model}}$ and ${I}_{\mathrm{expt}.}$ are the model-predicted and measured intensities, respectively, at the different polarizer and analyzer angles. As well as a degeneracy in the global phase, which we can trivially neglect, there is a degeneracy in the relative phase of the elements. This is selected by using the sign one would expect from the Fresnel equations; the coefficients themselves differ from the Fresnel equations because of the protective mirror coating.
- (2) We now measure ${\mathbf{J}}_{\mathbf{1}}(0)$ by inserting the SLM into the system and using the second setup and results in Fig. 2(a). The corresponding system model is$${\mathbf{E}}_{\mathrm{out}}=\mathbf{P}({\theta}_{\mathrm{ana}})\xb7{\mathbf{J}}_{\mathrm{mirror}}\xb7{\mathbf{J}}_{\mathbf{1}}(0)\xb7{\mathbf{E}}_{\mathbf{0}}({\theta}_{\mathrm{pol}}),$$and ${\mathbf{J}}_{\mathbf{1}}(0)$ is determined in the form of Eq. (2). The presence of the mirror element generates a known elliptical polarization state for some polarizer angles, hence allowing full determination of ${\mathbf{J}}_{\mathbf{1}}(0)$, unlike the simplified model of Eq. (3).
- (3) The remaining Jones matrices, ${\mathbf{J}}_{\mathbf{1}}({n}_{1})$ and ${\mathbf{J}}_{\mathbf{2}}({n}_{2})$ (with ${n}_{1},{n}_{2}=0\to 255$), are found by reconfiguring the system to use the full system model of Eq. (1). First, the first half of the SLM is held in the 0 state, and all of the second half matrices are found [Fig. 2(a) shows the results for the $({n}_{1},{n}_{2})=(\mathrm{0,0})$ measurement]. Then, the second half is held in the 0 state, and the remaining first half matrices are found. Furthermore, ${\mathbf{J}}_{\mathbf{1}}(0)$ is redetermined in this two-pass architecture to verify the previous measurement.

Essentially, the bulk of the measurements are acquired in Step 3 using the full two-pass system, but reference measurements of ${\mathbf{J}}_{\mathrm{mirror}}$ and ${\mathbf{J}}_{\mathbf{1}}(0)$ must be made outside of the two-pass system to lift the degeneracies that would otherwise arrive in the parameter determination.

These measurements neglect the global phase evolution applied to both polarizations of the light as it passes through the SLM. This is required to determine the relative phase between different gray levels. We are looking for an extended form of the Jones matrix representation in Eq. (2) of

where $\varphi (n)$ is a global phase shift relative to the state $n=0$. So far we have had no way of measuring this relative phase, as we have only ever applied a uniform level to the SLM. An interferometric method is required; here, we use images of a Ronchi grating [23]. This method is shown schematically in Fig. 2(b). Two curves are acquired: one where the SLM is swept uniformly across all levels, and one where columns of pixels are alternatively swept and kept at the 0 (or any other arbitrary reference) level. The zero-frequency component of the optical Fourier transform as performed by a downstream lens is measured. This is the average of the function on the SLM and hence is equal to half of the complex sum of the constant zero level and the swept level. The magnitudes of these two quantities are found by a flat-field measurement. Thus, the relative phase can be obtained from the Ronchi measurements through the application of the cosine rule to the triangle shown in Fig. 2(b). These curves are acquired for a given polarizer and analyzer configuration and used in conjunction with the full system model of Eq. (1) to find the global phase components of the SLM Jones matrices relative to $\mathbf{J}(0)$.Specifically, both the polarizer and analyzer aligned horizontally and the zero-order intensity measured for a Ronchi grating of ${n}_{1}=[\mathrm{0,0}\to 255]$ with ${n}_{2}=0$ set, and ${n}_{2}=[\mathrm{0,0}\to 255]$ with ${n}_{1}=0$ set. Numerical optimization is used to deduce the global phase term required for both halves of the SLM relative to ${\mathbf{J}}_{\mathbf{1}}(0)$ and ${\mathbf{J}}_{\mathbf{2}}(0)$. With reference to Fig. 2(b), it can be seen that the phase values obtained by this Ronchi method are degenerate; positive and negative values are possible. For many optical information processing applications the sign of the phase difference is not critical if a consistent solution is used; to lift the degeneracy, another phase measurement technique would be required.

Combining the two elements of the Jones matrices together, we obtain the complete Jones matrix representation of each half of the SLM at each gray level, shown in Fig. 3(a). Interestingly, there is a relatively significant deviation between the two halves, presumably caused by variations in thickness across the device.

The polarization eigenvalues and eigenstates are also shown in Fig. 3(b). The polarization eigenstates are illustrated by polarization ellipses, which show the shape swept out by the electric field vector over the course of one cycle. (We assume that the phase evolves as $\mathrm{exp}[kz-\omega t]$.) The eigenvalues represent the complex modulation of the optical field for these polarization eigenstates (the polarization eigenstates are the special case where there is no polarization modulation, so in this case, a simple scalar complex amplitude is sufficient to describe the SLM behavior). These changing polarization eigenstates illustrate clearly that simply considering the operating curve of the device is insufficient, as the operating curve is polarization-state dependent and, in general, the first pass through the SLM will modulate the polarization state of the incoming light. Indeed, the polarization states that are readily experimentally accessible—linear and circular—will necessarily have the polarization state modified.

Having obtained these *in situ* measurements of the Jones matrix, we now proceed to use them to design a system configuration to achieve arbitrary complex modulation.

## 3. CONFIGURATION DESIGN FOR ARBITRARY COMPLEX MODULATION

The objective is to use the fully specified system model of Eq. (1) to decide on a setting for the polarizer and analyzer and an appropriate subset of the ${256}^{2}$ accessible states at each pixel in order to achieve the appropriate optical modulation. We constrain the design to that of Fig. (1). Intermediate optical elements, such as waveplates and polarizers, could be added, but it is desirable to minimize the number of optical elements for design simplicity, and hence also the number of degrees of freedom in the optimization.

There are many different modulation schemes we could aim for. To illustrate the method, two are considered:

- (A) General full complex amplitude modulation of the form $r{e}^{i\phi}$, where $r$ takes 31 equally spaced values between $-{r}_{\mathrm{max}}$ and ${r}_{\mathrm{max}}$, and $\phi $ takes 18 equally spaced values between 0 and $2\pi $. (These values are arbitrarily selected.)
- (B) Continuous amplitude, binary-phase modulation, such that we can display real numbers $-{A}_{\mathrm{max}}\to {A}_{\mathrm{max}}$. This is similar to the modulation offered by an analogue ferroelectric liquid crystal (AFLC) device [9].

Historically, the optimization of SLM operating ranges has often focused on implementing filters for optical correlator systems. Many specific metrics have been developed for optimizing the modulation capability in these systems [24–26]. The objective has generally been to find a compromise between a filter and an operating curve. There are two main differences in perspective presented by this work. First, we are considering an area in the Argand plane rather than an operating curve. Second, by using two SLMs and having undertaken a full Jones matrix characterization, we can expect not to have to compromise on our modulation capability (aside from the global efficiency). Our goal is to achieve the required modulation capability. As such, a different set of metrics becomes important. Perhaps of most relevance is the still limited dynamic range of this system; a real system can only provide a finite amount of extinction and not reach the true center of the Argand plane.

An appropriate configuration is found using global optimization. The system model can generate all of the ${256}^{2}$ possible complex modulation states available for a given configuration of a polarizer and an analyzer. The use of a suitable fitness function finds a configuration such that there is a high density of states in the area of the Argand diagram of interest. From the available states, the nearest states to the target states are then found and used for a given configuration. Proceeding in this manner proves to be computationally expedient. The specific fitness functions and results for the two modulation schemes selected follow.

#### A. Complex Amplitude Modulation

To achieve the complex modulation criteria, an optimization is performed over ${\theta}_{\mathrm{pol}}$, ${\theta}_{\mathrm{ana}}$, and ${r}_{\mathrm{max}}$ (the maximum modulation amplitude and hence the radius of the circle on the Argand plane). The fitness function returns an error value $E$; lower is considered better. First, the viability of such a circle is checked by ensuring that it is enclosed within the 2D concave hull surrounding the modulation points. If not, the scalar fitness value $E$ is infinite; otherwise, it is

where ${\sigma}_{\mathrm{NND}}$ and $\overline{\mathrm{NND}}$ are, respectively, the standard deviation and mean of the nearest neighbor distance between the $N$ points inside the circle. The more evenly spaced and densely populated the points are, the lower the error value. The optimization to findThe characterization of the amplitudes of these states is shown in Fig. 4(b). The desired amplitude function of $A\propto |L|$—where $L$ is the amplitude level—is obtained for all of the phase values, except that zero transmission is never achieved. This is because of both the refreshing scheme of the LC panel and the non-uniformity across the SLM. To verify the phase modulation, Ronchi gratings relative to one of the states were displayed and the amplitude of the zero order measured, as shown in Fig. 4(c). The expected Ronchi amplitude is

where $A(L,\phi )$ represents the amplitude for the different states. There is good agreement between the predicted and measured results.#### B. Continuous Amplitude, Binary-Phase Modulation

As well as implementing this second modulation scheme, after the initial design, a further *in situ* optimization method is developed.

As continuous amplitude, binary-phase behavior is also offered by an AFLC device it is worth considering why this approach may prove superior. First, TN devices are readily available, including LCOS (LC on silicon) devices, which offer state-of-the-art resolutions; AFLC devices are very difficult to find commercially. Furthermore, the use of a two-pass system offers huge flexibility in terms of further optimization—as pursued in the next section—and modulation capability, due to the huge number (${256}^{2}$) of possible states, from which a useful subset can be selected.

The optimization is performed over ${\theta}_{\mathrm{pol}}$, ${\theta}_{\mathrm{ana}}$, and ${\theta}_{\mathrm{Arg}}$ (the angle of the modulation line to the real axis of the Argand plane). As the global phase is arbitrary and represented by a rotation of the complex plane, any straight line through the origin of the Argand diagram represents continuous amplitude, binary-phase modulation. Again, the first step is to find the alpha hull of the modulation points, verify the origin is inside the alpha hull, and then find the longest line that fits inside the alpha hull at slope angle ${\theta}_{\mathrm{Arg}}$. Moreover, in order to allow for flexibility in further optimization, it is also checked that a line offset some small arbitrary distance (in this case, a line 0.8 times as long, offset by 0.05 of the span) from the selected line exists inside the alpha hull. This ensures there are accessible states nearby for subsequent optimization.

Provided that these constraints are met, a fitness function then evaluates an error by defining target states along this line. The distances ${d}_{k}$ from each target state $k$ to the nearest accessible state are then found, and the error function is given by

where $S$ is the span of the line. Thus, we are targeting a long line with evenly spaced points.The result of the brute-force optimization to find

## 4. *IN SITU* OPTIMIZATION OF SELECTED STATES

Thus far, we have achieved our goal of characterizing the SLM behavior in a two-pass system and have used the resulting model to determine the appropriate polarizer and analyzer configurations to achieve specific modulation goals. However, from the results in Fig. 5 there is clearly scope for further improvement to the modulation capability of the system. Specifically, we have assumed that each side of the SLM is represented uniformly by the Jones matrices in Fig. 1(c). However, we know definitively that there is variation across the SLM—that was the point of characterizing the two sides separately—so this assumption is incorrect.

There are a number of ways we could try to improve the performance. We could measure the Jones matrix over small windows across the SLM, but this is experimentally onerous; or we could try to interpolate the Jones matrices between the two measured locations, but it is unclear what function to interpolate with.

The following *in situ* optimization approach is proposed. It capitalizes on the fact that most of the ${256}^{2}$ states we have available in this two-pass architecture are unused, offering significant scope for further improvement in the modulation performance. For a given polarizer and analyzer configuration, we have a set of modulation points on the complex plane. For a given two-pass pixel and target modulation, the nearest point in the system model is possibly not the optimal SLM state to achieve the given modulation, due to variations across the SLM and errors in the calculated Jones matrix. It is a natural assumption that the optimal point is in the same region of the Argand plane as the “ideal” point suggested by the model. Thus, the Argand plane is the natural space in which to optimize the performance, and the optimal state to use is separated from the model state by some 2D translation vector in the complex plane. We assume that the variation across the SLM is gradual and continuous; hence, the 2D translation vectors required to perform the correction will vary slowly and continuously.

We need to choose an appropriate way to express these translation vectors such that they are smooth and slowly varying. A good way of achieving this, and a reasonable assumption, is that they can be approximated by a Taylor expansion about the center of the characterized region. We choose a second-order polynomial for translation in the real ($R$) and imaginary ($I$) directions on the Argand plane as a function of the horizontal ($x$) and vertical ($y$) distances on the SLM. The selection of a Cartesian basis for the translation is arbitrary, but provided the translation is small, this choice should not be overly critical. The translation vectors are thus

To test this method, we attempt to improve the zero-amplitude state of the arrangement in Fig. 5. This state is particularly important because having a good black level is key for low-noise optical information processing applications. We determine the coefficients ${A}_{\mathrm{xy}}$ and ${B}_{\mathrm{xy}}$ by direct optimization.

Global optimization in the form of a genetic algorithm is used to optimize the 12-element vector containing the coefficients; our fitness function is simply the transmitted power. This method has the significant disadvantage that we are trying to minimize power and hence are very sensitive to noisy measurements. The use of a lock-in amplifier is critical to this step. Furthermore, the use of a genetic algorithm means the optimization is robust to drift in the system because knowledge of the solution space is retained in the makeup of the population.

The result and impact of this modification are shown in Fig. 6. Figure 6(a) shows the optimized translation functions of Eq. (13) evaluated across the SLM. This translation function is applied, for each pixel, in the Argand plane. The actual states used across the SLM are those shown in Fig. 6(b). As only part of the SLM is used, as shown in Fig. 6(c), the SLM state configuration away from the beam does not affect the result. To achieve the same solution with a broader illumination, higher-order terms would need to be added to Eq. (13). The result of this optimization of the level-zero state is shown in the context of the other uncorrected levels in Fig. 6(d). We are able to make the zero amplitude level significantly darker and achieve a far more ideal bilinear amplitude function, as required for the amplitude to be proportional to the level. There is still an offset from total extinction, which arises due to artifacts on the SLM as it refreshes even a static image.

A more drastic application of this technique is to correct all states for changes due to a variation in temperature, which significantly affects the modulation behavior of the LC. This renders the calculation of the Jones vectors and subsequent state determination incorrect. However, rather than repeating this work, one can use the principle of applying a translation to the states in the complex plane.

Critically, we assume that the same translation can be applied across all of the states in the complex plane in order to improve the performance. The validity of this assumption will be borne out by our experimental results. The translation is most straightforwardly determined by minimizing the intensity transmitted in the zero state. Using this state means that there is no degeneracy with the phase, so the displacement field is unique, as compared to if we were optimizing toward a specific amplitude, when it would be degenerate under a rotation around the center of the complex plane, and a phase measurement would be required.

Figure 7 shows the result of applying this correction in the case where the SLM has been air cooled by 9°C from 35°C to 26°C, as measured on the metallic case of the SLM package. At this lower temperature, the state of minimum transmission has moved from level 0 to $-1$, and the whole curve has been distorted. Applying this global displacement does not completely return the operating curve to its original location, but it does improve it significantly while only optimizing for one state. Moreover, Fig. 7(b) shows the phase modulation behavior is improved by applying this correction, as the Ronchi grating amplitude fits better to a straight line. Figure 7(c) shows the states that are used in this correction. Due to the shape of the points in the Argand diagram, for some cases, the nearest accessible state for a given displacement is outside of the alpha hull and over in a different part of the region of accessible states. This is clearly not optimal and illustrates that there is a trade-off between having dense states and scope for optimization when selecting a state configuration.

## 5. CONCLUSION

In this work, we have presented a method to access the full complex modulation capability of a two-pass twisted nematic SLM system. The TN-LCD SLM has non-trivial polarization eigenstates, so fully exploiting the accessible modulation space of the system for an arbitrary configuration requires a full Jones matrix treatment. These Jones matrices have been determined *in situ*, and appropriate optimizations are chosen to design systems with arbitrary modulation requirements using no intermediate polarization elements. Moreover, we have demonstrated that applying translations to target states in the complex plane is a good way of performing *in situ* optimization to improve upon a given set of model-predicted target states. This optimization can correct both for variation across the SLM and bulk variations to the SLM caused by changing temperature.

While the resolution of this system is relatively small due to the illumination optics used, this method is inherently scalable. Such a system could be used as an input or filter for an optical information processing system, with the arbitrary modulation schemes available offering flexibility for new algorithm development.

**Data access:** Additional data related to this publication are available at the University of Cambridge research repository [27].

## Funding

Engineering and Physical Sciences Research Council (EPSRC) (EP/G037256/1).

## Acknowledgment

The SLM was kindly supplied by Nicholas New of Optalysys Ltd. The authors would like to thank James Dolan, George Gordon, Ammar Khan, and Calum Williams for the fruitful discussions.

## REFERENCES

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

**2. **R. Hauck and O. Bryngdahl, “Computer-generated holograms with pulse-density modulation,” J. Opt. Soc. Am. A **1**, 5–10 (1984). [CrossRef]

**3. **R. W. Cohn, “Analyzing the encoding range of amplitude-phase coupled spatial light modulators,” Opt. Eng. **38**, 361–367 (1999). [CrossRef]

**4. **A. VanderLugt, “Signal detection by complex spatial filtering,” IEEE Trans. Inf. Theory **10**, 139–145 (1963). [CrossRef]

**5. **B. R. Brown and A. W. Lohmann, “Complex spatial filtering with binary masks,” Appl. Opt. **5**, 967–969 (1966). [CrossRef]

**6. **A. W. Lohmann and D. P. Paris, “Binary Fraunhofer holograms, generated by computer,” Appl. Opt. **6**, 1739–1748 (1967). [CrossRef]

**7. **P. Birch, R. Young, C. Chatwin, M. Farsari, D. Budgett, and J. Richardson, “Fully complex optical modulation with an analogue ferroelectric liquid crystal spatial light modulator,” Opt. Commun. **175**, 347–352 (2000). [CrossRef]

**8. **R. Juday and J. Florence, “Full-complex modulation with two one-parameter SLMs,” Proc. SPIE **1558**, 499–504 (1991). [CrossRef]

**9. **R. Tudela, E. Martín-Badosa, I. Labastida, S. Vallmitjana, I. Juvells, and A. Carnicer, “Full complex Fresnel holograms displayed on liquid crystal devices,” J. Opt. A **5**, S189–S194 (2003). [CrossRef]

**10. **S. Reichelt, R. Häussler, G. Fütterer, N. Leister, H. Kato, N. Usukura, and Y. Kanbayashi, “Full-range, complex spatial light modulator for real-time holography,” Opt. Lett. **37**, 1955–1957 (2012). [CrossRef]

**11. **S. Serati and K. Bauchert, “Sampling technique for achieving full unit-circle coverage using a real-axis spatial light modulator,” Proc. SPIE **3715**, 112–119 (1999). [CrossRef]

**12. **L. G. Neto, D. Roberge, and Y. Sheng, “Full-range, continuous, complex modulation by the use of two coupled-mode liquid-crystal televisions,” Appl. Opt. **35**, 4567–4576 (1996). [CrossRef]

**13. **D. A. Gregory, J. C. Kirsch, and E. C. Tam, “Full complex modulation using liquid-crystal televisions,” Appl. Opt. **31**, 163–165 (1992). [CrossRef]

**14. **R. Jones, “A new calculus for the treatment of optical systems,” J. Opt. Soc. Am. **31**, 488–493 (1941).

**15. **J. L. Pezzaniti and R. A. Chipman, “Phase-only modulation of a twisted nematic liquid-crystal TV by use of the eigenpolarization states,” Opt. Lett. **18**, 1567–1569 (1993). [CrossRef]

**16. **C. Soutar and K. Lu, “Determination of the physical properties of an arbitrary twisted-nematic liquid crystal cell,” Opt. Eng. **33**, 2704–2712 (1994). [CrossRef]

**17. **B. Saleh and K. Lu, “Theory and design of the liquid crystal TV as an optical spatial phase modulator,” Opt. Eng. **29**, 240–246 (1990). [CrossRef]

**18. **M. Yamauchi and T. Eiju, “Optimization of twisted nematic liquid crystal panels for spatial light phase modulation,” Opt. Commun. **115**, 19–25 (1995). [CrossRef]

**19. **J. Davis, I. Moreno, and P. Tsai, “Polarization eigenstates for twisted-nematic liquid-crystal displays,” Appl. Opt. **37**, 937–945 (1998). [CrossRef]

**20. **C. Kohler, “Model-free method for measuring the full Jones matrix of reflective liquid-crystal displays,” Opt. Eng. **48**, 044002 (2009). [CrossRef]

**21. **P. Yeh and C. Gu, *Optics of Liquid Crystal Displays*, Pure and Applied Optics (Wiley, 2010).

**22. **J. Goodman, *Introduction to Fourier Optics* (McGraw-Hill, 2008).

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

**24. **C. Zeile and E. Lueder, “Complex transmission of liquid crystal spatial light modulators in optical signal processing applications,” Proc. SPIE **1911**, 195–206 (1993). [CrossRef]

**25. **R. D. Juday, “Generality of matched filtering and minimum Euclidean distance projection for optical pattern recognition,” J. Opt. Soc. Am. A **18**, 1882–1896 (2001). [CrossRef]

**26. **B. V. K. V. Kumar, A. Mahalanobis, and R. D. Juday, *Correlation Pattern Recognition* (Cambridge University, 2005).