## 2 Methodology
### Aerodynamic Modeling of UAV  
The aerodynamic modeling of a UAV involves the modeling of control surfaces, the reaction to varying flight conditions, and the response to different changes in aircraft [23]. Such mathematical modeling allows for testing different flight parameters in simulations rather than real aircrafts which are not economical or safe and require specialized equipment and environment [24].  
In this paper, we limit our experimentation and discussion only to the pitch rotations of the aircraft and its response to velocity and thrust. Therefore, we assume a decoupling between longitudinal and lateral-directional dynamics [25]. The modeling of UAV is a stepwise process in which, firstly, we linearize our model by considering small perturbation theory and steady state conditions [26], and represent our system, using first order differential equations. Next, we solve moment and force  
Figure 1: System architecture.  
equations to obtain dimensionless derivatives and, then, find numerical values of these derivatives using the xflr5 analysis tool similar to the study [27] by using the UAV parameters given in Table 1.  
This study uses a UAV based on the conventional RC aircraft model, as shown in Figure 2.  
Aerodynamic derivatives, mass, and inertial characteristics are written as coefficients in first order differential equations, which are the state space representation of the system. The complete state of the system is described by a set of variables whose number depends on the DOF of the system.  
\[\dot{\textbf{x}}=\textbf{A}\textbf{x}+\textbf{B}\textbf{u} \tag{1}\]  
where **A** is the system matrix, **x** is the state vector containing variables describing state of the system, **B** is the input matrix, and **u** is the input vector having input variables, that is, thrust and control surface deflections.  
The state space representation of our system is as follows:  
\[\left[\begin{array}{c}\dot{u}\\ \dot{w}\\ \dot{q}\\ \dot{\theta}\\ \dot{h}\end{array}\right]=\left[\begin{array}{cccc}X_{u}&X_{w}&X_{q}&-g \cos\theta_{o}&0\\ Z_{u}&Z_{w}&Z_{q}&-g\sin\theta_{o}&0\\ M_{u}&M_{w}&M_{q}&0&0\\ 0&0&1&0&0\\ 0&-\cos\theta&0&u\cos\theta+w\sin\theta&0\\ \end{array}\right]\left[\begin{array}{c}u\\ w\\ q\\ \theta\\ h\end{array}\right]+\left[\begin{array}{cc}X_{\delta_{\xi}}&X_{\delta_{1}}\\ Z_{\delta_{\xi}}&0\\ M_{\delta_{\xi}}&0\\ 0&0\\ \end{array}\right]\left[\begin{array}{c}\delta_{\epsilon}\\ \delta_{t}\\ \end{array}\right] \tag{2}\]  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Value** & **Notation** \\ \hline Wing span & 1.0 m & \(b\) \\ Area & 0.24 m\({}^{2}\) & \(s\) \\ Weight & 0.492 kg & \(m\) \\ Air density & 1.225 kg/m\({}^{3}\) & \(\rho\) \\ Rolling moment of inertia & 0.01076 kg\(\cdot\)m\({}^{2}\) & \(l_{xx}\) \\ Pitching moment of inertia & 0.02514 kg\(\cdot\)m\({}^{2}\) & \(l_{yy}\) \\ Yawing moment of inertia & 0.03561 kg\(\cdot\)m\({}^{2}\) & \(l_{zz}\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Unmanned aerial vehicles (UAV) parameters.  
Figure 2: Views of unmanned aerial vehicles (UAV).  
where \(u\) is forward velocity, \(w\) vertical velocity, \(q\) pitch rate, \(\theta\) pitch angle, \(\theta_{o}\) trim pitch angle, and \(h\) is the altitude.  
In the design of longitudinal control, pulling of the control stick conventionally corresponds to negative elevator input which performs a pitch-up motion, that is, rotates the UAV nose upward, causing an increased altitude. The response of the mathematical model of the UAV to \(-1^{\circ}\) elevator input is shown in Figure 2(a). A push force on the control stick will have the opposite response, causing the UAV to speed up with the nose downward and decreasing the altitude, as shown in Figure 2(b), where the UAV response to \(+1^{\circ}\) elevator input is displayed. Figure 3 validates the mathematical model and the longitudinal control convention.