## 3 Modeling and Simulations of the Assembly Error Effect on the Stability Accuracy
### Modeling and Simulation of the Motor Kinematics  
All the compensation movements are driven by the motors including the azimuth motor and the pitch motor. The equivalent circuit of the motor is shown in Figure 7, where \(U_{m}\) is the motor armature voltage; \(I_{m}\) is the armature current; \(R_{m}\) is the total resistor of the armature circuit; \(L_{m}\) is the total inductance; \(M_{m}\) is the motor output torque; \(J_{m}\) and \(J_{L}\) are the rotary inertia of the motor and the load; and \(D_{L}\) and \(K_{L}\) are the damping and elastic coefficients between the motor and the load. \(\theta_{m}\), \(d\theta_{m}/dt\), and \(d^{2}\theta_{m}/dt^{2}\) are the outputs of angle, angular velocity, and angular acceleration of the motor side. \(\theta_{L}\), \(d\theta_{L}/dt\), and \(d^{2}\theta_{L}/dt^{2}\) are those of the load side, respectively.  
The equations of voltage balance, back electro-dynamic force (EMF), and moment for DC torque motor are shown in Equation (9), where \(E_{m}\) is the EMF, \(C_{e}\) is the coefficient of EMF, \(C_{m}\) is the coefficient of the motor torque.  
\[\left\{\begin{array}{c}U_{m}=E_{m}+I_{m}R_{m}+L_{m}(dl_{m}/dt)\\ E_{m}=C_{e}(d\theta_{m}/dt)\\ M_{m}=C_{m}I_{m}\end{array}\right., \tag{9}\]  
By combining the three equations of Equation (9), Equation (10) is obtained:  
\[U_{m}=C_{e}\frac{d\theta_{m}}{dt}+\frac{M_{m}}{C_{m}}R_{m}+\frac{L_{m}}{C_{m} }\frac{dM_{m}}{dt}, \tag{10}\]  
The kinematics of the motor is analyzed and expressed as Equation (11):  
\[\left\{\begin{array}{c}J_{m}\frac{d^{2}\theta_{m}}{dt^{2}}+D_{L}\Big{(}\frac {d\theta_{m}}{dt}-\frac{d\theta_{m}}{dt}\Big{)}+K_{L}(\theta_{m}-\theta_{L})= M_{m}\\ J_{L}\frac{d^{2}\theta_{L}}{dt^{2}}+D_{L}\Big{(}\frac{d\theta_{L}}{dt}-\frac{d \theta_{m}}{dt}\Big{)}+K_{L}(\theta_{L}-\theta_{m})=0\end{array}\right., \tag{11}\]  
The servo-control of the motor generally adheres to principles of pulse width modulation (PWM) or automatic drive (AD). The input is the compensation velocity as shown in Equation (7), and denoted as \(\dot{\theta}_{L}\) here. The output is the control voltage \(U_{c}\). In this research, the driving circuit of the motor is taken as a lagging amplification model. Therefore, the Laplace transform function can be expressed as Equation (12), where \(K_{p}\) is the amplification coefficient; \(T_{p}\) is the lagging time. Because the working frequency of the circuit is much larger than the cut-off frequency of the motor, the effect of lagging time can be ignored.  
\[U_{c}(s)=K_{p}e^{-T_{p}s}\dot{\theta}_{L}(s)\approx K_{p}\dot{\theta}_{L}(s), \tag{12}\]  
Using Laplace inverse transformation, Equation (12) can be transformed as Equation (13):  
\[U_{c}(t)=K_{p}\dot{\theta}_{L}(t), \tag{13}\]  
The voltage balance of the servo-control circuit is expressed as (14), where \(E_{s}\) is the EMF of the voltage source, and \(R_{s}\) is the resistor.  
\[\left\{\begin{array}{c}U_{c}=E_{s}+U_{m}\\ E_{s}=R_{s}I_{m}\end{array}\right., \tag{14}\]  
Based on the analysis above, the kinematics and servo-control of the motors are simulated in Simulink. For example, the simulation of the pitch motor is shown in Figure 8. The real-time motor  
Figure 7: Equivalent armature circuit of the motor.  
velocity \(\dot{\theta}_{p}\) is set as one of the inputs. \(\dot{\theta}_{p}\) can be obtained by using output of the pitch kinematics module in Section 3.4. Gyroscope signal of \(\omega_{gyro\_y}\) is the other input, and it can be obtained by using signals of the gyroscope module, which will be discussed later.  
Based on the above analyses of Equation (10), Equation (11), Equation (13), and Equation (14), the y-axial component of the pitch velocity vector \(\overrightarrow{\alpha_{ip}}\), namely \(\omega_{ipy}\), is equal to \(\dot{\theta}_{L}\) by definition. So \(\omega_{ipy}\) is set as the final output of this module and it will be used in other modules. The simulation module for the azimuth motor is similar, and the output will be \(\omega_{iaz}\), which is discussed and used in Section 3.3.