Cooperative Multi-UAV Collision Avoidance Based on Distributed Dynamic Optimization and Causal Analysis

Mingrui Lao 1,2 and Jun Tang 1,3,* 1 Science and Technology on Information Systems Engineering Laboratory, National University of Defense Technology, Changsha 410073, China; mingrui_lao@163.com 2 The School of Electronic and Information Engineering, Xi’an Jiaotong University, Xi’an 710049, China 3 Department of Telecommunication and System Engineering, Universitat Autònoma de Barcelona, Sabadell 08201, Spain * Correspondence: jun.tang@e-campus.uab.cat; Tel.: +34-688-113-447


Introduction
Recently, the unmanned aerial vehicle (UAV) has received a wide range of urban, civilian and warfare applications [1].It offers several extraordinary features, especially the acceptance of long-endurance and high-risk missions that could not be reasonably performed by manned aircraft.For any assignment, a common problem is that the UAVs may encounter each other.Consequently, an effective collision avoidance (CA) system is a prerequisite for free flight.
There are several existing widely used or adequately evaluated CA systems for conventional aviation, and these can be applied on UAVs, such as the efficient Medium Term CA approach based on four-dimensional (4D) trajectories (trajectories defined in the three spatial dimensions together with a time-stamp) to resolve conflicts in a terminal maneuvering area (TMA) [2], the Traffic Alert and Collision Avoidance System (TCAS) equipped to issue advisories on how to maneuver vertically to prevent collisions [3], and the Airborne Separation Assurance System (ASAS) that enables the flight crew to maintain separation of an aircraft from one or more other aircraft and provides flight information concerning the surrounding traffic [4].There are also several auxiliary systems that could provide the aircraft (or UAVs) with precise information about the state of the nearby traffic, such as the Automatic Dependent Surveillance Broadcast (ADS-B) system [5][6][7].
In addition, an extensive and meticulous survey of various methodologies ranging from abstract concepts to prototype systems for avoiding collisions between UAVs has been summarized in [4].Typical techniques applied to escort UAV safety include the Monte Carlo approach [8], geometric optimization model [9], symbiotic simulation [10], probabilistic approach [11], consensus [12], evolutionary algorithm [13,14], Kalman filter [15], Markov decision process [16], Dubins curve based algorithm [17], Predictive Control [18], reachable sets based methods [19], and so on.Each method has its own advantages and characteristics, and no matter which is employed, it aims to guarantee minimum separation between UAVs.However, some of the studies only focus on the two-UAV scenarios (not multiple vehicles).Furthermore, most of these methodologies could not support exploring the emergent dynamics between the generated trajectories and the surrounding traffic.Thus, there is a need to check the detailed states of the CA process with a global view to achieve the optimal strategy, while it is essential to understand the cause-effect relationship of each CA action and how the effects of a maneuver impact on the neighboring aircraft.Note that tight couplings between aircraft trajectories in dense scenarios (i.e., flocks applications) can deal with the propagation of non-controllable upstream and downstream maneuvers between trajectories.
The overextended UAV usage of flock applications would lead to a higher number of threats, which could raise the risk of potential collisions.For simplicity, the CA problem is currently being discussed on UAVs (without pilot intervention) that are flying in a segregated airspace.In this paper, it is assumed that a group of cooperative UAVs, which are stabilized by the autopilot, are flying to their own destination and having to avoid collisions with other UAVs in an efficient real-time communication.Each vehicle is equipped with a trajectory control unit which relies on the CA algorithm that is used as a predictive control considering real-time data-link communication with surrounding traffic.In this research, we propose two efficient algorithms: conflict detection (CD) and conflict resolution (CR), which, as two sub-modules, constitute a novel CA system for multi-UAV.The main contributions of this paper are as follows:

•
This paper presents an innovative strategy, distributed dynamic optimization approach (DDOA), to provide alternative trajectories for each UAV, by adding some essential constraints (i.e., performance, cost and distance) to make the problem treatable while the feasible trajectory generation for multi-UAV is a non-deterministic polynomial (NP) problem.

•
The novel causal analysis is developed to choose a preferred resolution trajectory, performing an analysis of scenario state space in order to explore the dynamic evolution and then determine all reachable states.By decomposing the complex scenario into several common clusters, the solution space is greatly reduced.

•
Quantitative measurement experiments are carried out to validate the feasibility and scalability of the CA system for the free flight of multi-UAV.In addition, the average computation time does not grow exponentially as the airspace density increases.
To prevent mid-air collisions between UAVs, the proposed CA system has been developed to serve as the last-resort safety net, which is an on-board CDR system providing resolution advisories.This paper is organized as follows: Section 2 illustrates the CA system functional architecture; Section 3 presents the core algorithm of the CD and CR sub-modules; Section 4 achieves the simulation results using the proposed system; finally, conclusions and future work are summarized in Section 5.

The Proposed CA System Architecture
The CA system should be supported by vigorous algorithms to increase the airspace capacity. Figure 1 illustrates the detailed fundamental processes of the complete CA system, in which the input is the 4D (three dimensions (3D) position + time) trajectory information belonging to each UAV; a high speed processor equipped with CD algorithm deals with the trajectories and obtains relevant information to predict whether a collision is going to occur in the future.If a potential collision is detected, DDOA computes the feasible solutions and causal analysis selects the optimal one.The control command is sent to the involved UAVs to resolve current threats and the states improve online.The core of the operational CA system consists of two components: • The CD module that analyzes the flight information depending on 4D trajectory has two different roles: generating the intuitionistic representation of threats and informing the CR module.
• The CR module integrates CD and resolves the detected conflicts in two stages: DDOA aims to avoid collisions by generating alternative trajectories for each UAV with a local optimization scope; causal analysis focuses on exploring the emergent dynamics between the alternative trajectories generated by DDOA and the rest involved trajectories.Based on the detected threats, the CR should be informed with the geographical coordinates where the collision would occur, the time when the collision would occur, and the involved UAVs.Though CR is a combinatorial problem in exponential growth with the increasing number of UAVs, in our research several strategies such as setting constraints are needed to narrow the solution space progressively to get the final optimal solution.Figure 2 conceptually illustrates the solution procedure.The DDOA generates several locally-optimal CA trajectories considering different constraints, e.g., the two UAVs should meet the performance requirements, satisfy the state equation, and keep a safe distance, etc.This causal analysis allows taking into consideration all the possible solutions that ensure the completeness of the solution space, and then reduces the space once again based on some specific constraints (e.g., the least cost).The hardware architecture of the novel CA system consists of the following major components: CA processor-performs airspace surveillance, intruder tracking, own UAV state tracking, conflict detection and conflict resolution, and it uses discrete status inputs of involved UAVs to control the CA logic parameters that determine the protection volume around own UAV; State transmitter-is used to provide air-to-air data exchange between UAVs so that coordinated, complementary CA trajectories can be issued when required; Control unit-guarantees the multiple cooperative UAVs following the generated optimal trajectory to resolve the conflicts.The core of the operational CA system consists of two components:

•
The CD module that analyzes the flight information depending on 4D trajectory has two different roles: generating the intuitionistic representation of threats and informing the CR module.

•
The CR module integrates CD and resolves the detected conflicts in two stages: DDOA aims to avoid collisions by generating alternative trajectories for each UAV with a local optimization scope; causal analysis focuses on exploring the emergent dynamics between the alternative trajectories generated by DDOA and the rest involved trajectories.Based on the detected threats, the CR should be informed with the geographical coordinates where the collision would occur, the time when the collision would occur, and the involved UAVs.Though CR is a combinatorial problem in exponential growth with the increasing number of UAVs, in our research several strategies such as setting constraints are needed to narrow the solution space progressively to get the final optimal solution.Figure 2 conceptually illustrates the solution procedure.The DDOA generates several locally-optimal CA trajectories considering different constraints, e.g., the two UAVs should meet the performance requirements, satisfy the state equation, and keep a safe distance, etc.This causal analysis allows taking into consideration all the possible solutions that ensure the completeness of the solution space, and then reduces the space once again based on some specific constraints (e.g., the least cost).
Appl. 2016, 6,xFOR PEER 3 of 14 one.The control command is sent to the involved UAVs to resolve current threats and the states improve online.The core of the operational CA system consists of two components: • The CD module that analyzes the flight information depending on 4D trajectory has two different roles: generating the intuitionistic representation of threats and informing the CR module.
• The CR module integrates CD and resolves the detected conflicts in two stages: DDOA aims to avoid collisions by generating alternative trajectories for each UAV with a local optimization scope; causal analysis focuses on exploring the emergent dynamics between the alternative trajectories generated by DDOA and the rest involved trajectories.Based on the detected threats, the CR should be informed with the geographical coordinates where the collision would occur, the time when the collision would occur, and the involved UAVs.Though CR is a combinatorial problem in exponential growth with the increasing number of UAVs, in our research several strategies such as setting constraints are needed to narrow the solution space progressively to get the final optimal solution.Figure 2 conceptually illustrates the solution procedure.The DDOA generates several locally-optimal CA trajectories considering different constraints, e.g., the two UAVs should meet the performance requirements, satisfy the state equation, and keep a safe distance, etc.This causal analysis allows taking into consideration all the possible solutions that ensure the completeness of the solution space, and then reduces the space once again based on some specific constraints (e.g., the least cost).The hardware architecture of the novel CA system consists of the following major components: CA processor-performs airspace surveillance, intruder tracking, own UAV state tracking, conflict detection and conflict resolution, and it uses discrete status inputs of involved UAVs to control the CA logic parameters that determine the protection volume around own UAV; State transmitter-is used to provide air-to-air data exchange between UAVs so that coordinated, complementary CA trajectories can be issued when required; Control unit-guarantees the multiple cooperative UAVs following the generated optimal trajectory to resolve the conflicts.The hardware architecture of the novel CA system consists of the following major components: CA processor-performs airspace surveillance, intruder tracking, own UAV state tracking, conflict detection and conflict resolution, and it uses discrete status inputs of involved UAVs to control the CA logic parameters that determine the protection volume around own UAV; State transmitter-is used to provide air-to-air data exchange between UAVs so that coordinated, complementary CA trajectories can be issued when required; Control unit-guarantees the multiple cooperative UAVs following the generated optimal trajectory to resolve the conflicts.

Representation of 4D Trajectory and Conflict Detection
The continuous trajectory of UAV can be modeled as a sequence of discrete points (waypoints) expediently for computer processes.There is a direction between every two adjacent waypoints due to the velocity vector.The position of 3D and corresponding time-called spatial-temporal information-makes up the 4D trajectory of each UAV.For U AVi (i = 1, 2, ..., n), its dynamic characteristics can be described in a Cartesian coordinate system [20].The region formed by x and y axes indicates the horizontal plane, and z stands for the altitude.
The formula defines p i t and v i t , respectively, as the position and velocity of UAVi in 3D; let θ i t represent the course angle, the orientation of velocity vector v i t in the x-y plane (measured from the x axis in counter-clockwise direction); let ϕ i t delegate the pitch angle, the orientation of velocity vector v i t in the vertical plane (measured from the horizontal plane up as positive and down as negative); and ω i t is the angular velocity.Considered simply, each UAV is supposed to keep its own velocity v i , i ∈ {1, 2, • • • , n} during regular flight.In the detection sub-module, the UAV that detects the conflict will read out the sensed data from sensor unit and check whether any intruder enters its safety zone.At each moment t, the relative distance between UAVi and nearby UAVj in the airspace can be simply calculated as: In this research, the conflict detection logic can be defined as follows: if the current relative distance of the two UAVs is smaller than the R cf (R ij t < R c f ), and they have a trend to be closer, i.e., when the value of R ij t that is the relative distance between UAVi and nearby UAVj is getting smaller, the resolution maneuver fires regardless of whether the coming closest point of approach (CPA) [21] is in collision volume R cl or not.Despite the fact that this way certainly may touch off several unnecessary resolution maneuvers, the collision risk is highly reduced since the situation in whichthe intruder suddenly changes its direction near the CPA is prevented.
Let p ij t = p i t − p j t be the distance vector in 3D space between UAVi and nearby UAVj at time t; t be the relative velocity (closing speed) between the UAVs at time t.Distinctly, when the two UAVs are getting closer to each other (i.e., , a conflict is detected and it has to be resolved immediately; when the two UAVs are getting further apart (i.e., p ij t • v ij t < 0), there is no risk to deteriorate into a collision at all.

Conflict Resolution Algorithm
This section focuses on the CR algorithm consisting of two subsections: DDOA and causal analysis.Different alternative trajectories for each involved UAV are generated by DDOA in a collision, and the globally optimal one is selected by causal analysis considering the follow-up effects.

Distributed Dynamic Optimization Approach
The UAVi trajectory is discrete and the sampling interval is ∆t.Therefore, in the m-th moment, the related position and pitch angle of UAVi are x i (m), In order to generate an amending trajectory for CA, it is better if each UAV could adjust its track as few times as possible, execute the trajectory as shorter as possible and reach the target point as soon as possible.Therefore, at time m, the objective function O i (m) of UAVi comprises three aspects above: In this formula, w 1 , w 2 , w 3 are the corresponding weight coefficients of the three indexes C i (m), D i (m), T i (m).Their values reflect different application contexts, e.g., w 3 > w 1 indicates that the controllers prefer shorter time to achieve the destination even if the fuel cost is higher.Before the computation, normalization processing is needed.The three indexes can be calculated using the following formulas.
where C i (m) expresses the track adjustment cost of UAVi, which is defined as the change value of pitch angle.
where D i (m) indicates the distance from current location to its destination where T i (m) represents the total flight time of UAVi.
Assume that there are N intervals from time m to the destination, thus the position and corresponding pitch angle sequences of UAVi in [m, m + N − 1] are respectively: The objective function for progressive optimization is: Note that it should meet the following constraints in the optimization process: In the above formulas, q(ϕ i (m + r)) ≤ 0 explains that the value change of UAVi pitch angle should be in the variation range of (A,B); e i (p i (m + r)) = 0 shows that the calculation of UAVi position and pitch angle at time m + r is based on the corresponding information at m + r − 1; d i (p i (m + r), p j (m + r)) ≤ 0 illustrates that the distance between UAVi and UAVj must not be shorter than the minimum safe distance d 0 .
Integrating the objective function with constraints, the next waypoint (p i (m + 1), ϕ i (m + 1)) can be calculated based on the current state (p i (m), ϕ i (m)).Repeating the optimization procedure, the complete amending trajectory made up of a series of discrete waypoints is generated.
Besides, the algorithm for generating CA waypoints is robust enough to resolve successive threats.For example, if UAV1 encounters UAV2 and UAV3 seperately in a short interval, the two threats could be resolved via a compositive CA trajectory withonly a distance constraint between UAV1 and UAV3 added to the optimization calculation.This section calculates minimum deviation of the planned trajectory by an objective function integrated with track adjustment, distance, and time costs, taking into account the vehicle performance, state and separation constraints.

Causal Analysis
The size (computational complexity) of the conflict resolution problem is typically very large, which represents a real challenge to deal with the exponential growth of the state space in a realistic environment containing dozens of UAVs.A highly efficient technique to reduce the problem size is clustering [22].The scenario can be decomposed into several sets of independent clusters based on the interaction between planned trajectories for a period of time.The partition principle is mainly in view of the distances between the neighboring UAVs.These independent clusters can be processed in parallel to significantly improve efficiency.Figure 3 is the concept illustration.
In the above formulas, ( (   explains that the value change of UAVi pitch angle should be in the variation range of (A,B); ( ( )) 0 i i e p m r   shows that the calculation of UAVi position and pitch angle at time m + r is based on the corresponding information at m + r − 1; ( ( ), ( )) 0 i i j d p m r p m r    illustrates that the distance between UAVi and UAVj must not be shorter than the minimum safe distance d0.
Integrating the objective function with constraints, the next waypoint ( ( 1), ( 1) can be calculated based on the current state ( ( ), ( ) . Repeating the optimization procedure, the complete amending trajectory made up of a series of discrete waypoints is generated.Besides, the algorithm for generating CA waypoints is robust enough to resolve successive threats.For example, if UAV1 encounters UAV2 and UAV3 seperately in a short interval, the two threats could be resolved via a compositive CA trajectory withonly a distance constraint between UAV1 and UAV3 added to the optimization calculation.This section calculates minimum deviation of the planned trajectory by an objective function integrated with track adjustment, distance, and time costs, taking into account the vehicle performance, state and separation constraints.

Causal Analysis
The size (computational complexity) of the conflict resolution problem is typically very large, which represents a real challenge to deal with the exponential growth of the state space in a realistic environment containing dozens of UAVs.A highly efficient technique to reduce the problem size is clustering [22].The scenario can be decomposed into several sets of independent clusters based on the interaction between planned trajectories for a period of time.The partition principle is mainly in view of the distances between the neighboring UAVs.These independent clusters can be processed in parallel to significantly improve efficiency.Figure 3 is the concept illustration.The original problem is decomposed into several clusters with treatable sizes with few trajectories.Thus, the overall solution is a combination of conflict-free solutions obtained by a causal analysis for these regional clusters.The core idea of the causal analysis is to explore the state space of the CA scenario to achieve the optimal resolution.It utilizes the alternative trajectories and relevant cost generated by the DDOA, which includes the track adjustment, distance, and time costs.The original problem is decomposed into several clusters with treatable sizes with few trajectories.Thus, the overall solution is a combination of conflict-free solutions obtained by a causal analysis for these regional clusters.The core idea of the causal analysis is to explore the state space of the CA scenario to achieve the optimal resolution.It utilizes the alternative trajectories and relevant cost Appl.Sci.2017, 7, 83 7 of 14 generated by the DDOA, which includes the track adjustment, distance, and time costs.Therefore, for n UAVs involved in the same scenario, the total cost of the trajectories amendment can be defined as: The process state could be described by a specific four-tuple: {con f lict, cost, (active U AV), (resolution trajectories)} An instance state a = {2,1,(1,2,3), (11,111,31,32)} is used to explain the tuple.
• Conflict: indicates the threat that will be resolved (conflict 2 is active in state a).

•
Accumulated cost: Cost summation for the respective resolution trajectories (cost = 1 in state a).

•
Active UAVs: is a processed tuple and represents all the UAVs in this scenario, among them the active one would be underlined (UAV1 and UAV3 are active to have conflict 2 in state a).

•
Active resolution trajectories: used to store solution trajectories and the active resolution trajectories are represented with underlines to resolve the active collision (111, 31 or 32 can be used to resolve conflict 2 in state a).Here the number is composed with the aircraft identification i and amending strategy descend/climb (1/2).
The causal exploration can be summarized with the following steps in Figure 4: Appl. 2016, 6, 83 7 of 14 Therefore, for n UAVs involved in the same scenario, the total cost of the trajectories amendment can be defined as: The process state could be described by a specific four-tuple: ),( ) conflict cost active UAV resolution trajectories (14) An instance state a = {2,1,(1,2,3), (11,111,31,32)} is used to explain the tuple.


Conflict: indicates the threat that will be resolved (conflict 2 is active in state a). Accumulated cost: Cost summation for the respective resolution trajectories (cost = 1 in state a).


Active UAVs: is a processed tuple and represents all the UAVs in this scenario, among them the active one would be underlined (UAV1 and UAV3 are active to have conflict 2 in state a).


Active resolution trajectories: used to store solution trajectories and the active resolution trajectories are represented with underlines to resolve the active collision (111, 31 or 32 can be used to resolve conflict 2 in state a).Here the number is composed with the aircraft identification i and amending strategy descend/climb (1/2).
The causal exploration can be summarized with the following steps in Figure 4: As an explanatory case, Figure 5 illustrates the whole feasible solutions of a case scenario, and Figure 6 shows its reachability tree.Using the causal exploration algorithm, there are six final process states as the feasible solutions.Evidently, state d is preferred to be utilized than the others due to the minimum cost.As an explanatory case, Figure 5 illustrates the whole feasible solutions of a case scenario, and Figure 6 shows its reachability tree.Using the causal exploration algorithm, there are six final process states as the feasible solutions.Evidently, state d is preferred to be utilized than the others due to the minimum cost.
Appl. 2016, 6, 83 7 of 14 Therefore, for n UAVs involved in the same scenario, the total cost of the trajectories amendment can be defined as: The process state could be described by a specific four-tuple: ),( ) conflict cost active UAV resolution trajectories (14) An instance state a = {2,1,(1,2,3), (11,111,31,32)} is used to explain the tuple.


Conflict: indicates the threat that will be resolved (conflict 2 is active in state a). Accumulated cost: Cost summation for the respective resolution trajectories (cost = 1 in state a).


Active UAVs: is a processed tuple and represents all the UAVs in this scenario, among them the active one would be underlined (UAV1 and UAV3 are active to have conflict 2 in state a).


Active resolution trajectories: used to store solution trajectories and the active resolution trajectories are represented with underlines to resolve the active collision (111, 31 or 32 can be used to resolve conflict 2 in state a).Here the number is composed with the aircraft identification i and amending strategy descend/climb (1/2).
The causal exploration can be summarized with the following steps in Figure 4: As an explanatory case, Figure 5 illustrates the whole feasible solutions of a case scenario, and Figure 6 shows its reachability tree.Using the causal exploration algorithm, there are six final process states as the feasible solutions.Evidently, state d is preferred to be utilized than the others due to the minimum cost.

Simulation and Results
In this section, we carry out simulation experiments to evaluate the efficacy of the proposed algorithms for the CA system.The computational results represent collision-free maneuvers for multiple UAVs that are modeled with detailed dynamics.

A Case Scenario
To verify the feasibility of the proposed algorithms, our simulation experiments are performed on a manually generated scenario of five UAVs (with the corresponding trajectories Tr1, Tr2, Tr3, Tr4 and Tr5), illustrated in Figure 7.This scenario includes the following characteristics: In the above scenario, each UAV is assumed to be heading towards its own target position along the straight line.Simulations start with the initial information about the position and velocity of the UAVs in a scenario.For the local area, the UAV states have been treated as broadcast information with efficient real-time communication.The assumptions and the parameter setup values are given in Table 1.The proposed algorithms are coded in C++ and the simulation is performed on an EliteBook laptop with a processor Intel i5 of 2.6 GHz and 4 GB of RAM.In this causal analysis, the cost of various feasible CA trajectories assists the decision making of solution selection.After executing the proposed CA system, the optimal strategy, that Tr1 synthetically amends upward and UAV5 climbs, is implemented.

Simulation and Results
In this section, we carry out simulation experiments to evaluate the efficacy of the proposed algorithms for the CA system.The computational results represent collision-free maneuvers for multiple UAVs that are modeled with detailed dynamics.

A Case Scenario
To verify the feasibility of the proposed algorithms, our simulation experiments are performed on a manually generated scenario of five UAVs (with the corresponding trajectories Tr1, Tr2, Tr3, Tr4 and Tr5), illustrated in Figure 7.This scenario includes the following characteristics: For instance, a new secondary threat between UAV3 and UAV5 may emerge in the process of resolving their respective previous threat.(3) It resolves successive threats via a compositive CA trajectory, i.e., UAV1 is detected to encounter UAV2 and UAV3 separately in a short continuous time period and the two successive conflicts can be considered overall rather than one by one.
Appl. 2016, 6, 83 9 of 14  In the above scenario, each UAV is assumed to be heading towards its own target position along the straight line.Simulations start with the initial information about the position and velocity of the UAVs in a scenario.For the local area, the UAV states have been treated as broadcast information with efficient real-time communication.The assumptions and the parameter setup values are given in Table 1.The proposed algorithms are coded in C++ and the simulation is performed on an EliteBook laptop with a processor Intel i5 of 2.6 GHz and 4 GB of RAM.In this causal analysis, the cost of various feasible CA trajectories assists the decision making of solution selection.After executing the proposed CA system, the optimal strategy, that Tr1 synthetically amends upward and UAV5 climbs, is implemented.
The entirety of the reachable states of this multi-UAV scenario are displayed in Figure 8. From the proposed multi-threat resolution point of view, solo UAV1 climbs (Tr11) or UAV2 descends (Tr21) to resolve the first threat (see state a).However there would generate a secondary threat with Tr3 if trajectory Tr11 is applied (see state b).Then UAV1 could climb again and a composite CA trajectory (Tr111) is generated (see state d).Meanwhile, UAV3 could descend (Tr31) to resolve the new encounter (see state e).For resolving the threat between UAV4 and UAV5, UAV4 amends downward (Tr41) or UAV5 turns upward (Tr51).In state d, there would be no domino effect between the neighboring UAVs (see state h and state i), while a new threat would appear between the descending UAV3 and climbing UAV5 (see state k) and have to be resolved through the following heading change (see state p and state q).
Appl. 2016, 6, 83 9 of 14 The entirety of the reachable states of this multi-UAV scenario are displayed in Figure 8. From the proposed multi-threat resolution point of view, solo UAV1 climbs (Tr11) or UAV2 descends (Tr21) to resolve the first threat (see state a).However there would generate a secondary threat with Tr3 if trajectory Tr11 is applied (see state b).Then UAV1 could climb again and a composite CA trajectory (Tr111) is generated (see state d).Meanwhile, UAV3 could descend (Tr31) to resolve the new encounter (see state e).For resolving the threat between UAV4 and UAV5, UAV4 amends downward (Tr41) or UAV5 turns upward (Tr51).In state d, there would be no domino effect between the neighboring UAVs (see state h and state i), while a new threat would appear between the descending UAV3 and climbing UAV5 (see state k) and have to be resolved through the following heading change (see state p and state q).On the other branch, the first threat is resolved by the amendment of Tr2 (see state c), and two options are considered to solve the encounter between UAV1 and UAV3 (see state f and state g).In state f, the collision between UAV4 and UAV5 could be avoided directly without domino effect (see state l and state m).However in state g, a new threat (see state n) would appear between the descending UAV3 and climbing UAV5 and it could be resolved by one of the involved trajectories (see state r and state s).
Since the cost criterion is taken into consideration in the decision-making process, it is clear that state i (UAV1 climbs twice for the sequent threats with UAV2 and UAV3, and UAV5 amends upward to avoid the collision with UAV4) is the best one of the feasible scenarios.The amended trajectories of UAV1 and UAV5are represented in Figure 7. On the other branch, the first threat is resolved by the amendment of Tr2 (see state c), and two options are considered to solve the encounter between UAV1 and UAV3 (see state f and state g).In state f, the collision between UAV4 and UAV5 could be avoided directly without domino effect (see state l and state m).However in state g, a new threat (see state n) would appear between the descending UAV3 and climbing UAV5 and it could be resolved by one of the involved trajectories (see state r and state s).
Since the cost criterion is taken into consideration in the decision-making process, it is clear that state i (UAV1 climbs twice for the sequent threats with UAV2 and UAV3, and UAV5 amends upward to avoid the collision with UAV4) is the best one of the feasible scenarios.The amended trajectories of UAV1 and UAV5are represented in Figure 7.  Figure 9 depicts the relative distance of each pair of UAVs that are involved in a detected threat.From this figure, we can see that the minimum separation region of each UAV is never intruded upon, thanks to the favorable effect attained by the CA algorithm.
Figure 10 illustrates the pitch angle profiles of UAV1 and UAV5 that amending their headings for the avoidance of corresponding threats in this scenario.At 17:17:48, UAV1 follows the control input that changes its pitch angle from 0 to 0.71 and climbs subsequently.At 17:17:58, UAV1 and UAV2 reach CPA and UAV1 begins to return to its original path.However, UAV1 climbs again at 17:18:02 because of the encounter with UAV3.At 17:18:18, UAV1 recoveries its course when both the involved threats are resolved.And meanwhile, the neighboring collision between UAV4 and UAV5 is avoided via the upward amendment of UAV5.Using this CA advisory, there is no domino effect between the two sub-scenarios.Figure 10 illustrates the pitch angle profiles of UAV1 and UAV5 that amending their headings for the avoidance of corresponding threats in this scenario.At 17:17:48, UAV1 follows the control input that changes its pitch angle from 0 to 0.71 and climbs subsequently.At 17:17:58, UAV1 and UAV2 reach CPA and UAV1 begins to return to its original path.However, UAV1 climbs again at 17:18:02 because of the encounter with UAV3.At 17:18:18, UAV1 recoveries its course when both the involved threats are resolved.And meanwhile, the neighboring collision between UAV4 and UAV5 is avoided via the upward amendment of UAV5.Using this CA advisory, there is no domino effect between the two sub-scenarios.

Further Investigation
In this section, we conduct additional experiments to test the scalability of the proposed algorithms.In [23], scalability is defined as the ability of an algorithm, system, or model to deal with increasing numbers of missions at a reasonable cost, or its ability to be effectively enlarged to commensurate that growth.
In practical applications, we may encounter different settings of UAVs, which depend on different values of densities, variable Rcf and sense range.For instance, with the increase of applications such as surveillance in which various UAVs owning different capabilities and properties would cooperate and compete for a certain target, it is expected that the airspace traffic density will grow considerably in certain reduced areas during short time periods.Since the CA system is applied independently to each cluster, the increasing UAV number in the whole airspace may improve the encounter possibility, thereby raising the number of clusters, rather than the number of UAVs involved in a specific cluster.
To validate the scalability, we use the computation time as a parameter to record the performance of the proposed CA system in handling different-density scenarios.Based on the simulation results in Table 3, the average computation time (over 100 runs of random flight tests) for low density (20 UAVs), medium density (60 UAVs), and high density (100 UAVs) traffic do not grow exponentially as the airspace density increases, attributing the high scalability to the independent clusters, which can be frequently processed.In addition, several extensive simulations with varying values of tuning parameters Rcf and sense range (SR) are constructed to observe the performance in terms of efficiency.The CA maneuvers should be optimal so that UAVs can arrive at their respective destination in minimum possible time.Define e i t as the expectant flight time (not to make any deviation of the planned trajectory) and r i t as the realistic flight time (fully follow the CA maneuvers) of ( 1, 2,.., ) UAVi i n  , and the efficiency is given as [24]: Figure 11 depicts the simulation results of efficiency with variable parameters.We could conclude the following:

Further Investigation
In this section, we conduct additional experiments to test the scalability of the proposed algorithms.In [23], scalability is defined as the ability of an algorithm, system, or model to deal with increasing numbers of missions at a reasonable cost, or its ability to be effectively enlarged to commensurate that growth.
In practical applications, we may encounter different settings of UAVs, which depend on different values of densities, variable R cf and sense range.For instance, with the increase of applications such as surveillance in which various UAVs owning different capabilities and properties would cooperate and compete for a certain target, it is expected that the airspace traffic density will grow considerably in certain reduced areas during short time periods.Since the CA system is applied independently to each cluster, the increasing UAV number in the whole airspace may improve the encounter possibility, thereby raising the number of clusters, rather than the number of UAVs involved in a specific cluster.
To validate the scalability, we use the computation time as a parameter to record the performance of the proposed CA system in handling different-density scenarios.Based on the simulation results in Table 3, the average computation time (over 100 runs of random flight tests) for low density (20 UAVs), medium density (60 UAVs), and high density (100 UAVs) traffic do not grow exponentially as the airspace density increases, attributing the high scalability to the independent clusters, which can be frequently processed.In addition, several extensive simulations with varying values of tuning parameters R cf and sense range (SR) are constructed to observe the performance in terms of efficiency.The CA maneuvers should be optimal so that UAVs can arrive at their respective destination in minimum possible time.Define t e i as the expectant flight time (not to make any deviation of the planned trajectory) and t r i as the realistic flight time (fully follow the CA maneuvers) of U AVi (i = 1, 2, .., n), and the efficiency is given as [24]: Appl.Sci.2017, 7, 83 12 of 14 Figure 11 depicts the simulation results of efficiency with variable parameters.We could conclude the following:

•
The efficiency is decreasing as the R cf value increases, because extensive conflict volume leads to more threats that would be detected by the CD algorithm, thus more waypoints have to be amended to avoid potential collisions resulting in the higher realistic flight time.

•
Compared to SR = 9 km, the efficiency is lower when SR is equal to three kilometers with the same R cf , because the restricting sensor range may ignore the neighboring threats that could be synthetically resolved, and lately detect the intruder UAV, causing the number of amended waypoints to be higher.

•
With the same parameters of R cf and sense range, high efficiency is obtained if the complete CR algorithm including the causal analysis is utilized rather than only the DDOA.With the positive impact of causal analysis, the average increment of efficiency is respectively 2.83% and 3.47% for SR = 9 km and SR = 3 km.Consequently, the causal analysis is effective for the selection of optimal resolution trajectory.
Appl. 2016, 6, 83 12 of 14 • The efficiency is decreasing as the Rcf value increases, because extensive conflict volume leads to more threats that would be detected by the CD algorithm, thus more waypoints have to be amended to avoid potential collisions resulting in the higher realistic flight time.
• Compared to SR = 9 km, the efficiency is lower when SR is equal to three kilometers with the same Rcf, because the restricting sensor range may ignore the neighboring threats that could be synthetically resolved, and lately detect the intruder UAV, causing the number of amended waypoints to be higher.
• With the same parameters of Rcf and sense range, high efficiency is obtained if the complete CR algorithm including the causal analysis is utilized rather than only the DDOA.With the positive impact of causal analysis, the average increment of efficiency is respectively 2.83% and 3.47% for SR = 9 km and SR = 3 km.Consequently, the causal analysis is effective for the selection of optimal resolution trajectory.

Conclusions
This paper has presented two efficient algorithms: CD algorithm and CR algorithm, which constitute a novel CA system for multiple cooperative UAVs aiming to detect and resolve threats by generating an optimal trajectory with an overall minimum cost in 3D airspace.The CD module analyzes the spatial-temporal information composing a set of discrete 4D trajectories to generate the intuitionistic representation of detected conflicts.The CR algorithm integrates with the CD portion and solves the detected threats through DDOA and causal analysis.The DDOA provides new feasible alternative trajectories for each UAV involved in an encounter with a local optimization scope, and it generates alternative avoiding trajectories by an objective function (integrating track adjustment, cost, distance, and time) in consideration of several constraints (i.e., performance, state, and distance).The causal analysis explores the emergent dynamics between the alternative trajectories generated by DDOA and the surrounding traffic.It has numerous advantages such as splitting the scenario to separate clusters, reducing the size of solution space, and exploring the global optimal solution.Based on the quantitative simulation results, the proposed CA system has been validated to be feasible and effective in resolving conflicts for multiple UAVs and has high scalability for different traffic densities; the efficiency decreases as the value of conflict volume increases, and increases as the sense range increases; the causal analysis is effective for the selection of an optimal resolution trajectory.
Future research will be dedicated to: (1) using a heuristic-based algorithm to improve our proposed approach, which could tackle the collision avoidance problem of more UAVs in high-density scenarios, while it also may require more computation time; (2) making a comprehensive review of the existing best performing methods that consider UAV factors and

Conclusions
This paper has presented two efficient algorithms: CD algorithm and CR algorithm, which constitute a novel CA system for multiple cooperative UAVs aiming to detect and resolve threats by generating an optimal trajectory with an overall minimum cost in 3D airspace.The CD module analyzes the spatial-temporal information composing a set of discrete 4D trajectories to generate the intuitionistic representation of detected conflicts.The CR algorithm integrates with the CD portion and solves the detected threats through DDOA and causal analysis.The DDOA provides new feasible alternative trajectories for each UAV involved in an encounter with a local optimization scope, and it generates alternative avoiding trajectories by an objective function (integrating track adjustment, cost, distance, and time) in consideration of several constraints (i.e., performance, state, and distance).The causal analysis explores the emergent dynamics between the alternative trajectories generated by DDOA and the surrounding traffic.It has numerous advantages such as splitting the scenario to separate clusters, reducing the size of solution space, and exploring the global optimal solution.Based on the quantitative simulation results, the proposed CA system has been validated to be feasible and effective in resolving conflicts for multiple UAVs and has high scalability for different traffic densities; the efficiency decreases as the value of conflict volume increases, and increases as the sense range increases; the causal analysis is effective for the selection of an optimal resolution trajectory.Future research will be dedicated to: (1) using a heuristic-based algorithm to improve our proposed approach, which could tackle the collision avoidance problem of more UAVs in high-density scenarios, while it also may require more computation time; (2) making a comprehensive review of the existing best performing methods that consider UAV factors and integrating them to our system in order to improve its performance; (3) considering several disturbances (e.g., wind) to improve the current system logic in order to hold the complex field situations; (4) integrating UAVs into(manned) general aviation to operate in a non-segregated airspace.
Appl. 2016, 6,xFOR PEER 3 of 14 one.The control command is sent to the involved UAVs to resolve current threats and the states improve online.

Figure 1 .
Figure 1.Functional architecture of the novel collision avoidance (CA) system.

Figure 1 .
Figure 1.Functional architecture of the novel collision avoidance (CA) system.

Figure 1 .
Figure 1.Functional architecture of the novel collision avoidance (CA) system.

( 1 )
It is a fairly complex scenario with multiple UAVs.Indeed, among the first three trajectories, Tr1 imposes sequent threats to both Tr2 and Tr3; moreover, an encounter emerges between Tr4 and Tr5, which further increases the complexity of the scenario.(2) It involves the interrelationship (also called domino effect) between neighboring threats.For instance, a new secondary threat between UAV3 and UAV5 may emerge in the process of resolving their respective previous threat.(3) It resolves successive threats via a compositive CA trajectory, i.e., UAV1 is detected to encounter UAV2 and UAV3 separately in a short continuous time period and the two successive conflicts can be considered overall rather than one by one.

( 1 )
It is a fairly complex scenario with multiple UAVs.Indeed, among the first three trajectories, Tr1 imposes sequent threats to both Tr2 and Tr3; moreover, an encounter emerges between Tr4 and Tr5, which further increases the complexity of the scenario.(2) It involves the interrelationship (also called domino effect) between neighboring threats.

Figure 7 .
Figure 7. Five-UAV scenario with the generated optimal resolution.

Figure 7 .
Figure 7. Five-UAV scenario with the generated optimal resolution.

Figure 7 .
Figure 7. Five-UAV scenario with the generated optimal resolution.

Figure 8 .
Figure 8.The reachability tree of this multi-UAV scenario.

Figure 8 .
Figure 8.The reachability tree of this multi-UAV scenario.

Figure 9
Figure 9 depicts the relative distance of each pair of UAVs that are involved in a detected threat.From this figure, we can see that the minimum separation region of each UAV is never intruded upon, thanks to the favorable effect attained by the CA algorithm.

Figure 10 .
Figure 10.Pitch angle profile of both UAVs.

Figure 10 .
Figure 10.Pitch angle profile of both UAVs.

Figure 11 .
Figure 11.Variation of efficiency with Rcf and sense range for the traffic density of 20 UAVs.

Figure 11 .
Figure 11.Variation of efficiency with R cf and sense range for the traffic density of 20 UAVs.

Table 1 .
The assumptions of parameters and unmanned aerial vehicle (UAV) properties

Table 1 .
The assumptions of parameters and unmanned aerial vehicle (UAV) properties.

Table 3 .
Time taken in different densities

Table 3 .
Time taken in different densities.