We present a unified control framework for fixed-wing UAV formation flight that simultaneously addresses formation keeping, path planning, reconfiguration, and collision avoidance. By adopting a heuristic distributed model predictive control (DMPC) architecture, we translate these multiple objectives into a multi‑objective optimization problem where cost functions and compatibility constraints are solved jointly. A phased trajectory planning algorithm combines short‑term model predictive trajectory generation with long‑term polynomial trajectory planning. Using polynomial coefficients for neighbor trajectory exchange significantly reduces communication load and computational complexity. We validate the approach through a simulation with nine fixed‑wing UAVs performing coordinated obstacle avoidance and formation convergence.

In modern aerial warfare, fixed-wing UAV swarms must operate under strict formation constraints while autonomously reacting to dynamic threats. Traditional methods often separate formation control and path planning into distinct modules, leading to coupling issues and increased controller complexity. Our goal is to unify these functions under a single DMPC framework.
Problem Formulation
Consider a team of N fixed-wing UAVs moving in a horizontal plane. Each UAV follows a double‑integrator dynamics model:
$$
\dot{\mathbf{s}}_i = \mathbf{v}_i,\qquad \dot{\mathbf{v}}_i = \mathbf{a}_i
$$
where \(\mathbf{s}_i = [x_i, y_i]^\top\), \(\mathbf{v}_i = [v_{ix}, v_{iy}]^\top\) and \(\mathbf{a}_i = [a_{ix}, a_{iy}]^\top\). Discretizing with sampling time \(d t\) yields:
$$
\mathbf{z}_i(k + l + 1 \mid k) = \mathbf{A}_i \mathbf{z}_i(k + l \mid k) + \mathbf{B}_i \mathbf{u}_i(k + l \mid k)
$$
with state vector \(\mathbf{z}_i = [x_i, v_{ix}, y_i, v_{iy}]^\top\) and control input \(\mathbf{u}_i = [a_{ix}, a_{iy}]^\top\).
The following constraints must be respected:
- Velocity bounds: \(V_{\min} < \|\mathbf{v}_i\| < V_{\max}\)
- Safety distance: \(\|\mathbf{s}_i – \mathbf{s}_j\| \ge R_{\text{safe}}, \forall i\neq j\)
- Obstacle avoidance: \(\|\mathbf{s}_i – \mathbf{s}_{o,j}\| \ge R_{o,j}\) for each obstacle \(j\)
The reference trajectory for each UAV is defined by a virtual structure center moving along a prescribed path plus an offset that defines the desired formation shape:
$$
\mathbf{s}_{i,\text{ref}} = \mathbf{p}_{\text{center}} + \mathbf{d}_i
$$
where \(\mathbf{d}_i\) is the offset of UAV \(i\) in the formation.
Heuristic Distributed MPC Architecture
Our algorithm comprises three stages executed at every time step:
- Model predictive trajectory generation: Sample multiple terminal states within a feasible arc and compute optimal control sequences for a horizon of \(N\) steps.
- Polynomial trajectory planning: From each predictive terminal point, fit a quintic polynomial to a candidate end point sampled near the future reference. Evaluate these long‑range trajectories using a cost that includes obstacle proximity and neighbor distance.
- Trajectory combination and selection: Normalize costs of both trajectory types, solve a small dynamic programming problem to select the optimal combination, and apply the first control input of the chosen predictive segment.
Cost Functions in the Predictive Stage
The stage cost for the predictive control is:
$$
L_i(k+l \mid k) = w_S \bigl\| \mathbf{s}_{i,\text{ref}}(k+l) – \mathbf{s}_i(k+l) \bigr\|
$$
and the terminal cost is:
$$
L_{i,f}\bigl(\mathbf{s}_i(k+N),\mathbf{s}_{\text{ref}}\bigr) = w_T \bigl\| \mathbf{s}_{i,\text{ref}}(k+N) – \mathbf{s}_i(k+N) \bigr\|
$$
The total predictive cost for a given terminal sample is:
$$
J_i = \sum_{l=0}^{N-1} L_i(k+l) + L_{i,f}
$$
Polynomial Trajectory Parameterization
We use quintic polynomials for the long‑range segment to ensure acceleration continuity.
For the \(x\) component:
$$
f_x(t) = a_{0,x} + a_{1,x} t + a_{2,x} t^2 + a_{3,x} t^3 + a_{4,x} t^4 + a_{5,x} t^5
$$
and similarly for \(y\). The boundary conditions are:
$$
\begin{aligned}
&[x_{\text{mpc}}(N),\, y_{\text{mpc}}(N)] = [f_x(0), f_y(0)],\\
&[v_{x,\text{mpc}}(N),\, v_{y,\text{mpc}}(N)] = [f’_x(0), f’_y(0)],\\
&[x_{\text{poly}}(T),\, y_{\text{poly}}(T)] = [f_x(T), f_y(T)],\\
&[v_{x,\text{poly}}(T),\, v_{y,\text{poly}}(T)] = [f’_x(T), f’_y(T)]
\end{aligned}
$$
Communication between fixed-wing UAVs is reduced to exchanging the 12 polynomial coefficients (\(a_{0,x},\dots,a_{5,x},a_{0,y},\dots,a_{5,y}\)) rather than a dense point sequence.
Cost for Polynomial Trajectories
Obstacle and neighbor avoidance costs use a logarithmic barrier function:
$$
C_{\text{barrier}}(\mathbf{s},\mathbf{s}_o,r_o) =
\begin{cases}
-\log\left(\frac{\|\mathbf{s} – \mathbf{s}_o\|}{r_o}\right), & \|\mathbf{s} – \mathbf{s}_o\| < r_o \\[4pt]
0, & \text{otherwise}
\end{cases}
$$
The total polynomial cost is:
$$
C_{\text{poly}} = w_{\text{nbr}} \sum_{k=1}^{L} \sum_{i=1}^{M} C_{\text{barrier}}(\mathbf{s}_i,\mathbf{s}_{\text{nbr},i,k},R_{\text{nbr}})
+ w_o \sum_{j=1}^{O} \sum_{i=1}^{M} C_{\text{barrier}}(\mathbf{s}_i,\mathbf{s}_{o,j},R_{o,j})
+ w_a \sum_{i=1}^{M} \|\mathbf{a}_i\|
+ w_{\text{TE}} \bigl\| \mathbf{s}_{\text{poly}}(T) – \mathbf{s}_{\text{ref}}(T) \bigr\|
$$
where \(M\) is the number of sample points along the polynomial, \(L\) is the number of neighbors, \(O\) is the number of obstacles, and \(w_{\text{nbr}}, w_o, w_a, w_{\text{TE}}\) are weighting coefficients.
Trajectory Combination and Selection
We normalize the predictive costs and polynomial costs separately:
$$
C^{\text{norm}}_{\text{mpc},l} = \frac{C_{\text{mpc},l}}{\sum_{i=1}^{N_p} C_{\text{mpc},i}},\qquad
C^{\text{norm}}_{\text{poly},l} = \frac{C_{\text{poly},l}}{\sum_{i=1}^{N_p} C_{\text{poly},i}}
$$
Then each complete path from current state to polynomial end point via predictive terminal \(l\) receives a total cost:
$$
W_l = w_{\text{mpc}} \, C^{\text{norm}}_{\text{mpc},l} + w_{\text{poly}} \, C^{\text{norm}}_{\text{poly},l}
$$
A small dynamic programming problem selects the path with minimal \(W_l\). The first control input of the chosen predictive segment is applied to the fixed-wing UAV.
Simulation Setup and Parameters
We simulate nine fixed-wing UAVs that start from random positions and velocities, must avoid five circular obstacles, and converge into a horizontal line formation with 50 m spacing.
| Parameter | Value |
|---|---|
| Safe distance \(R_{\text{safe}}\) | 20 m |
| Velocity range \([V_{\min}, V_{\max}]\) | [15, 30] m/s |
| Obstacle radius \(R_o\) | 50 m |
| Prediction time step \(dt\) | 300 ms |
| Prediction horizon \(N\) | 10 |
| Polynomial segment duration \(T\) | 30 s |
| Formation type | Line |
| Formation spacing | 50 m |
| Cost weights \([w_S, w_T, w_{\text{nbr}}, w_o, w_a, w_{\text{TE}}]\) | [10, 50, 100, 1000, 5, 50] |
| Trajectory weights \([w_{\text{mpc}}, w_{\text{poly}}]\) | [0.5, 0.5] |
Simulation Results and Analysis
The nine fixed-wing UAVs successfully depart from scattered initial states, navigate around five obstacles, and merge into a straight line formation. The formation errors converge to zero within approximately 60 s.
Key observations:
- Each fixed-wing UAV independently plans its trajectory using only local information and exchanged polynomial coefficients.
- Obstacle avoidance is achieved by the barrier cost; the UAVs tend to skim the obstacle boundaries to minimize deviation from the reference.
- Neighbor trajectory information significantly influences the selection of safe paths. When a UAV receives polynomial coefficients from two neighbors, it regenerates their entire predicted trajectories (100 points each) and reevaluates the polynomial cost, preferring a more conservative but collision‑free path.
- The communication load is reduced by an order of magnitude compared to exchanging raw trajectory points.
| Method | Data exchanged | Typical size |
|---|---|---|
| Point‑wise trajectory exchange | \(N\) × (x,y) pairs | ~20–40 floats |
| Polynomial coefficient exchange | 12 coefficients | 12 floats |
Conclusion and Future Work
We have presented a heuristic DMPC framework for fixed-wing UAV formation control that simultaneously handles formation keeping, reconfiguration, obstacle avoidance, and collision avoidance within a single optimization structure. The phased trajectory planning method combines model predictive control with polynomial trajectories, increasing the effective prediction horizon while reducing computational and communication burdens. Simulation of nine fixed-wing UAVs demonstrates the method’s feasibility and effectiveness.
Future work will focus on optimizing the cost function structure and weight tuning to achieve faster convergence for large swarms, and on integrating machine‑learning‑based neighbor trajectory prediction to enable fully communication‑free cooperative formation control for fixed-wing UAVs.
