# Trajectory Tracking with Adaptive Robust Control for Quadrotor
## 2 Mathematical Model  
The mathematical model to describe the quadrotor UAV is in three sets of vectors; the first defines the accelerations, the second defines the Euler rates, and the last vector represents the angular accelerations [29]. Then, the accelerations in the body frame (\(BF\)) [30] of the unmanned MAV are given by:  
\[\ddot{a}=\left(\begin{array}{c}a_{x}\\ a_{y}\\ a_{z}\end{array}\right)=\left(\begin{array}{c}g\sin\theta\\ -g\sin\phi\cos\theta\\ -g\cos\phi\cos\theta\end{array}\right)+\left(\begin{array}{c}-2(v_{z}w_{y}- v_{y}w_{z})\\ -2(v_{x}w_{z}-v_{z}w_{x})\\ -2(v_{y}w_{x}-v_{x}w_{y})\end{array}\right)+ \tag{1}\]  
\[+\left(\begin{array}{c}2\frac{m_{w}}{m}(v_{y}\cdot(w_{1}+w_{2}+w_{3}+w_{4}) )\\ -2\frac{m_{w}}{m}(v_{y}\cdot(w_{1}+w_{2}+w_{3}+w_{4}))\\ 0\end{array}\right)+\left(\begin{array}{c}0\\ 0\\ \frac{1}{m}b(w_{1}^{2}+w_{2}^{2}+w_{3}^{2}+w_{4}^{2})\end{array}\right) \tag{2}\]  
where \(g\) is the gravitational constant, \(\theta\) is the rotation in the axis-\(Y\), \(\psi\) rotation in axis-\(Z\), and \(\phi\) rotation in the axis-\(X\), such rotations correspond to pitch, yaw, and roll, respectively, [29]. The angular velocities are defined as \(w_{x},w_{y},w_{z}\) and the linear velocity is given by \(v_{x},v_{y},v_{z}\) about the axis-\(X\), \(Y\) and \(Z\), respectively, (see Figure 1). The constant \(b\) represents the reaction torque gain coefficient in the \(Z\) axis direction, \(m\) corresponds to the mass of the vehicle, and \(m_{w}\) is the mass of propellers and rotors is equal to \(m_{w}\).  
Thus, the second vector defines the Euler rates; these are used to determine the changes in the quadrotor \(BF\), and local system orientation relative to the auxiliary system is \(SF\):  
\[\dot{\vec{\Theta}}=\left(\begin{array}{c}\dot{\phi}\\ \dot{\theta}\\ \dot{\psi}\end{array}\right)=\left(\begin{array}{c}w_{x}+w_{y}\sin\phi\tan \theta+w_{z}\cos\phi\tan\theta\\ w_{y}\cos\phi-w_{z}\sin\phi\\ w_{y}\frac{\sin\phi}{\cos\theta}+w_{z}\frac{\cos\phi}{\cos\theta}\end{array}\right) \tag{3}\]  
The last vector represents the angular accelerations in the unmanned MAV; this vector is given by:  
\[\dot{\vec{\Omega}}=\left(\begin{array}{c}\dot{w}_{x}\\ \dot{w}_{y}\\ \dot{w}_{z}\end{array}\right)=\left(\begin{array}{c}\frac{1}{L}l\cdot b(w_{ 4}^{2}-w_{2}^{2})\\ \frac{1}{L}l\cdot b(w_{3}^{2}-w_{1}^{2})\\ \frac{1}{L}d(w_{2}^{2}+w_{4}^{2}-w_{1}^{2}-w_{3}^{2})\end{array}\right) \tag{4}\]\[\left(\begin{array}{c}-\frac{1}{L}(w_{y}w_{z}(I_{z}-I_{y}))\\ -\frac{1}{L}(w_{x}w_{z}(I_{x}-I_{z}))\\ -\frac{1}{L}(w_{x}w_{y}(I_{y}-I_{x}))\end{array}\right)\left(\begin{array}{c }-\frac{1}{L}(w_{y}I_{w}(w1+w2+w3+w4))\\ -\frac{1}{L}(w_{x}I_{w}(w1+w2+w3+w4))\\ 0\end{array}\right) \tag{5}\]  
where \(I_{w}\) is the inertia moment in the rotor. \(I_{x}\), \(I_{y}\), and \(I_{z}\) represent the inertia for the \(x\)-axis, \(y\)-axis, and \(z\)-axis, respectively. \(l\) is the length of the unmanned aerial vehicle arm [29]. Figure 2 is presented the 4 thrust forces that act in the unmanned aerial vehicle or quadrotor.  
**Remark 1**.: _The vector \(\vec{u}\) as well as the vector \(\dot{\vec{\Omega}}\) describe the relationship that exist in the local coordinate system BF. Euler rates vector \(\dot{\vec{\Omega}}\) describes the relationship between systems BF and SF._