## 4 Experiment and Discussion
The momentum factor and the learning rate, which affect the stability and speed of the training process of the BPNN, were set to be 0.2 and 0.01, respectively. The number of the training sample in the BPNN was 183,180 and the minimum performance index \(\varepsilon\) was set to 0.0001. Figure 12 shows the outputs of QD5 and QD6 when the IAEC was activated with the BPNN-based PID controller. As can be seen, the outputs of QD5 and QD6 remained near zero during 5 h. It can be verified that M1 and M2 can be rotated by four mini-PZTs to the opposite direction of the detected linear and angular drifts so as to keep the laser spots at the centers of QD5 and QD6, respectively. Comparing with results shown in Figures 11 and 12, it can be seen that the traditional PID controller was not suitable for the proposed improved active error compensator. Therefore, the BPNN-based PID controller rather than the traditional PID controller was used to compensate the laser beam drifts for the long-distance measurement over a long period of time. Figure 13 shows the stability tests of the straightness signals (\(\delta x\) and \(\delta y\)) and the angular signals (\(\theta x\) and \(\theta y\)), which were simultaneously measured by the detector and the comparison unit when \(s_{2}\) and \(s_{3}\) were set to be 50 mm, respectively. It can be seen from Figure 13a that the standard deviations of \(\delta x\) and \(\delta y\) with the active drift compensation were evaluated to be 0.11 \(\upmu\)m and 0.13 \(\upmu\)m, respectively. However, the standard deviations of \(\delta x\) and \(\delta y\) without the active drift compensation were evaluated to be 0.44 \(\upmu\)m and 0.95 \(\upmu\)m, respectively. The standard deviation of \(\theta x\) with and without the active drift compensation was estimated to be 0.08 arcsec and 0.55 arcsec, respectively, and the standard deviation of \(\theta y\) with and without the active drift compensation was evaluated to be 0.09 arcsec and 0.90 arcsec, respectively, as shown in Figure 13b. Figure 11: Outputs of (**a**) QD5 and (**b**) QD6 when the IAEC was activated with the traditional PID controller. Figure 12: Outputs of (**a**) QD5 and (**b**) QD6 when the IAEC was activated with the BPNN-based PID controller. The stabilities of \(\delta x\), \(\delta y\), \(\theta x\) and \(\theta y\) when \(s_{2}\) were set to be 500 mm and 1500 mm were also tested. For the sake of clarity, the stability resulted when \(s_{2}\) was set to be 50 mm, 500 mm and 1500 mm, as summarized in Table 1. As can be seen, the signals with the active drift compensation were better stabilized than those without the active drift compensation. Although the stabilities of \(\delta x\), \(\delta y\), \(\theta x\) and \(\theta y\) at the position of 1500 mm were poorer than those at the position of 50 mm and 500 mm, the stabilities of \(\delta x\), \(\delta y\), \(\theta x\) and \(\theta y\) could always be controlled within \(\pm\)1 \(\upmu\)m and \(\pm\)0.3 arcsec, respectively, from which the effectiveness of the IAEC was demonstrated. Finally, the laboratory-built LD-based measurement system was used to measure the straightness and the angular errors of a linear stage with a travel stroke of 1.5 m. The proposed active methods were used to improve the measurement accuracy of the designed system. Standard instruments, including a commercial laser interferometer and a commercial autocollimator, were also used to simultaneously measure the straightness and the angular errors of the stage to calibrate the measurement accuracy of the LD-based measurement system. The measured results are shown in Figure 14. The left vertical axis of the figure is the \(\delta_{x}\), \(\delta_{y}\), \(\theta_{x}\) and \(\theta_{y}\) measured simultaneously by using the standard instruments and the proposed LD-based system. The right vertical axis of the figure, which is the difference between the results measured by using the standard instruments and the proposed LD-based system, represents the measurement accuracy of the designed LD-based system.