Adaptive Detection of Wave Aberrations Based on the Multichannel Filter

: An adaptive method for determining the type and magnitude of aberration in a wide range is proposed on the basis of an optical processing of the analyzed wavefront using a multichannel ﬁlter matched to the adjustable Zernike phase functions. The approach is based on an adaptive (or step-by-step) compensation of wavefront aberrations based on a dynamically tunable multichannel ﬁlter implemented on a spatial light modulator. For adaptive ﬁlter adjustment, a set of criteria is proposed that takes into account not only the magnitude of the correlation peak, but also the maximum intensity, compactness, and orientation of the distribution in each diffraction order. The experimental results have shown the efﬁciency of the proposed approach for detecting wavefront aberrations in a wide range (from 0.1 λ to λ ).


Introduction
The problem of measuring and correcting wavefront aberrations is often encountered in optics, for example, in the design of ground-based telescopes, in optical communication systems, in industrial laser technology, and in medicine [1][2][3][4][5][6][7][8][9][10][11][12]. Usually, the measurement of wavefront distortions is performed in order to compensate them, in particular, with adaptive or active optics [13][14][15][16][17][18]. The major causes of wavefront aberrations are turbulence of the atmosphere, imperfect shapes of the optical elements of the system, errors in the alignment of the system, etc.
It is known that weak wavefront aberrations (level ≤ 0.4λ) are well detected using spatial filters matched to the basis of Zernike functions [19][20][21][22][23][24][25][26][27] including multichannel diffractive optical elements (DOEs) [21,25,27]. However, with an increase in aberration level, the linear approximation of the wavefront by Zernike functions becomes unacceptable [27]. This is explained by the fact that the contribution of the second and subsequent nonlinear terms of the wavefront expansion to the Taylor series becomes more significant, which leads to the detection of false aberrations.
With high aberrations (level > 0.4λ), when a significant blurring of the focal spot occurs, it makes sense to use methods focused on analyzing the intensity distribution pattern formed by an aberrated optical system in one or several planes. To determine the wavefront in this case, iterative [28][29][30][31][32] and optimization algorithms [10,33] are used, including those with the use of neural networks [34][35][36][37][38][39]. In turn, these approaches demonstrate significant errors for small aberrations, when the point spread function (PSF) is close to the Airy picture of an ideal system [27].
Thus, different methods work at different levels of aberrations, and in order to apply them, it is desirable to determine this level (or magnitude). One of the solutions is the use of additional optical and digital processing, for example, based on a dynamically tunable spatial light modulator (SLM). Previously, we studied the stability of the wavefront expansion coefficients on the basis of Zernike polynomials during the field propagation in free space [40], the application limits of spatial filters matched with the basis of Zernike functions [41][42][43], and the possibility of scaling aberrations levels for testing optical systems [44].
In this paper, to determine the type and magnitude (or level) of aberrations in the investigated wavefront (WF), the application of an adaptive method based on the use of a multichannel filter matched with adjustable Zernike phase functions (Zernike polynomials correspond to the phase of the considered functions) is proposed. In this case, instead of the optical expansion of the field on the basis of the Zernike functions which was realized earlier [21,25,27], we actually perform multichannel aberration compensation based on the Zernike polynomials. The novelty of our study lies in the combination of an adaptive approach and matched filtering based on a multichannel diffractive optical element. Note that phase compensation can occur in each channel in accordance with different types of aberrations, as well as for the same aberration type but with different magnitude (or level). The method is based on a step-by-step compensation of wavefront aberrations based on a dynamically tunable multichannel filter implemented on a spatial light modulator. A set of criteria for adaptive filter tuning is proposed, taking into account not only the correlation peak presence, but also the maximum intensity, compactness, and orientation of the PSF distribution in each diffraction order. The experimental results have shown the efficiency of the proposed approach for detecting wavefront aberrations in a wide range (from 0.1λ to λ).

Theoretical Foundations
Wavefront aberrations are usually described in terms of Zernike functions Z nm (r, ϕ) [45] in the following way: where κ = 2π/λ is the wave number, λ is the radiation wavelength, α is the parameter corresponding to the level of aberration in wavelengths (in this paper it takes values from zero to wavelength λ), and coefficients C nm are normalized. The PSF for an aberrated wavefront can be calculated using the Fourier transform: where f is the focal length of the lens. The optical wavefront analyzer considered in this work is based on the addition of a lens with a diffractive multichannel filter [21,25,27] of the following form: where Ψ pq (x, y) are the functions matched to diffraction orders (DOs) with indices (p, q), the position of which in the focal plane is determined by the spatial frequencies a pq and b pq . As a rule, the Zernike polynomials are used as Ψ pq (x, y) [7,21,25,27] to analyze a wavefront. However, correct detection in this case is possible only at low levels of aberrations. In [27], it was shown that at an aberration level of more than 0.4λ, the use of such a filter leads to false detection.
In this paper, the use of a filter matched with the Zernike phase functions (Zernike polynomials correspond to the phase of the considered functions) is proposed: where Z pq (x, y) are the standard Zernike functions of double indices (p, q) [45]. The correspondence of Zernike functions to various types of aberrations is given in Table 1.

Scheme for Adaptive Aberration Compensation
We consider in detail several wave aberrations of different magnitudes and show the scheme for the adaptive method to compensate these aberrations.
We divide the aberrations into even type (n is even) and odd type (n is odd) and consider them separately. Among the even aberrations, one can distinguish axis-symmetric ones (m is equal to 0). Even aberrations such as (2, 0), (4, 0), . . . , (n, 0) have the wavefront phase and corresponding PSF axis-symmetric distribution regardless of the level of aberration α (see Table 2). The adaptive method is described as the aberration compensation by complex conjugate functions (4) with different levels of α 0 . In other words, we calculate the compensated wavefront of the form and the corresponding PSF of the form where W(x, y) is the analyzed wavefront with aberration (n, m) and level α, Ψ * pq (x, y) is the complex conjugate function (4) with a variable level α 0 , ∆W(x, y) is the resulting wavefront, and ∆F(x, y) is the corresponding PSF.
With the successful compensation of the specified wave aberration, the phase of the resulting wavefront should be equal to a constant, and the PSF should correspond to the Airy picture (PSF for the plane WF).
The results collected in Figure 1 show the compensating process for the spherical aberration (n, m) = (2, 0) with a level α = 0.5λ by the set of Ψ * pq (x, y) = Ψ * 20 (x, y) with different levels of α 0 = {0.1λ; 0.25λ; 0.5λ; 0.75λ}. Thus, we construct the resulting wavefront defined by Equation (5) and the corresponding PSF defined by Equation (6). with α = 0.5λ level (green highlights) by complex conjugate wave aberration Ψ * pq (x, y) = Ψ * 20 (x, y) with different levels of α 0 (orange highlights). Results of compensation (blue highlights) are placed at the intersection of corresponding rows and columns. Figure 1 shows in detail the effect of the compensating wavefront W(x, y) with aberration type (n, m) = (2, 0) and level α = 0.5λ by Ψ * pq (x, y) = Ψ * 20 (x, y) with different levels of α 0 . The compensated phase (equal to 0) is observed at the intersection of column 4 and row 3, and the corresponding PSF (the Airy picture D(u, v)) is observed at the intersection of column 4 and row 4: In addition, it can be seen from Figure 1 that the PSFs observed in row 4, columns 3 and 5, have the same intensity. This is because the phase of the resulting wavefront for these two cases is the same up to sign: A change in the sign of the aberration coefficient to the opposite causes a symmetric transformation of the PSF image about the horizontal axis for negative m, since −sin(mϕ) = sin(mϕ + π), and about the vertical axis for positive m, since −cos(mϕ) = cos(mϕ + π). For even aberrations, this property is not so noticeable due to their symmetry. Therefore, PSFs for even wave aberrations that differ only in the sign of the weighting coefficient have the same intensity distribution in the focal plane.
Even aberrations with m = 0 have phase images with m symmetry axes and PSFs with 2m symmetry axes. It should be noted that the OX and OY axes are always the PSF symmetry axes (see Table 3). Table 3. Results of modeling an even wave aberration of the type (n, m) = (2, 2) and (n, m) = (4, 4).
with different levels of α 0 (description for pictures are the same as for Figure 1).
Odd-type aberrations such as (n, m) = (3, 1) and (n, m) = (3, 3) have images of the wavefront phase with m symmetry axes and the corresponding PSFs with 2m symmetry axes (see Table 4). The results of the compensating process for the coma-type aberration (n, m) = (3, 1) with a level α = 0.5λ by the set of Ψ * pq (x, y) = Ψ * 31 (x, y) with different levels of α 0 = {0.1λ; 0.25λ; 0.5λ; 0.75λ} are shown in Figure 3. The situation is different from even aberrations. It can be seen from Figure 3 that in row 4, columns 3 and 5, PSFs are rotated by 180 degrees. This is because the phase of the resulting wavefront for these two cases is the same up to sign: Changing the sign of the aberration coefficient to the opposite one causes a symmetric transformation of the PSF image about the horizontal axis. As described earlier for positive m, such a symmetric transformation must be performed with respect to the vertical axis, since −cos(mϕ) = cos(mϕ + π). For odd-type aberrations, this property is evidentially observed in the PSF intensity distribution.
Thus, the introduced empirical criterion for odd-type aberrations is based on the described fundamental properties of the PSF of wave aberrations.
The following combined criteria for correct detection can be used:

1.
Formation of a pronounced/evident correlation peak in the focal plane of the filter in the DO with indices (p, q).

2.
Change in the orientation of the PSF intensity distribution in the adjacent DOs of the "level and type" (LT) filter within one row (for odd-symmetry aberrations).

3.
Presence of the same PSF intensity distributions in the adjacent DOs of the LT-filter within one row (for even-symmetry aberrations).
Based on the analysis of the intensity distribution in the focal plane, taking into account the proposed criteria, it is possible to determine the range of the analyzed aberration level.
Next, we propose using a multichannel filter to implement the processing of the analyzed wavefront simultaneously by several types of aberrations taken into account.

Multichannel Filter Employment
To determine the type and magnitude of aberration in the analyzed wavefront, we propose combining the adaptive method with the use of a multichannel filter matched to Zernike's adjustable phase functions. Thus, the principle of operation of our method lies in the parallel application of the adaptive approach by a multichannel diffractive element employment. In this case, a wide range of detectable aberration values and resistance to vibrations are provided.
To realize this approach, the filter should be matched with a set of functions defined by Equation (4) with different levels of α k . We can design a filter tuned to one specific wave aberration with a value ranging from α 1 to α Kmax .
In order to detect another type of wave aberrations, it is necessary to divide each channel into P max Q max additional channels. So, different wave aberrations with different α k should be encoded in different diffraction orders. The transmission function of such an LT-filter will be as follows: It should be noted that the accuracy of the detected (and compensated) aberration value directly depends on the number of channels P max Q max K max ; however, the number of filter channels is limited by technological possibility. Since the filter defined by Equation (13) can be implemented using an SLM, the number of channels can be reduced taking into account a certain time delay for rebuilding the filter to different sets of channels. Moreover, in the presence of an additional adapting device, it is possible to organize an iterative process of step-by-step compensation of aberrations [30][31][32].
The formation of a correlation peak in one of the DOs can be considered as a criterion for successful compensation. Additional criteria for adaptive filter tuning are proposed in Section 3.
A special case of the LT-filter defined by Equation (13) is the "type" T-filter tuned for different types of aberrations with the same level α 0 : If the aberration type is determined and we need to more accurately determine its level, then it makes sense to use another particular version of the filter defined by Equation (13), namely the "level" L-filter tuned to only one aberration type (p 0 , q 0 ) with different levels of α k : To analyze other aberration types, the filter can be quickly rebuilt using an SLM. We have designed several variants of multichannel filters defined by Equations (13)- (15).  Figure 4c). Each of the options is suitable for a specific task. It makes sense to use a hybrid LT-filter for preliminary analysis and a filter consistent with different levels for refinement. With the help of dynamically tunable filters implemented on an SLM, it becomes possible to specify the level of aberrations of the analyzed WF or to take the average value from the already detected range. Note that the accuracy of this range directly depends on the noise level of the recording device.

Optical Setup
The optical scheme used in the experiment is shown in Figure 5. The output laser radiation from a solid-state laser (λ = 532 nm) was collimated using a system consisting of a pinhole (PH) with a hole diameter of 40 µm and a spherical lens (L 1 ) (f 1 = 350 mm). A circular diaphragm D1 was used to separate a central light spot from surrounding light and dark rings occurring during diffraction at the pinhole. Then, the laser beam expanded and reflected by mirror M1 passed through a HOLOEYE LC 2012 transmissive spatial light modulator SLM1 with a 1024 × 768 pixel resolution and a pixel size of 36 µm, which was used to form a wavefront with a required combination of aberrations. Lenses L2 (f 2 = 300 mm) and L3 (f 3 = 200 mm) and diaphragm D2 were used to spatially split the aberration-distorted laser beam formed by the first modulator and the unmodulated zero-order transmitted laser beam.
A mirror M2 was used to direct the formed laser beam to the display of the second modulator. A HOLOEYE PLUTO VIS reflective spatial light modulator SLM2 with a 1920 × 1080 pixel resolution and a pixel size of 8 µm was used to implement a phase mask of a diffractive multichannel filter, which served to decompose the studied light field in terms of the Zernike polynomial basis. The laser beam reflected from this SLM was directed to lens L4 (f 4 = 250 mm), which focused it on the matrix of a ToupCam UCMOS08000KPB camera CAM with a 3264 × 2448 resolution and a pixel size of 1.67 µm.

Detection of One Type of Wave Aberration
As a rule, when using matched filters, the appearance of a correlation peak is a criterion for detecting a matched signal [46][47][48][49][50]. Note that the presence of a correlation peak is determined by a nonzero intensity at the center of the DO. However, when analyzing phase distributions, this approach is correct only for small phase variations. In particular, it was shown in [27] that when the aberration level is more than 0.4λ, the use of filters matched with the basis of Zernike functions leads to the appearance of many wrong correlation peaks and false detection.
The adaptive approach considered in Section 2.2 is free from this limitation, but for its application, it is necessary to select suitable compensating functions in accordance with the developed criteria. To speed up the selection process, we use multichannel filters to analyze a wavefront simultaneously by several types of compensating functions.
In this section, we demonstrate the use of the multichannel filters described in Section 2.3 for test examples when aberrations of certain types with a given level are introduced into the wavefront. Figure 6 and Table 5 show the results of a numerical and experimental analysis of the WF distorted by a coma-type aberration (n, m) = (3, 1) with a weight (level) α = 0.5λ, using various diffractive multichannel filters (the intensity patterns in the focal plane are shown). DOs with correlation peaks are framed by a solid line, and DOs with changed PSF orientation are framed by a dashed line. The selected (framed) orders correspond to the criteria formulated in Section 2.2. A good agreement between the numerical simulation and the optical experiment is seen. The results for LT-filter show (see Figure 6) that the correlation peak located in the DO corresponding to (p, q) = (3, 1) with α k = 0.5λ and adjacent DOs contains a PSF with changed orientation (see Figure 6, positions are marked with frames). As follows from the given example, for aberrations with odd symmetry, the criterion of the correct detection can be not only the presence of the correlation peak, but also the orientation of PSF distribution in neighboring DOs. A similar result was obtained in [51,52] based on numerical simulation. In contrast to these papers, in this work, we realize experimental investigation of the proposed approach and apply it for a step-by-step compensation of a complex type of aberrations.
T-filters with different levels of α 0 also demonstrate (see Table 5) a change of PSF orientation when passing through the level α 0 = 0.5λ. A correlation peak is also observed in the DO corresponding to (p, q) = (3, 1) with a level equal to 0.5λ (see Table 5, third row).
The results of simulation and experiment with another test example, when the WF is distorted by an even type of aberration (p, q) = (2, 2) with α = 0.5λ, are presented in Figure 7. Results show that the DOs adjacent to the correlation peak have the same PSF intensity distribution. Thus, when detecting even-symmetry aberrations, in addition to the presence of a correlation peak, the criterion for correct detection can be the similarity of diffraction patterns in neighboring orders. Table 5. Results of modeling and optical experiment of the operation of multichannel T-filters in detecting WF distorted by coma-type aberration (n, m) = (3, 1) with α = 0.5λ.

WF Type of the Filter Intensity in the Focal Plane of the T-Filter Equation (14)
Modeling Experiment  The results of a test example with a WF distorted by aberration (n, m) = (3, 3) with an increased weight α = 0.7λ are shown in Figure 8 and Table 6.  Table 6. Results of modeling and optical experiment of the operation of multichannel T-filters in detecting WF distorted by aberration (n, m) = (3, 3) with α = 0.7λ.

Aberrated WF Type of the Filter Intensity in the Focal Plane of the T-Filter Equation (14)
Modeling Experiment The increase in weight was considered to show the good performance of filters over a wide range of aberration values (if necessary, the filter can be easily reconfigured for a larger range). In the focal plane of the LT-filter (see Figure 8), the PSF changes orientation in the DOs marked with frames (which corresponds to an aberration of the (p, q) = (3, 3) aberration type); however, no evident correlation peak is observed between these DOs. The absence of such a correlation peak is explained by the inconsistency of the level of aberrations recorded in the filter with the level of the analyzed wave aberration. To refine the weight of the detected aberration, it is required to use an L-filter or T-filter with different levels of aberration (p, q) = (3, 3) (see Table 6).
It can be seen from Table 6 that the use of a T-filter with different levels of matched functions made it possible to refine the weight of the detected aberration (p, q) = (3, 3); thus, the correlation peak is observed at α 0 = 0.7λ (see Table 6, second rows). In this case, for the levels α 0 = 0.5λ and α 0 = 0.9λ (see Table 6, first and third rows), the intensity distribution changes orientation, which is an additional sign of correct detection.

Detection of Superposition of Wave Aberrations (Complex Aberration)
In this section, we illustrate the action of the adaptive (step-by-step) method for detecting a superposition of wave aberrations, where at each l-th stage the wavefront W l (x, y) (at the first iteration it is equal to the investigated wavefront) is analyzed by the dynamically tunable SLM. In the focal plane of the filter, there are different PSF pictures. We recall that the aberration type (p, q) is associated with each string and aberration level with k-column (α k are fitted in accordance with the combined criteria introduced above) of the diffractive multichannel filter. So, the investigated wavefront is corrected taking into account the detected wave aberration as follows: where W ∆ (x, y) = exp −iκα k Z pq (x, y) . The criterion for correctly detected aberrations is the formation of a pronounced/evident correlation peak in the focal plane of the filter in the DO at one of the l-th steps. To detect the correlation peak formation, we use digital image processing and calculate mean square error (MSE) for W l (x, y) in the region of DO (the considered region size is S × S pixels): where D(u, v) is the Airy picture (PSF for plane/ideal WF).
To illustrate this approach, we consider the WF distorted by the superposition of two aberrations 0.5λ*(2, 2) + 0.5λ* (3,3). At the first stage, we used an LT-filter (see Figure 9) and revealed that the DO changes orientation in the fourth row, which corresponds to type (p, q) = (3, 3) with α = 0.5λ, and a residual aberration of the type (n, m) = (2, 2) is observed in the corresponding DO. So, at the first iteration, the wavefront aberration (n, m) = (3, 3) with 0.5λ level was compensated by LT-filter. Thus, the problem was reduced by one dimension. After compensating for one detected aberration, the wavefront has residual aberration (n, m) = (2, 2) with 0.5λ level. The result of the action of the same LT-filter on the obtained wavefront is presented in Figure 10. The LT-filter shows that the DOs are symmetric in the second row with respect to the correlation peak at (p, q) = (2, 2) with 0.5λ level. In another test example (Figure 11), we considered WF distorted by the superposition of three aberrations 0.5λ*(2, 0) + 0.5λ*(2, 2) + 0.5λ* (3,3). The LT-filter shows (see Figure 11) that the DO changes orientation in the fourth row, which corresponds to aberration (p, q) = (3, 3) with 0.5λ level. So, at the first iteration, we compensated for one type of aberration and reduced the problem by one dimension. At the second iteration, the residual aberrations are similar to the first example (see Figure 9), which was compensated in a similar way. To refine the weight of the desired aberration, it is possible to iteratively subtract the detected aberrations with low weights until a pronounced correlation peak is observed in one of the DOs.
Thus, using the adaptive/iterative process and the introduced empirical criteria, the wavefront aberrations are compensated. The criterion for the iterative process completion is the formation of a pronounced correlation peak in one of the DOs of the focal plane of the filter, i.e., when the MSE defined by Equation (17) equals a minimal value.

Discussion
In order to show the possibility of using the proposed method for detecting wavefronts with complex aberrations, we investigate how much one wave aberration (n 1 , m 1 ) with a level α 1 affects the wave aberration (n 2 , m 2 ) with a level α 2 . For an objective assessment, the analysis of the PSF corresponding to the superposition of aberrations is proposed. Figure 12 shows the simulation results for the superposition of even-and odd-type aberrations. It is seen that if the ratio of the level of aberrations is more than 10 times, then the effect of an aberration with a lower weight coefficient on the resulting PSF is extremely weak. In addition, the ratio of the level of aberrations being more than 5 times also insignificantly affects the resulting wavefront (with an accuracy to the scale and overall shape of the PSF). Figure 12. The results of modeling the superposition of the odd wave aberration of the type (n 1 , m 1 ) = (3, 1) with α 1 = 1.0λ level (green highlights) and even wave aberrations of the type (n 2 , m 2 ) = (2, 2) with different levels of α 2 (orange highlights). Results of compensation (blue highlights) are placed at the intersection of corresponding rows and columns.
Thus, if the superposition contains aberrations with coefficients different in magnitude, then it makes sense to first compensate for aberration with a large level. This fact allows us to say that the analyzed wavefront with a pronounced single aberration can be successfully detected by the proposed filters defined by Equations (13)-(15) without using an additional iterative algorithm.

Conclusions
In this work, we experimentally tested a diffractive multichannel wavefront sensor matched to phase distributions in the form of Zernike functions.
Several variants of filters were designed: filters matched with different types of aberrations of the same level, filters matched with one type of aberration of different levels, and a hybrid filter. Each of the options is convenient for a specific task. It makes sense to apply a hybrid filter for preliminary analysis and then apply a filter matched to different levels for adjusting. When using a dynamic transparency, it is possible to quickly adjust the filters and compensate for the aberration step by step.
Criteria of the proposed adaptive algorithm for determining the aberrations of the analyzed wavefront were formulated: scattering region, PSF compactness, maximum intensity, and orientation of each diffraction order in the focal plane of the multichannel filter. An adaptive compensation of wavefront aberrations was performed using the proposed method and introduced empirical criteria. We show the possibility to reduce a problem dimension at each stage, so the wavefront aberration compensation is provided. We realized an experimental investigation of the proposed approach and applied it for a step-by-step compensation of a complex type of aberrations.
Finally, based on numerical modeling and the results of an optical experiment using a dynamic transparency, we show the efficiency of the proposed filters for detecting wavefront aberrations in a wide range (from 0.1λ to λ).
Considering the wide range of correctly detected aberration values using the proposed method, the field of application can include the measurement and correction of wavefront aberrations in devices such as ground-based telescopes and optical microscopes, in optical communication systems, in industrial laser technology, and in ophthalmology.