Advanced Modeling and Cascade PD Control for GPS-Based Quadrotor Drone Navigation

The widespread adoption of multi-rotor unmanned aerial vehicles (UAVs), coupled with the increasing maturity and miniaturization of Global Positioning System (GPS) technology, has made precise, autonomous navigation for small aircraft not only possible but a critical area of research and development. Among various configurations, the quadrotor drone stands out due to its mechanical simplicity and versatile flight capabilities, including roll, pitch, yaw, hover, and vertical take-off and landing. This research focuses on the development of a robust position tracking control system for a quadrotor drone utilizing GPS for localization. The core of the work involves establishing a comprehensive dynamic model based on Newton-Euler mechanics and implementing a cascade Proportional-Derivative (PD) control architecture. This control strategy is designed to enhance flight stability and tracking performance when the quadrotor drone is equipped with GPS, outperforming traditional PID approaches where integral gain can sometimes induce instability. The theoretical model is rigorously simulated in MATLAB/Simulink, and the efficacy of the proposed control law is subsequently validated through practical flight tests with a hardware platform centered on an ArduPilot Mega (APM) autopilot.

The fundamental flight mechanics of a quadrotor drone are governed by the precise variation of rotational speeds of its four motors. For this study, an “X” configuration is adopted due to its advantages in offering a better field of view for onboard payloads and more flexible movement. The simplified structure considers four rotors numbered 1 through 4, with rotors 1 and 2 rotating clockwise and rotors 3 and 4 rotating counter-clockwise. This opposing pairs configuration is essential to cancel out the reactive torque (yaw moment) generated during flight, allowing for controlled orientation. The primary forces and moments are generated as follows: the total thrust U1 is the sum of individual motor thrusts, while rolling moment Mx, pitching moment My, and yawing moment Mz arise from differential thrusts between motor pairs and the drag torque of the propellers.

To accurately describe the motion of the quadrotor drone in three-dimensional space, two coordinate systems are defined. The Earth-Fixed Inertial Frame E(O_E, X_E, Y_E, Z_E) is considered stationary, with its origin O_E at an arbitrary point on the ground, the Z_E-axis pointing vertically upwards, and the X_E and Y_E axes completing a right-handed system. The Body-Fixed Frame B(O_B, X_B, Y_B, Z_B) is attached to the center of mass of the quadrotor drone, with the Z_B-axis perpendicular to the plane of the rotors pointing upwards, and the X_B and Y_B axes aligned with the forward and right directions of the drone, respectively. The orientation of the body frame relative to the earth frame is described by three Euler angles: the roll angle φ (rotation about X_B), the pitch angle θ (rotation about Y_B), and the yaw angle ψ (rotation about Z_B). The standard aerospace rotation sequence (Z-Y-X, corresponding to yaw, pitch, roll) is used. The rotation matrix R_{B→E} that transforms a vector from the body frame to the earth frame is given by:

$$R_{B→E} = R_z(ψ) R_y(θ) R_x(φ)$$

Where the individual rotation matrices are:

$$R_x(φ) = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cosφ & -\sinφ \\ 0 & \sinφ & \cosφ \end{bmatrix}, \quad R_y(θ) = \begin{bmatrix} \cosθ & 0 & \sinθ \\ 0 & 1 & 0 \\ -\sinθ & 0 & \cosθ \end{bmatrix}, \quad R_z(ψ) = \begin{bmatrix} \cosψ & -\sinψ & 0 \\ \sinψ & \cosψ & 0 \\ 0 & 0 & 1 \end{bmatrix}$$

Therefore, the complete rotation matrix is:

$$R_{B→E} = \begin{bmatrix}
\cosθ\cosψ & \sinφ\sinθ\cosψ – \cosφ\sinψ & \cosφ\sinθ\cosψ + \sinφ\sinψ \\
\cosθ\sinψ & \sinφ\sinθ\sinψ + \cosφ\cosψ & \cosφ\sinθ\sinψ – \sinφ\cosψ \\
-\sinθ & \sinφ\cosθ & \cosφ\cosθ
\end{bmatrix}$$

The dynamic model of the quadrotor drone is derived using the Newton-Euler formalism. The translational dynamics in the earth frame are governed by Newton’s second law, where the sum of forces equals mass times acceleration. The forces include the gravitational force acting along the negative Z_E axis and the total thrust vector, which is always aligned with the body’s Z_B axis and must be rotated into the earth frame.

$$m \begin{bmatrix} \ddot{x} \\ \ddot{y} \\ \ddot{z} \end{bmatrix} = R_{B→E} \begin{bmatrix} 0 \\ 0 \\ U_1 \end{bmatrix} + \begin{bmatrix} 0 \\ 0 \\ -mg \end{bmatrix}$$

Expanding this and assuming the motor thrust F_i is proportional to the square of the motor’s rotational speed ω_i (F_i = C_T ω_i^2, where C_T is the thrust coefficient), we get the translational equations:

$$
\begin{aligned}
m\ddot{x} &= U_1 (\sinψ\sinφ + \cosψ\sinθ\cosφ) \\
m\ddot{y} &= U_1 (-\cosψ\sinφ + \sinψ\sinθ\cosφ) \\
m\ddot{z} &= U_1 (\cosθ\cosφ) – mg
\end{aligned}
$$

where U_1 = C_T (ω_1^2 + ω_2^2 + ω_3^2 + ω_4^2).

The rotational dynamics are derived from Euler’s rotation equation, which states that the net external moment M equals the time derivative of angular momentum. Under the assumption of a rigid body and symmetric structure (J_{xy} = J_{xz} = J_{yz} = 0), the equations simplify. The moments acting on the quadrotor drone are generated by differential thrust and propeller drag. Defining d as the distance from the center of mass to a motor, and C_M as the drag torque coefficient (Q_i = C_M ω_i^2), the moments are:

$$
\begin{aligned}
M_x &= d C_T (ω_4^2 – ω_2^2) \\
M_y &= d C_T (ω_3^2 – ω_1^2) \\
M_z &= C_M (ω_2^2 + ω_4^2 – ω_1^2 – ω_3^2)
\end{aligned}
$$

The rotational dynamics become:

$$
\begin{aligned}
J_{xx}\ddot{φ} &= \dot{θ}\dot{ψ}(J_{yy} – J_{zz}) + d C_T (ω_4^2 – ω_2^2) \\
J_{yy}\ddot{θ} &= \dot{φ}\dot{ψ}(J_{zz} – J_{xx}) + d C_T (ω_3^2 – ω_1^2) \\
J_{zz}\ddot{ψ} &= \dot{φ}\dot{θ}(J_{xx} – J_{yy}) + C_M (ω_2^2 + ω_4^2 – ω_1^2 – ω_3^2)
\end{aligned}
$$

These six equations (three translational, three rotational) constitute the complete nonlinear dynamic model of the quadrotor drone. For control design, it’s useful to recognize that the system is underactuated: there are only four control inputs (U_1, M_x, M_y, M_z) derived from the four motor speeds, but six degrees of freedom (position x, y, z and orientation φ, θ, ψ). This implies that the desired position (x, y, z) cannot be commanded directly but must be achieved by controlling the attitude angles φ and θ to generate the required horizontal acceleration.

Table 1: Summary of Quadrotor Drone Model Symbols and Parameters
Symbol Description Typical Unit
x, y, z Position in Earth Frame m
φ, θ, ψ Roll, Pitch, Yaw Euler Angles rad
U1 Total Thrust N
Mx, My, Mz Roll, Pitch, Yaw Moments N·m
ω1-4 Motor Rotational Speeds rad/s
m Mass of Quadrotor Drone kg
g Gravitational Acceleration m/s²
Jxx, Jyy, Jzz Moments of Inertia kg·m²
d Distance from CoG to Motor m
CT Thrust Coefficient N/(rad/s)²
CM Drag Torque Coefficient N·m/(rad/s)²

The control objective for the autonomous quadrotor drone is to track a desired trajectory defined in the earth frame, (x_d(t), y_d(t), z_d(t), ψ_d(t)). A hierarchical, or cascade, control structure is employed to manage the underactuation. This structure consists of an outer position control loop and an inner attitude control loop. The outer loop takes position and velocity errors and computes desired roll and pitch angles (φ_d, θ_d) and the total thrust U_1. The inner loop takes these desired angles and the desired yaw ψ_d and computes the required moments (M_x, M_y, M_z) to achieve them. This strategy effectively decouples the position and attitude control problems.

A Proportional-Derivative (PD) controller is implemented in a cascade manner for both loops. The cascade PD controller was chosen over a full PID for its superior stability characteristics in this application. The integral term in a PID, while useful for eliminating steady-state error, can introduce phase lag and windup issues in the highly dynamic and nonlinear system of a quadrotor drone, potentially leading to oscillations or instability. The PD controller provides responsive and damped control action.

The control laws are as follows. For the outer (position) loop, the desired thrust and attitude commands are generated:

$$
\begin{aligned}
e_z &= z_d – z \\
U_1 &= \frac{m (g + \ddot{z}_d + K_{p,z} e_z + K_{d,z} \dot{e}_z)}{\cosφ\cosθ} \quad \text{(Approximated for small angles)} \\
\\
e_x &= x_d – x \\
\theta_d &= \arcsin\left( \frac{m (\ddot{x}_d + K_{p,x} e_x + K_{d,x} \dot{e}_x)}{U_1} \right) \quad \text{(Simplified relation)} \\
\\
e_y &= y_d – y \\
φ_d &= \arcsin\left( \frac{m (\ddot{y}_d + K_{p,y} e_y + K_{d,y} \dot{e}_y)}{U_1} \right) \quad \text{(Simplified relation)}
\end{aligned}
$$

In practice, for a more robust and coupled calculation that avoids singularities, the desired thrust vector in the horizontal plane is computed, from which φ_d and θ_d are derived. For the inner (attitude) loop, the desired moments are computed using PD control on the angle errors:

$$
\begin{aligned}
e_φ &= φ_d – φ, \quad e_θ = θ_d – θ, \quad e_ψ = ψ_d – ψ \\
M_x &= J_{xx} (\ddot{φ}_d + K_{p,φ} e_φ + K_{d,φ} \dot{e}_φ) \\
M_y &= J_{yy} (\ddot{θ}_d + K_{p,θ} e_θ + K_{d,θ} \dot{e}_θ) \\
M_z &= J_{zz} (\ddot{ψ}_d + K_{p,ψ} e_ψ + K_{d,ψ} \dot{e}_ψ)
\end{aligned}
$$

Finally, the four motor speed commands ω_1, ω_2, ω_3, ω_4 are obtained by inverting the relationship between the control inputs [U_1, M_x, M_y, M_z]^T and the squared motor speeds. This is done via a mixing matrix:

$$
\begin{bmatrix}
\omega_1^2 \\ \omega_2^2 \\ \omega_3^2 \\ \omega_4^2
\end{bmatrix}
=
\begin{bmatrix}
C_T & 0 & -d C_T & -C_M \\
C_T & -d C_T & 0 & C_M \\
C_T & 0 & d C_T & -C_M \\
C_T & d C_T & 0 & C_M
\end{bmatrix}^{-1}
\begin{bmatrix}
U_1 \\ M_x \\ M_y \\ M_z
\end{bmatrix}
$$

The complete dynamic model and the cascade PD control algorithm were implemented in MATLAB/Simulink for verification. The simulation environment integrated the nonlinear Newton-Euler equations, the PD controllers for the inner and outer loops, and the motor mixing logic. The model parameters, such as mass m=1.2 kg, inertia, arm length d=0.225 m, and aerodynamic coefficients (C_T = 1.116e-5 N/(rad/s)^2, C_M = 1.474e-7 Nm/(rad/s)^2), were based on a typical small-scale quadrotor drone frame. The controller gains were tuned iteratively to achieve a stable and responsive flight performance.

Simulations were run with various desired trajectories, including step changes in position and complex 3D paths. A key test involved commanding the quadrotor drone to take off, hover at a specific 3D coordinate, and then follow a rectangular path. The results demonstrated that the cascade PD controller successfully stabilized the quadrotor drone and enabled it to track the reference trajectory. The plots showed smooth convergence of the actual position (x, y, z) to the desired values. The attitude angles (φ, θ, ψ) remained bounded and followed the commands generated by the outer loop. Critically, the absence of an integral term prevented the low-frequency oscillations sometimes observed with PID controllers, leading to a more settled hover and crisper response to setpoint changes.

A quadrotor drone in flight

The transition from simulation to real-world implementation required a reliable hardware platform. The core of the flight control system was an APM 2.8 autopilot board, which is built around an ATmega2560 microcontroller. This open-source platform was chosen for its flexibility, extensive sensor suite, and mature software ecosystem. The key sensors integrated into the APM for state estimation include: a six-axis MPU6000 Inertial Measurement Unit (IMU) providing 3-axis gyroscope and 3-axis accelerometer data; an MS5611 barometer for altitude estimation via atmospheric pressure; and an HMC5883L 3-axis magnetometer acting as a compass for heading. For global positioning, a U-blox M8N GPS module was connected, providing latitude, longitude, altitude, and velocity data. The fusion of these sensor data streams via an Extended Kalman Filter (EKF) onboard the APM yields a robust estimate of the quadrotor drone’s position, velocity, and attitude.

The physical quadrotor drone was built on an F450 frame, equipped with 920KV brushless DC motors, 30A electronic speed controllers (ESCs), 10×4.5-inch propellers, and a 5000mAh 3S Lithium-Polymer battery. A telemetry radio module (3DR Radio) established a communication link between the APM and a ground control station (GCS) laptop running Mission Planner software. The cascade PD control algorithm was translated into custom firmware modifications for the APM, allowing it to override or supplement the default PID controllers.

Table 2: Primary Hardware Components of the Quadrotor Drone Test Platform
Component Model/Specification Primary Function
Flight Controller APM 2.8 (ArduPilot) Sensor fusion, control law execution
GPS Module U-blox Neo-M8N Global positioning and velocity
Frame DJI F450 Mechanical structure
Motors 920KV Brushless DC Generate thrust
Electronic Speed Controllers 30A Control motor speed
Propellers 10×4.5 inch Generate aerodynamic lift
Battery 5000mAh 3S LiPo Power supply
Telemetry 3DR Radio 433MHz Ground communication

Before flight testing, a comprehensive calibration and setup procedure was conducted using the Mission Planner GCS. This included: uploading the custom firmware; performing accelerometer calibration to define the level reference; calibrating the compass to account for local magnetic declination and hard-iron interference from the vehicle itself; calibrating the radio control transmitter to map stick inputs to correct channels and ranges; and configuring flight modes. For these tests, three primary modes were used: Stabilize (manual attitude control with self-leveling), Loiter (automatic GPS-based position and altitude hold), and RTL (Return-To-Launch, an autonomous mode to fly back to the takeoff point). The ESC calibration was also performed to ensure all motors responded correctly to throttle signals.

Outdoor flight tests were conducted in an open field under calm wind conditions. The test procedure began with taking off in Stabilize mode. Once at a safe altitude (approximately 10 meters), the mode was switched to Loiter. In this mode, the quadrotor drone’s onboard controller, running the cascade PD algorithm, used GPS and barometer data to maintain its current position. The stability of the hover was visibly excellent, with minimal drift. The ground station software displayed real-time data, including position, attitude, and velocities, which showed smooth and stable values. Following successful hover tests, waypoint missions were created. The quadrotor drone was commanded to fly to a series of GPS coordinates, forming a planned trajectory. It successfully navigated to each waypoint and held position at each one before proceeding. Finally, engaging RTL mode commanded the drone to autonomously return and land near its takeoff point.

The data logged during the flights were analyzed and compared against the simulation results and also against flights conducted with the default PID controller. The cascade PD controller demonstrated a clear advantage in handling the integration of GPS data. The position hold in Loiter mode was tighter, with reduced “hunting” or slow oscillations around the setpoint. The response to step changes in position during waypoint navigation was more damped and predictable. The absence of integral windup was particularly beneficial when the quadrotor drone encountered minor disturbances like light gusts.

Table 3: Qualitative Comparison of Controller Performance for the Quadrotor Drone
Performance Metric Traditional PID Controller Cascade PD Controller
Position Hold Stability (GPS) Moderate, some low-frequency oscillation High, minimal oscillation, settled hover
Response to Setpoint Change Sometimes overshoot, slower settling Well-damped, faster settling
Disturbance Rejection Good, but can lead to integral windup Good, robust without windup
Ease of Tuning More complex (3 parameters per loop) Simpler (2 parameters per loop)
Simulation vs. Reality Gap Larger, model inaccuracies affect I-term Smaller, more robust to model errors

This work successfully demonstrates a complete pipeline for the modeling, simulation, and implementation of a GPS-based position tracking control system for a quadrotor drone. The nonlinear Newton-Euler model accurately captures the dynamics of the system. The proposed cascade PD control architecture proves to be an effective and robust solution, offering improved stability and performance over traditional PID control, particularly for the critical task of integrating GPS-derived position feedback for autonomous flight. The hierarchical structure logically separates the position and attitude control problems, while the PD law provides the necessary active damping without the destabilizing effects of an integral term in this fast-paced, nonlinear application. The practical validation on an APM-based hardware platform confirms the feasibility and effectiveness of the approach, enabling stable hover and accurate trajectory following for the quadrotor drone.

Future work could focus on several enhancements. Firstly, adaptive or gain-scheduling techniques could be integrated into the cascade PD controller to maintain optimal performance across different flight regimes (e.g., aggressive vs. gentle maneuvering) or under varying mass conditions (e.g., with payload). Secondly, more advanced control strategies like Sliding Mode Control (SMC) or Model Predictive Control (MPC) could be explored to explicitly handle system nonlinearities and constraints. Thirdly, integrating additional sensors like optical flow or downward-facing cameras could augment or provide backup to GPS in environments where satellite signals are degraded or unavailable, improving the robustness of the quadrotor drone’s navigation system. Finally, formal stability analysis and robustness guarantees for the closed-loop system under the cascade PD control would strengthen the theoretical foundation of the approach.

Scroll to Top