## 2 KUBeetle
### Dynamic Model  
System identification using a gray box model requires an initial dynamic model with starting parameters. The longitudinal mode dynamic model of the KUBeetle used in this study was based on Newton-Euler equations of motion at near-hover conditions [86; 87; 88; 89]. The dynamic model was extended to include filters and servo motor dynamics [34]. Parameters (specifically, the moments of inertia and filter parameters) were updated according to the latest KUBeetle design. Table 1 shows the stability and control derivatives obtained from the computational fluid dynamics (CFD) analysis and force and moment measure  
Figure 1: A flight model of the KUBeetle: (**a**) detailed construction components used in the KUBeetle; (**b**) principle of the stroke-plane-change mechanism for control moment generation. ments. Figure 1 shows the body frame of the KUBeetle. The extended longitudinal mode dynamic model is described below [34, 86, 87, 88, 89]:  
\[\dot{x}_{ext}=A_{ext}\ x_{ext}+B_{ext}\ u_{ext}, \tag{1}\]  
\[y_{ext}=C_{ext}\ x_{ext}, \tag{2}\]  
\[x_{ext}=\left[ \begin{array}{c}u\\ w\\ q\\ \dot{\theta}\\ \dot{q}_{lpf}\\ \dot{\theta}_{lpf}\\ \dot{\theta}_{kf,angle}\\ \dot{\theta}_{kf,bias}\\ u_{servo}\end{array} \right], \tag{3}\]  
where \(u\) and \(w\) are velocities along the \(x\)- and \(z\)-axis, respectively; \(q\) is the pitch rate (rad/s); \(\dot{\theta}\) is the pitch angle (rad); \(u_{ext}\) is the control input in the form of pitch servo angle; \(y_{ext}\) is the output or response of the KUBeetle; \(\dot{q}_{lpf}\) is the low-pass filtered pitch rate; \(\dot{\theta}_{lpf}\) is the low-pass filtered pitch angle; \(\dot{\theta}_{kf,angle}\) and \(\dot{\theta}_{kf,bias}\) are the pitch angle and bias estimation of the Kalman filter, respectively, and \(u_{servo}\) is the servo output. The system and input matrices of the extended dynamic model are given below [34, 86, 87, 88, 89]:  
\[A_{ext}=\left[ \begin{array}{cccccccc}\frac{X_{u}}{m}&\frac{X_{m}}{m}&\frac {X_{d}}{m}&g&0&0&0&0&\frac{X_{\gamma p}}{m}\\ \frac{Z_{u}}{m}&\frac{Z_{u}}{m}&\frac{Z_{d}}{m}&0&0&0&0&0&\frac{Z_{\gamma p}}{m }\\ \frac{M_{u}}{M_{yy}}&\frac{M_{u}}{M_{yy}}&\frac{M_{d}}{M_{yy}}&0&0&0&0&0&\frac{ M_{\gamma p}}{T_{\gamma p}}\\ 0&0&1&0&0&0&0&0\\ 0&0&204.3&0&-204.3&0&0&0&0\\ 0&0&0&10.13&0&-10.13&0&0&0\\ 0&0&0&0&1&0.329&-0.329&1&0\\ 0&0&0&0&0&-0.05&0.05&0&0\\ 0&0&0&0&0&0&0&-30.67\end{array} \right], \tag{4}\]  
\[B_{ext}=\left[ \begin{array}{c}0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 0\\ 30.91\end{array} \right], \tag{5}\]  
where \(X\) and \(Z\) are aerodynamic forces along the \(x\)- and \(z\)-axes, respectively, and \(M\) is the aerodynamic pitching moment about the CG. Subscripts \(u\), \(w\), and \(q\) indicate their aerodynamic derivatives with respect to \(u\), \(w\), and \(q\). The subscript \(\gamma p\) implies control input by the pitch servo. \(m\) is the mass of the KUBeetle (\(17.7\times 10^{-3}\) kg), \(I_{yy}\) is the pitching moment of inertia (12.43 \(\times 10^{-6}\) kg m\({}^{2}\)), and \(g\) is the gravitational acceleration (\(9.81\) m s\({}^{-2}\)). The first four rows of the system matrix consisted of parameters of the basic dynamic model [34]. In the fifth and sixth rows, parameters of low-pass filters for pitch rate and pitch angle were included, respectively. The seventh and eighth rows included Kalman filter parameters for pitch angle and bias estimation. Finally, the last row contained servo motor dynamic parameters. The output matrix of the extended dynamic model, \(C_{ext}\) (open-loop) or \(C_{ext,cl}\) (closed-loop), can be adjusted according to the number of available outputsfor system identification. For pitch angle and pitch rate outputs, the output matrix is given as follows:  
\[C_{ext1}=C_{ext,cl1}=\bigg{[} \begin{array}{cccccccccc}0&0&0&0&1&0&0&0&0\\ 0&0&0&0&0&0&1&0&0\end{array} \bigg{]}. \tag{6}\]  
For pitch angle output only, the output matrix was given as:  
\[C_{ext2}=C_{ext,cl2}=\big{[} \begin{array}{cccccccccc}0&0&0&0&0&0&1&0&0\end{array}  \big{]}.