# Interferometric Wavefront Sensing System Based on Deep Learning
## 2 Method  
### Wavefront Detecting System  
A wavefront is a combination of points where light has the same phase in space, and the wavefront aberration refers to the difference between the actual wavefront and the ideal wavefront [11]. In wavefront detection, it is crucial to get the distorted wavefront phase distribution first, and then the wavefront aberration can be further analyzed. The phase-shifting (PS) method [12], as a common phase measurement method, is very common in various interference systems. In the industrial field, the wavefront detection technology based on the phase-shifting interference device is widely used in the detection of optical surface defects, because it has the advantages of a large measurement field and high measurement accuracy. The phase-shifting method can generate multiple interference fringe patterns by continuously changing the phase value of the reference beam, and it extracts the phase distribution of the measuring beam according to the relationships between the fringe patterns. Compared with other phase extraction methods such as the Fourier transform method [13], wavelet transform method [14], etc., the phase-shifting method is quite insensitive to background intensity and it can achieve pixel-wise phase measurement with higher resolution and accuracy. Therefore, using phase-shifting interference system for wavefront detection will not be interfered by external light sources, and it can better complete the measurement task in a general environment, which breaks the constraint of the dark environment. Here, we designed a phase-shifting interference system to detect the distorted wavefront caused by the defect of the optical components, as shown in Figure 1.  
Here, the laser emits a beam with a wavelength of 532 nm through the beam expander and collimator (B) as the illumination source. To avoid excessive laser intensity, we placed an adjustable neutral density filter (ND) at the exit port to adjust the intensity. The parallel beam irradiated on the beam splitter (BS) is divided into two parts; one passes through the BS and irradiates vertically on the mirror M1 controlled by a precision linear stage (PLS) as the reference beam, and the other one is  
Figure 1: Phase-shifting interferometer. ND: neutral density filter; B: beam expander and collimator; BS: beam splitter; M1, M2: mirror; M3: deformable mirror; PLS: precision linear stage. reflected by mirror M2 to the deformable mirror M3 as the measuring beam. The reference beam and the measuring beam are reflected by M1 and M3 respectively, and they converge and interfere at the BS. The interference fringes are finally recorded by the camera. The intensity of the fringe pattern can be expressed as Equation (1):  
\[\mathrm{I(x,y)}=\mathrm{I_{r}(x,y)}+\mathrm{I_{o}(x,y)}+\mathrm{I_{b}(x,y)}+2 \sqrt{\mathrm{I_{r}I_{o}}}\cos(\varphi_{r}(x,y)-\varphi_{o}(x,y)) \tag{1}\]  
where \(\mathrm{I(x,y)}\) is the intensity of the fringe pattern, \(\mathrm{I_{r}(x,y)}\) is the reference beam intensity, \(\mathrm{I_{o}(x,y)}\) is the measuring beam intensity, \(\mathrm{I_{b}(x,y)}\) is the background noise, \(\varphi_{r}(x,y)\) represents the reference beam phase distribution, and \(\varphi_{o}(x,y)\) represents the measuring beam phase distribution. Here, \(x\) and \(y\) refer to the horizontal and vertical coordinates of each pixel on the interference field area recorded by the camera. In this system, the deformable mirror will deform when subjected to external forces, which will change the phase value at each point on the measuring wavefront, thereby simulating the distortion of spatial light after long-distance transmission. When it is not subjected to external forces, it is equivalent to a plane mirror, and the reflected wavefront is still a plane. At this time, the optical path difference between the reference beam and the measuring beam at all points on the interference field is equal.