## 2 Dynamics Model of Quadrotor UAV
### Model Linear Transformation  
The feedback linearization of the quadrotor UAV can be achieved through an intuitive transformation of the state variables and an input redefinition. Since the goal of feedback linearization is to decouple (5) into three second-order linear systems, define the target system as:  
\[\left\{ \begin{array}{l}\ddot{\theta}=-\phi+k_{1}\dot{\phi}\\ \dot{\theta}=-\theta+k_{2}\dot{\theta}\\ \ddot{\psi}=-\psi+k_{3}\dot{\psi}\end{array} \right., \tag{6}\]  
where \(k_{1}\), \(k_{2}\) and \(k_{3}\) are constant parameters whose values are yet to be determined, and they play a crucial role in defining the system's stability and dynamic performance. The second derivatives \(\ddot{\phi}\), \(\ddot{\theta}\) and \(\ddot{\psi}\) can be expressed in (7) based on the model (5) by setting \(u_{1}=U_{1}/I_{x}\), \(u_{2}=U_{2}/I_{y}\) and \(u_{3}=U_{3}/I_{2}\):\[\left\{ \begin{array}{l}\ddot{\phi}=\left(\dot{\phi}\tan\theta+\dot{\psi}\sec \theta\right)\dot{\theta}+\left(\sigma_{1}+u_{1}\right)+\left(\sigma_{2}+u_{2} \right)\tan\theta\sin\,\phi+\left(\sigma_{3}+u_{3}\right)\tan\theta\cos\phi\\ \ddot{\theta}=-\dot{\phi}\dot{\psi}\cos\theta+\left(\sigma_{2}+u_{2}\right) \cos\,\phi-\left(\sigma_{3}+u_{3}\right)\sin\phi\\ \ddot{\psi}=\left(\dot{\phi}\sec\theta+\dot{\psi}\tan\theta\right)\dot{\theta}+ \left(\sigma_{2}+u_{2}\right)\sin\phi\sec\theta+\left(\sigma_{3}+u_{3}\right) \,\cos\phi\sec\theta\\ \end{array} \right., \tag{7}\]  
\[\text{where }\sigma_{1}=\left(I_{y}-I_{z}\right)/I_{x}\cdot q\cdot r,\sigma_{2}= \left(I_{z}-I_{x}\right)/I_{y}\cdot r\cdot p,\sigma_{3}=\left(I_{x}-I_{y} \right)/I_{z}\cdot p\cdot q.\]  
Defining the state variable vector \(\mathbf{\mathrm{\mathbf{x}}}^{\mathrm{T}}=\left(z_{1},z_{2},z_{3},z_{4},z_{5},z_{6} \right)=\left(\phi,\dot{\phi},\theta,\dot{\theta},\dot{\psi},\dot{\psi}\right)\), the above equations (6) and (7) can be reformulated and expressed in a state-space representation as \(\dot{\mathbf{\mathrm{\mathbf{x}}}}=f(\mathbf{\mathrm{\mathbf{x}}},\mathbf{\mathrm{\mathbf{u}}})\), where:  
\[ \begin{pmatrix}\dot{z}_{1}\\ \dot{z}_{2}\\ \dot{z}_{3}\\ \dot{z}_{4}\\ \dot{z}_{5}\\ \dot{z}_{6}\end{pmatrix} = \begin{pmatrix}z_{2}\\ -z_{1}+k_{1}z_{2}\\ z_{4}\\ -z_{3}+k_{2}z_{4}\\ z_{6}\\ -z_{5}+k_{3}z_{6}\end{pmatrix} + \begin{pmatrix}z_{1}-k_{1}z_{2}+f_{1}(\mathbf{ \mathrm{\mathbf{x}}},\mathbf{\mathrm{\mathbf{\sigma}}})+u_{1}+u_{2}\tan z_{3}\sin z_{1}+u_ {3}\tan z_{3}\cos z_{1}\\ 0\\ z_{1}-k_{2}z_{4}+f_{2}(\mathbf{\mathrm{\mathbf{x}}},\mathbf{\mathrm{\mathbf{\sigma}}})+u_{2} \cos z_{1}-u_{3}\sin z_{1}\\ 0\\ z_{5}-k_{3}z_{6}+f_{3}(\mathbf{\mathrm{\mathbf{x}}},\mathbf{\mathrm{\mathbf{\sigma}}})+u_{2} \sin z_{1}\sec z_{3}+u_{3}\cos z_{1}\sec z_{3}\end{pmatrix} . \tag{8}\]  
Here  
\[f_{1}(\mathbf{\mathrm{\mathbf{x}}},\mathbf{\mathrm{\mathbf{\sigma}}})=(z_{2}\tan z_{3}+z_{6} \sec z_{3})z_{4}+\sigma_{1}+\sigma_{2}\tan z_{3}\sin\,z_{1}+\sigma_{3}\,\tan z _{3}\cos z_{1},\]  
\[f_{2}(\mathbf{\mathrm{\mathbf{x}}},\mathbf{\mathrm{\mathbf{\sigma}}})=-z_{2}z_{6}\cos z_{3}+ \sigma_{2}\cos\,z_{1}-\sigma_{3}\,\sin z_{1}\,,\]  
\[f_{3}(\mathbf{\mathrm{\mathbf{x}}},\mathbf{\mathrm{\mathbf{\sigma}}})=(z_{2}\sec z_{3}+z_{6} \tan z_{3})z_{4}\,\,+\sigma_{2}\sin z_{1}\sec z_{3}+\sigma_{3}\,\cos z_{1} \sec z_{3}.\]  
Define a virtual control vector:  
\[\mathbf{v}=\mathbf{N}(\mathbf{\mathrm{\mathbf{x}}},\mathbf{\mathrm{\mathbf{\sigma}}})+\mathbf{M}(\mathbf{ \mathrm{\mathbf{x}}})\mathbf{u} \tag{9}\]  
where  
\[\mathbf{N}(\mathbf{\mathrm{\mathbf{x}}},\mathbf{\mathrm{\mathbf{\sigma}}})=\left( \begin{array}[] {cc}f_{1}(\mathbf{\mathrm{\mathbf{x}}},\mathbf{\mathrm{\mathbf{\sigma}}})+z_{1}-k_{1}z_{2}\\ f_{2}(\mathbf{\mathrm{\mathbf{x}}},\mathbf{\mathrm{\mathbf{\sigma}}})+z_{3}-k_{2}z_{4}\\ f_{3}(\mathbf{\mathrm{\mathbf{x}}},\mathbf{\mathrm{\mathbf{\sigma}}})+z_{5}-k_{3}z_{6}\end{array} \right) \tag{10}\]  
\[\mathbf{M}(\mathbf{\mathrm{\mathbf{\sigma}}})= \begin{pmatrix}1&\tan z_{3}\sin z_{1}&\tan z _{3}\cos z_{1}\\ 0&\cos z_{1}&-\sin z_{1}\\ 0&\sin z_{1}\sec z_{3}&\cos z_{1}\sec z_{3}\end{pmatrix}