## 4 Time-Optimal Path Planning  
Planning large-angle maneuvers for the satellite mainly involves two aspects, i.e., selecting the path for the satellite's maneuvers to find the shortest distance for the satellite to travel along and planning the satellite's angular velocity to minimize the time required for the maneuver. Due to the maximum output torque of the satellite in the rolling axis direction and the fact that this direction is the main attitude maneuver direction during target observation, in order to achieve a large-angle rapid maneuver, the angular velocity in this direction should be able to quickly reach its maximum. Therefore, the trapezoidal path planning method is chosen, which requires that the angular velocity of the satellite maneuver should meet the following two conditions:  
1. The satellite should perform rotational maneuvers around the Euler axis, i.e., the angular velocity direction should align with the Euler axis. 2. The satellite's initial and final angular velocities should be zero. The change in the satellite's angular velocity should go through three stages: uniform acceleration, uniform velocity, and uniform deceleration, as depicted in Figure 2. The size of the control torque limits the magnitudes of acceleration during the uniform acceleration and uniform deceleration stages. During the uniform velocity phase, the magnitude of the angular velocity is constrained by the maximum allowable rotational velocity, denoted as \(\omega_{\text{max}}\). Figure 1: Typical installation schematic of scissors-type CMG. Using Equation (2), the error quaternion is calculated based on the initial and desired quaternions:  
\[\Delta\mathbf{q}=\mathbf{q}_{c}^{*}\otimes\mathbf{q}_{d} \tag{13}\]  
where \(\Delta\mathbf{q}\) represents the error quaternion, signifying the difference between the initial and desired attitudes; \(\mathbf{q}_{c}\) denotes the initial quaternion; and \(\mathbf{q}_{d}\) is the desired quaternion. Utilizing the relationship between the quaternion and Euler axis/angle, the Euler axis direction \(\mathbf{e}=\left(e_{x},e_{y},e_{z}\right)^{\mathrm{T}}\) and the Euler angle magnitude \(\Phi=2\arccos(\Delta q_{0})\) are calculated, where \(e_{x}=\Delta q_{1}/\sin(\Phi/2)\), \(e_{y}=\Delta q_{2}/\sin(\Phi/2)\), \(e_{z}=\Delta q_{3}/\sin(\Phi/2)\). The satellite always moves in one direction, and the area of the trapezoid in Figure 2 represents the Euler angle \(\Phi\) of the satellite's rotation. \[\Phi=\frac{1}{2}a_{\omega}t_{1}^{2}+\omega_{\mathrm{max}}(t_{2}-t_{1})+\frac{ 1}{2}a^{\prime}_{\omega}(t_{3}-t_{2})^{2} \tag{14}\]  
where \(a_{\omega}\) and \(a^{\prime}_{\omega}\) are the angular accelerations during the acceleration and deceleration phases, respectively. To minimize the time to the greatest extent possible, both are set to the maximum angular acceleration the satellite can provide. Therefore, they are equal in magnitude. To reduce the angular velocity to zero, the conditions are as follows: \(t_{3}-t_{2}=t_{1}\), \(t_{1}=\omega_{\mathrm{max}}/a_{\omega}\). Thus, \(\Phi=\omega_{\mathrm{max}}t_{2}\), and consequently, \(t_{2}=\Phi/\omega_{\mathrm{max}}\), \(t_{3}=t_{2}+t_{1}=\Phi/\omega_{\mathrm{max}}+\omega_{\mathrm{max}}/a_{\omega}\). The expression for the change in Euler angles over time is:  
\[\Phi(t)= \begin{cases}\frac{1}{2}a_{\omega}t^{2}&0<t\leq t_{1}\\ \omega_{\mathrm{max}}t_{1}+\frac{1}{2}a_{\omega}t_{1}^{2}&t_{1}<t\leq t_{2}\\ \Phi-\frac{1}{2}a_{\omega}(t_{3}-t)^{2}&t_{2}<t\leq t_{3}\end{cases}  \tag{15}\]  
When the maneuver angle of the satellite is not large, the angular velocity path does not include a uniform velocity phase. The angular velocity changes are illustrated in Figure 3. To bring the angular velocity to zero, the conditions are as follows: \(t^{\prime}_{2}-t^{\prime}_{1}=t^{\prime}_{1}\). Therefore \(\Phi=a_{\omega}{t^{\prime}_{1}}^{2}\), and, consequently, \(t^{\prime}_{2}=2t^{\prime}_{1}=2\sqrt{\Phi/a_{\omega}}\). Figure 3: Angular velocity path planning without a uniform velocity phase.