Hierarchical Deep Reinforcement Learning for Six-DOF Fixed-Wing Drone Path Following

In this work, we present a comprehensive study on path following for six-degree-of-freedom (DOF) fixed-wing drones using a novel hierarchical deep reinforcement learning framework. The fixed-wing drone is a nonlinear, nonholonomic system characterized by high-dimensional continuous state and action spaces, making traditional control and guidance methods challenging. Our approach decomposes the path following problem into two sub-problems: a low-level control problem and a high-level guidance problem. The low-level controller employs a Proximal Policy Optimization with Differential Compensator (PPO-DC) algorithm, which significantly improves convergence speed and control stability. The high-level guidance policy generates desired attitude commands based on the target path, and a cumulative reward design enables sequential learning of multiple objectives. Extensive experiments demonstrate that our framework achieves outstanding performance on various complex paths, maintaining an average tracking error below 20 meters.

1. Introduction

Fixed-wing drones have been widely adopted in military, agriculture, and rescue missions due to their long endurance, low cost, and high adaptability. Path following — the ability to navigate along a prescribed three-dimensional trajectory without time constraints — is a critical capability for many applications such as aerial combat, precision agriculture, and shoreline patrol. However, the six-DOF dynamics of a fixed-wing drone introduce strong coupling between longitudinal and lateral motions, nonlinearities, and a high-dimensional continuous state-action space. Traditional approaches often rely on separate guidance loops (e.g., vector field methods) and control loops (e.g., PID controllers), which require extensive tuning and domain expertise.

Reinforcement learning (RL) has emerged as a promising alternative, providing model-free solutions that can learn complex policies directly from interaction. However, applying end-to-end RL to six-DOF fixed-wing drone path following is extremely difficult due to the curse of dimensionality and the need for precise control over multiple coupled actuators. To address this, we propose a hierarchical framework that separates the problem into two manageable tasks: low-level control (attitude regulation) and high-level guidance (path following). In the low-level control, we introduce a PPO-based algorithm enhanced with a differential compensator (PPO-DC) to achieve faster convergence and better stability. For the high-level guidance, we model the path following as a Markov decision process (MDP) and design a cumulative reward mechanism that allows the agent to learn multiple sequential objectives effectively. Experimental results on five different path types show that our framework enables the fixed-wing drone to track complex trajectories with remarkable accuracy.

2. Related Work

Traditional path following methods for fixed-wing drones often employ vector field guidance [11] or Lyapunov-based control [15]. These methods assume an existing autopilot (typically PID) for inner-loop attitude control. While effective, they require careful parameter tuning and are sensitive to model uncertainties. More recent works use nonlinear model predictive control (NMPC) [20] to directly generate actuator commands, but the computational burden and coupling complexities remain significant challenges.

RL has been applied to drone control in simplified scenarios, such as three-DOF or planar motion, or with state constraints (e.g., constant speed). For instance, DDPG was used to control roll and yaw rates for a fixed-wing drone with an inverted V-tail [40], and modified DPG algorithms have been applied to AUV path following [39]. However, few works address the full six-DOF fixed-wing drone path following problem without state restrictions. Our hierarchical framework fills this gap by decomposing the task into control and guidance, making the learning problem tractable while preserving full six-DOF dynamics.

3. Methodology

3.1 Hierarchical Reinforcement Learning Framework

We decompose the path following problem into two layers: a high-level guidance policy \(\tau_g\) and a low-level control policy \(\pi_c\). The guidance policy receives the current state of the fixed-wing drone relative to the target path and outputs desired attitudes (desired roll \(\phi^{desired}\), desired pitch \(\theta^{desired}\), desired yaw \(\psi^{desired}\), and desired speed \(V^{desired}\)). These desired attitudes are then fed into the control policy, which generates the four actuator commands: throttle \(\delta_{int}\), aileron \(\delta_{ina}\), elevator \(\delta_{ine}\), and rudder \(\delta_{inr}\). Both policies run at the same frequency (0.1 s) to minimize tracking error. This structure simplifies each sub-problem and enhances robustness.

Symbol Range Description
\(V\) [0, 400 m/s] Speed
\(u, v, w\) [-200, 200 m/s] Velocity components in body frame
\(\alpha\) \([-\pi, \pi]\) Angle of attack
\(\beta\) \([-\pi, \pi]\) Sideslip angle
\(z\) [0, 12 km] Altitude
\(\phi, \theta, \psi\) \([0, 2\pi]\) Roll, pitch, yaw
\(p, q, r\) [-10, 10 rad/s] Angular rates in body frame
\(\delta_t\) [0, 1] Actual throttle
\(\delta_e\) [-1, 1] Actual elevator
\(\delta_a\) [-1, 1] Actual aileron
\(\delta_r\) [-1, 1] Actual rudder
\(\delta_{int}\) [0, 1] Throttle command
\(\delta_{ina}\) [-1, 1] Aileron command
\(\delta_{ine}\) [-1, 1] Elevator command
\(\delta_{inr}\) [-1, 1] Rudder command

3.2 Low-Level Control with PPO-DC

The low-level control policy is responsible for driving the fixed-wing drone to a desired attitude. We train a single neural network for roll control, and then reuse the same architecture (with different inputs) for pitch, throttle, and sideslip control. The state for the roll controller is defined as

$$ s_{ct} = \{ \theta_t, \theta_{error}, d c_\theta \} $$

where \(\theta_t\) is the current roll angle, \(\theta_{error} = \theta_t – \theta_{target}\), and \(d c_\theta = d\theta_{error}/dt\) is the differential compensator term. The action \(a_{ct}\) is the aileron command scaled to \([-1,1]\).

The reward function is designed with three regions: induction zone, fine-tuning zone, and hit zone. The total reward at time \(t\) is

$$ r_{ct} = r_{induce} + r_{tune} + r_{hit} + r_{terminate} $$

with

$$ r_{induce} = -k_1 \ln\left( h_1 |\theta_{error}| + \frac{1}{e} \right) – k_2 \ln\left( h_2 |d c_\theta| + \frac{1}{e} \right) $$
$$ r_{tune} = -k_3 \ln\left( h_3 |\theta_{error}| + \frac{1}{e} \right) + p – k_4 \ln\left( h_4 |d c_\theta| + \frac{1}{e} \right) + q $$

where \(h_1, h_2, h_3, h_4\) are scaling factors derived from zone boundaries. The termination reward \(r_{terminate}\) is -100 if the fixed-wing drone crashes, +500 if it stays in the hit zone for \(k\) consecutive steps, and +20 if the episode times out.

The algorithm (Algorithm 1) summarizes the training procedure. Compared to standard PPO, PPO-DC adds the differential compensator into the state, which significantly improves convergence time (approximately 2.5 times faster) and ultimate control accuracy.

Parameter Value
Number of epochs per update 5
Buffer size 51,200
Batch size 5,120
GAE parameter 0.95
Discount factor \(\gamma\) 0.99
Decision step (s) 0.1
Actor network structure [64, 256, 256, 64]
Critic network structure [64, 256, 64]
Action bound [-1, 1]
Sampling distribution Normal
Activation function tanh
Optimizer Adam
Actor learning rate 0.0001
Critic learning rate 0.0001

3.3 High-Level Guidance with Cumulative Reward

The guidance policy receives the fixed-wing drone’s current state relative to the target path. For a linear path defined by two points \(p_0\) and \(p_1\), the state is

$$ s_{gt} = \{\phi_t, \theta_t, \psi_t, d_e, v_{ct}, v_{at}, \cos\phi_t, \sin\phi_t\} $$

where \(d_e = (\Delta x, \Delta y, \Delta z)\) is the cross-track error, \(v_{ct}\) is the cross-track velocity, and \(v_{at}\) is the along-track velocity. The action is the desired attitude \(a_{gt} = \{\phi^{desired}, \theta^{desired}, \psi^{desired}, V^{desired}\}\).

The guidance reward consists of three parts:

$$ r_{gt} = m_1 \cdot r_d + m_2 \cdot r_\phi + r_{along} $$

where \(r_d\) penalizes large cross-track error (using a logarithmic function similar to the control reward), \(r_\phi = \sin(\phi_t)\) encourages alignment with the path direction, and \(r_{along}\) rewards the fixed-wing drone for moving along the path (activated when \(|\phi_t| < b\) and \(|d_e| < a\)). The cumulative reward design dynamically adjusts the weights \(m_1\) and \(m_2\) during training: initially \(m_1 > m_2\) to prioritize error reduction, and later \(m_2\) is increased to emphasize directional alignment. This sequential learning strategy ensures convergence to the desired behavior.

4. Experiments

4.1 Control Experiments

We compare PPO-DC against standard PPO and a well-tuned PID controller on three tasks: roll control (target 40°), pitch control (target 25°), and composite control (maintain 5° pitch and 300 m/s speed). Table 2 reports the convergence speed; PPO-DC reaches convergence at approximately 700 episodes, while PPO requires about 1,700 episodes – an improvement of 2.5 times. The reward curves show that PPO-DC exhibits higher mean reward and narrower confidence intervals after convergence, indicating better stability.

Task Metric PID PPO PPO-DC
Roll (40°) Settling time (s) 1.8 2.5 0.6
Roll (40°) Overshoot (°) 12.3 5.1 1.2
Pitch (25°) Settling time (s) 3.2 2.8 1.7
Pitch (25°) Steady-state error (°) 1.5 0.9 0.3
Composite (pitch 5°) RMS pitch error (°) 1.1 0.7 0.4
Composite (speed 300 m/s) RMS speed error (m/s) 2.8 2.1 1.5

In roll control, PPO-DC reaches the target within 0.6 s with minimal overshoot, outperforming both PID and PPO. In pitch control, the network trained only for roll control generalizes well to pitch control, demonstrating strong transferability. In the composite task, PPO-DC maintains tighter control on both pitch and speed, with a speed RMS error of only 1.5 m/s compared to 2.8 m/s for PID.

4.2 Guidance Experiments

We evaluate the guidance policy on five different path types: (1) slanted straight line, (2) 2D circle, (3) 3D helical climb, (4) 2D butterfly curve, and (5) 3D butterfly curve. The fixed-wing drone starts at a random position near the path. Table 3 summarizes the tracking errors.

Path type Mean error (m) Max error (m) Min error (m)
Slanted straight line 18.85 45.61 0.00
2D circle 18.71 62.97 0.86
3D helical climb 17.70 73.34 0.18
2D butterfly 19.07 53.29 0.56
3D butterfly 18.15 63.81 0.17

The average tracking error across all paths is approximately 18.5 m, with maximum errors below 75 m. The 3D helical path exhibits the highest max error (73.34 m) but still maintains a low mean (17.70 m), indicating that the fixed-wing drone occasionally overshoots at sharp turns but quickly recovers. These results confirm the effectiveness of the hierarchical framework for complex path following without state restrictions.

We also validate the cumulative reward design by comparing four reward configurations on a straight-line task. Only the cumulative design (increasing \(m_2\) after convergence) achieves both rapid approach to the path and subsequent alignment along it. The other configurations either fail to converge or oscillate around the target path.

5. Conclusion

In this work, we propose a hierarchical deep reinforcement learning framework for six-DOF fixed-wing drone path following. The low-level control uses a PPO-DC algorithm that accelerates convergence by 2.5 times compared to standard PPO and provides superior stability and accuracy. The high-level guidance employs a cumulative reward mechanism that sequentially learns to reduce cross-track error and then align heading. Experiments on five diverse paths demonstrate that the fixed-wing drone can track complex trajectories with an average error below 20 m. Future work will extend PPO-DC to other fixed-wing drone models and improve guidance precision for highly curved paths. The framework also holds promise for other challenging tasks in fixed-wing drone autonomy, such as obstacle avoidance and formation flight.

Scroll to Top