## 3 Application to the Trajectory Tracking of a Quadrotor  
### Quadrotor's Dynamic Model  
Let us consider an inertial reference frame and a body fixed reference frame to specify the position, velocity and acceleration of the quadrotor. The world frame W, is defined by axes X, Y and Z, with Z pointing upward. The body frame B, \(xB\), \(yB\), \(zB\), is attached to the center of mass of the quadrotor. A picture of a quadrotor with the corresponding reference frames is shown in Figure 1.  
The Newton-Euler approach was used to obtain the dynamical behaviour of the quadrotor [27], which considers a quadrotor as a rigid body. Let us consider the generalized coordinates of the quadrotor denoted as \(q=(\xi,\eta)\), where \(\xi=(x,y,z)\) is the position vector, which goes from the center of mass of the quadrotor relative to the fixed reference frame \((X,Y,Z)\), and \(\eta=(\phi,\theta,\psi)\) are the Euler angles of the quadrotor. These angles have the following names and they represent a rotation around their corresponding axis: \(\phi\) is the pitch angle around xB axis, \(\theta\) is the roll angle around yB axis, and \(\psi\) is the yaw angle around zB axis.The angular velocity vector \(\Omega=(p,q,r)\) is related to \(\dot{\eta}\) by the equivalent form \(\Omega=W_{\eta}\dot{\eta}\), where  
\[W_{\eta}= \begin{bmatrix}1&0&-sin(\theta)\\ 0&cos(\phi)&cos(\theta)sin(\phi)\\ 0&-sin(\phi)&cos(\theta)cos(\phi)\\ \end{bmatrix} \]  
is a standard kinematic matrix. Also \(R(\phi,\theta,\psi)eSO(3)\), is the so called rotation matrix that represents the quadrotor's orientation that is relative to the fixed reference frame. Using the compact notation \(c(\alpha)=cos(\alpha)\) and \(s(\alpha)=sin(\alpha)\), this matrix is given by  
\[R= \begin{bmatrix}c(\theta)c(\psi)&c(\psi)s(\theta)s(\phi)-c(\phi)s(\psi)&s( \phi)s(\psi)+c(\phi)c(\psi)s(\phi)\\ c(\theta)s(\psi)&c(\phi)c(\psi)+s(\theta)s(\psi)s(\psi)&c(\phi)s(\theta)s(\psi) -c(\psi)s(\phi)\\ -s(\theta)&c(\theta)s(\psi)&c(\theta)c(\phi)\\ \end{bmatrix} .\]  
Additionally, the inertia matrix is given by  
\[I= \begin{bmatrix}Ixx&0&0\\ 0&Iyy&0\\ 0&0&Izz\\ \end{bmatrix} ,\]  
where \(I_{xx}\), \(I_{yy}\) and \(I_{zz}\) are the moments of inertia of the quadrotor about its corresponding axis, \(m\) is the mass of the quadrotor and \(g=9.81\)\([\text{m}/\text{s}^{2}]\) is the gravitational constant. Finally, the dynamics of a rigid body under external forces take the form  
\[\dot{\xi}= \begin{bmatrix}v_{x}\\ v_{y}\\ v_{z}\\ \end{bmatrix} , \tag{20}\]  
\[m\dot{\upsilon}=R \begin{bmatrix}0\\ 0\\ T_{f}\\ \end{bmatrix} - \begin{bmatrix}0\\ 0\\ mg\\ \end{bmatrix} , \tag{21}\]  
\[\dot{R}=R\dot{\Omega}, \tag{22}\]  
Figure 1: Coordinate Systems and moment/forces acting on the quadrotor. \[I\hat{\Omega}=-\Omega\times I\Omega+\tau, \tag{23}\]  
where \(\hat{\Omega}\) is the anti-symmetric matrix of \(\Omega\), also called the wedge operator defined as  
\[\hat{\Omega}= \begin{bmatrix}0&-r&q\\ r&0&-p\\ -q&p&0\end{bmatrix} ,\]  
and \(\times\) denotes the cross product.\(T_{f}\) is the total thrust applied to the quadrotor, this is \(T_{f}=\sum_{i=1}^{4}f_{i}=k\sum_{i=1}^{4}\omega_{i}^{2}\) and represents the first control signal, furthermore \(\tau=(\tau_{\phi},\tau_{\theta},\tau_{\psi})\) is the vector of control signals for roll, pitch and yaw angles, respectively. From Equations (20)-(23), one can obtain the dynamics of the quadrotor that describe its motion.