# Research and Verification of Trajectory Tracking Control of a Quadrotor Carrying a Load
## 2 Establishment of a Quadrotor Carrying a Load
 \tag{9}\]  
When the potential energy \(P\) of the system is zero potential energy on the ground plane, the formula \(P\) can be written as follows:  
\[P=Mgz+mg(z-L\cos\!\alpha\cos\!\beta) \tag{10}\]  
Substituting Equations (9) and (10) into Equation (6), when \(n\) takes \(n=\alpha\) and \(n=\beta\) and plugs into [PERSON]'s formula, the relationship between the swing motion of the hangers and the quadrotor acceleration can be yielded as Equation (11):\[\left\{ \begin{array}{l}L\ddot{\beta}+\cos\beta\ddot{u}-\sin\beta\sin\alpha\dot{y} +\sin\beta\cos\alpha\ddot{z}+L\sin\beta\cos\beta\dot{u}^{2}+g\sin\beta\cos\alpha =0\\ \cos\beta\ddot{u}+\cos\alpha\dot{y}+\sin\alpha\dot{z}-2L\sin\beta\dot{\beta} \dot{\alpha}+g\sin\alpha=0\end{array} \right. \tag{11}\]  
Taking the second-order derivative of Equation (5), the acceleration of the load can be expressed in terms of the acceleration of the quadrotor, as shown in the following formula:  
\[ \begin{cases}\dot{x}_{1}=\ddot{x}-L\dot{\beta}^{2}\sin\beta+L\dot{\beta}\cos \beta\\ \dot{y}_{1}=\ddot{y}-L\dot{\alpha}^{2}\sin\alpha\cos\beta-L\dot{\beta}^{2}\sin \alpha\cos\beta+L\ddot{x}\cos\alpha\cos\beta-L\ddot{\beta}\sin\alpha\sin\beta-2 L\dot{\beta}\cos\alpha\sin\beta\\ \dot{z}_{1}=\ddot{z}+L\dot{\alpha}^{2}\cos\alpha\cos\beta+L\dot{\beta}^{2} \cos\alpha\cos\beta+L\ddot{x}\sin\alpha\cos\beta+L\ddot{\beta}\cos\alpha\sin \beta-2L\dot{\beta}\sin\alpha\sin\beta\end{cases}  \tag{12}\]  
A force analysis was performed on the quadrotor. The tension \(F\) of the rope on the quadrotor is positive and downward:  
\[ \begin{cases}M\ddot{x}=U_{1x}+F\sin\beta\\ M\ddot{y}=U_{1y}+F\sin\alpha\cos\beta\\ M\ddot{z}=U_{1z}-F\cos\alpha\cos\beta-Mg\end{cases}  \tag{13}\]  
\[ \begin{cases}m\ddot{x}=-F\sin\beta\\ m\ddot{y}=-F\sin\alpha\cos\beta\\ m\ddot{z}=F\cos\alpha\cos\beta-mg\end{cases}  \tag{14}\]  
Combining Equations (13) and (14), the following results are yielded:  
\[ \begin{cases}M\ddot{x}+m\ddot{x}_{1}=U_{1x}\\ M\ddot{y}+m\ddot{y}_{1}=U_{1y}\\ M\ddot{z}+m\ddot{z}_{1}=U_{1z}-(M+m)g\end{cases}  \tag{15}\]  
Substituting Equations (2) and (12) into the above Equation (15), the dynamics model of a quadrotor carrying a load can be yielded:  
\[ \begin{cases}(M+m)\ddot{x}-mL\dot{\beta}^{2}\sin\beta+mL\ddot{\beta}\cos\beta= U_{1x}\\ (M+m)\ddot{y}-mL\dot{\alpha}^{2}\sin\alpha\cos\beta-mL\dot{\beta}^{2}\sin \alpha\cos\beta+mL\ddot{\alpha}\cos\alpha\cos\beta\\ -mL\ddot{\beta}\sin\alpha\sin\beta-2 mL\dot{\alpha}\dot{\beta}\cos\alpha\sin \beta=U_{1y}\\ (M+m)\ddot{z}+mL\dot{\alpha}^{2}\cos\alpha\cos\beta+mL\dot{\beta}^{2}\cos \alpha\cos\beta\\ +mL\ddot{\alpha}\sin\alpha\cos\beta+mL\ddot{\beta}\cos\alpha\sin\beta-2 mL\dot{ \alpha}\dot{\beta}\sin\alpha\sin\beta=U_{1z}-(M+m)g\end{cases}  \tag{16}\]  
By combing Equations (3), (11) and (16), the eight-degree-of-freedom mathematical model of a quadrotor carrying a load including attitude, position and swing angle can be yielded:  
\[ \begin{cases}\ddot{\phi}=\left[UL_{2}+\dot{\phi}\psi\big{(}I_{y}-I_{z}\big{)} \right]/I_{x}+d_{\phi}\\ \ddot{\theta}=\left[UL_{3}+\dot{\phi}\psi\big{(}I_{z}-I_{z}\big{)}\right]/I_{y} +d_{\phi}\\ \ddot{\psi}=\left[UL_{4}+\dot{\phi}\phi\big{(}I_{x}-I_{y}\big{)}\right]/I_{z} +d_{\phi}\\ \ddot{X}=\left[UL_{1x}+mL\left(\dot{\beta}^{2}\sin\beta-\ddot{\beta}\cos\beta \right)\right]/(M+m)+d_{x}\\ \dot{Y}=\left[U_{1y}+mL\dot{\beta}\sin\beta\sin\alpha-mL\ddot{\alpha}\cos\beta \cos\alpha+mL\dot{\beta}^{2}\cos\beta\sin\alpha\right]\\ +mL\dot{\alpha}^{2}\cos\beta\sin\alpha+2 mL\dot{\beta}\dot{\alpha}\sin\beta\cos \alpha\\ Z=\left[U_{1z}-mL\dot{\beta}\sin\beta\cos\alpha-mL\ddot{\alpha}\cos\beta\sin \alpha-mL\dot{\beta}^{2}\cos\beta\cos\alpha\right]\\ -mL\dot{\alpha}^{2}\cos\beta\cos\alpha+2 mL\dot{\beta}\dot{\alpha}\sin\beta\sin \alpha\\ \ddot{\alpha}=\left[2 ML\sin\beta\dot{\beta}\dot{\alpha}-\cos\alpha L_{1y}-\sin \alpha L_{1z}\right]/ML\cos\beta+d_{\alpha}\\ \ddot{\beta}=\left[-ML\sin\beta\cos\beta\dot{\alpha}^{2}-\cos\beta U_{1x}-\sin \beta\sin\alpha L_{1y}-\sin\beta\cos\alpha U_{1z}\right]/ML+d_{\beta}\\ \end{cases}