**1. 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–12]. Usually, the measurement of wavefront distortions is performed in order to compensate them, in particular, with adaptive or active optics [13–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–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–32] and optimization algorithms [10,33] are used, including those with the use of neural networks [34–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

**Citation:** Khorin, P.A.; Porfirev, A.P.; Khonina, S.N. Adaptive Detection of Wave Aberrations Based on the Multichannel Filter. *Photonics* **2022**, *9*, 204. https://doi.org/10.3390/ photonics9030204

Received: 30 January 2022 Accepted: 19 March 2022 Published: 21 March 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

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

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–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 λ).

## **2. Materials and Methods**
