## 3 Modeling and Simulations of the Assembly Error Effect on the Stability Accuracy
### Modeling and Simulation of the Assembly Error Effects on Stability Accuracy
#### 3.5.1 Modeling and Simulation of Assembly Errors of Axis Perpendicularities  
Ideally, the coordinate of the azimuth \(\{a\}\) is parallel to \(\{b\}\) when the system has no azimuth rotation. However, due to the effect of assembly error, the real axis location is not perfectly perpendicular to the base, and the perpendicularity deviation can be denoted as a vector of \(\overrightarrow{\delta}_{ba}=\left[\delta_{bax},\delta_{bny},0\right]^{T}\).  
As a result, the coordinate \(\{a\}\) and especially for the rotation axis of the azimuth compensation \(o_{a}z_{a}\) will also deviate from the ideal direction by \(\overrightarrow{\delta}_{ba}\). (For simplification, \(o_{a}z_{a}\) is taken as the instantaneous rotation axis for error analysis of perpendicularity, rather than the average one.) For the pitch compensation, the perpendicularity deviation vector is denoted as \(\overrightarrow{\delta}_{ap}=\left[\delta_{apx},0,\delta_{apz}\right]^{T}\) respectively. The meaning of axis perpendicularity deviations is shown in Figure 9. In this case, the rotation transformation matrix affected by errors of axis perpendicularity can be expressed as Equation (15):  
\[R_{a}^{\prime}=\left[\begin{array}{ccc}c\delta_{bny}&0&-s\delta_{bny}\\ 0&1&0\\ s\delta_{bny}&0&c\delta_{bny}\end{array}\right]\left[\begin{array}{ccc}1&0&0 \\ 0&c\delta_{bax}&s\delta_{bnx}\\ 0&-s\delta_{bax}&c\delta_{bax}\end{array}\right]R_{p}^{\prime}=\left[ \begin{array}{ccc}c\delta_{apz}&s\delta_{apz}&0\\ -s\delta_{apz}&c\delta_{apz}&0\\ 0&0&1\end{array}\right]\left[\begin{array}{ccc}1&0&0\\ 0&c\delta_{apx}&s\delta_{apx}\\ 0&-s\delta_{apx}&c\delta_{apx}\end{array}\right], \tag{15}\]  
Figure 8: Simulation module of the pitch motor.  
The angular velocity vectors of the azimuth and the pitch in \(\{i\}\) affected by errors of axis perpendicularity are denoted as \(\overset{\rightarrow}{\omega}_{ia}^{\prime}\) and \(\overset{\rightarrow}{\omega}_{ip}^{\prime}\), and they can be calculated by using Equation (16):  
\[\overset{\rightarrow}{\omega}_{ia}^{\prime}=R_{b}^{a}R_{a}^{\prime}\overset{ \rightarrow}{\omega}_{ib}+\overset{\rightarrow}{\omega}_{ba}\overset{ \rightarrow}{\omega}_{ip}^{\prime\prime}=R_{a}^{p}R_{p}^{\prime}\overset{ \rightarrow}{\omega}_{ia}^{\prime\prime}+\overset{\rightarrow}{\omega}_{ap} =R_{a}^{p}R_{p}^{\prime}R_{b}^{a}R_{a}^{\prime}\overset{\rightarrow}{\omega}_ {ib}+R_{a}^{p}R_{p}^{\prime}\overset{\rightarrow}{\omega}_{ba}+\overset{ \rightarrow}{\omega}_{ap}^{\prime}, \tag{16}\]  
Based on Equation (16) and analysis above, the signals of the gyroscopes affected by \(\overset{\rightarrow}{\delta}_{bu}\) and \(\overset{\rightarrow}{\delta}_{ap}\) are simulated in Simulink as shown in Figure 10. Taking the azimuth, for example, based on Equation (16), \(\overset{\rightarrow}{\omega}_{ib}\) is set as the input; the perpendicularity deviation vector \(\overset{\rightarrow}{\delta}_{ba}\) and the transformation matrix \(R_{a}^{\prime}\) are imbedded in the middle; the output is \(R_{a}^{\prime}\overset{\rightarrow}{\omega}_{ib}\), which will be used in other modules. The value of \(\overset{\rightarrow}{\delta}_{ba}\) can be set as needed in the future simulation experiments. The simulation module for the pitch frame is similar. Additionally, the value of \(\overset{\rightarrow}{\delta}_{ba}\) and \(\overset{\rightarrow}{\delta}_{ap}\) are determined by the assembly accuracies of the axes and frames. They can be measured by using high-precision instruments [20].