## Abstract

The description of deformable mirror (DM) surface, which is usually a complex freeform surface, affects the measurement speed and accuracy in a real-time interferometric measurement system with a DM as the dynamic compensator. We propose an accurate and fast description method with automatically configurable Gaussian radial basis function. The distribution and shape factors of GRBFs are related to the complexity of the surface with sufficient flexibility to improve the accuracy, and the fitting results are automatically obtained using a traversal optimization algorithm, which can improve the fitting speed by reducing the number of time-consuming calculations. The feasibility is verified by numerical and practical experiment.

© 2021 Optical Society of America under the terms of the OSA Open Access Publishing Agreement

## 1. Introduction

Optical freeform surfaces are increasingly used in various optical systems because of their design degrees of freedom; they can simplify the structure and improve the system performance, but their manufacturing and measurement currently face great challenges [1–5]. The measurement of the freeform surfaces with large dynamic range generated during the optical manufacturing process guides the next fabrication process [6,7]. Interferometry is a good option to realize measurement especially during the polishing stage because of its high accuracy, noncontact, and fast measurement speed [8–10]. Thus, a real-time interferometric method with a larger dynamic range is required.

The interferometric system using deformable mirror (DM) as compensator has the advantages of real time and large dynamic range because DM can generate different complex freeform surfaces in real time [11,12]. This approach is better than using the traditional compensators with poor universality, such as lenses, lens groups [13,14], catadioptric compensator [15], and CGH [16,17]. The DM surface needs to be described with high accuracy during the design, implementation, and error correction of the interferometric system. In the design of the system, the DM surface needs to be appropriately described to fully compensate the aberration of the system [15]. In constructing the actual system, the target surface shape also needs to be described to implement the control of the DM, for example, by the influence function matrix method [18]. In the measurement stage, specifically in partial compensation interferometry, describing the DM surface is still necessary to realize the retrace error correction through reverse optimization [19,20].

The DM surface in the interferometric system is usually a complex freeform surface with local features, owing to the following aspects. First, to compensate the aberrations of the measured surfaces with large dynamic range, the surface shape of the compensator, the DM, is complex [4,5]. Second, most DMs belong to the piezoelectric type, which generates the surface shape by controlling the length of each piezoelectric ceramic actuator to change the shape of the metal layer [18]. Local bumps are easily produced because piezoelectric ceramic actuators are discretely distributed even when the surface is continuous. In addition, the DM surface needs to change continuously in real time with the measured surface in the working process of the real-time interferometric system. Therefore, the description of DM surface needs to be accurate, automatic, and fast.

Thus far, the freeform surface description methods mainly include Zernike polynomials, Q-type polynomials, XY polynomials, nonuniform rational basis spline (NURBS) function, and radial basis functions (RBFs). The Zernike polynomial [21,22] is the most popular polynomial in the description because its polynomial terms are related to the Seidel aberration. This characteristic is conducive to systematic evaluation. However, because Zernike belongs to the global type, its ability to describe the local features is limited, indicating that the fitting error in the area with local features is large, leading to the decline in accuracy. Similar to Zernike polynomials, Q-type [23,24] and XY polynomials [25] are global types; thus, they are unsuitable for the description. The NURBS [26] with localized description ability is widely used in computer-aided design and freeform surface construction. However, its calculation is relatively complicated, which is not conducive to satisfying fast requirement. The RBF has multicenter characteristics and localized description ability, and its calculation is relatively simple [27]. When describing the freeform surface, the RBF has the following characteristics. First, the basis function has more than one form [27]. Second, the distribution of RBFs and their shape factors are flexible and not fixed, and they can be determined using optimization algorithm [28–30]. Third, the RBF is a nonorthogonal basis, and the orthogonalization is not required [26]. Furthermore, it is suitable for arbitrary apertures [29]. The RBF has the potential to describe the DM surface due to these characteristics.

Chan et al. proposed the surface description potential of the RBF [31]. Currently, Gaussian function is one of the most popular forms of basis function in the description of freeform surface due to its advantages. It is a smooth function, which can be approximated as a local bump and conducive to theoretical analysis because the Fourier transform of the Gaussian function is still a Gaussian function. As shown in Eq. (1), it is an expression that uses Gaussian radial basis functions (GRBFs) to describe the freeform surface [28,29].

*m*is the number of sampling points on the freeform surface, and

*n*is the total number of GRBFs that participate in the description. In addition, ${\varepsilon _{{\textrm{x}_j}}} = {\varepsilon _{{\textrm{y}_j}}} = {\varepsilon _j}$ when using isotropic GRBF. The distribution of GRBFs is equivalent to the distribution of the center of GRBF. According to Eq. (1), the distribution of GRBFs and the value of the shape factors are the key factors affecting the fitting results.

In earlier literature, the GRBFs were distributed on different kinds of grids, and the value of the shape factors of all basis functions was the same, that is, the shapes of all basis functions were identical. Among the representative works, Cakmakci et al. [27,32] proposed isotropic GRBFs, which were distributed on a uniformly spaced grid with an identical shape factor. This method was successfully applied to the design of helmet-mounted display device [33,34]. However, the description accuracy of this method is limited by the inflexibility of the distribution and shape factors of GRBFs. Maksimovic et al. [28,35] proposed anisotropic GRBFs for optical design and tolerancing analysis. The influence of the grid type of the distribution of GRBFs on the description accuracy was analyzed, and an optimization algorithm was used to determine the value of the shape factors. Subsequently, Stock et al. [36] used the isotropic GRBFs to describe most of the low-frequency components in the freeform surfaces on the basis of the study of the grid type in Ref. [28,35], and an optimization algorithm was proposed to determine the shape factors. Thus far, in the research method, the distribution of GRBFs is still limited by the grid, and the shape factors are identical, thereby restricting the flexibility of GRBFs. Therefore, the accuracy of describing complex freeform surfaces with local features is limited.

To improve this situation, Zhao et al. [29] proposed a model with radial basis functions on the basis of the surface slope (RBF-slope) and applied it to optical design [37]. In this method, the grid in Ref. [27,32] is improved, that is, the grid nodes outside the aperture were evenly distributed on the edge of the aperture. The shape factors, which are flexible and not identical, were obtained according to the surface slope. RBF-slope improves accuracy. However, the distribution of GRBFs is still grid based, and the shape factors are related to an artificial set parameter. Thus, this method does not satisfy the requirements of automation. Subsequently, Zhou et al. [30,38] proposed an adaptive RBF method for describing complex freeform surfaces. The distribution of each basis function and the value of its shape factor were automatically obtained by an iterative algorithm with strong flexibility and high accuracy. However, each iteration of the algorithm requires time-consuming calculations and the number of iterations is large. Thus, the speed is limited.

Therefore, a method with flexible distribution of GRBFs and nonidentical shape factors is needed to describe the DM surface with high accuracy. At the same time, it needs to be fast and automatic to satisfy the real-time requirements of interferometric system.

We propose an accurate and fast description method with automatically configurable Gaussian radial basis function (AC-GRBF) for complex freeform surface with local features. In AC-GRBF, the distribution and shape factors of GRBFs are related to the complexity of the surface shape with sufficient flexibility and rules to improve the accuracy, and they are obtained based on the gradient and the coefficient *A* proposed in this paper. The fitting model is optimized with an efficient traversal optimization according to the requirements of fitting accuracy, and the fitting result is obtained automatically and quickly.

This paper is organized as follows: Section 2 introduces the principle of AC-GRBF, including the distribution of GRBFs, definition of the coefficient *A* and the value of the shape factors, introduction of optimization algorithm, and fitting speed analysis. Section 3 shows the numerical experiment for the analysis of the relationship between a key factor in the distribution of GRBFs, coefficient *A* and fitting error, as well as demonstration and analysis of AC-GRBF fitting for the freeform surface with known theoretical expression. In Section 4, we describe two different actual DM surfaces and compare the fitting results of AC-GRBF and Zernike polynomials. Section 5 shows the conclusion.

## 2. Method

In AC-GRBF, the distribution of GRBFs is obtained by dividing the aperture into subapertures, and it is related to the complexity of surface shape by gradient. Then, a coefficient *A* is defined and associated with the distribution of GRBFs to determine the value of shape factor ${\varepsilon _j}$, which are also related with the complexity of surface shape. Finally, a traversal optimization algorithm, which can improve the fitting speed by reducing the number of time-consuming calculations, is used to optimize a key factor related to the distribution of GRBFs and the coefficient *A* to achieve the optimization of fitting model according to the requirement of fitting accuracy.

#### 2.1 Distribution of GRBFs

In the description of freeform surface, the fitting error decreases with the number of GRBFs. However, in practical application, the number of GRBFs used is limited. The GRBFs should be reasonably distributed in accordance with the features of freeform surfaces to improve the fitting accuracy. Intuitively more GRBFs should be distributed in the areas with more complex surface shapes, and less GRBFs should be distributed in the areas with relatively simpler surface shapes. To achieve this goal, the complexity of freeform surface should be analyzed by processing the sampling points on the surface obtained from the numerical modeling or the measurement of the actual freeform surface.

The sampling points should be normalized to avoid the necessity to adapt to the dynamic range in the description process because the shape and size of the aperture are different, and the sag range of the sampling points of different freeform surfaces is also inconsistent. After normalization, the aperture is in the unit aperture and the surface sag is in the range of [0,1], and the normalized coordinate point is denoted as $({x_i},{y_i})$ and the normalized surface sag $z({x_i},{y_i})$.

Subsequently, we divide the aperture into subapertures to obtain reasonable distribution of GRBFs efficiently by analyzing the characteristics of each subaperture instead of each sampling point. Then, the number and distribution of GRBFs in each subaperture are obtained.

First, the aperture of the freeform surface is uniformly divided into rectangular subapertures. The area consisting all the subapertures is larger than the circumscribed rectangle of the aperture to distribute sufficient GRBFs at the edge area of the aperture. If the aperture is circular, then the circumscribed square with 110% of its diameter is equally divided. If the aperture has another shape, such as a rectangle, then the circumscribed rectangle with 110% of its side length is equally divided. The number of subapertures is denoted as *N*, which is a square number.

Second, the number of GRBFs in each subaperture is determined according to the gradient of the sampled points in each subaperture. The gradient can reflect the slope of the surface shape that can further reflect the complexity of the freeform surface. For the normalized sampling points, the gradient vector and gradient amplitude $G({x_i},{y_i})$ of each point are solved as follows [39]:

The number of GRBFs of the *k*-th subaperture ${n_k}$ is determined by the following:

*k*-th subaperture. Evidently, the number of GRBFs in a subaperture is related to three factors. First, ${n_{\textrm{base}}}$ is a basis number of all GRBFs participating in the description, which is the basis for obtaining the number of GRBFs in each subaperture. Second, $P{V_k}$ does not adopt the PV of $G({x_i},{y_i})$, but adopts the PV of the square root of $G({x_i},{y_i})$ instead. The reason for this issue is as follows: if ${n_k}$ is distributed according to the PV of $G({x_i},{y_i})$, then it is easily affected by local or individual points with large gradient value, thereby resulting in excessive concentration of GRBFs. In addition, the current definition of $P{V_k}$ is helpful for smoothly varying the distribution of the number of GRBFs. Third, $P{V_k}$ is proportional to the complexity of the surface shape in the subaperture to reasonably allocate ${n_k}$.

The sum of ${n_k}$, denoted as *n*, is the total number of GRBFs that participate in the description and defined by the following:

Finally, the distribution of GRBFs in each subaperture is obtained. In order to balance the efficiency and the accuracy, we distribute GRBFs in the subaperture according to the principle of uniformity rather than the local complexity of the surface in the case that ${n_k}$ is allocated according to the complexity of the surface. Figure 1 shows the schematic of the distribution of GRBFs within the subaperture.

If ${n_k} = 2$, then the GRBFs are evenly distributed on the center line of the *x*-axis direction of the subaperture, as shown in Fig. 1(a).

If ${n_k} \ne 2 \cup {n_k} \ne 0$, then we define $l = \left|{\sqrt {{n_k}} } \right|$. If $l \in \textrm{N}$, then the GRBFs are uniformly distributed in a grid of $l \times l$ in the x-axis and y-axis directions according to the side length of the subaperture, as shown in Figs. 1(b) and 1(c). Otherwise, if $l \notin \textrm{N}$, then we define ${l_x} = \textrm{ceil}(l)$, and ${l_y} = {{{n_k}} / {{l_x}}}$. If ${l_y} \in \textrm{N}$, then the GRBFs are uniformly distributed in a grid of ${l_x} \times {l_y}$ in the *x*-axis and *y*-axis directions, as shown in Fig. 1(d); otherwise, some GRBFs are arranged in a ${l_x} \times ({l_x} - 1)$ grid, and the remaining ${n_k} - {l_x} \times ({l_x} - 1)$ GRBFs are uniformly distributed in the last row, as shown in Fig. 1(e).

In summary, to improve the operation efficiency, we analyze the characteristics of the subaperture instead of each point to obtain the complexity of the surface shape, which is proportional to the number of GRBFs of the subaperture. The distribution of GRBFs in the subaperture no longer considers the local complexity of the surface shape, but aims at uniformity. Compared with the existing schemes, the distribution of GRBFs is related to the complexity of the surface with sufficient flexibility, which is conducive to the description accuracy. In addition, in the case that ${n_{\textrm{base}}}$ is determined, the distribution of GRBFs is based on rules rather than optimization algorithm, which is conducive to the efficiency. Therefore, it is a distribution scheme that considers accuracy and efficiency, and it can be applied to circular and other apertures.

#### 2.2 Coefficient A and the shape factors

In addition to the distribution of GRBFs, the value of the shape factor of each GRBF is the key to the description. We propose a coefficient *A*, which is related to the distribution of GRBFs to determine the shape factor of each GRBF. The shape factor obtained by this method is related to the complexity of freeform surface. This method is flexible and does not rely on experience.

In order to improve the fitting speed, we adopt isotropic GRBF, which has one less parameter to be determined than anisotropic GRBF. For isotropic GRBF, ${\varepsilon _{{\textrm{x}_j}}} = {\varepsilon _{{\textrm{y}_j}}} = {\varepsilon _j}$. The relationship between shape factor ${\varepsilon _j}$ and variance ${\sigma _j}$ of *j*-th GRBF can be written as follows:

*A*to characterize the ratio of ${\sigma _j}$ to ${d_j}$ of the

*j*-th GRBF. ${d_j}$ is the minimum interval between the center of the

*j*-th GRBF and the center of other GRBFs, which is related to ${n_{\textrm{base}}}$ and can be determined according to the distribution of GRBFs arranged by the method in Sec. 2.1. The coefficient

*A*of each GRBF is the same, and it is defined by the following: Combining Eqs. (7) and (8), indicates the following:

According to Eq. (9), ${\varepsilon _j}$ is inversely proportional to the product of *A* and ${d_j}$. Smaller *A* leads to lager ${\varepsilon _j}$ and sharper GRBF, which is conducive to describe complex surface shape. Denser distribution of GRBF leads to smaller ${d_j}$ and larger ${\varepsilon _j}$, which is conducive to describe the local area with complex surface shape. When ${d_j}$ is known, the appropriate option of *A* should satisfy the requirements of describing freeform surfaces with local features of different complexity, the optimization algorithm of which is proposed in Sec. 2.3.

In summary, the shape factors are associated with the complexity of the freeform surface through ${d_j}$ and *A*, and they are nonidentical. Compared with the current literature, the shape factors are flexibly changed according to the surface shape, and they are obtained by rules rather than experience or optimization algorithms in the case that ${n_{\textrm{base}}}$ and *A* are determined by the optimization algorithm, thereby conducive to improving efficiency. Thus, it is a flexible method that can satisfy the requirements of fast calculation and automation. In addition, the method of determining the shape factors by coefficient *A* is universal. That is to say, if the distribution of GRBFs obtained by other methods is reasonable and related to the complexity of the surface, *A* can still be used to determine the value of the shape factors, which are still related to the complexity of the surface.

#### 2.3 Optimization algorithm

In this section, ${n_{\textrm{base}}}$ and coefficient *A* are automatically obtained based on the requirements of fitting accuracy by the traversal optimization algorithm which is outlined in Algorithm 1. This algorithm automatically obtains the configuration of GRBFs and the fitting results.

The fitting model $M({\mathbf s},{\boldsymbol{\mathrm{\varepsilon}}},{\mathbf w}) = {z_{\textrm{des}}}({x_i},{y_i})$ and the PV of the fitting error that is smaller than the fitting accuracy are automatically obtained in this section. ${\mathbf s}$, ${\boldsymbol{\mathrm{\varepsilon}}}$, and ${\mathbf w}$ represent the set of centers of GRBF $({x_{{\textrm{o}_j}}},{y_{{\textrm{o}_j}}})$, shape factor ${\varepsilon _j}$, and amplitude coefficient ${w_j}$, respectively. ${z_{\textrm{des}}}({x_i},{y_i})$ is the fitting result, PV of the fitting error is denoted as $f({n_{\textrm{base}}},A) = \max ({z_{\textrm{des}}}({x_i},{y_i}) - z({x_i},{y_i})) - \min ({z_{\textrm{des}}}({x_i},{y_i}) - z({x_i},{y_i}))$, and $z({x_i},{y_i})$ is the normalized surface sag, $i = 1,2, \ldots ,m$, $j = 1,2, \ldots ,n$. ${\mathbf s}$, ${\boldsymbol{\mathrm{\varepsilon}}}$, and ${\mathbf w}$ are obtained according to Secs. 2.1 and 2.2, and Householder transformation, respectively. The root-mean-square (RMS) of the fitting error is usually 1/7 to 1/5 of the PV according to the experience. Thus, RMS is not additionally considered as the fitting accuracy.

The theoretical basis for the traversal optimization algorithm is the variation law of PV, i.e., $f({n_{\textrm{base}}},A)$, which is simulated and analyzed in Sec. 3.1. Specifically, $f({n_{\textrm{base}}},A)$ is nonlinear with ${n_{\textrm{base}}}$ and *A*. It initially decreases and then increases with the increase in *A*. Thus, an optimized *A* exists such that $f({n_{\textrm{base}}},A)$ has a minimum. In addition, the minimum of $f({n_{\textrm{base}}},A)$ tends to decrease with the increase in ${n_{\textrm{base}}}$; thus, a minimum ${n_{\textrm{base}}}$ exists, satisfying the requirements of fitting accuracy.

The traversal optimization algorithm mainly includes the following steps. In the start, the following initial parameters are defined: $z({x_i},{y_i})$, the number of subapertures *N*, the initial value ${n_{{\textrm{base}}\_{\textrm o}}}$ and step value ${n_{{\textrm{base}}\_{\textrm s}}}$ of ${n_{\textrm{base}}}$, the initial value ${A_\textrm{o}}$ and step value ${A_\textrm{s}}$ of *A*, the fitting accuracy *F*, namely, the PV of fitting error, parameter *t* related to the threshold *T* that is used to control the value range of $f({n_{\textrm{base}}},A)$. First, the optimal interval $[{{A_{\textrm{begin}}},{A_{\textrm{end}}}} ]$ of *A* is located according to the numerical relationship between $f({n_{\textrm{base}}},A)$ and *A*. The fitting error $f({n_{\textrm{base}}},A)$ in this interval is close to the minimum, either controlled by a threshold of *T* or a finite calculation number (typically 20). In this step, we set ${n_{\textrm{base}}} = {n_{{\textrm{base}}\_{\textrm o}}}$ and update the value of *A* with ${A_\textrm{o}}$ and ${A_\textrm{s}}$. Second, ${n_{\textrm{base}}}$ and *A* are determined according to the relationship between $f({n_{\textrm{base}}},A)$ and ${n_{\textrm{base}}}$ and the fitting accuracy *F*. In this step, the value of ${n_{\textrm{base}}}$ is updated with ${n_{{\textrm{base}}\_{\textrm s}}}$, and the value of *A* is updated with $[{{A_{\textrm{begin}}},{A_{\textrm{end}}}} ]$ and ${A_\textrm{s}}$. Finally, we obtain $M({\mathbf s},{\boldsymbol{\mathrm{\varepsilon}}},{\mathbf w})$ and $\textrm{PV} = f({n_{\textrm{base}}},A)$ with the GRBFs defined by ${n_{\textrm{base}}}$ and *A*. In the algorithm, ${\mathbf s}$ and ${d_j}$ are updated with the value of ${n_{\textrm{base}}}$, and $f({n_{\textrm{base}}},A)$ is updated with ${n_{\textrm{base}}}$ and *A*. The detailed algorithm is listed as Algorithm 1.

#### 2.4 Parameter selection and fitting speed analysis

In order to improve the fitting speed while satisfying the requirements of accuracy, the parameter selection of the traversal optimization algorithm is as follows. We usually set ${n_{{\textrm{base}}\_{\textrm o}}} = 100$ and ${n_{{\textrm{base}}\_{\textrm s}}} = 50$. This setting may reduce the utilization rate of GRBF especially when describing a surface with simple surface shape, that is, the number of GRBFs is redundant, but it is conducive to the fitting speed. In addition, based on experiences, we recommend setting ${A_\textrm{o}} = {A_\textrm{s}} = 0.5$ and *t*=10, which is conducive to obtaining a reasonable $[{{A_{\textrm{begin}}},{A_{\textrm{end}}}} ]$ quickly.

In the traversal optimization algorithm, the calculation of amplitude coefficients ${\mathbf w}$ and PV of fitting error $f({n_{\textrm{base}}},A)$ is time-consuming, and it needs to be run $(a + 1) + [{({{{A_{\textrm{end}}} - {A_{\textrm{begin}}})} / {{A_\textrm{s}}}} + 1} ]\cdot b$ times in total, (*a*+1) times for locating $[{{A_{\textrm{begin}}},{A_{\textrm{end}}}} ]$ and $[{({{{A_{\textrm{end}}} - {A_{\textrm{begin}}})} / {{A_\textrm{s}}}} + 1} ]\cdot b$ times for determining ${n_{\textrm{base}}}$ and *A.* Because the $({{{A_{\textrm{end}}} - {A_{\textrm{begin}}})} / {{A_\textrm{s}}}} + 1$ times of traversal calculations within the specific interval $[{{A_{\textrm{begin}}},{A_{\textrm{end}}}} ]$ can be done in parallel with a high-performance computer, the actual calculation time duration of $(a + 1) + [{({{{A_{\textrm{end}}} - {A_{\textrm{begin}}})} / {{A_\textrm{s}}}} + 1} ]\cdot b$ times calculation can be equivalent to that of $a + 1 + b$ times calculation. Thus, the actual number of calculations is reduced to $a + 1 + b$. On the contrary, in the current adaptive RBF method proposed in Ref. [30], the number of time-consuming calculations is strictly not less than the number of iterations, namely, the total number of RBFs, and the calculation needs to be done in serial. Thus, this algorithm can improve the fitting speed by reducing the number of time-consuming calculations.

## 3. Numerical experiments

#### 3.1 Relationship among ${n_{\textrm{base}}}$, A, and fitting error

To illustrate the relationship among ${n_{\textrm{base}}}$, *A*, and PV of the fitting error, five different freeform surfaces were modeled and described by the AC-GRBF. Those freeform surfaces come from practical optical systems and literatures that use GRBF to describe surfaces [29,30,35,38], and are diverse in type and complexity. The theoretical expressions and surface shapes of freeform surfaces are shown in Eqs. (10) to (14) and Fig. 2, respectively. The aperture of the last surface is 20 mm, and the number of sampling points is *m*=5941. The aperture of other surfaces is 70 mm and *m*=3852, and the sampling is based on Cartesian uniform grid.

We define *N*=144 for these five surfaces to avoid the negative impact on the fitting accuracy or speed caused by unreasonable distribution of GRBFs due to too small or too large value of *N*. We set ${n_{\textrm{base}}}$ as 100, 200, 300, 400, 500, and 600, and *A* is set to the value in the interval [1,200] in steps of 0.5. The variation curves of PV with *A* and ${n_{\textrm{base}}}$ for the freeform surfaces described with Eqs. (10) to (14) are shown in Fig. 3.

According to Fig. 3, the relationship among ${n_{\textrm{base}}}$, *A*, and fitting error mainly includes the following: (1) For the different types of freeform surfaces, the variations of PV with *A* share the following same laws: (a) PV initially decreasing and then increasing with the increase in *A*. (b) For different ${n_{\textrm{base}}}$, PV has a minimum, and we define the interval of *A* near the minimum as optimal interval. (c) The minimum of PV tends to decrease with the increase in ${n_{\textrm{base}}}$. (2) For different freeform surfaces, the optimal intervals are inconsistent.

In addition, the relationship among ${n_{\textrm{base}}}$, *A*, and RMS of the fitting error of the surfaces described with Eqs. (10)–(14) is also analyzed, but the results are not shown because the variation curves of RMS with ${n_{\textrm{base}}}$ and *A* are similar to the curves shown in Fig. 3 except for the absolute value.

The analysis of Fig. 3 indicates that the relationship among ${n_{\textrm{base}}}$, *A*, and fitting error can be used to construct the traversal optimization strategy to locate $[{{A_{\textrm{begin}}},{A_{\textrm{end}}}} ]$ and then determine ${n_{\textrm{base}}}$ and *A* according to the requirements of fitting accuracy.

#### 3.2 Demonstration of AC-GRBF

A complex freeform surface in Ref. [29] was described, and the fitting results by AC-GRBF, Zernike polynomials and RBF-slope [29] were compared to illustrate AC-GRBF and verify its feasibility. The diameter of the surface is 20 mm, and its theoretical expression and surface shape after aperture normalization are shown as Eq. (15) and Fig. 4(a), respectively. The surface sag was not normalized to compare with the fitting results in Ref. [29]. This surface has a distinct “bump” area, as shown in Fig. 4(a).

The sampling points *m*=5941 were obtained based on the Cartesian uniform grid. We initially set *N*=144, ${n_{{\textrm{base}}\_{\textrm o}}}\textrm{ = 100}$, ${n_{{\textrm{base}}\_{\textrm s}}}\textrm{ = 50}$, ${A_\textrm{o}} = {A_\textrm{s}} = 0.5$, and *t*=10, and set *F* to 2.4×10^{−5} and 1.4×10^{−5} successively to compare with the fitting results of RBF-slope [29]. Then, we ran the traversal optimization algorithm to obtain the optimal interval [1.5,3.5]. Figure 4 shows the division of subapertures, the distribution of GRBFs, and the value of the shape factors when ${n_{\textrm{base}}} = 600$ and *A*=2.5. Table 1 shows the fitting results by AC-GRBF, Zernike polynomials, and RBF-slope, and Fig. 5 shows the distribution of the fitting error of AC-GRBF and Zernike polynomials.

According to Fig. 4, more GRBFs were distributed in the areas with more complex surface shapes, such as the aperture edge and “bump” area. In addition, their shape factors are greater. And less GRBFs were distributed in the areas with relatively simpler surface shapes, such as the inner area of the aperture. Moreover, their shape factors are smaller. The distribution of GRBFs and the value of their shape factors are related to the complexity of the surface shape with sufficient flexibility, thereby conforming to AC-GRBF.

According to Table 1, the fitting results of AC-GRBF are remarkably better than those of Zernike, and the number of GRBFs required for AC-GRBF to achieve similar fitting accuracy to RBF-slope is reduced by 13% to 17%. Although the comparison between the fitting results of AC-GRBF and RBF-slope is affected by the inconsistency between the sampling points in this section and those in Ref. [29] due to the difference in numerical calculations, it can still show that the description ability of AC-GRBF is similar to or even better than that of RBF-slope. According to Fig. 5, the fitting error of AC-GRBF is smaller than that of Zernike and its distribution is smoother. In addition, an evident annular diffusion area is found near the “bump” in Zernike, thereby indicating that Zernike is unsuitable for describing local features.

#### 3.3 Fitting speed analysis

For demonstrating the speed of the method, we compare the number of time-consuming calculations for describing the surface corresponding to Eq. (13) with AC-GRBF and adaptive RBF method in Ref. [30]. We initially set ${n_{{\textrm{base}}\_{\textrm o}}}\textrm{ = 100}$, ${n_{{\textrm{base}}\_{\textrm s}}}\textrm{ = 50}$, ${A_\textrm{o}} = {A_\textrm{s}} = 0.5$, *F*=10^{−5}, *t*=10 and then run the traversal optimization algorithm to obtain the result as: the optimal interval is [6,15], *a*=31, *b*=1 and the minimum $f({n_{\textrm{base}}},A)$ is 5.36×10^{−6}. Thus, the actual number of time-consuming calculations can be equivalent as 33 times of calculations. In Ref. [30], the number of calculations is more than 550 when the PV of fitting error is 4.34×10^{−4}. Obviously, 33<<550, thus AC-GRBF is faster by reducing the number of calculations, and this trend also exists in the description of other surfaces.

In addition, for the surface corresponding to Eq. (15), *a*=39 and *b*=10 when we got the fitting results of ${n_{\textrm{base}}}\textrm{ = 600}$ in Table 1. Thus, the actual number of time-consuming calculations is 50, and it is much smaller than the total number of RBFs *n*=651 which is similar to the number of calculations in other methods.

The demonstration and the fitting speed analysis verify the feasibility of AC-GRBF, and the fitting results indicate that AC-GRBF is an accurate and fast method with automatically configurable GRBFs.

## 4. Practical experiments

Two different actual DM surfaces were described, and the fitting results of AC-GRBF and Zernike were compared. The DM used in this section is a piezoelectric deformable mirror with 30 mm diameter produced by OKO Company, and the DM surface was measured by Zygo interferometer. The surface shapes of two DM surfaces after normalization are shown in Figs. 6(a) and 6(b) and named simple surface and complex surface, respectively. The PV of the actual surface sag of simple and complex surfaces is 8.1683 and 0.1873 λ, respectively, and λ=632.8 nm.

The sampling points were obtained by Zygo interferometer based on Cartesian uniform grid, and the number of sampling points of simple and complex surface is 6613 and 8857, respectively. For the two DM surfaces, we set *N*=144, ${n_{{\textrm{base}}\_{\textrm o}}}\textrm{ = 100}$, ${n_{{\textrm{base}}\_{\textrm s}}}\textrm{ = 50}$, *F*=10^{−2}, ${A_\textrm{o}} = {A_\textrm{s}} = 0.5$, and *t*=10. The calculated optimal intervals for the simple and complex surfaces were [1.5, 3.5] and [1,3], respectively. For simple surface, *a*=39 and *b*=0; for complex surface, *a*=39 and *b*=8.

The division of subapertures, the distribution of GRBFs, and the value of the shape factors for simple and complex surface are shown in Figs. 6(c) and 6(d). The GRBF tends to be distributed in the area with complex surface shape, such as the edge and central area of the aperture of the simple surface and the multiple “bump” areas in the complex surface. In addition, their shape factor tends to have great value, which is consistent with AC-GRBF and is conducive to the description accuracy of GRBF.

Table 2 shows the fitting results of AC-GRBF and Zernike for two DM surfaces, and Fig. 7 shows the distribution of fitting error of AC-GRBF and Zernike. For the simple surface, the PV, RMS, and error distribution of AC-GRBF are better than those of Zernike, but the superiority is not obvious. For the complex surface, compared with Zernike, the PV and RMS of AC-GRBF are reduced by 47% and 30%, respectively, and the error distribution of AC-GRBF is smoother when comparing Figs. 7(b) and 7(d). This indicates that AC-GRBF can describe DM surface with satisfactory accuracy, especially for complex surfaces, and the superiority is not significant for simple surfaces.

For simple and complex surfaces, the actual number of time-consuming calculations is 40 and 48, respectively. They are much smaller than the total number of RBFs, namely 160 or 553, which is close to the number of calculations in other methods. Thus, we can obtain the fitting results of DM surface quickly to satisfy the real-time requirement of interferometric measurement system. The fitting results indicate that AC-GRBF is suitable for the description of DM surface.

## 5. Conclusion

We propose an accurate and fast description method with AC-GRBF to describe complex freeform surface with local feature, such as DM surface. The distribution and shape factors of GRBFs are automatically configured, and they are related to the complexity of the surface with sufficient flexibility to improve the fitting accuracy. The fitting result is automatically obtained by the efficient traversal optimization algorithm proposed in this paper rather than time-consuming iterative algorithm, and the fitting speed is improved. The results of numerical experiments laid the theoretical basis for the traversal optimization algorithm and verified the feasibility of AC-GRBF. In the practical experiments, two actual DM surfaces are successfully described. In the future, we plan to further improve AC-GRBF and apply it to the design, manufacture, and metrology of freeform surfaces.

## Funding

National Natural Science Foundation of China (51735002); Strategic Priority Program of Chinese Academy of Science (XDA25020317).

## Acknowledgments

The authors appreciate Dr. Xing Zhao and Dr. Tong Yang for the valuable discussions.

## Disclosures

The authors declare no conflicts of interest.

## Data availability

Data underlying the results presented in this paper are not publicly available at this time but may be obtained from the authors upon reasonable request.

## References

**1. **K. P. Thompson and J. P. Rolland, “Freeform optical surfaces: a revolution in imaging optical design,” Opt. Photonics News **23**(6), 30–35 (2012). [CrossRef]

**2. **S. L. Wei, Z. B. Zhu, Z. C. Fan, Y. M. Yan, and D. L. Ma, “Double freeform surfaces design for beam shaping with non-planar wavefront using an integrable ray mapping method,” Opt. Express **27**(19), 26757–26771 (2019). [CrossRef]

**3. **L. D. Wei, Y. C. Li, J. J. Jing, L. Feng, and J. S. Zhou, “Design and fabrication of a compact off-axis see-through head-mounted display using a freeform surface,” Opt. Express **26**(7), 8550–8565 (2018). [CrossRef]

**4. **C. Supranowitz, P. Dumas, T. Nitzsche, J. D. Nelson, B. B. Light, K. Medicus, and N. Smith, “Fabrication and metrology of high-precision freeform surfaces,” Proc. SPIE **8884**, 888411 (2013). [CrossRef]

**5. **S. Y. Chen, S. Xue, D. D. Zhai, and G. P. Tie, “Measurement of freeform optical surfaces: trade-off between accuracy and dynamic range,” Laser Photonics Rev. **14**(5), 1900365 (2020). [CrossRef]

**6. **D. W. Kim, S. W. Kim, and J. H. Burge, “Non-sequential optimization technique for a computer controlled optical surfacing process using multiple tool influence functions,” Opt. Express **17**(24), 21850–21866 (2009). [CrossRef]

**7. **L. Huang, H. Choi, W. C. Zhao, L. R. Graves, and D. W. Kim, “Adaptive interferometric null testing for unknown freeform optics metrology,” Opt. Lett. **41**(23), 5539–5542 (2016). [CrossRef]

**8. **H. L. Liu, Q. Hao, Q. D. Zhu, D. G. Sha, and C. X. Zhang, “A novel aspheric surface testing method using part-compensating lens,” Proc. SPIE **5638**, 323–329 (2005). [CrossRef]

**9. **Q. Hao, S. P. Wang, Y. Hu, H. L. Cheng, M. Chen, and T. F. Li, “Virtual interferometer calibration method of a non-null interferometer for freeform surface measurements,” Appl. Opt. **55**(35), 9992–10001 (2016). [CrossRef]

**10. **S. Xue, S. Y. Chen, G. P. Tie, and Y. Tian, “Adaptive null interferometric test using spatial light modulator for free-form surfaces,” Opt. Express **27**(6), 8414–8428 (2019). [CrossRef]

**11. **L. Zhang, S. Zhou, D. Li, Y. Liu, T. B. He, B. L. Yu, and J. S. Li, “Pure adaptive interferometer for free form surfaces metrology,” Opt. Express **26**(7), 7888–7898 (2018). [CrossRef]

**12. **L. Zhang, C. Li, X. L. Huang, Y. K. Zhang, S. Zhou, J. S. Li, and B. L. Yu, “Compact adaptive interferometer for unknown freeform surfaces with large departure,” Opt. Express **28**(2), 1897–1913 (2020). [CrossRef]

**13. **A. Offner, “A null corrector for paraboloidal mirrors,” Appl. Opt. **2**(2), 153–155 (1963). [CrossRef]

**14. **S. Xue, S. Y. Chen, and G. P. Tie, “Near-null interferometry using an aspheric null lens generating a broad range of variable spherical aberration for flexible test of aspheres,” Opt. Express **26**(24), 31172–31189 (2018). [CrossRef]

**15. **X. Chang, L. H. Lu, Y. Hu, and Q. Hao, “Off-axis catadioptric partial compensator design for interferometric measurement of optical freeform surface,” Proc. SPIE **11439**, 1143913 (2020). [CrossRef]

**16. **A. J. MacGovern and J. C. Wyant, “Computer generated holograms for testing optical elements,” Appl. Opt. **10**(3), 619–624 (1971). [CrossRef]

**17. **Z. H. Gan, X. Q. Peng, S. Y. Chen, C. L. Guan, H. Hu, X. L. Li, and Z. C. Dai, “Fringe discretization and manufacturing analysis of a computer-generated hologram in a null test of the freeform surface,” Appl. Opt. **57**(34), 9913–9921 (2018). [CrossRef]

**18. **A. E. M. Schmerbauch, M. A. Vasquez-Beltran, A. I. Vakis, R. Huisman, and B. Jayawardhana, “Influence functions for a hysteretic deformable mirror with a high-density 2D array of actuators,” Appl. Opt. **59**(27), 8077–8088 (2020). [CrossRef]

**19. **G. Baer, J. Schindler, C. Pruss, J. Siepmann, and W. Oseten, “Calibration of a non-null test interferometer for the measurement of aspheres and free-form surfaces,” Opt. Express **22**(25), 31200–31211 (2014). [CrossRef]

**20. **D. Liu, Y. Y. Yang, C. Tian, Y. J. Luo, and L. Wang, “Practical methods for retrace error correction in nonnull aspheric testing,” Opt. Express **17**(9), 7025–7035 (2009). [CrossRef]

**21. **V. F. Zernike, “Beugungstheorie des schneidenver-fahrens und seiner verbesserten form, der phasenkontrastmethode,” Physica **1**(7-12), 689–704 (1934). [CrossRef]

**22. **R. J. Noll, “Zernike polynomials and atmospheric turbulence,” J. Opt. Soc. Am. **66**(3), 207–211 (1976). [CrossRef]

**23. **G. W. Forbes, “Shape specification for axially symmetric optical surfaces,” Opt. Express **15**(8), 5218–5226 (2007). [CrossRef]

**24. **G. W. Forbes, “Characterizing the shape of freeform optics,” Opt. Express **20**(3), 2483–2499 (2012). [CrossRef]

**25. **O. Cakmakci and J. Rolland, “Design and fabrication of a dual-element off-axis near-eye optical magnifier,” Opt. Lett. **32**(11), 1363–1365 (2007). [CrossRef]

**26. **J. F. Y. L Chen, X. H. Li, Q. Yuan, and Z. S. Gao, “Review of optical freeform surface representation technique and its application,” Opt. Eng. **56**(11), 110901 (2017). [CrossRef]

**27. **O. Cakmakci, S. Vo, H. Foroosh, and J. Rolland, “Application of radial basis functions to shape description in a dual-element off-axis magnifier,” Opt. Lett. **33**(11), 1237–1239 (2008). [CrossRef]

**28. **M. Maksimovic, “Optical tolerancing of structured mid-spatial frequency errors on free-form surfaces using anisotropic radial basis functions,” Proc. SPIE **9626**, 962613 (2015). [CrossRef]

**29. **K. N. Tong, Y. Zheng, Z. Zhang, X. Zhao, B. Zhang, L. P. Song, L. J. Wang, C. Wang, and P. F. Wu, “Model of radial basis functions based on surface slope for optical freeform surfaces,” Opt. Express **26**(11), 14010–14023 (2018). [CrossRef]

**30. **X. D. Zhou, X. Huang, J. Bai, L. Zhao, J. Hou, K. W. Wang, and Y. X. Hua, “Representation of complex optical surfaces with adaptive radial basis functions,” Appl. Opt. **58**(14), 3938–3944 (2019). [CrossRef]

**31. **A. K. Chan, C. K. Chui, and L. T. Guan, “Radial basis function approach to interpolation of large reflecting surfaces,” Proc. SPIE **1251**, 62–72 (1990). [CrossRef]

**32. **O. Cakmakci, B. Moore, H. Foroosh, and J. P. Rolland, “Optimal local shape description for rotationally non-symmetric optical surface design and analysis,” Opt. Express **16**(3), 1583–1589 (2008). [CrossRef]

**33. **O. Cakmakci, I. Kaya, G. E. Fasshuer, K. P. Thompson, and J. P. Rolland, “Application of radial basis functions to represent optical freeform surfaces,” Proc. SPIE **7652**, 76520A (2010). [CrossRef]

**34. **H. Li, X. Zhang, C. Wang, J. P. Zhang, L. J. Wang, and H. M. Qu, “Design of an off-axis helmet-mounted display with freeform surface described by radial basis functions,” Opt. Commun. **309**, 121–126 (2013). [CrossRef]

**35. **M. Maksimovic, “Optical design and tolerancing of freeform surfaces using anisotropic radial basis functions,” Opt. Eng. **55**(7), 071203 (2016). [CrossRef]

**36. **J. Stock, A. Broemel, J. Hartung, D. Ochse, and H. Gross, “Description and reimplementation of real freeform surfaces,” Appl. Opt. **56**(3), 391–396 (2017). [CrossRef]

**37. **L. C. Xiao, X. Zhao, K. N. Tong, B. Zhang, L. P. Song, L. J. Wang, and X. D. Zhang, “A single mirror magnifier with freeform surfaces using radial basis functions based on surface slope,” Proc. SPIE **11383**, 11383B (2020). [CrossRef]

**38. **X. D. Zhou, J. Bai, X. Huang, L. Zhao, C. Wang, and Y. J. Luo, “Description of complex optical surface based on sparse radial basis function approximation with spatially variable shape parameters,” Proc. SPIE **10841**, 10841O (2018). [CrossRef]

**39. **J. H. Ni, T. Yang, Y. Liu, D. W. Cheng, and Y. T. Wang, “Description and tolerance analysis of freeform surface figure error using specific-probability-distributed Gaussian radial basis functions,” Opt. Express **27**(22), 31820–31839 (2019). [CrossRef]