Learning Approach for Flexible Spherical/Aspherical Reflective Surface Control

A deformable mirror (DM) can be used as a dynamically variable wavefront corrector in optical paths for robotic vision and surveillance cameras because its surface shape can be changed and controlled by an array of actuators. Here, we demonstrate that a practically usable model for DM control can be achieved by optimizing regression models. We develop a calculation approach based on the influence function (IF) matrix, in which an actual DM model is introduced along with the uncertainties of surface control errors to generate simulation data. Then, the sampled simulation surface data are trained and the influence function is updated, thereby constructing the required surface profiles directly from an acquired model without the need for a sequence of measurements to obtain compensating data. In particular, an actual piezoelectric DM is applied as an example to demonstrate the calculation process. With consideration of the partial shape convergence, surfaces with a small minimum residual are achieved without the use of in situ measured data in various actuating signal solvers for general DM control, because little care is needed to simulate the variance convergence process when generating the compensating data. In particular, the method is useful for open-loop-control imaging applications.


Introduction
A deformable mirror (DM), the flexible surface of which can be modified to change its shape, can serve as a dynamically variable spherical/aspherical wavefront corrector in an astronomical telescope to increase the stability of in situ optical performance, (1)(2)(3) as well as in robotic vision (4) and surveillance cameras (5) that provide real-time or long-distance imaging. DMs can also be applied to capture high-resolution retinal images (6) and increase the depth of scanning in optical coherence tomography (OCT). (7) In recent research, various applications of DMs for changing the focus and for correction in imaging fields have also been proposed. (8) In these previous studies, methods of controlling the DM based on the influence matrix (IM) (9,10) or the electromechanical coupling model (11)(12)(13) were well established. Because the actuator positional error and electromechanical model error influence the control precision of DMs, which are ultimately manifested as the difference between the ideal surface (initial design) and the actual surface (as applied), these methods still face several difficulties, such as online stable measurement/compensation and a complicated iterative computation process to observe the IM solution; therefore, there is a limited field of view in which the electromechanical coupling effect can be applied. In addition, learning-based methods have recently become a hot topic in computer science. (14) However, it usually requires many hours or even days to experimentally collect tens of thousands of in situ data points for neural network training. This large cost makes these methods unsuitable for in situ imaging, particularly in the process of wavefront measurement, which also requires stable environmental conditions to sample many variable deformable surfaces. Therefore, in this study, we instead use a regression-based learning approach to acquire a more optimized model than those used in previous influence function (IF) methods (11) and realize DM surface control. Thus, we propose alleviating the online measuring/ compensating light path using a series of different selected modes of the surface experimentally acquired for training. Considering that an electrostatic actuator has sub-nanometer position errors with almost no delay or creep, it is expected to exhibit desirable control precision. Therefore, we take a piezoelectric DM with actuators exhibiting approximately 10% hysteresis and 1% creep as an example for our demonstration.
A DM consists of a number of actuators. When the actuators are loaded with the control parameters, a corresponding change in the surface shape of the DM occurs. When the control voltages of the various actuators are arranged in order, they form the control parameter vector S in Eq. (1): where n is the number of actuators, i is the serial number of an actuator, s i is the control parameter imposed on actuator i, and s i [ ] 1]. The IF determines the mapping relationship of the DM, (15)(16)(17) which exists between the control parameter vector and the surface shape characteristic vector of the DM and is defined as c = Gs. Here, G is the IF matrix of the DM, c is the surface shape characteristic vector, and the control parameter vector S is defined as the control voltage of the actuators in order. Then, the mapping relationship Δc N = GΔs N can be satisfied by changes in the DM surface shape as well as corresponding changes in the control parameters. In this way, the correction voltage of the DM surface shape can be computed. A wavefront sensor offers the ability to measure the incident beam with two-dimensional focused spots. The integral of each focused spot is acquired by a detector that is synchronized with the sensor, yielding a series of phase data in the wavefront. High control precision of a DM can be derived for closed-loop control realized using the feedback data from the measured wavefront in a convergent manner when the residual error applied to the correcting optical path is measured iteratively. (1) The matrix pseudoinverse method, (18) steepest descent (SD) method, (19) and iterative learning control (ILC) method have been investigated as ways to solve the IF. In the pseudoinverse method, a pseudoinverse of the IM is identified using singular value decomposition (SVD) or the least-squares method; this method is simple but lacks robustness, and its accuracy is mainly affected by the measurement accuracy and correctness of the IM, e.g., severe overflow of the control voltage when reaching the limits of the change in surface shape. The SD method was proposed to improve the robustness because its control parameters are modified by the product of the transposed IM, the gain coefficients, and the surface residual. This method can reduce oscillations in the control parameters; however, the entire iteration process converges stably and the iteration time is relatively long. (20,21) To improve the convergence speed, an iterative control method was proposed to optimize the solution process of the IF using a multivariate statistical method (12,13) In addition, an alternative iterative measurement approach was investigated by calculating the mapping relationship (i.e., the mapping between the polynomial terms of the surface shape and actuator driving voltage), (12)(13)(14)(15)(16)(17) with the results showing that on average at least 10 iterations are needed to converge to the desired surface shape. One way to increase the control efficiency is to address the deformation of DMs in the mechanical model (22) and obtain the analytical solutions of the control parameters based on a surface shape correction. This method has a fast response; however, it is limited to simplified mechanical models of DMs, the surface shape residual is not corrected, and partial shape convergence cannot be achieved correctly.
In our previous research, we used the measured profile data of selected sampling surfaces and statistical regression to find the IF solution, and achieved a high convergence speed for surface control and a small minimum residual Eor RMS . The results showed that this calculated mapping matrix could characterize the DM performance, as the influence of the linear model, the hysteresis of the actuator, and the coupling relationship between the actuators were reflected in the measured data. The precollected in situ control parameters, which were paired with the corresponding known measured surface shapes, were used to train a linear regression model and then used to improve the accuracy of the test control parameters. The results showed that the imperfect control parameters were optimized; however, on average, three iterations were required for the controlled surface to converge, and the results showed that the influence of partial shape convergence on the surface control errors should be examined. Thus, the motivation of the present work is to design a regression-based approach for learning that can reconstruct the surface shape directly from the control parameters by examining various kinds of selected modes of measured DMs for small-dataset training with optimized regression models, particularly with consideration of the partial shape convergence, achieving surfaces with a small minimum residual without the use of in situ measuring data. Experiments were performed on defocused surface shapes of various values.

Materials
The measurement system consisted of a ZYGO-DynaFiz dynamic laser interferometer at a wavelength of 632.8 nm, a computer, an attenuator, DMs, wiring, and optical support, as shown in the purple inset block in Fig. 1. The control parameters were loaded into the various actuators through the computer so that the surface shape of the DM could be controlled. The system was kept in a confined space to guarantee the accurate metrology of the optics in the presence of air turbulence and extreme vibrations. It also provided a stable temperature. The data of the wavefront map were converted to the surface sag and expressed as a mechanical profile. Because the surface of the DM was highly reflective, an attenuator was inserted between the interferometer and the DM to reduce the intensity of the reflected light and facilitate measurement.
The piezoelectric DM (PDM, the DM under measurement in Fig. 1) (23) was applied in the above system for our experimental demonstration. It mainly consisted of three parts: a substrate, a piezoelectric actuator, and a flexible faceplate as a reflecting mirror. The optical aperture (d) was 30 mm, the number of actuators was 37, and the peak-valley (PV) value of the mechanical deformation of the mirror is 8 μm. The PDM actuators were arranged in a hexagonal pattern, and the separation distances of the actuators were equal, as shown in Fig. 2. (24) The actuating signal of each actuator was in the range [−1, 1] (with −1 and 1 as two extreme actuating voltages) and directly proportional to the actuator stroke. The centers of the actuators on the outer ring were situated 2.1 mm from the outer edge of the mirror surface. Based on the principle diagram of the PDM structure, the outer edge of the mirror surface was free. These structural features gave the actuators a weak influence on the outer edge of the mirror. The working aperture R of the surface was smaller than the full DM aperture R 0 . The experimental data were acquired within the working aperture of the PDM. A certain number of actuators were positioned outside the surface aperture (that is, the working aperture, or the effective aperture in optoelectronic systems).
Characterized shapes of DM surface profiles are critical to this learning method. For imaging purposes, characterizing the surface shape by reference to a best-fit sphere is therefore helpful. Another critical consideration is that an orthogonal basis is required for calculation efficiency and numerical robustness when characterizing the shape. Thus, to meet the requirements of various applications, e.g., wavefront correction or focus change and correction in imaging fields, the surface sag was expressed explicitly as a conic base [shown in Fig. 3(a) and defined in Eq. (2)] with an additive deviation expressed as a polynomial, e.g., the Zernike polynomial in Eq. (3), which is a simple generalization for characterizing rotationally symmetric optics. Moreover, to fully specify the characteristics of the DM, the surface shape of the partial part perimeter should also be described. Rectangles, hexagons, and ellipses are familiar examples of aperture shapes, but their specification is not as simple because the partial part perimeter is not located in a plane, while the surface shape within a circular cylinder can use polar coordinates, as shown in Fig. 3(b). As an orthogonal basis, we used the Zernike polynomial, which is necessarily calculated over a specific region; thus, the circular aperture was adopted to enclose the partial part of the surface shape, and concentric circular apertures with increasing size from 10 to 100% of the region were adopted, as shown in Fig. 4.
Here, c con is the conic axial curvature and κ is the conic constant. To represent the surface shapes in Eq. (2), the Cartesian coordinates {x, y, z} with a vertical z axis were used. s is the displacement from the origin of the surface central part's vertex and can be represented in cylindrical polar coordinates {ρ, θ, z}, where x = ρcosθ and y = ρsinθ. The term Z K (x, y) in Eq. (3) is the Zernike polynomial, and c K is the coefficient of the polynomial.  In Eqs. (2) and (3), the coefficients and the polynomial base function as variables and highlight the freedom in configuring the sampling surfaces. Any of them can be used during optimization as part of the analysis provided that the surface has appropriate focusing and aberration-correcting parameters. In this way, spheres with a curvature radius and the Zernike polynomials are ensured to be excellent surface samples as far as the surface controllability is concerned. Zernike term surfaces have been considered a priority (i.e., the control precision of the first five orders of Zernike terms are of particular importance for 37-channel DMs), and the low-order Zernike term surfaces were numbered pz01-pz11. Convex/concave surfaces with different curvatures were selected and numbered p55-p58. Because the change in the sag departure from a polynomial determines the imaging ability of aberration compensation, for a DM, the strokes of actuator driving play this role. That is, the term in brackets in Eq. (1) is written as changes in the surface shapes to construct surface samples so that the change in the sag departure at different azimuths from the nominal surface profile satisfies the requirement. The sample surfaces numbered p06-p45 were selected. Then, the remaining step was to determine the rate of change in the sag departure from zero-voltage control so that the degree of linearity of control could be calculated. After performing voltage segmentation on central actuator channel 1, the calculation conditions were considered and the sample surfaces were numbered p46-p54. After voltage segmentation was performed on all actuator channels, the sample surfaces numbered p01-p05 were selected. Overall, 69 surfaces were designed for the measurement experiment. The actuating signals and surface shapes are summarized in Table 1.

Models
We used a sparse sampling algorithm to obtain the sparse control parameters θ N , recovered the changes in the actual control parameters, and successfully obtained the corrections Δs N of the control parameters given by Eq. (4) using the iterative relationship among the control parameters of the DM as defined in Eq. (5): where φ is the sparse matrix. The sample data of one surface for the control parameter change sample set s ∆ and the surface shape eigenvector change sample set c ∆ were acquired in experimental measurements (to reduce the effects of hysteresis of the actuators, the total sample number was determined to be larger than 80). Then, the sample set was used to complete the following least-squares optimization and obtain the IF matrix, as expressed in Eq. (6), where F  is the Frobenius norm: (25) Then, the surface errors of the selected sample surfaces in Table 1 were measured. Thus, all the model uncertainties are included in the measurement results in the form of sag departure along the z-axis from its nominal position. The root mean square (RMS) surface errors err are calculated in local specific regions (as discussed above, using the concentric circular apertures indicated in Fig. 4). The application of the sparse sampling algorithm successfully yields a converged surface shape. However, the RMS surface errors err calculated in local specific regions change, and as a result of the error accumulation of the partial shapes, the surface control errors of the solution will change accordingly. Figure 5(a) shows that the results of the actuator-related surfaces p01-p58 are distributed in a constant range, and their mean values increase monotonically, while the variances in the 10% circular regions and the 100% circular regions are 12.34 and 25.68 nm 2 , respectively. Figure 5(b) shows that, except for pz02 ( 0 2 Z ) and pz03 ( 2 2 Z ), which possess larger mean values, the variances in the data of the 11 PDM Zernike term surfaces are small, particularly for the remaining nine surfaces, where the variances range from 1.00 to 1.33 nm 2 in the circular regions. These RMS surface errors err are used because they indicate the rate of change in the sag departure from an ideal surface, which drives the ability of actuator control, as the change in the sag departure from a polynomial determines the imaging ability of aberration compensation. The strokes of actuator driving play this role.

Zernike aberration terms
Therefore, varying surface control errors exist among the least-squares solutions with increasing radius of concentric circular apertures for DMs, which together cause instability of the results. In this case, attempts need to be made to adjust the rate of change in the sag departure so that the errors are kept within an allowable range. In this study, to solve this problem, the basic idea is to make a larger value of variability have less impact on the analysis and a smaller value of variability have more impact so that the variability is more balanced and easier to analyze. The method is to refine Eq. (6) as follows: where W is the diagonal matrix of weights, which is defined as the function of these variances r i in the ith partial circular region, and ε is a prior parameter. Using this approach, we can study the dynamic behavior of the DM. By choosing a large β, we force the convergence of the tracking error to decrease; by contrast, by decreasing β, we increase the convergence speed of the algorithm. In this way, we adjust the actuators in different partial regions, and we identify a new IF. Zernike polynomial fitting is employed as follows. In the surface sag data obtained, the number of sampling points was approximately 700000 for each PDM surface. To increase the surface fitting efficiency, 500 edge-clustered points were sampled within the working aperture. Kaya et al. (26) reported that, compared with uniform sampling, the edge-clustered sampling strategy was able to suppress edge ringing that arose in the polynomial fitting of surfaces with nonsymmetric features. Because the surface-measured data obtained using the Zygo interferometer were plotted on a rectangular grid, the surface sag at each of the 500 sampling  points was estimated by averaging four points at a time. (27) Specifically, if a measured point from the Zygo interferometer was coincident with a sampling point, the surface sag at the sampling point was used as the sample value; if the measured point lay on a line section joining two adjacent sampling points, the average of the two measured points was used as the sample value. Otherwise, the average of the four measured points adjacent to the sampling point was used as the sample value. Least-squares surface fitting was carried out using the first five orders, i.e., 21 terms, of the Born and Wolf Zernike polynomials. (28) 3. Results

Experimental comparison using regression models
We use multivariable linear regression models to analyze the controlling error effect within partial regions when retrieving surfaces using the IF. First, fitting the regression model to the data calculated using Eq. (7), we define the model as AZWreg. For comparison, Eq. (6) was used to fit another regression model as AZreg. Fifty of the 58 PDM surfaces were used as the sample set, and the remaining eight surfaces (p04, p09, p16, p34, p44, p47, p51, and p55) were used as the test set. Thirty-seven actuating signals and the first five orders (21 terms) of the Zernike coefficients, which were used to describe the characteristics of the DM surface, were chosen as the initial independent variables. Then, the regression models were developed by the stepwise method. The significance test results of the two regression models are listed in Table 2. According to their respective p-values, the F-test, AZWreg, and AZreg are significant at the 5% significance level. The values of the adjusted R-squared indicate that AZWreg fits the data better than AZreg.
The two regression models were applied to predict the surface control error values of the eight surfaces in the test set. The prediction error (i.e., the difference between the predicted value and the actual value) was denoted as Err. The relative error (i.e., the ratio of the prediction error to the actual value) was denoted as RelErr. The Err and RelErr values are listed in Table 3. The prediction error of both models was less than 10 nm. Despite relatively high error rates for p09, the RelErr of AZWreg was generally less than 7%.

Control experiments for spherical profile surfaces using the actual PDM
As discussed above, the surface sag is expressed explicitly as a conic base with an additive deviation expressed as a Zernike polynomial. Thus, in this study, we particularly discuss the controllability of spherical profile surfaces for specifying characteristics of the DM, and the surface control errors are evaluated by using Zernike coefficients of different orders. We performed control experiments on surface shapes with various defocusing values based on our proposed algorithm by using an actual PDM (model number PDM30-37). Spherical surfaces with a curvature were generated in the range of −0.05 (1/m) to +0.05 (1/m), where a positive curvature corresponds to a concave spherical surface and a negative curvature corresponds to a convex spherical surface.
To calculate the control parameters directly, we define the spherical shapes of convex/ concave surfaces p55 and p56 as the initial state surface shape c ini of the mirror and the parameters as the initial state control parameter s ini . Then, surface control experiments are carried out. The measurement results for surfaces of various controlled DMs are extracted via an interferometry measurement and plotted. Figures 6 and 7 indicate the results with and without consideration of the controlling error effect within partial regions, respectively, in specifying the IF.
The surface control errors for all the surfaces are shown in Figs. 8 and 9, which were extracted and are indicated using Zernike coefficients. Using the improved IF with consideration of the control error effect within partial regions, the surface control errors of PDM30-37 were compensated, and the residual surface errors of the DM were reduced. The 1st-6th-order errors are fully corrected, the Zernike coefficient of the surface shape residual error is reduced from 1/50 λ to 1/1000 λ, and the values of their 3rd-6th-order coefficients approach zero.

Conclusions
In the present study, a method for specifying the surface control errors of flexible spherical/ aspherical surfaces was proposed in relation to open-loop-control imaging design. This was done to achieve predictable, precise, and region-dependent surface control of PDMs by retrieving the actual surface shapes in the control step. After the surface profiles within the working aperture were defined and calculated, the control error and its distribution characteristics were compared among mirrors with different actuating principles and different surface types.
The results showed that after balancing the impact of variability within specific partial regions, the surface control errors were smoother for the experimental surface shapes. Compared with the previous methods, the surface control errors were compensated, and the residual surface errors were reduced. The 1st-6th-order errors were fully corrected, and the Zernike coefficient of the surface shape residual error was reduced from 1/50 λ to 1/1000 λ. In summary, the proposed method converges accurately and rapidly, and its control accuracy is considerably superior. At the same time, the solution of the control parameters takes into account the creep characteristics of a DM synthetically; therefore, a control parameter database of the convergent surface shape can be established for the DM application system. Thus, the proposed method provides a superior solution for the control of DMs, thereby serving as a better control method for the open-loop-control imaging application of DMs. In this way, a DM can demonstrate dynamically the required flexible spherical/aspherical reflective surface profiles and satisfy the requirement of high-resolution imaging, as well as achieve fast focusing and in situ stable optical performance in real-time or long-distance imaging, which are crucial for robotic vision and surveillance camera technology. In future work, the correlation between the surface control errors and the parameters of a DM device will be investigated using the convolutional neural network (CNN) method, so that a general optimization of the control accuracy can be achieved. Xuemin Cheng received her B.S. degree in measurement and controlling technology and instrumentation and her Ph.D. degree in optical engineering from Beijing Institute of Technology, Beijing, China, in 1998 and 2004, respectively. Since 2007, she has been an associate professor at Tsinghua University, Shenzhen Campus. Her research interests include optical design and engineering, including imaging system design, illumination system design, optical modeling, and simulation. Shuyang Li is currently a postgraduate student in instrumentation and device technology at Tsinghua University. Her research mostly involves the completion of a project on zooming imaging, aberration identification, and optical modeling, and the simulation of deformable mirror surface profiles and shape control. Xingjun Zhou is currently pursuing his master's degree in instrumentation and device technology at Tsinghua University, China. His research mostly involves the completion of a project on zooming imaging, aberration identification, and optical modeling, and the simulation of deformable mirror surface profiles and shape control.