In recent years, unmanned aerial vehicles (UAVs) have gained significant traction across diverse fields such as disaster relief, logistics, and military reconnaissance. Among these, the quadrotor drone stands out due to its agility, vertical take-off and landing capabilities, and maneuverability. As a result, research on quadrotor drones has expanded rapidly, with modeling and control emerging as critical challenges. The quadrotor drone is an underactuated system characterized by nonlinear dynamics and strong coupling between state variables, making traditional parameter identification methods like least squares or maximum likelihood estimation less effective. To address this, I propose an improved genetic algorithm (GA) that incorporates a gradient operator to accelerate convergence while maintaining global search capabilities. This article details my approach, from modeling the quadrotor drone to implementing the algorithm and validating it with real flight data.
The quadrotor drone consists of four rotors arranged in a symmetric configuration, with diagonally opposite rotors rotating in the same direction. This design allows for control through differential rotor speeds: matching all rotor speeds enables hovering, while imbalances generate pitch, roll, or yaw moments. To simplify modeling, I assume flight conditions with minimal wind and slow or hovering states, neglecting rotor flapping effects. Under these assumptions, the quadrotor drone can be treated as a six-degree-of-freedom rigid body, and I derive its dynamics using Newton-Euler equations.

I define two coordinate systems: an inertial frame and a body-fixed frame. The transformation matrix between them, using Euler angles $\phi$ (roll), $\theta$ (pitch), and $\psi$ (yaw), is given by:
$$R = \begin{bmatrix}
C_\psi C_\theta & C_\psi S_\theta S_\phi – S_\psi C_\phi & C_\psi S_\theta C_\phi + S_\psi S_\phi \\
S_\psi C_\theta & S_\psi S_\theta S_\phi + C_\psi C_\phi & S_\psi S_\theta C_\phi – C_\psi S_\phi \\
-S_\theta & C_\theta S_\phi & C_\theta C_\phi
\end{bmatrix}$$
where $S$ and $C$ denote sine and cosine functions, respectively. The angular velocity $\omega = [p, q, r]^T$ in the body frame relates to the Euler angle rates via:
$$\omega = \begin{bmatrix}
1 & 0 & -S_\theta \\
0 & C_\phi & S_\phi C_\theta \\
0 & -S_\phi & C_\phi C_\theta
\end{bmatrix} \dot{\eta}, \quad \eta = [\phi, \theta, \psi]^T$$
The rotor thrust and torque are modeled as $F_i = k_F \Omega_i^2$ and $M_i = k_M \Omega_i^2$, where $\Omega_i$ is the rotational speed of rotor $i$. The rigid-body motion equations are:
$$m\ddot{\mathbf{r}} = \mathbf{F}_B + mg\mathbf{e}_3, \quad J\dot{\omega} + \omega \times J\omega + J_r \omega \times \Omega_r = \mathbf{M}_B$$
Here, $m$ is mass, $J$ is the inertia tensor (diagonal due to symmetry), $J_r$ is rotor inertia, $\Omega_r$ represents gyroscopic effects, $\mathbf{F}_B$ and $\mathbf{M}_B$ are external force and moment in the body frame. These are expressed as:
$$\mathbf{F}_B = \begin{bmatrix} 0 \\ 0 \\ -\sum_{i=1}^4 F_i \end{bmatrix}, \quad \mathbf{M}_B = \begin{bmatrix} l(F_2 – F_4) \\ l(F_3 – F_1) \\ M_1 – M_2 + M_3 – M_4 \end{bmatrix}$$
where $l$ is the arm length. The motor dynamics are simplified to $\Omega_i^2 = K V_i$, with $V_i$ as input voltage and $K$ a constant. Defining the state vector as $X = [x, \dot{x}, y, \dot{y}, z, \dot{z}, \phi, \dot{\phi}, \theta, \dot{\theta}, \psi, \dot{\psi}]^T$ and decoupled inputs $u = [u_1, u_2, u_3, u_4]^T$ where:
$$u_1 = \sum_{i=1}^4 V_i, \quad u_2 = V_4 – V_2, \quad u_3 = V_1 – V_3, \quad u_4 = V_1 – V_2 + V_3 – V_4$$
I derive the state-space representation:
$$\dot{X} = f(X, U) = \begin{bmatrix}
\dot{x} \\
a_1 \dot{x} + a_2 u_2 + b_1 u_1 \\
\dot{y} \\
a_3 \dot{y} + a_4 u_3 + b_2 u_1 \\
\dot{z} \\
a_5 \dot{z} + b_3 u_1 \\
\dot{\phi} \\
a_6 \dot{\phi} \dot{\theta} + a_7 u_2 \\
\dot{\theta} \\
a_8 \dot{\phi} \dot{\psi} + a_9 u_3 \\
\dot{\psi} \\
a_{10} \dot{\phi} \dot{\theta} + a_{11} u_4
\end{bmatrix}$$
with constants $a_i$ and $b_j$ encapsulating parameters like $k_F/m$, $k_M/J$, etc. For identification, I consider the parameter vector $\theta = [a_1, a_2, \dots, a_{11}, b_1, b_2, b_3]^T$, though in practice, I group them by control loops for efficiency. The quadrotor drone’s model exhibits nonlinearities, necessitating robust identification techniques.
Traditional genetic algorithms are prone to slow convergence due to random evolutionary directions. To overcome this, I enhance the GA by integrating a gradient operator, which guides the search while preserving global exploration. My improved GA comprises encoding, population initialization, and iterative evolution with selection, gradient-based update, crossover, and mutation.
For encoding, I use a real-valued chromosome representing the parameter vector $\theta$, with each gene corresponding to a parameter. Initialization involves defining a feasible domain based on physical quadrotor drone specs and randomly sampling chromosomes uniformly. The iterative process is as follows:
- Selection: Compute fitness using an optimization function $I(\theta)$, then assign selection probabilities proportional to fitness for gradient and crossover operations.
- Gradient Operator: Selected parents undergo a gradient descent step: $\theta_{\text{new}} = \theta_{\text{old}} – \alpha \nabla I(\theta_{\text{old}})$, where $\alpha$ is a learning rate. The gradient $\nabla I$ is derived analytically from the model.
- Crossover: Two parents are combined via weighted averaging to produce offspring, maintaining diversity.
- Mutation: A random perturbation is added to some offspring, ensuring they remain within the feasible domain.
To ensure convergence, I retain the best chromosome from each generation. The optimization function $I(\theta)$ is based on prediction error:
$$I(\theta) = \frac{1}{2} \sum_{k=1}^{N-1} \left( \Delta_t X(k) – f(X(k), U(k); \theta) \right)^T \left( \Delta_t X(k) – f(X(k), U(k); \theta) \right)$$
where $\Delta_t X(k)$ is a finite-difference approximation of $\dot{X}(k)$. The gradient components, such as for $a_1$, are computed as:
$$\frac{\partial I}{\partial a_1} = \sum_{k=1}^{N-1} (\Delta_t x_4(k) – a_1 x_4(k) – a_2 u_2(k) – b_1 u_1(k)) \cdot (-x_4(k))$$
Similar expressions are derived for other parameters. This hybrid approach leverages gradient efficiency and GA robustness, tailored for the quadrotor drone’s complex dynamics.
I validate my method using real flight data from a quadrotor drone. The data includes input voltages and state estimates from an inertial navigation system. Parameters are identified separately for pitch, roll, yaw, and position loops to simplify the process. After 100 generations, I obtain the following identified parameters:
| Parameter Group | Identified Values | Physical Meaning |
|---|---|---|
| Pitch Loop | $a_6 = 0.012, a_7 = 2.34, b_1 = 0.56$ | Related to pitch dynamics and control effectiveness |
| Roll Loop | $a_8 = 0.011, a_9 = 2.31, b_2 = 0.55$ | Related to roll dynamics and control effectiveness |
| Yaw Loop | $a_{10} = 0.005, a_{11} = 1.89, b_3 = 0.12$ | Related to yaw dynamics and control effectiveness |
| Position Loop | $k/m = 0.45$ | Thrust-to-weight ratio |
The pitch loop identification results show close alignment with actual flight data, as seen in the time response where the identified model tracks the quadrotor drone’s pitch angle within a small error margin. For the yaw loop, a constant bias appears due to sensor drift and algorithmic limitations, but the overall trend is captured. Roll loop identification exhibits a steady error growth in angular rate, attributed to parameter sensitivity. Height identification also shows a constant offset, likely from altitude measurement inaccuracies. Despite these issues, the identified model effectively represents the quadrotor drone’s behavior for control design.
To highlight the improvement, I compare convergence between my enhanced GA and a traditional GA. Using the same initial population and fitness threshold, my method reduces the parameter error to 5% of the initial value in just 17 generations, whereas the traditional GA requires 87 generations. This demonstrates the acceleration afforded by the gradient operator. The convergence plot illustrates a steeper decline in cost function for the improved GA, emphasizing its efficiency for quadrotor drone parameter identification.
The quadrotor drone’s identification process benefits greatly from this hybrid approach. The gradient operator directs evolution, reducing random walks, while crossover and mutation prevent local minima entrapment. Future work could focus on optimizing the gradient step size adaptively or refining the model to include aerodynamic effects for faster quadrotor drone flights. Additionally, parallelizing the algorithm could further speed up computation for real-time applications.
In conclusion, I have presented an improved genetic algorithm for parameter identification of quadrotor drones. By incorporating a gradient operator, I achieve faster convergence while maintaining global search properties. The quadrotor drone model, though simplified, captures essential dynamics, and identification results validate the method’s effectiveness. This approach facilitates accurate modeling for control system design, enhancing the performance and reliability of quadrotor drones in various applications. Continued refinement of the algorithm and model will further advance quadrotor drone technology.
