## 2 Quadcopter Mathematical Model  
The quadcopter is composed of four rotors that lift the vehicle and adjust its attitude by the thrust force generation along the body \(z\)-axis. The thrust force of each rotor changes along with the input control signals. The rear-front motors (\(r2\) and \(r4\)) rotate clockwise, while left-right motors (\(r1\) and \(r3\)) spin in a counterclockwise direction (Figure 1) [21; 22]. Vertical motions are produced when the total thrust increases or decreases. By varying front-rear (left-right) rotors, thrust \(y\)- translation (\(x\)-translation) is achieved. Figure 1: Quadrotor shape, frame system with a body fixed frame B and the inertial frame E.  
The quadrotor can be represented as a rigid body in two reference frames; the inertial frame (E) whose origin is located at a fixed point on the earth, and the body frame (B) whose origin is in accordance with the quadrotor center of gravity (Figure 1). The quadcopter mathematical model is derived by making the following assumptions [23]:  
* The quadcopter structure is rigid and symmetrical;
* The center of gravity lies at the origin of the body reference frame;
* Wind, ground effect disturbances, and the gyroscopic effect are neglected;
* The thrust and drag are proportional to the square of the speed of the rotor. Using Newton-Euler formalism [23; 24; 25], the full-obtained dynamic model is given as follow (1)-(6):  
\[ \begin{array}{l}\ddot{\phi}=(-\dot{\theta}\sin\phi+\dot{\psi}\cos\phi\cos \theta)(\dot{\theta}\cos\phi+\dot{\psi}\sin\phi\cos\theta)\frac{I_{y}-I_{z}}{I_ {x}}+\frac{lU_{2}}{I_{x}}\\ -(\dot{\theta}\cos\phi+\dot{\psi}\sin\phi\cos\theta)\frac{I_{r}(\omega_{1}- \omega_{2}+\omega_{3}-\omega_{4})}{I_{x}}-(\dot{\phi}^{2}-2\dot{\phi}\dot{ \psi}\sin\theta^{2})\frac{K_{fax}}{I_{x}}\end{array}  \tag{1}\]  
\[ \begin{array}{l}\ddot{\theta}=(\dot{\psi}\cos\phi\cos\theta-\dot{\theta}\sin \phi)(\dot{\phi}-\dot{\psi}\sin\theta)\frac{I_{z}-I_{x}}{I_{y}}+\frac{lU_{3}} {I_{y}}-(\dot{\psi}\sin\theta-\dot{\phi})\\ \frac{I_{r}(\omega_{1}-\omega_{2}+\omega_{3}-\omega_{4})}{I_{y}}-(\dot{\theta }^{2}\cos\phi^{2}+2\dot{\phi}\dot{\psi}\sin\phi\cos\theta+\dot{\psi}^{2}\sin \phi^{2}\cos\theta^{2})\frac{K_{fay}}{I_{y}}\end{array}  \tag{2}\]  
\[ \begin{array}{l}\ddot{\psi}=(\dot{\psi}\sin\phi\cos\theta+\dot{\theta}\cos \phi)(\dot{\phi}-\dot{\psi}\sin\theta)\frac{I_{x}-I_{y}}{I_{z}}+\frac{U_{4}}{I _{z}}-(\dot{\psi}\sin\theta-\dot{\phi})\\ \frac{I_{r}(\omega_{1}-\omega_{2}+\omega_{3}-\omega_{4})}{I_{z}}-(\dot{\theta }^{2}\sin\phi^{2}-2\dot{\phi}\dot{\psi}\sin\phi\cos\phi\cos\theta+\dot{\psi}^{2 }\cos\phi^{2}\cos\theta^{2})\frac{K_{faz}}{I_{z}}\end{array}  \tag{3}\]  
\[ \begin{array}{l}\ddot{x}=\frac{U_{x}}{m}U_{1}-\frac{K_{ftx}}{m}\dot{x}\\ \dot{y}=\frac{U_{y}}{m}U_{1}-\frac{K_{fty}}{m}\dot{y}\end{array}  \tag{4}\]  
\[ \begin{array}{l}\ddot{z}=-g+\frac{\cos\phi\cos\psi}{m}U_{1}-\frac{K_{ftz}}{ m}\dot{z}\end{array}  \tag{5}\]  
With :  
\[\left\{ \begin{array}{l}U_{x}=\cos\phi\sin\theta\cos\psi+\sin\phi\sin\psi\\ U_{y}=\cos\phi\sin\theta\sin\psi-\sin\phi\cos\psi.\end{array} \right. \tag{6}\]  
The control inputs \(U_{1}\),\(U_{2}\), \(U_{3}\), and \(U_{4}\) are given by (8). \[\left\{ \begin{array}{l}U_{1}=b(\omega_{1}^{2}+\omega_{2}^{2}+\omega_{3}^{2} +\omega_{4}^{2})\\ U_{2}=b(\omega_{4}^{2}-\omega_{2}^{2})\\ U_{3}=b(\omega_{3}^{2}-\omega_{1}^{2})\\ U_{4}=d(\omega_{1}^{2}-\omega_{2}^{2}+\omega_{3}^{2}-\omega_{4}^{2})\end{array} \right.