## 3 Factors Affecting Accuracy and Accuracy-Improvement Methods
### Effect of the Stability in Output Beam Direction of the LD
 \right]^{T}, \tag{12}\]  
Figure 6: Principle of the IAEC. Figure 7: Outputs of QD5 and QD6 caused by **(a)** the angular drift, **(b)** the linear drift, **(c)** the rotation of M1 and **(d)** the rotation of M2. \[n_{BS}=\left[ \begin{array}{cc}N_{BSx}&N_{BSy}&N_{BSz}\end{array} \right]\;=\; \left[ \begin{array}{cc}\frac{\sqrt{2}}{2}&0&-\frac{\sqrt{2}}{2}\end{array}  \right]^{T}, \tag{13}\]  
The direction vectors of the laser beams (\(I_{1}{}^{\prime}\), \(I_{2}{}^{\prime}\) and \(I_{3}{}^{\prime}\)) reflected from M1, M2 and BS1 can thus be expressed as:  
\[I^{\prime}_{1}=M_{M_{1}}\cdot{}^{\prime}_{0}=\left[ \begin{array}{cc}1-2N_{M _{1}M_{1}}^{2}&-2N_{M_{1}N_{M1}}^{2}&-2N_{M_{1}N_{M1}}\\ -2N_{M_{1}N_{M1}}N_{M1}&1-2N_{M_{1}M_{1}}^{2}&-2N_{M_{1}N_{M1}}\\ -2N_{M_{1}N_{M1}}N_{M1z}&-2N_{M_{1}M_{1}}\end{array} \right]\cdot\left[ \begin{array} []{cc}a_{0}\\ \beta_{0}\end{array} \right]=\left[ \begin{array}{c}1\\ a_{0}\\ -\beta_{0}\end{array} \right], \tag{14}\]  
\[I^{\prime}_{2}=M_{M_{2}}\cdot I^{\prime}_{1}=\left[ \begin{array}{cc}1-2N_{M _{2}M_{2}}^{2}&-2N_{M_{2}N_{M2}}^{2}&-2N_{M_{2}N_{M2}}\\ -2N_{M_{2}N_{M2}}N_{M2z}&1-2N_{M_{2}Mz}^{2}\end{array} \right]\cdot\left[ \begin{array}{c}1\\ a_{0}\\ -\beta_{0}\end{array} \right]=\left[ \begin{array}{c}a_{0}\\ -\beta_{0}\end{array} \right], \tag{15}\]  
\[I^{\prime}_{3}=M_{M_{M_{3}}}\cdot I^{\prime}_{2}=\left[ \begin{array}{cc}1-2 N_{BSx}^{2}&-2N_{BSx}N_{BSy}&-2N_{BSy}N_{BSz}\\ -2N_{BSx}N_{BSy}&1-2N_{BSy}^{2}&-2N_{BSy}N_{BSz}\\ -2N_{BSx}N_{BSz}&-2N_{BSy}N_{BSz}&1-2N_{BSz}^{2}\end{array} \right]\cdot\left[ \begin{array}{c}a_{0}\\ -\beta_{0}\end{array} \right]=\left[ \begin{array}{c}1\\ a_{0}\\ -\beta_{0}\end{array} \right], \tag{16}\]  
Therefore, the \(X\)- and \(Y\)-directional outputs of QD6 caused by the angular drift (\(\alpha_{0}\) and \(\beta_{0}\)) can be evaluated to be \(\alpha_{0}\) and \(-\beta_{0}\) according to Equation (15). The coordinates of the emitting point \(O\) of \(I_{0}\) from the LD and the intersection point \(A\) between \(I_{0}\) and M1 were set to be (0, 0, 0) and (0, 0, \(-d_{1}\)), respectively. \(d_{1}\) represents the distance between the LD and M1. The line function of the emitted laser beam \(I_{1}{}^{\prime}\) and the plane equation of M1 can thus be expressed as:  
\[\frac{x}{\alpha_{0}}=\frac{y}{\beta_{0}}=-z\;\text{and}\;\frac{\sqrt{2}}{2}x+ \frac{\sqrt{2}}{2}(z+d_{1})=0, \tag{17}\]  
Therefore, the coordinate of the intersection point A\({}^{\prime}\) between \(I_{0}{}^{\prime}\) and M1 can be evaluated to be: \((A^{\prime}{}_{x},\;A^{\prime}{}_{y},\;A^{\prime}{}  
PID controller was used in this research to quickly and accurately adjust the angles of M1 and M2 to simultaneously compensate the linear and the angular drifts. The flowchart of the BPNN-based PID controller is shown in Figure 8. A neural network, consisting of the input layer with three neurons, the hidden layer with five neurons and the output layer with three neurons, was used. The three neurons of the output layer represented the PID controller parameters \(K_{i}\), \(K_{p}\) and \(K_{d}\), which needed to be trained by the BPNN according to the stability data of the designed system. It was essential to adjust the BPNN parameters during the training to let \(e(k)\) reach the minimum performance index \(\varepsilon\), at which the neural network training was finished. The obtained PID controller parameters were used to control the driven voltage of the mini-PZTs according to the instantaneously measured linear and angular drifts in real-time. The mini-PZTs changed the angles of M1 and M2 with opposite directions of the detected linear and angular drifts so that the linear and angular drifts could be compensated.