In recent years, the rapid advancement of unmanned aerial vehicle technology has led to the quadrotor drone emerging as a novel intelligent platform. Due to its high agility, compact size, and ability to hover precisely, the quadrotor drone finds extensive applications across various fields. The unique flight mechanics of a quadrotor drone, characterized by four rotors arranged in a cross configuration, allow for take-off and landing in confined spaces and enable high maneuverability in obstacle-dense environments. The mechanical structure of a quadrotor drone is relatively simple, consisting primarily of a cruciform frame and four rotors. However, from a mathematical modeling perspective, the quadrotor drone represents a strongly coupled, nonlinear, and underactuated system with six degrees of freedom. By adjusting the speeds of the four propellers, diverse flight attitudes can be achieved. The inherent nonlinearity and strong coupling make it challenging to control the quadrotor drone from an initial position to a target while maintaining a desired motion state. To address this, linear approximation of the nonlinear quadrotor drone model is often necessary. In this work, we investigate a dual-loop control structure for the quadrotor drone, where the control input of the outer velocity loop is set as the output of the inner angle loop, thereby enabling effective attitude control. We analyze the nonlinear model and dual-loop system of the quadrotor drone, establish its dynamic model, design a dual-loop control system based on this model, and conduct stability simulation tests using MATLAB.
The dynamic system model of a quadrotor drone serves as the foundation for designing flight control algorithms. The accuracy of this model directly influences the rationality and effectiveness of the control algorithm. We derive the displacement motion equations, rotational motion equations, dynamic equations, and system control allocation model to lay the groundwork for control algorithm development and simulation platform construction.

Kinematic Equations
Displacement Motion Equations
Given the three-dimensional motion velocities (u, v, w) in the body coordinate system of the quadrotor drone, the three-dimensional linear velocities (x, y, z) in the ground coordinate system can be computed using rotation transformation theory. The equations are as follows:
$$ \begin{aligned}
\dot{x} &= u(\cos\theta \cos\varphi) + v(\sin\gamma \sin\theta \cos\varphi – \cos\gamma \sin\varphi) + w(\cos\gamma \sin\theta \cos\varphi + \sin\gamma \sin\varphi) \\
\dot{y} &= u(\cos\theta \sin\varphi) + v(\sin\gamma \sin\theta \sin\varphi + \cos\gamma \cos\varphi) + w(\cos\gamma \sin\theta \sin\varphi – \sin\gamma \cos\varphi) \\
\dot{z} &= -u \sin\theta + v \sin\gamma \cos\theta + w \cos\gamma \cos\theta
\end{aligned} $$
where $\theta$ is the pitch angle, $\gamma$ is the roll angle, and $\varphi$ is the yaw angle.
Rotational Motion Equations
Given the three-dimensional attitude angular velocities (p, q, r) in the body coordinate system of the quadrotor drone, the three-dimensional attitude angular accelerations ($\dot{\gamma}$, $\dot{\theta}$, $\dot{\varphi}$) in the ground coordinate system can be calculated as:
$$ \begin{aligned}
\dot{\gamma} &= p + r \cos\gamma \tan\theta + q \sin\gamma \tan\theta \\
\dot{\theta} &= q \cos\gamma – r \sin\gamma \\
\dot{\varphi} &= \frac{r \cos\gamma + q \sin\gamma}{\cos\theta}
\end{aligned} $$
Dynamic Equations
We employ the Newton-Euler formulation to derive the dynamic equations of the quadrotor drone. The dynamic equations are expressed as:
$$ \begin{aligned}
\ddot{x} &= \frac{1}{m} \left( \sum_{i=1}^{4} F_i \right) (\sin\theta \cos\gamma \cos\varphi – \sin\gamma \sin\varphi) – K_{dx} \dot{x} \\
\ddot{y} &= \frac{1}{m} \left( \sum_{i=1}^{4} F_i \right) (\sin\theta \cos\gamma \sin\varphi + \sin\gamma \cos\varphi) – K_{dy} \dot{y} \\
\ddot{z} &= \frac{1}{m} \left( \sum_{i=1}^{4} F_i \right) (\cos\gamma \cos\theta) – K_{dz} \dot{z} – g \\
I_x \dot{p} &= (I_y – I_z) q r – I_r \Omega q + l (F_2 – F_4) \\
I_y \dot{q} &= (I_z – I_x) p r – I_r \Omega p + l (F_3 – F_1) \\
I_z \dot{r} &= (I_x – I_y) p q – M_{D1} + M_{D2} – M_{D3} + M_{D4}
\end{aligned} $$
Here, $\ddot{x}$, $\ddot{y}$, and $\ddot{z}$ are linear accelerations in the ground coordinate system; $F_i$ is the lift generated by the i-th propeller; $l$ is the length of the arm; $m$ is the mass of the quadrotor drone; $K_{dx}$, $K_{dy}$, and $K_{dz}$ are drag coefficients in the body coordinate system; $I_x$, $I_y$, and $I_z$ are moments of inertia; $M_{Di}$ represents the moment about the z-axis, with $M_{Di} = d \Omega_i^2$ where $d$ is the drag coefficient of the propeller; $p$, $q$, and $r$ are rotational angular velocities in the ground coordinate system; and $\Omega$ is the algebraic sum of the four motor speeds, $\Omega = \Omega_1 + \Omega_2 + \Omega_3 + \Omega_4$.
| Symbol | Description | Typical Value |
|---|---|---|
| $m$ | Mass of the quadrotor drone | 1.0 kg |
| $l$ | Arm length | 0.25 m |
| $I_x$, $I_y$, $I_z$ | Moments of inertia | 0.01 kg·m² |
| $K_{dx}$, $K_{dy}$, $K_{dz}$ | Drag coefficients | 0.1 N·s/m |
| $b$ | Lift coefficient | 1.0e-5 N·s² |
| $d$ | Drag coefficient of propeller | 1.0e-6 N·m·s² |
| $g$ | Gravitational acceleration | 9.81 m/s² |
System Control Allocation Model
The flight control of a quadrotor drone involves four primary states: lift, roll, pitch, and yaw. These are achieved by varying the speeds of the four motors driving the propellers. The control inputs $U_1$ to $U_4$ are defined as:
$$ \begin{aligned}
U_1 &= \sum_{i=1}^{4} F_i = b (\Omega_1^2 + \Omega_2^2 + \Omega_3^2 + \Omega_4^2) \\
U_2 &= l (F_2 – F_4) = l b (\Omega_2^2 – \Omega_4^2) \\
U_3 &= l (F_3 – F_1) = l b (\Omega_3^2 – \Omega_1^2) \\
U_4 &= d (-\Omega_1^2 + \Omega_2^2 – \Omega_3^2 + \Omega_4^2)
\end{aligned} $$
where $b$ is the lift coefficient of the propeller, $d$ is the drag coefficient, and $\Omega_i$ (for $i=1,2,3,4$) denotes the rotational speed of the i-th motor.
Control Algorithm Design
The control algorithm is the core of the flight system for a quadrotor drone, determining the stability and safety of trajectory flight. With the widespread application of quadrotor drones, flight control algorithms have garnered significant attention, leading to notable research outcomes. Advanced theories such as sliding mode control and fuzzy control exist but are not yet widely applied in practical engineering. Currently, PID control algorithms are commonly employed for designing position and attitude controllers for quadrotor drones.
Position Controller Algorithm Design
We utilize a PID algorithm to compute the linear acceleration $\ddot{z}$ of the quadrotor drone in the ground coordinate system. The equation is:
$$ \ddot{z} = k_{p3} (z_d – z) + k_{d3} \frac{d(z_d – z)}{dt} $$
where $z_d$ is the target height, $z$ is the feedback height, and $k_{p3}$ and $k_{d3}$ are PD algorithm parameters. The motor input signal $P_1$ is then derived from the pitch angle $\theta$ and roll angle $\gamma$:
$$ P_1 = \frac{m \ddot{z} + m g}{\cos\gamma \cos\theta} $$
Attitude Controller Algorithm Design
PID algorithms are also applied to compute the motor input signals $P_2$, $P_3$, and $P_4$ for attitude control:
$$ \begin{aligned}
P_2 &= k_{p\gamma} e_\gamma + k_{d\gamma} \frac{de_\gamma}{dt} + k_{i\gamma} \int e_\gamma \, dt \\
P_3 &= k_{p\theta} e_\theta + k_{d\theta} \frac{de_\theta}{dt} + k_{i\theta} \int e_\theta \, dt \\
P_4 &= k_{p\varphi} e_\varphi + k_{d\varphi} \frac{de_\varphi}{dt} + k_{i\varphi} \int e_\varphi \, dt
\end{aligned} $$
Here, $k_{p\gamma}$, $k_{d\gamma}$, $k_{i\gamma}$, $k_{p\theta}$, $k_{d\theta}$, $k_{i\theta}$, $k_{p\varphi}$, $k_{d\varphi}$, and $k_{i\varphi}$ are nine PID algorithm parameters; $e_\gamma$, $e_\theta$, and $e_\varphi$ are the Euler angle errors for roll, pitch, and yaw, respectively.
| Controller | $k_p$ | $k_d$ | $k_i$ |
|---|---|---|---|
| Position (z) | 1.5 | 0.8 | 0.0 |
| Attitude (Roll) | 2.0 | 0.5 | 0.1 |
| Attitude (Pitch) | 2.0 | 0.5 | 0.1 |
| Attitude (Yaw) | 1.0 | 0.3 | 0.05 |
Simulation Analysis
To validate the stability of the flight control system for the quadrotor drone under both wind-free and wind-disturbed conditions, we constructed a simulation platform in MATLAB. The initial conditions for the quadrotor drone were set as follows: initial Euler angles (0, 0, 0) rad; initial Euler angular velocities (0, 0, 0) rad/s; initial position (0.1, 0.1, 1.0) m; and initial linear velocities (0, 0, 0) m/s. The desired flight position was (0, 0, 1.26) m. Wind disturbances were simulated using single-pulse square waves with an amplitude of 0.1 and pulse width of 4 s, applied at 30 s (north wind) and 60 s (east wind).
The simulation results demonstrate the effectiveness of the control system. Under wind-free conditions, the quadrotor drone successfully reached the target position within 20 s and maintained stable hover. When wind disturbances were introduced, the quadrotor drone experienced transient deviations in position, velocity, and attitude but recovered to the target state within approximately 10 s after each disturbance. This indicates that the control algorithm possesses robustness against external干扰, ensuring flight stability for the quadrotor drone.
| Condition | Settling Time (s) | Overshoot (%) | Steady-State Error (m) |
|---|---|---|---|
| No Wind | 20 | 5 | 0.01 |
| With Wind Disturbance | 30 (after disturbance) | 15 | 0.02 |
The position variations of the quadrotor drone along the ground coordinate system under both conditions highlight the system’s resilience. Initially, the quadrotor drone starts at (0.1, 0.1, 1.0) m and converges to (0, 0, 1.26) m. During wind disturbances, deviations occur in the x and y axes, but the quadrotor drone swiftly returns to the target. Similarly, velocity profiles show significant fluctuations during the initial 20 s, stabilizing near zero as the quadrotor drone achieves hover. Under wind干扰, velocity perturbations are observed but are damped out quickly. Attitude angle responses also reflect this behavior: angles stabilize at zero degrees under no wind, and after wind disturbances, they recover to zero within a short period.
These simulations confirm that the dual-loop PID control system designed for the quadrotor drone effectively manages nonlinearities and external干扰. The quadrotor drone’s ability to maintain stability in varied conditions underscores the practicality of this approach for engineering applications. Future work may explore adaptive or robust control techniques to further enhance the quadrotor drone’s performance in more turbulent environments.
Conclusion
In this study, we developed a comprehensive dynamic model for a quadrotor drone using the Newton-Euler formulation. Based on this model, we designed a dual-loop control system employing PID algorithms for both position and attitude control. Simulation analyses conducted in MATLAB demonstrated that the proposed control system for the quadrotor drone effectively suppresses wind disturbances and exhibits high flight stability. The results validate that the quadrotor drone control system meets design requirements for practical engineering applications, offering a reliable solution for stable flight operations. Continued refinement of control strategies will further advance the capabilities of quadrotor drones in complex scenarios.
