Calibration of a phase-only spatial light modulator for both phase and retardance modulation

: Liquid crystal spatial light modulators (SLMs) are usually configured and calibrated for phase modulation. However, as they are variable retarders, they also have application as polarization modulators. We show that conventional phase-only calibrations are insufficient for this purpose, and a separate retardance calibration is needed. To overcome this shortcoming we report a simple Twyman-Green interferometer-based setup to realize SLM phase and retardance calibration. For phase calibration, we identify the non-linear, spatially variant response to the drive voltage of the SLM using fringe analysis and both horizontally and vertically polarized incident light. For retardance calibration, we use incident light polarized at 45° and assess the intensity variation. The methods presented are compatible with in situ calibration of SLMs.


Introduction
Liquid crystal spatial light modulators (SLMs) have widespread use in many optical applications, such as phase modulation, adaptive optics, beam shaping and holographic display [1]. The SLM is based upon a liquid crystal array, in which the orientation of liquid crystal molecules can be modified using optical or electrical means.
The liquid crystals in a SLM can be regarded as an array of variable retarders with fixed fast axis. Therefore, a SLM can also be used to manipulate beam polarization. This opens a window for more applications such as vortex beam generation [10][11][12][13][14][15], Pancharatnam-Berry device fabrication [16], color imaging [17], and quantum logic [18].
For all of these applications, accurate control of the SLM is required. The devices are not flat after manufacture, so we should expect spatial variations in their properties. Although correction files might be provided from manufacturing, the non-linear response between the drive voltage and the phase modulated by the SLM can be changed by exogenous factors, such as temperature and aging. Therefore, the SLM needs to be fully calibrated before use. Previous research has focused on compensating phase errors and non-linearity [19][20][21][22] by using different set-ups such as ptychography [23], optical tweezers [24], self-generated grating [25][26][27], as well as various interferometers [28] like Mach-Zehnder [29][30][31][32], phaseshifting [33][34][35] and Twyman-Green [36,37]. However, the phase calibration alone is not sufficient for enabling accurate polarization control, as we outline later in this paper.
The process of calibrating a SLM consists in identifying the drive voltage that flattens the device, as described above. In addition, it also involves establishing a look-up table or approximate model of the SLM response. As the response can vary across the device, one can use a region by region approach. Multi-region calibration has been performed for hologram display [38,39], but these procedures did not account for retardance calibration. In this paper we propose a calibration method that overcomes this shortcoming.
It is also useful to be able to calibrate the SLM in situ, to account for misalignment and changes in the response of the device due to mechanical or thermal drift, or changes in device properties over time. Hence, we present a method, including both hardware and algorithms, that could be built into a simple optical system for calibration of both phase and retardance modulation. It is based on a Twyman-Green interferometer. The phase calibration process analyzes the response of the SLM both with horizontal and vertical polarized incident light. Fourier-based fringe analysis is used to extract the phase from the interferograms. Algorithms are designed to robustly gather calibration data from the interferometer in the presence of external disturbances. Data fitting and optimization are then used to obtain the phase response between the drive voltage and phase on each region. Thereafter, by just inserting an analyzer and blocking the reference arm, the polarization calibration can be realized. Finally, we could obtain a map providing the phase and retardance calibration for each region. The full calibration set-up and data processing methodology introduced in this paper provide a comprehensive method for in situ phase and retardance characterization.

Combining phase and retardance calibration
As a consequence of the manufacturing process, the SLM is not flat and so imparts a spatial phase variation (or aberration) across the beam profile. Hence, an appropriate voltage pattern is usually applied to the pixels of the SLM to cancel out the spatial variation in phase due to the effect of the non-flatness. Let us assume the SLM is used as a phase modulator designed to be used with x polarized illumination. The flatness correction phase function Ψ(x, y) would ideally be defined as y) is the phase delay experienced by x polarized light due to the non-flatness; c is an arbitrary constant phase offset.
When a voltage distribution is applied to the pixels of the SLM, then resultant phase Θ x (x,y) seen by the x polarized light is given by: where ζ v (x, y) is the additional phase induced by the applied voltage. For flatness correction this should be set to be equal to Ψ(x, y). If the correct voltage is found such that ζ v (x, y) = Ψ(x,y), the modulated phase then becomes The y polarized components do not experience a change in phase when voltage is applied, hence where Φ y (x, y) is the phase delay experienced by y polarized light due to the non-flatness. We define the thickness of the cell as t(x, y). When no voltage is applied to any of the pixels, then the optical path length (OPL) seen by the x polarized components of the input light would be L x (x, y) = 2n e t(x, y) where the factor of two arises due to the reflected light passing twice through the cell. For the y polarized components, the equivalent OPL would be L y (x,y) = 2n o t(x,y). n o is the refractive index for the ordinary ray propagating in the liquid crystal and n e is that for the extraordinary ray. We can also derive the phase delay experienced by the two polarization components as: where λ is the wavelength of the incident light. It is clear that: When substituting Eq. (6) into Eq. (3), Eq. (3) could be written as: the retardance of the SLM when the flatness correction is applied is hence n n x y x y x y x y x y x y c n n This makes it clear that applying a flatness correction derived for removal of phase variations in the x polarized component does not result in constant retardance across the SLM. If the SLM is used for polarization control, a re-calibration for the retardance difference is needed.

Methodology
In this paper, we propose a simple set-up and procedure to do both phase and polarization calibration. A Twyman-Green interferometer combined with fringe analysis was used to capture the phase profile of the SLM. Here, we calibrated the SLM with both horizontal and vertical polarized incident light separately. The retardance calibration was then implemented by blocking the reference arm and inserting an analyzer before the camera.

Experimental set-up
We constructed a simple Twyman-Green interferometer for phase and polarization calibration. The schematic is shown in Fig. 1(a). The polarization state of the beam from the He-Ne laser (Melles Griot, 05-LHP-171, 632.8 nm) was y polarized. The beam was first modulated by the half wave plate (HWP) and polarizer to make sure it was perfectly x polarized, and the beam was then expanded to a size that overfilled the whole SLM window (LCOS-SLM Hamamatsu, X10468−07). The light passed through the Beam Splitter (BS), with one path incident onto a reference mirror and the other onto the SLM. A 4f system imaged the SLM onto the camera via the BS, from which the interferogram was captured. The lenses were configured so that one SLM pixel was equivalent to one pixel on the CMOS camera.
To determine any residual aberration in the interferometer, we initially replaced the SLM with a flat mirror and recorded an interferogram, as shown in Fig. 1(b). From this image we obtained a calibration measurement of the phase Φ static , which represents a systematic error in measuring the phase with the interferometer. We subsequently subtracted Φ static from all phase measurements of the SLM to obtain unbiased measurements. Still using the flat mirror instead of the SLM, we verified the susceptibility of the interferometer to external disturbances such as temperature or drift, which inevitably affect our measurements. ε i is used to denote the phase contribution due to these disturbances. We then measured the mean value of the phase of the plane mirror every 0.75 seconds at a temperature of approximately 23°C. The recorded data is reported in Fig. 2. It can be seen that during the three minutes, the phase offset varied due to the experimental conditions, such as mechanical drift, vibration, and temperature change. To ensure an accurate calibration of the SLM, we needed to track the evolution of ε i when collecting calibration data for the SLM.

Phase calibration
In order to use the SLM for precise phase modulation, it is necessary to calibrate the device to determine the relationship between the induced phase and the applied voltage. This SLM was designed for phase-only operation with the voltage-variable fast axis fixed along the x-axis. Hence, we set the HWP at 45° and polarizer at 0° to generate x polarized incident light. To perform the calibration and determine the introduced phase, we collected a set of input-output measurements. In each measurement we applied a uniform voltage across the whole SLM and measured the corresponding interference pattern using the CMOS camera. The voltage was represented in the control program by the integer pixel grayscale value (PGV) displayed on the SLM. The value of PGV was set to zero in the first measurement and gradually increased up to 255 in the last measurement. All the measurements were taken with the same time interval of 0.75s. Throughout this process, the voltage maps were applied without use of the calibration look-up tables provided by the manufacturer.
The interferogram recorded by the camera can be expressed as: where I is the intensity, A, B are the electrical field amplitude of the light from the SLM and the reference mirror, respectively; while Φ s (x, y) and Φ R (x, y) are the corresponding phases. By using Fourier-based fringe analysis [40][41][42][43], the phase profile induced by the SLM could be extracted. The algorithm provided the phase wrapped into the interval (-π, π] radians. As a consequence, one needs to apply a phase unwrapping algorithm [44] to obtain the unwrapped phase Г i , where i denotes the i th measurement in the set. Г i can be expanded into the following: where Φ i is the phase modulated by the SLM; term 2k i π with integer k i is an arbitrary offset due to the phase unwrapping algorithm. The algorithm needs to invert the non-injective complex exponential function to build the unwrapped phase, which results in an arbitrary selection of branches given by k i in each of the measurements. ε i is the phase contribution caused by exogenous disturbances such as drift and temperature trends. Note that terms 2k i π and ε i are constant offsets that are not dependent on the spatial coordinates x and y. To perform the SLM calibration, one must obtain Φ i and remove terms 2k i π and ε i as outlined in the two steps below. Step 1: the values of k i can be obtained by solving an ordinary one-dimensional phase unwrapping problem on the Г i . Then Eq. (10) becomes Step 2: to remove ε i , we simultaneously recorded a second set of reference measurements to track the variation of the exogenous disturbances throughout time. We denote the reference measurements with (R) and the normal, non-reference measurement with (N). The R and N measurements were interleaved in time as depicted in Fig. 3. In the R measurements, the PGV did not vary with index i and was kept at a constant value of zero throughout the set. As depicted in Fig. 3, we used interpolation to deduce the value of ε i in the set of the N measurements, which allowed to subtract ε i from Г' i in Eq. (11) and finally obtain Φ i . Figure  4 shows the results of this procedure for the pixel at the center of the SLM. Step 3: Generally, the corresponding phase can be represented by a polynomial function of the addressed voltage [24]. We assumed the phase change varies as a third order polynomial function of voltage: where , x y d is the 'offset', which is the phase at PGV = 0. The calibration data Φ S was divided into a set of regions over the SLM window. Within each region, the coefficients a x,y , b x,y , and c x,y were determined by curve fitting.
Step 4: to visualize the difference of the coefficients for each region, we subtracted d x,y for each Φ S (x, y), and analyzed the relative phase change comparing to PGV = 0.
The whole process is illustrated in Fig. 5. The above process provided calibration for the modulation of x polarized incident light. Following this, the HWP was rotated to 0° and the polarizer to 90° and the process was repeated to obtain the equivalent calibration for y polarized incident light. If the SLM performs in an ideal way, then no phase modulation with applied voltage should be detected. However, this measurement is essential to detect any effect that may be present due to e.g. misalignment.
The previous steps provided phase calibration of the x and y polarizations separately. One could obtain the retardance by examining the difference between Φ x and Φ y . However, according to Eq. (8), there is an offset c that remains undetermined after the phase calibration only. Therefore, the separate retardance calibration is required.

Retardance calibration
For retardance calibration, the reference arm was blocked and an analyzer with transmission axes at 45° was inserted before the camera. Note that, the fast axis angle of the HWP should be fixed at 22.5°. Thus, the input light to the SLM was 45° linearly polarized and output light was viewed through a 45° analyzer.
The Jones vector of the 45° linearly polarized light excluding the absolute phase was 1 1       and after reflection off the SLM the E x and E y components of the electric field both experience phase delay. This is represented by the Jones vector where Φ x and Φ y are the phase introduced on the x and y components respectively. After passing through the analyzer, the intensity recorded on the camera can be represented as: For polarization modulation, the retardance difference introduced between the E x and E y components of the electric field is of interest, which is Φ x − Φ y . When the SLM voltage is addressed from the minimum to the maximum, the intensity should change accordingly. If we assume the retardance variation as a function of the voltage is similar to Eq. (12), the intensity change could be written as Eq. (14) Equation (14) was then used to fit the intensity data I real recorded from the camera to minimize error of I real − cos 2 (aV 3 + bV 2 + cV + d), where each measurement I real was normalized to its maximum intensity. Hence, the relationship between retardance and voltage could be extracted.

Phase calibration results with x polarized incident light
Figure 6(a) shows Г i at the center point of the SLM extracted via the Fourier-based fringe analysis as the PGV was changed. It is seen that due to phase unwrapping, there is an arbitrary offset of ± 2kπ radians for each data point. These piston offsets were removed in step 1 for both the R and N sets of measurements, resulting in the time series shown in Fig.  6(b). From the adjusted phase measurements in Fig. 6(b), we can extract and remove the offsets ε i to obtain the phase modulated by the SLM, as described in Step 2.  Thereafter, a third order polynomial, Eq. (12) was used to fit the data to get a smooth relationship between PGV and phase Φ S . To select the order of the fitting polynomial, we calculated the fitting errors when using third order and fourth order polynomials respectively. Since this error was about 0.097 rms in both cases, we chose the third order polynomial for computational simplicity. The phase was obtained from the measurement shown in Fig. 8. As the liquid crystal devices forms a continuum, we should expect that the optical properties vary smoothly across the profile. Hence, to reduce the measurement noise and calculation complexity, the original 600 × 800 pixels of the SLM were divided into 30 × 40 sub-regions for the purposes of analysis, as shown in Fig. 8(a). The intensity of the acquired images was averaged over each of these sub-regions. Note that in the bottom-left hand corner a phase singularity can be seen, where the illumination intensity was low. This did not affect the measurements nearer the center of the SLM, which would be within the circular aperture of the full optical system.   (3,15) and (20,15) respectively. Although the initial phase offset at PGV = 0 was different, the trend after data fitting looked similar. Figure 9 shows results after step 4: subtraction of the phase profile obtained for PGV = 0; this allows us to see the difference of the phase introduced by the SLM at different regions. Figure 9(d) shows how the relative phase, i.e. Φ S − d in Eq. (12), varies with PGV at the central region. Figures 9(b) and 9(c) show orthogonal cross sections through the phase modulation at PGV = 155, relative to the reference at PGV = 0. Ideally, the SLM should provide a uniform phase profile in this case. However, our data shows a non-uniform profile, which can possible be attributed to the effects of interference with spurious reflections in the system. In the Appendix, we provide a mathematical derivation of a possible explanation for the effects of such reflections.

Phase calibration results with y polarized incident light
Since the liquid crystal's fast axis orientation is along the x-axis, when the incident light is y polarized, there should ideally be no phase modulation. In order to measure any effects, the HWP fast axis angle and the following polarizer transmission axes were set to 90° to have y polarized incident light. The same procedure outlined in the flowchart of Fig. 5 was followed. Figure 10(a) shows how the phase varies as a function of PGV at the center region. The circles in blue show the phase Г' and the dots in red show the phase and Φ in Eq. (10) after removing the disturbance ε. It is shown that for y polarized light, the phase is predominantly constant with PGV. The cross section of Φ S along the x direction is also shown in Fig. 10(b). Note that without applying the procedure outlined in Section 3.2 one would erroneously detect a significant phase variation due to exogenous disturbances instead of correctly detecting the negligible phase modulation induced by the SLM. We then compared the diffraction efficiency by applying a blazed grating. Table 1 reports the diffraction efficiency using, no calibration, the manufacturer calibration, and our calibration respectively. The results are reported for two different grating periods p. The diffraction efficiency was calculated as I 1 /I 0 , where I 1 was the first order diffraction intensity and I 0 was the total intensity. It is seen that without calibration the diffraction efficiency is the lowest, and our calibration shows improved performance with respect to the manufacturer calibration, on both of the grating periods.

Retardance calibration
In order to perform retardance calibration, we followed the procedure described in Section 3.3: the HWP was rotated to 22.5°, the polarizer and the analyzer transmission axes were both placed at 45° to have 45° linearly polarized incoming light. The reference path was blocked. The intensity profiles measured for different example PGVs are shown in Fig. 11. The variations in intensity at different positions on the SLM show that there are variations in retardance across the SLM. Equation (13) and (14) were used to fit the measured variation of intensity with PGV in order to obtain the retardance calibration. Figure 12 shows the examples of intensity data and the fit data at two different regions. The red dots in Figs. 12(a) and 12(c) denote the intensity recorded by the camera; the blue line is the fit obtained. Using the obtained fit, the change of retardance with PGV could be derived, as plotted in Figs. 12(b) and 12(d). These examples show that the SLM had a spatially variant retardance response.  (19,18) recorded by camera. Blue Line: Fit obtained. (b) Retardance variation with PGV at (19,18) according to fitting result. (c) Red Dot: intensity change with PGV at region (4,17). Blue Line: fit obtained. (d) Retardance variation with PGV at (4,17).

Conclusion
Since liquid crystals are sensitive to exogenous factors, such as temperature, and since SLMs exhibit spatial variations due to manufacturing, calibration of SLMs is important in precision applications. In this paper we have shown that using a SLM for polarization modulation requires performing an ad hoc calibration procedure that is fundamentally different from conventional phase-only calibrations. Our arguments and data show that one should expect non-negligible errors in the control of the retardance when using phase-only calibrated SLMs. We therefore provide a different calibration procedure that addresses these shortcomings.
The presented method requires only simple interferometer hardware, thus making this compatible with in situ calibration, within an adaptive optical system. As the algorithm allows us to remove the effects of external phase disturbance, the requirements for stability of the interferometer are reduced, which permits implementation with simpler hardware. The methodology presented in this paper for region by region calibration of the SLM for both phase and polarization modulation will have valuable applications in adaptive correction systems. It could also be used in applications such as laser beam shaping.

Appendix: effects of the reflections from front surface of the SLM
We investigate here the effects on the interferometer phase measurements of any unwanted reflections in the system. We model specifically the effect of the front window of the SLM, although the analysis is applicable to other spurious reflections in the system. For simplicity, we assume that there are only reflections from one surface of the cover glass and that the amplitude reflection coefficient is given by γ. Any effects of multiple reflections are ignored. Also, for simplicity, we assume that the incoming light is x polarized and that the e-axis of the liquid crystal is aligned with the x-axis. As we will only have x polarized components here, we describe the electric field vector in terms of the x component alone. We also show variation across the SLM using the coordinate x, although in reality the coordinate variables should be (x, y).
The SLM input field is defined as E in (x) = 1. The interferometer reference is taken to be the same: E ref = 1. Following modulation by the SLM, the output field is: The reflected light would have the field: where F(x) is the is the phase profile of the reflected light due to the non-flat front surface of the SLM, according to Eq. (4), it can be denoted as F(x) = OPL × 4π/λ. OPL is the optical path length. The total output field after the SLM would be the sum of the output and reflected fields: where A(x) = 1 + γ(e iξ(x) − 1). We note that for γ << 1, then |A| ≈1. For the same approximation, the argument is given by: ( ) sin arg( ) arc tan arc tan sin sin 1 c os A γ ξ γ ξ γ ξ γ γ ξ The interference field would be the output field plus the reference field, which is: and the measured interference intensity would be: From these expressions, it is clear to see that the effective phase measured by the interferometer will be: which illustrates that the reflection from the front and back cell could be possible explanation of the apparent shape of the phase ripple in Fig. 9(a). The specific calculation here has modelled the effect of a reflection from the front surface of the SLM. However, the analysis could be more generally extended to reflections from other surfaces in the system. The results in Fig. 9 suggest phase variations in the range 0.5 to 1 radian peak to peak. Using this modelling, we find that ripples of the order of 0.5 radians can be obtained for situations where γ = 0.2, which corresponds to an intensity reflection of around 4% of the illumination. This hypothesis matches the shape of the phase patterns, which in turn depends on the distortion of the front and back surfaces of the SLM cell. Experimental measurements show the spurious reflection from the SLM to be <1%. However, there are additional reflections from other components, such as the beam splitter, that have a compounded effect.