# Interferometric Wavefront Sensing System Based on Deep Learning
## 3 Experiment
This is because the use of Zernike polynomials as the basis function is not orthogonal on the discrete sampling points, which will cause the equations to appear ill-conditioned and greatly affect the fitting accuracy. The fitting speed of the net2 is slower; it takes about 0.9 s to complete the fitting process. However, the trained neural network can better fit the corresponding Zernike coefficients and has high fitting accuracy with RMSE of 0.16 and 0.17, which is a better choice to be used to analyze and guide wavefront correction. Finally, to see how the wavefront detection system performs in the real environment, we built a detection system and conducted a series of wavefront detection experiments, as shown in Figure 8. Here, a laser diode (Changfu Technology, Beijing, China) with the power of 150 mW and wavelength of 532 nm was used as the light source. The laser passes through the beam expander and collimator and is divided into two parts by the beam splitter. The reference beam illuminates vertically on the mirror M1 controlled by the precision linear stage (Physik Instrumente, Karlsruhe, Germany), and the measuring beam illuminates on the deformable mirror. By adjusting the tightening screws, we can apply different forces to the deformable mirror to generate different distorted wavefronts. Then, according to the measurement requirements of the four-step phase-shifting method, we controlled the precision linear stage to move in one direction four times; each time, the reference beam phase changed by \(\pi\)/2. Finally, the fringe patterns were recorded by the camera (Daheng Image Vision, Beijing, China), as shown in Figure 9.  
According to the relationships between the trigonometric functions, we can calculate the wrapped phase corresponding to the wavefront (Figure 10a). After that, we input the wrapped phase into our net1 and get the unwrapped phase (Figure 10b). What is more, we also used the [PERSON]'s branch cut algorithm to process the wrapped phase and compared the output result with that of net1, which are expressed in Figure 10c,d. It can be seen that the outputs of these two methods are almost identical, which indirectly proves that net1 can effectively process the wrapped phase. To further analyze the wavefront aberration, we input the unwrapped phase to net2 and fit the corresponding first 36 Zernike coefficients, as shown in Figure 10e and Table 3. To analyze the accuracy of the fitting results, we used the fitted Zernike coefficients to reconstruct the wavefront (Figure 10f) and calculated the difference between the reconstructed wavefront and the real wavefront in the circular domain, as shown in Figure 10g. The difference expressed in Figure 10g shows that the overall error is small and is controlled within \(\pm\)0.5; the RMSE is 0.6133. There is a large error at the border of the wavefront at individual points. After analysis, this is caused by the detection error of the camera. Through experiments in the real environment, the wavefront detection system can satisfactorily complete the wavefront detection and analysis works, which proves that it is an accurate and effective wavefront detection method. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Net1** & **Branch Cut** & **Quality-Guided** \\ \hline RMSE & 0.37 & 1.48 & 1.02 \\ Time & 1.06 s & 1.97 s & 12.73 s \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Accuracies (RMSEs) and time consumption of different phase-unwrapping algorithms (SNR = 3). Figure 8: Experiments to demonstrate the wavefront detection process. Figure 7: Zernike coefficients fitting results. (**a**) Distorted wavefront, (**b**) the fitting result of the Zernike coefficient using different methods.