## 2 UAV Model and the Problem Definition
### Model Dynamics of DJI Tello UAV  
Before outlining the UAV model, we show the main coordinate frames used in this study: \((. )^{I}\) represents the global Earth-fixed Earth-centred inertial frame, and \((. )^{B}\) is the body-fixed frame, fixed at the UAV centre of mass (CoM) as given on Figure 1. There are two types of configurations for the UAV, which are \(\times\) and \(+\) configurations [8,20,32]. In this study, the \(\times\)-type UAV is modelled and used. The position (\(p^{I}\)) and attitude (\(\eta^{I}\)) of the UAV with respect to the frame \(I\) are defined as follows:  
\[ \begin{array}{l}p^{I}=[x\ y\ z]^{T},\eta^{I}=[\phi\ \phi\ \psi]^{T},\\ v^{I}=\dot{p}^{I}=Rv^{B},\omega^{I}=\dot{\eta}^{I}=T\omega^{B},\end{array}  \tag{1}\]  
where the vector \(p^{I}\) contains the \(x\), \(y\), and \(z\) Cartesian position coordinates of the UAV inertial frame, and \(v^{I}\) and \(\omega^{I}\) are the derivative of position and attitude values, respectively. The superscripts \((. )^{I}\) and \((. )^{B}\) denote, respectively, the inertial and body frames. The \(\eta^{I}\) vector contains the angles of roll \(\phi\), pitch \(\theta\), yaw \(\psi\) of the UAV body frame, \(R\) is a rotational matrix, and \(T\) is a translation matrix used in frame conversions. These rotation and transformation matrices are used to calculate the transformation of the inertial frame to the body frame or vice versa. The rotation and transformation matrices are written in Equation (A1) of Appendix A. The \(v\) variable is used to represent the linear velocity, and \(\omega\) is used to represent the angular velocity. In this study, the heading angle of the UAV, yaw reference (\(\psi_{r}\)) is equal to \(\psi_{r}=0^{\circ}\) in order to overlap the inertial and the body coordinate frames of the DJI Tello. After the defining position and orientation, a nonlinear dynamic equation for the DJI Tello UAV can be written with the Newton-Euler formulation as given below [8,20]:  
\[ \begin{array}{l}m_{\text{uav}}\dot{v}^{I}=F^{I}=F^{I}_{gravity}+F^{I}_{thrust },\\ I^{B}\dot{w}^{B}=-w^{B}\times\left(I^{B}w^{B}\right)+\tau^{B}_{rotor}.\end{array}  \tag{2}\]  
In Equation (2), \(m_{\text{uav}}\) is the mass of the UAV to the CoM of the UAV, \(F^{I}_{gravity}\) is the gravity force, \(F^{I}_{thrust}\) is the total thrust force which comes from the propellers, \(I^{B}\) is a moment of inertia, and \(I^{B}\) is referred to as the inertia matrix. The cross product at the right-hand side of the angular velocity dynamics equation comes from the Coriolis force effect. Considering the DJI Tello UAV, this effect can be ignored because of the size of the  
Figure 1: The DJI Tello UAV used in the implementation [33]. UAV. Ref. [8] tested a fixed heading angle and ignored the Coriolis effect on the DJI Tello UAV, which has an almost similar size to the DJI Tello UAV. Therefore, the formula can be written as \(I^{B}\tilde{w}^{B}=\tau_{rotor}^{B}\), and the UAV torques (\(\tau_{rotor}^{B}\)) are expressed by \(\tau_{\phi}\),\(\tau_{\theta}\), and \(\tau_{\psi}\), respectively:  
\[F_{gravity}^{I}= \begin{bmatrix}0&0&-m_{\text{uav}}g\end{bmatrix} ^{T}, \tag{3}\]  
To overcome the gravity effect, the force is applied to the CoM of the UAV as \(F_{gravity}^{I}\). The acceleration due to Earth's gravity is denoted as \(g\). The \(F_{thrust}^{I}\) forces are generated by propellers, and the formula is written as Equation (4). The angular velocity of each rotor's propeller is denoted as \(\Omega_{i}\), and the thrust coefficient is referred to as \(b\)  
\[F_{thrust}^{B}= \begin{bmatrix}0&0&b\sum_{i=1}^{4}\Omega_{i}^{2}\end{bmatrix} ^{T}, \tag{4}\]  
\[\dot{v}^{I}= \begin{bmatrix}\frac{\ddot{x}}{\dot{y}}\\ \dot{z}\end{bmatrix} =\frac{b}{m_{\text{uav}}}\sum_{i=1}^{4}\Omega_{i}^{2}= \begin{bmatrix}s(\phi)s(\psi)+c(\phi)s(\theta)c(\psi)\\ -s(\phi)c(\theta)+c(\phi)s(\theta)s(\psi)\\ c(\phi)c(\theta)\end{bmatrix} - \begin{bmatrix}0\\ 0\\ g\end{bmatrix} . \tag{5}\]  
In Equation (5), \(s(. )\) and \(c(. )\) denote the sine and cosine, respectively.