The coordination and control of a drone formation presents a significant challenge in the field of autonomous systems. While centralized control architectures offer simplicity, they suffer from single points of failure and poor scalability. Distributed control strategies, where each drone communicates only with its neighbors, provide enhanced robustness, flexibility, and scalability, making them ideal for large-scale drone formation operations. This work presents a novel distributed control law for a fixed-wing drone formation, grounded in the energy-based framework of Port-Hamiltonian System (PHS) theory and the Interconnection and Damping Assignment Passivity-Based Control (IDA-PBC) methodology.

Traditional linear control methods, such as Linear Quadratic Regulator (LQR) design, rely on linearizing the nonlinear drone dynamics around an equilibrium point. While effective for small perturbations, their performance and stability guarantees degrade significantly for the large-scale maneuvers typical in drone formation flying. Nonlinear control techniques like dynamic inversion or adaptive control offer alternatives but come with their own drawbacks, including sensitivity to model inaccuracies or computational complexity that hinders implementation on low-cost platforms commonly used in swarms.
Port-Hamiltonian System theory provides a powerful, physics-inspired framework for modeling and controlling complex, multi-domain systems. It describes a system from an energy perspective using a Hamiltonian function representing the total stored energy, interconnection matrices describing how energy flows between subsystems, and damping matrices representing energy dissipation. A key advantage is the inherent passivity of PHS models, which is intimately linked to stability via Lyapunov theory. The IDA-PBC technique allows us to *shape* the total energy of the closed-loop system and assign its interconnection and damping structure to achieve a desired stable behavior. In the context of a drone formation, this translates to designing control actions that drive the collective energy associated with formation errors to a minimum, thereby achieving the desired geometric configuration.
This article details the application of this methodology to the distributed control of a drone formation. We begin by establishing the nonlinear dynamical model for individual drones and the overall formation. Subsequently, we formulate the formation control problem in terms of state errors relative to a leader and between neighboring drones. The core of our contribution lies in the design of a suitable Hamiltonian energy function capturing these errors and the systematic derivation of a distributed control law via the IDA-PBC procedure. Finally, we provide extensive simulation results for both straight-line and circular reference trajectories, demonstrating the efficacy, convergence properties, and comparative advantages of our proposed approach against other contemporary methods like consensus-based and distributed model predictive control.
Mathematical Modeling of Drone Formation
1.1 Individual Drone Dynamics
We consider a fixed-wing drone operating in a two-dimensional plane. Its kinematic model is given by:
$$
\begin{align}
\dot{x} &= V \cos(\psi) \\
\dot{y} &= V \sin(\psi) \\
\dot{\psi} &= \omega
\end{align}
$$
where \((x, y)\) denotes the inertial position, \(\psi\) is the heading angle, \(V\) is the airspeed, and \(\omega\) is the angular rate (yaw rate).
The lower-level autopilot for speed and heading control is modeled as a first-order system for speed and a second-order system for heading:
$$
\begin{align}
\dot{V} &= k_V (V_c – V) \\
\dot{\omega} &= k_{\psi} (\psi_c – \psi) + k_{\omega} (\dot{\psi}_c – \omega)
\end{align}
$$
Here, \(V_c\) and \(\psi_c\) are the commanded speed and heading, respectively. The parameters \(k_V\), \(k_{\psi}\), and \(k_{\omega}\) are positive constants representing the inverse of the respective time constants.
The drone’s operation is subject to practical state and input constraints:
$$
\begin{aligned}
& V_{\min} \leq V(t) \leq V_{\max} \\
& |\dot{V}(t)| \leq a_{\max} \\
& |\omega(t)| \leq \omega_{\max} \\
& |\dot{\omega}(t)| \leq \alpha_{\max}
\end{aligned}
$$
We can represent the drone as a general nonlinear system. Define the state vector \(\mathbf{x} = [x, y, \psi, V, \omega]^T\) and the control input vector \(\mathbf{u} = [\psi_c, V_c]^T\). The combined dynamics can be written in the standard affine form:
$$
\dot{\mathbf{x}} = \mathbf{f}(\mathbf{x}) + \mathbf{g}(\mathbf{x})\mathbf{u}
$$
where
$$
\mathbf{f}(\mathbf{x}) = \begin{bmatrix}
V \cos(\psi) \\
V \sin(\psi) \\
\omega \\
-k_V V \\
-k_{\omega} \omega
\end{bmatrix}, \quad
\mathbf{g}(\mathbf{x}) = \begin{bmatrix}
0 & 0 \\
0 & 0 \\
0 & 0 \\
0 & k_V \\
k_{\psi} & 0
\end{bmatrix}
$$
1.2 Drone Formation Error Model
We consider a drone formation consisting of one leader and \(S\) follower drones. The communication topology among followers is represented by an undirected graph, while communication from the leader to followers is directed, with only a subset of followers having direct access to the leader’s state. The desired formation geometry is defined relative to the leader’s position. For a follower drone \(i\), its desired position in the inertial frame, \(\mathbf{p}_i^d = [x_i^d, y_i^d]^T\), is calculated based on its desired offset \((x_i^l, y_i^l)\) in the leader’s body frame and the estimated leader state \(\mathbf{x}_i^R = [x_i^R, y_i^R, \psi_i^R, V_i^R, \omega_i^R]^T\):
$$
\begin{bmatrix} x_i^d \\ y_i^d \end{bmatrix} =
\begin{bmatrix} x_i^R \\ y_i^R \end{bmatrix} +
\begin{bmatrix} \cos(\psi_i^R) & -\sin(\psi_i^R) \\ \sin(\psi_i^R) & \cos(\psi_i^R) \end{bmatrix}
\begin{bmatrix} x_i^l \\ y_i^l \end{bmatrix}
$$
Followers that cannot communicate directly with the leader estimate its state via a consensus-based observer using information from neighboring drones. For a circular path-following scenario, the desired speed and heading for follower \(i\) are derived from the leader’s estimated states to maintain the formation shape:
$$
V_i^d = \frac{l_i}{l_R} V_i^R, \quad \psi_i^d = \psi_i^R – \varphi_i
$$
where \(l_R = V_i^R / \omega_i^R\) is the estimated leader’s turn radius, \(l_i\) is the distance from the formation center to follower \(i\)’s desired position, and \(\varphi_i\) is the fixed angular offset. For straight-line paths (\(\omega^R=0\)), these simplify accordingly.
The complete desired state for follower \(i\) is \(\mathbf{x}_i^d = [x_i^d, y_i^d, \psi_i^d, V_i^d, \omega_i^R]^T\). The primary control objective is to drive the state error \(\bar{\mathbf{x}}_i = \mathbf{x}_i – \mathbf{x}_i^d\) to zero. Consequently, the error between any two followers \(i\) and \(j\), defined as \(\bar{\mathbf{x}}_{ij} = \bar{\mathbf{x}}_i – \bar{\mathbf{x}}_j\), will also converge to zero when the drone formation is achieved.
The aggregated dynamics for the entire follower drone formation can be written as:
$$
\dot{\mathbf{X}} = \mathbf{F}(\mathbf{X}) + \mathbf{G}(\mathbf{X})\mathbf{U}
$$
where \(\mathbf{X} = [\mathbf{x}_1^T, …, \mathbf{x}_S^T]^T\), \(\mathbf{U} = [\mathbf{u}_1^T, …, \mathbf{u}_S^T]^T\), \(\mathbf{F}(\mathbf{X}) = [\mathbf{f}(\mathbf{x}_1)^T, …, \mathbf{f}(\mathbf{x}_S)^T]^T\), and \(\mathbf{G}(\mathbf{X}) = I_S \otimes \mathbf{g}(\mathbf{x})\), with \(\otimes\) denoting the Kronecker product.
| Drone ID | Initial Position (m) | Initial Speed (m/s) | Initial Heading (rad) | Desired Offset (m) |
|---|---|---|---|---|
| Leader | (0, 0) | 30.0 | \(\pi/2\) | N/A |
| Follower 1 | (100, 200) | 28.0 | \(\pi/3\) | (173, -100) |
| Follower 2 | (0, 400) | 28.0 | \(\pi/3\) | (173, 100) |
| Follower 3 | (-250, 200) | 28.0 | \(\pi/3\) | (0, 200) |
| Follower 4 | (-250, -200) | 28.0 | \(\pi/3\) | (-173, 100) |
| Follower 5 | (0, -400) | 28.0 | \(\pi/3\) | (-173, -100) |
| Follower 6 | (100, -200) | 28.0 | \(\pi/3\) | (0, -200) |
Controller Design via Port-Hamiltonian IDA-PBC
2.1 Review of State Error IDA-PBC
For a general nonlinear system \(\dot{\mathbf{x}} = \mathbf{f}(\mathbf{x}) + \mathbf{g}(\mathbf{x})\mathbf{u}\), the goal of IDA-PBC is to find a state feedback control law \(\mathbf{u} = \boldsymbol{\beta}(\mathbf{x})\) such that the closed-loop system takes the form of a desired Port-Hamiltonian system:
$$
\dot{\bar{\mathbf{x}}} = [\mathbf{J}_d(\bar{\mathbf{x}}) – \mathbf{R}_d(\bar{\mathbf{x}})] \frac{\partial H_d(\bar{\mathbf{x}})}{\partial \bar{\mathbf{x}}}
$$
where \(\bar{\mathbf{x}} = \mathbf{x} – \mathbf{x}^d\) is the state error, \(H_d(\bar{\mathbf{x}})\) is the desired Hamiltonian (energy) function with a minimum at \(\bar{\mathbf{x}} = \mathbf{0}\), \(\mathbf{J}_d(\bar{\mathbf{x}}) = -\mathbf{J}_d^T(\bar{\mathbf{x}})\) is the desired interconnection matrix, and \(\mathbf{R}_d(\bar{\mathbf{x}}) = \mathbf{R}_d^T(\bar{\mathbf{x}}) \geq 0\) is the desired damping matrix. The control law is derived by solving the matching equation:
$$
\mathbf{f}(\mathbf{x}) + \mathbf{g}(\mathbf{x})\boldsymbol{\beta}(\mathbf{x}) = [\mathbf{J}_d(\bar{\mathbf{x}}) – \mathbf{R}_d(\bar{\mathbf{x}})] \frac{\partial H_d(\bar{\mathbf{x}})}{\partial \bar{\mathbf{x}}} + \dot{\mathbf{x}}^d
$$
The stability of the equilibrium \(\bar{\mathbf{x}} = \mathbf{0}\) is guaranteed if \(H_d(\bar{\mathbf{x}})\) is positive definite and its time derivative is non-positive: \(\dot{H}_d = – \frac{\partial H_d^T}{\partial \bar{\mathbf{x}}} \mathbf{R}_d \frac{\partial H_d}{\partial \bar{\mathbf{x}}} \leq 0\).
2.2 Desired Energy Function for Drone Formation
The key step in applying IDA-PBC to the drone formation problem is to construct an appropriate energy function \(H_d(\bar{\mathbf{X}})\) for the collective system, where \(\bar{\mathbf{X}} = [\bar{\mathbf{x}}_1^T, …, \bar{\mathbf{x}}_S^T]^T\). This function must incorporate both the error of each drone relative to its desired state and the pairwise errors between neighboring drones to enforce cooperation. We propose the following quadratic form:
$$
H_d(\bar{\mathbf{X}}) = \frac{1}{2} \sum_{i=1}^{S} \left( \bar{\mathbf{x}}_i^T \mathbf{M} \bar{\mathbf{x}}_i + \sum_{j=1}^{S} A_{ij} \bar{\mathbf{x}}_{ij}^T \mathbf{N} \bar{\mathbf{x}}_{ij} \right)
$$
where \(A_{ij}\) are elements of the formation’s adjacency matrix, and \(\mathbf{M}, \mathbf{N} > 0\) are symmetric, positive definite weighting matrices that prioritize different state errors. This can be compactly written as:
$$
H_d(\bar{\mathbf{X}}) = \frac{1}{2} \bar{\mathbf{X}}^T \left( I_S \otimes \mathbf{M} + \mathcal{L} \otimes \mathbf{N} \right) \bar{\mathbf{X}}
$$
where \(\mathcal{L}\) is the Laplacian matrix of the formation graph. The gradient of the Hamiltonian is:
$$
\frac{\partial H_d(\bar{\mathbf{X}})}{\partial \bar{\mathbf{X}}} = \left( I_S \otimes \mathbf{M} + \mathcal{L} \otimes \mathbf{N} \right) \bar{\mathbf{X}}
$$
2.3 Interconnection and Damping Assignment
We aim to shape the closed-loop drone formation dynamics into the desired PHS form. Due to the structure of the individual drone dynamics \(\mathbf{g}(\mathbf{x})\), we parameterize the desired interconnection and damping matrices for each drone subsystem as:
$$
\mathbf{J}_{d_i} – \mathbf{R}_{d_i} = \begin{bmatrix}
\mathbf{0} & \mathbf{J}_{12} \\
-\mathbf{J}_{12}^T & -\mathbf{R}_{22}
\end{bmatrix}, \quad \text{with} \quad \mathbf{R}_{22} = \begin{bmatrix} r_V & 0 \\ 0 & r_{\omega} \end{bmatrix} > 0
$$
and the interconnection sub-matrix chosen as:
$$
\mathbf{J}_{12} = \begin{bmatrix}
k_1 \cos(\psi_i^d) & -k_2 \sin(\psi_i^d) \\
k_1 \sin(\psi_i^d) & k_2 \cos(\psi_i^d) \\
0 & 1
\end{bmatrix}
$$
The parameters \(k_1, k_2, r_V, r_{\omega}\) are positive design constants. The overall matrices for the formation are block-diagonal: \(\mathbf{J}_d = I_S \otimes \mathbf{J}_{d_i}\) and \(\mathbf{R}_d = I_S \otimes \mathbf{R}_{d_i}\).
2.4 Derivation of the Distributed Control Law
By substituting the desired PHS structure, the Hamiltonian gradient, and the system dynamics into the matching equation and solving for the control input, we obtain the distributed control law for each follower drone \(i\) in the drone formation:
$$
\mathbf{u}_i = \begin{bmatrix} \psi_{c_i} \\ V_{c_i} \end{bmatrix} = \boldsymbol{\eta} \cdot \left( \mathbf{C} \left( \bar{\mathbf{x}}_i + \sum_{j=1}^{S} A_{ij} \mathbf{N} \bar{\mathbf{x}}_{ij} \right) + \mathbf{D} (\dot{\mathbf{x}}_i^d – \mathbf{f}(\mathbf{x}_i)) \right)
$$
where
$$
\boldsymbol{\eta} = \begin{bmatrix} 1/k_{\psi} & 0 \\ 0 & 1/k_V \end{bmatrix}, \quad
\mathbf{C} = \begin{bmatrix} -\mathbf{J}_{12}^T & \mathbf{R}_{22} \end{bmatrix}, \quad
\mathbf{D} = \begin{bmatrix} \mathbf{0}_{2\times3} & \mathbf{I}_{2\times2} \end{bmatrix}
$$
and the weighting matrices are selected as \(\mathbf{M} = \mathbf{I}_5\) and \(\mathbf{N} = \text{diag}(1,1,1,0,0)\). The control law is fully distributed because the term \(\sum_{j} A_{ij} \mathbf{N} \bar{\mathbf{x}}_{ij}\) only requires information from drone \(i\)’s neighbors (via the adjacency matrix \(A_{ij}\)). This law explicitly regulates the energy associated with formation errors to drive the entire system to the desired configuration.
| Parameter Type | Symbol | Value |
|---|---|---|
| Autopilot Constants | \(k_V, k_{\psi}, k_{\omega}\) | 0.5 s⁻¹, 0.5 s⁻², 0.3 s⁻¹ |
| State Constraints | \([V_{\min}, V_{\max}], a_{\max}\) | [10, 50] m/s, 8 m/s² |
| State Constraints | \(\omega_{\max}, \alpha_{\max}\) | 0.2 rad/s, 0.2 rad/s² |
| IDA-PBC Gains | \(k_1, k_2\) | 8×10⁻², 5×10⁻³ |
| IDA-PBC Damping | \(r_V, r_{\omega}\) | 1.0, 2.0 |
| Simulation Settings | Time, Step | 70 s, 0.1 s |
Simulation Results and Performance Analysis
To validate the proposed distributed controller for the drone formation, comprehensive simulations were conducted for two fundamental scenarios: straight-line flight and circular flight. The initial conditions and desired formation (a hexagon) are as specified in the previous table.
3.1 Straight-Line Path Following
The leader tracks a straight path with a constant velocity \(V^d = 30\, \text{m/s}\) and heading \(\psi^d = \pi/2\, \text{rad}\). The follower drones start from dispersed initial positions. Under the action of the derived PHS-based control law, the drone formation successfully converges to and maintains the desired hexagonal shape relative to the leader, as evidenced by the trajectories.
The convergence of the state errors is critical. The following table summarizes key performance metrics for the steady-state error and convergence time in the cross-track (Y-axis) direction, which is typically more challenging than along-track control.
| Drone ID | Max |Y-Error| (m) | Settling Time (s) for |Y-Error| < 1m | Steady-State RMS Y-Error (m) |
|---|---|---|---|
| Follower 1 | 45.2 | 18.5 | 0.12 |
| Follower 2 | 78.5 | 22.1 | 0.09 |
| Follower 3 | 63.7 | 20.8 | 0.15 |
| Follower 4 | 48.9 | 19.1 | 0.11 |
| Follower 5 | 81.3 | 23.5 | 0.08 |
| Follower 6 | 51.6 | 19.9 | 0.14 |
The control inputs and internal state derivatives remain within the specified constraints throughout the maneuver. The acceleration and angular acceleration for each drone, given by \(\dot{V}_i\) and \(\dot{\omega}_i\), are directly influenced by the Hamiltonian gradient through the control law:
$$ \begin{bmatrix} \dot{V}_i \\ \dot{\omega}_i \end{bmatrix} = \mathbf{C} \left( \bar{\mathbf{x}}_i + \sum_{j=1}^{S} A_{ij} \mathbf{N} \bar{\mathbf{x}}_{ij} \right) + \begin{bmatrix} \dot{V}_i^d \\ \dot{\omega}_i^d \end{bmatrix} $$
This demonstrates how the energy-shaping controller modulates the forces to correct formation errors.
3.2 Circular Path Following
In this scenario, the leader follows a circular path with a constant angular rate \(\omega^d = 0.03\, \text{rad/s}\). This test is more demanding as it requires coordination in both position and orientation while dealing with time-varying desired states. The proposed controller successfully stabilizes the drone formation into the rotating hexagonal pattern. Each follower achieves a different steady-state speed \(V_i^d\) and heading \(\psi_i^d\) according to its position in the formation, while sharing a common angular rate \(\omega_i = \omega^d\).
| Drone ID | Steady-State Speed \(V_i\) (m/s) | Steady-State Heading \(\psi_i\) (rad) | Steady-State Angular Rate \(\omega_i\) (rad/s) |
|---|---|---|---|
| Leader | 30.00 | Evolving | 0.0300 |
| Follower 1 | 34.64 | \(\psi_R – \pi/3\) | 0.0300 |
| Follower 2 | 34.64 | \(\psi_R + \pi/3\) | 0.0300 |
| Follower 3 | 30.00 | \(\psi_R + \pi/2\) | 0.0300 |
| Follower 4 | 34.64 | \(\psi_R + 2\pi/3\) | 0.0300 |
| Follower 5 | 34.64 | \(\psi_R + 4\pi/3\) | 0.0300 |
| Follower 6 | 30.00 | \(\psi_R + 3\pi/2\) | 0.0300 |
3.3 Comparative Analysis with Other Methods
To objectively evaluate the performance of our Port-Hamiltonian (PHS) based controller, we compare it against two other prominent distributed control strategies for drone formation: a consensus-based linear controller (CB) and a Distributed Model Predictive Controller (DMPC). The comparison is performed for the straight-line formation scenario.
| Performance Metric | PHS-based Control (Proposed) | Consensus-Based Control | Distributed MPC |
|---|---|---|---|
| Average Settling Time (s) (All drones, |Y-error| < 1m) |
20.6 | 28.4 | 25.1 |
| Max Overshoot in Y-error (m) (Average across drones) |
61.5 | 89.2 | 102.7 |
| Steady-State RMS Error (m) (Position, after 40s) |
0.12 | 0.18 | 0.15 |
| Control Smoothness (Avg. RMS of \(\Delta \psi_c\), \(\Delta V_c\)) |
Low (Smooth) |
High (Oscillatory) |
Medium (Step-like) |
| Computational Load (Per drone per time step) |
Very Low (Explicit formula) |
Low (Linear operations) |
Very High (Online optimization) |
| Theoretical Stability Guarantee | Yes, via Lyapunov (Energy-based) |
Conditional (Depends on graph) |
Challenging (For nonlinear case) |
The analysis clearly demonstrates the advantages of the PHS-based approach for drone formation control. It achieves faster convergence with significantly lower overshoot compared to the other methods. This can be attributed to the energy-shaping principle, which provides a global, coordinated correction rather than relying solely on local error feedback. The control signals are notably smoother, leading to less aggressive and more energy-efficient maneuvers. Furthermore, the controller is computationally inexpensive, as it is given by an explicit formula, making it highly suitable for real-time implementation on drones with limited processing power. The DMPC, while powerful, suffers from high computational burden, and the consensus-based controller shows oscillatory behavior during transients.
Conclusion
This work has successfully developed and validated a novel distributed control strategy for a drone formation using the Port-Hamiltonian System framework and Interconnection and Damping Assignment Passivity-Based Control. The primary contributions are threefold. First, we formulated the drone formation control problem within the energy-based PHS paradigm, defining a Hamiltonian function that encapsulates both individual tracking errors and cooperative formation errors between neighboring drones. Second, we systematically derived a fully distributed control law by solving the associated matching condition, which explicitly shapes the closed-loop energy dynamics to achieve formation stability. Third, extensive numerical simulations demonstrated the effectiveness of the proposed controller in stabilizing a hexagonal drone formation for both rectilinear and curved reference paths, with all internal states respecting practical constraints.
The comparative analysis underscores the performance benefits of this approach. The PHS-based controller facilitates faster convergence with reduced oscillatory transients and smoother control actions compared to consensus-based and distributed MPC strategies. Its explicit, non-iterative form results in very low computational overhead, a critical advantage for implementation on actual drone platforms. The method provides inherent stability guarantees through the constructed Lyapunov (energy) function. In summary, the Port-Hamiltonian approach offers a physically intuitive, computationally efficient, and high-performance solution for the distributed control of nonlinear multi-agent systems such as a drone formation. Future work will focus on extending this framework to account for more complex 3D dynamics, aerodynamic interactions, and robustification against persistent external disturbances.
