Performance Optimization for Fixed-Wing Drone Tracking Control via Incremental Q-Learning

We present a systematic approach to enhance the tracking control performance of a fixed-wing drone by combining an incremental control structure with Q-learning. The core idea is to retain an existing stabilizing nominal controller and add an adaptive incremental controller that learns to compensate the control input in a data-driven manner. Two algorithms are developed: one requires full state information and the other relies only on input-output measurements. Both algorithms are model-free, do not require knowledge of the system dynamics or the nominal controller gain, and converge to the optimal policy under mild excitation conditions. We prove that the least-squares solution of the Q-function Bellman equation is unbiased when the exploration noise satisfies the persistent excitation condition. Extensive simulations on the longitudinal dynamics of the F-16 fixed-wing drone demonstrate that the proposed method significantly improves tracking accuracy compared to the nominal controller and outperforms a carefully tuned PID controller.


1. Introduction

The control of fixed-wing drones has been a central topic in aerospace engineering. Traditional methods such as PID, H-infinity, dynamic inversion, and adaptive control rely heavily on accurate mathematical models. However, the complexity and uncertainty of real flight environments often degrade the performance of model-based controllers. Reinforcement learning, especially Q-learning, offers a promising model‑free alternative. Most existing reinforcement learning approaches for fixed‑wing drones design a full controller from scratch. In many practical scenarios, however, a nominal controller already exists and provides basic stability. Our goal is to improve its performance without altering its structure.

We propose an incremental Q-learning framework. A stable nominal controller is kept unchanged, and an incremental controller is added to generate a correction signal. The resulting total control input optimizes a quadratic performance index. Two variants are designed:

  • State‑feedback incremental Q-learning (Algorithm 1) when the full state is available.
  • Output‑feedback incremental Q-learning (Algorithm 2) that uses past input-output and reference trajectory data to reconstruct the system state.

Both algorithms operate purely in a data‑driven manner and do not require any a priori knowledge of the system matrices or the nominal gain. We also show theoretically that the Q‑function parameter estimates are unbiased when the exploratory noise satisfies the persistent excitation condition.


2. Problem Formulation and Preliminaries

2.1 Fixed‑Wing Drone Dynamics

We consider the longitudinal dynamics of a fixed‑wing drone (F‑16 model) linearized around a trimmed flight condition. The continuous-time equations are simplified to a discrete-time linear time-invariant system:

$$
x_{k+1} = A x_k + B u_k, \qquad y_k = C x_k
$$

where \( x_k = [V, \alpha, \theta, q]^{\mathsf{T}} \) is the state (airspeed, angle of attack, pitch angle, pitch rate), \( u_k = \delta_e \) is the elevator deflection, and \( y_k = \alpha \) is the measured output. The matrices \( A, B, C \) are given in the simulation section. The pair \( (A,B) \) is controllable and \( (A,C) \) is observable.

The reference trajectory is generated by an exosystem:

$$
x_{k+1}^{r} = F x_k^{r}, \qquad y_k^{r} = C_r x_k^{r}
$$

We form an augmented system with state \( X_k = [x_k^{\mathsf{T}}, (x_k^{r})^{\mathsf{T}}]^{\mathsf{T}} \):

$$
X_{k+1} = T X_k + B_1 u_k, \qquad T = \begin{bmatrix} A & 0 \\ 0 & F \end{bmatrix}, \quad B_1 = \begin{bmatrix} B \\ 0 \end{bmatrix}
$$

2.2 Nominal Controller and Performance Index

A nominal controller \( u_k^0 = K_0 X_k \) is pre-designed to stabilize the augmented system. However, this nominal gain is not optimal with respect to the following discounted quadratic cost:

$$
V(k) = \sum_{i=k}^{\infty} \gamma^{i-k} \left[ (y_i – y_i^{r})^{\mathsf{T}} Q (y_i – y_i^{r}) + u_i^{\mathsf{T}} R u_i \right]
$$

Equivalently, in terms of \( X_k \) and \( u_k \):

$$
V(X_k) = \sum_{i=k}^{\infty} \gamma^{i-k} \left( X_i^{\mathsf{T}} Q_1 X_i + u_i^{\mathsf{T}} R u_i \right)
$$

where \( Q_1 = \begin{bmatrix} C^{\mathsf{T}}QC & -C^{\mathsf{T}}QC_r \\ -C_r^{\mathsf{T}}QC & C_r^{\mathsf{T}}QC_r \end{bmatrix} \).

2.3 Incremental Control Structure

We introduce an incremental control signal \( \Delta u_k \) that adds to the nominal input:

$$
u_k = u_k^{0} + \Delta u_k = K_0 X_k + \Delta u_k
$$

The total feedback gain after learning becomes \( K_0 + \Delta K \), where \( \Delta u_k = \Delta K X_k \) in the state‑feedback case, or \( \Delta u_k = \Delta F \tau_k \) in the output‑feedback case (details later). The structure preserves the original controller and only optimizes the performance via the incremental part.

The Q‑function for the augmented system is defined as:

$$
Q(X_k, u_k) = X_k^{\mathsf{T}} Q_1 X_k + u_k^{\mathsf{T}} R u_k + \gamma V(X_{k+1})
$$

For linear systems, \( V(X_k) = X_k^{\mathsf{T}} P X_k \), and the Q‑function can be expressed as:

$$
Q(X_k, \Delta u_k) = \begin{bmatrix} X_k \\ \Delta u_k \end{bmatrix}^{\mathsf{T}} H \begin{bmatrix} X_k \\ \Delta u_k \end{bmatrix}
$$

The optimal incremental control that minimizes the Q‑function is:

$$
\Delta u_k^{*} = – H_{uu}^{-1} H_{uX} X_k
$$

where the block partition of \( H \) is:

$$
H = \begin{bmatrix} H_{XX} & H_{Xu} \\ H_{uX} & H_{uu} \end{bmatrix}
$$


3. State‑Feedback Incremental Q‑Learning

3.1 Q‑Function Parameterization and Bellman Equation

Define \( z_k = [X_k^{\mathsf{T}}, \Delta u_k^{\mathsf{T}}]^{\mathsf{T}} \). The Bellman equation for the Q‑function is:

$$
z_k^{\mathsf{T}} H z_k = X_k^{\mathsf{T}} (Q_1 + K_0^{\mathsf{T}} R K_0) X_k + \Delta u_k^{\mathsf{T}} R \Delta u_k + 2 \Delta u_k^{\mathsf{T}} R K_0 X_k + \gamma z_{k+1}^{\mathsf{T}} H z_{k+1}
$$

Let \( S_0 = \begin{bmatrix} Q_1 + \gamma K_0^{\mathsf{T}} P K_0 & K_0^{\mathsf{T}} R \\ R K_0 & R \end{bmatrix} \). Then:

$$
z_k^{\mathsf{T}} H z_k = z_k^{\mathsf{T}} S_0 z_k + \gamma z_{k+1}^{\mathsf{T}} H z_{k+1}
$$

To solve for \( H \) without knowing the dynamics, we parameterize using the quadratic form. Let \( l = n + n_1 + m \). Define the vector of unique entries:

$$
\bar{H} = [h_{11}, 2h_{12}, \dots, 2h_{1l}, h_{22}, 2h_{23}, \dots, 2h_{2l}, \dots, h_{ll}]^{\mathsf{T}}
$$

$$
\bar{z}_k = [z_1^2, z_1 z_2, \dots, z_1 z_l, z_2^2, z_2 z_3, \dots, z_2 z_l, \dots, z_l^2]^{\mathsf{T}}
$$

The Bellman equation becomes linear in \( \bar{H} \):

$$
\bar{H}^{\mathsf{T}} (\bar{z}_k – \gamma \bar{z}_{k+1}) = r_k
$$

where \( r_k = z_k^{\mathsf{T}} S_0 z_k \). Collecting L samples yields:

$$
\Phi^{\mathsf{T}} \bar{H} = \Omega
$$

with \( \Phi = [\bar{z}_k – \gamma \bar{z}_{k+1}, \dots, \bar{z}_{k+L-1} – \gamma \bar{z}_{k+L}] \) and \( \Omega = [r_k, r_{k+1}, \dots, r_{k+L-1}]^{\mathsf{T}} \). The least‑squares solution is:

$$
\bar{H} = (\Phi \Phi^{\mathsf{T}})^{-1} \Phi \Omega
$$

3.2 Policy Iteration Algorithm

Algorithm 1 summarizes the state‑feedback incremental Q-learning procedure.

Algorithm 1: State‑Feedback Incremental Q‑Learning
1: Initialize \( H^0 \) arbitrarily, set nominal controller \( u^0 = K_0 X \), choose stable initial incremental policy \( \Delta u^0 \).
2: for \( j = 1, 2, \dots \) until convergence do
3: Policy Evaluation: Collect data and solve
\( (\bar{H}^{j})^{\mathsf{T}} (\bar{z}_k – \gamma \bar{z}_{k+1}) = (y_k – y_k^{r})^{\mathsf{T}} Q (y_k – y_k^{r}) + (u_k^{j})^{\mathsf{T}} R u_k^{j} \)
4: Policy Update: Extract \( H_{uu}^{j} \) and \( H_{uX}^{j} \), set
\( \Delta u_k^{j+1} = – (H_{uu}^{j})^{-1} H_{uX}^{j} X_k \)
5: if \( \| H^{j} – H^{j-1} \| \le \varepsilon \) then break
6: end for

During data collection, an exploratory noise satisfying the persistent excitation condition must be added to the control input to ensure that the matrix \( \Phi \) is full‑rank.

3.3 Unbiasedness Under Excitation Noise

Theorem 1: If the exploration noise added to \( \Delta u_k \) is zero‑mean and independent of the regressor \( \bar{z}_k – \gamma \bar{z}_{k+1} \), and the persistent excitation condition holds, then the least‑squares estimate \( \bar{H} \) obtained from (Equation 23) is unbiased, i.e., \( \mathbb{E}[\bar{H}] = \bar{H}^{*} \), where \( \bar{H}^{*} \) is the true parameter of the Q‑function.

Proof outline: The noise enters only through the regressor matrix \( \Phi \). Under the excitation condition, the matrix \( \Phi \Phi^{\mathsf{T}} \) is invertible and, due to independence, the expectation of the product \( \Phi \Omega \) converges to the true value. A detailed derivation is omitted for brevity. ∎


4. Output‑Feedback Incremental Q‑Learning

4.1 State Reconstruction Using Past I/O Data

When the full state is not measurable, we reconstruct it from past input-output and reference data. Provided the system is observable, there exists an integer \( N \) such that:

$$
X_k = M_u \bar{u}_{k-1,k-N} + M_y \bar{y}_{k-1,k-N} + M_r x_{k-N}^{r} = M \tau_k
$$

where

$$
\bar{u}_{k-1,k-N} = [u_{k-1}^{\mathsf{T}}, u_{k-2}^{\mathsf{T}}, \dots, u_{k-N}^{\mathsf{T}}]^{\mathsf{T}}
$$
$$
\bar{y}_{k-1,k-N} = [y_{k-1}^{\mathsf{T}}, y_{k-2}^{\mathsf{T}}, \dots, y_{k-N}^{\mathsf{T}}]^{\mathsf{T}}
$$

and \( M = [M_u, M_y, M_r] \) is a constant matrix that depends on the system matrices. Thus the nominal and incremental controllers can be expressed as:

$$
u_k^0 = F_0 \tau_k, \qquad \Delta u_k = \Delta F \tau_k
$$

where \( F_0 = [F_u, F_y, F_r] \) is the nominal gain in the I/O space.

4.2 Q‑Function with Augmented Vector

Define the augmented vector

$$
Z_k = [\bar{u}_{k-1,k-N}^{\mathsf{T}}, \bar{y}_{k-1,k-N}^{\mathsf{T}}, (x_{k-N}^{r})^{\mathsf{T}}, \Delta u_k^{\mathsf{T}}]^{\mathsf{T}} \in \mathbb{R}^{l_1}
$$

with \( l_1 = mN + pN + n_1 + m \). Substituting the reconstruction into the Q‑function yields:

$$
Q(Z_k) = Z_k^{\mathsf{T}} H_1 Z_k
$$

where

$$
H_1 = \begin{bmatrix}
H_{\bar{u}\bar{u}} & H_{\bar{u}\bar{y}} & H_{\bar{u}r} & H_{\bar{u}u} \\
H_{\bar{y}\bar{u}} & H_{\bar{y}\bar{y}} & H_{\bar{y}r} & H_{\bar{y}u} \\
H_{r\bar{u}} & H_{r\bar{y}} & H_{rr} & H_{ru} \\
H_{u\bar{u}} & H_{u\bar{y}} & H_{ur} & H_{uu}
\end{bmatrix}
$$

The optimal incremental control law becomes:

$$
\Delta u_k^{*} = – H_{uu}^{-1} \left( H_{u\bar{u}} \bar{u}_{k-1,k-N} + H_{u\bar{y}} \bar{y}_{k-1,k-N} + H_{ur} x_{k-N}^{r} \right)
$$

4.3 Data‑Driven Algorithm

Similar to the state‑feedback case, we parameterize \( H_1 \) via the vector \( \bar{H}_1 \) and the stacked quadratic regressor \( \bar{Z}_k \). The Bellman equation becomes:

$$
\bar{H}_1^{\mathsf{T}} (\bar{Z}_k – \gamma \bar{Z}_{k+1}) = (y_k – y_k^{r})^{\mathsf{T}} Q (y_k – y_k^{r}) + u_k^{\mathsf{T}} R u_k
$$

Collecting L ≥ l₁(l₁+1)/2 samples gives the least‑squares solution.

Algorithm 2: Output‑Feedback Incremental Q‑Learning
1: Initialize \( H_1^0 \), set nominal controller \( u^0 = F_0 \tau \), choose stable initial \( \Delta u^0 \).
2: for \( j = 1, 2, \dots \) until convergence do
3: Policy Evaluation: Solve
\( (\bar{H}_1^{j})^{\mathsf{T}} (\bar{Z}_k – \gamma \bar{Z}_{k+1}) = (y_k – y_k^{r})^{\mathsf{T}} Q (y_k – y_k^{r}) + (u_k^{j})^{\mathsf{T}} R u_k^{j} \)
4: Policy Update: Compute
\( \Delta u_k^{j+1} = – (H_{uu}^{j})^{-1} \big( H_{u\bar{u}}^{j} \bar{u}_{k-1,k-N} + H_{u\bar{y}}^{j} \bar{y}_{k-1,k-N} + H_{ur}^{j} x_{k-N}^{r} \big) \)
5: if \( \| H_1^{j} – H_1^{j-1} \| \le \varepsilon \) then break
6: end for

Note that Algorithm 2 uses only measured input-output data and the reference trajectory, making it suitable for fixed‑wing drone systems where full state measurement is often impractical.


5. Simulation Results

We validate the proposed algorithms on the longitudinal model of the F‑16 fixed‑wing drone. The discrete‑time matrices (sampling time 0.5 s) are:

$$
A = \begin{bmatrix}
0.9854 & 0.6528 & -15.9677 & -4.5261 \\
-0.0003 & 0.7891 & 0.0026 & 0.3305 \\
0 & 0.0332 & 1 & 0.4153 \\
0 & 0.1191 & 0.0001 & 0.6912
\end{bmatrix}, \quad
B = \begin{bmatrix}
-0.0483 \\ 0.0057 \\ 0.0063 \\ 0.0237
\end{bmatrix}
$$

$$
C = \begin{bmatrix} 0 & 57.3 & 0 & 0 \end{bmatrix}
$$

The reference exosystem is:

$$
F = \begin{bmatrix} 0.9954 & -0.0954 \\ 0.0954 & 0.9954 \end{bmatrix}, \quad C_r = \begin{bmatrix} 5 & 0 \end{bmatrix}
$$

Initial states: \( V(0)=10 \) ft/s, \( \alpha(0)=10^\circ \), \( \theta(0)=-10^\circ \), \( q(0)=10^\circ\)/s; reference initial state [1, –1]ᵀ.

5.1 State‑Feedback Case

We design a nominal stabilizing gain:

$$
K_0 = \begin{bmatrix} -0.0061 & 6 & 0.0079 & 43 & -1 & 0.1784 \end{bmatrix}
$$

Cost parameters: \( Q=20 \), \( R=1 \), \( \gamma=0.3 \). The learned incremental gain after Algorithm 1 is:

$$
\Delta K = \begin{bmatrix} -0.0203 & 47.4610 & 0.2546 & 23.9667 & -5.1579 & 0.6034 \end{bmatrix}
$$

The total control gain becomes:

$$
K_{\text{sum}} = \begin{bmatrix} -0.0264 & 53.4610 & 0.3343 & 26.9667 & -6.1579 & 0.7818 \end{bmatrix}
$$

This matches the optimal gain obtained from a standard (non‑incremental) Q‑learning solution within 0.02% relative error.

Iteration \( \|H^j – H^{j-1}\| \)
1 2.34
2 0.08
3 0.001
4 2.1×10⁻⁶

The tracking performance is shown below. The nominal controller alone cannot track the reference accurately, while the optimized controller achieves perfect tracking within 40 time steps. The elevator deflection stays within ±25°.

5.2 Output‑Feedback Case

We use \( N=4 \) (since the system order is 4). The nominal I/O gain is:

$$
F_u = \begin{bmatrix} -0.2174 & 0.5217 & 0.0609 & -0.2522 \end{bmatrix}
$$
$$
F_y = \begin{bmatrix} 2.4348 & -4.2174 & 2.6522 & -0.5739 \end{bmatrix}
$$
$$
F_r = \begin{bmatrix} -1.3217 & 0.7043 \end{bmatrix}
$$

Cost parameters: \( Q=7 \), \( R=1 \), \( \gamma=0.5 \). After Algorithm 2, the incremental gains are:

$$
\Delta F_u = \begin{bmatrix} -0.5896 & 2.1610 & 0.0915 & -1.0575 \end{bmatrix}
$$
$$
\Delta F_y = \begin{bmatrix} 8.6439 & -16.3182 & 10.7968 & -2.4063 \end{bmatrix}
$$
$$
\Delta F_r = \begin{bmatrix} -3.0184 & 1.8471 \end{bmatrix}
$$

The total gains:

$$
F_{u,\text{sum}} = \begin{bmatrix} -0.8070 & 2.6827 & 0.1524 & -1.3097 \end{bmatrix}
$$
$$
F_{y,\text{sum}} = \begin{bmatrix} 11.0787 & -20.5356 & 13.4490 & -2.9802 \end{bmatrix}
$$
$$
F_{r,\text{sum}} = \begin{bmatrix} -4.3401 & 2.5514 \end{bmatrix}
$$

These match the optimal output‑feedback gain computed by a non‑incremental Q‑learning algorithm within 0.1% error. The output‑feedback tracking converges in about 100 steps, slower than state‑feedback due to the larger data requirement, but still significantly better than the nominal controller.

Iteration \( \|H_1^j – H_1^{j-1}\| \)
1 5.12
2 0.15
3 0.003
4 4.8×10⁻⁵

5.3 Comparison with PID

We also implemented a PID controller tuned for this fixed‑wing drone model: \( K_p=0.5, K_i=0.34, K_d=0.25 \). The incremental Q‑learning controller (both state and output feedback) shows smaller tracking error and smoother transient response. More importantly, the PID controller cannot adapt to changes in operating point, whereas the Q‑learning method can automatically adjust the incremental gain when the flight condition changes.


6. Conclusion

We have presented two incremental Q‑learning algorithms for performance optimization of fixed‑wing drone tracking control. By adding an adaptive incremental controller to an existing stabilizing nominal controller, the overall control law is driven toward optimality without modifying the original system. The state‑feedback version is efficient when full state measurements are available; the output‑feedback version uses only input‑output data and is suitable for practical fixed‑wing drone implementations. Both algorithms are model‑free and provably unbiased under persistent excitation. Simulation results on an F‑16 longitudinal model demonstrate that the proposed methods significantly improve tracking accuracy compared to the nominal controller and outperform a classical PID controller. Future work will extend the framework to nonlinear fixed‑wing drone models and real‑time hardware implementation.

Scroll to Top