# Piston Error Measurement for Segmented Telescopes Based on a Hybrid Artificial Neural Network
## 3 Simulation
### Simulation on Four Sub-Mirrors Segmented Telescope System  
In this part, we use a four sub-mirror segmented telescope system as an example to test the performance of the proposed algorithm on detecting the piston errors of a multiple sub-mirrors (\(n>2\)) segmented telescope system at one time. When using the Resnet network to detect the signs of piston errors of the multi-submirrors, the output of the Resnet network was set to \(2^{(N-1)}\), which corresponds to the piston error signs of all sub-mirrors (except the reference sub-mirror). When the BP network was used to solve the absolute value of the piston errors of multiple sub-mirrors through the MTF sidelobes, according to paper [16], we used a segmented telescope system composed of \(N\) sub-mirrors, there are \(N^{2}\) sub-MTFs. In the spatial frequency domain, the \(N\) sub-MTFs overlapped at the position where the center spatial frequency was zero to form the central peak, while the other \(N(N-1)\) sub-MTFs distributed around the central peak to form the sidelobes. Every pair of sub-mirrors produced a pair of MTF sidelobes; the sidelobes symmetrically distributed on both sides of the central peak. If all of the sidelobes did not overlap, their amplitudes could be obtained at the same time by one CCD image, hence the absolute value of the piston errors of all sub-mirrors can be retrieved at the same time by inputting the peak height of the sub-MTFs corresponding to each sub-mirror into the trained BP network. Combining the outputs of the two networks, the piston errors of all the segmented sub-mirrors can be solved at one time using a focal plane degradation image. The established simulation model of a four sub-mirrors segmented telescope system in MATLAB is shown in Figure 14. The reason why the system model was built like this was to prevent the MTF sidelobes from overlapping. Here, the wavelength of the input broadband light was also centered at 632.8 nm with a 20 nm bandwidth. The No. 1 sub-mirror was set as reference pupil and the piston errors randomly generated between \(-10\)\(\upmu\)m and \(10\)\(\upmu\)m were introduced on sub-mirrors No. 2, 3, and 4, thus the degraded focal plane images with different piston errors could be obtained. Figure 15 shows several degraded images on the focal plane corresponding to the several sets of introduced piston errors on multiple sub-mirrors. Figure 13: Piston error detection results of the 500 test sets for the two sub-mirror segmented system: (**a**) the whole detection results of the 500 test sets; (**b**) detection results after removing the 6 sets of outliers; (**c**) statistical histogram distribution of the piston error measurement difference. During the simulation experiment, 60,000 sets of piston errors were randomly generated and introduced into the simulation optical system; 60,000 groups of focal plane degradation images can be obtained. The focal plane degradation image was used as the input of the Resnet network, and the signs of the piston errors of the 3 sub-mirrors were  
Figure 14: Segmented telescope model composed of four sub-mirrors. Figure 15: Degraded focal plane images of the four sub-mirror segmented system: (a) [p\({}^{2}\) p\({}^{3}\) p\({}^{4}\)] = [\(-2.5\) 0 5] \(\mu\)m; (b) [p\({}^{2}\) p\({}^{3}\) p\({}^{4}\)] = [\(2.5\) 0 \(-\)5] \(\mu\)m; (c) [p\({}^{2}\) p\({}^{3}\) p\({}^{4}\)] = [\(4\) \(-7.5\) 10] \(\mu\)m; (d) [p\({}^{2}\) p\({}^{3}\) p\({}^{4}\)] = [\(-4\) \(7.5\) \(-\)10] \(\mu\)m; (e) [p\({}^{2}\) p\({}^{3}\) p\({}^{4}\)] = [\(9\) \(0.6\) \(2.75\)] \(\mu\)m; (f) [p\({}^{2}\) p\({}^{3}\) p\({}^{4}\)] = [\(-9\) \(-0.6\) \(2.75\)] \(\mu\)m.  
used as the output. Here, the Resnet network output was divided into eight categories.