Characterization , design , and optimization of a two-pass twisted nematic liquid crystal spatial light modulator system for arbitrary complex modulation

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.


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][2][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][6][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 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 re iϕ (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 logA × B logA logB 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 x ; E 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 × 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 mm achromatic doublet.
Fig. 1.Two-pass SLM configuration used in this work.Collimated 633 nm linearly polarized light from a SMF passes through one half of the SLM before being imaged onto the other half.The relay system is a 4f system.A linear analyzer is applied at the output.The red arrow indicates light proceeding downstream into the next stage of the system, such as through an imaging system, or an optical Fourier transform lens.Inset: A schematic of the LC director profile in such a device.In one state (in this case, "off "), the birefringent LC molecules form a quarter-turn helix between the two electrodes.Application of an electric field re-orientates the molecules in the bulk, but the molecules near the surfaces are held near their original positions by surface anchoring.
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.

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]: The input vector describes linearly polarized light of electric field magnitude E 0 at an angle θ pol to the x-axis.
Experimentally, the linearly polarized light is generated using a fixed linear polarizer followed by a half-wave plate.The 45°mirror is represented by J mirror , which as well as imposing a coordinate change has different complex reflection coefficients for the s and p polarizations.The two halves of the SLM are described by the Jones matrices J 1 n 1 and where n is the gray level (a term resulting from their historical use in display applications).In an ideal SLM, one would expect J 1 J 2 , but as we shall see, this is not the case due to device imperfections and hence we explicitly include this distinction at this point.Indeed, for each pixel, there is in fact a subtly different Jones matrix, but rather than considering this explicitly, we will compensate for that with a different optimization approach in Section 4. The matrix

Á
represents the coordinate change imposed by reflection at the relay mirror.Finally, the output analyzer is represented by Pθ ana .Our objective is to determine the Jones matrix representations of the SLM and the 45°mirror.By restricting ourselves to a Jones calculus representation and not, for example, the more comprehensive Mueller calculus representation we are implicitly assuming that the coherent light has a well-defined polarization state throughout.
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 (θ) 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 (ϕ) 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 ϕ-and the optical axisdetermined by θ-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][19][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 cn, f n, gn, hn, and jn 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 Jn.The scalar c captures the amplitude scaling, and the form of the matrix ensures that , where α 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 θ pol and analyzed with a linear polarizer at an angle θ ana .The Jones matrix representation of this system is given by where the electric field is given by RfE out g.The intensity is calculated from this model by I E † E. Sets of intensity measurements under different linear polarizer and analyzer configurations are not sufficient to fully constrain the Jones matrix of the device under test.This, in general, requires including some known birefringent test element in the system [20]; in this work this role is fulfilled by the 45°mirror.
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, J 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 where E 0 θ pol represents the input linearly polarized light, and J mirror is modeled as r p 0 0 −r s ; 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 arg min r p ;r s X θ pol ;θ ana jI model θ pol ; θ ana − I expt: θ pol ; θ ana j 2 ; (5 where I model and I 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 J 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 and J 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 J 1 0, unlike the simplified model of Eq. ( 3).
(3) The remaining Jones matrices, J 1 n 1 and J 2 n 2 (with n 1 ; n 2 0 → 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 0; 0 measurement].Then, the second half is held in the 0 state, and the remaining first half matrices are found.Furthermore, J 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 J mirror and J 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 φ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 J0.Specifically, both the polarizer and analyzer aligned horizontally and the zero-order intensity measured for a Ronchi grating of n 1 0; 0 → 255 with n 2 0 set, and n 2 0; 0 → 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 J 1 0 and J 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 expkz − ω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.

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 re iϕ , where r takes 31 equally spaced values between −r max and r max , and ϕ takes 18 equally spaced values between 0 and 2π.(These values are arbitrarily selected.)(B) Continuous amplitude, binary-phase modulation, such that we can display real numbers −A max → A max .This is similar to the modulation offered by an analogue ferroelectric liquid crystal (AFLC) device [9].This second scheme is of particular interest for optical information processing applications because of the symmetry properties of the (optical) Fourier transform of real even and odd functions, and obtaining it is the motivation for this particular work.The specific application will be discussed in a future publication, but the basic premise is that, by showing real functions with known symmetry, the phase of the optical Fourier transform is constrained to specific values.
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][25][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 θ pol , θ ana , and r 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 σ NND and 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 find arg min was performed using a brute-force search followed by local optimization.The modulation states available in this system configuration are shown by the points in Fig. 4(a).The configuration shown has a high point density inside the modulation circle, which is completely within the concave hull surrounding the points.While having high fidelity, this system offers relatively poor efficiency with a maximum amplitude transmission r max 0.16.The choice of a different fitness function could improve r max at the expense of the point density.
A subset of these states is then used to achieve the modulation goal of complex amplitude modulation.They are shown in the insets of Fig. 4(a), both on the complex plane and the SLM states required to implement them.The characterization of the amplitudes of these states is shown in Fig. 4(b).The desired amplitude function of A ∝ jLj-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 RL; ϕ 1 2 jA−15; 0 AL; ϕj; (10) where AL; ϕ 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 θ pol , θ ana , and θ 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 θ 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 arg min is shown in Fig. 5 There is good agreement, and the desired phase modulation has been implemented.points, as expected.The two sets of Ronchi measurements are taken with both the first state and last state held constant to allow interpretation of the results despite the noise floor of the experiment.For binary-phase modulation, one would expect the gradient for the Ronchi line to be half the gradient of the flat-amplitude line because half of the pixels are not changing and the points are in phase.Lines according to this theory are plotted, showing good agreement.

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 secondorder 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 where x; y are coordinates on the face of the SLM (in units of pixels), and x 0 ; y 0 is the center of the characterized region.
To test this method, we attempt to improve the zeroamplitude 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 xy and B 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, higherorder 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.

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

Fig. 2 .
Fig. 2. (a) The normalized transmitted intensity of different systems under varying polarizer and analyzer angles used to characterize the SLM and mirror.The first panel shows the intensity measured by a detector located at the position of the relay mirror in Fig. 1 used to characterize the 45°mirror.The second panel shows the transmitted intensity with the detector in the same place through the SLM at a uniform gray level 0. The third panel shows the configuration of Fig. 1, with the detector at the focal point of a lens situated optically downstream.Both halves of the SLM are at a uniform gray level 0. From these measurements, estimates of the Jones matrix representation of the SLM can be found.(b) Further measurements made to find the global phase delay of the Jones matrices by displaying a Ronchi grating on the SLM.The detector is again situated at the focal point of a lens downstream, and a pinhole is used to only select the DC component of the optical Fourier transform.In the data shown, only the first half of the SLM is swept; the second half remains at gray level 0. Using the cosine rule, as shown, the global phase delay θ relative to the 0 state can be found from knowledge of the amplitudes of the states separately jsj and the Ronchi amplitude R.

Fig. 3 .
Fig. 3. (a) The final measured Jones matrices that represent the two halves of the SLM across gray levels (level 0 is represented by ×).(b) The two sets of eigenvalues (black lines, × represents level 0) and polarization ellipses representing the polarization eigenstates (from blue to red) for the first and second halves of the SLM.

Fig. 4 .
Fig. 4. (a) The optimized complex amplitude modulation scheme for full complex modulation.All of the accessible states are shown, surrounded by the concave hull.The maximum modulation amplitude r max defines a circle on the Argand plane within this point set.Inset (left): The states targeted (lines) and used (red points) within this circle.Inset (right): The SLM gray levels on the first and second sides of the SLM used by these states.Throughout, the colors indicate corresponding states.(b) A measurement of the transmitted amplitude for the different states.The different color lines correspond to the different phase angles in the unit circle, with the same amplitude function.(c) Calculated and experimental transmitted amplitudes for Ronchi gratings measured relative to the state marked by ∘.There is good agreement, and the desired phase modulation has been implemented.

Fig. 5 .
Fig. 5. (a) The result of the optimization targeting continuous amplitude, binary phase.There are states in all directions around the span chosen to accommodate further optimization.Inset (top): The relative error plotted is the amplitude error of the target point from the ideal point divided by the inter-point spacing.Inset (bottom): The SLM gray levels used to achieve each of the 32 different states on the first and second sides.(b)The characterization of these states.The measured transmitted amplitude of each state for flat-field measurements is shown, as well as the zero-order amplitude when a Ronchi grating is displayed.Two different Ronchi gratings are considered for the cases where the first and last states in the sequence are held constant.The dotted lines are best-fit lines for the Ronchi gratings.The dashed line is at twice the gradient and agrees with the flat-field measurement, consistent with binary-phase modulation.

Fig. 6 .
Fig. 6.(a) A schematic of combined image of both sides of the SLM.The heat map shows the Gaussian beam profile illuminating the SLM, overlaid with the aperture used for the initial characterization of the SLM.The vectors sample the displacement in the Argand plane described by Eq. (13), with the coefficients having been found by direct optimization.(b) The same Eq.(13), this time with the displacements shown in the Argand plane.All of the model-predicted states are shown as blue dots, with the green region showing the states used across the SLM for the optimized zero amplitude state.(c) The actual image displayed on the SLM.The red boxes correspond to the area in (a).The regions of level 255 are due to the displacement moving outside of the area of complex points.Due to their being negligible intensity there, this is essentially a free parameter.(d) The corrected zero level in the context of all of the other uncorrected states.Clearly, we now obtain a more ideal bilinear function when using this corrected level.

Fig. 7 .
Fig. 7. (a) The normalized amplitudes for the different states for the characterization temperature of 35°C-as in previous results-and at a lower temperature of 26°C, with and without the same correction applied to each state.The minimum should be at level 0. (b) The zeroorder intensity for a Ronchi grating measured relative to level 15 (∘), and a straight fit line which would correspond to constant phase, for both the corrected case and uncorrected case at 26°.The residuals of these fits are also plotted.(c) The displacement vectors applied across the illuminated region of the SLM.(d) All of the states used (green) when this displacement is applied to each point in the results of Fig. 5.