## Appendix A Attitude Controller Design Based on MPC  
(1) Discretization  
For the state-space equation of a continuous linear time-invariant system (12), the solution of the system is:  
\[\mathbf{\varkappa}_{(t)}=\mathbf{e}^{\mathbf{A}(t-t_{0})}\mathbf{\varkappa}_{(t_{0})}+\mathbf{e}^ {\mathbf{A}t}\int_{t_{0}}^{t}\mathbf{e}^{-\mathbf{A}\tau}\mathbf{B}\mathbf{v}_{(\tau)}\mathrm{d}\tau. \tag{13}\]  
Considering the sampling time from \(t_{k}\) to \(t_{k+1}\), it can be concluded that:  
\[\mathbf{\varkappa}_{(t_{k+1})}=\mathbf{e}^{\mathbf{A}(t_{k+1}-t_{k})}\mathbf{\varkappa}_{(t_{ k})}+\mathbf{e}^{\mathbf{A}t_{k+1}}\int_{t_{k}}^{t_{k+1}}\mathbf{e}^{-\mathbf{A}\tau}\mathbf{B}\mathbf{v}_{( \tau)}\mathrm{d}\tau. \tag{14}\]  
Using the zero-order hold method and setting \(\mathbf{v}_{(t_{k})}=\mathbf{v}_{(t_{k+1})}\), Equation (14) can be written as:  
\[\mathbf{\varkappa}_{(t_{k+1})}=\mathbf{e}^{\mathbf{A}(t_{k+1}-t_{k})}\mathbf{\varkappa}_{(t_{ k})}+\int_{t_{k}}^{t_{k+1}}\mathbf{e}^{\mathbf{A}(t_{k+1}-\tau)}\mathrm{d}\tau\mathbf{B}\mathbf{v}_{(t _{k})}. \tag{15}\]  
Letting \(\mathbf{A}_{\mathrm{d}}=\mathbf{e}^{\mathbf{A}(t_{k+1}-t_{k})}=\mathbf{e}^{\mathbf{A}T_{s}}\), \(\mathbf{B}_{\mathrm{d}}=\int_{t_{k}}^{t_{k+1}}\mathbf{e}^{\mathbf{A}(t_{k+1}-\tau)}\mathrm{ d}\tau\mathbf{B}=-\mathbf{A}^{-1}\mathbf{e}^{\mathbf{A}(t_{k+1}-\tau)}\big{|}_{t_{k}}^{t_{k+1}}\mathbf{B}= \mathbf{A}^{-1}(\mathbf{e}^{\mathbf{A}T_{s}}-\mathbf{I})\mathbf{B}\), the discrete-time state-space equation can be derived:  
\[\mathbf{\varkappa}_{[k+1]}=\mathbf{A}_{\mathrm{d}}\mathbf{\varkappa}_{[k]}+\mathbf{B}_{ \mathrm{d}}\mathbf{v}_{[k]}. \tag{16}\]  
(2) Transformation of the MIMO system  
To achieve control of a non-zero target and eliminate static error, rewrite Equation (16) into an incremental form:  
\[\mathbf{\varkappa}_{[k+1]}=\mathbf{A}_{\mathrm{d}}\delta\mathbf{\varkappa}_{[k]}+\mathbf{B}_ {\mathrm{d}}\delta\mathbf{v}_{[k]}+\mathbf{\varkappa}_{[k]}. \tag{17}\]  
\[\mathbf{P}= \begin{pmatrix}\mathbf{A}_{\text{d}}\\ \sum\limits_{i=1}^{2}\mathbf{A}_{\text{d}}\mathbf{\cdot}\\ \vdots\\ \sum\limits_{n_{\text{p}}}^{N_{\text{p}}}\mathbf{A}_{\text{d}}\mathbf{\cdot}\\ \end{pmatrix} _{N_{\text{p}}\times 1},\,\mathbf{I}= \begin{pmatrix}\mathbf{I}_{n \times n}\\ \mathbf{I}_{n\times n}\\ \vdots\\ \mathbf{I}_{n\times n}\\ \end{pmatrix} _{N_{\text{p}}\times 1},\,\mathbf{H}= \begin{pmatrix}\mathbf{B}_{\text{d}}& \mathbf{0}&\cdots&\mathbf{0}\\ \sum\limits_{i=0}^{1}\mathbf{A}_{\text{d}}\mathbf{\cdot}\mathbf{B}_{\text{d}}&\mathbf{B}_{ \text{d}}&\cdots&\mathbf{0}\\ \vdots&\vdots&\ddots&\vdots\\ \sum\limits_{i=0}^{N_{\text{c}}-1}\mathbf{A}_{\text{d}}\mathbf{\cdot}\mathbf{B}_{\text{d}} &\sum\limits_{i=0}^{N_{\text{c}}-2}\mathbf{A}_{\text{d}}\mathbf{\cdot}\mathbf{B}_{\text{d }}&\cdots&\mathbf{B}_{\text{d}}\\ \vdots&\vdots&\ddots&\vdots\\ \sum\limits_{i=0}^{N_{\text{p}}-1}\mathbf{A}_{\text{d}}\mathbf{\cdot}\mathbf{B}_{\text{d}} &\sum\limits_{i=0}^{N_{\text{p}}-2}\mathbf{A}_{\text{d}}\mathbf{\cdot}\mathbf{B}_{\text{ d}}&\cdots&\sum\limits_{i=0}^{N_{\text{p}}-N_{\text{c}}}\mathbf{A}_{\text{d}}\mathbf{ \cdot}\mathbf{B}_{\text{d}}\\ \end{pmatrix} _{N_{\text{p}}\times N_{\text{c}}}. \tag{3}\]  
For a given target \(\mathbf{\varkappa}_{d[k+i]}\), the cost function that reflects the system performance requirements at time \(k\) can be defined as:  
\[J=\left\|\mathbf{\varkappa}_{[k+N_{\text{p}}[k]}-\mathbf{\varkappa}_{d[k+N_{\text{p}} ]}\right\|_{\text{S}}^{2}+\sum\limits_{i=1}^{N_{\text{p}}-1}\left\|\mathbf{ \varkappa}_{[k+i[k]}-\mathbf{\varkappa}_{d[k+i]}\right\|_{\text{Q}}^{2}+\sum \limits_{i=0}^{N_{\text{c}}-1}\left\|\delta\mathbf{\upsilon}_{[k+i[k]}\right\|_{ \text{R}}^{2} \tag{43}\]  
In the above equation, the first term represents the terminal cost, which helps eliminate static errors. The second term corresponds to the running cost, reflecting the deviation between the state variables and the desired target values. The third term represents the input cost, capturing the magnitude of the control effort exerted on the system.