# A Sun-Tracking Algorithm for Satellite-Borne Spectrometers Based on the Orbital Motion Model
## 3 On-Axis Tracking Control Method based on the Orbital Motion Model
### Target Motion Model  
According to the control model, the estimation accuracy of the position and velocity of the predictive filtering algorithm, which are strongly dependent on the motion model of the target, directly determine the tracking accuracy and dynamic performance of the system. According to the working principle of the spectrometer, the rotation of the turntable compensates for the orbital motion of the satellite platform, ensuring that the sun is always in the center of the field of view. Therefore, to derive the motion model of the turntable, the sun vector needs to first be obtained under the orbital coordinate system through numerical calculations, and the azimuth and pitch angle of the turntable can be then calculated using the movement of the platform and the mounting position of the spectrometer on the satellite platform. To accurately obtain the relationship between the target position and the rotation angle of the turntable, the coordinate systems are set up as shown in Figure 4. Firstly, an orbit coordinate system O\({}_{\text{O}}\)-X\({}_{\text{O}}\)Y\({}_{\text{O}}\)Z\({}_{\text{O}}\) is established. The origin O\({}_{\text{O}}\) is located at the center of mass of the satellite and the axis O\({}_{\text{O}}\)Z\({}_{\text{O}}\) points to the center of the earth. O\({}_{\text{O}}\)X\({}_{\text{O}}\) is located in the orbital plane, in accordance with the flight direction of the satellite, and Y\({}_{\text{O}}\) can be acquired through vector calculations. To simplify the motion model of the turntable, certain small errors can be ignored, such as the attitude error of the platform, various mounting errors, and the non-orthogonal errors of the turntable. Then, the satellite coordinate system O\({}_{\text{S}}\)-X\({}_{\text{S}}\)Y\({}_{\text{S}}\)Z\({}_{\text{S}}\) is defined, whose origin O\({}_{\text{S}}\) coincides with O\({}_{\text{O}}\). The orbit system is coincident with the satellite system when there is no satellite attitude motion. Three angles--\(\varphi\), \(\theta\), and \(\psi\)--are used to describe the three-axis attitude angles of the satellite system with respect to the orbit system. In terms of the turntable coordinate system O\({}_{\text{T}}\)-X\({}_{\text{T}}\)Y\({}_{\text{T}}\)Z\({}_{\text{T}}\), the origin O\({}_{\text{T}}\) is located in the center of the image plane, and -O\({}_{\text{T}}\)Y\({}_{\text{T}}\) represents the optical axis. The axes of the turntable system are parallel to those of the orbit system when there is no turntable motion [20]. According to the orbital parameters of the spectrometer, it can be seen that the incident angle of sunlight in the orbital plane varies by about 47 degrees within a year. Therefore, the data of four special days--the spring equinox, summer solstice, autumn equinox, and winter solstice--are calculated and simulated, which can basically reflect the range of the sun angle. Furthermore, the coordinates [Xs, Ys, Zs]T of the sun vector in the orbit system are obtained. According to the definition of the coordinate systems and the principle of coordinate transformation, the coordinate of the sun vector can be acquired in the turntable coordinate system, as shown in Equation (1). \[S_{C}=M_{E}\cdot M_{A}\cdot M_{OS}\cdot S_{O} \tag{1}\]  
where \(S_{C}\) denotes the sun vector in the turntable coordinate system, whose theoretical value equals \([0,-1,0]^{\text{T}}\) when the sun is in the center of the field of view of the tracking sensor. \(M_{OS}\) denotes the transformation matrix used to describe the relative attitude of the satellite system with respect to the orbit system. \(M_{A}\) and \(M_{E}\) denote the transformation matrices  
Figure 4: Schematic of the coordinate systems. of the local coordinate systems of the azimuth and pitch axes, respectively, when there is rotation with respect to the turntable system.