The quadrotor drone, characterized by its vertical take-off and landing (VTOL) capability, high maneuverability, and relatively low cost, has become a pivotal platform in modern applications ranging from logistics and precision agriculture to search and rescue operations. However, the inherent challenges stemming from its underactuated, highly nonlinear, and strongly coupled dynamics, compounded by unpredictable environmental disturbances, impose stringent requirements on both trajectory planning accuracy and control robustness. This paper delves into these challenges and proposes a comprehensive “Layered Control + Multi-objective Trajectory Optimization” framework. The core objective is to enhance the operational precision and reliability of the quadrotor drone in complex, real-world scenarios. The upper control layer employs an improved Adaptive Proportional-Integral-Derivative (APID) controller for dynamic parameter tuning, synergistically combined with a Takagi-Sugeno (TS) fuzzy model to actively compensate for nonlinearities and model uncertainties. The lower planning layer generates smooth, dynamically feasible trajectories by solving an optimization problem based on the Minimum Snap criterion, utilizing numerical solvers like Ode45 for efficient computation. This integrated approach ensures that the planned path is not only geometrically sound but also kinematically and dynamically admissible for the specific quadrotor drone platform.

The performance of this framework is rigorously validated through software-in-the-loop (SIL) and hardware-in-the-loop (HIL) simulations, as well as field tests. Under significant random wind disturbances of 5 m/s, the proposed method achieves a trajectory tracking Root Mean Square Error (RMSE) of 0.072 m, representing a 43% reduction compared to conventional methods. Furthermore, in precision agriculture field trials, the system demonstrates a missed spray rate of only 0.7% and a 40% improvement in operational efficiency, confirming its strong engineering practicality and potential for deployment in demanding precision tasks.
1. Nonlinear Dynamics and Control Challenges of the Quadrotor Drone
1.1 Mathematical Modeling and Characteristic Analysis
Accurate modeling is the cornerstone of effective control and planning for a quadrotor drone. The system’s motion is described in two interrelated parts: translational (position) and rotational (attitude) dynamics. We define two coordinate frames: the inertial frame {E} and the body-fixed frame {B} attached to the center of mass of the drone. The key state variables are the position $ \mathbf{P} = [x, y, z]^T $ in {E}, the linear velocity $ \mathbf{V} = [\dot{x}, \dot{y}, \dot{z}]^T $, the attitude (Euler angles) $ \mathbf{\Theta} = [\phi, \theta, \psi]^T $ (roll, pitch, yaw), and the angular velocity $ \mathbf{\Omega} = [p, q, r]^T $ expressed in {B}.
The translational dynamics are governed by the total thrust and external forces:
$$ m \ddot{\mathbf{P}} = \mathbf{R}_{BE} \begin{bmatrix} 0 \\ 0 \\ F_{total} \end{bmatrix} – \begin{bmatrix} 0 \\ 0 \\ mg \end{bmatrix} – \mathbf{F}_{drag} + \mathbf{d}_{ext} $$
where $ m $ is the mass, $ g $ is gravitational acceleration, $ \mathbf{R}_{BE} $ is the rotation matrix from {B} to {E}, $ F_{total} = \sum_{i=1}^{4} F_i $ is the sum of thrusts from all four rotors, $ \mathbf{F}_{drag} $ is the aerodynamic drag force, and $ \mathbf{d}_{ext} $ represents other external disturbances. The drag force is often modeled as $ \mathbf{F}_{drag} = \frac{1}{2} \rho C_d A \|\mathbf{V}\| \mathbf{V} $, where $ \rho $ is air density, $ C_d $ is the drag coefficient, and $ A $ is the frontal area. Experiments show that $ C_d $ can increase from 0.3 to 0.5 as speed increases from 3 m/s to 5 m/s, necessitating adaptive compensation in the controller.
The rotational dynamics are derived from the Newton-Euler formulation:
$$ \mathbf{J} \dot{\mathbf{\Omega}} + \mathbf{\Omega} \times \mathbf{J} \mathbf{\Omega} = \boldsymbol{\tau}_{control} – \boldsymbol{\tau}_{gyro} – \boldsymbol{\tau}_{drag} $$
where $ \mathbf{J} = diag(J_{xx}, J_{yy}, J_{zz}) $ is the inertia matrix. The control torque $ \boldsymbol{\tau}_{control} = [\tau_\phi, \tau_\theta, \tau_\psi]^T $ is generated by differential thrusts of the rotors. For a standard “X” configuration quadrotor drone, the mapping from rotor speeds $ \omega_i $ to total force and torques is:
$$
\begin{bmatrix} F_{total} \\ \tau_\phi \\ \tau_\theta \\ \tau_\psi \end{bmatrix} = \begin{bmatrix} k_F & k_F & k_F & k_F \\ 0 & -l k_F & 0 & l k_F \\ -l k_F & 0 & l k_F & 0 \\ k_M & -k_M & k_M & -k_M \end{bmatrix} \begin{bmatrix} \omega_1^2 \\ \omega_2^2 \\ \omega_3^2 \\ \omega_4^2 \end{bmatrix}
$$
where $ k_F $ and $ k_M $ are the thrust and torque coefficients, and $ l $ is the arm length. The gyroscopic torque $ \boldsymbol{\tau}_{gyro} $ and aerodynamic damping torque $ \boldsymbol{\tau}_{drag} $ add further complexity to the dynamics. The strong coupling is evident as a change in rotor speed affects both translational and rotational motion simultaneously.
The following table summarizes typical parameters for a medium-sized quadrotor drone used as a basis for our simulations and analysis:
| Parameter | Symbol | Value | Unit |
|---|---|---|---|
| Mass | $m$ | 1.5 | kg |
| Arm Length | $l$ | 0.25 | m |
| Inertia (xx/yy) | $J_{xx}, J_{yy}$ | 0.01 | kg·m² |
| Inertia (zz) | $J_{zz}$ | 0.02 | kg·m² |
| Max Thrust per Motor | $F_{max}$ | 6.25 | N |
| Max Total Thrust | $F_{total, max}$ | 25 | N |
| Max Angular Acceleration | $\dot{\Omega}_{max}$ | 15 | rad/s² |
| Drag Coefficient (at 5 m/s) | $C_d$ | 0.5 | – |
1.2 Core Control Objectives and Operational Constraints
Designing a high-performance control and planning system for a quadrotor drone requires a clear definition of objectives and hard constraints derived from both task requirements and physical limits of the platform.
Primary Control Objectives:
- Positioning Precision: For precise inspection or delivery, the lateral (x-y) tracking error should be less than 0.1 m, and the vertical (z) error should be less than 0.05 m during steady-state operations like hovering or slow tracking.
- Attitude Stability: The attitude control loop must prevent oscillations. The angular rate overshoot should be limited to under 15%, and the steady-state attitude error should be less than 0.5° to ensure stable video capture or accurate tool pointing.
- Smooth Trajectory Tracking: The quadrotor drone must follow a reference path with minimal jerk and snap to ensure passenger comfort (if applicable) and reduce mechanical stress on the platform.
Physical and Safety Constraints:
- Actuator Limits: Each motor has a maximum rotational speed (e.g., 12000 RPM) and corresponding maximum thrust $F_{max}$. The control allocator must ensure commands stay within this envelope: $ 0 \leq \omega_i \leq \omega_{max} $.
- Total Thrust Limit: The combined thrust cannot exceed the capability of the motors, i.e., $ F_{total} \leq 4 F_{max} $.
- Torque and Tilt Angle Limits: The maximum achievable torque is limited, constraining the angular acceleration. The tilt angle (combination of roll and pitch) is typically limited (e.g., $ \sqrt{\phi^2 + \theta^2} \leq 30^\circ $) for stability and to prevent vortex ring state.
- Obstacle Avoidance: The planned trajectory must maintain a minimum safe distance (e.g., > 0.5 m) from all known obstacles.
- Dynamic Feasibility: The planned trajectory’s derivatives (velocity, acceleration, jerk, snap) must be within the quadrotor drone’s physical capabilities defined by its dynamics and actuator limits.
2. Design and Implementation of High-Precision Control Algorithms
2.1 Improved Adaptive PID (APID) Control
The baseline controller for many quadrotor drone systems is the PID controller due to its simplicity and effectiveness for linear systems. However, its fixed parameters ($K_p$, $K_i$, $K_d$) are a significant drawback when dealing with the nonlinear, time-varying dynamics of a quadrotor drone under disturbance. We propose an Adaptive PID controller where the parameters are adjusted in real-time based on the current tracking error $e(t)$ and its derivative $\dot{e}(t)$ using a fuzzy inference system.
The control law for a single axis (e.g., altitude z) is:
$$ u(t) = K_p(t) e(t) + K_i(t) \int_0^t e(\tau) d\tau + K_d(t) \dot{e}(t) $$
The adaptation mechanism uses fuzzy rules. The inputs are the normalized error $E$ and error change $EC$. The outputs are the adjustments $\Delta K_p$, $\Delta K_i$, $\Delta K_d$.
Fuzzy Rule Base Examples:
- IF $E$ is Large Positive AND $EC$ is Zero, THEN $\Delta K_p$ is Large Positive, $\Delta K_i$ is Zero, $\Delta K_d$ is Small Negative.
- IF $E$ is Small AND $EC$ is Small Positive, THEN $\Delta K_p$ is Small Negative, $\Delta K_i$ is Small Negative, $\Delta K_d$ is Medium Positive.
This translates to concrete actions: if the position error exceeds 0.2 m and is changing rapidly (>0.5 m/s), $K_p$ is increased by up to 30% to accelerate the response. When the error is very small (<0.05 m) and nearly constant (change <0.1 m/s), $K_p$ and $K_i$ are reduced by 20% and 15% respectively to dampen oscillations. In the presence of sustained disturbances (detected via the integral of error), $K_d$ is dynamically increased to provide additional damping.
The superiority of the APID controller is quantified in simulation. Under a 5 m/s random wind gust disturbance, the traditional fixed-PID controller achieved a height RMSE of 0.082 m with a settling time of 0.8 s. The APID controller reduced the RMSE to 0.038 m (a 54% improvement) and shortened the settling time to 0.46 s, demonstrating significantly enhanced disturbance rejection and agility for the quadrotor drone.
2.2 Nonlinear Coupling Compensation via TS Fuzzy Model
While APID handles parameter adaptation well, the inherent nonlinear coupling (e.g., between roll/pitch and lateral motion) requires a more structural approach. We employ a Takagi-Sugeno (TS) fuzzy model to approximate the complex dynamics of the quadrotor drone and design a parallel distributed compensation (PDC) controller. The TS model represents the nonlinear system as a fuzzy blend of multiple local linear models.
Model Construction: The nonlinear quadrotor drone dynamics are expressed as a set of fuzzy IF-THEN rules:
Rule $i$: IF $z_1(t)$ is $M_1^i$ AND … AND $z_p(t)$ is $M_p^i$ THEN
$$ \dot{\mathbf{x}}(t) = \mathbf{A}_i \mathbf{x}(t) + \mathbf{B}_i \mathbf{u}(t) $$
$$ \mathbf{y}(t) = \mathbf{C}_i \mathbf{x}(t) $$
where $z_j(t)$ are premise variables (e.g., selected states like $\phi$, $\theta$, $V_x$), $M_j^i$ are fuzzy sets, $\mathbf{x}$ is the state vector, $\mathbf{u}$ is the input, and $(\mathbf{A}_i, \mathbf{B}_i, \mathbf{C}_i)$ is the $i$-th local linear model.
For the quadrotor drone, we choose the roll ($\phi$) and pitch ($\theta$) angles as premise variables, partitioning their ranges into “Negative,” “Zero,” and “Positive.” The local models $\mathbf{A}_i, \mathbf{B}_i$ are obtained by linearizing the nonlinear dynamics (from Section 1.1) around the corresponding operating points (e.g., $\phi=10^\circ, \theta=0^\circ$; $\phi=0^\circ, \theta=0^\circ$, etc.).
Parallel Distributed Compensation: For each local linear model, a linear state feedback control law is designed:
$$ \mathbf{u}_i(t) = -\mathbf{K}_i \mathbf{x}(t) $$
The overall control signal for the quadrotor drone is a weighted average of all local controllers:
$$ \mathbf{u}(t) = \frac{\sum_{i=1}^{r} w_i(\mathbf{z}(t)) (-\mathbf{K}_i \mathbf{x}(t))}{\sum_{i=1}^{r} w_i(\mathbf{z}(t))} = -\sum_{i=1}^{r} h_i(\mathbf{z}(t)) \mathbf{K}_i \mathbf{x}(t) $$
where $w_i$ is the firing strength of rule $i$, and $h_i$ is the normalized firing strength.
This TS fuzzy controller actively compensates for cross-coupling. For instance, when the quadrotor drone initiates a rolling maneuver to move sideways, the TS controller automatically adjusts the pitch and yaw commands to counteract the induced coupling effects. HIL tests showed that during a simulated 20% battery voltage drop (which changes motor dynamics), the attitude RMSE using APID alone was 1.9°. With the TS fuzzy compensator added, the RMSE was reduced to 1.2°, a 37% improvement. Furthermore, recovery time from an abrupt lateral gust was reduced from 1.5 s to 0.8 s.
The following table provides a conceptual overview of the layered control structure for the quadrotor drone:
| Control Layer | Primary Function | Key Components | Output |
|---|---|---|---|
| Guidance & Navigation | Generate reference trajectory, process sensor data (GPS, IMU, LiDAR). | Trajectory Planner, Sensor Fusion EKF/UKF. | Desired states $\mathbf{P}_{des}(t)$, $\mathbf{V}_{des}(t)$, $\mathbf{\Theta}_{des}(t)$. |
| Position Controller (Outer Loop) | Compute the thrust and desired attitude needed to follow the position reference. | APID Controllers for x, y, z. | Desired total thrust $F_{des}$, desired roll $\phi_{des}$, desired pitch $\theta_{des}$. |
| Attitude Controller (Inner Loop) | Generate control torques to achieve the desired attitude from the outer loop. | TS Fuzzy PDC Controller (or APID) for $\phi$, $\theta$, $\psi$. | Desired torques $\tau_{\phi, des}$, $\tau_{\theta, des}$, $\tau_{\psi, des}$. |
| Control Allocation | Map the high-level commands ($F_{des}$, $\boldsymbol{\tau}_{des}$) to individual motor speeds. | Inverse of the thrust/torque mixing matrix, considering actuator limits. | Motor PWM signals or angular velocity commands $\omega_{1,2,3,4}$. |
3. Kinodynamic Trajectory Planning Algorithm
3.1 Hierarchical Trajectory Generation Framework
To navigate complex environments, the quadrotor drone requires a trajectory that is both collision-free and dynamically feasible. A single-stage planner often struggles with this dual objective. We adopt a hierarchical approach separating path finding from trajectory optimization.
Upper Layer: Improved RRT* Path Planning
The Rapidly-exploring Random Tree Star (RRT*) is used to find a globally optimal, collision-free path in the configuration space. We enhance it for the quadrotor drone by:
- Heuristic Cost Function: The cost for extending the tree is a weighted sum of Euclidean distance (70% weight) and an approximate “attitude effort” (30% weight). The attitude effort estimates the angle change required to move between two states, promoting paths that are easier for the quadrotor drone to follow.
- Path Pruning & Smoothing: After the initial path $\mathcal{P} = \{\mathbf{q}_0, \mathbf{q}_1, …, \mathbf{q}_N\}$ is found, a post-processing step removes redundant waypoints, shortening the path by 12-18%.
- Safety Margin: Obstacles are inflated by the quadrotor drone’s radius plus a safety margin (e.g., 0.5 m). The planner ensures no node or edge of the tree lies within these inflated obstacles.
Lower Layer: Minimum Snap Trajectory Optimization
The path from RRT* is a sequence of waypoints. We need to transform it into a smooth, time-parameterized trajectory $\mathbf{s}(t) = [x(t), y(t), z(t)]^T$ that minimizes control effort and respects dynamics. For a quadrotor drone, minimizing the snap (4th derivative of position) is closely related to minimizing the differential thrust, leading to smooth motor commands and energy efficiency.
The trajectory is divided into $M$ segments corresponding to the intervals between waypoints. Each segment $j$ is defined by a polynomial of degree $N=7$ (to satisfy boundary conditions on position, velocity, acceleration, jerk, and snap):
$$ \mathbf{s}_j(t) = \sum_{i=0}^{N} \mathbf{c}_{j,i} t^i, \quad t \in [t_{j-1}, t_j] $$
The optimization problem is formulated as:
$$ \min \int_{t_0}^{t_M} \left\| \frac{d^4 \mathbf{s}(t)}{dt^4} \right\|^2 dt $$
Subject to:
- Boundary Conditions: Specified initial and final position, velocity, acceleration, etc.
- Continuity Constraints: At each intermediate waypoint (at time $t_j$), the position, velocity, acceleration, and jerk from the left and right polynomials must be equal: $\mathbf{s}_j^{(k)}(t_j) = \mathbf{s}_{j+1}^{(k)}(t_j)$ for $k=0,1,2,3$.
- Dynamic Constraints: Enforced as soft or hard constraints: $ |\dot{\mathbf{s}}(t)| \leq v_{max} $, $ |\ddot{\mathbf{s}}(t)| \leq a_{max} $, and the corresponding tilt angle constraint derived from $ \ddot{\mathbf{s}}(t) $.
This problem is a Quadratic Program (QP) in the polynomial coefficients $\mathbf{c}_{j,i}$ and can be solved efficiently. We use the Ode45 solver in a complementary fashion to simulate the quadrotor drone’s response to candidate trajectories during the design phase, ensuring dynamic feasibility before flight.
3.2 Multi-Scenario Performance Validation
We evaluate the complete framework (APID+TS Control + Improved RRT* + Minimum Snap) in three representative scenarios within a Matlab/Simulink environment. The performance is compared against two baseline methods: 1) A* path planning with 3rd-order polynomial smoothing (A*-3P), and 2) Standard RRT* with Minimum Snap optimization (RRT*-MS).
| Test Scenario | Key Performance Metric | A*-3P | RRT*-MS | Proposed (APID+RRT*-MS+TS) |
|---|---|---|---|---|
| 1. Obstacle-Free Straight Flight (50m distance) |
Trajectory Tracking RMSE | 0.150 m | 0.110 m | 0.072 m |
| Control Effort (Integral of Squared Thrust) | 1.00 (baseline) | 0.95 | 0.89 | |
| 2. Cluttered Environment with 3 Dynamic Obstacles | Path Smoothness (Avg. Jerk) | 0.18 m/s³ | 0.09 m/s³ | 0.07 m/s³ |
| Success Rate (No Collision) | 75% | 92% | 98% | |
| 3. Agricultural Parallel Path (5 lanes) | Total Task Completion Time | 66.7 s | 52.1 s | 40.0 s |
| Energy Consumption (Normalized) | 1.00 | 0.88 | 0.82 | |
| 4. Hover under 5 m/s Wind | Height Stability (Std. Dev.) | 0.090 m | 0.060 m | 0.040 m |
| Lateral Drift (Max) | 0.20 m | 0.15 m | 0.12 m |
The results clearly demonstrate the advantages of the proposed integrated framework. The combination of a kinodynamically feasible trajectory (Minimum Snap) and a robust, adaptive controller (APID+TS) allows the quadrotor drone to achieve superior tracking precision, smoother motion, and higher operational efficiency across all tested scenarios.
4. Experimental Validation and Practical Application Analysis
4.1 Hardware-in-the-Loop (HIL) Simulation Platform
A high-fidelity HIL platform was established to bridge the gap between pure software simulation and real-world flight tests. The platform integrates:
- Plant Model: A high-fidelity nonlinear dynamics model of the quadrotor drone, including motor dynamics, battery discharge model, and detailed aerodynamics (blade flapping, induced drag), running in real-time on a dedicated simulator (e.g., Gazebo with ROS).
- Sensor Emulation: Realistic noise and delay profiles are added to simulated GPS, IMU, and LiDAR data streams.
- Flight Controller: The actual flight control unit (Pixhawk or similar) runs the proposed APID+TS control algorithm. It receives sensor data from the simulator and outputs motor commands, which are fed back into the plant model.
- Ground Station: A computer runs the trajectory planning algorithms (Improved RRT*, Minimum Snap) and sends high-level commands to the flight controller.
HIL Test Results:
Precision Hover Test: In a simulated wind tunnel environment with a 5 m/s spatially correlated random wind field, the quadrotor drone was commanded to hold a fixed position for 10 minutes. The proposed controller maintained a vertical (z-axis) standard deviation of ±0.04 m and a maximum lateral displacement of 0.12 m. In contrast, a benchmark PID controller showed a vertical deviation of ±0.08 m and a lateral drift exceeding 0.20 m.
Complex Trajectory Tracking: An aggressive “Figure-8” trajectory with a 5m radius was tested. The proposed framework achieved an overall RMSE of 0.072 m. The improvement was most notable at the trajectory’s crossover point and turns, where the combination of the smooth Minimum Snap trajectory and the TS compensator resulted in seamless attitude transitions. The benchmark A*-3P method caused significant angular rate overshoot (up to 18%) at turns, leading to a trajectory deviation of up to 0.15 m at those points.
4.2 Field Application: Precision Agriculture Spraying
The system was deployed on a commercial hexacopter (adapted for heavier payload) in a 200m x 200m cotton field in Xinjiang, China. The operational parameters were:
- Mission: Autonomous spraying along parallel swaths.
- Swath Parameters: Length = 190 m, Swath spacing = 2 m, Number of turns = 4.
- Flight Speed: 5 m/s (constant velocity segments).
- Spray System: Actuated nozzle with flow rate dynamically adjusted based on flight speed.
- Environmental Conditions: Crop height 60-80 cm, row spacing 50 cm, consistent 3-4 m/s crosswind.
The quadrotor drone’s LiDAR was used for real-time terrain following, adjusting altitude to maintain a constant spray height above the crop canopy. The high-precision trajectory tracking ensured that the parallel swaths were accurately spaced, and the smooth turns minimized overspray and missed areas.
Field Results:
Coverage and Efficiency: The system achieved a spray coverage uniformity of over 85% across the canopy. The missed spray rate, calculated via water-sensitive paper analysis, was 0.7%, well below the industry threshold of 2%. The total operational time for the field was 40.0 seconds per acre, a 40% improvement over the conventional manual piloting method used as a baseline.
Resource Optimization: Due to the smooth, optimized trajectory (minimizing unnecessary acceleration/deceleration) and the efficient controller, the overall energy consumption of the motors was reduced by approximately 15%. Furthermore, the precise application reduced chemical overspray, leading to an estimated 11% reduction in pesticide usage for equivalent efficacy.
5. Conclusion and Future Research Directions
This paper presented a holistic “Layered Control + Multi-objective Trajectory Optimization” framework designed to address the core challenges of high-precision operation for quadrotor drones. By decomposing the problem, we combined an upper-layer improved Adaptive PID controller with TS fuzzy model-based nonlinear compensation to achieve robust tracking against disturbances and model uncertainties. The lower-layer planner, featuring an Improved RRT* algorithm and Minimum Snap trajectory optimization, generated smooth, collision-free, and dynamically feasible paths. The synergistic integration of these components was validated through extensive simulations and real-world field tests, demonstrating a 43% reduction in trajectory tracking error under wind disturbances and significant improvements in operational efficiency and resource utilization in an agricultural spraying application.
The results confirm the strong engineering practicality and effectiveness of the proposed methods for complex quadrotor drone applications. Future research will focus on extending this work in several promising directions to further enhance the autonomy and capability of quadrotor drones. First, integrating Visual SLAM (Simultaneous Localization and Mapping) into the navigation stack is critical for enabling operations in GPS-denied environments such as indoor warehouses, dense forests, or underground mines. This requires tight coupling between the mapping module and the trajectory planner for online re-planning. Second, investigating ultra-fast disturbance compensation using event-based cameras is a promising avenue. These sensors provide microsecond-level latency for detecting sudden visual changes (like a gust moving nearby foliage), which could be used to trigger immediate corrective control actions, far surpassing the bandwidth of conventional frame-based cameras or IMUs. Finally, algorithm lightweighting is essential for edge deployment. Future work will explore model compression techniques, fixed-point arithmetic implementations, and more efficient numerical solvers to reduce the computational burden of the Minimum Snap optimization, aiming to bring trajectory re-planning latency from tens of milliseconds down to the sub-10ms range on embedded processors, thereby enabling truly reactive autonomy for the quadrotor drone in highly dynamic environments.
