# Piston Error Measurement for Segmented Telescopes with an Artificial Neural Network
## 4 Simulation
### Simultaneous Multi-Piston Measurement
We randomly introduced different piston errors between 0 \(\upmu\)m and 200 \(\upmu\)m to No. 2, No. 3 and No. 4 sub-mirrors at the same time, then performed Fourier transform for the obtained PSF image to get the system MTF. Here we also added zero mean and 0.05 variance Gaussian distribution noise to the simulated PSF images. According to the correspondence relation between the MTF sidelobes and sub-mirrors (here No. 4 sub-MTF corresponded to No. 2 sub-mirror, No. 6 sub-MTF to the No. 3 sub-mirror and No. 5 sub-MTF to No. 4 sub-mirror, respectively), by inputting the peak height of sub-MTF corresponding to each sub-mirror into the trained network, the piston errors of all the sub-mirrors could be measured by one CCD image  
Figure 11: Peak heights of the MTF sidelobes varying with the piston errors of the optics system composed of 4 sub-mirrors. Figure 12: The network training result for the optics system composed of 4 sub-mirrors. at one time. A part of the simulation results is listed in Figure 13. The piston error measurement results of No. 2, No. 3 and No.4 sub-mirrors are given by Figure 13a-c, respectively. Figure 13d shows the total RMSE of the three sub-mirrors' piston error measurement accuracy during each test. From the simulation results we can see that the multi-piston errors between the segments of the entire aperture could be simultaneously detected with high accuracy: the average value of the RMS errors over the testing samples was about 1.4 nm. Since the peak height of sub-MTF corresponding to each sub-mirror was fed into the trained network to measure the piston errors, the most important issue was to avoid the MTF sidelobes respectively produced by the reference sub-pupil and all of the measured sub-pupils overlapping. For the detailed arrangement rules, refer to paper [31] to confirm the MTF sidelobe distribution was non-redundant. Finally, we tried to compare our work with [PERSON]'s work presented in paper [32], since this also used a single broadband image to sense the piston errors between sub-pupils. Rather than establishing the theoretical relationship between the MTF sidelobes of PSF images and the piston errors like us, this research directly used in-focused broadband images as the input, and established one deep convolutional neural network (DCNN) to learn to sense pistons with a single broadband focal image. The simulation results for the two-pupil imaging system and four-pupil imaging system are shown in Figure 14.  
Figure 13: Piston error measurement results for the four-segment system: (**a**–**c**) piston error measurement results of No. 2, No. 3 and No.4 sub-mirrors, respectively, and (**d**) the total RMSE of the three sub-mirrors’ piston error measurement accuracy during each test. From the simulation results, we can see that our method has higher piston error measurement accuracy than [PERSON]'s method presented in paper [32]. This improvement of the detection accuracy is at the expense of extensive complex optical calculations in advance in our work, since we used the MTF sidelobes of PSF images as inputs for the network based on the established theoretical relationship between the MTF sidelobes and the piston errors, while [PERSON] directly used in-focused broadband images as the input.