Real-time Conflict Resolution Algorithm for Multi-UAV Based on Model Predict Control

A real-time conflict resolution algorithm based on model predictive control (MPC) is introduced to address the flight conflict resolution problem in multi-UAV scenarios. Using a low-level controller, the UAV dynamic equations are abstracted into simpler unicycle kinematic equations. The neighboring UAVs exchange their predicted trajectories at each sample time to predict the conflicts. Then, under the predesignated resolution rule and strategy, decentralized coordination and cooperation are performed to resolve the predicted conflicts. The controller structure of the distributed nonlinear model predictive control (DNMPC) is designed to predict potential conflicts and calculate control variables for each UAV. Numerical simulations of multi-UAV coordination are performed to verify the performance of the proposed algorithm. Results demonstrate that the proposed algorithm can resolve the conflicts sufficiently in real time, while causing no further conflicts.


Introduction
Interest in research activities related to techniques using multiple Unmanned Aerial Vehicles (UAVs) has experienced a significant increase in recent decades [1,2].As the application of cooperative UAVs to execute tasks has gradually increased, the common problem of maintaining a safe separation among all UAVs has aroused much attention from scholars.Therefore, conflict (detection and) resolution algorithms are needed for all the multi-UAV scenarios.
The major problem of conflict (detection and) resolution lies in the accurate collision prediction and efficient adjustment of the flight status among conflicting UAVs [2,3].Many mythologies and approaches have been applied in order to this problem, among them are two main categories: numerical approaches [4][5][6][7][8][9][10][11] and control approaches [12][13][14][15].As for numerical approaches, Refs.[4,5] considered the conflict resolution (CR) as a replanning problem and applied mixed-integer linear program (MILP).Masci and Tedeschi implemented conflict resolution by using game theory [6].In Ref. [7], the conflict was resolved by tuning the speed of aerial vehicles based on Monte Carlo optimization, but not all conflicts could be resolved, due to the constraints of velocity change.Other CR methods have been proposed, such as application of geometric algorithm [8], ant colony optimization algorithm [9], multi-objective evolutionary algorithms [10] and differential geometric algorithm [11].Numerical methods can efficiently resolve the conflicts in some typical scenarios, but they find it difficult to take the actual flight status of the UAV in to account.
Thus, other scholars have adopted control methods in solving the CR problem, a typical form among them is model predictive control (MPC).In Ref. [12], a centralized model predictive controller is designed that considers the physical limitations of the aircraft, although the timeliness of the method is not very good.A modified MPC approach combined with morphing potential field is proposed in Ref. [13], which prohibits UAVs' collision with obstacles and conflicts in real time.Chaloulos et al. [14] designed a decentralized model predictive control (DMPC) scheme for hierarchical systems, which can provide a preview of the otherwise myopic navigation functions and generate conflict-free trajectories, but without considering the priorities of aircrafts in the system.Meanwhile, all the methods mentioned above focused on resolving current conflicts, while ignoring subsequent conflicts.
In this paper, an improved distributed nonlinear MPC (DNMPC) framework for autonomous UAVs is proposed to resolve the conflicts of flight trajectories that implement decentralized CR based on the communication between the conflicting UAVs.This proposed method is motivated by two main properties: reliable prediction of the potential conflicts and constraint handling for resolving the predicted conflicts by managing the current inputs and states.At the same time, corresponding resolution rule and strategy are proposed to decompose conflicts and resolve them in groups consists of several UAVs.A conflict resolution algorithm is also designed to calculate control variables for each UAV and to ensure no subsequent conflicts will be generated, which leads to a consistent unique decision for conflicting UAVs.

Problem Definition
There are N v UAVs in the airspace at the same height; each UAV can be denoted as U i (i = 1, . . ., N v ); the flight state variable of each UAV in discrete time sequence k = 1, 2 • • • t k is denoted as x i (k), where x i (0) and x i (t k ) represent the initial and final state, respectively.The fundamental purpose of the conflict resolution problem is to design an efficient adjustment strategy to guide each UAV to its target without any collision with other UAVs, and to ensure the global cost minimum [15,16].To solve this problem, assuming that UAVs within a certain range can receive each other's predicted trajectories between UAVs, the solution scheme can be described as Figure 1 [17]: proposed in Ref. [13], which prohibits UAVs' collision with obstacles and conflicts in real time.Chaloulos et al. [14] designed a decentralized model predictive control (DMPC) scheme for hierarchical systems, which can provide a preview of the otherwise myopic navigation functions and generate conflict-free trajectories, but without considering the priorities of aircrafts in the system.Meanwhile, all the methods mentioned above focused on resolving current conflicts, while ignoring subsequent conflicts.In this paper, an improved distributed nonlinear MPC (DNMPC) framework for autonomous UAVs is proposed to resolve the conflicts of flight trajectories that implement decentralized CR based on the communication between the conflicting UAVs.This proposed method is motivated by two main properties: reliable prediction of the potential conflicts and constraint handling for resolving the predicted conflicts by managing the current inputs and states.At the same time, corresponding resolution rule and strategy are proposed to decompose conflicts and resolve them in groups consists of several UAVs.A conflict resolution algorithm is also designed to calculate control variables for each UAV and to ensure no subsequent conflicts will be generated, which leads to a consistent unique decision for conflicting UAVs.

Problem Definition
There are Nv UAVs in the airspace at the same height; each UAV can be denoted as Ui (i = 1, …, Nv); the flight state variable of each UAV in discrete time sequence i k , where x (0) i and x ( ) t represent the initial and final state, respectively.The fundamental purpose of the conflict resolution problem is to design an efficient adjustment strategy to guide each UAV to its target without any collision with other UAVs, and to ensure the global cost minimum [15][16].To solve this problem, assuming that UAVs within a certain range can receive each other's predicted trajectories between UAVs, the solution scheme can be described as Figure 1 [17]: In the scheme, the whole system is divided into two main modules: the conflict management module and the control & coordination module.The conflict management module consists of 3 submodules: conflict detection, conflict group (construction) and resolution rule.Conflict detection submodule receives and analyses predicted trajectories of adjacent UAVs within a certain range, and determines whether there are conflicts, then delivers the conflict information.Conflict group (construction) sub-module sorts the conflicts and establishes conflict groups based on the conflict information.Resolution rules sub-module generates resolution plans for each conflict group based on several collision free rules and constraints.The control & coordination module resolves the current conflicts depending on the resolution plan, local UAV trajectory and conflict trajectories, then deliver corresponding control strategies to UAVs with conflicts and generate new trajectories without collisions in the current time period.The entire coordination process is run once in a one-step cycle, and is continuously cycled to form a rolling real-time online optimization process, which is similar In the scheme, the whole system is divided into two main modules: the conflict management module and the control & coordination module.The conflict management module consists of 3 sub-modules: conflict detection, conflict group (construction) and resolution rule.Conflict detection sub-module receives and analyses predicted trajectories of adjacent UAVs within a certain range, and determines whether there are conflicts, then delivers the conflict information.Conflict group (construction) sub-module sorts the conflicts and establishes conflict groups based on the conflict information.Resolution rules sub-module generates resolution plans for each conflict group based on several collision free rules and constraints.The control & coordination module resolves the current conflicts depending on the resolution plan, local UAV trajectory and conflict trajectories, then deliver corresponding control strategies to UAVs with conflicts and generate new trajectories without collisions in the current time period.The entire coordination process is run once in a one-step cycle, and is continuously cycled to form a rolling real-time online optimization process, which is similar to the conception of model predictive control.Thus, this paper introduces a real-time coordination algorithm based on MPC, and can implement online rolling resolution to flight conflicts for UAVs.

Modeling of UAV
Supposing that all the UAVs are flying in the coordinate system of ground (Oxyz), which can be defined as: O is the selected coordinate origin, Ox points to true north, Oz axis points to true east, and Oy axis is determined by the right-hand rule; and all UAVs move within the horizon plane Oxz.So that the UAV can be regarded as Dubins' vehicle [18], then by discrete sampling of the flight process of each UAV at the kth time, the flight state of UAV can be defined as x(k) = (x(k), z(k), ψ(k)).The discretized kinematic equations of UAV can be given as: where, ψ is the heading angle of UAV, ω is heading angular speed, ∆t is the sampling interval.
Rewrite (1) into a matrix form: where, y represents for the output vector of UAV, matrixes A, B and C satisfy the equations below: The constraints of this problem are mainly composed of UAV flight performance constraints and collision avoidance constraints: (1) UAV flight performance constraints where, v max , n max , ω max represent for the maximum speed, overload, angular speed of UAV, r turn represents for the minimum turning radius of UAV.(2) Collision avoidance constraint Denote the safe flight radius of UAV as r sa f e , if the distance between any two UAVs (r ij ) is less than r sa f e , these two UAVs are considered to collide [17].So at kth time, the collision avoidance constraint can be given as below:

Modeling of Conflict Management
In this study, a distributed control model is adopted for UAVs to communicate.For all the UAVs in a certain range, they broadcast their own predicted trajectories to each other.If at kth time, there exist two or more UAVs with distance between them of less than the safe range, then these UAVs will be predicted as "conflicting".The predicted conflict UAV set is defined as below: where, N Cf is the number of conflict groups at kth time, S i , S j are the predicted trajectories of UAVs with conflict, as shown in Figure 2. Thus, all the resolutions are calculated and maintained by the members in the coordination group independently, based on the information broadcast by the group members.

Modeling of Conflict Management
In this study, a distributed control model is adopted for UAVs to communicate.For all the UAVs in a certain range, they broadcast their own predicted trajectories to each other.If at kth time, there exist two or more UAVs with distance between them of less than the safe range, then these UAVs will be predicted as "conflicting".The predicted conflict UAV set is defined as below: where, NCf is the number of conflict groups at kth time, , ij SSare the predicted trajectories of UAVs with conflict, as shown in Figure 2. Thus, all the resolutions are calculated and maintained by the members in the coordination group independently, based on the information broadcast by the group members.
UAV i UAV j The concept of a state machine is used to model the UAV flight process.The state machine is a mathematical model that represents a limited number of states and behaviors, such as transitions and actions between these states.It mainly consists of the following parts: states, events, actions, and transitions, as shown in Figure 3. Considering the issue of multi-UAV trajectory coordination [19], suppose that UAVs in flight have only two states, namely: (1) flying towards the target mission point; (2) performing adjustment for the conflict resolution.To describe the switching condition of the state machine between these The concept of a state machine is used to model the UAV flight process.The state machine is a mathematical model that represents a limited number of states and behaviors, such as transitions and actions between these states.It mainly consists of the following parts: states, events, actions, and transitions, as shown in Figure 3.

Modeling of Conflict Management
In this study, a distributed control model is adopted for UAVs to communicate.For all the UAVs in a certain range, they broadcast their own predicted trajectories to each other.If at kth time, there exist two or more UAVs with distance between them of less than the safe range, then these UAVs will be predicted as "conflicting".The predicted conflict UAV set is defined as below: where, NCf is the number of conflict groups at kth time, , i j S S are the predicted trajectories of UAVs with conflict, as shown in Figure 2. Thus, all the resolutions are calculated and maintained by the members in the coordination group independently, based on the information broadcast by the group members.
UAV i UAV j The concept of a state machine is used to model the UAV flight process.The state machine is a mathematical model that represents a limited number of states and behaviors, such as transitions and actions between these states.It mainly consists of the following parts: states, events, actions, and transitions, as shown in Figure 3. Considering the issue of multi-UAV trajectory coordination [19], suppose that UAVs in flight have only two states, namely: (1) flying towards the target mission point; (2) performing adjustment for the conflict resolution.To describe the switching condition of the state machine between these Considering the issue of multi-UAV trajectory coordination [19], suppose that UAVs in flight have only two states, namely: (1) flying towards the target mission point; (2) performing adjustment for the conflict resolution.To describe the switching condition of the state machine between these two states [20], a reference early warning distance variable r dec is defined.As shown in Figure 4, when the distance between two UAVs is less than r dec , the UAV will change from the cruising state to the adjustment state, as shown in Figure 5. two states [20], a reference early warning distance variable  is defined.As shown in Figure 4, when the distance between two UAVs is less than  , the UAV will change from the cruising state to the adjustment state, as shown in Figure 5.    Therefore, the process for establishing a multi-UAV conflict group is given as follows:

Cruise UAV in
Process 1: Step1.At kth time, get all UAV state variables:

Conflict Resolution Strategy Based on Synergetic Heading Angle Control Rule
After maintaining the predicted conflict groups, in order not to cause chain reactions of new conflicts, conflicting UAVs are sorted by their flight status [21].Define the following rules: (1) The UAV with the earlier arrival at the conflict position has the higher priority; (2) The UAV closer to its target has the higher priority; (3) The UAV with higher speed has the higher priority.In the process of resolution, the UAV with the highest priority can fly straight to its target (if it does not cause subsequent conflicts), while the UAV with the lowest priority needs to receive the trajectory of the UAV with the highest priority as a reference track and maneuver until all conflicts are resolved.
To ensure that the two conflicting UAVs are able to handle the conflict autonomously, and to guarantee the consistency of the action, Ref. [15] introduced a control rule of synergetic heading angle Therefore, the process for establishing a multi-UAV conflict group is given as follows: Process 1: Step1.At kth time, get all UAV state variables: Step2.For UAV i, identify all UAV j so that Step3.If C f ε = ∅, then the UAV i flies towards the target point according to the original flight status; Otherwise, adjustment optimizations are performed on the UAV i and j; Step4.For i = i + 1; (ε = ε + 1), repeat Step 2-3, until the maximum number of UAVs.

Conflict Resolution Strategy Based on Synergetic Heading Angle Control Rule
After maintaining the predicted conflict groups, in order not to cause chain reactions of new conflicts, conflicting UAVs are sorted by their flight status [21].Define the following rules: (1) The UAV with the earlier arrival at the conflict position has the higher priority; (2) The UAV closer to its target has the higher priority; (3) The UAV with higher speed has the higher priority.In the process of resolution, the UAV with the highest priority can fly straight to its target (if it does not cause subsequent conflicts), while the UAV with the lowest priority needs to receive the trajectory of the UAV with the highest priority as a reference track and maneuver until all conflicts are resolved.
To ensure that the two conflicting UAVs are able to handle the conflict autonomously, and to guarantee the consistency of the action, Ref. [15] introduced a control rule of synergetic heading angle for cruising UAVs with constant speed.During the process of conflict resolution, UAVs with higher and lower priorities (UAV H.P. and UAV L.P.) are commanded to turn to the same side of their current directions under this rule.Denote ∆ψ = ψ L − ψ H , shown in Figure 6, the rule can be described as: if ∆ψ ∈ [0, π], then increase the heading angles of both UAVs; if ∆ψ ∈ [π, 2π], then decrease the heading angles of both UAVs.
for cruising UAVs with constant speed.During the process of conflict resolution, UAVs with higher and lower priorities (UAV H.P. and UAV L.P.) are commanded to turn to the same side of their current directions under this rule.Denote

Conflict Resolution Algorithm Based on DNMPC
Model predictive control is a model-based finite time domain open-loop optimal algorithm.The current optimal control is executed in the next sampling period, and the process is repeated.In this study, a distributed nonlinear MPC algorithm (DNMPC) is introduced to coordinate the conflicting UAVs' trajectories.

Performance Indicators for Conflict Resolution
When executing tasks in airspace without threats, UAVs should fly along their own line with the mission in order to complete the mission as quickly as possible.Therefore, in the conflict resolution problem, the UAV should adjust its trajectory as little as possible while meeting the collision avoidance requirements [22].In this paper, the normalized performance indicators are designed as follows: 1) Total flight distance indicator: where,  = [ ,  ] represents for the target of UAV i.

Conflict Resolution Algorithm Based on DNMPC
Model predictive control is a model-based finite time domain open-loop optimal algorithm.The current optimal control is executed in the next sampling period, and the process is repeated.In this study, a distributed nonlinear MPC algorithm (DNMPC) is introduced to coordinate the conflicting UAVs' trajectories.

Performance Indicators for Conflict Resolution
When executing tasks in airspace without threats, UAVs should fly along their own line with the mission in order to complete the mission as quickly as possible.Therefore, in the conflict resolution problem, the UAV should adjust its trajectory as little as possible while meeting the collision avoidance requirements [22].In this paper, the normalized performance indicators are designed as follows: (1) Total flight distance indicator: where, P ti = [x ti , z ti ] represents for the target of UAV i. (2) Trajectory adjustment cost indicator: (3) Conflict penalty function: Rewrite Constraint (5) as a penalty function for conflict: In summary, the entire performance indicator for conflict resolution in period [k, k + N] can be given as: where, F i (•) is the conflict penalty function and ρ is the coefficient for the penalty function.[x i (k + 1|k), . . ., x i (k + N|k)] is the predicted state vector of UAV i, [x ir (k + 1|k), . . ., x ir (k + N|k)] is the reference state vector for UAV i, [U i (k|k), . . . ,U i (k + N − 1|k)] is the input sequence of control vector.Each UAV solves its own optimization problem independently and communicates with other UAVs only when necessary; thus, this framework describes a distributed controller [14].Meanwhile, the analysis and justification of closed-loop stability can be referred to in Refs.[23,24].

Controller Design of DNMPC
In summary, the entire performance indicator for conflict resolution in period [,  + ] can be given as: where, F ( ) i ⋅ is the conflict penalty function and ρ is the coefficient for the penalty function.

Controller Design of DNMPC
Figure 7 is the solution framework for DNMPC conflict resolution controller.k is the current moment, and N is the prediction time domain and the control time domain length.[  ( + 1|), … ,   ( + |)] is the predicted state vector of UAV i, [  ( + 1|), … ,   ( + |)] is the reference state vector for UAV i, [  (|), … ,   ( +  − 1|)] is the input sequence of control vector.Each UAV solves its own optimization problem independently and communicates with other UAVs only when necessary; thus, this framework describes a distributed controller [14].Meanwhile, the analysis and justification of closed-loop stability can be referred to in Ref. [23,24].

Algorithm Description for Conflict Resolution
According to the idea of distributed MPC and receding horizon optimization, for the multi-UAV conflict resolution problem, the specific collision avoidance and trajectory coordination algorithm for any given UAV can be described as follows: Algorithm 1: Step1.Set the sampling time k, the status of UAV i is   ().The current input control vector is   (), in the period of prediction [,  + ], based on the model of UAV, the predicted flight status can be given as: ( + ) = [  ( + 1|),   ( + 2|),   ( + 3|), … ,   ( + |)] ; Step2.If conflict group for UAV i  = , UAV i need no trajectory coordination; else, set  ∈ , denote the predicted flight status of UAV j as:

Algorithm Description for Conflict Resolution
According to the idea of distributed MPC and receding horizon optimization, for the multi-UAV conflict resolution problem, the specific collision avoidance and trajectory coordination algorithm for any given UAV can be described as follows: Algorithm 1: Step1.Set the sampling time k, the status of UAV i is x i (k).The current input control vector is u i (k), in the period of prediction [k, k + N], based on the model of UAV, the predicted flight status can be given as: Step2.If conflict group for UAV i C f = φ, UAV i need no trajectory coordination; else, set j ∈ C f , denote the predicted flight status of UAV j as: Step3.According to X j and the resolution rule in Section 3.3, combined with Constraints ( 4) and ( 5), plan a conflict-free reference path for UAV i, then generate the predicted reference status: Step4.According to X ir and X i , combined with constraints (4) ( 5) and performance indicators (10), solve the optimal control vector . Then feedback optimal control vector U i to UAV i. Step5.Execute the first item u i (k|k) in U i , then get the status of UAV i in k+1 th time; and again sends the updated predicted flight status X i to other associated UAVs.
Step6.If UAV i has reached the specified state, i.e., it reaches the specified target point, the calculation is ended; otherwise, let k = k + 1, and repeat Steps 1-5.
Then feedback optimal control vector  to UAV i.
Step5.Execute the first item   (|) in  , then get the status of UAV i in k+1 th time; and again sends the updated predicted flight status  to other associated UAVs.
Step6.If UAV i has reached the specified state, i.e., it reaches the specified target point, the calculation is ended; otherwise, let k = k + 1, and repeat Steps 1-5.
In the resolution process, if some UAVs reach the designated target point earlier than other UAVs, then these UAVs are removed from the optimization list, that is, the next round of process will not consider these UAVs.The flow chart of the process for the conflict resolution algorithm is constructed as Figure 8:

Simulation Results and Analysis
To verify the performance of the discussed conflict resolution algorithm, numerical simulation results and analysis are presented in this section.The whole simulation system and the UAV objects were built using Visual C++ (ver.10.0), and the results figures were created using MATLAB.The entire simulation was performed on a workstation consisting of a 3.5 GHz Intel Core-i7 CPU and 16 GB of physical RAM running 64-bit Microsoft Windows 10.The sampling interval t Δ of DNMPC is set as 1 s, the maximum iteration step is set as 200, while the prediction time domain is set as 10 steps.
The formulation and parameters tuning method are referred to the traditional form of DMC

Simulation Results and Analysis
To verify the performance of the discussed conflict resolution algorithm, numerical simulation results and analysis are presented in this section.The whole simulation system and the UAV objects were built using Visual C++ (ver.10.0), and the results figures were created using MATLAB.The entire simulation was performed on a workstation consisting of a 3.5 GHz Intel Core-i7 CPU and 16 GB of physical RAM running 64-bit Microsoft Windows 10.The sampling interval ∆t of DNMPC is set as 1 s, the maximum iteration step is set as 200, while the prediction time domain is set as 10 steps.The formulation and parameters tuning method are referred to the traditional form of DMC mentioned in Refs.[25,26].It is assumed that the UAVs obtain their state information completely accurately, that is, the status acquired by the UAVs at the current time in the simulations is equal to the current status of the calculation output of DNMPC at the previous time.
Simulation 1: 3 cruising UAVs rendezvous, requiring conflict resolution.Supposing that all 3 UAVs have the same characteristics of flight, the initial conditions and other simulation parameters are listed as Table 1.The safe distance r sa f e = 3 km and detection distance r dec = 8 km.Since the UAVs are cruising, their velocities remain constant, and the synergetic heading angle control rule is used in this simulation.In this simulation, the maximum and average cycling time of DNMPC is 0.47 s and 0.31 s, respectively, which is less than ∆t = 1s.The conflict resolution results are shown in Figures 9-11.accurately, that is, the status acquired by the UAVs at the current time in the simulations is equal to the current status of the calculation output of DNMPC at the previous time.Simulation 1: 3 cruising UAVs rendezvous, requiring conflict resolution.Supposing that all 3 UAVs have the same characteristics of flight, the initial conditions and other simulation parameters are listed as Table 1.The safe distance safe r = 3 km and detection distance dec r = 8 km.Since the UAVs are cruising, their velocities remain constant, and the synergetic heading angle control rule is used in this simulation.In this simulation, the maximum and average cycling time of DNMPC is 0.47 s and 0.31 s, respectively, which is less than =1 t s Δ .The conflict resolution results are shown in Figures 9-11.According to the initial conditions, the potential conflicts are detected as (UAV1-3,69s) and (UAV2-3,72s), which are within one prediction time domain.Thus, the DNMPC deals with the 3 UAVs in one conflict group, and UAV3 has the highest level due to its flight state.It is shown in Figure 9 and Figure 11 that UAV3 flies past the conflict area and straight towards its destination, while UAV1 and UAV2 adjust their flight trajectories based on the synergetic heading angle control rule.Figure 10 shows that the distances between each of the UAVs are above the safe distance, which indicates that the adjustment plan calculated by DNMPC resolves potential conflicts sufficiently, and causes no further conflicts.According to the initial conditions, the potential conflicts are detected as (UAV1-3,69s) and (UAV2-3,72s), which are within one prediction time domain.Thus, the DNMPC deals with the 3 UAVs in one conflict group, and UAV3 has the highest level due to its flight state.It is shown in Figure 9 and Figure 11 that UAV3 flies past the conflict area and straight towards its destination, while UAV1 and UAV2 adjust their flight trajectories based on the synergetic heading angle control rule.Figure 10 shows that the distances between each of the UAVs are above the safe distance, which indicates that the adjustment plan calculated by DNMPC resolves potential conflicts sufficiently, and causes no further conflicts.2, and the other settings of DNMPC is the same as in Simulation 1.In this simulation, the maximum and average cycling times of DNMPC are 0.66 s and 0.52 s, respectively, and are thus less than =1 t s Δ .The conflict resolution results are shown in Figure 12 and Figure 13.The simulation results show that, according to the initial conditions, conflict occurs between each pair of UAVs.Thus, DNMPC manages all conflict UAVs into two conflicts groups: (UAV2-3,76s) and (UAV1-4,89s) based on the proposed resolution rule, and resolves the conflicts separately.It is shown in Figure 12 and Figure 13 that the potential conflicts are resolved sufficiently and without any further conflicts.According to the initial conditions, the potential conflicts are detected as (UAV1-3,69s) and (UAV2-3,72s), which are within one prediction time domain.Thus, the DNMPC deals with the 3 UAVs in one conflict group, and UAV3 has the highest level due to its flight state.It is shown in Figures 9 and 11 that UAV3 flies past the conflict area and straight towards its destination, while UAV1 and UAV2 adjust their flight trajectories based on the synergetic heading angle control rule.Figure 10 shows that the distances between each of the UAVs are above the safe distance, which indicates that the adjustment plan calculated by DNMPC resolves potential conflicts sufficiently, and causes no further conflicts.
Simulation 2: Conflict resolution of 4 UAVs.In this simulation, the safe distance r sa f e = 3 km and the detection distance r dec = 15 km.The initial conditions and other simulation parameters are listed as Table 2, and the other settings of DNMPC is the same as in Simulation 1.In this simulation, the maximum and average cycling times of DNMPC are 0.66 s and 0.52 s, respectively, and are thus less than ∆t = 1s.The conflict resolution results are shown in Figures 12 and 13.The simulation results show that, according to the initial conditions, conflict occurs between each pair of UAVs.Thus, DNMPC manages all conflict UAVs into two conflicts groups: (UAV2-3,76s) and (UAV1-4,89s) based on the proposed resolution rule, and resolves the conflicts separately.It is shown in Figure 12 and Figure 13 that the potential conflicts are resolved sufficiently and without any further conflicts.To further demonstrate the merits of the proposed algorithm, regarding the conditions of Simulation 2, 150 Monte-Carlo simulations were carried out for comparison between the proposed method (denoted as A) and the method of Ref. [15] (denoted as B).Both methods were implemented under the same simulation settings.The following statistic indexes are listed in Table 3 for comparison: final performance indicator of equation ( 10) (FPI), total running time (TRT), and total number of further conflicts (TFC).It is shown in Table 3 that the final performance indicator of the proposed method is better than B. Also, the proposed method resolved the problem in less time and caused much less further conflict than B, which indicates that the proposed method enjoys superiority in terms of effectiveness and computation efficiency compared with common methods.

Conclusion and Future Work
In this paper, we have presented a CR algorithm that solves potential trajectory conflicts among conflicting UAVs cooperatively under the frameworks of DNMPC.The proposed algorithm adjusts the path of each conflicting UAV by coordinating their flight status while maintaining their velocities in order to avoid the detected conflict.The main advantage of this algorithm lies in that it can generate stable and feasible solutions to the CR problem without creating any further conflicts.The proposed algorithms were validated on the basis of many numerical simulations under an environment without the influence of noise, communication delay and aero turbulence.Experimental results showed that the proposed algorithm is effective and performs better than traditional CR algorithm and method.
Future research should focus on the resolution of some undetected sudden conflict and the elimination of the influence of calculation and communication delay on the resolution quality.On the other hand, new models will be established to handle different sources of uncertainty in sensors, dynamic models, aero turbulence, etc.This uncertainty should be considered when predicting the aerial vehicle trajectory in the conflict detection.The simulation results show that, according to the initial conditions, conflict occurs between each pair of UAVs.Thus, DNMPC manages all conflict UAVs into two conflicts groups: (UAV2-3,76s) and (UAV1-4,89s) based on the proposed resolution rule, and resolves the conflicts separately.It is shown in Figures 12 and 13 that the potential conflicts are resolved sufficiently and without any further conflicts.
To further demonstrate the merits of the proposed algorithm, regarding the conditions of Simulation 2, 150 Monte-Carlo simulations were carried out for comparison between the proposed method (denoted as A) and the method of Ref. [15] (denoted as B).Both methods were implemented under the same simulation settings.The following statistic indexes are listed in Table 3 for comparison: final performance indicator of equation ( 10) (FPI), total running time (TRT), and total number of further conflicts (TFC).It is shown in Table 3 that the final performance indicator of the proposed method is better than B. Also, the proposed method resolved the problem in less time and caused much less further conflict than B, which indicates that the proposed method enjoys superiority in terms of effectiveness and computation efficiency compared with common methods.

Conclusions and Future Work
In this paper, we have presented a CR algorithm that solves potential trajectory conflicts among conflicting UAVs cooperatively under the frameworks of DNMPC.The proposed algorithm adjusts the path of each conflicting UAV by coordinating their flight status while maintaining their velocities in order to avoid the detected conflict.The main advantage of this algorithm lies in that it can generate stable and feasible solutions to the CR problem without creating any further conflicts.The proposed algorithms were validated on the basis of many numerical simulations under an environment without the influence of noise, communication delay and aero turbulence.Experimental results showed that the proposed algorithm is effective and performs better than traditional CR algorithm and method.
Future research should focus on the resolution of some undetected sudden conflict and the elimination of the influence of calculation and communication delay on the resolution quality.On the other hand, new models will be established to handle different sources of uncertainty in sensors, dynamic models, aero turbulence, etc.This uncertainty should be considered when predicting the aerial vehicle trajectory in the conflict detection.

Figure 1 .
Figure 1.Scheme of solution for conflict resolution problem.

Figure 1 .
Figure 1.Scheme of solution for conflict resolution problem.

Figure 2 .
Figure 2. Information exchange of distributed UAV control system.

Figure 3 .
Figure 3. Principle of state machine.

Figure 2 .
Figure 2. Information exchange of distributed UAV control system.

Figure 2 .
Figure 2. Information exchange of distributed UAV control system.

Figure 3 .
Figure 3. Principle of state machine.

Figure 3 .
Figure 3. Principle of state machine.

Figure 5 .
Figure 5. State Machine of UAV flight.
then the UAV i flies towards the target point according to the original flight status; Otherwise, adjustment optimizations are performed on the UAV i and j.； repeat Step 2-3, until the maximum number of UAVs.

Figure 5 .
Figure 5. State Machine of UAV flight.

Figure 7
Figure 7 is the solution framework for DNMPC conflict resolution controller.k is the current moment, and N is the prediction time domain and the control time domain length.[xi (k + 1|k), . . ., x i (k + N|k)] is the predicted state vector of UAV i, [x ir (k + 1|k), . . ., x ir (k + N|k)] is the reference state vector for UAV i, [U i (k|k), . . . ,U i (k + N − 1|k)] is the input sequence of control vector.Each UAV solves its own optimization problem independently and communicates with other UAVs only when necessary; thus, this framework describes a distributed controller[14].Meanwhile, the analysis and justification of closed-loop stability can be referred to in Refs.[23,24].

Figure 8 .
Figure 8. Flow chart of the conflict resolution algorithm.

Figure 8 .
Figure 8. Flow chart of the conflict resolution algorithm.

Author
Contributions: H.-X.C. wrote the original article, designed experiments and analyzed simulation results; Y.N. reviewed the original article and provided part of original simulation data; Y.Y. provided funding project and part of original simulation data.

Table 1 .
Initial conditions and parameter values for Simulation 1.

Table 1 .
Initial conditions and parameter values for Simulation 1.

Table 1 .
Algorithms 2018, 11, x FOR PEER REVIEW 9 of 13 accurately, that is, the status acquired by the UAVs at the current time in the simulations is equal to the current status of the calculation output of DNMPC at the previous time.Simulation 1: 3 cruising UAVs rendezvous, requiring conflict resolution.Supposing that all 3 UAVs have the same characteristics of flight, the initial conditions and other simulation parameters are listed as Table1.The safe distance safe r = 3 km and detection distance dec r = 8 km.Since the UAVs are cruising, their velocities remain constant, and the synergetic heading angle control rule is used in this simulation.In this simulation, the maximum and average cycling time of DNMPC is 0.47 s and 0.31 s, respectively, which is less than Initial conditions and parameter values for Simulation 1.

Table 2 .
Initial conditions and parameter values for Simulation 2.

Table 2 .
Initial conditions and parameter values for Simulation 2.

Table 2 .
Initial conditions and parameter values for Simulation 2.

Table 3 .
Statistical indexes for both methods.

Table 3 .
Statistical indexes for both methods.