1. Introduction
The objective of cooperative control of multi-agent systems is to enable multiple agents to collaborate under specific conditions, thereby optimizing overall system performance [
1]. This has attracted extensive research from numerous scientists, encompassing areas such as cooperative control, formation control, flocking control, distributed sensor networks, and satellite cluster attitude alignment, among others [
2,
3,
4,
5,
6,
7]. Particularly in multi-agent systems, the dynamic behavior of each agent is influenced by the others, necessitating the consideration of inter-agent relationships and interactions to achieve the distributed cooperative control of a UAV swarm.
In nature, flocking refers to the collective movement behavior of a large number of biological individuals forming a biological community, which emerges from local information exchange and follows simple rules to exhibit global, complex behavior [
8,
9]. This phenomenon is observed in various contexts, such as bird migration and fish swimming in coordinated patterns, and is commonly referred to as “flocking behavior”. Flocking specifically describes the movement of a large number of autonomous individuals in space all moving in the same direction at a consistent speed while maintaining a constant distance from one another, voiding both separation and collision [
10]. The primary objective is to achieve a predefined desired distance between neighboring agents while also ensuring that all agents converge to a uniform speed without requiring a fixed topology. Current research focuses on enhancing the efficiency, robustness, and adaptability of algorithms, as well as addressing challenges related to communication limitations and dynamic environments.
The research on flocking control can be traced back to 1987, when Reynolds utilized three fundamental principles observed in biological groups, repulsion, cohesion, and alignment, to computationally simulate the dynamics of collective behavior, resulting in the seminal Boid model [
11]. This model has since been widely embraced and utilized as a foundational framework, where the velocities, sizes, and directions of individuals within a flock tend to stabilize into a consistent state over time. Expanding on Reynolds’ work, Hungarian scientist Vicsek [
12] proposed the Vicsek model, which describes how individuals align their movements based on the average direction of their neighbors. Subsequently, researchers have used various mathematical tools for rigorous theoretical analysis and modeling of flocking control, such as graph theory and stability theory, to demonstrate the stability and convergence of the system. In 2004, Olfati-Saber et al. [
13] successfully summarized the communication topological relationships between agents as a network communication topological graph by analyzing a first-order dynamic model problem with time delay and changing topology. This provided a geometric or geometrical interpretation of the three rules of flocking behavior. This method laid the foundation for consensus control theory.
In recent years, extensive research has been conducted globally on consensus control for unmanned aerial vehicle (UAV) swarms. This field focuses on enabling multi-agent systems to exhibit collective behaviors and maintain coherent formations [
14,
15]. To tackle the associated challenges, researchers have pursued diverse methodologies, which can be broadly categorized as follows: 1. Distributed control based on graph theory. Graph theory is used to describe the communication topology among UAVs, and consensus protocols are designed to achieve state synchronization. Wang proposed a multi-layer graph model to improve the scalability of the network topology in large-scale swarms and designed a multi-layer recursive consensus control concept to achieve consensus among UAVs [
16]. 2. Bio-inspired algorithms. Drawing inspiration from natural collective behaviors such as bird flocking and fish schooling, methods like the Boid model achieve self-organized coordination through separation, alignment, and cohesion rules. Guo [
17] introduced a distributed flocking control strategy aimed at enhancing swarm consistency and robustness under limited communication conditions. It demonstrated that the formation of critical nodes or links significantly impacts the swarm’s overall robustness. Han et al. [
18] developed a hierarchical cooperative control framework inspired by herding behavior to address limitations in formation maintenance observed in traditional bio-inspired approaches, with simulations demonstrating improved consistency during obstacle avoidance [
18]. Gao Fei’s team at Zhejiang University [
19] conducted a field experiment where a UAV swarm navigated through a bamboo forest using a bird-inspired trajectory planning algorithm integrated with a distributed optimization framework, achieving dynamic obstacle avoidance while preserving formation integrity. 3. Reinforcement learning and optimization algorithms. Leveraging deep reinforcement learning (DRL) and model predictive control (MPC), these approaches optimize swarm behaviors for complex tasks. Bai et al. [
20] integrated DRL with an instinctive repulsion mechanism to develop a distributed control strategy, achieving an 82.2% success rate in dynamic obstacle avoidance scenarios—markedly outperforming conventional methods [
20]. Aiming at the problem of target rounding by UAV swarms in complex environments, this paper proposes a goal consistency reinforcement learning approach based on multi-head soft attention (GCMSA) [
21]. Yang Yaodong’s team at Peking University [
22] proposed a decentralized model learning framework that enables efficient coordination among hundreds of agents in power grid and transportation systems via localized model prediction and branch rollout strategies, reducing communication overhead by over 30%. Additionally, Xu [
23] proposed a decentralized airborne swarm omnidirectional visual–inertial–ultrawideband (UWB) state estimation system to address the issues such as observability, complex initialization, insufficient precision, and lack of global consistency.
In summary, while researchers have explored diverse methodologies, consensus-based approaches inherently face challenges including design complexity, communication constraints, and limited adaptability. The intricate process of formulating consensus algorithms and control laws underscores the need for simplified models that capture the fundamental principles of collective behavior. Developing a swarm dynamics model that aligns with the intrinsic characteristics of UAV collectives could offer a path toward efficient flocking control [
24].
Molecular dynamics (MDs) is a comprehensive technique that merges mathematics, physics, and chemistry. It relies on Newtonian mechanics to model the motion of molecular systems [
25]. In a molecular system, molecules experience a variety of interatomic forces, such as van der Waals forces and Coulomb forces, which collectively dictate molecular acceleration. Given the initial positions and velocities of molecules, their subsequent positions, velocities, and accelerations over time can be computed incrementally. This concept aligns with the operational principles of UAV swarm. Potential functions describe the correlation between the intermolecular forces and the distances separating them. Common potential function models include the Lennard-Jones potential [
26], Morse potential [
27], and so on. The potential function has the advantages of simple design, easy control, and high robustness.
In the development of a UAV swarm model, it is essential to maintain a constant relative distance between individual UAVs. When this distance is diminished, a substantial repulsive force is required to prevent collisions. Conversely, when UAVs are farther apart a subtle attractive force should come into play, ensuring cohesive control of the swarm: a concept resonant with the fundamentals of molecular dynamics. This paper adopts the principles of molecular dynamics, treating each UAV within the swarm as a molecular equivalent and modeling the inter-UAV forces as akin to van der Waals forces, with the Morse potential function serving as a proxy for these interactions, thereby constructing a coherence control model for UAV swarms.
The novel contribution of this paper lies in its foundation on the Vicsek model and the use of the Lennard-Jones potential function to shape an attraction–repulsion mechanism, facilitating collision avoidance and the emergence of flocking behavior. Moreover, a multi-tiered pinning control strategy is employed as a consensus protocol, guiding the navigational aspects of the swarm. This approach yields a dynamic model for UAV swarms that not only achieves flocking control but also allows for adjustments in the coverage area through balancing distance, thereby accommodating diverse mission scenarios such as wide-area surveillance, hovering, and collective aggregation or dispersion.
In this paper,
Section 2 delves into the basic method of molecular dynamics and emphasizes the two potential functions.
Section 3 constructs the dynamic model of the UAV swarm by emulating molecular dynamics.
Section 4 is the proof of the stability of this method.
Section 5 validates the model through simulation experiments, evaluating the impact of various potential functions on the swarm’s dynamics.
Section 6 offers a summary of the findings.
2. Fundamentals of Molecular Dynamics
This section introduces the core principles of molecular dynamics, focusing on the mathematical foundations and interatomic force models that inspire the UAV swarm control strategy. Two critical potential functions—Lennard-Jones and Morse—are analyzed in detail to illustrate their roles in simulating attractive and repulsive interactions which form the basis for designing UAV swarm dynamics.
2.1. Overview of Molecular Dynamics
Molecular dynamics is rooted in Newtonian mechanics, i.e., classical mechanics, where Newton’s second law serves as the core of classical mechanics. Based on this theory, given the mass of a point particle, its initial velocity, initial position, and a force function dependent on these, selecting a sufficiently small time step allows us to accurately determine all motion information of the particle.
The fundamental task of molecular dynamics is to obtain the positions and momenta of the studied system at different times and then use statistical mechanics to derive the desired physical quantities, explaining the properties and behaviors of the system. The gain and parameter of the potential functions are shown in
Appendix A.
2.2. Lennard-Jones Potential Function
The Lennard-Jones potential, also known as the L-J potential, is primarily used in molecular dynamics to simulate simple liquids—substances where atomic interactions are solely van der Waals forces. Dependent on the pairwise distance as its only variable, the Lennard-Jones potential involves two parameters. Taking the 12-6 potential as an example, its mathematical form is given by the following:
where
represents the depth of the potential well, defined as the absolute value between the minimum of the potential energy and the zero point—this is termed the characteristic energy of the potential function. The zero point of the potential energy is located at the pairwise distance where the intermolecular potential energy is exactly zero, denoted as
, which serves as the characteristic length of the potential function. Alternatively, the potential function can be expressed as follows:
where
denotes the distance between the two bodies at the bottom of the potential energy well. At this point the potential energy reaches a minimum, the repulsive force is equal to the attractive force, the force at this point is zero, and the derivative of the potential energy with respect to the position is zero; this point is also known as the equilibrium position. When the system is in equilibrium, the distance between the atoms is also roughly near the equilibrium position and its potential energy is negative. When
, two atoms behave in a mutually repulsive manner; when
, two atoms behave in a mutually attractive manner. From the point of view of physical significance,
is for the two body distance closer to the mutual repulsive force of the main action term; conversely,
is for the two body distance farther to the mutual attraction of the main action term.
Figure 1 shows the 12-6 potential and its force curve.
The pairwise force corresponding to the Lennard-Jones potential is given by the following:
where
denotes the pairwise distance at the bottom of the potential well where the intermolecular force between the two bodies is zero. The following equation can also be observed:
From the potential energy curve, it can be observed that when r is large the potential energy approaches zero and its derivative also tends to zero. This means that when two atoms are far apart, their interaction can be neglected. Therefore, in practical calculations, a truncated Lennard-Jones potential is employed. The distance at which truncation occurs is termed the cutoff radius, typically set to approximately 2.5σ. The L-J potential (n = 12) and its extended versions are all classified as pair potentials, meaning that the interaction between two atoms depends solely on that specific pair and is independent of other neighboring atoms.
2.3. Morse Potential Function
The Morse potential serves as a fundamental mathematical model in molecular dynamics, primarily designed to simulate interactions within diatomic molecules. It explicitly incorporates bond length variations between atoms, enabling an accurate description of the interplay between attractive and repulsive forces. The Morse potential effectively models the interatomic interactions as the distance between atoms changes. Its basic mathematical form is given by the basic form of the Morse potential function, which is as follows:
where
is the interaction potential energy between two atoms.
is the dissociation energy of the molecule, i.e., the energy required to completely separate the two atoms.
is the equilibrium distance between atoms, defined as the interatomic distance in the molecule when the energy is at its minimum
is a parameter characterizing the width of the potential energy curve, which is related to the strength of the interatomic interaction
is the distance between the two atoms.
The pairwise force corresponding to the Morse potential is given by the following:
where
,
, and
. This indicates that the force between the two atoms at the equilibrium position is 0, which is in accordance with the physical concept that the potential energy is minimized and force balanced at the equilibrium position. When
,
is an attractive force. Now,
,
, and the atom approach the equilibrium position. When
,
is the repulsive force, and then
, so
and the atom moves away from the equilibrium position.
Figure 2 shows the Morse potential and its force curve.
5. Simulation Experiment
To validate the proposed molecular dynamics-based control strategy, this section presents a series of simulation experiments. The impact of different potential functions and swarm sizes on consensus performance is systematically evaluated, along with three-dimensional applicability tests. Experimental results demonstrate the effectiveness of the Morse potential in accelerating convergence and ensuring collision-free swarming behavior.
5.1. Experimental Design and Parameter Selection
A two-degree-of-freedom dynamic model of quadrotor UAVs was developed, incorporating actuator constraints to mimic the following real-world flight scenarios: a ±270° heading angle limitation and a linear velocity threshold of 0.3 m/s. The UAV swarm was configured with a fully connected communication topology and an inter-agent equilibrium distance of 1 m. The framework was constructed using the truncated potential function, and its truncation distance is 2 m. of Morse potential is set as 1 and ε of L-J potential is set as 1. To guarantee the reliability of experimental outcomes, each test was replicated 10 times, and the average convergence time was adopted as the final result. In this study, theoretical mathematical simulations were conducted to validate the proposed algorithm under idealized conditions. The system dynamics were modeled using (12)–(16). The simulation experiment was verified using Matlab 2019a, and the PC is Acer N22C1.
This research presents a comprehensive validation framework for UAV swarm consensus control, systematically evaluating the effects of potential functions and system parameters on convergence performance. In fixed-scale scenarios (
n = 40 agents), the empirical comparisons that were conducted include Lennard-Jones potentials with varying exponents, Morse potentials with parametric variations, the baseline Vicsek model, and a Gaussian kernel-enhanced Vicsek variant [
28]. Standardized metrics were established to quantify consensus time and accuracy across models. Building upon baseline validations, the parameter space was expanded to investigate swarm size effects. A multi-level consensus evaluation system was constructed to investigate the time costs required for UAV swarms of different scales to achieve varying consensus levels and analyze the influence law of swarm size on time performance. Finally, 3D simulations verified the method’s scalability to three-dimensional operational environments.
5.2. Experiment 1: Effect of Different Potential Functions
The number of the UAV swarm is fixed at 40 to verify the effect of different potential functions on the consistency of the swarm. Different powers of the Lennard-Jones potential function (
n = 4, 8, and 12) and
α of Morse potential function (
α = 0.5, 1, and 2) are chosen, respectively. The different potential function curves are shown in
Figure 3. For example, in the Morse potential function the value of
α affects the steepness of the potential energy curve and thus influences the rate of change in the interaction force between UAVs with distance. A smaller value of
α makes the changes in the attractive and repulsive forces relatively gentle, which is beneficial for the UAV swarm to maintain a stable relative position relationship within a large range and also shows a faster speed of achieving consistency and smaller fluctuations in the experiment. The states at different moments are shown in
Figure 4. The arrow direction is the direction of UAV speed:
Figure 5 shows the flight trajectory of the UAV swarm and
Figure 6 shows the variation curve of the sequence parameters.
Table 1 shows the time required for the UAV swarm to reach consistency.
To verify the repeatability of the method, 10 sets of UAV swarms with different initial states were used as verification. Through experimental verification, it can be known that the standard Vicsek method exhibits relatively poor repeatability. The reason is that each particle adds a random angle (such as Gaussian white noise) when updating its direction, leading to possible differences in the specific trajectories of each simulation even with completely identical initial conditions, thus causing larger fluctuations. Additionally, it cannot achieve a higher level of consensus. The UAV swarm control method based on molecular dynamics requires approximately 30 s to achieve consensus, among which the result of the Morse potential function is slightly better than that of the L-J potential function. The reason lies in the difference in the strength of their attractive forces. Additionally, the Vicsek model and its Gaussian kernel-enhanced variant rely on random noise for direction updates, omit explicit repulsive force modeling, and lack collision avoidance terms, rendering them susceptible to collisions. In contrast, our molecular dynamics-based approach generates substantial repulsive forces when UAVs approach close proximity, attributable to the inclusion of a repulsive term, thereby eliminating collision occurrences. However, since both the Lennard-Jones potential and Morse potential are pair-wise potential functions they neglect multi-agent interactions, consequently leading to ineffective system convergence to equilibrium distance.
As shown in
Figure 3, the attractive and repulsive forces of the Morse potential with
α = 0.5 change relatively smoothly with distance and so the generated fluctuations are relatively small, allowing faster consensus achievement with relatively stable time. For each potential function, as the attractive and repulsive forces increase, the time required to achieve consensus gradually increases and the uncertainty also continuously increases.
5.3. Experiment 2: Impact of Swarm Size
The UAV swarm sizes are set to 20, 40, and 100, and the rest of the parameters are consistent with Experiment 1. We then verify the effect of different swarm sizes on the consistency of UAVs. The time of Morse potential (
α = 0.5) to reach consistency in different sizes of UAV swarm is shown in
Table 2.
Figure 7 shows the working state of the UAV swarm of different sizes at different moments under the Morse potential (
α = 0.5).
Figure 8 shows the flight trajectories of the UAV swarm of different sizes. The UAV swarm size is directly proportional to the convergence speed of UAVs, but there is a problem of large dependence on the initial value.
Figure 9 shows the variation curves of the ordinal coefficients of the L-J potential and Morse potential function at different UAV scales. During the simulation, it was found that although the Morse and L-J potential functions effectively avoid collisions under normal conditions, they fail to converge to the equilibrium distance in extreme scenarios (such as dense swarm conditions). Moreover, as the swarm scale increases, the UAV density increases, causing the equilibrium distance to be smaller than the preset value.
Both of the two methods can effectively achieve consistency control. By introducing the Morse potential function to construct the system model, the convergence process can be significantly accelerated. In the application scenarios of UAV swarms of different scales, the convergence speed is increased by an average of 26% compared with the situation without using this function, which greatly optimizes the efficiency of the swarm in tasks such as achieving consistency.
5.4. Experiment 3: Consistency Verification Test in Three-Dimensional Space
A swarm of 40 unmanned aerial vehicles (UAVs) was employed to verify the consistency of collective behavior in three-dimensional space. A total of 10 sets of UAV swarms with different initial states were used as verification. To model real-world conditions, a three-dimensional analytical dynamics framework was constructed using the truncated Morse potential function, and its truncation distance was set to 2 m. An inertia coefficient of 0.8 was specified to ensure the swarm adheres to inertial flight dynamics.
Figure 10 illustrates the swarm’s configurations at discrete time instances, where arrow orientations denote the velocity directions of individual UAVs.
Figure 11 presents the trajectory profiles of the UAV swarm, visualizing its spatiotemporal movement patterns in the three-dimensional domain. Experimental validation confirms that the proposed method effectively achieves consistency control in three-dimensional space.
Figure 12 shows the variation curve of the sequence parameters in three-dimensional space. When the order parameter of the UAV swarm reaches 95%, its consensus time is 8.8 ± 1.4 s, demonstrating its effective achievement of consensus. The UAV swarm achieves consensus faster than in two-dimensional experiments, which is attributed to the introduction of an inertial coefficient. This inertial coefficient reduces the fluctuations in directional changes in each UAV, thereby enabling faster attainment of directional consensus.
6. Conclusions
This study presents a molecular dynamics-based consistency control framework for UAV swarms, addressing the challenge of achieving efficient and stable collective behavior in complex scenarios. This method has important application significance for the requirements of different mission scenarios of UAV swarms, such as wide-area reconnaissance, hovering, and aggregation and diffusion of the swarm. Drawing inspiration from interatomic interactions, each UAV is modeled as a “molecule”, with inter-UAV forces described by potential functions that emulate the balance between attractive (cohesion-maintaining) and repulsive (collision-avoiding) forces—principles rooted in natural particle dynamics. This approach leverages scalable, low-complexity potential functions, specifically the Lennard-Jones and Morse potentials, to construct a Vicsek-based dynamic model for swarm interactions. Lyapunov stability analysis confirms that the system converges to a consistent state. The framework facilitates the emergence of self-organized swarming, enhancing both collaborative efficiency and robustness. Experimental results demonstrate the superior performance of the Morse potential in consistency control as a 40-UAV swarm achieves 90% consistency in 26.6 ± 0.4 s under α = 0.5, outperforming the best Lennard-Jones configuration by 26%. This superiority is attributed to the Morse potential’s smoother force–distance profile, which balances responsiveness and stability across varying swarm scales.
In the future, we will conduct further research specifically on aspects such as scalability and computational complexity. We will discuss strategies to adapt our methods to larger-scale systems. Furthermore, we plan to use many-body potential functions such as the Tersoff potential and the EAM potential to address the issue of the convergence distance and further optimize the process to reduce its time complexity. Finally, we will refine the model in the three-dimensional space to make it more consistent with real-world scenarios.