# Design and Implementation of Attitude Stabilization System for Marine Satellite Tracking Antenna
## 3 Modeling and Parameter Identification
### Velocity Model of Elevation Part  
In the MSTA under development, the stepper motor is used as the actuator and is working in velocity mode. The velocity model of the elevation part is actually also the velocity model of the stepper motor. The reason is that the elevation part is considered as the load of the stepper motor. Figure 4: Stepper motor control and drive board: (**a**) 3D view of the board in PCB design software; and (**b**) photo of the real board. The modeling method of the stepper motor proposed here is different from the conventional method. In the conventional method, the stepper motor works in open-loop mode and the rotation velocity of the shaft of stepper motor is unmeasurable. However, in our case, the rotation velocity of the shaft of stepper motor is measured by high-precision Micro-Electro-Mechanical Systems (MEMS) gyroscopes mounted together with the elevation part. The stepper motor model built in this part is simpler than that in previous papers, and can be easily used in simulation, linear and nonlinear controller design. Moreover, the parameters in the model can be easily identified from sampled experiment data while the parameters in the model in previous papers, such as the motor maximum magnetic flux, \(\psi_{m}\), are very hard to be obtained. The detailed procedure of modeling is stated next. In open loop mode, the controller sends out the command velocity, \(V_{c}(t)\), to the stepper motor control and drive chips, which are responsible for rotating the magnetic field inside stepper motor. The rotation velocity of the magnetic field generated by the stator of stepper motor is denoted as \(V_{s}(t)\), and the relationship between them is expressed in Equation (1),  
\[\dot{V}_{s}(t)=\frac{1}{t_{mc}}\left(V_{c}(t)-V_{s}(t)\right) \tag{1}\]  
where \(t_{mc}\) is a time constant of the first-order transfer function that is determined through experiments. If Equation (1) is transformed into frequency domain through Laplace transform, it becomes \(\frac{V_{s}(s)}{V_{c}(s)}=\frac{1}{t_{mc}\cdot s+1}\) and is actually a low-pass filter. The reason for using Equation (1) is that \(V_{s}\) cannot be changed sharply to avoid missing steps, which is fundamentally caused by the output torque limitation of the stepper motor. The change of \(V_{s}\) has to follow a velocity profile, which is achieved by the stepper motor control and driver chips. The calculation of the output torque of stepper motor, \(T_{s}(t)\) is illustrated in Figure 5.  
Figure 5: Calculation of the output torque of stepper motor. In Figure 5, \(\vec{S}_{m}\) is the direction of the magnetic field generated by the stepper motor stator, whose rotation angle is represented by \(\theta_{s}\). \(\vec{R}_{m}\) is the direction of the magnetic filed of the rotor, whose rotation angle is represented by \(\theta_{r}\). \(\theta_{step}\) is the step angle and is \(\frac{18.\pi}{180}\) rad. \(T_{s}(t)\) is calculated by  
\[T_{s}(t) = T_{\max}\cdot\sin\left(\frac{2\pi}{4\cdot\theta_{step}}\cdot \Delta\theta_{sr}(t)\right) \tag{2}\] \[\Delta\theta_{sr}(t) = \theta_{s}(t)-\theta_{r}(t)\] (3) \[\theta_{s}(t) = \int V_{s}(t)dt\] (4) \[\theta_{r}(t) = \int V_{r}(t)dt \tag{5}\]  
where \(T_{\max}\) is the maximum output torque of the stepper motor. Note that \(T_{\max}\) is different from and is smaller than holding torque. In addition, note that \(T_{\max}\) is not a constant but a curve of rotation velocity of motor shaft, as shown in Figure 6.  
The curve of \(T_{\max}\) in Figure 6 can be found in the stepper motor datasheet and is converted into a function of rotational velocity or data table for use in simulation or controller design. Because of the use of \(T_{\max}\) curve, the back Electromotive Force (EMF) does not need to be considered. The reason is that \(T_{\max}\) and back EMF have the same function. The amplitude of back EMF increases as the rotation velocity of motor shaft increases, which causes the decrease of the maximum phase current and further causes the decrease of the output torque of stepper motor.