**1. Introduction**

Digital holography (DH) is a technology that permits the numerical reconstruction of optical wave fields in both amplitude and phase from a digitally-recorded hologram [1–7]. By processing the information contained in a hologram digitally, this technology has been widely used in many fields, including particle field measurements [1,2], structure testing [3,4], and quantitative analysis of cells [5–7]. However, the digital hologram is still not utilized sufficiently. For example, the phase of the Fourier spectra is often processed together with the intensity to get final reconstructed images, and it can also be used directly in some applications without reconstruction. Dohet-Eraly et al. used the phase in the Fourier domain to achieve numerical autofocusing in DH [8]. However, to the best of our knowledge, direct usages of the phase value still need further exploitation. In this paper, we utilize the phase directly for fast characterization of the phase modulation of a spatial light modulator (SLM).

It is well known that, based on the liquid-crystal birefractive property, SLM has been widely applied in many disciplines, such as optical information processing [9], holographic and/or color display [10,11], pattern recognition [12], and vector beams [13–15]. The modulation is usually achieved by displaying a gray value map to an SLM. Different gray scale values correspond to the different directions of the liquid-crystal optical axis. As the optical axis is changed, the phase and/or intensity of the light beam passing through the SLM is modulated [16]. However, as the birefractive property can be affected by the wavelength of the incident light and the environment, it is necessary to characterize the phase and/or intensity modulation, i.e., to get the relationships between the changes of phase and/or intensity and the gray values [17,18]. The intensity modulation can be easily characterized by an optical power meter, whereas the phase modulation may not be acquired directly. Usually, the phase modulation is characterized using interferometry, such as the Mach-Zehnder [18,19], the Michelson [20], or even the simple double-beam interference [21]. Plane wave is always used as the incident beam; it is divided into two beams, one of which passes through the SLM (named as object wave) and interferes with the other one (named as reference wave) to form the patterns. Usually, two-part gray-scale maps are loaded on the SLM in the phase measurement. The gray scale in one part of the maps keeps the same (usually it is zero), and that in another part varies during the measurement. As the gray value changes, the phase added to the object wave is also changed, which bring on the relative shifts in interference patterns. Then, the phase variation can be obtained by measuring the shift and comparing it with the period of the fringes [16–18,20,21]. This traditional method is convenient, but sometimes it is time consuming to compare the intensity of the patterns to determine the real shifts. It may not be suitable for fast characterization of the phase modulation. Martín-Badosa et al. performed a one-dimensional correlation product to determine fringe displacement, as well as period [19]. This method is more convenient than the traditional method, but the procedure still seems a slightly complicated. Zhang et al. acquired the relationship of the phase shift and the gray value by writing a Ronchi grating pattern for the SLM, but the accuracy was limited by the quantization levels of the image board [22]. Recently, ptychography has been used to characterize SLM with excellent phase accuracy; however, owing to the mechanical shift in the experiment and the iterative algorithm used in the data process, this method is not suitable for fast characterization [23]. Digital holography is also applied for characterization [24]; however, a numerical autofocus process should be implemented, and the tilt distortion may also be considered in the traditional treatment for the hologram. Here, we utilize the phase in the Fourier domain to characterize the phase modulation of SLM. When compared to the traditional method, the new method is much faster and more convenient. SLM, after characterization with this method, is also successfully used for coherent imaging, confirming that the characterization is exact.

#### **2. Analysis and Methods**

Our method is based on digital holography. Figure 1 shows a sketch of the phase measurement setup. Transmissive SLM is used here as an example. Plane waves are used as the light beam. The wavefunction of the beam received at the monitor plane can be written as:

$$
\mathcal{U} = \mathcal{U}\_{\mathcal{O}} + \mathcal{U}\_{\mathcal{R}} \tag{1}
$$

Here, the subscripts *O* and *R* represent the object and reference beam, respectively. The intensities of the two beams are adjusted to be the same and set to 1 in the analyses. The intensity of the obtained interferogram can be written as:

$$I = (\mathcal{U}\_O + \mathcal{U}\_R)(\mathcal{U}\_O^\* + \mathcal{U}\_R^\*) = |\mathcal{U}\_O|^2 + |\mathcal{U}\_R|^2 + \mathcal{U}\_O \mathcal{U}\_R^\* + \mathcal{U}\_R \mathcal{U}\_O^\* \tag{2}$$

**Figure 1.** Sketch of the phase measurement setup. L1: collimation lens; NBS: nonpolarized beam splitter; P: Polarizer; M: Mirror.

The interferogram can be considered as the hologram of SLM after diffraction. By applying Fourier transforms to the hologram, there will be three spots in the Fourier domain, namely the 0th, +1st and −1st order spots. They correspond to *F* # |*UO*| <sup>2</sup> <sup>+</sup> <sup>|</sup>*UR*<sup>|</sup> 2 \$ , *F*{*UOU*<sup>∗</sup> *<sup>R</sup>*} and *F URU*∗ *O* , respectively. *F*{} is the operator of the Fourier transform.

Set (*α*, *β*, *γ)* as the direction cosine of the beams, *Z* as the axis perpendicular to the monitor plane, *X* and *Y* as the axes parallel to it, (*x*, *y*, *z*) as the coordinates in the *X-Y-Z* coordinate system, and *θ* as the phase added by SLM in the object beam, then:

$$\mathcal{U}\_O = F^{-1}\left\{ F\{\mathcal{W}\exp(j\theta)\}\exp\left(jkz\sqrt{1-\left(\lambda f\_x\right)^2-\left(\lambda f\_y\right)^2}\right) \right\}\tag{3}$$

We chose *z* = 0 as the position of the SLM; and the modulation of SLM is considered to be in the pure phase mode. W is the transmitting zone of SLM. It can be treated as a two-dimensional (2D) rectangular function, i.e.,

$$\mathcal{W} = \text{rect}\left(\frac{\mathbf{x}}{a}, \frac{\mathbf{y}}{b}\right) = \text{rect}\left(\frac{\mathbf{x}}{a}\right)\text{rect}\left(\frac{\mathbf{y}}{b}\right) \tag{4}$$

Here, *a* and *b* are the size of the width and length of the transmitting zone. The wave function of *UR* can be expressed as:

$$\mathcal{U}\_R = \exp\left[j\stackrel{\rightarrow}{k}\_R \cdot \stackrel{\rightarrow}{R}\right] = \exp\left[jk(a\_R x + \beta\_R y + \gamma\_R z)\right] \tag{5}$$

where <sup>→</sup> *k* = *k α* → *e <sup>x</sup>* + *β* → *e <sup>y</sup>* + *γ* → *e z* , and <sup>→</sup> *R* = *x* → *e <sup>x</sup>* + *y* → *e <sup>y</sup>* + *z* → *<sup>e</sup> <sup>z</sup>*. Here, <sup>→</sup> *k* is the wave vector of the beam. → *e x*, → *e <sup>y</sup>* and <sup>→</sup> *e z* denote the unit vector of the axis *X*, *Y*, and *Z*, respectively. The +1 order in the Fourier domain can then be written as:

$$F\{\mathcal{U}\_{\mathcal{O}}\mathcal{U}\_{\mathcal{R}}^{\*}\} = F\left\{F^{-1}\left\{F\{\mathcal{W}\exp(j\theta)\}\exp\left(jkz\sqrt{1-\left(\lambda f\_{\mathcal{X}}\right)^{2}-\left(\lambda f\_{\mathcal{Y}}\right)^{2}}\right)\right\} \times \exp\left[-jk\left(a\_{\mathcal{X}}x+\beta\_{\mathcal{R}}y+\gamma\_{\mathcal{R}}z\right)\right] \tag{6}$$

According to the properties of the Fourier transform [25] and considering that *θ* and *z* are constant, Equation (6) can be calculated as:

$$F\{lL\_O^\* lL\_R^\*\} = \begin{vmatrix} ab|\text{sinc}\left(a\left(f\_x + \frac{aR}{\lambda}\right)\right)\text{sinc}\left(b\left(f\_y + \frac{aR}{\lambda}\right)\right) \times \\ \exp\left(jkz\sqrt{1 - \lambda^2 \left(f\_x + \frac{aR}{\lambda}\right)^2 - \lambda^2 \left(f\_x + \frac{R}{\lambda}\right)^2}\right)\exp(j\theta)\exp(-jk\gamma\_R z) \end{vmatrix} \tag{7}$$

The maximum value of the function sinc(*x*) is at *x* =0[25]. If we choose the origin as the center of the Fourier domain of the hologram, the coordinate of the point with the highest intensity in the +1st order spot is <sup>−</sup>*α<sup>R</sup> <sup>λ</sup>* , <sup>−</sup>*β<sup>R</sup> λ* . It is independent of *θ*, and the phase of the point can then be written as:

$$
\varphi = (1 - \gamma\_R)kz + \theta \tag{8}
$$

Usually, *θ* is set to be zero when the gray scale of the image loading on the SLM is zero. As (1 − *γR*)*kz* is the same for all the gray values, the variation *θ* can then be obtained by subtracting *ϕ*0. The subscript 0 means that the gray scale of the image loading on the SLM is zero. The phase modulation is then characterized.

In practice, the experimental setup is sometimes affected by the airflow in the environment. Then, optical path *z* may vary. In most situations, the direction of the beam is unchanged as the optical devices are fixed during measurement. This means that the positions of the ±1st order of the spectra continues to be the same, but their phases change. An unknown phase is added to the objective beam. Considering the cross of the beam is very small, the unknown phase is thought to be the same for every part of the beam. Then, in the practice, we can get the relationship of the phase added by SLM and the gray scale of the image loading on it using the following steps:


Sometimes, the monitor may be tilted to the light beam. In this condition, the optical path *z* is a function of *x* and *y.* It means that Δ*ϕ* contains the phase difference related to Δ*z*, which is the optical path difference between the two selected parts. As Δ*z* is constant during the experiment, its influence will be removed by subtracting Δ*ϕ*0. Here, subscript 0 represents that the gray scale of the reference part being zero.

#### **3. Results**

### *3.1. Simulation Results*

A simulation was applied to test the method shown above. The wave function of the reference beam was *UR* = exp{*j*[*k*(*βy* + *γz*) + *θ*un]}. Here, *θ*un was set randomly to simulate the unknown phase from the vibration of the environment. For simplicity, the phase was added to the reference beam only. As the reference wave was tilted to the monitor, we supposed that optical distance *zR* varied from 14 to 16 mm along the *<sup>x</sup>* axis at the monitor plane. *<sup>β</sup>* was set to be 0.1 and *<sup>γ</sup>* <sup>=</sup> (<sup>1</sup> <sup>−</sup> *<sup>β</sup>*2) <sup>=</sup> 0.9950. A 512 pixel × 512 pixel matrix was used to simulate the transmitting area of SLM. Its length and width were set to 9.216 mm, and the wavelength was set to 532 nm.

The object beam passes through the SLM, where the gray scale in the variable part varied from 0 to 255, and the corresponding phase shift *θ*set was set as a variable value from 0 to <sup>255</sup> <sup>256</sup> × 2π in the step of <sup>π</sup> <sup>128</sup> . The optical distance *zo* from SLM to the monitor plane was set to be 10 mm. The wavefunction *U*<sup>O</sup> on the monitor plane was calculated using the angular spectrum theory. The processes were implemented in the MATLAB 2017a environment with an Intel Core i7-6500U CPU at 2.50 GHz and 8 Gb RAM.

The interferograms with different added phases of *θ* were then obtained. A typical one is shown in Figure 2a. *θ* was calculated following the steps shown in Section 2. The areas surrounded by the red lines were selected for fast Fourier transform (FFT). Their positions were fixed for different interferograms. Figure 2b shows a typical spectra pattern for the variable part; it was like that for the reference part as well. The central point in the +1 order with the highest intensity was chosen to acquire its phase. As discussed above, its position was fixed for all spectra patterns. The calculated phase shift *θ*cal matches the set phase variation *θ*set very well, as shown in Figure 2c.: The relative error was introduced to quantitatively evaluate the characterization. It was defined as:

$$E\_{\rm r} = \begin{cases} \left| \theta\_{\rm cal} - \theta\_{\rm set} \right| / \theta\_{\rm set}(\theta\_{\rm set} \neq 0) \\ \left| \theta\_{\rm cal} - \theta\_{\rm set} \right| (\theta\_{\rm set} = 0) \end{cases} \tag{9}$$

From Figure 2d, for all the *θ*cal, the relative errors are less than 0.01%. The results show that the new method is very exact.

**Figure 2.** (**a**) The simulated interferogram with *θ*set of π. Areas around the red line were selected for Fourier transform; the inset is the enlarged patterns surrounded by yellow lines. (**b**) the frequency spectrum of the selected variable areas; the inset is the enlarged image of the +1st order; (**c**) the relationship of *θ*set and *θ*cal; (**d**) the relationship of the relative error and the gray scales.

#### *3.2. Experimental Methods and Results*

This method was applied to characterize a transmissive SLM (GCS-SLM-T2, Beijing Daheng Corp., China) in the experiments. The size of the pixel of the SLM was 18 μm × 18 μm. The experimental setup can also be seen in Figure 1. A laser with a wavelength of 532 nm was used here. Polarizers P1 and P2 were adjusted to make sure that the SLM worked in the pure phase mode. Two-part gray-scale images were displayed on the SLM during the experiment, just like in the simulation. Figure 3a is a typical image, and the gray scale in its variable part is 100. The corresponding hologram is shown in Figure 3b. There is a shift in the fringes between the reference and the variable parts. Areas with the same size were selected in both parts for FFT, as mentioned in Section 2. Figure 3c shows the spectra of the selected area in the variable part after FFT. The point with the highest intensity in the +1st order of the spectra was chosen to get phase *ϕv*. Its position continued to be the same for all the gray scales. A similar process was also implemented on the reference part to get *ϕr*. Following the same steps as those described in Section 2, the relationships between the gray scale and the added phase could be obtained, as shown in Figure 3d.

**Figure 3.** (**a**) Sketch of a typical image displayed on the spatial light modulator (SLM) with two equal parts as the reference and the variable; the gray scale in the variable part is 100; (**b**) the related interferogram received by the monitor; (**c**) the frequency spectrum of the variable part around by the red dashes in (b), left: the whole patterns; right: the enlarged image of the part around by the dashes in the left; inset: The enlarged image of +1st order; (**d**) the relationship between the phase variation and the gray scale of the image loaded on the SLM.

From Figure 3d, the phases could be adjusted nonlinearly by the SLM. The adjustable range was between 0 and about 0.8π. If the gray scale is below 20, the phase shift increases slowly with the increase in the gray scale value, while it is maintained almost constant with a value of about 0.8π if the gray scale value is beyond 180. For gray scale values between 80 and 130, the phase shift increases nearly linearly with the increasing gray scale value.

The traditional method like that in Reference [18] was also used to verify the new method. Figure 4 presents the main process. At first, the interference patterns were rotated parallel to one edge of the image, as closely as possible. The *x* axis was set to be parallel to this edge. Taking Figure 3b as an example, by properly cutting and slightly rotating it, Figure 4a could be obtained. It seems that the two figures had the same line orientation, because the angle of the rotation was quite small (about 0.05 rad). A dashed line parallel to the *y* axis was chosen in each part of the image (see in Figure 4a). Here, the *y* axis is perpendicular to the *x* axis. The relationships between the intensities along the lines and the *y* coordinates are shown in Figure 4b. Both curves varied periodically and there was a relative shift between them. By measuring the distance of the adjacent peaks or troughs, the period could be obtained. Then it was used to compare the relative shift between the two curves to get the phase shift. Here, as shown in Figure 4b, the period was about 45 pixels, and the relative shift was about 8.1 pixels. The phase shift here could then be calculated as 8.1 <sup>45</sup> × 2π. This means that the relative added phase was about 0.36π when the gray scale was 100. Repeating the same process, the relationships between the gray scale and the added phase could also be obtained. The results are also referred to in Figure 3d. They matched the results obtained by the new method very well, indicating that the new method was effective. The processing time of the two methods were different. For the new method, the total time

consumed was about 1.694 s for characterizing all 256 gray scales in the MATLAB 2017a environment with an Intel Core i7-6500U CPU at 2.50 GHz and 8 Gb RAM. However, for the traditional method, as the comparisons of the shifts were implemented manually to avoid the influence of noises around the peaks or troughs in the curves, the processing time was long; about 30 min for about 12 gray scales. With a simpler procedure, the new method can be implemented more conveniently than the traditional one. As all the steps can be carried out automatically; it can be used to quickly characterize SLM.

**Figure 4.** Sketch of the process of the traditional method. (a) Figure 3b after being rotated slightly and properly cut; the curves beside the pattern represent the intensity along the dashed lines at the left and right parts, respectively; (**b**) comparison of the troughs of the light intensities of the dashed lines.

#### *3.3. Applications in Coherent Imaging*

The characterization with this new method can also be tested using the SLM in coherent imaging. Zhang et al. showed that arbitrary complex-valued fields could be retrieved through aperture-plane modulation [26,27]. In Reference [26], a phase plate was used as the wave-front modulator. By shifting the plate, the authors recorded a set of diffractograms with different modulations and used them to retrieve the complex-valued fields by using an iterative retrieval technique.

Here, we used SLM as the modulator, and different modulations were produced by loading different images on the SLM. The experimental setup is referred to in Reference [26]. For simplicity, only a pure modulus-type specimen was used in the experiment as a prototype. A map with a transparent character J surrounded by a translucent background was treated as the specimen, and its size was about 3 × 3 mm (Figure 5a). The specimen is fixed on a glass by the lighttight taps. The monitor used here was a COMS camera (MER-131-210U3M, Beijing Daheng Corp) with a pixel size of 4.8 μm × 4.8 μm. In the experiment, the distance between the SLM and specimen and that between the specimen and the digital receiver were about 7 and 207 mm, respectively.

Because the phase modulation of the SLM may be affected by the environment, the phase added might have had a slight deviation from what we expected. To reduce the effect, we use random grid-like masks (Figure 5b). Only two gray scales are in the masks; one was 0 and the other was 110, corresponding to 0.440π according to our characterization. We took six different masks to adjust the diffractograms. A typical diffractogram can be seen in Figure 5c. The specimen is then retrieved using the iterative method, the details of which are referred to in Reference [26]. This process spends about 6 s for about 100 iterations. Figure 5d shows the retrieved modulus of the specimen. From the figure, not only character J, but also the background with poor transmittance and the lighttight area around the specimen were retrieved. This confirms that the characterization was available in practice.

*Appl. Sci.* **2018**, *8*, 1146

**Figure 5.** (**a**) A photograph of the specimen and the lighttight blue taps around it. (**b**) a typical grid-like mask sent to the SLM; (**c**) a diffractogram received by the camera; (**d**) the retrieved modulus of the specimen. The scale bar here is 1 mm.

It is possible that a value of *θ* in a range around 0.44π can lead to successful retrieval. During the retrieval process, we set different values of *θ* to investigate how they affected the retrieval. One-hundred iterations were taken for all the *θ*. Figure 6 shows part of the results. When *θ* is set to be 0.439π, it seems that the modulus is retrieved with little loss of the quality (Figure 6a). The specimen cannot be retrieved when *θ* equals 0.437π or 0.443π, as shown in Figure 6b,c. To quantitatively evaluate the retrieval, we introduced parameter *EI*. It is defined as:

$$E\_I = \frac{\sum\_{i} \sqrt{\sum \left( |I\_{\text{cal},i}| - |I\_{\text{exp},i}| \right)^2}}{N\_{\text{mask}} N\_{\text{pixel}}} \tag{10}$$

Here, *I*cal,*<sup>i</sup>* and *I*exp,*<sup>i</sup>* are the intensities of the calculated and the experimental diffractograms for the *i*th mask, respectively. *N*mask and *N*pixel are the total number of masks and the total pixels in a diffractogram, respectively. Considering that a pure amplitude sample was used in the experiment, *I*cal,*<sup>i</sup>* was calculated by the retrieved modulus instead of the complex amplitude. Obviously, a smaller *EI* means a more accurate retrieval. The relationship of the *EI* and *θ* values can be seen in Figure 6d. For Figure 6a–c, the *EI* values are 0.0117, 0.0133 and 0.0245, respectively. As the *θ* value is farther away from 0.440π, the corresponding *EI* should be larger. From the above results, it can be determined that, in this experiment, the retrieval can tolerate an error of *θ* less than 0.006π. From our characterization (see in the inset of Figure 3d), *θ* is 0.437π when the gray scale of the image loaded on the SLM is 109, and 0.447π when it is 111. They both cannot lead to a successful retrieval. This indicates that by direct use of the phase value in the Fourier domain, the phase modulation of the SLM can be precisely characterized in the practice.

**Figure 6.** Results of the retrieved modulus of the specimen for different *θ* values. (**a**) *θ* = 0.439π; (**b**) *θ* = 0.437π; (**c**) *θ* = 0.443π; (**d**) the relationship between *EI* and *θ.* The scale bar is 1 mm.

#### **4. Discussion and Conclusions**

Simulative and experimental results can prove that the characterization of phase modulation of the SLM, based on the phase in the Fourier domain of the hologram, was effective. This means that, for holography, not only the reconstructed wave field from a hologram, but also the phase in the Fourier domain can be directly utilized in practice. Some processes, such as digital refocusing and/or phase compensation, are not needed in the new method and it will be faster than characterization based on the traditional treatment of a hologram [24]. In this method, all steps can be carried out automatically; it can be implemented more conveniently than the traditional method. The SLM characterized by the new method has also been applied for coherent imaging. The results show that, with characterization, the specimen was reconstructed successfully. This indicates that this characterizing method for phase modulation can be precise in practice.

Although the information of the specimen can be successfully retrieved in the coherent imaging system with SLM, the robustness of the system is not very strong. The tolerance of the error of the phases added by the SLM is very small in this system. If the environment varies, the phase modulation may need to be recharacterized. Moreover, variations can also bring pixel misalignments into the experimental setup and lead to a failure in retrieving the information. If the SLM is used effectively in coherent imaging, unexpected relative lateral shifts between it and the monitor, as well as the specimen, must be avoided, and the environment should be kept stable.

#### **5. Patents**

Related patents are showed as follows:


**Author Contributions:** Conceptualization, Z.D. and H.W.; Methodology, Z.D.; Software, Y.F. and X.J.; Validation, F.F. and Y.L.; Formal Analysis, Z.D. and Y.F.; Investigation, Z.D., H.W. and F.F.; Resources, H.W. and Y.L.; Data Curation, H.W., Z.D. and Y.F.; Writing-Original Draft Preparation, Z.D.; Writing-Review and Editing, H.W. and Y.L.; Project Administration, H.W.; Funding Acquisition, Z.D., F.F., H.W. and Y.L.

**Funding:** This work was supported by the Science and Technology Plan Project of Hebei Province (16273901D, 15275602D); the National Natural Science Foundation of China (61465005, 11504078); the International Science and Technology Cooperation (2014DFE00200); and the Natural Science Foundation of Hebei Province (F2018402285).

**Acknowledgments:** The authors are grateful to the anonymous reviewers for their constructive suggestions. We thank Xiufa Song and Sixing Xi for their help in the experiment, and we thank Eddie Wang for his help in the English writing.

**Conflicts of Interest:** The authors declare no conflicts of interest.

#### **References**


© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
