## Appendix A Attitude Controller Design Based on MPC
The relative importance of each objective is determined by the weight matrices \(\mathbf{S}\), \(\mathbf{Q}\) and \(\mathbf{R}\), which are positive definite matrices. Define the target vector \(\mathbf{Z}_{d[k]}=\left(\mathbf{\varkappa}_{d[k+1]}\quad\mathbf{\varkappa}_{d[k+2]}\quad \cdots\quad\mathbf{\varkappa}_{d[k+N_{\text{p}}]}\right)^{\text{T}}\). The above equation can be written in matrix-vector form as:  
\[J=\left\|\mathbf{Z}_{[k]}-\mathbf{Z}_{d[k]}\right\|_{\overline{\mathbf{Q}}}^{2}+\left\| \delta\mathbf{V}_{[k]}\right\|_{\overline{\mathbf{R}}^{\prime}}^{2} \tag{44}\]  
where \(\overline{\mathbf{Q}}=\text{diag}\Big{(}\mathbf{Q}\quad\cdots\quad\mathbf{Q}\quad\mathbf{S} \Big{)},\overline{\mathbf{R}}=\text{diag}\Big{(}\mathbf{R}\quad\cdots\quad\mathbf{R} \Big{)}\). Substituting the state prediction Equation (42) into the cost function (44), and defining  
\[\mathbf{E}_{[k]}=\mathbf{Z}_{d[k]}-\mathbf{P}\delta\mathbf{\varkappa}_{[k]}-\mathbf{I}\mathbf{ \varkappa}_{[k]}, \tag{45}\]  
the following is obtained:  
\[ \begin{array}{ll}J&=\left\|\mathbf{H}\delta\mathbf{V}_{[k]}-\mathbf{E}_{[k]}\right\|_{ \overline{\mathbf{Q}}}^{2}+\left\|\delta\mathbf{V}_{[k]}\right\|_{\overline{\mathbf{R}}}^ {2}\\ &=\frac{1}{2}(\mathbf{H}\delta\mathbf{V}_{[k]}-\mathbf{E}_{[k]})^{\text{T}}\overline{\mathbf{Q} }(\mathbf{H}\delta\mathbf{V}_{[k]}-\mathbf{E}_{[k]})+\frac{1}{2}\delta\mathbf{V}_{[k]}^{\text{ T}}\overline{\mathbf{R}}\delta\mathbf{V}_{[k]}\\ &=\frac{1}{2}\delta\mathbf{V}_{[k]}^{\text{T}}\overline{\mathbf{H}}\delta\mathbf{H}\delta \mathbf{V}_{[k]}-\frac{1}{2}\mathbf{E}_{[k]}^{\text{T}}\overline{\mathbf{Q}}\mathbf{H}\delta \mathbf{V}_{[k]}-\frac{1}{2}\delta\mathbf{V}_{[k]}^{\text{T}}\overline{\mathbf{R}}\mathbf{P} \mathbf{E}_{[k]}\\ &+\frac{1}{2}\mathbf{E}_{[k]}^{\text{T}}\overline{\mathbf{Q}}\mathbf{E}_{[k]}+\frac{1}{2} \delta\mathbf{V}_{[k]}^{\text{T}}\overline{\mathbf{R}}\delta\mathbf{V}_{[k]}\end{array} . \tag{46}\]  
Since \(\frac{1}{2}\mathbf{E}_{[k]}^{\text{T}}\overline{\mathbf{Q}}\mathbf{H}\delta\mathbf{V}_{[k]}\) and \(\frac{1}{2}\delta\mathbf{V}_{[k]}^{\text{T}}\overline{\mathbf{H}}^{\text{T}}\overline{ \mathbf{Q}}\mathbf{E}_{[k]}\) are transposes of each other and both are scalars, Equation (46) can be written as:  
\[J=\frac{1}{2}\delta\mathbf{V}_{[k]}^{\text{T}}\Big{(}\mathbf{H}^{\text{T}}\overline{ \mathbf{Q}}\mathbf{H}+\overline{\mathbf{R}}\Big{)}\delta\mathbf{V}_{[k]}-\mathbf{E}_{[k]}^{\text{ T}}\overline{\mathbf{Q}}\mathbf{H}\delta\mathbf{V}_{[k]}+\frac{1}{2}\mathbf{E}_{[k]}^{\text{T}} \overline{\mathbf{Q}}\mathbf{E}_{[k]}. \tag{47}\]  
Furthermore, since the last term in the above equation is determined by the initial state values \(\mathbf{\varkappa}_{[k]}\) and \(\delta\mathbf{\varkappa}_{[k]}\), and is unaffected by \(\delta\mathbf{V}_{[k]}\), it can be disregarded during optimization. Therefore, a standard quadratic performance index in terms of \(\delta V_{[k]}\) can be formulated as:  
\[J=\frac{1}{2}\delta V_{[k]}^{\intercal}(H^{\intercal}\overline{Q}H+\overline{R} )\delta V_{[k]}-(H^{\intercal}\overline{Q}E_{[k]})^{\intercal}\delta V_{[k]}. \tag{108}\]  
(4) System Constraints  
Feedback linearization introduces new state variables and virtual control quantities. The constraints on the angular velocity rate \(\mathbf{\omega}\) and the control input \(\mathbf{u}\) of the quadrotor cannot be directly applied to the feedback linearized system. Instead, an indirect constraint method is employed, where the constraints from the original system are mapped to the new system at each time step.