The pursuit of creating ever more complex and mesmerizing aerial displays, epitomized by the modern formation drone light show, has driven significant advancements in multi-agent coordination and control. While visually stunning, these performances represent a constrained subset of the broader challenges in unmanned aerial vehicle (UAV) swarm operations. The core technological hurdle extends beyond synchronized flashing lights to the fundamental problem of precise, collision-free, and dynamically feasible trajectory planning for a large number of vehicles operating in tight formation. In applications ranging from automated infrastructure inspection to large-scale aerial cinematography and, of course, sophisticated formation drone light show choreography, the ability of a swarm to execute coordinated maneuvers—especially sharp turns and altitude changes—while maintaining a defined geometric pattern is paramount. This article, from our research perspective, explores an advanced optimal control framework that synergizes a virtual spring-based formation controller with an hp-adaptive pseudospectral solver to address these exact challenges.
The task of trajectory planning for a single UAV is complex, involving dynamics, constraints, and objectives. Scaling this to a coordinated fleet multiplies the difficulty. Traditional methods like the leader-follower approach offer simplicity but suffer from cascading errors and lack of adaptability. If the leader’s trajectory is dynamically aggressive, followers may be unable to keep up due to their own physical limits, breaking the formation. Alternatively, decentralized methods using artificial potential fields can handle obstacle avoidance but often struggle to maintain precise geometric shapes during maneuvers. We posit that the solution lies in a hybrid strategy: one that provides an elastic, physics-inspired coupling between agents to maintain cohesion, combined with a high-fidelity numerical method capable of solving the resulting complex optimal control problem efficiently. This approach is particularly suited for missions demanding high precision, such as flying through narrow corridors between structures or executing the intricate, timed paths of a formation drone light show.

The visual spectacle of a coordinated formation drone light show relies entirely on the underlying trajectory generation and real-time control algorithms ensuring each drone is at its correct 4D coordinate (space and time). Our work focuses on the offline or pre-computed trajectory planning layer that generates these feasible paths. We begin by establishing the dynamical model for fixed-wing UAVs, which are often preferred for endurance but present greater challenges in aggressive turning compared to quadrotors. The core dynamics for planar coordinated turn flight can be simplified to:
$$ m \frac{dV}{dt} = T – D $$
$$ mV \frac{d\chi}{dt} = L \sin(\gamma_V) $$
$$ mg = L \cos(\gamma_V) $$
$$ \frac{dx}{dt} = V \cos(\chi), \quad \frac{dy}{dt} = V \sin(\chi) $$
Here, \(m\) is mass, \(V\) is velocity, \(T\) is thrust, \(D\) is drag, \(L\) is lift, \(\chi\) is the heading (or path) angle, and \(\gamma_V\) is the bank angle, which serves as a primary control input along with thrust \(T\). The lift and drag are given by \(L = \frac{1}{2} C_L \rho V^2 S\) and \(D = \frac{1}{2} C_D \rho V^2 S\), where \(C_L\) and \(C_D\) are coefficients, \(\rho\) is air density, and \(S\) is the wing reference area.
Theoretical Foundation: Virtual Springs and Pseudospectral Discretization
To manage inter-agent spacing and formation geometry, we employ a virtual spring mesh model. In this paradigm, each drone in the formation is connected to its immediate neighbors by simulated springs. The ideal, rest length of the spring \(l_0^{ij}\) corresponds to the desired separation between drones \(i\) and \(j\) in the target formation shape (e.g., a grid, circle, or diamond pattern for a formation drone light show). If the actual distance \(l^{ij}\) deviates from \(l_0^{ij}\), a corrective virtual force is applied according to Hooke’s law:
$$ \vec{F}_{s}^{ij} = k_{s} (l^{ij} – l_0^{ij}) \cdot \frac{\vec{p}_j – \vec{p}_i}{l^{ij}} $$
where \(k_s\) is the virtual spring constant, and \(\vec{p}_i\) is the position vector of drone \(i\). This force is not applied directly to the drone’s dynamics but is incorporated as a term in the cost function or as a guiding potential. The total formation elastic potential energy \(E_{form}\) to be minimized is:
$$ E_{form} = \sum_{i=1}^{N} \sum_{j \in \mathcal{N}_i} \frac{1}{2} k_s (l^{ij} – l_0^{ij})^2 $$
where \(\mathcal{N}_i\) is the set of neighbors connected to drone \(i\). This method provides resilience: a small disturbance to one drone is absorbed and compensated by the “spring” network, much like a flexible mesh, rather than causing a rigid, catastrophic failure of the formation. This is crucial for a formation drone light show operating in unpredictable wind conditions.
To solve the resulting multi-agent optimal control problem, we turn to the hp-adaptive pseudospectral method. Optimal control problems are inherently infinite-dimensional. The pseudospectral method transcribes this continuous problem into a finite-dimensional Nonlinear Programming (NLP) problem by discretizing the state and control variables at carefully chosen collocation points (typically the roots of orthogonal polynomials like Legendre or Chebyshev). The “hp” adaptation refers to the method’s ability to independently refine the solution by either increasing the number of mesh intervals (\(h\)-refinement) or increasing the polynomial degree within an interval (\(p\)-refinement). This leads to exponential convergence rates for smooth problems and efficient handling of path constraints or singularities.
The core transcription for a single drone’s trajectory over time \(t \in [t_0, t_f]\) is as follows. The time domain is mapped to \(\tau \in [-1, 1]\). States \(\vec{x}(\tau)\) and controls \(\vec{u}(\tau)\) are approximated by global Lagrange interpolating polynomials \(L_k(\tau)\) of degree \(N\):
$$ \vec{x}(\tau) \approx \sum_{k=0}^{N} \vec{X}_k L_k(\tau), \quad \vec{u}(\tau) \approx \sum_{k=0}^{N} \vec{U}_k L_k(\tau) $$
The dynamics constraint \(\dot{\vec{x}} = f(\vec{x}, \vec{u}, t)\) is enforced at the collocation points \(\tau_m\) by differentiating the polynomial approximation, which can be done via a differentiation matrix \(D\):
$$ \sum_{k=0}^{N} D_{mk} \vec{X}_k – \frac{t_f – t_0}{2} f(\vec{X}_m, \vec{U}_m, \tau_m) = 0, \quad m = 1,…,N $$
The complete multi-drone problem minimizes a composite cost function \(J\), such as total flight time or energy, subject to the discretized dynamics for all drones, the virtual spring-based formation cost term, and all boundary and path constraints (e.g., \(V_{min} \le V \le V_{max}\), \(|\gamma_V| \le \gamma_{max}\)).
Integrated Methodology for Formation Trajectory Optimization
Our proposed framework integrates the two concepts above into a cohesive pipeline for generating optimal formation trajectories. The process is particularly designed for scenarios like a pre-programmed formation drone light show sequence requiring a complex maneuver.
1. Problem Formulation: Define the number of drones \(N\), the desired formation shape (specifying all \(l_0^{ij}\)), and the collective mission. This includes the initial and final conditions for the entire swarm (positions, velocities) and any intermediate waypoints or state constraints. For a formation drone light show, the final condition might be the starting position for the next animation frame.
2. Cost Function Design: Construct a multi-objective cost function. A typical formulation is:
$$ J = w_t (t_f – t_0) + w_e \int_{t_0}^{t_f} \sum_{i=1}^N T_i(t) \, dt + w_f E_{form} $$
where \(w_t, w_e, w_f\) are weights balancing time, energy, and formation-keeping importance.
3. hp-Adaptive Transcription & Solution: The continuous-time problem is transcribed using the hp-adaptive pseudospectral method. An initial mesh and polynomial order are guessed. The resulting large-scale NLP is solved using a solver like SNOPT or IPOPT. The hp-adaptivity algorithm then analyzes the solution residual and refines the mesh/interpolants to achieve a desired accuracy tolerance.
4. Trajectory Output: The solver outputs optimal state and control histories (\(\vec{X}_k, \vec{U}_k\)) for each drone at the collocation points. These can be interpolated to provide high-resolution reference trajectories for a lower-level flight controller to track.
The key parameters for the algorithm and standard UAV constraints used in our simulations are summarized below:
| Parameter Type | Parameter Name | Typical Value/Range |
|---|---|---|
| Algorithm Parameters | Virtual Spring Constant (\(k_s\)) | 10 – 50 N/m |
| hp-Adaptive Tolerance | \(10^{-6}\) | |
| Max Polynomial Degree (\(p_{max}\)) | 12 | |
| Cost Weights (\(w_t, w_e, w_f\)) | Scenario-dependent | |
| UAV Constraints | Velocity (\(V\)) | \(15 \text{ m/s} \le V \le 35 \text{ m/s}\) |
| Bank Angle (\(\gamma_V\)) | \(|\gamma_V| \le 45^\circ\) | |
| Thrust (\(T\)) | \(0 \le T \le T_{max}\) | |
| Load Factor | \(n \le n_{max}\) (e.g., 3-4 g) |
Simulation Experiments and Performance Analysis
To validate our approach, we conducted extensive numerical simulations for a squadron of four fixed-wing UAVs tasked with executing a challenging 90-degree coordinated turn while maintaining a tight diamond formation—a common element in a dynamic formation drone light show opening sequence. The baseline scenario compared our integrated method against a standard leader-follower (L-F) strategy and a basic artificial potential field (APF) method.
The performance was quantified using several metrics: Average Position Error (deviation from ideal formation position), Maximum Formation Distortion (max relative distance error between any two drones), and Control Effort (integrated thrust usage). The results from the baseline turn maneuver are summarized below:
| Method | Avg. Pos. Error (m) | Max Formation Distortion (%) | Control Effort (relative units) | Successful Formation Keep? |
|---|---|---|---|---|
| Leader-Follower (L-F) | 12.5 | 42.7 | 1.00 (baseline) | No |
| Artificial Potential Field (APF) | 8.3 | 18.9 | 1.32 | Partial |
| Proposed (VS-hpPS) | 2.1 | 4.8 | 1.15 | Yes |
The proposed Virtual Spring-hp Pseudospectral (VS-hpPS) method clearly outperforms the others, maintaining formation integrity with minimal distortion and low tracking error, while using only moderately more energy than the simplistic (but failing) L-F approach. The APF method, while better than L-F, consumes significantly more energy due to oscillatory corrective actions and still allows substantial distortion.
Adaptation to 3D Terrain and Wind Disturbances
A critical test for any formation planning algorithm is its ability to adapt to non-ideal environments. For a formation drone light show, this might mean operating in a city with wind gusts. We extended our simulations to include 3D terrain following and stochastic wind disturbances. The drone dynamics were augmented with a z-axis equation:
$$ \frac{dh}{dt} = V \sin(\gamma) $$
where \(h\) is altitude and \(\gamma\) is the flight path angle. The virtual spring potential \(E_{form}\) was extended to 3D, and wind velocity \(\vec{V}_w\) was added to the aerodynamic equations, affecting true airspeed and angles. The hp-adaptive solver efficiently handled these added constraints. The results for terrain following over a sinusoidal ground profile are shown below:
| Terrain Type (Amplitude) | Avg. 3D Pos. Error (m) | Altitude Tracking RMSE (m) | Formation Volume Change (%) |
|---|---|---|---|
| Flat Terrain (Baseline) | 2.1 | 0.1 | +/- 1.5 |
| Rolling Hills (A=±30m) | 2.8 | 3.5 | +/- 5.2 |
| Mountainous (A=±75m) | 4.2 | 8.1 | +/- 11.7 |
The algorithm successfully coordinated the swarm to climb and descend while maintaining relative positions, though performance gracefully degrades with increasing terrain severity as expected. The “formation volume change” metric indicates the elastic nature of the virtual spring network, allowing the formation to stretch and compress slightly along the axis of climb/descent.
Robustness Analysis under Wind Disturbances
To test robustness, we introduced a Dryden wind turbulence model with varying intensities. The optimal trajectories generated by our offline planner were then simulated in a higher-fidelity environment with the wind disturbance. The controller’s task was to track the pre-computed optimal path. The virtual spring formulation provides inherent disturbance rejection, as off-position drones are pulled back by spring forces. Results for different mean wind speeds are shown below:
| Wind Condition (Mean Speed) | Formation Break? (Y/N) | Avg. Tracking Error Increase vs. Calm (m) | Recovery Time after Gust (s) |
|---|---|---|---|
| Light Breeze (3 m/s) | N | +0.5 | < 2.0 |
| Moderate Wind (8 m/s) | N | +2.1 | < 5.0 |
| Strong Gusts (15 m/s)* | Partial** | +7.8 | ~10.0 |
* Exceeds nominal design envelope. ** Formation degraded but re-established after gust passed.
The simulation demonstrates that the method is robust to reasonable environmental uncertainties. The combination of an optimally planned nominal path and the reactive virtual spring corrective forces creates a system well-suited for real-world deployment, including open-air formation drone light show events where wind is a constant factor.
Discussion and Conclusion
The integration of a virtual spring-based formation control metaphor with an hp-adaptive pseudospectral optimal control solver presents a powerful framework for generating precise, feasible, and resilient trajectories for UAV swarms. The virtual springs provide a natural, decentralized-like mechanism for maintaining formation shape elasticity, preventing rigid failures and allowing graceful degradation under stress. The hp-adaptive pseudospectral method offers a computationally efficient and highly accurate means to solve the resulting complex multi-agent optimal control problem, directly handling state and control constraints that are critical for safe flight.
This approach has direct and significant implications for the design of advanced formation drone light show systems. It moves beyond simple waypoint following, enabling the creation of shows with complex, dynamically changing shapes that execute smooth, coordinated maneuvers impossible with simpler algorithms. The ability to formally incorporate constraints (like maximum bank angle and speed) ensures the generated shows are not only beautiful but also safe and flyable by real drones.
Future work will focus on several extensions. First, real-time replanning capabilities could be integrated using a model predictive control (MPC) scheme that leverages the same virtual spring and pseudospectral concepts over a receding horizon. This would allow a formation drone light show to dynamically adapt to unforeseen obstacles or last-minute script changes. Second, scaling the method to very large swarms (hundreds of drones) requires efficient distributed computation strategies. Finally, incorporating more detailed aerodynamic interaction models between closely flying drones (e.g., wake effects) would further enhance the physical fidelity of the planned trajectories. Ultimately, the synergy of biological-inspired coordination rules and rigorous numerical optimization paves the way for increasingly intelligent and spectacular autonomous aerial systems.
