Expand this Topic clickable element to expand a topic
Skip to content
Optica Publishing Group

Deep learning assisted plenoptic wavefront sensor for direct wavefront detection

Open Access Open Access

Abstract

Traditional plenoptic wavefront sensors (PWFS) suffer from the obvious step change of the slope response, leading to poor wavefront detection performance. In order to solve this problem, in this paper, a deep learning model is proposed to restore phase maps directly from slope measurements of PWFS. Numerical simulations are employed to demonstrate our approach, and the statistical residual wavefront root mean square error (RMSE) of our method is 0.0810 ± 0.0258λ, which is much superior to those of modal algorithm (0.2511 ± 0.0587λ) and zonal approach (0.3584 ± 0.0487λ). The internal driving force of PWFS-ResUnet is investigated, and the slope response differences between sub-apertures and directions are considered as a probably key role to help our model to accurately restore the phase map. Additionally, the robustness of our model to turbulence strength and signal-to-noise ratio (SNR) level is also tested. The proposed method provides a new direction to solve the nonlinear problem of traditional PWFS.

© 2023 Optica Publishing Group under the terms of the Optica Open Access Publishing Agreement

1. Introduction

Adaptive optics (AO) is a key technique for ground-based astronomical observation as well as high-resolution retina imaging. The core idea of AO system is compensating the dynamic wavefront to obtain imaging results closing to the system diffraction limit. Therefore, the wavefront detection is one vital part of AO. Traditional wavefront sensors, such as the commonly-used Shack–Hartmann wavefront sensor (SHWFS), are easily limited by the dynamic range when applied for large aberration detection [1].

Various approaches have been proposed to solve this problem. The PWFS has been proposed to be an alternative solution in recent years and getting increasing attention of scholars. The amplitude and angular information of the incident light can be collected simultaneously by the PWFS, and thus the phase gradients can be extracted from the plenoptic image. However, the vital problem of a traditional PWFS is the obvious step change of the slope response, which leads to poor detection accuracy [2,3]. Recently, a modified PWFS with defocus modulation has been proposed to improve the linearity of PWFS, but it cannot remove the nonlinear effect completely [4,5].

To improve the performance of PWFS, in this paper, instead of traditional mechanical-based methods, we propose a method based on deep learning technique to directly restore the incident wavefront. Deep learning can be considered as a technique that using multiple layers of neural networks to construct a mathematical model which describes the physical procedure of a problem to be solved. By feeding large amount of experimental data to this model, related parameters of the model can be automatically learned, and finally the trained model is expected to output a reasonable solution for new input data. The greatest advantage of the deep-learning technique is that some complex or highly nonlinear relationship can be well described by the deep neural networks thanks to their strong fitting capabilities.

In recent years, rapidly growing number of researches working on deep-learning-assisted wavefront sensing have been published. These methods can be categorized into three kinds according to the types of input data. The first kind is the SHWFS-based deep learning method. Li, and Gomez et al. proposed to improve the centroid estimation accuracy through artificial neural network (ANN) [6,7]. Recently, Zhao et al. utilized the correctly estimated centroids as the input of a U-Net model to predict the lost centroids (where some sub-spots in Hartmann-gram may be weak or missing) [8]. But these methods still used traditional approach to reconstruct the wavefront from slope measurements.

Swanson and Ceruso et al. adopted a U-Net-like deep learning model to directly restore the phase map from slope measurements of SHWFS [9,10]. Later, Jia et al. proposed a compressive wavefront sensing deep learning model, reconstructing wavefront only with slope measurements of sub-apertures whose spot images have high SNR [11]. Dubose et al. utilized both the intensity and slope data of Hartmann-gram as the input of the U-Net-like model to reconstruct the wavefront and achieved superior performance [12].

Moreover, to avoid information loss, Hu et al. proposed to input the Hartmann-grams to the AlexNet model and directly obtain the Zernike coefficients [13]. A U-Net-like model was also utilized by them to predict the phase map from the Hartmann-gram directly [14]. He et al. modified the Resnet-50 model to restore Zernike coefficients directly from sparse sub-aperture spot images instead of the whole Hartmann-gram [15]. Recently, Guo et al. presented a novel lightweight convolutional neural network to directly determine the Zernike coefficients from the Hartmann-gram [16].

Another kind of method is the deep-learning-assisted phase diversity wavefront sensor. In these methods, the intensity images simultaneous acquired at defocused and in-focus positions are inputted to the deep learning model to reconstruct the wavefront. Guo and Ma et al. used an improved convolution neural network (CNN) (based on VGG Net and AlexNet, respectively) to successfully establish the nonlinear mapping between the paired images (in-focus and defocused) and the corresponding phase maps [17,18]. Andersen et al. trained the Inception v3 network model to restore the Zernike coefficients directly from in-focus and defocused far-field images [19]. Wu et al. proposed a novel real-time non-iterative phase-diversity wavefront sensing method based on LeNet-5 model, and achieved sub-millisecond phase retrieval [20].

The last kind of method is retrieving phase from single far-field image based on deep learning. Paine et al. proposed to get a good initial estimate of the wavefront from the Inception v3 network model, but iterative operations were still required [21]. Nishizaki et al. proposed a variety of image-based wavefront sensing architectures named deep learning wavefront sensor (DLWFS) that could directly estimate aberration from single intensity image acquired under different preconditioners (the Xception model is utilized in their work) [22]. Qiu et al. proposed a four-quadrant discrete phase modulation imaging system to overcome the many-to-one mapping and retrieved Zernike coefficients directly from the single far-field image with an AlexNet-like model [23]. Zhang et al. boosted the performance of traditional CNN models for direct wavefront sensing by pre-processing circular features of the far-field image into rectangular ones through conformal mapping [24]. Allan et al. successfully applied the ResNet model to the wavefront sensing in high-contrast astronomical imaging systems [25]. Quesnel et al. adopted ResNet-50 and U-Net models to accomplish focal plane wavefront sensing and proved that the performance of CNN-based methods can reach the photon noise limit in a large range of conditions [26]. Recently, Guo et al. concluded the state-of-the-art deep learning-assisted wavefront sensors in [27].

As mentioned above, the deep-learning-assisted wavefront sensing methods have been proved effective when combining with traditional SHWFS. However, as far as we known, there is no published work about using a deep learning model to improve the phase retrieval accuracy of PWFS. In fact, the obvious nonlinear procedure existed in the PWFS makes it necessary to introduce deep learning algorithm into PWFS wavefront sensing. Therefore, our work here focuses on exploring the possibility of improving the wavefront sensing accuracy of PWFS with deep learning technique.

In this paper, a deep learning model is proposed to restore wavefront maps directly from the slope measurements of PWFS. Numerical simulations are employed to validate our approach, and the mean residual wavefront RMSE of our method is 0.0810λ, which is much better than those of traditional modal algorithm (0.2511λ) and zonal approach (0.3584λ). The internal driving force of PWFS-ResUnet is analyzed. Additionally, the robustness of our model to turbulence strength and signal-to-noise ratio (SNR) level is also tested, the simulation experiments display that our model achieves very stable performance under most turbulence strengths and SNR levels. Lastly, the real-time performance is analyzed. This paper is organized as follows. In Section 2, the basic principles of PWFS are introduced; In Section 3, we describe our simulation setup, i.e. the data simulator and the CNN architectures used for this work. Then, the experimental results of different wavefront reconstruction methods are given in Section 4. Finally, we make our conclusion and anticipate our future works in Section 5.

2. Basic principles of PWFS

The structure of PWFS is shown in Fig. 1. It consists of an aperture modulator (AM), an objective lens (OL), a micro lens array (MLA), and an image sensor (IS). In Fig. 1, dAM is the diameter of AM, dobj and fobj represent the diameter and focal length of OL, dMLA is the length of MLA, and d2 and f2 denote the pitch and focal length of MLA.

 figure: Fig. 1.

Fig. 1. The structure of PWFS. Red dot lines denote the complex amplitudes and green dot lines represent the light rays.

Download Full Size | PDF

In the design of PWFS, the relationship between dAM, dobj and dMLA should satisfy with,

$${d_{obj}} > {d_{MLA}} + {d_{AM}}, $$
in this case, the aperture limiting effects can be suppressed to minimum.

For the sake of brevity, the valid diameter of OL is marked with dvobj = dAM. To avoid overlapping of MLA sub-aperture images, the f-number of OL (only the valid aperture is considered in this paper) should be no less than that of the microlens, which can be expressed as,

$${{{f_{obj}}} / {{d_{vobj}}}} \ge {{{f_2}} / {{d_2}}}. $$
When the f-number of microlens matches the f-number of OL, the PWFS can make the best use of the detector pixels (it is always satisfied in this paper).

According to the optical setup of PWFS in Fig. 1, we can derive the intensity distribution of a plenoptic image from Fourier optics. Assuming the phase of the complex amplitude on the entrance pupil is given by,

$$W({{x_0},{y_0}} )= \sum\limits_{j = 1}^K {{a_j}{Z_j}({{x_0},{y_0}} )} , $$
where Zj(x0, y0) is the modal function like Zernike modes or Karhunen–Loeve modes used to decompose the phase with a maximal order K, and aj is the jth coefficient.

Then the incident complex amplitude (CA) at the AM is,

$${U_0}({{x_0},{y_0}} )= A\,\exp ({jW({{x_0},{y_0}} )} ){P_{AM}}({{x_0},{y_0}} ), $$
where A is the amplitude, and PAM(x0, y0) represents the pupil function of AM.

Then the CA at the front plane of OL can be derived with,

$$\begin{aligned} {U_1}({x,y} )&= \frac{A}{{j\lambda {f_{obj}}}}\exp ({jk{f_{obj}}} )\exp \left( {j\frac{k}{{2{f_{obj}}}}({{x^2} + {y^2}} )} \right) \times \\ &\textrm{ }\mathrm{{\cal F}}{\left\{ {{U_0}({{x_0},{y_0}} )\exp \left[ {j\frac{k}{{2{f_{obj}}}}({x_0^2 + y_0^2} )} \right]} \right\}_{{f_x} = \frac{x}{{\lambda {f_{obj}}}},{f_y} = \frac{y}{{\lambda {f_{obj}}}}}} \end{aligned}. $$

Here $\mathrm{{\cal F}}({\cdot} )$ denotes the Fourier transform, k = 2π/λ is the wave number.

The CA at the back plane of OL can be calculated by,

$${U_2}({x,y} )= {U_1}({x,y} )P({x,y} )\exp \left[ { - j\frac{k}{{2{f_{obj}}}}({{x^2} + {y^2}} )} \right]. $$

Here P(x, y) is the pupil function of OL.

Then the CA at the front plane of MLA can be computed by,

$$\begin{aligned}{U_3}({s,t} )&= \frac{1}{{j\lambda {f_{obj}}}}\exp ({jk{f_{obj}}} )\exp \left( {j\frac{k}{{2{f_{obj}}}}({{s^2} + {t^2}} )} \right) \times \\ &\textrm{ }\mathrm{{\cal F}}{\left\{ {{U_2}({x,y} )\exp \left[ {j\frac{k}{{2{f_{obj}}}}({{x^2} + {y^2}} )} \right]} \right\}_{{f_x} = \frac{s}{{\lambda {f_{obj}}}},{f_y} = \frac{t}{{\lambda {f_{obj}}}}}} \end{aligned}, $$
where (s, t) is the coordinate of MLA plane.

The MLA splits U3 into M × N square sub-apertures, and the CA at the back plane of (i, j)th sub-aperture can be described with,

$$\left\{ \begin{array}{l} {U_3}({{s_i},{t_j}} )= {U_3}({s,t} )\textrm{rect}({i,j} )\\ {U_4}({{s_i},{t_j}} )= {U_3}({{s_i},{t_j}} )\exp \left[ { - j\frac{k}{{2{f_2}}}({{{({{s_i} - {s_{ic}}} )}^2} + {{({{t_j} - {t_{jc}}} )}^2}} )} \right] \end{array} \right.. $$

Here rect(i, j) denotes an operator which selects the corresponding CA of (i, j)th microlens, (si, tj) is the coordinate of U3, and (sic, tjc) is the center coordinate of (i, j)th microlens.

Then the sub-aperture image produced by (i, j)th microlens can be formulated as,

$${I_{({i,j} )}}({u,v} )= {\left|{\frac{1}{{j\lambda {f_2}}}\mathrm{{\cal F}}{{\left\{ {{U_4}({{s_i},{t_j}} )\exp \left[ {j\frac{k}{{2{f_2}}}({{s_i}^2 + {t_j}^2} )} \right]} \right\}}_{{f_x} = \frac{u}{{\lambda {f_2}}},{f_y} = \frac{v}{{\lambda {f_2}}}}}} \right|^2}. $$

Here (u, v) denotes the coordinate of IS.

Finally, the image captured by IS can be obtained with,

$$I({u,v} )= \sum\limits_{i = 1}^M {\sum\limits_{j = 1}^N {{I_{({i,j} )}}({u,v} )} }, $$
where M × N is the number of MLA lenslet units.

Then, as pointed out by Clare et al., the phase gradients can be calculated by the generalized pyramid method [3], which can be formulated as:

$$\left\{ \begin{array}{l} {S_\varepsilon }({\varepsilon ,\eta } )= \frac{{\sum\nolimits_{m ={-} {{({M - 1} )} / 2}}^{{{({M - 1} )} / 2}} {\sum\nolimits_{n ={-} {{({N - 1} )} / 2}}^{{{({N - 1} )} / 2}} {{I_{m,n}}({\varepsilon ,\eta } )n{d_2}} } }}{{L\sum\nolimits_{m ={-} {{({M - 1} )} / 2}}^{{{({M - 1} )} / 2}} {\sum\nolimits_{n ={-} {{({N - 1} )} / 2}}^{{{({N - 1} )} / 2}} {{I_{m,n}}({\varepsilon ,\eta } )} } }}\\ {S_\eta }({\varepsilon ,\eta } )= \frac{{\sum\nolimits_{m ={-} {{({M - 1} )} / 2}}^{{{({M - 1} )} / 2}} {\sum\nolimits_{n ={-} {{({N - 1} )} / 2}}^{{{({N - 1} )} / 2}} {{I_{m,n}}({\varepsilon ,\eta } )m{d_2}} } }}{{L\sum\nolimits_{m ={-} {{({M - 1} )} / 2}}^{{{({M - 1} )} / 2}} {\sum\nolimits_{n ={-} {{({N - 1} )} / 2}}^{{{({N - 1} )} / 2}} {{I_{m,n}}({\varepsilon ,\eta } )} } }} \end{array} \right.\textrm{ }\varepsilon \in [{1,2,\ldots ,P} ],\textrm{ }\eta \in [{1,2,\ldots ,Q} ], $$
where the pixel number under each sub-aperture is P × Q, Im,n (ε, η) is the (ε, η)th pixel value imprinted by the (m, n)th microlens, Sε (ε, η) and Sη (ε, η) are the slope responses in x and y directions, respectively.

When the input wavefront is a tilted wavefront, we change the slope to obtain the slope response curve of PWFS, as shown in Fig. 2. Ideally, the output slope should be linear with the input slope. However, the slope response curve of PWFS is actually stepped in the entire effective range. Therefore, reconstructing wavefront from slope measurements of PWFS is a nonlinear problem.

 figure: Fig. 2.

Fig. 2. The slope response curve of PWFS.

Download Full Size | PDF

3. Method and simulation setup

3.1 Training data generation

For proof-of-principle in our cases, synthetic data artificially created based on the Fourier optics (as described in Section 2) is used. The detailed parameters of the PWFS are shown in Table 1.

Tables Icon

Table 1. The Basic Parameters of PWFS in Simulation

During the simulation, the front focal plane of OL in the PWFS is assumed to be conjugated to a telescope of diameter 1 m. Training set is simulated with the atmospheric coherent length r0 fixed to 12 cm. The target is assumed to be infinitely far away which could be treated as a point source. It should be noted that this paper concentrates on ground-based astronomical observation and high-resolution retina imaging applications, where point targets are commonly considered. Therefore, point target instead of extended target is used during the simulation. The turbulence-induced wavefronts are simulated using 65 Zernike polynomials (starting from tip-tilt terms but they are set to 0 in the simulation) according to the method proposed by Roddier [28]. The plenoptic images are obtained by using the method detailed in Section 2, and their corresponding slope measurements are computed with Eq. (11). The amplitude of the input light is assumed to be 1 over the entrance pupil. Moreover, in the simulation, the photon noise, readout noise as well as dark current are considered, and related parameters are displayed in Table 2. The noise model is the same as our previous work [29].

Tables Icon

Table 2. Parameters and Imaging Conditions in Simulation

In the simulation, a total of 100000 samples, including the phase maps, the corresponding plenoptic images and slope measurements are produced making up the dataset. The training set, validation set and test set contain 60000, 20000 and 20000 samples, respectively. The ratio between training set, validation set and test set is 6:2:2, following the commonly-used rule in deep learning. It should be noted that all generated samples have various SNR by constraining the total photon numbers of each image (as listed in Table 2), and they are divided into 5 SNR levels evenly. During the training procedure, the validation set is utilized to select the model having the best performance.

One example of simulated dataset is shown in Fig. 3, with the phase map in (a), the plenoptic image in (b), and the slope measurements in x and y directions in (c) and (d), respectively. The unit of the phase maps in this paper is unified as λ.

 figure: Fig. 3.

Fig. 3. An example of the data sets. (a) The simulated turbulence-induced phase (tip-tilt terms are excluded), (b) the generated plenoptic image, (c) and (d) are the slope measurements in x and y directions, respectively. Green boxes in (b) denote the sub-apertures.

Download Full Size | PDF

3.2 Network architecture and training results

Similar to deep learning models applied to SHWFS wavefront sensing, a widely-used architecture, U-Net, is considered. The overall network structure of U-Net follows a U-shaped geometry. The encoding part is made of successive 3 × 3 convolution layers followed by 2 × 2 max pooling layers. The input slope maps are thus progressively downsampled while the most relevant features are extracted. The contracting part is followed by an expansion part replacing pooling operators by upsampling operators. Importantly, there are skip connections combining features from the contracting path with the upsampling part. The ResUnet further improves U-Net by adding residual connections to convolution layers and replacing the max pooling layers with convolution layers whose stride is equal to 2. Previous reports have shown that the ResUnet is superior to U-Net in different tasks [30].

In our implementation, a ResUnet model with two-arm structure (as presented in Fig. 4) is utilized, which is also termed as PWFS-ResUnet. In the PWFS-ResUnet, two slope maps in x and y directions are inputted to the model, and each of them enters into a similar encoding process. During the procedure, features with varying scales are extracted and stored. In the decoding part, the highest scale features in x and y directions are concatenated together firstly, and then they are passed through a “bridge” (a residual convolution block) to fuse features in x and y directions, then upsampling operators (transposed 2D convolutions) and skip connections are utilized to combine features in the encoding path. Finally, a depth-wise convolution layer is adopted to produce the phase map.

 figure: Fig. 4.

Fig. 4. The architecture of proposed PWFS-ResUnet model. The boxes in yellow color mean the immediate output of previous layer. The boxes in blue and red colors represent the intermediate output features from slope maps in x and y directions, respectively. A standard residual convolution block is presented in the bottom-right corner, and the stride of convolution layers (marked in green) is equal to 1 or 2 according to the requirement.

Download Full Size | PDF

For the optimization procedure, we employ Adam with an initial learning rate of 10−4 and a scheduler multiplying the learning rate by 0.9 every 4 epochs. We use a batch size of 32 entries, all batches constitute one epoch, and we train for 128 epochs. In addition, dropout strategy with a probability of 0.02 is also used to reduce overfitting. The loss function adopted in our model is the mean RMSE of residual wavefront, i.e.

$$RMSE = \sqrt {\frac{1}{N}\sum\limits_{i,j}^N {{{[{{\phi_{output}}({{x_i},{y_j}} )- {\phi_{label}}({{x_i},{y_j}} )} ]}^2}} }, $$
where Φ represents the phase map, N is the total number of valid sample points per phase map, and subscripts “output” and “label” mean the reconstructed result and the actual value, respectively.

4. Results and analysis

4.1 Results

In this part, the performance of our deep learning model on the PWFS wavefront sensing is verified. Two traditional wavefront reconstruction methods, including the modal algorithm and zonal approach, are compared with our method. Specifically, the Zernike modal algorithm decomposes the wavefront into orthogonal Zernike modes and uses the linear relationships between theoretical gradients of Zernike modes and the slope values of phase map to reconstruct the wavefront. The zonal approach is based on the linear relationship between slope measurements and the differences between adjacent sample points of the phase map (the Southwell model is utilized in this paper). More detailed descriptions of these two methods are presented in Hardy’s book [31].

At first, the training performance (using training data set) and prediction performance (using validation data set) are presented in Fig. 5. The vertical axis denotes the mean residual RMSE while the horizontal axis describes the training time. As shown in Fig. 5, with the increase of training time, the residual RMSE of the training and validation data sets continues to decrease and then gradually converges. Especially, great stable performance is obtained on validation data sets at final stage, indicating well convergence of PWFS-ResUnet. Although the training loss is close to the validation loss, overfitting is not observed in Fig. 5, indicating that the functional relationship between the slope measurements and phase map is correctly fitted. Additionally, it should be noted that since the dropout layer is utilized during the training procedure, it is reasonable that the RMSE values of the validation set are smaller than those of the training set.

 figure: Fig. 5.

Fig. 5. Training and validation loss curves of PWFS-ResUnet.

Download Full Size | PDF

Figure 6 displays the comparison results of one test data set for the three approaches, intuitively illustrating the characteristics of each method. As presented in Fig. 6, the residual wavefront of our method is close to a zero plane, while those of modal algorithm and zonal approach have obvious errors. In addition, the residual wavefront of modal algorithm has flatter distribution compared to that of zonal approach, resulted by the orthogonal filtering characteristic of modal algorithm. The residual wavefront RMSEs for the PWFS-ResUnet, modal algorithm, and zonal approach in Fig. 6 are 0.0592λ, 0.291λ and 0.3374λ, respectively, which is consistent with our observation.

 figure: Fig. 6.

Fig. 6. Comparison of wavefront detection results for the three approaches. (a) The actual phase map. (b) The corresponding plenoptic image. (c) From left to right: the wavefronts reconstructed by PWFS-ResUnet, modal and zonal methods, respectively. (d) The corresponding residual wavefronts. The restored wavefronts and their residuals share the same color bar with the original wavefront

Download Full Size | PDF

To further verify the generality performance of our method, the residual wavefront RMSE results of 1000 test data sets are displayed in Fig. 7. It is clear that our method gets the lowest RMSE values at almost all cases. Table 3 gives the statistical results of three methods (mean ± std). As presented in Table 3, the residual wavefront RMSE of our model is 0.0810 ± 0.0258λ, which is much better than those of modal algorithm (0.2511 ± 0.0587λ) and zonal approach (0.3584 ± 0.0487λ). Therefore, we conclude that the PWFS-ResUnet model indeed solves the nonlinear slope response problem of PWFS algorithmically, while the traditional modal and zonal reconstruction methods based on linear theory perform worse when reconstructing wavefront directly with nonlinear slope measurements of the PWFS.

 figure: Fig. 7.

Fig. 7. The residual wavefront RMSE results of 1000 test data sets.

Download Full Size | PDF

Tables Icon

Table 3. Statistical Results of Wavefront RMS and Residual Wavefront RMSE on 20000 Test Data Sets

In addition, the statistical distribution of residual phase screens obtained with our method is displayed in Fig. 8. Clearly, the actual distribution can be well fitted with a zero-mean Gaussian function. Therefore, the residuals can be regarded as white noise or a similar random process, suggesting that the model is an unbiased estimate of the true value. From the above, we suggest that the numerical simulation results are credible.

 figure: Fig. 8.

Fig. 8. The statistical distribution of residual phase screens of PWFS-ResUnet.

Download Full Size | PDF

4.2 Performance for continuous changing defocus phase maps

In this part, to investigate the inner driving force of PWFS-ResUnet model for successfully correcting the nonlinear errors of PWFS, the performance of PWFS-ResUnet is analyzed when reconstructing continuous defocus wavefronts. The advantage of using defocus aberration for the verification is that the slope measurements in one direction have no relationship with that of the other direction theoretically, simultaneously the slope values of one sub-aperture should be only determined by the coordinate of the sub-aperture. Therefore, it is easy to compare the distributions of calculated slope data at different positions. Let us select the (12, 12)th, (6, 6)th, and (6, 12)th sub-apertures and mark them as P, Q, and M, respectively. Then the symbol SxA and SyA denote the slope values of sub-aperture A in x and y directions.

Figure 9 gives the comparison results of calculated slope values of PWFS at above sub-apertures when the defocus aberration is varying. From Fig. 9(a) and (c), clearly all slope measurements of different sub-apertures follow the step-like distribution when the defocus aberration continuous varies. However, as displayed in Fig. 9(b), although the calculated slope values of P or Q sub-apertures in x and y directions should be equal theoretically (as X­-coordinate and Y-coordinate are the same). And when the defocus wavefront continuous varies, such difference is also changed. Moreover, the difference also varies when the coordinate of sub-aperture changes. Finally, as displayed in Fig. 9(d), even though the X­-coordinates or Y-coordinates keep the same, the slope measurements in the corresponding direction vary greatly when the coordinate in the other direction changes. And the continuous varying aberrations will also result in greater differences. Therefore, it is no doubt that these obvious differences are not introduced by the noise but contain the information of the true phase map, and these differences could be detected and used by the PWFS-ResUnet model to establish the relationship between the nonlinear slope measurements and the phase map. This is probably the explanation that why the neural network can correct the nonlinear errors caused by the PWFS’s optical structure.

 figure: Fig. 9.

Fig. 9. Slope response characteristics of different sub-apertures and directions when the defocus aberration continuous varies. P, Q, and M are the (12, 12)th, (6, 6)th and (6, 12)th sub-apertures. The symbol SxA and SyA denote the slope values of sub-aperture A in x and y directions, respectively.

Download Full Size | PDF

Figure 10 displays 3 continuous varying defocus phase maps and the corresponding results predicted by PWFS-ResUnet, it is obvious that our method still performs well, proving the efficiency of our model for correcting nonlinear errors of PWFS.

 figure: Fig. 10.

Fig. 10. The reconstructed wavefronts and residuals obtained with the PWFS-ResUnet for continuous varying defocus aberrations. (a) The actual defocus aberration, from left to right: RMS = 1.2λ, 1.4λand 1.6λ, respectively. (b) The corresponding reconstructed wavefronts, and (c) the residual wavefronts. The color bar of each column keeps the same with the original wavefront.

Download Full Size | PDF

4.3 Robustness to changing atmospheric turbulence

As introduced in Section 3, the PWFS-ResUnet is trained at a fixed atmospheric coherent length (r0 = 12 cm), thus it is interesting to explore the performance of our model under varying atmospheric turbulence. To test the robustness of our method to turbulence strength, extra 400 data sets under different r0 are generated, and the statistical residual wavefront RMSEs are presented in Fig. 11. It is obvious that even though the distorted wavefronts exceed the training range, our method could still offer an acceptable estimation. It should be noted that the minimum r0 considered here is 8 cm, since smaller r0 will result in heavily information loss (the greatly diffused complex amplitude distribution on the MLA front plane). On the other hand, our model gets lower and more stable RMSE values when the turbulence strength decreases (r0 increases from 12 to 16 cm). Therefore, robust performance is obtained with our model under the dynamic range of current PWFS.

 figure: Fig. 11.

Fig. 11. Robustness of our model to turbulence strength. Each point denotes a statistical result of 100 test data sets, and the atmosphere coherent length r0 of training data sets is 12 cm.

Download Full Size | PDF

Additionally, we suggest that in order to train a robust model for varying turbulence strength, a good choice is to collect more data sets under strong turbulence and less samples under weak turbulence. Moreover, as for the wavefront beyond the training range, the performance of PWFS-ResUnet degrades. In this case, an efficient solution is to perform iteration compensations (as the PWFS-ResUnet model still performs well under weak turbulence).

4.4 Robustness to changing signal-to-noise ratio

In this part, the performance of PWFS-ResUnet model under varying SNR levels is explored. As presented in Table 2, the network architecture is trained at several fixed luminous flux levels. Then, to test the robustness of our model to SNR level, a series of plenoptic images exposed to a larger range of luminous flux levels are generated, and the corresponding slope measurements are calculated. The new test data sets are inputted to the trained PWFS-ResUnet to reconstruct the wavefronts. Figure 12 gives the statistical results of PWFS-ResUnet at 5 different SNR levels. From Fig. 12, it is obvious that good performance is obtained at almost all SNR levels, except for the lowest SNR level (total photon number is 4e6). Especially, with the increase of SNR level, the performance of our model is slightly improved too. One explanation is that at very low signal level, the centroid estimation has large errors, which exceeds the noise filtering range of our model and results in poor performance. Conversely at high signal level, the centroid estimation has smaller error, our model successfully filters the noise, extracts the useful information, and reconstructs the wavefront accurately.

 figure: Fig. 12.

Fig. 12. Robustness of our model to SNR level. Each point denotes a statistical result of 100 test data sets, and the photon number in the training dataset contains [6,8,10,12,14] × 1e6 cases.

Download Full Size | PDF

From the above, we suggest that if robustness under a wider range of SNR levels is desired, the training set should contain data sets acquired under more SNR levels. The photon number in the training dataset should be established based on the intensity range of expected observing target versus desired accuracy.

4.5 Real-time performance of PWFS-ResUnet

Real-time performance of wavefront sensing is another important aspect that should be considered in AO systems. In our implementation, a workstation with a GPU of NVIDIA RTX 3090Ti is used as the test platform. The inference time of PWFS-ResUnet is about 1.2 ms. For an AO system typically running at 1kHz, our model can be considered as a feasible approach. However, this number should only be regarded as the upper bound since both the centroid estimation procedure and the data transmission are not taken into account. Therefore, compression and acceleration techniques should be used to reduce the memory and computational cost before the deployment of our model on a real setup. To accomplish real-time wavefront reconstruction, there are two possible solutions. First, a possible choice is to transfer our model to a multi-core workstation with Linux operating system. The advantage of this configuration is that the slope calculation can be well accelerated by the multi-core CPU, but it has to face the image data transmission problem. Additionally, a more efficient solution is using powerful DSP or FPGA computation platform to transfer the image data and calculate the slope maps. Then the outputted slope data will be easily removed from the computation platform to the GPU since the limited size of slope data.

5. Conclusions

In this article, we proposed and implemented a deep learning method based on ResUnet (termed as PWFS-ResUnet) for PWFS wavefront detection. The PWFS-ResUnet model can estimate the phase map from slope measurements directly. Numerical simulation experiments were used to evaluate the wavefront detection performance of PWFS-ResUnet quantitatively. The statistical residual wavefront RMSE of our method is 0.0810 ± 0.0258λ, which is much better than those of traditional modal algorithm (0.2511 ± 0.0587λ) and zonal approach (0.3584 ± 0.0487λ).

In addition, the experiments on continuous defocus wavefronts reconstruction verified the ability of PWFS-ResUnet on solving nonlinear slope measurement problem. The experimental results showed that the slope response differences between sub-apertures and directions probably play a key role in helping our model to establish the relationship between slope measurements and the phase map.

Then, the robustness of our model to turbulence strength was analyzed. The simulation results showed that even though the distorted wavefronts exceed the training range, our method could still offer an acceptable estimation. On the other hand, our model got better performance when the turbulence strength decreases. Therefore, we suggest that in order to obtain a robust model, a good choice is to collect more data sets under strong turbulence and less samples under weak turbulence.

Moreover, the robustness of our model to signal level was also analyzed. The simulation results proved that stable performance was obtained at almost all SNR levels, indicating good robustness of our model. However it should be noted that at very low signal level, the centroid estimation has large errors, which exceeds the noise filtering range of our model and results in poor performance. Conversely, at high SNR levels, the centroid estimation has smaller error, our model successfully filters the noise, extracts the useful information, and reconstructs the wavefront with high accuracy.

Finally, the real-time performance of PWFS-ResUnet was also analyzed. The inference time of PWFS-ResUnet is about 1.2 ms, making our model a feasible approach for a typical AO system. To accomplish real-time wavefront reconstruction, two possible solutions were proposed.

In conclusion, a deep learning model termed as PWFS-ResUnet was proposed to restore phase maps directly from slope measurements of PWFS. The simulation experimental results demonstrated that PWFS-ResUnet has great potentiality to help PWFS detect atmospheric turbulence with high accuracy and speed. The proposed method provides a new direction to solve the nonlinear problem of traditional PWFS so that the advantages of a traditional PWFS can be fully used. In the next step, we intend to apply the proposed model to the closed-loop control of AO systems with the PWFS.

Funding

Key Technologies Research and Development Program (2021YFF0700700); Strategic Priority Research Program of the Chinese Academy of Sciences (XDA25020316); National Natural Science Foundation of China (62105337, 12073031); Scientific Instrument Developing Project of the Chinese Academy of Sciences (ZDKYYQ20200005).

Acknowledgments

We thank Dr. Zhang Yongfeng for useful suggestions when preparing this paper.

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. Wenhan Jiang, “Overview of adaptive optics development,” Opto-Electronic Engineering 45(3), 1–15 (2018). [CrossRef]  

2. Richard M. Clare and Richard G. Lane, “Phase retrieval from subdivision of the focal plane with a lenslet array,” Appl. Opt. 43(20), 4080–4087 (2004). [CrossRef]  

3. Richard M. Clare and Richard G. Lane, “Wave-front sensing from subdivision of the focal plane with a lenslet array,” J. Opt. Soc. Am. A 22(1), 117–125 (2005). [CrossRef]  

4. J. Ko, C. Wu, and C. C. Davis, “An adaptive optics approach for laser beam correction in turbulence utilizing a modified plenoptic camera,” Proc. SPIE 9614, 96140I (2015). [CrossRef]  

5. X. Chen, W. Xie, H. Ma, J. Chu, B. Qi, G. Ren, X. Sun, and F. Chen, “Wavefront measurement method based on improved light field camera,” Results Phys. 17, 103007 (2020). [CrossRef]  

6. Ziqiang Li and Xinyang Li, “Centroid computation for Shack-Hartmann wavefront sensor in extreme situations based on artificial neural networks,” Opt. Express 26(24), 31675–31692 (2018). [CrossRef]  

7. S. L. Suárez Gómez, C. González-Gutiérrez, E. Díez Alonso, J. D. Santos Rodríguez, M. L. Sánchez Rodríguez, J. Carballido Landeira, A. Basden, and J. Osborn, “Improving adaptive optics reconstructions with a deep learning approach,” Proc.SPIE 10870, 74–83 (2018). [CrossRef]  

8. M. Zhao, W. Zhao, S. Wang, P. Yang, K. Yang, H. Lin, and L. Kong, “Centroid-Predicted Deep Neural Network in Shack-Hartmann Sensors,” IEEE Photonics. J. 14(1), 1–10 (2021). [CrossRef]  

9. R. Swanson, M. Lamb, C. Correia, S. Sivanandam, and K. Kutulakos, “Wavefront reconstruction and prediction with convolutional neural networks,” Proc. SPIE 10703, 481–490 (2018). [CrossRef]  

10. S. Ceruso, S. Bonaque-Gonzalez, A. Pareja-Rios, D. Carmona-Ballester, and J. Trujillo-Sevilla, “Reconstructing wavefront phase from measurements of its slope, an adaptive neural network based approach,” Opt. Laser. Eng 126, 105906 (2020). [CrossRef]  

11. Peng Jia, Mingyang Ma, Dongmei Cai, Weihua Wang, Juanjuan Li, and Can Li, “Compressive Shack–Hartmann wavefront sensor based on deep neural networks,” Mon. Not. R. Astron. Soc 503(3), 3194–3203 (2021). [CrossRef]  

12. T. B. DuBose, D. F. Gardner, and A. T. Watnik, “Intensity-enhanced deep network wavefront reconstruction in Shack–Hartmann sensors,” Opt. Lett. 45(7), 1699–1702 (2020). [CrossRef]  

13. Lejia Hu, Shuwen Hu, Wei Gong, and Ke Si, “Learning-based Shack-Hartmann wavefront sensor for high-order aberration detection,” Opt. Express 27(23), 33504–33517 (2019). [CrossRef]  

14. Lejia Hu, Shuwen Hu, Wei Gong, and Ke Si, “Deep learning assisted Shack–Hartmann wavefront sensor for direct wavefront detection,” Opt. Lett. 45(13), 3741–3744 (2020). [CrossRef]  

15. Yulong He, Zhiwei Liu, Yu Ning, Jun Li, Xiaojun Xu, and Zongfu Jiang, “Deep learning wavefront sensing method for Shack-Hartmann sensors with sparse sub-apertures,” Opt. Express 29(11), 17669–17682 (2021). [CrossRef]  

16. Youming Guo, Yu Wu, Ying Li, Xuejun Rao, and Changhui Rao, “Deep phase retrieval for astronomical Shack–Hartmann wavefront sensors,” Mon. Not. R. Astron. Soc 510(3), 4347–4354 (2022). [CrossRef]  

17. Hongyang Guo, Yangjie Xu, Qing Li, Shengping Du, Dong He, Qiang Wang, and Yongmei Huang, “Improved Machine Learning Approach for Wavefront Sensing,” Sensors 19(16), 3533 (2019). [CrossRef]  

18. Huimin Ma, Haiqiu Liu, Yan Qiao, Xiaohong Li, and Wu Zhang, “Numerical study of adaptive optics compensation based on Convolutional Neural Networks,” Opt. Commun. 433, 283–289 (2019). [CrossRef]  

19. Torben Andersen, Mette Owner-Petersen, and Anita Enmark, “Neural networks for image-based wavefront sensing for astronomy,” Opt. Lett. 44(18), 4618–4621 (2019). [CrossRef]  

20. Yu Wu, Youming Guo, Hua Bao, and Changhui Rao, “Sub-Millisecond Phase Retrieval for Phase-Diversity Wavefront Sensor,” Sensors 20(17), 4877 (2020). [CrossRef]  

21. Scott W. Paine and James R. Fienup, “Machine learning for improved image-based wavefront sensing,” Opt. Lett. 43(6), 1235–1238 (2018). [CrossRef]  

22. Yohei Nishizaki, Matias Valdivia, Ryoichi Horisaki, Katsuhisa Kitaguchi, Mamoru Saito, Jun Tanida, and Esteban Vera, “Deep learning wavefront sensing,” Opt. Express 27(1), 240–251 (2019). [CrossRef]  

23. Xuejing Qiu, Tao Cheng, Lingxi Kong, Shuai Wang, and Bing Xu, “A Single Far-Field Deep Learning Adaptive Optics System Based on Four-Quadrant Discrete Phase Modulation,” Sensors 20(18), 5106 (2020). [CrossRef]  

24. Yuanlong Zhang, Tiankuang Zhou, Lu Fang, Lingjie Kong, Hao Xie, and Qionghai Dai, “Conformal convolutional neural network (CCNN) for single-shot sensorless wavefront sensing,” Opt. Express 28(13), 19218 (2020). [CrossRef]  

25. Gregory Allan, Iksung Kang, Ewan S. Douglas, George Barbastathis, and Kerri Cahoy, “Deep residual learning for low-order wavefront sensing in high-contrast imaging systems,” Opt. Express 28(18), 26267–26283 (2020). [CrossRef]  

26. G. Orban de Xivry, M. Quesnel, P.-O. Vanberg, O. Absil, and G. Louppe, “Focal plane wavefront sensing using machine learning: performance of convolutional neural networks compared to fundamental limits,” Mon. Not. R. Astron. Soc 505(4), 5702–5713 (2021). [CrossRef]  

27. Y. Guo, L. Zhong, L. Min, J. Wang, Y. Wu, K. Chen, K. Wei, and C. Rao, “Adaptive optics based on machine learning: a review,” Opto-Electron. Adv. 5(7), 200082 (2022). [CrossRef]  

28. Nicolas A. Roddier, “Atmospheric wavefront simulation using Zernike polynomials,” Opt. Eng. 29(10), 1174–1180 (1990). [CrossRef]  

29. Hao Chen, YongFeng Zhang, Hua Bao, LingXiao Li, and Kai Wei, “Hartmanngram structural information-assisted aberration measurement for a 4-meter-thin primary mirror with a large dynamic range,” Opt. Commun. 524, 128749 (2022). [CrossRef]  

30. Z. Zhang, Q. Liu, and Y. Wang, “Road Extraction by Deep Residual U-Net,” IEEE Geosci. Remote Sensing Lett. 15(5), 749–753 (2018). [CrossRef]  

31. F. Roddier, Adaptive optics in astronomy (Cambridge University Press, 1999), Chap. 2.

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.

Cited By

Optica participates in Crossref's Cited-By Linking service. Citing articles from Optica Publishing Group journals and other participating publishers are listed here.

Alert me when this article is cited.


Figures (12)

Fig. 1.
Fig. 1. The structure of PWFS. Red dot lines denote the complex amplitudes and green dot lines represent the light rays.
Fig. 2.
Fig. 2. The slope response curve of PWFS.
Fig. 3.
Fig. 3. An example of the data sets. (a) The simulated turbulence-induced phase (tip-tilt terms are excluded), (b) the generated plenoptic image, (c) and (d) are the slope measurements in x and y directions, respectively. Green boxes in (b) denote the sub-apertures.
Fig. 4.
Fig. 4. The architecture of proposed PWFS-ResUnet model. The boxes in yellow color mean the immediate output of previous layer. The boxes in blue and red colors represent the intermediate output features from slope maps in x and y directions, respectively. A standard residual convolution block is presented in the bottom-right corner, and the stride of convolution layers (marked in green) is equal to 1 or 2 according to the requirement.
Fig. 5.
Fig. 5. Training and validation loss curves of PWFS-ResUnet.
Fig. 6.
Fig. 6. Comparison of wavefront detection results for the three approaches. (a) The actual phase map. (b) The corresponding plenoptic image. (c) From left to right: the wavefronts reconstructed by PWFS-ResUnet, modal and zonal methods, respectively. (d) The corresponding residual wavefronts. The restored wavefronts and their residuals share the same color bar with the original wavefront
Fig. 7.
Fig. 7. The residual wavefront RMSE results of 1000 test data sets.
Fig. 8.
Fig. 8. The statistical distribution of residual phase screens of PWFS-ResUnet.
Fig. 9.
Fig. 9. Slope response characteristics of different sub-apertures and directions when the defocus aberration continuous varies. P, Q, and M are the (12, 12)th, (6, 6)th and (6, 12)th sub-apertures. The symbol SxA and SyA denote the slope values of sub-aperture A in x and y directions, respectively.
Fig. 10.
Fig. 10. The reconstructed wavefronts and residuals obtained with the PWFS-ResUnet for continuous varying defocus aberrations. (a) The actual defocus aberration, from left to right: RMS = 1.2λ, 1.4λand 1.6λ, respectively. (b) The corresponding reconstructed wavefronts, and (c) the residual wavefronts. The color bar of each column keeps the same with the original wavefront.
Fig. 11.
Fig. 11. Robustness of our model to turbulence strength. Each point denotes a statistical result of 100 test data sets, and the atmosphere coherent length r0 of training data sets is 12 cm.
Fig. 12.
Fig. 12. Robustness of our model to SNR level. Each point denotes a statistical result of 100 test data sets, and the photon number in the training dataset contains [6,8,10,12,14] × 1e6 cases.

Tables (3)

Tables Icon

Table 1. The Basic Parameters of PWFS in Simulation

Tables Icon

Table 2. Parameters and Imaging Conditions in Simulation

Tables Icon

Table 3. Statistical Results of Wavefront RMS and Residual Wavefront RMSE on 20000 Test Data Sets

Equations (12)

Equations on this page are rendered with MathJax. Learn more.

d o b j > d M L A + d A M ,
f o b j / d v o b j f 2 / d 2 .
W ( x 0 , y 0 ) = j = 1 K a j Z j ( x 0 , y 0 ) ,
U 0 ( x 0 , y 0 ) = A exp ( j W ( x 0 , y 0 ) ) P A M ( x 0 , y 0 ) ,
U 1 ( x , y ) = A j λ f o b j exp ( j k f o b j ) exp ( j k 2 f o b j ( x 2 + y 2 ) ) ×   F { U 0 ( x 0 , y 0 ) exp [ j k 2 f o b j ( x 0 2 + y 0 2 ) ] } f x = x λ f o b j , f y = y λ f o b j .
U 2 ( x , y ) = U 1 ( x , y ) P ( x , y ) exp [ j k 2 f o b j ( x 2 + y 2 ) ] .
U 3 ( s , t ) = 1 j λ f o b j exp ( j k f o b j ) exp ( j k 2 f o b j ( s 2 + t 2 ) ) ×   F { U 2 ( x , y ) exp [ j k 2 f o b j ( x 2 + y 2 ) ] } f x = s λ f o b j , f y = t λ f o b j ,
{ U 3 ( s i , t j ) = U 3 ( s , t ) rect ( i , j ) U 4 ( s i , t j ) = U 3 ( s i , t j ) exp [ j k 2 f 2 ( ( s i s i c ) 2 + ( t j t j c ) 2 ) ] .
I ( i , j ) ( u , v ) = | 1 j λ f 2 F { U 4 ( s i , t j ) exp [ j k 2 f 2 ( s i 2 + t j 2 ) ] } f x = u λ f 2 , f y = v λ f 2 | 2 .
I ( u , v ) = i = 1 M j = 1 N I ( i , j ) ( u , v ) ,
{ S ε ( ε , η ) = m = ( M 1 ) / 2 ( M 1 ) / 2 n = ( N 1 ) / 2 ( N 1 ) / 2 I m , n ( ε , η ) n d 2 L m = ( M 1 ) / 2 ( M 1 ) / 2 n = ( N 1 ) / 2 ( N 1 ) / 2 I m , n ( ε , η ) S η ( ε , η ) = m = ( M 1 ) / 2 ( M 1 ) / 2 n = ( N 1 ) / 2 ( N 1 ) / 2 I m , n ( ε , η ) m d 2 L m = ( M 1 ) / 2 ( M 1 ) / 2 n = ( N 1 ) / 2 ( N 1 ) / 2 I m , n ( ε , η )   ε [ 1 , 2 , , P ] ,   η [ 1 , 2 , , Q ] ,
R M S E = 1 N i , j N [ ϕ o u t p u t ( x i , y j ) ϕ l a b e l ( x i , y j ) ] 2 ,
Select as filters


Select Topics Cancel
© Copyright 2024 | Optica Publishing Group. All rights reserved, including rights for text and data mining and training of artificial technologies or similar technologies.