Next Article in Journal
Directional Pheromone Gradient Observations for Decentralized Multi-Agent Reinforcement Learning in Swarm Drone Search and Rescue
Previous Article in Journal
Frame Slotted ALOHA Access Control and Node Cardinality Estimation for UAV Ad Hoc Networks
Previous Article in Special Issue
A Multi-UAV Cooperative Mission Planning Method Based on Multi-Agent Guided Soft Actor–Critic
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Nonlinear Model Predictive Control Method for Trajectory Planning of UAV Swarms

1
School of Aeronautics and Astronautics, Sichuan University, Chengdu 610065, China
2
School of Mechanical Engineering, Sichuan University, Chengdu 610065, China
*
Author to whom correspondence should be addressed.
Drones 2026, 10(9), 647; https://doi.org/10.3390/drones10090647
Submission received: 23 March 2026 / Revised: 12 August 2026 / Accepted: 17 August 2026 / Published: 26 August 2026
(This article belongs to the Special Issue UAV Swarm Intelligent Control and Decision-Making)

Highlights

What are the main findings?
  • A distributed NMPC-based trajectory planning framework was developed for UAV swarms to jointly address terminal target reaching, formation maintenance, obstacle avoidance, and inter-UAV collision avoidance.
  • Control parameterization and exact-penalty-based constraint transcription were integrated to reduce online optimization complexity while generating dynamically feasible and collision-free trajectories.
What are the implications of the main findings?
  • The proposed framework improves the tractability of cooperative UAV swarm trajectory planning under coupled formation and safety constraints.
  • The results indicate that distributed NMPC is suitable for online cooperative planning of UAV swarms in obstacle-rich environments.

Abstract

Trajectory planning is a key enabling technology for UAV swarms operating in complex and obstacle-rich environments. This paper proposes a distributed nonlinear model predictive control (NMPC)-based trajectory planning method for UAV swarms, where terminal target reaching, prescribed formation maintenance, obstacle avoidance, and inter-UAV collision avoidance are incorporated into a unified predictive optimization framework. To reduce the online computational burden, a control parameterization strategy is introduced to describe the control input using M control segments, thereby reducing the dimension of the online decision variables. Furthermore, an exact-penalty-based constraint transcription method is developed to transform the original constrained optimal control problem into a lower-complexity finite-dimensional nonlinear programming problem, while efficiently handling velocity constraints, obstacle avoidance constraints, and inter-UAV collision avoidance constraints. Simulation results for a three-UAV swarm in a cluttered environment demonstrate that the proposed method can generate dynamically feasible and collision-free trajectories, while enabling the swarm to reach the assigned target positions and preserve the desired formation within a certain formation error. Furthermore, real UAV swarm flight experiments were conducted to further validate the practical feasibility and online applicability of the proposed distributed NMPC framework for UAV swarm trajectory planning.

1. Introduction

In recent years, UAV swarms have attracted growing attention because they can accomplish complex missions more efficiently and robustly than a single platform [1,2,3]. In practical applications, multiple UAVs are often required to reach a target area while maintaining a prescribed formation and safely maneuvering around various obstacles in the environment. Such swarm systems have been widely used in cooperative reconnaissance, crop protection and precision spraying, power-line inspection, and emergency response missions. Their key advantage lies in cooperation: through task allocation and information sharing, UAV swarms can expand sensing coverage, improve redundancy and fault tolerance, and enhance overall operational efficiency under limited onboard resources.
Obstacle avoidance is an indispensable capability for ensuring the safe and reliable operation of UAV swarms. In practical scenarios, a swarm often needs to fly through cluttered environments that contain both static and dynamic obstacles, while simultaneously maintaining sufficient inter-vehicle separation to prevent collisions. Consequently, swarm trajectory planning must ensure feasibility under the UAV dynamics and actuator limits, coordinate multi-UAV motions to avoid external obstacles, and, under limited online computational resources, preserve the desired formation while accomplishing mission objectives. Compared with single-UAV planning, this cooperative planning problem is inherently more challenging because safety and formation requirements introduce strong coupling among multiple UAVs, and the computational complexity typically increases substantially as the swarm size grows.
For UAV swarm trajectory planning, various methods have been developed to balance safety constraints and formation requirements [4]. Search- and sampling-based methods are efficient in complex environments, but they usually rely on discretization or post-processing and may have difficulty guaranteeing feasibility under continuous dynamics [5]. Intelligent optimization and learning-based methods can handle complex scenarios, but their convergence speed, training cost, and constraint-satisfaction guarantees may limit real-time applications [6,7,8,9,10]. Artificial potential field methods are computationally efficient, but they are prone to local minima [11]. In the broader context of vehicle systems, motion planning in dynamic environments, prespecified-time reliable control, and finite-time fault-tolerant motion control have also been investigated [12,13,14]. Model-based optimization methods, especially model predictive control, can explicitly handle system dynamics and coupled constraints within a unified framework. Therefore, this paper adopts a distributed MPC framework, where neighborhood information exchange and receding-horizon optimization are used to achieve online cooperative planning while reducing the computational and communication burden of centralized schemes.
Although model predictive control (MPC) has been widely applied in motion control and trajectory optimization, its use in cooperative trajectory planning for UAV swarms remains relatively limited. Existing MPC-based studies mainly focus on specific aspects such as formation control, target tracking, local navigation, or collision avoidance, rather than addressing the coupled requirements of target-reaching, formation maintenance, obstacle avoidance, and inter-UAV collision avoidance within a unified framework. For example, distributed MPC combined with virtual target guidance has been used to achieve formation maintenance and obstacle avoidance, but the minimum inter-UAV safety separation was not explicitly modeled [15]. In some studies, MPC has primarily been applied to moving-target tracking problems [16,17]. Other works have focused on local autonomous navigation under limited visual perception, or emphasized time-optimal swarm flight in cluttered environments [18,19]. In addition, distributed formation control for role-based UAV swarms and heterogeneous UAV-USV systems has also been investigated [20,21]. Distributed MPC has also been used for multi-agent point-to-point transitions with collision avoidance [22], while prescribed-performance MPC and policy-search-optimized DMPC have been developed for formation tracking or collaborative target tracking with safety considerations [23,24]. Moreover, intelligent optimization and learning-enhanced planning methods have been introduced for cooperative search and heterogeneous UAV formation trajectory planning [25,26]. Table 1 further summarizes the representative existing methods from the perspectives of constraint consideration and optimization complexity [27]. It can be seen that most existing methods only address part of the coupled requirements, and their optimization complexity generally grows with the prediction length N. By contrast, the proposed method explicitly considers velocity constraints, obstacle avoidance, and inter-UAV collision avoidance within a unified distributed NMPC framework, while its optimization complexity is no longer directly coupled with N.
Overall, the above studies provide an important foundation for the application of MPC in multi-agent coordination, but several limitations still remain. First, many methods mainly focus on formation control, moving-target tracking, or local obstacle avoidance, rather than cooperative trajectory planning with explicit terminal target-reaching requirements. Second, although obstacle avoidance or inter-UAV collision avoidance is considered in some studies, the associated safety requirements are often handled through virtual target guidance, safe flight corridors, event-triggered deconfliction mechanisms, prescribed-performance-oriented designs, or auxiliary optimization modules, rather than being explicitly and jointly incorporated into the predictive optimization problem as state constraints. Meanwhile, hierarchical architectures, auxiliary guidance mechanisms, intelligent optimization algorithms, and learning-based approximation modules may increase the complexity of the problem formulation and solution structure, thereby limiting computational efficiency and real-time applicability. Motivated by the above observations, this paper develops a distributed NMPC-based method for cooperative trajectory planning of UAV swarms in obstacle-rich environments. By combining neighborhood information exchange with receding-horizon optimization, the proposed framework explicitly accounts for terminal target-reaching, formation maintenance, obstacle avoidance, and inter-UAV collision avoidance within a unified predictive optimization framework. Moreover, control parameterization and exact-penalty techniques are introduced to reduce the online computational complexity. The main contributions of this paper are summarized as follows:
  • Unlike the existing DMPC-based UAV trajectory planning methods in [16,18,20,21,22,23,24,25,26], the proposed distributed NMPC framework incorporates terminal target-reaching, prescribed formation maintenance, obstacle avoidance, and minimum inter-UAV safety separation into a unified trajectory planning formulation.
  • Different from the existing methods in [15,16,17,18,19,20,21,22,23,24,25,26], where the optimization dimension is directly related to the prediction horizon length N, a control parameterization strategy based on M control segments is developed in this paper, thereby reducing the online optimization complexity.
  • An exact-penalty-based constraint transcription method is further developed to transform the original constrained optimization problem into a lower-complexity optimization problem, which significantly improves the online computational efficiency and real-time performance of the proposed distributed NMPC framework.

2. Problem Formulation

2.1. Quadrotor UAV Dynamics and Control Architecture

This paper considers a UAV swarm composed of quadrotor platforms. Although the proposed planning framework is developed for quadrotors, the same idea can be extended to other rotorcraft systems with similar translational motion characteristics. For the i-th UAV, its motion is described with respect to an Earth-fixed frame and a body-fixed frame, as illustrated in Figure 1. The Earth-fixed frame is denoted by E = [ X e Y e Z e ] , where the Z e -axis points upward. The body-fixed frame of the i-th UAV is denoted by B i = [ X b , i Y b , i Z b , i ] and is attached to its center of mass, i Q = 1 , 2 , , N UAV and N UAV is the number of cooperative UAVs. The origins of the inertial and body-fixed frames are represented by O e and O b , i , respectively. The gravitational acceleration is denoted by g, while the Euler angles ϕ i , θ i , and  ψ i characterize the attitude of the i-th UAV, representing the roll angle, pitch angle, and yaw angle, respectively.
For each quadrotor, the full dynamics can be separated into translational and rotational subsystems. Since the cooperative trajectory planning problem studied in this paper mainly concerns position evolution, only the translational subsystem is adopted for prediction and optimization. The translational dynamics of the i-th UAV are given by
η ˙ i = v i , x v i , y v i , z T F , i m i cos ϕ i sin θ i cos ψ i + sin ϕ i sin ψ i T F , i m i cos ϕ i sin θ i sin ψ i cos ψ i sin ϕ i T F , i m i cos θ i cos ϕ i g
where η i = [ p i , v i ] denotes the translational state of the i-th UAV, with  p i = [ x i , y i , z i ] and v i = [ v i , x , v i , y , v i , z ] representing its position and velocity, respectively. The control input is described in terms of translational acceleration, namely a i = v ˙ i = [ a i , x , a i , y , a i , z ] .
In this paper, it is assumed that each UAV is equipped with a high-bandwidth inner-loop attitude controller. Therefore, the proposed distributed NMPC framework mainly focuses on the outer-loop trajectory-planning layer for position and velocity control, where the translational acceleration a i is treated as the decision variable. The reference attitude angles can be determined according to (1) and then transmitted to the inner-loop attitude controller. More specifically, the reference attitude angles ϕ c and θ c can be calculated by [28]:
ϕ c = arcsin m a i , x sin ψ m a i , y cos ψ m 2 a i , x 2 + m 2 a i , y 2 + m 2 a i , z + g 2
θ c = arctan m a i , x cos ψ + m a i , y sin ψ m a i , z + m g
and the reference yaw angle ψ c can be specified in advance.
The control architecture of each UAV in the swarm is illustrated in Figure 2. At each sampling instant, the distributed NMPC module computes the optimal trajectory command online according to the current position and velocity of the i-th UAV, the desired target information, the obstacle position information, and the position information received from neighboring UAVs. The resulting reference command is then transmitted to the flight control system, which further generates the motor drive signals based on the measured attitude and motion states. In this way, each UAV can perform predictive planning while simultaneously achieving coordinated motion through neighbor information exchange.

2.2. Problem Statement

In this paper, the operational scenario considers a UAV swarm taking off from given initial positions, navigating around a set of obstacles, and eventually reaching their designated target points. The planning objectives are to minimize the overall flight cost while maintaining the desired formation during the maneuvering process. To guarantee flight safety and ensure physically feasible motion, constraints must first be imposed on the UAV dynamics.

2.2.1. Constraints

Due to the characteristics of the UAV, considering the physical limitations of the motor, we limit the velocity of the UAV. For each i-th UAV, the velocity constraint can be expressed in the following form
v i , min v i τ | t v i , max , τ t , t + T
where v i , min R 3 and v i , max R 3 , denote the minimum and maximum permissible velocities along the x, y, and z axes, respectively. Similarly, the acceleration of each UAV is constrained as follows
a i , min a i τ | t a i , max , τ t , t + T
where a i , min R 3 and a i , max R 3 , specify the lower and upper acceleration bounds. In addition to the dynamic constraints, collision avoidance constraints must be incorporated to ensure safe operation. Without loss of generality, cylindrical obstacles are considered as an example, and the obstacle avoidance constraint for the i-th UAV is formulated as
p i τ | t ξ l     ξ l r , l = 1 , 2 , , N obs
where ξ l and ξ l r represent the position and safety radius of the l-th obstacle, respectively, l Q obs = l = 1 , 2 , , N obs and N obs is the number of obstacles. Accordingly, the obstacle-avoidance distance between UAV i and obstacle l is defined as
ρ i , l ( t ) = p i ( t ) ξ l ,
which is used to evaluate whether the obstacle safety threshold ξ l r is satisfied.
Furthermore, each UAV i must maintain a safe distance from its neighboring UAV j to prevent collisions, j Q { i } . Hence, the collision avoidance constraint between UAVs can be expressed as
p i τ | t p j τ | t     ξ p r , j Q { i }
where ξ p r represents the minimum permissible distance between any pair of UAVs. Accordingly, the inter-UAV distance between UAV i and UAV j is defined as
ξ i , j ( t ) = p i ( t ) p j ( t ) ,
which is used to evaluate whether the minimum inter-UAV safety distance ξ p r is maintained.
Remark 1. 
In practical obstacle avoidance scenarios, obstacles may also have conical, cuboid, or other irregular shapes. The corresponding obstacle avoidance constraints can generally be approximated or equivalently transformed into explicit nonlinear state constraints. Therefore, these obstacle models can also be readily incorporated into the proposed trajectory planning framework.

2.2.2. Objective Function

The model in (1) is used to predict the future trajectories of the UAV, and the prediction dynamics is written as
η ˙ i τ | t = [ v i ( τ | t ) , a i ( τ | t ) ] , τ t , t + T
where η i ( τ | t ) represents the predicted state for the i-th UAV at time τ . This prediction is derived from its initial state at time t and the sequence of control inputs a i ( τ | t ) applied over the future time interval τ [ t , τ ] , where T is the prediction horizon length. We define the state error as
η i , e = p i , e , v i , e
where p i , e = p i p i , t g t is the position error and v i , e = v i v i , t g t is the velocity error of the i-th UAV. Here, p i , tgt R 3 denotes the reference position assigned to the i-th UAV in the target formation, and  v i , tgt R 3 denotes the corresponding desired velocity. The dynamics of the predicted state error η i , e are then expressed as
η ˙ i , e τ | t = [ v i , e ( τ | t ) , a i ( τ | t ) ] , τ t , t + T
where η ˙ i , e can be easily obtained through translational subsystem (1). Furthermore, the UAV swarm is required to maintain a specific formation during flight. This formation is constructed based on the relative distances between UAVs, specified by the term p i τ | t p j τ | t θ i j 2 , where θ i j R 3 denotes the desired relative position vector of UAV i with respect to UAV j, j Q { i } . Then, the objective function of UAV trajectory planning is defined as
J a i = t t + T L i ( τ | t ) d τ
where
L i ( τ | t ) = β 1 η i , e ( τ | t ) 2 + β 2 j Q { i } p i ( τ | t ) p j ( τ | t ) θ i j 2 + β 3 a i ( τ | t ) 2
Here, β 1 , β 2 , and  β 3 are weighting coefficients that balance the objectives of target reaching, formation maintenance, and acceleration oscillation suppression, respectively. The weighting coefficients β 1 and β 2 determine the trade-off between rapid target reaching and formation maintenance during flight. A larger β 1 places more emphasis on driving the UAVs toward the target positions as quickly as possible, whereas a larger β 2 prioritizes reducing the formation tracking error and preserving the desired geometric configuration during maneuvering.
Remark 2. 
It should be noted that the proposed framework is not restricted to a specific formation. By appropriately modifying the formation parameter θ, the proposed method can be extended to arbitrary 3D formation shapes, such as line-shaped, circular, and other customized formations.

2.2.3. Optimal Control Problem

The original UAV trajectory planning optimization problem, referred to as Problem P1, is formally stated as follows:
min a i ( τ | t ) , τ t , t + T J a i
s . t . η ˙ i τ | t = [ v i ( τ | t ) , a i ( τ | t ) ] , τ t , t + T
η i ( t | t ) = η i ( t )
a i , min a i τ | t a i , max , τ t , t + T
v i , min v i τ | t v i , max , τ t , t + T
p i τ | t ξ l     ξ l r , τ [ t , t + T ] , l Q obs
p i τ | t p j τ | t     ξ p r , τ [ t , t + T ] , j Q { i }

3. Proposed NMPC Algorithm

In this section, we develop an NMPC algorithm for cooperative trajectory planning of the UAV swarm. Within the proposed distributed NMPC framework, the original optimal control problem in (13) is transcribed into a finite-dimensional nonlinear programming problem by means of control parameterization.
To obtain an approximate solution, the prediction interval [ t , t + T ] of each UAV is uniformly divided into M subintervals, and the control input is parameterized as follows. This treatment allows the continuous-time control problem to be represented by a finite number of decision variables, thereby improving computational efficiency for online implementation. Although such a discretization may introduce approximation error compared with the original continuous-time formulation, it avoids the repeated solution of differential equations with fully free control functions and is therefore more suitable for real-time trajectory generation in UAV swarm applications. For the i-th UAV, the control input a i is approximated by a piecewise-constant function a i , p according to [29]:
a i , p ( τ | t ) = k = 1 M σ i k χ i k ( τ | t )
where σ i k = σ i , 1 k , σ i , 2 k , σ i , 3 k R 3 , k = 1 , 2 , , M , denotes the parameter vector associated with the k-th control segment of the i-th UAV, and  χ i k ( τ | t ) is defined as
χ i k ( τ | t ) = 1 , if τ t + ( k 1 ) T M , t + k T M 0 , otherwise .
According to the control parameterization in (14), the decision variables are now σ i k , k = 1 , 2 , , M , and the total number of decision variables for each UAV is therefore 3 M .
Thus, the continuous control trajectory of each UAV over the prediction horizon is characterized by a finite set of control parameters, which significantly reduces the dimension of the online optimization variables and makes the distributed trajectory planning problem more tractable.

3.1. Constraints Handling Based on Exact Penalty Function

Furthermore, an exact penalty function method is employed to handle system constraints. With an appropriately chosen penalty parameter, this method ensures that the unconstrained optimization problem shares the same optimal solution as the original constrained problem. Consequently, the complex constrained optimization is transformed into a more efficient unconstrained solution process, significantly enhancing the computational efficiency of the algorithm.
Based on the exact penalty function method [30], the velocity constraint (13e) for the i-th UAV are transformed into the following form:
J i , v = m = 1 , 2 , 3 ω α ( max 0 , v i m ( τ | t ) v i , max m ω γ W 2 + max 0 , v i , min m ( τ | t ) v i m ( τ | t ) ω γ W 2 )
where x i is the i-th element of a vector x , ω denotes a parameter that needs to be optimized. The terms α , γ and W are positive real-valued parameters satisfying α > 1 and γ > 2 . Herein, ω α serves as the penalty weight, while ω γ W acts as a relaxation factor, with W being the corresponding weighting coefficient for this factor.
Regarding the obstacle avoidance constraint for UAVs (13f), we propose an enhanced avoidance function based on the formulation in [31]. The obstacle avoidance cost J i , l obs is defined by a piecewise function that activates when the UAV enters the obstacle’s safety radius:
J i , l obs = 0 , if d i l ( τ | t ) ξ l r J i , rep obs · J i , vel obs , if d i l ( τ | t ) < ξ l r , l Q obs
where d i l ( τ | t ) = p i ( τ | t ) ξ l denotes the predicted Euclidean distance between the i-th UAV and l-th obstacle. The component J i , rep obs represents the distance-based repulsive potential, formulated as
J i , rep obs = D ε D ( ξ l r d i l ( τ | t ) ) 3 + ε
where D > 0 is the weighting coefficient determining the strength of the repulsive potential field, and  ϵ > 0 is a small positive constant introduced to avoid numerical singularity. The component J i , vel obs is a velocity-dependent scaling factor that incorporates the relative velocity:
J i , vel obs = 1 + λ · max 0 , v i n i , l
where n i , l is the unit vector pointing from the l-th obstacle to the i-th UAV, and  λ is a weighting parameter.
To ensure not only obstacle avoidance but also safe separation among UAVs, the inter-UAV collision avoidance constraint (8) is treated in the same penalty framework. Specifically, for each neighboring pair ( i , j ) , we define the separation function
g i j ( τ | t ) = ξ p r p i ( τ | t ) p j ( τ | t )
Accordingly, the collision-avoidance penalty is constructed as
J i , col = j Q { i } ω α max 0 , g i j ( τ | t ) ω γ W 2
This penalty term is activated only when the safety distance is violated (up to the relaxation margin ω γ W ), and becomes zero otherwise.

3.2. Transformed Optimization Problem

By incorporating the penalty terms (16), (17), and (21) into the original objective (11), the constrained problem (13) is converted into an unconstrained optimization problem. Accordingly, the penalized cost functional associated with the i-th UAV is given by
L ^ i ( τ | t ) = L i ( τ | t ) + J i , v + l Q obs J i , l obs + j Q { i } J i , col
where N i denotes the set of neighboring UAVs involved in collision avoidance and formation maintenance. Based on (14), the decision variables become the control parameters { σ i k } k = 1 M for each UAV. Let σ i = σ i 1 , σ i 2 , , σ i M . Then, the resulting trajectory planning Problem P2 for the i-th UAV, i Q , is formulated as
min σ i , ω t t + T L ^ i ( τ | t ) d τ + δ ω β
s . t . η ˙ i τ | t = [ v i ( τ | t ) , a i , p ( τ | t ) ] , τ [ t , t + T ]
η i ( t | t ) = η i ( t )
a i , p ( τ | t ) = k = 1 M σ i k χ i k ( τ | t ) , τ [ t , t + T ]
a i , min σ i k a i , max , k = 1 , 2 , , M
where δ is a large penalty coefficient and β > 2 is a prescribed constant. During the optimization process, the term δ ω β drives ω toward smaller values. Consequently, the penalty weight ω α in L ^ i increases, thereby encouraging constraint satisfaction while minimizing the original objective function L i . Terminal costs and constraints are commonly used in distributed MPC to establish recursive feasibility and closed-loop stability [32]. However, the control parameterization and exact penalty function introduced in Problem P2 make the construction of an appropriate terminal set difficult. Lyapunov-based MPC [33] may provide an alternative approach for establishing these properties and will be investigated in future work.
For completeness, using the previously defined prediction length N, the corresponding numerical integration nodes are given by τ q = t + q T / N , q = 0 , 1 , , N . Using the parameterized control input a i , p ( τ | t ) = k = 1 M σ i k χ i k ( τ | t ) , the complete finite-dimensional NLP is summarized as
min σ i , ω T N q = 0 N 1 L ^ i ( τ q | t ) + δ ω β s . t . η i ( τ 0 | t ) = η i ( t ) η i ( τ q + 1 | t ) = η i ( τ q | t ) + T N v i ( τ q | t ) , a i , p ( τ q | t ) , q = 0 , 1 , , N 1 a i , min σ i k a i , max , k = 1 , 2 , , M ω > 0
At each communication update, the neighboring trajectories in L ^ i ( τ q | t ) satisfy p j ( τ q | t ) = p ^ j ( τ q | t ) and are treated as fixed parameters. The velocity, obstacle-avoidance, and inter-UAV separation requirements are incorporated through the penalty terms defined above.
The resulting NLP (23) is solved at each sampling instant within the receding-horizon NMPC framework, and can be efficiently handled by mature nonlinear programming solvers, such as CasADi [34].
For problem (23), Algorithm 1 summarizes the distributed NMPC-based cooperative trajectory planning procedure for the UAV swarm governed by (1). In the distributed implementation, p i ( τ | t ) is treated as the local decision variable of the i-th UAV decided by a i ( τ | t ) , while p j ( τ | t ) denotes the predicted trajectory information received from neighboring UAVs according to the latest communication update. Since the future actual value of p j ( τ | t ) cannot be exactly known at the current sampling instant, the trajectory optimality of the following DMPC may be slightly degraded compared with the centralized framework. However, the real-time planning capability of each UAV can be preserved, and the optimality degradation can be reduced by decreasing the control update interval Δ .
Remark 3. 
For the initial shifted control sequence a ^ i ( τ | t ) , t = 0 , an initial predicted trajectory can be generated by solving a centralized optimization problem during the initialization stage. Alternatively, a ^ i ( τ | t ) can be selected as a constant acceleration corresponding to hovering or straight line flight of the UAV.
Remark 4. 
If the NLP problem (23) becomes infeasible during online implementation, a feasible backup trajectory can still be generated by using conventional obstacle avoidance methods, such as artificial potential field based method, to ensure safe flight and collision avoidance. In addition, the distributed NMPC framework adopts a sequential update scheme. Specifically, after the optimal translational acceleration command a i ( τ | t ) is obtained for the i-th UAV, the corresponding reference attitude angles are computed and transmitted to the inner-loop controller.
We now discuss the feasibility and convergence properties of the approximate control sequence obtained from problem (23). The following lemma shows that, under the neighboring information available at the current sampling instant, any feasible solution of the discretized penalized problem (23) preserves the feasibility of the original constrained problem (13) for each UAV.
Lemma 1. 
For any ω > 0 , there exists a γ ω > 0 such that for all γ ( 0 , γ ω ) , if the i-th UAV obtains a control parameter vector σ ˜ i by solving problem (23), then the corresponding piecewise-constant control input
a ˜ i , p ( τ | t ) = k = 1 M σ ˜ i k χ i k ( τ | t ) , τ [ t , t + T ]
when applied to system (1), satisfies the constraints (13a)–(13g) associated with the i-th UAV in the original problem, i.e.,
a i , min a ˜ i , p ( τ | t ) a i , max , v i , min v i τ | t v i , max , τ t , t + T p i τ | t ξ l     ξ l r , τ [ t , t + T ] , l Q obs p i τ | t p j τ | t     ξ p r , τ [ t , t + T ] , j Q { i }
Algorithm 1 Distributed NMPC-Based Trajectory Planning Algorithm
Require:
  1:
The target positions p i , tgt , terminal velocities v i , tgt , obstacle positions ξ l and safety radii ξ l r , l = 1 , 2 , , N obs , minimum inter-UAV safety distance ξ p r , desired relative position vectors θ i j , prediction horizon length T, feedback parameter Δ ( 0 , T ] , and the weighting and penalty parameters in (22).
Online:
  2:
for  t = 0 , Δ , 2 Δ ,  do
  3:
    For the i-th UAV, sample the current state η i ( t ) and exchange the following predicted trajectory p ^ i ( τ | t ) , τ [ t , t + T ] , with the neighboring UAVs j Q { i } . Here, the trajectory p ^ i ( τ | t ) is generated using the shifted control sequence a ^ i ( τ | t ) constructed from the previously obtained optimal solution a i ( τ | t Δ ) , i.e.,
a ^ i ( τ | t ) = a i ( τ | t Δ ) , τ [ t , t + T Δ ) , a i ( t + T Δ | t Δ ) , τ [ t + T Δ , t + T ] .
  4:
    for  i = 1 , 2 , , N UAV  in parallel do
  5:
       Set η i ( t | t ) = η i ( t ) .
  6:
       Set p j ( τ | t ) = p ^ j ( τ | t ) , j Q { i } , and solve the finite-dimensional optimization problem (23) associated with the i-th UAV to obtain the following optimal vector:
σ i = σ i , 1 , σ i , 2 , , σ i , M
  7:
       Construct the predicted control input
a i ( τ | t ) = k = 1 M σ i , k χ i k ( τ | t ) , τ [ t , t + T ] .
  8:
       Compute the corresponding reference attitude angle commands from a i ( τ | t ) according to (2), and transmit them to the inner-loop controller over the interval [ t , t + Δ ] .
  9:
    end for
10:
end for
The following lemma establishes the convergence relationship between the optimal solution of the discretized penalized problem (23) and that of the original problem (13) for the optimization problem of each UAV.
Lemma 2. 
Let σ i be an optimal solution to problem (23) for the i-th UAV, with ω and γ chosen according to Lemma 1. Suppose that the original problem (13) admits an optimal solution a i ( τ | t ) , τ [ t , t + T ] . Then, by first taking ω 0 and subsequently letting M , the approximate control sequence generated by the transformed problem converges to the optimal objective value of the original problem, i.e.,
lim ω 0 lim M J a i , p = J a i
with a i , p ( τ | t ) = k = 1 M σ i , k χ i k ( τ | t ) , τ [ t , t + T ] .
Lemma 1 and Lemma 2 can be proven by Lemma 9.2.1 and Theorems 9.2.1 and 9.2.2 of [29], respectively, and the proofs are omitted for brevity.
Remark 5. 
Conventional stagewise MPC yields 3 N control variables and N dependent path constraints [22,27]. Through control parameterization, the proposed method reduces the decision dimension to 3 M + 1 , while the exact penalty function incorporates the velocity and safety requirements into the objective; N is retained for numerical integration. More importantly, under the stated conditions, Lemma 1 establishes feasibility equivalence between Problems P1 and P2, whereas Lemma 2 proves convergence of the optimal objective value of Problem P2 to that of Problem P1.

4. Experiments and Discussion

4.1. Simulation Experiments

All simulations were conducted on a personal computer running Windows 11, equipped with a 12th Gen Intel(R) Core(TM) i7-12700H processor (2.30 GHz) and 64.0 GB RAM. The proposed distributed trajectory planner was implemented in MATLAB R2022b.
In the considered scenario, three UAVs are required to travel toward their respective target positions while maintaining a prescribed triangular formation. During the flight, the swarm must avoid all obstacles in the environment, satisfy inter-UAV collision avoidance requirements, and preserve formation coherence under dynamic and control constraints. The initial states of three UAVs are specified as η 1 ( 0 ) = [ 0.04 , 3.02 , 1 , 0 , 0 , 0 ] , η 2 ( 0 ) = [ 0.84 , 3.02 , 1 , 0 , 0 , 0 ] , and η 3 ( 0 ) = [ 0.76 , 3.02 , 1 , 0 , 0 , 0 ] , respectively. Their corresponding reference positions are given by p 1 , tgt = [ 0.04 , 2.42 , 1 ] , p 2 , tgt = [ 0.84 , 2 , 1 ] , and p 3 , tgt = [ 0.76 , 2 , 1 ] . The reference velocities v i , t g t , i = 1 , 2 , 3 , are set to zero.
Six obstacles are placed in the environment with centers located at 0.27 , 1.53 , 1 , 0.61 , 0.89 , 1 , 1 , 0.34 , 1 , 0.06 , 0 , 1 , 1 , 1.45 , 1 , and 0.52 , 1.45 , 1 , respectively. For each l Q obs , the obstacle safety radius is set to ξ l r = 0.5 . The minimum inter-UAV safety distance is chosen as ξ p r = 0.35 .
The desired formation is specified through relative position offsets among the three UAVs so that a triangular formation can be maintained during the flight. Accordingly, the desired relative offsets are given by
θ 12 = [ 0.8 , 0.42 , 0 ] , θ 13 = [ 0.8 , 0.42 , 0 ] , θ 21 = [ 0.8 , 0.42 , 0 ] θ 23 = [ 1.6 , 0 , 0 ] , θ 31 = [ 0.8 , 0.42 , 0 ] , θ 32 = [ 1.6 , 0 , 0 ]
The velocity constraints are given as v i m 0.4 , for i = 1 , 2 , 3 and m = 1 , 2 , 3 . For each i = 1 , 2 , 3 , the control inputs satisfy a i m 0.5 for m = 1 , 2 and a i m 0.1 for m = 3 .
A receding horizon NMPC scheme is employed with prediction horizon T = 0.8 s , length N = 20 , and Δ = 0.04 . The weighting coefficients in the objective function are selected as β 1 = 0.3 , β 2 = 0.7 and β 3 = 0.01 . For the exact penalty formulation, the parameters are chosen as α = 1.5 , γ = 3 , W = 0.3 , β = 3 , and δ = 10 8 . For the obstacle avoidance term, the parameters are set to ϵ = 0.01 , D = 100 , and λ = 0.5 .
The closed-loop simulation terminates when all three UAVs move sufficiently close to their corresponding target positions, namely, p i p i , tgt   <   0.05 , i = 1 , 2 , 3 .
The simulation results are presented in Figure 3, Figure 4, Figure 5 and Figure 6 to evaluate the effectiveness of the proposed distributed NMPC framework for UAV swarm trajectory planning.
In the considered obstacle-rich environment, Figure 3 shows that the UAV swarm can safely avoid all obstacles and reach the prescribed target positions while maintaining the desired formation. Figure 4 depicts the velocity profiles of the three UAVs along the x-, y-, and z-axes. It is evident that the velocity components vary smoothly during the entire flight and remain within the prescribed bounds. In particular, the z-direction velocity remains close to zero, which is consistent with the mission setup in which the three UAVs mainly perform planar maneuvering at an approximately constant altitude. This result verifies that the proposed controller can generate dynamically feasible trajectories while respecting the velocity constraints.
The corresponding acceleration commands are shown in Figure 5. The control inputs of all three UAVs remain bounded and evolve smoothly without aggressive oscillations. The accumulated control effort is i = 1 3 0 T a i ( t ) 2 d t = 1.27 . For clarity, the formation error between the i-th UAV and the j-th UAV is defined as
e i , j ( t ) = p i ( t ) p j ( t ) θ i j .
To further examine the obstacle avoidance and inter-UAV collision avoidance performance, Figure 6 presents the corresponding distance evolutions in simulation. For all three UAVs, the distances to surrounding obstacles and other UAVs remain above the prescribed safety threshold throughout the flight. More specifically, the minimum obstacle and inter-UAV distances are 0.5 and 0.51 , respectively, both satisfying the thresholds of 0.5 and 0.35 , thereby demonstrating that the proposed distributed planning method can successfully prevent inter-UAV collisions while maintaining the desired formation pattern.
Figure 7 shows that the trajectory costs and formation errors gradually converge close to zero and the root mean square value of the formation error is 0.2292 , indicating that the proposed method can achieve target convergence while maintaining the desired formation within a certain formation error during obstacle avoidance and inter-UAV collision avoidance. In addition, Figure 8 shows that increasing M improves trajectory planning performance by reducing the average trajectory cost, although the improvement gradually becomes saturated. Meanwhile, the average computation time increases with M, indicating a higher online computational burden under finer control parameterization.
To provide a quantitative basis for the weighting selection, β 1 = 0.3 and β 3 = 0.01 are fixed. Since energy consumption, as reflected by the control-input term, is not the primary focus of this study, β 3 is assigned a relatively small value, and the analysis focuses on the two main objectives of target reaching and formation maintenance. To examine the influence of the formation maintenance weight, β 2 is set to 0.1 , 0.3 , 0.5 , 0.7 , 0.9 , and 1.0 for comparison. Figure 9 presents the unweighted target reaching cost component J tgt and formation-maintenance cost component J form accumulated over the complete flights of the three UAVs. As β 2 increases, J form decreases, whereas J tgt increases. Based on these results, β 1 = 0.3 and β 2 = 0.7 are adopted so that both target reaching and formation maintenance are adequately considered in the objective function.
To further evaluate the effectiveness of the proposed framework, Table 2 compares the proposed distributed NMPC (DNMPC) with its centralized counterpart, referred to as centralized NMPC (CNMPC), and the NMPC method in [22]. Here, the average trajectory cost denotes the mean accumulated trajectory cost over all UAVs during the closed-loop planning process, and a smaller value indicates better trajectory planning performance. The centralized NMPC achieves the lowest average trajectory cost by optimizing the trajectories of all three UAVs in a fully coupled manner. Although the proposed distributed NMPC yields a slightly higher trajectory cost, it significantly reduces the average computation time, demonstrating improved online computational efficiency. Compared with the NMPC method in [22], the proposed distributed NMPC also requires much less computation time. Although the NMPC method in [22] achieves better control performance, its significantly higher computational complexity makes real-time trajectory planning difficult, which is also reflected in the computational complexity results [27]. In contrast, the proposed distributed NMPC achieves a better trade-off between computational efficiency and control performance, enabling real-time trajectory planning while maintaining satisfactory control performance.
To assess the robustness of the proposed method, additional simulations are conducted under sinusoidal disturbances with an amplitude of 10 2 and Gaussian disturbances with variance 10 6 and range ± 3 × 10 5 . The results in Figure 10 show that the trajectory costs decrease and the formation errors converge close to zero. To further evaluate the dynamic-obstacle avoidance capability of the proposed method, a moving obstacle with a radius of 0.15 m is introduced, which moves back and forth at 0.5 m / s along the x-direction within x [ 1.5 , 1.5 ] m , while maintaining y = 0.65 m and z = 1 m . As shown in Figure 11, the three UAVs continuously update their planned trajectories to avoid the moving obstacle and reach the desired terminal formation without collision. This result demonstrates the capability of the proposed method to handle time-varying obstacle constraints in online multi UAV trajectory planning. Beyond the above evaluation in a dynamic environment, the competitiveness of the proposed method is further assessed through a planar comparison with Hybrid A* [35] in the same static obstacle scenario. Since the adopted Hybrid A* implementation performs planning in the horizontal plane, only the x-y trajectories of the two methods are considered to ensure a consistent comparison. As shown in Figure 12, both methods generate collision-free trajectories for the three UAVs. Hybrid A* achieves a shorter average single-step computation time of 0.02077 s , compared with 0.04556 s for DNMPC. However, its average planar trajectory cost is 2.7984 , whereas that of DNMPC is only 1.5385 . These results indicate that the proposed DNMPC method achieves better trajectory quality according to the adopted cost criterion at the expense of a moderate increase in computation time.
To evaluate the influence of nonideal communication, a fixed 10 ms delay is introduced into the neighbor-state information available to each UAV. As shown in Figure 13, the three UAVs satisfy the prescribed state and safety constraints and reach their assigned target positions, while the trajectory costs decrease and the formation errors converge close to zero. The maneuver duration is longer than that in the delay free case because the local planners use delayed neighbor information, which reduces the responsiveness of cooperative trajectory updates. To further quantify this influence, the communication delay d c is varied from 5 to 40 ms . As shown in Figure 14, the average trajectory cost exhibits an overall increasing trend with d c , indicating degraded trajectory planning performance under longer delays. Future work will investigate distributed MPC schemes [36] that explicitly incorporate delayed information from neighboring UAVs into the receding horizon optimization to mitigate this degradation.
Furthermore, the simulation scenario is extended from three UAVs with a triangular formation to five UAVs with a line shaped formation. As shown in Figure 15a–c, the five UAVs can still safely reach the desired line shaped terminal formation, with decreasing trajectory costs and convergent formation errors. This result also shows that the proposed framework is not restricted to a specific formation pattern, since different formations can be specified by adjusting the desired relative position vectors. Moreover, the average single-step computation time of each UAV is about 0.0385 s , which is close to that in the 3-UAV case. This indicates that the online computational burden of each UAV does not increase significantly when the swarm size increases from three to five, thereby verifying the scalability of the proposed method.

4.2. Flight Experiments

To further validate the practical applicability of the proposed distributed NMPC-based trajectory planning method, flight experiments were conducted using three Crazyflie 2.1 quadrotors. The main components of the experimental platform are shown in Figure 16, including the Crazyflie 2.1 quadrotor, the ground station, and the motion capture system. The flight experimental scenario is shown in Figure 17. The experimental system consists of three Crazyflie 2.1 quadrotors, a NOKOV motion capture system, a ground station, and a Crazyradio communication module.
During the experiment, the NOKOV motion capture system provides the position and velocity measurements of each UAV in the inertial frame. These real-time motion states are transmitted to the ground station, where the distributed NMPC optimization problems are solved online based on the current states of the UAVs. The generated reference commands are then sent to the corresponding Crazyflie quadrotors through Crazyradio. After receiving the commands, the onboard low-level controller of each Crazyflie tracks the reference commands to realize the planned motion. In this way, a closed-loop experimental system is established, where the proposed distributed NMPC algorithm generates online planning commands based on real-time feedback from the motion capture system. The ground station is equipped with an Intel(R) Core(TM) i7-10700 CPU at 2.90 GHz and 16 GB RAM. The experimental program is executed in an Ubuntu 20.04 environment running on a Windows 11 system, where IPOPT is used as the nonlinear programming solver and CppAD is used for automatic differentiation.
The flight experimental scenario is designed to be consistent with the three-UAV simulation scenario. The three UAVs are required to move from their initial positions to the assigned target positions while maintaining the desired formation and avoiding collisions with obstacles and other UAVs. Most of the NMPC parameters are kept the same as those used in the simulation. Different from the cylindrical obstacles used in the simulation, cuboid obstacles are adopted in the flight experiment. As discussed in Remark 1, non-circular or irregular obstacles can be approximated or equivalently transformed into explicit nonlinear state constraints. Therefore, in the flight experiment, each cuboid obstacle is conservatively represented by an inflated cylindrical safety region in the horizontal plane, so that the same obstacle-avoidance formulation can be used in the proposed NMPC framework. Considering the physical size of the Crazyflie platform, the tracking accuracy of the motion capture system, and the safety margin required in real flight, the obstacle safety radius and the inter-UAV safety radius are set to 0.4 and 0.2 , respectively, in the flight experiment. Figure 18c shows the online computation time of the three UAVs at each control step. The corresponding average computation time and maximum single-step computation time are summarized in Table 3. The maximum single-step computation times of all UAVs are below 40 ms . These results indicate that the proposed distributed NMPC method can be solved efficiently in the flight experiment and is suitable for online implementation on the experimental platform.

5. Conclusions

This paper investigates the cooperative trajectory planning problem for UAV swarms in obstacle-rich environments. A distributed nonlinear model predictive control framework was developed to address terminal target reaching, formation maintenance, obstacle avoidance, and inter-UAV collision avoidance in a unified manner. By combining control parameterization with exact-penalty-based constraint handling, the original constrained optimal control problem was transformed into a lower-complexity finite-dimensional NLP problem, which is more suitable for online implementation. Simulation and experimental results show that the proposed method can generate dynamically feasible and collision-free trajectories for multi-UAV systems, while the velocity and acceleration remain within the prescribed bounds. A limitation of the present formulation is that it employs only a stage cost without introducing a terminal cost. Therefore, recursive feasibility, closed-loop stability, and asymptotic convergence have not been theoretically established in this work. Future work will investigate distributed MPC frameworks with rigorous theoretical guarantees, dynamic-obstacle environments involving online motion estimation and prediction under uncertainty, and communication-aware distributed planning under bandwidth limitations, communication delays, and packet loss.

Author Contributions

Conceptualization, Y.C. and B.L.; methodology, Y.C.; software, Y.C.; validation, Y.C., T.Z. and B.L.; formal analysis, Y.C. and T.Z.; investigation, Y.C.; data curation, Y.C.; writing—original draft preparation, Y.C.; writing—review and editing, Y.C., T.Z. and B.L.; visualization, Y.C.; supervision, B.L.; project administration, B.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China under grant number U24B20156.

Data Availability Statement

The data presented in this study are available from the corresponding author upon reasonable request.

Conflicts of Interest

The authors declare no conflicts of interest. The funder had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

References

  1. Vásárhelyi, G.; Virágh, C.; Somorjai, G.; Nepusz, T.; Eiben, A.E.; Vicsek, T. Optimized flocking of autonomous drones in confined environments. Sci. Robot. 2018, 3, eaat3536. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  2. Zhou, X.; Wen, X.; Wang, Z.; Gao, Y.; Li, H.; Wang, Q.; Yang, T.; Lu, H.; Cao, Y.; Xu, C.; et al. Swarm of micro flying robots in the wild. Sci. Robot. 2022, 7, eabm5954. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  3. Ren, Y.; Zhu, F.; Lu, G.; Cai, Y.; Yin, L.; Kong, F.; Lin, J.; Chen, N.; Zhang, F. Safety-assured high-speed navigation for MAVs. Sci. Robot. 2025, 10, eado6187. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  4. Javed, S.; Hassan, A.; Ahmad, R.; Ahmed, W.; Ahmed, R.; Saadat, A.; Guizani, M. State-of-the-Art and Future Research Challenges in UAV Swarms. IEEE Internet Things J. 2024, 11, 19023–19045. [Google Scholar] [CrossRef] [Scilit]
  5. Xiao, R.; Wang, S.; Xie, Y.; Zhang, Y.; Xie, S.Q. Safety-Aware UAV Formation Scheme for Guiding UGVs Through Obstacle-Laden Environments. IEEE Robot. Autom. Lett. 2025, 10, 6999–7006. [Google Scholar] [CrossRef] [Scilit]
  6. Cheng, Z.; Yang, J.; Sun, J.; Zhao, L. Trajectory Planning of Unmanned Aerial Vehicles in Complex Environments Based on Intelligent Algorithm. Drones 2025, 9, 468. [Google Scholar] [CrossRef] [Scilit]
  7. Fan, X.; Li, H.; Chen, Y.; Dong, D. UAV Swarm Search Path Planning Method Based on Probability of Containment. Drones 2024, 8, 132. [Google Scholar] [CrossRef] [Scilit]
  8. Yuan, W.; Chen, S.; He, H.; Hou, Y.; Chen, S.; Tan, X.; Yang, J. Hierarchical Reinforcement Learning-Based Joint Trajectory Planning and Resource Allocation in UAV-Assisted IoT-Sensor Networks. IEEE Trans. Commun. 2025, 73, 14517–14533. [Google Scholar] [CrossRef] [Scilit]
  9. Khargharia, H.S.; Ouali, A.; Shakya, S.; Ahmad, S. Collision Avoidance in UAV Swarms: A Learning-Centric Perspective on Collaborative Intelligence. Neurocomputing 2026, 663, 132020. [Google Scholar] [CrossRef] [Scilit]
  10. Sun, H.; Chen, H.; Ni, Z.; Fan, X.; Li, G.; Xia, F. Computing While Navigating: A Novel Task Offloading and Trajectory Planning Scheme for UAV-Assisted MEC System. IEEE Trans. Veh. Technol. 2026, 75, 3149–3159. [Google Scholar] [CrossRef] [Scilit]
  11. Huang, S.; Zhang, H.; Huang, Z. E2CoPre: Energy Efficient and Cooperative Collision Avoidance for UAV Swarms with Trajectory Prediction. IEEE Trans. Intell. Transp. Syst. 2024, 25, 6951–6963. [Google Scholar] [CrossRef] [Scilit]
  12. Huang, T.; Pan, H.; Sun, W.; Gao, H. Sine Resistance Network-Based Motion Planning Approach for Autonomous Electric Vehicles in Dynamic Environments. IEEE Trans. Transp. Electrif. 2022, 8, 2862–2873. [Google Scholar] [CrossRef] [Scilit]
  13. Huang, T.; Wang, J.; Pan, H. Approximation-Free Prespecified Time Bionic Reliable Control for Vehicle Suspension. IEEE Trans. Autom. Sci. Eng. 2024, 21, 5333–5343. [Google Scholar] [CrossRef] [Scilit]
  14. Huang, T.; Wang, J.; Pan, H.; Sun, W. Finite-Time Fault-Tolerant Integrated Motion Control for Autonomous Vehicles with Prescribed Performance. IEEE Trans. Transp. Electrif. 2023, 9, 4255–4265. [Google Scholar] [CrossRef] [Scilit]
  15. Cai, Z.; Wang, L.; Zhao, J.; Wu, K.; Wang, Y. Virtual target guidance-based distributed model predictive control for formation control of multiple UAVs. Chin. J. Aeronaut. 2020, 33, 1037–1056. [Google Scholar] [CrossRef] [Scilit]
  16. Yu, Y.; Wang, H.; Liu, S.; Guo, L.; Yeoh, P.L.; Vucetic, B.; Li, Y. Distributed Multi-Agent Target Tracking: A Nash-Combined Adaptive Differential Evolution Method for UAV Systems. IEEE Trans. Veh. Technol. 2021, 70, 8122–8133. [Google Scholar] [CrossRef] [Scilit]
  17. Song, C.; Zhang, X.; She, Y.; Li, B.; Zhang, Q. Trajectory Planning for UAV Swarm Tracking Moving Target Based on an Improved Model Predictive Control Fusion Algorithm. IEEE Internet Things J. 2025, 12, 19354–19369. [Google Scholar] [CrossRef] [Scilit]
  18. Tang, J.; Wan, Y.; Lao, S.; Zhao, Z. A Distributed Autonomous System for Multi-UAVs with Limited Visualization: Employing Dual-Horizon NMPC Controller. IEEE Trans. Aerosp. Electron. Syst. 2024, 60, 6910–6924. [Google Scholar] [CrossRef] [Scilit]
  19. Pan, H.; Zahmatkesh, M.; Rekabi-Bana, F.; Arvin, F.; Hu, J. T-STAR: Time-Optimal Swarm Trajectory Planning for Quadrotor Unmanned Aerial Vehicles. IEEE Trans. Intell. Transp. Syst. 2025, 26, 12532–12547. [Google Scholar] [CrossRef] [Scilit]
  20. Zhao, J.; Sun, J.; Cai, Z.; Wang, Y.; Wu, K. Distributed coordinated control scheme of UAV swarm based on heterogeneous roles. Chin. J. Aeronaut. 2022, 35, 81–97. [Google Scholar] [CrossRef] [Scilit]
  21. Huang, D.; Li, H.; Li, X. Formation of Generic UAVs-USVs System Under Distributed Model Predictive Control Scheme. IEEE Trans. Circuits Syst. II Express Briefs 2020, 67, 3123–3127. [Google Scholar] [CrossRef] [Scilit]
  22. Luis, C.E.; Schoellig, A.P. Trajectory Generation for Multiagent Point-To-Point Transitions via Distributed Model Predictive Control. IEEE Robot. Autom. Lett. 2019, 4, 375–382. [Google Scholar] [CrossRef] [Scilit]
  23. Yu, C.; Chen, K.; Chen, C.L.P.; Liu, Z.; Wang, J. Adaptive Boundary Prescribed-Performance MPC for 3D UAV Formation with Obstacle/Collision Avoidance. Syst. Control Lett. 2026, 208, 106327. [Google Scholar] [CrossRef] [Scilit]
  24. Song, C.; Xi, G.; Li, H.; Li, J.; Li, B. Trajectory Planning for Multi-UAV Collaborative Target Tracking Based on Policy Search Optimized DMPC. Aerosp. Sci. Technol. 2026, 175, 111959. [Google Scholar] [CrossRef] [Scilit]
  25. Zhan, J.; Niu, C.; Liu, W.; Wang, S.; Wan, X.; Wang, Y. Multi-UAV Cooperative Search for Moving Targets With Impaired Communication Using Improved Gray Wolf Optimizer. Int. J. Aerosp. Eng. 2024, 2024, 5876393. [Google Scholar] [CrossRef] [Scilit]
  26. Qian, W.; Yi, W.; Yuan, S.; Guan, J. Control-Oriented Real-Time Trajectory Planning for Heterogeneous UAV Formations. Drones 2025, 9, 78. [Google Scholar] [CrossRef] [Scilit]
  27. Bomze, I.M.; Demyanov, V.F.; Fletcher, R.; Terlaky, T. Nonlinear Optimization: Lectures Given at the CIME Summer School Held in Cetraro, Italy, 1–7 July 2007; Springer: Berlin/Heidelberg, Germany, 2010. [Google Scholar]
  28. Liu, G.; Li, B.; Duan, G. An optimal FASA approach for UAV Trajectory Tracking Control. Guid. Navig. Control 2023, 3, 78. [Google Scholar] [CrossRef] [Scilit]
  29. Teo, K.; Li, B.; Yu, C.; Rehbock, V. Applied and Computational Optimal Control: A Control Parametrization Approach; Springer: Berlin/Heidelberg, Germany, 2021. [Google Scholar]
  30. Li, B.; Yu, C.J.; Teo, K.L.; Duan, G.R. An Exact Penalty Function Method for Continuous Inequality Constrained Optimal Control Problem. J. Optim. Theory Appl. 2011, 151, 260–291. [Google Scholar] [CrossRef] [Scilit]
  31. Ze, K.; Wang, W.; Liu, K.; Lü, J. Time-Varying Formation Planning and Distributed Control for Multiple UAVs in Clutter Environment. IEEE Trans. Ind. Electron. 2024, 71, 11305–11315. [Google Scholar] [CrossRef] [Scilit]
  32. Dai, L.; Cao, Q.; Xia, Y.; Gao, Y. Distributed MPC for Formation of Multi-Agent Systems with Collision Avoidance and Obstacle Avoidance. J. Frankl. Inst. 2017, 354, 2068–2085. [Google Scholar] [CrossRef] [Scilit]
  33. Guo, Y.; Zhou, J.; Liu, Y. Distributed Lyapunov-Based Model Predictive Control for Collision Avoidance of Multi-Agent Formation. IET Control Theory Appl. 2018, 12, 2569–2577. [Google Scholar] [CrossRef] [Scilit]
  34. Andersson, J.; Akesson, J.; Diehl, M. CasADi: A Symbolic Package for Automatic Differentiation and Optimal Control. In International Conference on Automatic Differentiation; Springer: Berlin/Heidelberg, Germany, 2012. [Google Scholar]
  35. Dolgov, D.; Thrun, S.; Montemerlo, M.; Diebel, J. Path Planning for Autonomous Vehicles in Unknown Semi-structured Environments. Int. J. Robot. Res. 2010, 29, 485–501. [Google Scholar] [CrossRef] [Scilit]
  36. Wei, H.; Liu, C.; Shi, Y. A Robust Distributed MPC Framework for Multiagent Consensus with Communication Delays. IEEE Trans. Autom. Control 2024, 69, 7418–7432. [Google Scholar] [CrossRef] [Scilit]
Figure 1. Reference frames of the UAV.
Figure 1. Reference frames of the UAV.
Drones 10 00647 g001
Figure 2. Control architecture of each UAV in the swarm.
Figure 2. Control architecture of each UAV in the swarm.
Drones 10 00647 g002
Figure 3. Three-dimensional flight trajectories of the UAVs.
Figure 3. Three-dimensional flight trajectories of the UAVs.
Drones 10 00647 g003
Figure 4. The velocity of the UAVs.
Figure 4. The velocity of the UAVs.
Drones 10 00647 g004
Figure 5. The acceleration of the UAVs.
Figure 5. The acceleration of the UAVs.
Drones 10 00647 g005
Figure 6. Obstacle and inter-UAV collision avoidance.
Figure 6. Obstacle and inter-UAV collision avoidance.
Drones 10 00647 g006
Figure 7. The convergence results of the objective function.
Figure 7. The convergence results of the objective function.
Drones 10 00647 g007
Figure 8. Trajectory costs and computation times under different M.
Figure 8. Trajectory costs and computation times under different M.
Drones 10 00647 g008
Figure 9. Target-reaching and formation-maintenance costs under different β 2 .
Figure 9. Target-reaching and formation-maintenance costs under different β 2 .
Drones 10 00647 g009
Figure 10. Trajectory costs under sinusoidal and Gaussian disturbances.
Figure 10. Trajectory costs under sinusoidal and Gaussian disturbances.
Drones 10 00647 g010
Figure 11. Three-dimensional trajectories of the UAVs in the presence of a reciprocating moving obstacle.
Figure 11. Three-dimensional trajectories of the UAVs in the presence of a reciprocating moving obstacle.
Drones 10 00647 g011
Figure 12. Trajectory comparison between DNMPC and Hybrid A*.
Figure 12. Trajectory comparison between DNMPC and Hybrid A*.
Drones 10 00647 g012
Figure 13. UAV swarm trajectory planning results under communication delay.
Figure 13. UAV swarm trajectory planning results under communication delay.
Drones 10 00647 g013
Figure 14. Average trajectory cost under different communication delays.
Figure 14. Average trajectory cost under different communication delays.
Drones 10 00647 g014
Figure 15. Results of five-UAV swarm trajectory planning.
Figure 15. Results of five-UAV swarm trajectory planning.
Drones 10 00647 g015
Figure 16. Main components of the experimental platform.
Figure 16. Main components of the experimental platform.
Drones 10 00647 g016
Figure 17. Flight experimental scenario.
Figure 17. Flight experimental scenario.
Drones 10 00647 g017
Figure 18. Flight experimental results of the three-UAV swarm.
Figure 18. Flight experimental results of the three-UAV swarm.
Drones 10 00647 g018
Table 1. Comparison of representative MPC-based and trajectory planning methods.
Table 1. Comparison of representative MPC-based and trajectory planning methods.
Collision ConstraintObstacle ConstraintOptimization Complexity
[15,17,18,19,23,24] O ( ( N obs + N nbr + c ) N ) 3
[16,20,22]× O ( ( N nbr + c ) N ) 3
[21]×× O ( c N ) 3
[25,26]× O ( ( N obs + c ) N ) 3
This work O ( 4 M + N obs + N nbr + c ) 3
N obs : number of obstacles; N nbr : number of neighboring UAVs; c: number of other state, such as velocity constraints. M: number of control parameterization in this work; N: length of prediction horizon; ✔ indicates that the corresponding constraint is considered, whereas × indicates that it is not considered; bold type identifies the method proposed in this work.
Table 2. Comparison of different MPC-based methods.
Table 2. Comparison of different MPC-based methods.
Average
Trajectory Cost
Average
Computation Time (s)
Computational
Complexity
Proposed DNMPC1.54110.0441 O ( 4 M + ( N obs + 3 ) ) 3
Proposed CNMPC1.49260.3761 O ( 12 M + 3 ( N obs + 3 ) ) 3
NMPC [22]1.21980.4470 O ( 15 N + 4 N nbr ) 3
Table 3. Online computation time of the proposed distributed NMPC method in the flight experiment.
Table 3. Online computation time of the proposed distributed NMPC method in the flight experiment.
Average Computation Time (ms)Maximum Computation Time (ms)
UAV 115.24839.117
UAV 213.85839.035
UAV 313.62038.989
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Cui, Y.; Zeng, T.; Li, B. A Nonlinear Model Predictive Control Method for Trajectory Planning of UAV Swarms. Drones 2026, 10, 647. https://doi.org/10.3390/drones10090647

AMA Style

Cui Y, Zeng T, Li B. A Nonlinear Model Predictive Control Method for Trajectory Planning of UAV Swarms. Drones. 2026; 10(9):647. https://doi.org/10.3390/drones10090647

Chicago/Turabian Style

Cui, Yi, Tongxin Zeng, and Bin Li. 2026. "A Nonlinear Model Predictive Control Method for Trajectory Planning of UAV Swarms" Drones 10, no. 9: 647. https://doi.org/10.3390/drones10090647

APA Style

Cui, Y., Zeng, T., & Li, B. (2026). A Nonlinear Model Predictive Control Method for Trajectory Planning of UAV Swarms. Drones, 10(9), 647. https://doi.org/10.3390/drones10090647

Article Metrics

Back to TopTop