Research on the Collision Avoidance Algorithm for Fixed-Wing UAVs Based on Maneuver Coordination and Planned Trajectories Prediction

This paper presents a novel collision avoidance (CA) algorithm for a cooperative fixed-wing unmanned aerial vehicle (UAV). The method is based on maneuver coordination and planned trajectory prediction. Each aircraft in a conflict generates three available maneuvers and predicts the corresponding planned trajectories. The algorithm coordinates planned trajectories between participants in a conflict, determines which combination of planned trajectories provides the best separation, eventually makes an agreement on the maneuver for collision avoidance and activates the preferred maneuvers when a collision is imminent. The emphasis is placed on providing protection for UAVs, while activating maneuvers late enough to reduce interference, which is necessary for collision avoidance in the formation and clustering of UAVs. The CA has been validated with various simulations to show the advantage of collision avoidance for continuous conflicts in multiple, high-dynamic, high-density and three-dimensional (3D) environments. It eliminates the disadvantage of traditional CA, which has high uncertainty, and takes the performance parameters of different aircraft into consideration and makes full use of the maneuverability of fixed-wing aircraft.


Introduction
There are many studies in collision avoidance that could be sorted out into two main domains, i.e., tactical and strategic [1].The first is the geometric algorithm, which analyzes the relative motion of aircraft in geometric space and implements passive collision avoidance under the procedure of detection-avoidance [2][3][4][5].The other is the track planning algorithm, which actively plans the conflict-free flight path from the current position to the destination based on the perception detection of obstacles under the constraint of minimum safety separation distance.The geometric algorithm is widely researched.Chakravarthy A [3] and Carbone C [4] proposed a novel collision cone approach for irregularly shaped moving objects with unknown trajectories.Luongo S [5] improved the 3D analytical algorithm by proposing a cylindrical safety bubble that allows different minimum separations of the vertical and horizontal planes with respect to the nominal trajectory to be achieved.The performances of such system, using active obstacle detection through radar, have been discussed in the paper [6].Geometric algorithm is intuitive with low computing cost and always provides an optimal solution in 3D environments whether the aircraft cooperates or not.But most of the current Genetic Algorithm (GA) only focus on pairwise encounters.For multiple conflict resolution, more complicated algorithm should be considerable, the calculation amount of checking each threat repeatedly becomes inconsiderably massive.Smith A L [7] presented an aggregate collision cone approach to allow aircrafts to detect and avoid collisions with more threats simultaneously.But there are only three aircrafts in experiments [8].The geometric algorithm to be used, furthermore, is also dependent, to some extent, from the available sensors onboard, as emphasized in the paper [9].
The main aspects of the track planning algorithm include the potential field method [10][11][12], linear programming, discretized space domain and stochastic theory methods, and so on.Liu J Y [11] improved the artificial potential field by combining the Lyapunov theorem to make the disturbing balance points divergent so that the Unmanned Aerial Vehicle (UAV) can avoid the minimum point.Ruchti J [12] modified the artificial potential fields by combining a priority system to prevent the special case of an aircraft circling its destination.The artificial potential field has the advantage of rapid respondent speed, small computation capacity and real-time property.However, there exist some problems, such as the unreachable goal and the existence of a local minimum point value, and these do not apply to the fixed-wing aircraft due to continuous adjustment and an unstable state [13].To plan an optimal trajectory for collision avoidance, Xiaohua X [14] developed an algorithm of modified Grossberg neural network (GNN) to get the trajectories outside of the danger zone based on current sensor information and mission objectives.GNN has been used earlier in robot applications and is implementable in UAVs that have limited capabilities.Cheng P [15] developed an algorithm of rapidly exploring random trees (RRT), Y. Kuwata [16] proposed an algorithm of mixed integer linear programming (MILP), and Cekmez U [17], Nikolos I K [18], Yao X [19] applied ant colony optimization algorithm (ACO).These algorithms have obvious defects of limited application; they apply mostly to an immovable obstacle and cannot solve a dynamic obstacle.In addition, they require massive iterative calculation, which suits of-line route planning but not real-time planning.
To solve the multi-aircraft conflict, Manathara J G [20] proposed a consensus algorithm to solve the rendezvous problem by attaining a consensus on the estimated time of arrivals.However, it could not manage dynamic obstacles.Archibald [21] proposed a satisficing decision theory by applying the game theory, but it lacks efficiency and suits a 2D model of airspace.George J [22] developed a reactive inverse proportional navigation (PN) algorithm by increasing Line of Slight (LOS) rate, but the algorithm is inefficient and defective in some scenarios.Sharma R K [23] applied swarm intelligence techniques to collision avoidance between UAVs.Turner R [24] Ikeda Y [25] Wadley J [26] introduced an automatic air collision avoidance system (Auto ACAS) that coordinates maneuver trajectories between fighters.Although Auto-ACAS applies to fighters, it provides a good concept for the collision avoidance of fixed-wing UAVs.
Traffic Collision Avoidance System (TCAS) is designed as the final safeguard to resolve midair collisions (MACs) and evidently decrease near midair collisions (NMACs) in the aviation densities of up to 24 aviation vehicles within a 5NM radius [27].There is great difference between the proposed methodology and the TCAS.Firstly, TCAS only suggests maneuvers in vertical direction to the pilot, while the proposed methodology includes automatic maneuver implementation in all directions.Secondly, The TCAS performs well in solving one-on-one threats between traditional aircrafts, but in some complex situations, TCAS would issue improper maneuvers while a new secondary encounter is induced to the nearby (remotely piloted aircraft) RPA of previous operations [28].While the proposed methodology is designed for multiple threats in formation and clusters.The coordination of maneuvers is among all participants in a conflict.Thirdly, the logics are quite different.In TCAS, an RA is produced in real time, the direction choosing and change of vertical speed depends on the current relative situation, while in proposed methodology, the maneuver style (MS) is pre-set to a group of specific categories, the aircrafts choose from the specified maneuver styles.
Aiming to solve the defects of traditional CA, this paper presents a novel collision avoidance algorithm for fixed-wing UAVs based on maneuver coordination and planned trajectory prediction, which takes full advantage of the maneuverability of fixed-wing UAVs and generates the collision avoidance maneuver based on the coordination of planned trajectories.The proposed algorithm is classified as the mixed style, which has features that refer to both tactical and strategic domains addressed in the literature analysis.When solving collision, the proposed algorithm plans collision-free safety routes (planned trajectories) for UAVs, and in module of maneuver evaluation and maneuver activation, it draws lessons from methods of Point of closed Approach (PCA), and Collision Cone Approach (CCA).
This paper is organized as follows: Section 2 summarizes the operational principle; Section 3 describes the module of maneuver generation and presents the module of trajectory prediction; Section 4 presents the module of treat management; Section 5 presents the module of maneuver evaluation; Section 6 presents the module of maneuver activation; Section 7 presents a couple of scenario simulations and their results; Finally, the conclusions and future work are summarized in Section 8.

Operational Principle
Among fixed-wing UAVs in a conflict, which are called participants, the algorithm coordinates available maneuvers, generates and shares responding planned trajectories, decides the combination of planned trajectories to provide the best separation, and activates the preferred maneuvers when a collision is extremely imminent.The structure of the algorithm is shown in Figure 1.Based on the host condition, navigation solution, radar target location, data link and other information, each host aircraft determines the severity of the risk posed by the threat aircraft.Through a special datalink, UAVs that are participants in a conflict communicate with each other.According to the relative position and motion between participants, each participant chooses three maneuvers from a pool of nine available maneuvers that may be performed to avoid collision.Three trajectories responding to the three maneuvers are generated through the trajectory prediction module and then are shared among the participants via a data link.The evaluation module compares the combinations of the planned trajectories and determines the optimal combination of maneuvers with the maximal separation.In the optimal combination of maneuvers, each participant has a preferred maneuver.The system updates and repeats the above procedure, thus generating new maneuvers and evaluating a combination of maneuvers at regular intervals.Meanwhile, the system will activate the preferred maneuver when the planned trajectories converge in time and space.
The five modules of the algorithm are as follows: 1.
Module of maneuver generation: the module chooses three maneuvers from a pre-set pool of nine available maneuvers according to the relative situation and motion between the host aircraft and threats.

2.
Module of trajectory prediction: the module predicts the three planned trajectories responding to the three maneuvers.The trajectories are predicted based upon the current status and control parameters.

3.
Module of threat management: the module of threat management determines if a UAV poses a threat to the host aircraft and evaluates the risk degree of threats.

4.
Module of maneuver evaluation: the module evaluates combinations of three planned trajectories of each participant and determines which combination can delay the activation of the maneuver as far as possible.Through the maneuver evaluation, the three maneuvers are tagged as one preferred maneuver and two alternative maneuvers separately.Once tagged, the determination is shared among each participant 5.
Module of maneuver activation: the module judged whether the planned trajectories of participants will converge in time and space.If so, the preferred maneuver is activated, and the aircraft will maneuver to avoid collision.

Module of Maneuver Generation
Fixed-wing UAVs have high maneuverability and flexibility and can make various maneuvers, such as rolls and climbing.Generally, in the conventional collision avoidance algorithm, the aircraft maneuvers are modelled according to a three degrees of freedom motion rather than six degrees of freedom motion.The 3 Degrees of Freedom (3DOF) motion is always used in algorithms in which collision avoidance occurs more than 20 s before the collision, the performance parameters of different aircraft are not taken into consideration, and the procedure of the maneuver is ignored.However, in this paper, the collision avoidance occurs approximately 5 s before the collision, and the procedure of the maneuver is the procedure of collision avoidance.Fixed-wing aircrafts can generate a maneuver style (MS) in almost all directions for collision avoidance.However, in relevant studies [24][25][26], the MS is set to a group of specific categories.In this paper, according to the characteristics of fixed-wing aircraft, the MS is defined to nine types.Restricting MS to special types can reduce the system budget, improve calculation speed, and ensure rapid response to collision.As shown in Table 1, in this paper, the MS consists of seven roll-and-pull maneuvers, one dive maneuver and one maintain maneuver.The roll-and-pull maneuvers describe an aircraft that is commanded to bank angle while pulling a 5 g overload.The bank command is an incremental change from the current bank angle at the discrete command of -90°, -60°, -30°, 0°, 30°, 60°, 90°.The dive maneuver is that the aircraft holds a constant bank angle while performing a -0.5 g push.The maintain maneuver is that the bank angle and g-loading are held constant.Seven of nine MS are specified as climbing for the consideration of safety.Compared with climbing, diving has the risk of ground collision.In addition, for a fixed-wing UAV, a roll is the most agile maneuver for collision avoidance.−0.5 g Due to the hardware limitation of computing, processing and data transmission, each aircraft only shares three trajectories among participants.Therefore, the algorithm should choose three available maneuvers from the nine maneuvers first.The procedure of preselection does not need

Module of Maneuver Generation
Fixed-wing UAVs have high maneuverability and flexibility and can make various maneuvers, such as rolls and climbing.Generally, in the conventional collision avoidance algorithm, the aircraft maneuvers are modelled according to a three degrees of freedom motion rather than six degrees of freedom motion.The 3 Degrees of Freedom (3DOF) motion is always used in algorithms in which collision avoidance occurs more than 20 s before the collision, the performance parameters of different aircraft are not taken into consideration, and the procedure of the maneuver is ignored.However, in this paper, the collision avoidance occurs approximately 5 s before the collision, and the procedure of the maneuver is the procedure of collision avoidance.Fixed-wing aircrafts can generate a maneuver style (MS) in almost all directions for collision avoidance.However, in relevant studies [24][25][26], the MS is set to a group of specific categories.In this paper, according to the characteristics of fixed-wing aircraft, the MS is defined to nine types.Restricting MS to special types can reduce the system budget, improve calculation speed, and ensure rapid response to collision.As shown in Table 1, in this paper, the MS consists of seven roll-and-pull maneuvers, one dive maneuver and one maintain maneuver.The roll-and-pull maneuvers describe an aircraft that is commanded to bank angle while pulling a 5 g overload.The bank command is an incremental change from the current bank angle at the discrete command of −90 • , −60 • , −30 • , 0 • , 30 • , 60 • , 90 • .The dive maneuver is that the aircraft holds a constant bank angle while performing a -0.5 g push.The maintain maneuver is that the bank angle and g-loading are held constant.Seven of nine MS are specified as climbing for the consideration of safety.Compared with climbing, diving has the risk of ground collision.In addition, for a fixed-wing UAV, a roll is the most agile maneuver for collision avoidance.Due to the hardware limitation of computing, processing and data transmission, each aircraft only shares three trajectories among participants.Therefore, the algorithm should choose three available maneuvers from the nine maneuvers first.The procedure of preselection does not need data-transportation among participants and is only based on the geometric relations and motion relations between the host aircraft and threats, including those that are forward or backward, above or below, or on the left or right side of the aircraft.

Module of Trajectory Prediction
The module of trajectory prediction generates the future trajectory based on state and control parameters using the six-degrees-of-freedom simulation.Three planned trajectories corresponding to three maneuvers are generated and are shared among participants.According to the principle of noninterference, activation of the maneuver often occurs three to four seconds before the collision, and most maneuvers last only two to three seconds.Therefore, the forecast time is required to exceed 4 s, but long forecast time will prominently increase the amount of computation.Comprehensively considering the collision avoidance effect and the operation cost, the forecast duration in this paper is set to 5 s, and the module generates the future planned trajectories from the present to 5 s later.As shown in Figure 2, the planned trajectory is a conical region whose size depends on the uncertainty over time.Considering the factors such as accuracy, efficiency and the performance of UAVs provided by our team comprehensively, the frequency of this module is set to 10 Hz.The predicted trajectory consists of 50 discrete positions.As is shown in the figure, the planned trajectory is a conical region CR(t, t + ∆t), ∆t ∈ (0, T), the midline of it is the predicted trajectory constructed by 50 predictive positions P(t + ∆t), and the cross-section size represents the error radius UD(∆t), which depends on the uncertainty of the trajectory prediction and increases over time ∆t.The set of error radius is to ensure that most of the actual predicted trajectories fall within the conical region.The error radius is relevant with uncertainties including navigation uncertainty, trajectory prediction uncertainty, trajectory reconstruction uncertainty, data link transmission uncertainty, and uncertainty in track data computation.The error radius UD(∆t) is the quadratic function of time: UD(∆t) = a.(∆t) 2 + b.∆t.The index of a and b is relevant with types of aircraft, equipment and environment.They can be obtained by actual experiment through comparing the predicted trajectories with the real trajectories.Considering UAVs provided by our team and the performance of experiments, the value of a is 0.425, the value of b is 1.19.The model of conical region is as follows: ∀CR(t + ∆t) ⊆ (P(t + ∆t) − UD(∆t) P(t + ∆t) + UD(∆t)), ∆t ∈ (0, T) data-transportation among participants and is only based on the geometric relations and motion relations between the host aircraft and threats, including those that are forward or backward, above or below, or on the left or right side of the aircraft.

Module of Trajectory Prediction
The module of trajectory prediction generates the future trajectory based on state and control parameters using the six-degrees-of-freedom simulation.Three planned trajectories corresponding to three maneuvers are generated and are shared among participants.According to the principle of noninterference, activation of the maneuver often occurs three to four seconds before the collision, and most maneuvers last only two to three seconds.Therefore, the forecast time is required to exceed 4 s, but long forecast time will prominently increase the amount of computation.Comprehensively considering the collision avoidance effect and the operation cost, the forecast duration in this paper is set to 5 s, and the module generates the future planned trajectories from the present to 5 s later.As shown in Figure 2, the planned trajectory is a conical region whose size depends on the uncertainty over time.Considering the factors such as accuracy, efficiency and the performance of UAVs provided by our team comprehensively, the frequency of this module is set to 10 Hz.The predicted trajectory consists of 50 discrete positions.As is shown in the figure, the planned trajectory is a conical region CR ,  + ∆ , ∆ ∈ 0,  , the midline of it is the predicted trajectory constructed by 50 predictive positions P  + ∆ , and the cross-section size represents the error radius UD ∆ , which depends on the uncertainty of the trajectory prediction and increases over time ∆.The set of error radius is to ensure that most of the actual predicted trajectories fall within the conical region.The error radius is relevant with uncertainties including navigation uncertainty, trajectory prediction uncertainty, trajectory reconstruction uncertainty, data link transmission uncertainty, and uncertainty in track data computation.The error radius UD ∆ is the quadratic function of time: UD ∆ = .∆ + .∆.The index of a and b is relevant with types of aircraft, equipment and environment.They can be obtained by actual experiment through comparing the predicted trajectories with the real trajectories.Considering UAVs provided by our team and the performance of experiments, the value of a is 0.425, the value of b is 1.19.The model of conical region is as follows: ∀CR  + ∆ ⊆ P  + ∆ − UD ∆ P  + ∆ + UD ∆ , ∆ ∈ 0, Predicted Position P(t+Δt) UD(Δt) Starting Position P(t) CR(t,t+Δt) The module of trajectory prediction is based on the six-degrees-of-freedom aircraft model.According to standard build-up method using dimensionless coefficients, we establish and approximate force and moments.[29]

Module of Threat Management
During the encounter of clusters of UAVs, a UAV might be threatened by multiple aircraft.However, due to the hardware limitation of computing, processing and data transmission, it is The module of trajectory prediction is based on the six-degrees-of-freedom aircraft model.According to standard build-up method using dimensionless coefficients, we establish and approximate force and moments [29].

Module of Threat Management
During the encounter of clusters of UAVs, a UAV might be threatened by multiple aircraft.However, due to the hardware limitation of computing, processing and data transmission, it is impossible for the host UAV to respond to all threats by UAVs at the same time.The system only concentrates on the three most imminent threats.The module of threat management monitors each surrounding aircraft and scores each of the threats to decide the three greatest threats.The system updates the threats at regular times, which is the same as the cycle in the module of trajectory prediction.Through the procedure, the module reduces the full threat list to a shorter list of the most at-risk aircraft which is defined as threats.
The risk degree (R) is determined by a weighted combination of the relative distance (RD) and the relative speed (RS).The risk range between aircraft A and T is as follows.
When aircraft are separating, the relative speed is negative, and it is eliminated from the scoring equation.When aircrafts are approaching, the relative speed is positive, and higher relative speed means higher approaching speed.After scoring, the threats are often sorted based on the score, higher degree means higher risk.The threats with the three highest scores are selected as participants for processing in the module of maneuver generation and in the module of maneuver evaluation.

Module of Maneuver Evaluation
At each run step, the system chooses three maneuvers and generates the corresponding planned trajectories.The trajectories are shared among participants to reach an agreement on a combination of maneuvers that supply the best solution.Each aircraft receives the planned trajectories via a datalink from the other participants, scores the combinations independently and selects the best maneuver from the three maneuvers as the preferred maneuver.Although the system predicts which maneuver each threat aircraft should perform, the system only selects a maneuver for its own aircraft.Thus, to reach consistent decisions among participants, the module of maneuver evaluation should utilize nearly identical information available to participants.Before performing a maneuver, the system requests a cross check to ensure consistency in maneuver evaluation.
Then, the labeled trajectories are shared among the participants via a datalink to keep in synchronization and coherence.There would be nine combinations of maneuvers for two participants, and 81 combinations of maneuvers for four participants.The frequency is set at 4 Hz, so the module shares planned trajectories and evaluates the combination of maneuvers every 0.25 s.However, in the actual situation, the transmission latency is unavoidable in data sharing, the maneuvers will become uncoordinated and the system will be mispositioned if the algorithm attempts the process too rapidly.
To solve this problem, two measures were taken in this module.First, in the algorithm, the frequency of the different modules was set differently, the frequency of the maneuver generating module and the trajectory prediction module were set at 10 Hz, which was higher than that of maneuver evaluation.There is adequate time for aircraft to wait and receive data from other participants.Even a loss or delay of data will not affect the evaluation.When the algorithm evaluates a combination of maneuvers at one run step, the data are ready for the previous step.Second, considering the continuity and stability of the relative situation between participants in continuous frames of time, the maneuvers will last from the last time frame to the next.In the procedure of maneuver generation, the preferred maneuver in the last time frame remains one of the three newly generated maneuvers.
The principle of evaluating the optimal combination of maneuvers is to select the one that can delay the activation of maneuvers as much as possible.The system chooses the combination with the smallest cost.The cost function is the sum of reciprocal predicted minimum avoidance distance (PAD).The predicted minimum avoidance distance (PAD) is the minimum distance between a conical region in the space-time domain, which is the distance of the predicted trajectory subtracting the uncertainty distance (UD).As is illustrated in Figure 3, there are nine possible combinations of maneuvers among the two participants, but the combination of planned trajectory A and b provides the maximum PAD. ) Indeed, M i (m) represents that aircraft i takes maneuver m; PAD M i (m), M j (n) represents PAD when aircraft i takes maneuver m, aircraft j takes maneuver n.The cost function is as follows: The maneuvers that aircraft should take: Indeed i = j Appl.Sci.2019, 9, x 7 of 20 conical region in the space-time domain, which is the distance of the predicted trajectory subtracting the uncertainty distance (UD).As is illustrated in Figure 3, there are nine possible combinations of maneuvers among the two participants, but the combination of planned trajectory A and b provides the maximum PAD.
The cost function is as follows: The maneuvers that aircraft should take: Indeed  ≠

Module of Maneuver Activation
The principle of the system is noninterference and minimizing interference while simultaneously achieving collision avoidance.To realize this principle, the system should activate the maneuver as late as possible.The Figure 4 is the relative motion of aircraft A and B; aircraft B is resting relatively, while aircraft A is moving toward B relatively.The isolation sphere is the safety separation zone for aircraft B. Before entering the isolation sphere, aircraft A can activate a maneuver to avoid collision.The earlier aircraft B maneuvers, the more available options aircraft B can choose, and the less likely a collision will occur.There exists a final moment when activation is too late; no matter what maneuver is taken under the restriction of performance; aircraft A cannot avoid entering the isolation sphere of aircraft B and the collision between two UAVs cannot be prevented.If UAV A activates maneuvers at point 1, no matter which maneuver is taken, it can avoid collision, but if the

Module of Maneuver Activation
The principle of the system is noninterference and minimizing interference while simultaneously achieving collision avoidance.To realize this principle, the system should activate the maneuver as late as possible.The Figure 4 is the relative motion of aircraft A and B; aircraft B is resting relatively, while aircraft A is moving toward B relatively.The isolation sphere is the safety separation zone for aircraft B. Before entering the isolation sphere, aircraft A can activate a maneuver to avoid collision.
The earlier aircraft B maneuvers, the more available options aircraft B can choose, and the less likely a collision will occur.There exists a final moment when activation is too late; no matter what maneuver is taken under the restriction of performance; aircraft A cannot avoid entering the isolation sphere of aircraft B and the collision between two UAVs cannot be prevented.If UAV A activates maneuvers at point 1, no matter which maneuver is taken, it can avoid collision, but if the activation time is too early, it will seriously interfere with the normal flight of the UAV.If UAV A activates at point 3, no matter which maneuver UAV A takes, it cannot avoid collision with UAV B for the restriction of performance.At point 3, only one maneuver can avoid collision, the planned trajectory is tangent to the isolation spheres, and the special maneuver is the preferred maneuver for aircraft A. In summary, the moment at point 2 is the last moment when collision can be avoided and is the best moment that satisfies the noninterference principle.The radius of the sphere can be modified to increase or decrease the early warning time.
Appl.Sci.2019, 9, x 8 of 20 activation time is too early, it will seriously interfere with the normal flight of the UAV.If UAV A activates at point 3, no matter which maneuver UAV A takes, it cannot avoid collision with UAV B for the restriction of performance.At point 3, only one maneuver can avoid collision, the planned trajectory is tangent to the isolation spheres, and the special maneuver is the preferred maneuver for aircraft A. In summary, the moment at point 2 is the last moment when collision can be avoided and is the best moment that satisfies the noninterference principle.The radius of the sphere can be modified to increase or decrease the early warning time.
Isolation sphere  In the module of the maneuver activation, only the planned trajectories corresponding to preferred maneuver are considered to determine the activation.As shown in Figure 5, as the risk of collision becomes more likely, the cones of the two aircraft will converge in time and space when the predicted minimum range (PMR) is less than the permitted minimum allowed separation distance (MASD); then the maneuver is activated, and the participants take the preferred maneuver, and the UAV will fly in the planned trajectory.Indeed, the desired separation distance (DSD) is a fixed value that is input by the system in advance.The module of maneuver activation calculates the minimum allowed separation distance (MASD), which is the sum of the wing span (WS) of two aircrafts, plus the desired separation distance (DSD).The predicted minimum range (PMR) is the minimum distance between the conical region.
UD(∆t) = 0.425 * (∆t) activation time is too early, it will seriously interfere with the normal flight of the UAV.If UAV A activates at point 3, no matter which maneuver UAV A takes, it cannot avoid collision with UAV B for the restriction of performance.At point 3, only one maneuver can avoid collision, the planned trajectory is tangent to the isolation spheres, and the special maneuver is the preferred maneuver for aircraft A. In summary, the moment at point 2 is the last moment when collision can be avoided and is the best moment that satisfies the noninterference principle.The radius of the sphere can be modified to increase or decrease the early warning time.
Isolation sphere  In the module of the maneuver activation, only the planned trajectories corresponding to preferred maneuver are considered to determine the activation.As shown in Figure 5, as the risk of collision becomes more likely, the cones of the two aircraft will converge in time and space when the predicted minimum range (PMR) is less than the permitted minimum allowed separation distance (MASD); then the maneuver is activated, and the participants take the preferred maneuver, and the UAV will fly in the planned trajectory.Indeed, the desired separation distance (DSD) is a fixed value that is input by the system in advance.In the module of the maneuver activation, only the planned trajectories corresponding to preferred maneuver are considered to determine the activation.As shown in Figure 5, as the risk of collision becomes more likely, the cones of the two aircraft will converge in time and space when the predicted minimum range (PMR) is less than the permitted minimum allowed separation distance (MASD); then the maneuver is activated, and the participants take the preferred maneuver, and the UAV will fly in the planned trajectory.Indeed, the desired separation distance (DSD) is a fixed value that is input by the system in advance.

Results
To verify the effectiveness of the algorithm that was proposed in this paper, a simulation experiment is operated in a series of special collision scenarios.The principle of the constructed scenarios are as follows: • Complexity: The encounter scenarios constructed are relatively complex, reaching the complexity of the actual situation.

•
Typicality: The collision scenarios constructed are common in the actual situation.

•
Extensibility: Most of the actual collision can be combined by the constructed collision scenarios.
Based on the three principles, six encounter scenarios were constructed, including six two-aircraftencounter scenarios, a four-aircraft-encounter scenario and an eight-aircraft-encounter scenario.
In this paper, the UAVs are provided by our team in college of aerospace science and technology, National University of Defense Technology.And the basic attributes of UAV are as follows in Table 2: The safe distance is the minimum allowed distance between aircraft.Several factors need to be considered in the setting of safe distance.The safe distance must ensure that the isolation spheres of two aircraft would not touch each other.In other words, the safe distance must be greater than the sum of the two minimum allowed separation distances (MASD), which is the sum of the wing span (WS) (10.4 m) and the desired separation distance (DSD).The delay of distance calculation is also taken into consideration, and the frequency of the module of trajectory prediction is set to 10 Hz, so there might be a delay of 0.1s.The speed of UAV is less than 100m/s, so the error in distance is less than 10 m.In summary, 10.4 × 2 + 10 × 2 = 40.8(m).With DSD added, the safe distance is set to 60 m.But the safe distance is not fixed, the desired separation distance (DSD) can be adjusted to meet different security requirements.The smaller safe distance, the later the aircraft activates collision avoidance maneuver.In Eight-aircraft-formation scenario, consider the high density of aircraft, we adjust the safe distance to 42 m.

Rear-Ended Scenario
There are two UAVs cruising at the same altitude in a certain airspace.The two UAVs fly in the same direction, from South to North.Table 3 records the initial state of the two aircraft.Aircraft A is pursuing aircraft B with a higher speed from the South.If the two UAVs follow the original flight path and do not take maneuvers to avoid collision, a rear-end collision will occur between the two aircraft.As is illustrated in Figures 6 and 7, the trajectories of the aircraft throughout the whole process are demonstrated in three dimensions and on the horizontal plane, respectively.Indeed, the red line represents the trajectory of aircraft A, while the green one represents the trajectory of aircraft B. The starting point is the initial record position of the aircraft in the simulation experiment.The maneuvering point is the position where the aircraft activates the collision avoidance maneuver.In the simulation experiment, there are two principles when choosing the start point.First, the start point is closer to the maneuvering point in time; second, there is no threatening relationship between the two aircraft at the starting point.
As shown in the figure, at 0 s, the simulation experiment begins, and the state is beginning to be recorded.The two aircraft cruise at their trajectories.At 5 s, their respective collision avoidance maneuvers are activated simultaneously; aircraft A is commanded a bank angle of −90 • with a 5 g pull while aircraft B is commanded a −0.5 g pull.Figure 8 depicts the relative distance.The minimum distance between two aircraft is 67 m, which is higher than the safe distance.(m/s, m/s, m/s) Initial angular velocity (rad/s, rad/s, rad/s) (0,0,0) (0,0,0) As is illustrated in Figures 6 and 7, the trajectories of the aircraft throughout the whole process are demonstrated in three dimensions and on the horizontal plane, respectively.Indeed, the red line represents the trajectory of aircraft A, while the green one represents the trajectory of aircraft B. The starting point is the initial record position of the aircraft in the simulation experiment.The maneuvering point is the position where the aircraft activates the collision avoidance maneuver.In the simulation experiment, there are two principles when choosing the start point.First, the start point is closer to the maneuvering point in time; second, there is no threatening relationship between the two aircraft at the starting point.
As shown in the figure, at 0 s, the simulation experiment begins, and the state is beginning to be recorded.The two aircraft cruise at their trajectories.At 5 s, their respective collision avoidance maneuvers are activated simultaneously; aircraft A is commanded a bank angle of −90° with a 5 g pull while aircraft B is commanded a −0.5 g pull.Figure 8 depicts the relative distance.The minimum distance between two aircraft is 67 m, which is higher than the safe distance.(m/s, m/s, m/s) Initial angular velocity (rad/s, rad/s, rad/s) (0,0,0) (0,0,0) As is illustrated in Figures 6 and 7, the trajectories of the aircraft throughout the whole process are demonstrated in three dimensions and on the horizontal plane, respectively.Indeed, the red line represents the trajectory of aircraft A, while the green one represents the trajectory of aircraft B. The starting point is the initial record position of the aircraft in the simulation experiment.The maneuvering point is the position where the aircraft activates the collision avoidance maneuver.In the simulation experiment, there are two principles when choosing the start point.First, the start point is closer to the maneuvering point in time; second, there is no threatening relationship between the two aircraft at the starting point.
As shown in the figure, at 0 s, the simulation experiment begins, and the state is beginning to be recorded.The two aircraft cruise at their trajectories.At 5 s, their respective collision avoidance maneuvers are activated simultaneously; aircraft A is commanded a bank angle of −90° with a 5 g pull while aircraft B is commanded a −0.5 g pull.Figure 8 depicts the relative distance.The minimum distance between two aircraft is 67 m, which is higher than the safe distance.

Formation Scenario
There are two UAVs, aircraft A and B, cruising at the same altitude in a certain airspace.They are in formation mode, maintaining a fixed safe distance and flying at the same speed from South to North.In the process, the formation is broken for some external factor.There will be a collision between the two aircraft.Table 4 records the initial state of the two UAVs.Initial attitude angle (rad, rad, rad) (5,0,0) (5,0,0) Initial angular velocity (rad/s, rad/s, rad/s) (0,0,0) (0,0,0) As is illustrated in Figures 9 and 10, the trajectories of the aircraft in the whole process are demonstrated in three dimensions and on the horizontal plane, respectively.Indeed, the red line represents the trajectory of aircraft A, while the green one represents the trajectory of aircraft B. As is shown in the figure, at 0 s, the simulation experiment starts, and the two aircraft cruise at their trajectories.At 3 s, the formation is broken for some extraneous factor, causing aircraft A to fly suddenly toward aircraft B at a 45° yaw angle.At 5 s, their respective collision avoidance maneuvers are activated simultaneously, and aircraft A is commanded a bank angle of 60° with a 5 g pull.Aircraft B is commanded a −0.5 g push.Figure 11 depicts the relative distance between the two aircraft.The minimum distance between the two aircraft is 67 m, which is higher than the safe distance

Formation Scenario
There are two UAVs, aircraft A and B, cruising at the same altitude in a certain airspace.They are in formation mode, maintaining a fixed safe distance and flying at the same speed from South to North.In the process, the formation is broken for some external factor.There will be a collision between the two aircraft.Table 4 records the initial state of the two UAVs.Initial attitude angle (rad, rad, rad) (5,0,0) (5,0,0) Initial angular velocity (rad/s, rad/s, rad/s) (0,0,0) (0,0,0) As is illustrated in Figures 9 and 10, the trajectories of the aircraft in the whole process are demonstrated in three dimensions and on the horizontal plane, respectively.Indeed, the red line represents the trajectory of aircraft A, while the green one represents the trajectory of aircraft B. As is shown in the figure, at 0 s, the simulation experiment starts, and the two aircraft cruise at their trajectories.At 3 s, the formation is broken for some extraneous factor, causing aircraft A to fly suddenly toward aircraft B at a 45 • yaw angle.At 5 s, their respective collision avoidance maneuvers are activated simultaneously, and aircraft A is commanded a bank angle of 60 • with a 5 g pull.Aircraft B is commanded a −0.5 g push.Figure 11 depicts the relative distance between the two aircraft.The minimum distance between the two aircraft is 67 m, which is higher than the safe distance

Formation Scenario
There are two UAVs, aircraft A and B, cruising at the same altitude in a certain airspace.They are in formation mode, maintaining a fixed safe distance and flying at the same speed from South to North.In the process, the formation is broken for some external factor.There will be a collision between the two aircraft.Table 4 records the initial state of the two UAVs.Initial angular velocity (rad/s, rad/s, rad/s) (0,0,0) (0,0,0) As is illustrated in Figures 9 and 10, the trajectories of the aircraft in the whole process are demonstrated in three dimensions and on the horizontal plane, respectively.Indeed, the red line represents the trajectory of aircraft A, while the green one represents the trajectory of aircraft B. As is shown in the figure, at 0 s, the simulation experiment starts, and the two aircraft cruise at their trajectories.At 3 s, the formation is broken for some extraneous factor, causing aircraft A to fly suddenly toward aircraft B at a 45° yaw angle.At 5 s, their respective collision avoidance maneuvers are activated simultaneously, and aircraft A is commanded a bank angle of 60° with a 5 g pull.Aircraft B is commanded a −0.5 g push.Figure 11 depicts the relative distance between the two aircraft.The minimum distance between the two aircraft is 67 m, which is higher than the safe distance

Crossing Scenario
There are two UAVs cruising at the same altitude in a certain airspace.Aircraft A is cruising from north to south, while aircraft B is cruising from west to east.Their trajectories intersect at some point in the sky, and the two aircraft are approaching and will collide at the point.Table 5 records the initial state of the two UAVs.Initial angular velocity (rad/s, rad/s, rad/s) (0,0,0) (0,0,0) As is illustrated in Figures 12 and 13, the trajectories of the aircraft in the whole process are demonstrated in three dimensions and on the horizontal plane, respectively.Indeed, the red line represents the trajectory of aircraft A, while the green one represents the trajectory of aircraft B. At 0 s, the simulation experiment starts, and the two aircraft cruise at their trajectories.At 4.8 s, the collision avoidance maneuver is activated, aircraft A is commanded a bank angle of 90° with a 5 g pull, while aircraft B is commanded a bank angle of 60° with a 5 g pull.Figure 14 depicts the distance between two aircraft.The minimum distance between the two aircraft is 65 m, which is higher than the safe distance.

Crossing Scenario
There are two UAVs cruising at the same altitude in a certain airspace.Aircraft A is cruising from north to south, while aircraft B is cruising from west to east.Their trajectories intersect at some point in the sky, and the two aircraft are approaching and will collide at the point.Table 5 records the initial state of the two UAVs.
Initial angular velocity (rad/s, rad/s, rad/s) (0,0,0) (0,0,0) As is illustrated in Figures 12 and 13, the trajectories of the aircraft in the whole process are demonstrated in three dimensions and on the horizontal plane, respectively.Indeed, the red line represents the trajectory of aircraft A, while the green one represents the trajectory of aircraft B. At 0 s, the simulation experiment starts, and the two aircraft cruise at their trajectories.At 4.8 s, the collision avoidance maneuver is activated, aircraft A is commanded a bank angle of 90° with a 5 g pull, while aircraft B is commanded a bank angle of 60° with a 5 g pull.Figure 14 depicts the distance between two aircraft.The minimum distance between the two aircraft is 65 m, which is higher than the safe distance.

Crossing Scenario
There are two UAVs cruising at the same altitude in a certain airspace.Aircraft A is cruising from north to south, while aircraft B is cruising from west to east.Their trajectories intersect at some point in the sky, and the two aircraft are approaching and will collide at the point.Table 5 records the initial state of the two UAVs.
Initial angular velocity (rad/s, rad/s, rad/s) (0,0,0) (0,0,0) As is illustrated in Figures 12 and 13, the trajectories of the aircraft in the whole process are demonstrated in three dimensions and on the horizontal plane, respectively.Indeed, the red line represents the trajectory of aircraft A, while the green one represents the trajectory of aircraft B. At 0 s, the simulation experiment starts, and the two aircraft cruise at their trajectories.At 4.8 s, the collision avoidance maneuver is activated, aircraft A is commanded a bank angle of 90 • with a 5 g pull, while aircraft B is commanded a bank angle of 60 • with a 5 g pull.Figure 14 depicts the distance between two aircraft.The minimum distance between the two aircraft is 65 m, which is higher than the safe distance.

Head-On Scenario
There are two UAVs, aircraft A and B, cruising at the same altitude in a certain airspace.They approach from opposite directions with overlapped trajectories, one from north to south, and the other from south to north.There will be a collision between the two aircraft.Table 6 records the initial state information of the two UAVs.Initial angular velocity (0,0,0) (0,0,0)

Head-On Scenario
There are two UAVs, aircraft A and B, cruising at the same altitude in a certain airspace.They approach from opposite directions with overlapped trajectories, one from north to south, and the other from south to north.There will be a collision between the two aircraft.Table 6 records the initial state information of the two UAVs.

Head-On Scenario
There are two UAVs, aircraft A and B, cruising at the same altitude in a certain airspace.They approach from opposite directions with overlapped trajectories, one from north to south, and the other from south to north.There will be a collision between the two aircraft.Table 6 records the initial state information of the two UAVs.

Head-On Scenario
There are two UAVs, aircraft A and B, cruising at the same altitude in a certain airspace.They approach from opposite directions with overlapped trajectories, one from north to south, and the other from south to north.There will be a collision between the two aircraft.Table 6 records the initial state information of the two UAVs.
As is illustrated in Figures 15 and 16, the trajectories of the aircraft in the whole process are demonstrated in three dimensions and on the horizontal plane, respectively.Indeed, the red line represents the trajectory of aircraft A, while the green one represents the trajectory of aircraft B. At 0 s, the simulation experiment starts, and the two aircraft cruise at their trajectories.At 5.8 s, their respective collision avoidance maneuvers are activated simultaneously; aircraft A is commanded a bank angle of 90 • with a 5 g pull, while aircraft B is commanded a bank angle of −90 • with a 5 g pull.Figure 17 depicts the relative distance between two aircraft.The minimum distance between two aircraft is 62.5 m, which is higher than the safe distance.Initial angular velocity (rad/s, rad/s, rad/s) (0,0,0) (0,0,0) (rad/s, rad/s, rad/s) As is illustrated in Figures 15 and 16, the trajectories of the aircraft in the whole process are demonstrated in three dimensions and on the horizontal plane, respectively.Indeed, the red line represents the trajectory of aircraft A, while the green one represents the trajectory of aircraft B. At 0 s, the simulation experiment starts, and the two aircraft cruise at their trajectories.At 5.8 s, their respective collision avoidance maneuvers are activated simultaneously; aircraft A is commanded a bank angle of 90° with a 5 g pull, while aircraft B is commanded a bank angle of −90° with a 5 g pull.Figure 17 depicts the relative distance between two aircraft.The minimum distance between two aircraft is 62.5 m, which is higher than the safe distance.

Four-Aircraft-Formation Scenario
There are four UAVs in a certain airspace, which are divided into two flying formations.The first formation includes aircraft A and B, which fly from south to north.The second includes aircraft C and D, which fly from north to south.The trajectories of the two formations intersect in a narrow space, and there will be chain collisions between the aircraft if they fly along the original route without taking maneuvers.Table 7 records the initial state of the four aircraft.(rad/s, rad/s, rad/s) As is illustrated in Figures 15 and 16, the trajectories of the aircraft in the whole process are demonstrated in three dimensions and on the horizontal plane, respectively.Indeed, the red line represents the trajectory of aircraft A, while the green one represents the trajectory of aircraft B. At 0 s, the simulation experiment starts, and the two aircraft cruise at their trajectories.At 5.8 s, their respective collision avoidance maneuvers are activated simultaneously; aircraft A is commanded a bank angle of 90° with a 5 g pull, while aircraft B is commanded a bank angle of −90° with a 5 g pull.Figure 17 depicts the relative distance between two aircraft.The minimum distance between two aircraft is 62.5 m, which is higher than the safe distance.

Four-Aircraft-Formation Scenario
There are four UAVs in a certain airspace, which are divided into two flying formations.The first formation includes aircraft A and B, which fly from south to north.The second includes aircraft C and D, which fly from north to south.The trajectories of the two formations intersect in a narrow space, and there will be chain collisions between the aircraft if they fly along the original route without taking maneuvers.Table 7 records the initial state of the four aircraft.(rad/s, rad/s, rad/s) As is illustrated in Figures 15 and 16, the trajectories of the aircraft in the whole process are demonstrated in three dimensions and on the horizontal plane, respectively.Indeed, the red line represents the trajectory of aircraft A, while the green one represents the trajectory of aircraft B. At 0 s, the simulation experiment starts, and the two aircraft cruise at their trajectories.At 5.8 s, their respective collision avoidance maneuvers are activated simultaneously; aircraft A is commanded a bank angle of 90° with a 5 g pull, while aircraft B is commanded a bank angle of −90° with a 5 g pull.Figure 17 depicts the relative distance between two aircraft.The minimum distance between two aircraft is 62.5 m, which is higher than the safe distance.

Four-Aircraft-Formation Scenario
There are four UAVs in a certain airspace, which are divided into two flying formations.The first formation includes aircraft A and B, which fly from south to north.The second includes aircraft C and D, which fly from north to south.The trajectories of the two formations intersect in a narrow space, and there will be chain collisions between the aircraft if they fly along the original route without taking maneuvers.Table 7 records the initial state of the four aircraft.

Four-Aircraft-Formation Scenario
There are four UAVs in a certain airspace, which are divided into two flying formations.The first formation includes aircraft A and B, which fly from south to north.The second includes aircraft C and D, which fly from north to south.The trajectories of the two formations intersect in a narrow space, and there will be chain collisions between the aircraft if they fly along the original route without taking maneuvers.Table 7 records the initial state of the four aircraft.Initial angular velocity (rad/s, rad/s, rad/s) (0,0,0) (0,0,0) (0,0,0) (0,0,0) As is illustrated in Figures 18 and 19, the trajectories of the aircraft in the whole process are demonstrated in three dimensions and on the horizontal plane, respectively.In the whole process, each aircraft generates and evaluates maneuvers according to the current situation and agree on combinations of maneuvers through a data link.At 3 s, the collision avoidance maneuvers are activated at the same time among participants.The first formation chooses to climb to avoid collision, while the second formation chooses to roll and climb to avoid collision.The maneuver commanded is shown in Table 8.When only maneuvering once, each aircraft achieves collision avoidance.The minimum distance between pairs is shown in Table 9, and the relative distance is shown in Figure 20.The minimum distance between pairs is larger than a safe distance.Initial angular velocity (rad/s, rad/s, rad/s) (0,0,0) (0,0,0) (0,0,0) (0,0,0) As is illustrated in Figures 18 and 19, the trajectories of the aircraft in the whole process are demonstrated in three dimensions and on the horizontal plane, respectively.In the whole process, each aircraft generates and evaluates maneuvers according to the current situation and agree on  Initial angular velocity (rad/s, rad/s, rad/s) (0,0,0) (0,0,0) (0,0,0) (0,0,0) As is illustrated in Figures 18 and 19, the trajectories of the aircraft in the whole process are demonstrated in three dimensions and on the horizontal plane, respectively.In the whole process, each aircraft generates and evaluates maneuvers according to the current situation and agree on combinations of maneuvers through a data link.At 3 s, the collision avoidance maneuvers are  As is illustrated in Figures 21 and 22, the trajectories of the aircraft are demonstrated in three dimensions and on the horizontal plane, respectively.In the whole process, each aircraft generates and evaluates maneuvers according to the surrounding situation and agree on combinations of maneuvers with other participants through a data link.In the whole procedure, each aircraft will encounter multiple intrusions.Therefore, the aircraft will take multiple maneuvers to aggressively avoid the collision.In addition, there is some synergy between aircraft in the same formation.If aircraft in first formation all choose to roll to the left to avoid collision, most of the aircraft in the second formation will roll to the left to avoid collision.
Appl.Sci.2019, 9, x 17 of 20 maneuvers with other participants through a data link.In the whole procedure, each aircraft will encounter multiple intrusions.Therefore, the aircraft will take multiple maneuvers to aggressively avoid the collision.In addition, there is some synergy between aircraft in the same formation.If aircraft in first formation all choose to roll to the left to avoid collision, most of the aircraft in the second formation will roll to the left to avoid collision.In the whole collision avoidance process, each aircraft is faced with multiple intrusions in a short time, which requires multiple maneuvers in a very short time.Due to a restriction of performance, it is difficult for an aircraft to perform a maneuver such as rolling 90° in 1 s.Therefore, we directly record the changes of the control parameters instead of the maneuver.It can be seen from the table that, in the whole collision avoidance process, the control parameters of each UAV have been intensively adjusted, and each aircraft has taken multiple maneuvers.maneuvers with other participants through a data link.In the whole procedure, each aircraft will encounter multiple intrusions.Therefore, the aircraft will take multiple maneuvers to aggressively avoid the collision.In addition, there is some synergy between aircraft in the same formation.If aircraft in first formation all choose to roll to the left to avoid collision, most of the aircraft in the second formation will roll to the left to avoid collision.In the whole collision avoidance process, each aircraft is faced with multiple intrusions in a short time, which requires multiple maneuvers in a very short time.Due to a restriction of performance, it is difficult for an aircraft to perform a maneuver such as rolling 90° in 1 s.Therefore, we directly record the changes of the control parameters instead of the maneuver.It can be seen from the table that, in the whole collision avoidance process, the control parameters of each UAV have been intensively adjusted, and each aircraft has taken multiple maneuvers.In the whole collision avoidance process, each aircraft is faced with multiple intrusions in a short time, which requires multiple maneuvers in a very short time.Due to a restriction of performance, it is difficult for an aircraft to perform a maneuver such as rolling 90 • in 1 s.Therefore, we directly record the changes of the control parameters instead of the maneuver.It can be seen from the table that, in the whole collision avoidance process, the control parameters of each UAV have been intensively adjusted, and each aircraft has taken multiple maneuvers.
Table 12 records the minimum distance between UAVs during the whole collision avoidance process, and the distances between UAVs are always lower than the safe distance.

Discussion
In the collision avoidance techniques for UAVs, the collision avoidance algorithm is the key function module.This paper presents a CA algorithm for multiple cooperative fixed-wing UAVs, which provides an aggressive maneuver to avoid collision based on maneuver coordination and planned trajectory prediction.This algorithm consists of five modules: generating available maneuvers, predicting the corresponding planned trajectories, managing threats, evaluating combination of maneuvers and activating the maneuvers.
The main advantages of the proposed algorithm are as follows: first, the algorithm presented in this paper eliminates the uncertainty of the traditional CA.This algorithm depends on the prediction of the planned trajectory instead of original trajectories.The former is determined and predictable, while the latter is unstable because the flying condition is easily broken, especially in high-dynamic environments, such as formation flying and clusters of aircraft.Second, the algorithm reduces the interference to the original trajectories to the greatest extent.The collision avoidance maneuver is activated at the last moment, with no more than 4 s before the collision.Third, the algorithm shows the greatest advantage in continuous conflicts in multiple, high-dynamic, and high-density environments and formation flying for rapid response, real-time, accuracy, low intervention and generality.
Recommendations for future work are as follows: (1) further improve the stability and accuracy of aircraft controls, such as acceleration, angle acceleration and attitude angle, (2) further improve performances by solving continuous conflicts, especially in clusters of UAVs, and (3) further improve the operational efficiency.

Figure 1 .
Figure 1.Structure of the algorithm.

Figure 1 .
Figure 1.Structure of the algorithm.

Figure 4 .Figure 5 .
Figure 4.The moment to activate the maneuver.

Figure 4 .
Figure 4.The moment to activate the maneuver.

Table 9 .
Minimum distance between pairs.

Table 9 .
Minimum distance between pairs.

Table 12 .
Minimum distance between pairs.