# Research and Verification of Trajectory Tracking Control of a Quadrotor Carrying a Load
## 2 Establishment of a Quadrotor Carrying a Load  
Building a suitable and complete model of a quadrotor carrying a load is the basis of the control algorithm. The quadrotor is a standard cross-shaped quadrotor with a general structure. The body coordinate system of the quadrotor is defined as \(g=(x,y,z)\), the inertial coordinate system is defined as \(b=(X,Y,Z)\) and \(I= \begin{bmatrix}X&Y&Z\end{bmatrix} ^{\mathsf{T}}\)is the spatial position coordinate of the inertial coordinate system of the quadrotor. The front and rear direction of the quadrotor is the \(X\)-axis direction, and the backward direction is negative. The left and right direction is the \(Y\)-axis direction, and the right direction is positive. The up and down direction is the \(Z\)-axis direction, and the upward direction is positive. The moving speed of the quadrotor is expressed as \(V= \begin{bmatrix}u&v&w\end{bmatrix} ^{\mathsf{T}}\). \(P= \begin{bmatrix}\phi&\theta&\psi\end{bmatrix} ^{\mathsf{T}}\) is the Euler angle of the space attitude. The roll angle \(\phi\) around the \(X\)-axis rolls to the right in the positive direction. At this time, the rotation speed of rotor 2 increases, and the rotation speed of rotor 4 decreases. When the nose is down, the pitch angle \(\theta\) around the \(Y\)-axis is in the positive direction. In this case, the speed of rotor 1 increases, and the speed of rotor 3 decreases. The yaw angle \(\psi\) around the \(Z\)-axis rotates counterclockwise in the positive direction. At this time, the speeds of rotor 1 and rotor 3 remain unchanged, and the speeds of rotor 2 and rotor 4 increase. The rotational angular velocity is \(\omega= \begin{bmatrix}p&q&r\end{bmatrix} ^{\mathsf{T}}\). \(\alpha\) is the projection angle of the hanging rope on the \(xoz\) surface of the quadrotor, \(\beta\) is the projection angle of the hanging rope on the \(yoz\) surface of the quadrotor, \(L\) is the rope length, \(l\) is the half-length of the motor shaft, the weight of the quadrotor is \(M\) and the weight of the hanging load is \(m\), so the resulting model of a quadrotor carrying a load is shown in Figure 1.  
To simplify the modeling of a quadrotor carrying a load, the model should be simplified to some extent, so the following assumptions are made:  
1. The weight and moment of inertia of the quadrotor remain constant. 2. The hanging rope is rigid and independent of the mass. 3. The load always hangs from the center of the mass of the quadrotor. 4. The payload is considered as a point-mass. The hanging load always hangs below the quadrotor, i.e., the swing angle of a quadrotor carrying a load is always between \(\left(-\frac{\pi}{2},\frac{\pi}{2}\right)\). Before modeling a quadrotor carrying a load, a mathematical model of a conventional quadrotor must be obtained first. The conversion matrix between the airframe coordinate system and the geodesic coordinate system is given by the following formula:  
\[C_{b}^{g}= \begin{bmatrix}\cos\!\theta\cos\!\psi&\sin\!\theta\sin\!\theta\cos\! \psi-\cos\!\phi\sin\!\psi&\cos\!\phi\sin\!\theta\cos\!\psi+\sin\!\phi\sin\! \psi\\ \cos\!\theta\sin\!\psi&\sin\!\theta\sin\!\theta\sin\!\psi+\cos\!\phi\cos\!\psi& \cos\!\phi\sin\!\theta\sin\!\psi-\sin\!\phi\cos\!\psi\\ -\sin\!\theta&\sin\!\phi\cos\!\theta&\cos\!\phi\cos\!\theta\end{bmatrix}  \tag{1}\]  
The total combined force \(U\) of the quadrotor is expressed in the inertial coordinate system as follows:  
\[U=C_{b}^{g}U_{1}- \begin{bmatrix}0\\ 0\\ Mg\end{bmatrix} =C_{b}^{g} \begin{bmatrix}0\\ 0\\ U_{1}\end{bmatrix} - \begin{bmatrix}0\\ 0\\ Mg\end{bmatrix} = \begin{bmatrix}U_{1}(\cos\!\phi\sin\!\theta\cos\!\psi+\sin\! \phi\sin\!\psi)\\ U_{1}(\cos\!\phi\sin\!\theta\sin\!\psi-\sin\!\phi\cos\!\psi)\\ U_{1}(\cos\!\phi\cos\!\theta)-Mg\end{bmatrix}  \tag{2}\]  
where \(U_{1}\) represents the total lift generated by the four rotors, and \(g\) represents gravitational acceleration. After completion, the dynamic equation of the quadrotor's inertial coordinate system is expressed as Equation (3):  
\[\left\{