## 2 Quadrotor Dynamic Modeling  
The quadrotor is a complex flying system, strongly nonlinear, multivariable, fully coupled, and under-actuated (6-DOF and only four control inputs). Therefore, its modeling is a delicate task. For better understanding of its dynamic modeling, different working hypotheses were assumed: A rigid and a symmetrical quadrotor structure (diagonal matrix of inertia); a rigid propellers (negligible effect of deformation during rotation); the lift and the drag forces are proportional to the square of the rotational speed of the rotors (a very close approximation of the aerodynamic behavior); and the center of mass is exactly the origin of reference related to the structure. From the configuration shown in Figure 1, the quadrotor has two pairs of rotating rotors attached to the end of a cross and the control electronics is situated in the center of the cross. The front and the rear propellers spin counterclockwise, while the left and the right ones spin clockwise, which effectively neutralizes the unwanted reactive torque and allows the vehicle to fly without overturning. Notice that the absolute position of the mass center is described by the three coordinates (\(x,y,z\)) and its attitude by the three Euler's angles (\(\phi\), \(\theta\), \(\psi\)). Using Newton-Euler formalism [2], the dynamic model of the quadrotor can be expressed as:  
\[ \begin{array}{c}\ddot{\phi}=\frac{l}{l_{1}}\frac{l_{2}}{l_{x}}+\frac{\big{(} l_{y}-l_{z}\big{)}}{l_{x}}\Big{(}\dot{\psi}\;cos\phi\;cos\theta-\dot{\theta}\; sin\phi\Big{)}\Big{(}\dot{\phi}\;cos\phi+\dot{\psi}\;sin\phi\;cos\theta\Big{)}\\ \hskip 14.226378 pt-\frac{l_{r}(\omega_{1}-\omega_{2}+\omega_{3}-\omega_{4})}{ l_{x}}\Big{(}\dot{\psi}\;sin\phi\;cos\theta+\dot{\theta}\;cos\phi\Big{)}\\ \hskip 14.226378 pt-\frac{l_{r}(\omega_{1}-\omega_{2}+\omega_{3}-\omega_{4})}{ l_{y}}\Big{(}\dot{\psi}\;sin\theta-\dot{\phi}\Big{)}\\ \hskip 14.226378 pt-\frac{K_{\rm{eff}}}{l_{x}}\Big{(}\dot{\theta}^{2}\;cos\phi ^{2}+2\dot{\phi}\;\dot{\psi}\;sin\phi\;cos\phi\;cos\theta\;+\dot{\psi}^{2}\; sin\phi^{2}\;cos\theta^{2}\Big{)}\end{array}  \tag{1}\]  
\[ \begin{array}{c}\ddot{\phi}=\frac{l}{l_{1}}\frac{l_{3}}{l_{z}}+\frac{\big{(} l_{x}-l_{y}\big{)}}{l_{z}}\Big{(}\dot{\psi}\;sin\;cos\theta+\dot{\theta}\; cos\phi\Big{)}\Big{(}\dot{\varphi}-\dot{\psi}\;sin\theta\Big{)}\\ \hskip 14.226378 pt-\frac{l_{r}(\omega_{1}-\omega_{2}+\omega_{3}-\omega_{4})}{ l_{y}}\Big{(}\dot{\psi}\;sin\theta-\dot{\varphi}\Big{)}-(\dot{\theta}^{2}\; sin\phi^{2}\\ \hskip 14.226378 pt-2\dot{\varphi}\dot{\psi}\;sin\;cos\phi\;cos\theta)+\frac{K_{ \rm{eff}}}{l_{z}}\dot{\psi}^{2}\;cos\phi^{2}cos\theta^{2}\end{array}  \tag{2}\]  
\[ \begin{array}{c}\ddot{\psi}=\frac{l_{4}}{l_{z}}+\frac{\big{(}l_{x}-l_{y}\big{)} }{l_{z}}\Big{(}\dot{\psi}\;sin\;cos\theta+\dot{\theta}\;cos\phi\Big{)}\Big{(} \dot{\varphi}-\dot{\psi}\;sin\theta\Big{)}\\ \hskip 14.226378 pt-\frac{l_{r}(\omega_{1}-\omega_{2}+\omega_{3}-\omega_{4})}{ l_{y}}\Big{(}\dot{\psi}\;sin\theta-\dot{\varphi}\Big{)}-(\dot{\theta}^{2}\; sin\phi^{2}\\ \hskip 14.226378 pt-2\dot{\varphi}\dot{\psi}\;sin\;cos\phi\;cos\theta)+\frac{K_{ \rm{eff}}}{l_{z}}\dot{\psi}^{2}\;cos\phi^{2}cos\theta^{2}\end{array}  \tag{3}\]  
\[ \begin{array}{c}\ddot{x}=\frac{\cos\varphi\;\cos\varphi\;\sin\theta+\sin \varphi\;\sin\psi}{m}U_{1}-\frac{K_{\rm{eff}}}{m}\dot{x}\end{array}  \tag{4}\]  
Figure 1: Quadrotor’s configuration. \[\ddot{y}=\frac{\sin\psi\ \sin\theta\ \cos\!\varphi-\cos\psi\ \sin\!\varphi}{m}U_{1}- \frac{K_{fty}}{m}\dot{y} \tag{5}\]  
\[\ddot{z}=-g+\frac{\cos\varphi\cos\theta}{m}U_{1}-\frac{K_{ftz}}{m}\dot{z} \tag{6}\]  
with  
\[\left\{ \begin{array}{l}U_{1}=b\Big{(}{\omega_{1}}^{2}+{\omega_{2}}^{2}+{ \omega_{3}}^{2}+{\omega_{4}}^{2}\Big{)}\\ U_{2}=b\Big{(}{\omega_{4}}^{2}-{\omega_{2}}^{2}\Big{)}\\ U_{3}=b\Big{(}{\omega_{3}}^{2}-{\omega_{1}}^{2}\Big{)}\\ U_{4}=d\Big{(}{\omega_{1}}^{2}-{\omega_{2}}^{2}+{\omega_{3}}^{2}-{\omega_{4}}^ {2}\Big{)}\end{array} \right.