# Angular Trajectory Design for MR-SPS Using Bezier Shaping Approach
## 3 Trajectory Planning for the MR-SPS Considering Dynamic Constraints
### Description of the Optimization Problem  
As a large-scale spacecraft, the MR-SPS requires large torque in the attitude tracking process. During a short period of time around the time of the equinox, if the arrays strictly point to the sun at any moment, there will be a large angle of ration in a short time for the main structure when the right ascension between the sun and the SPS is about \(0^{\circ}\) or \(180^{\circ}\), resulting in large control effort. From the perspective of economic benefits, the large-scale spacecraft needs to limit the mass. The larger the maximum control torque is, the heavier the actuators are which leads to an increase in the mass of actuators as well as the launch cost. Moreover, supposing that the actuators fail, the maximum output torque decreased, which causes degradation of the output of the actuator. Therefore, there is a need to plan the angular trajectory when the control torque is limited. From the geometric relationship shown in Figure 2, after rotating \(-\pi/2\) around \(x\)-axis and \(-\varphi-\pi/2\) around \(y\)-axis, the inertial frame is parallel to the orbital frame. The orbit frame is parallel to the main structure frame after it rotates \(\gamma\) around \(z\)-axis. The \(j\)th intermediate frame is parallel to the \(j\)th array frame after rotating \(\theta_{j}\) around \(y\)-axis. The rotation matrix from the inertial frame to the \(j\)th array frame can be written as:  
\[ \begin{array}{c}C_{j}=\mathbf{C}_{sj}\mathbf{C}_{a}=\mathbf{C}_{y}(\theta_{j})\mathbf{C}_{z}( \gamma)\mathbf{C}_{y}(-\varphi-\pi/2)\mathbf{C}_{x}(-\pi/2)=\\ \left[\begin{array}{cc}\cos\varphi\sin\theta_{j}-\sin\varphi\cos\gamma\cos \theta_{j}&\sin\varphi\sin\theta_{j}+\cos\varphi\cos\gamma\cos\theta_{j}&- \sin\gamma\cos\theta_{j}\\ \sin\varphi\sin\gamma&-\cos\varphi\sin\gamma&-\cos\gamma\\ -\cos\varphi\cos\theta_{j}-\sin\varphi\cos\gamma\sin\theta_{j}&-\sin\varphi\cos \theta_{j}+\cos\varphi\cos\gamma\sin\theta_{j}&-\sin\gamma\sin\theta_{j}\end{array} \right]\end{array}  \tag{31}\]One rotation can be expressed by a unit quaternion \(\mathbf{Q}=[q_{0}\quad\mathbf{q}^{T}]^{T}\), where \(q_{0}\in\mathbf{R}\) and \(\mathbf{q}\in\mathbf{R}^{3}\) are the scalar and vector part of the unit quaternion respectively. The rotation of the main structure frame relative to the inertial frame can be expressed as:  
\[\mathbf{Q}_{a}=[q_{a0}\quad\mathbf{q}^{T}_{a}]^{T}=\left[ \begin{array}{c}\sqrt{2}/2 \cos(\varphi/2+\gamma/2+\pi/4)\\ -\sqrt{2}/2\cos(\varphi/2-\gamma/2+\pi/4)\\ -\sqrt{2}/2\cos(\varphi/2-\gamma/2-\pi/4)\\ \sqrt{2}/2\cos(\varphi/2+\gamma/2-\pi/4)\end{array} \right] \tag{32}\]  
The first and second derivatives can be expressed as:  
\[\dot{\mathbf{Q}}_{a}=\left[ \begin{array}{c}-\sqrt{2}/4\sin(\varphi/2+\gamma/2+ \pi/4)(\dot{\varphi}+\dot{\gamma})\\ \sqrt{2}/4\sin(\varphi/2-\gamma/2+\pi/4)(\dot{\varphi}-\dot{\gamma})\\ \sqrt{2}/4\sin(\varphi/2-\gamma/2-\pi/4)(\dot{\varphi}-\dot{\gamma})\\ -\sqrt{2}/4\sin(\varphi/2+\gamma/2-\pi/4)(\dot{\varphi}+\dot{\gamma})\end{array} \right] \tag{33}\]  
\[\ddot{\mathbf{Q}}_{a}=\left[ \begin{array}{c}-\sqrt{2}/4\sin(\varphi/2+\gamma/2+ \pi/4)(\ddot{\varphi}+\ddot{\gamma})-\sqrt{2}/8\cos(\varphi/2+\gamma/2+\pi/4)( \dot{\varphi}+\dot{\gamma})^{2}\\ \sqrt{2}/4\sin(\varphi/2-\gamma/2+\pi/4)(\ddot{\varphi}-\ddot{\gamma})+\sqrt{2 }/8\cos(\varphi/2-\gamma/2+\pi/4)(\dot{\varphi}-\dot{\gamma})^{2}\\ \sqrt{2}/4\sin(\varphi/2-\gamma/2-\pi/4)(\ddot{\varphi}-\ddot{\gamma})+\sqrt{2 }/8\cos(\varphi/2-\gamma/2-\pi/4)(\dot{\varphi}-\dot{\gamma})^{2}\\ -\sqrt{2}/4\sin(\varphi/2+\gamma/2-\pi/4)(\ddot{\varphi}+\ddot{\gamma})-\sqrt{ 2}/8\cos(\varphi/2+\gamma/2-\pi/4)(\dot{\varphi}+\dot{\gamma})^{2}\end{array}