## 2 The Dynamic Model of Quadrotor Aircrafts  
Quadrotor aircrafts usually have two kinds of structures: X-shaped structure and cross-shaped structure. The modeling results of the two structures are slightly different, but the modeling process is the same. In this paper, a quadrotor aircraft with an X-shaped structure is selected for analysis. The structure and coordinate system of the quadrotor vehicle are shown in Figure 1. Two coordinate systems are defined, which are inertial coordinate system \(E=(O^{E},X^{E},Y^{E},Z^{E})\) and body coordinate system \(B=(O^{B},X^{B},Y^{B},Z^{B})\). The quadrotor aircraft is an underactuated system with four control inputs and six state outputs. In the real flight environment, it is difficult to obtain the actual model precisely because of the characteristics of uncertainty, non-linearity and strong coupling. In order to obtain an approximate model of the quadrotors, the following assumptions are made for the quadrotors in this paper:  
* The quadrotor aircraft is an ideal rigid body in flight, with constant mass and no deformation in any form;
* The mass of the quadrotor aircraft is uniformly and symmetrically distributed, and the origin of the body coordinate system always coincides with the center of gravity and center of mass of the aircraft;
* The aircraft flies at low speeds and small angles and ignores the influence of air resistance. Based on the above assumptions under ideal conditions, the dynamic equation of quadrotor aircraft is established according to the force analysis of the aircraft and Newton-Euler equation:  
\[\left\{ \begin{aligned} \dot{P}&=V\\ m\dot{V}&=R_{B}^{E}F-G\\ J\cdot\dot{\omega}&=-\omega\times(J\cdot\omega)+G_{a}+M \end{aligned} \right. \tag{1}\]  
where \(P\) and \(V\) are the position and velocity of the aircraft in the inertial coordinate system, respectively, \(G=[ \begin{array}{ccc}0&0&mg\end{array} ]^{T}\), \(J\in{}^{3\times 3}\) is the moment of inertia of the rotor, \(w\) is the rotational angular velocity in the body coordinate system, \(F\) is the total pull of the propeller, \(M\) is the aerodynamic torque generated by the rotor, and \(G_{a}\) is the gyro torque generated by the rotor. For a quadrotor aircraft:  
\[\left\{ \begin{aligned} & G_{a,\phi}=J_{r}\cdot\dot{\phi}\cdot\Omega\\ & G_{a,\theta}=J_{r}\cdot\dot{\theta}\cdot\Omega\\ & G_{a,\psi}=0\end{aligned} \right. \tag{2}\]  
\[\Omega=\Omega_{2}+\Omega_{4}-\Omega_{1}-\Omega_{3} \tag{3}\]  
where \(J_{r}\) is the moment of inertia of the rotor and \(\Omega_{i}\) is the speed of the corresponding motor. The dynamic model of the quadrotor aircraft is obtained according to formula (1)-(3):  
\[\left\{ \begin{aligned} \ddot{\phi}&=\dot{\phi}\dot{ \psi}\left(\frac{J_{r}-J_{z}}{I_{x}}\right)-\frac{I_{r}}{I_{x}}\dot{\phi}\Omega +\frac{U_{2}}{I_{x}}\\ \ddot{\theta}&=\dot{\phi}\dot{\psi}\left(\frac{J_{r}-J_{z}}{I_{x}} \right)+\frac{I_{r}}{I_{y}}\dot{\phi}\Omega+\frac{U_{3}}{I_{y}}\\ \ddot{\psi}&=\dot{\phi}\dot{\phi}\left(\frac{-I_{r}J_{z}}{I_{z}} \right)-\frac{U_{4}}{I_{z}}\\ \ddot{x}&=(\cos\phi\sin\theta\cos\psi+\sin\phi\sin\psi) \frac{U_{1}}{m}\\ \ddot{y}&=(\cos\phi\sin\theta\sin\psi-\sin\phi\cos\psi) \frac{U_{1}}{m}\\ \ddot{z}&=(\cos\phi\cos\theta)\frac{U_{1}}{m}-g\end{aligned} \right. \tag{4}\]  
Figure 1: Structure and coordinate system of quadrotor aircraft. where \(\phi\), \(\theta\) and \(\psi\) are the angles of rotation around the \(x\) axis, \(y\) axis and \(z\) axis in the body coordinate system (counterclockwise); \(J_{x}\), \(J_{y}\) and \(J_{z}\) are the moment of inertia of the fuselage in three directions, respectively; \(m\) is the mass of the fuselage; \(g\) is the gravitational acceleration; \(U_{i}\) is the virtual control quantity. For a quadrotor aircraft with X-shaped structure, \(U_{i}\) is defined as Equation (5):  
\[\left[ \begin{array}{c}U_{1}\\ U_{2}\\ U_{3}\\ U_{4}\end{array} \right]=\left[