Graphical Modeling and Simulation for a Multi-Aircraft Collision Avoidance Algorithm Based on Collaborative Decisions

: The Tra ﬃ c Alert and Collision Avoidance System (TCAS) is recognized worldwide as the last resort for avoiding midair collisions. The existing TCAS can solve pairwise conﬂict e ﬀ ectively, but cannot manage multi-aircraft conﬂict satisfactorily, and more seriously, can even trigger domino conﬂicts in some situation. In response to the increasingly frequent multi-aircraft conﬂicts, especially three-aircraft conﬂicts, it is necessary to improve the ability of TCAS. This paper studies the collision avoidance of multi-aircraft scenarios and innovatively proposes a collaborative optimization of a collision avoidance system (CAS) based on the state prediction of the aircraft. In the process, not only invading aircraft but also potential invading aircraft are considered in the plan for an optimal conﬂict resolution program. From the perspective of mathematics, the collaborative multi-aircraft conﬂict detection and resolution algorithm is described in detail in this paper. In the end, this paper conducts a comparative experiment to prove the feasibility of the algorithm in three-aircraft scenarios using InCAS software and Gmas simulation software based on graphical modeling of complex systems. The experimental results show that the CAS proposed in this paper can e ﬃ ciently prevent the occurrence of domino conﬂicts and guide each aircraft to avoid conﬂict areas and return to their origin trajectories. In contrast, the existing TCAS will cause the target aircraft to intensify the conﬂict with the potential invading aircraft when avoiding intruder aircraft. The research greatly remedies the gaps in the area of multi-aircraft collision avoidance and greatly improves the ability and e ﬃ ciency of TCAS. In this procedure, the three aircraft will achieve at least ALIM vertical separation. The result shows that the collision avoidance algorithm of a three-aircraft scenario can handle three-aircraft conﬂict


Introduction
The Traffic Alert and Collision Avoidance System (TCAS) is widely installed in civil aircraft and other large aircraft. TCAS is recognized worldwide as last-resort means of avoiding midair collision [1]. By asking and receiving responses, TCAS gets the location and speed information from nearby aircraft to determine whether they pose a threat to the target aircraft. If so, TCAS issues resolution advisories (RAs) and guides aircraft to avoid a collision.
With the soaring demand for aviation, the volume of air traffic has risen sharply, the airfield and other surrounding airspace are also increasingly crowded, and the possibility of multi-aircraft conflict is increasing. Under normal circumstances, the aircraft along the aerial path will not threaten each other. However, due to the fault of ground tower command, improper operation of the pilot, bad weather, and so on, multi-aircraft conflicts have become more frequent in recent years. In multi-aircraft conflict, more than 95% are three-aircraft conflicts [2].
The summary also shows that the study of TCAS is mainly focused on improving its ability to handle pairwise conflict. Only a few studies concentrate on multi-aircraft conflicts, such as T. B. Billingsley [22], who discussed the effect of TCAS solving multi-aircraft conflicts, and J. Tang [11], who pointed out that there is a "four aircraft deadlock" vulnerability in TCAS. Still, few studies have deeply discussed the solution of multi-aircraft conflicts. Therefore, in view of the increasing frequency of multi-aircraft conflicts, especially three-aircraft conflicts, TCAS needs to be improved to make up for the lack of ability to deal with multi-aircraft conflicts. In this way, it can effectively cope with the increasingly frequent flight conflicts and build up the last line of defense for aviation security.

Improved TCAS Model
A conflict is a situation where two aircraft have lost standard separation, and if their tracks are extrapolated into the future without pilot intervention, there is a great possibility of collision or near-midair collision (NMAC). Three-aircraft conflicts exist in two scenarios. One situation is that any two of the three aircraft conflict with each other, and the time interval between involved aircraft arriving at the closed point of approach (CPA) is less than 10 seconds. The other situation is induced by improper TCAS instructions. When the two aircraft in a pairwise conflict make collision avoidance maneuvers in accordance with TCAS instructions, the involved aircraft then conflict with the third aircraft. The latter situation is discussed in this paper. As is depicted in Figure 1, Aircraft 1, 2, and 3 appear in a narrow airspace, and there exists a three-aircraft conflict. In our conflict scenario, three aircraft are, respectively, defined as the target aircraft, the intruder aircraft, and the potential intruder aircraft. The target aircraft is the one equipped with TCAS, the intruder aircraft is the first invader aircraft into conflict with the target aircraft, and the potential intruder aircraft is the secondary invader aircraft into the conflict. All aircraft are equipped with Mode S transponders.
When facing multi-aircraft conflict, the TCAS solution is to convert multi-aircraft conflict into multiple pairwise conflicts and issue a series of Ras, one by one in sequence. As is depicted in Figure 1, Aircraft 1 and 2 step into conflict first, and TCAS issues RAs for the first time according to the condition. Hereafter, Aircraft 2 and 3 step into conflict, and TCAS issues RAs for the second time. Soon after, Aircraft 1 and 3 step into conflict, and TCAS issues RAs once again. If the interval time between RAs is adequate for aircraft to complete the instructions of collision avoidance, then TCAS can handle three-aircraft conflict well. However, in some particular situations, which we will demonstrate later, TCAS cannot solve the conflict well.
Symmetry 2020, 12, 985 4 of 23 1, Aircraft 1 and 2 step into conflict first, and TCAS issues RAs for the first time according to the condition. Hereafter, Aircraft 2 and 3 step into conflict, and TCAS issues RAs for the second time. Soon after, Aircraft 1 and 3 step into conflict, and TCAS issues RAs once again. If the interval time between RAs is adequate for aircraft to complete the instructions of collision avoidance, then TCAS can handle three-aircraft conflict well. However, in some particular situations, which we will demonstrate later, TCAS cannot solve the conflict well.  For some particular three-aircraft conflicts, there exist several defects in TCAS. First, there exists the Tang-Piera four aircraft deadlock. This also applies to three-aircraft conflict. As is depicted in Figure 2a, TCAS suggests that Aircraft 1 climb and Aircraft 3 descend to avoid a collision. The instruction induces another collision between Aircraft 1 and 2. Due to close distance, the pilot may lack time to response and fail to avoid a collision. Second, TCAS does not consider two invader aircraft simultaneously. When facing two invader aircraft from opposite directions at the same time, TCAS may issue contradictory instructions like "climb" and "level off" within a short time. As is depicted in Figure 2b, TCAS suggests that Aircraft 1 climb and Aircraft 2 descend to avoid collision, and the climbing Aircraft 1 then steps into conflict with Aircraft 3. Although still in collision with Aircraft 2, Aircraft 1 receives instructions to descend to avoid collision with Aircraft 3. This certainly intensifies the collision between Aircraft 1 and Aircraft 2. During the procedure, due to the contradictory instructions, all three aircraft are always in conflict. Last, in the face of multi-aircraft domino conflicts, the target aircraft must undergo multiple rapid ascents and descents to avoid a collision. This often exceeds the aircraft's pitch angle and acceleration limits. For some particular three-aircraft conflicts, there exist several defects in TCAS. First, there exists the Tang-Piera four aircraft deadlock. This also applies to three-aircraft conflict. As is depicted in Figure 2a, TCAS suggests that Aircraft 1 climb and Aircraft 3 descend to avoid a collision. The instruction induces another collision between Aircraft 1 and 2. Due to close distance, the pilot may lack time to response and fail to avoid a collision. Second, TCAS does not consider two invader aircraft simultaneously. When facing two invader aircraft from opposite directions at the same time, TCAS may issue contradictory instructions like "climb" and "level off" within a short time. As is depicted in Figure 2b, TCAS suggests that Aircraft 1 climb and Aircraft 2 descend to avoid collision, and the climbing Aircraft 1 then steps into conflict with Aircraft 3. Although still in collision with Aircraft 2, Aircraft 1 receives instructions to descend to avoid collision with Aircraft 3. This certainly intensifies the collision between Aircraft 1 and Aircraft 2. During the procedure, due to the contradictory instructions, all three aircraft are always in conflict. Last, in the face of multi-aircraft domino conflicts, the target aircraft must undergo multiple rapid ascents and descents to avoid a collision. This often exceeds the aircraft's pitch angle and acceleration limits.  Considering that the existing TCAS mainly deals with pairwise conflict, cannot solve threeaircraft conflict satisfactorily, and can even induce a new collision, this paper improves TCAS greatly by proposing a collaborative CAS for multi-aircraft scenarios based on graphical modeling of complex systems. In this algorithm, the existing TCAS is improved to make sure that the target aircraft chooses the correct direction and intensity to avoid all intruder and potential intruder aircraft. Figure 3 shows the proposed CAS strategy under the collaboration mechanism. For the current multiaircraft flight situation in local airspace, there is an effective CAS communication connection between adjacent aircraft, and all related aircraft form a collaborative system. The current flight status shared within the system is used as input to the collaborative decision-making module. The output to the collaborative decision-making module is safe flight situations, that is, all possible future situations, especially the risk of chain collisions, and optimal resolutions. Aircraft cooperation in the airspace chooses a flight strategy that does not cause cascading conflicts and strictly avoids the situation of cascading collision risks. Therefore, the CAS action time is widened, and the CAS action performance Considering that the existing TCAS mainly deals with pairwise conflict, cannot solve three-aircraft conflict satisfactorily, and can even induce a new collision, this paper improves TCAS greatly by proposing a collaborative CAS for multi-aircraft scenarios based on graphical modeling of complex systems. In this algorithm, the existing TCAS is improved to make sure that the target aircraft chooses the correct direction and intensity to avoid all intruder and potential intruder aircraft. Figure 3 shows the proposed CAS strategy under the collaboration mechanism. For the current multi-aircraft flight situation in local airspace, there is an effective CAS communication connection between adjacent aircraft, and all related aircraft form a collaborative system. The current flight status shared within the Symmetry 2020, 12, 985 5 of 23 system is used as input to the collaborative decision-making module. The output to the collaborative decision-making module is safe flight situations, that is, all possible future situations, especially the risk of chain collisions, and optimal resolutions. Aircraft cooperation in the airspace chooses a flight strategy that does not cause cascading conflicts and strictly avoids the situation of cascading collision risks. Therefore, the CAS action time is widened, and the CAS action performance is improved.  Figure 3. Schematic depicting the modular architecture of the proposed collision avoidance system (CAS).
As shown in the collaborative decision-making module in Figure 3, the target aircraft monitors the surrounding airspace, predicting the trajectory of other aircraft based on the input that includes their position, speed, and other information. According to their trajectory, the proposed CAS on the target aircraft determines whether the aircraft nearby pose threats to the target aircraft. In the module of situation judgment, the existing TCAS just determines if there is an invader aircraft. In contrast, for the proposed CAS, when it judges if there is an intruder aircraft, it still monitors other aircraft around, judging whether there is a potential intruder aircraft. According to the situation, the proposed CAS determines whether or not there is a pairwise or multi-aircraft conflict. Then it makes strategic choices of conflict resolution about the direction and intensity. Additionally, the collaborative mechanism will optimize the resolution advisories according to the shared information and the coordinated principles.

Trajectory Prediction Algorithm
This paper focuses on the anticollision research of operational aircraft, which has a small-time span and a compact distribution. Therefore, this paper adopts the Euclidean three-dimensional space (no curvature) model, which greatly reduces the computational work [11]. The airspace where the three-aircraft scenario is located is cleverly divided into the same gridding, marked with 3D coordinates. Then the 4D location information database of all the aircraft in the airspace can be constructed by adding the time information.
At moment t, there are two aircraft named i and j in a certain airspace. The 3D position of aircraft i and j are = ( , , , , , ) and = ( , , , , , ) , respectively. The 3D velocity of aircraft i As shown in the collaborative decision-making module in Figure 3, the target aircraft monitors the surrounding airspace, predicting the trajectory of other aircraft based on the input that includes their position, speed, and other information. According to their trajectory, the proposed CAS on the target aircraft determines whether the aircraft nearby pose threats to the target aircraft. In the module of situation judgment, the existing TCAS just determines if there is an invader aircraft. In contrast, for the proposed CAS, when it judges if there is an intruder aircraft, it still monitors other aircraft around, judging whether there is a potential intruder aircraft. According to the situation, the proposed CAS determines whether or not there is a pairwise or multi-aircraft conflict. Then it makes strategic choices of conflict resolution about the direction and intensity. Additionally, the collaborative mechanism will optimize the resolution advisories according to the shared information and the coordinated principles.

Trajectory Prediction Algorithm
This paper focuses on the anticollision research of operational aircraft, which has a small-time span and a compact distribution. Therefore, this paper adopts the Euclidean three-dimensional space (no curvature) model, which greatly reduces the computational work [11]. The airspace where the three-aircraft scenario is located is cleverly divided into the same gridding, marked with 3D coordinates.
, respectively. As is depicted in Figure 4a,   As is depicted in Figure 4b, the horizontal distance of aircraft i relative to j is ℎ = ℎ − ℎ . In addition, the relative horizontal speed is ℎ = ℎ − ℎ , whose component in the x-axis direction is , and the component in the y-axis direction is , . Accordingly, the component of the horizontal relative distance in the x-axis direction is , and the component in the y-axis direction is , .
During the procedure, there exists a moment when the separation of aircraft i and j is the smallest. This position is defined as the closest point of approach (CPA), including CPAh, (CPA in the horizontal direction), where horizontal distance is smallest, and CPAz (CPA in the vertical direction) where vertical distance is smallest.
As is depicted in Figure 4b, when the two aircraft reach CPAh., the following prerequisite needs to be satisfied: At moment t, ℎ, is defined as the time spent for aircraft i and j to reach CPAh (CPA in the As is depicted in Figure 4b, the horizontal distance of aircraft i relative to j is d ht ij = p ht i − p ht j .
In addition, the relative horizontal speed is v ht ij = v ht i − v ht j , whose component in the x-axis direction  As is depicted in Figure 4b, when the two aircraft reach CPA h. , the following prerequisite needs to be satisfied: At moment t, τ ij h,t is defined as the time spent for aircraft i and j to reach CPA h (CPA in the horizontal direction), supposing they keep current flight status unchanged, i.e.: (2) Define min d ht ij as the smallest distance between aircraft i and j, the distance is as follows when At moment t, τ ij z,t is defined as the time spent for aircraft i and j to reach CPA z , i.e.: as the vertical distance when aircraft i and j reach CPA h :

Pairwise Conflict Detection Algorithm
A pairwise conflict detection algorithm is used to judge whether there is a conflict between the two aircraft. As long as either of the following two conditions is met, a pairwise conflict is determined.

1.
Time spent for aircraft i and j to reach CPA h and CPA z (τ ij h,t and τ ij z,t ) are both less than the time threshold Time RA , and horizontal distance when they reach CPA h |d ij h,t + τ ij h,t | is smaller than distance modification (DMOD), and vertical distance when they reach CPA Z |d ij z,t + τ ij h,t | is smaller than the vertical threshold value (ZTHR). The time and space thresholds used to define whether a collision will occur vary with different sensitivity levels (SLs) based on altitude [23]. 2.
Horizontal and vertical distance between aircraft i and j (d ij h,t and d ij z,t ) are less than the threshold separately.

Multi-Aircraft Conflict Detection Algorithm
Since more than 95% of current multi-aircraft conflicts are three-aircraft conflicts, we will use the three-aircraft scenario as an example to introduce the algorithm logic of multi-aircraft conflict detection. Supposing there are three aircraft, i, j, and m, in a narrow airspace, they are defined as the target aircraft, the invader aircraft, and the potential invader aircraft. The proposed CAS firstly determines whether there is a pairwise conflict. If so, the proposed CAS continues to judge if the third aircraft would pose a threat to either of the first two aircraft, supposing that the third aircraft keeps its flight status unchanged and the first two aircraft obey the instruction of TCAS. If so, there is a three-aircraft conflict. In other words, the following conditions should be satisfied when three aircraft come into conflict.
(1) At moment t, there are two aircraft among aircraft i, j, m coming into conflict firstly.
(2) Before moment t + ∆t, the third aircraft will come into conflict with either of the first two aircraft (supposing aircraft i and aircraft j come into conflict at moment t first, then aircraft m and aircraft i come into conflict).
t + ∆t is the moment when the conflict between the pair of aircraft is cleared under the instruction of the existing TCAS, supposing there is no third invader aircraft.

Collaborative Conflict Resolution Algorithm
Each aircraft in the collaborative system shares the situation information of neighboring individuals. The collaborative mechanism guarantees the information sharing and principle consistency between aircraft in conflict scenarios. When the conflict detection module detects threats, the target aircraft generates candidate conflict resolution strategies based on the threat aircraft's situation. The trajectory prediction module will predict the trajectories of the candidate strategies and share them with other aircraft in the system. The collaborative decision-making module determines the optimal strategy combination based on the shared predicted trajectories. Each aircraft performs maneuvering in accordance with the optimal strategy combination to avoid collision. The algorithm flow is shown in Figure 5.  In the next part of this section, we first introduce the pairwise conflict resolution algorithm, which is the basis of the collaborative conflict resolution algorithm, and this will help us better understand the algorithmic logic of multi-aircraft conflict resolution. Then, we illustrate the multiaircraft conflict resolution algorithm with the three-aircraft scenario. It is not only because, currently, more than 95 percent of multi-aircraft conflicts are three-aircraft conflicts, but also the problem of three-aircraft conflict resolution needs to be solved urgently. Hence our algorithm should be able to be verified in the three-aircraft conflict first.

Pairwise Conflict Resolution Algorithm
The pairwise conflict resolution algorithm is not only an effective solution for two-aircraft conflict but is also the basis of the candidate-strategies-generating module in a multi-aircraft conflict resolution algorithm. In the following, we take the paired conflict between aircraft i and aircraft j as an example to describe the pairwise conflict resolution algorithm.

Direction Choosing
At moment t, an RA for the target airplane is issued. The CAS will determine a choice of direction, which provides maximum vertical separation at CPAh under the assumption that the intruder aircraft maintains its air route. As is depicted in Figure 6, define as vertical separation at CPAh when the target aircraft choose to maneuver upward; define as vertical separation at CPAh when the target aircraft choose to maneuver downward. Altitude limitation (ALIM) is the threshold set to ensure that the aircraft does not collide at the closest approach point, which usually varies with the flight altitude.
, + ℎ, , + ℎ, In the next part of this section, we first introduce the pairwise conflict resolution algorithm, which is the basis of the collaborative conflict resolution algorithm, and this will help us better understand the algorithmic logic of multi-aircraft conflict resolution. Then, we illustrate the multi-aircraft conflict resolution algorithm with the three-aircraft scenario. It is not only because, currently, more than 95 percent of multi-aircraft conflicts are three-aircraft conflicts, but also the problem of three-aircraft conflict resolution needs to be solved urgently. Hence our algorithm should be able to be verified in the three-aircraft conflict first.

Pairwise Conflict Resolution Algorithm
The pairwise conflict resolution algorithm is not only an effective solution for two-aircraft conflict but is also the basis of the candidate-strategies-generating module in a multi-aircraft conflict resolution algorithm. In the following, we take the paired conflict between aircraft i and aircraft j as an example to describe the pairwise conflict resolution algorithm.

Direction Choosing
At moment t, an RA for the target airplane is issued. The CAS will determine a choice of direction, which provides maximum vertical separation at CPA h under the assumption that the intruder aircraft maintains its air route. As is depicted in Figure 6, define a as vertical separation at CPA h when the target aircraft choose to maneuver upward; define b as vertical separation at CPA h when the target aircraft choose to maneuver downward. Altitude limitation (ALIM) is the threshold set to ensure that the aircraft does not collide at the closest approach point, which usually varies with the flight altitude.
where ∆ i z,t has a fixed value of 1500 feet/min, temporarily representing the same intensity of speed change.
where , has a fixed value of 1500 feet/min, temporarily representing the same intensity of speed change. The collaborative conflict resolution algorithm follows the following principles when selecting the optimal maneuver direction: 1) Maximum vertical separation principle: The target aircraft needs to achieve maximum vertical separation from the intruder aircraft at CPAh in the case of the same intensity of speed change.
2) Noncrossing principle in the vertical direction: When maneuvering upwards or downwards, target aircraft should achieve the goal of not-crossing with the invader aircraft in the vertical direction as much as possible [24].
The model of direction choosing is as follows: the target aircraft chooses to maneuver upwards when = 1, the target aircraft chooses to maneuver downwards when = −1, the target aircraft maintains flight when = 0.

Intensity Choosing
Once the direction is chosen, the collaborative mechanism will help the proposed CAS by determining the adequate intensity of speed change. The intensity needs to take speed, track, and other information of both aircraft into consideration to guarantee not only at least ALIM vertical separation, but also minimal speed change. , is the vertical speed of the target aircraft before TCAS issues an RA at moment t. , is the intensity of speed change. , * is the vertical speed of target aircraft after CAS issues an RA.  The collaborative conflict resolution algorithm follows the following principles when selecting the optimal maneuver direction: (1) Maximum vertical separation principle: The target aircraft needs to achieve maximum vertical separation from the intruder aircraft at CPA h in the case of the same intensity of speed change.
(2) Noncrossing principle in the vertical direction: When maneuvering upwards or downwards, target aircraft should achieve the goal of not-crossing with the invader aircraft in the vertical direction as much as possible [24].
The model of direction choosing is as follows: the target aircraft chooses to maneuver upwards when c i t = 1, the target aircraft chooses to maneuver downwards when c i t = −1, the target aircraft maintains flight when c i t = 0.

Intensity Choosing
Once the direction is chosen, the collaborative mechanism will help the proposed CAS by determining the adequate intensity of speed change. The intensity needs to take speed, track, and other information of both aircraft into consideration to guarantee not only at least ALIM vertical separation, but also minimal speed change. v i z,t is the vertical speed of the target aircraft before TCAS issues an RA at moment t. ∆ i z,t is the intensity of speed change. v i * z,t is the vertical speed of target aircraft after CAS issues an RA.

Original Trajectory Recovery Algorithm
As is depicted in Figure 7, when target aircraft has passed CPA h , CAS judges whether the conflict has been cleared. If so, the target aircraft adjusts its vertical speed to restore its original flight state. Otherwise, the target aircraft keeps its speed unchanged.
If the conflict has been cleared, target aircraft i restores its original flight state through Steps (1) and (2).

Original Trajectory Recovery Algorithm
As is depicted in Figure 7, when target aircraft has passed CPAh, CAS judges whether the conflict has been cleared. If so, the target aircraft adjusts its vertical speed to restore its original flight state. Otherwise, the target aircraft keeps its speed unchanged.
If the conflict has been cleared, target aircraft i restores its original flight state through Steps (1) and (2).
, + ℎ,  At moment + 2 * ℎ, , target aircraft i will have returned to its original altitude, then it adjusts to its original speed.
, +2 * ℎ, * = , +2 * ℎ, After two steps, the target aircraft will have cleared the conflict and is restored to its original state.

Candidate-Strategies-Generating Module
The algorithm of the candidate-strategies-generating module is a variant of the pairwise conflict resolution algorithm. The candidate strategies for the target aircraft is the set of all resolution strategies that are considered when a pairwise conflict with a single aircraft occurs. Taking the threeaircraft conflict scenario as an example, the candidate strategies for aircraft m consists of two parts. One part is the resolution strategies generated by aircraft m facing a conflict with invading aircraft i.
• At moment t + 2 * τ ij h,t , target aircraft i will have returned to its original altitude, then it adjusts to its original speed.
After two steps, the target aircraft will have cleared the conflict and is restored to its original state.

Candidate-Strategies-Generating Module
The algorithm of the candidate-strategies-generating module is a variant of the pairwise conflict resolution algorithm. The candidate strategies for the target aircraft is the set of all resolution strategies that are considered when a pairwise conflict with a single aircraft occurs. Taking the three-aircraft conflict scenario as an example, the candidate strategies for aircraft m consists of two parts. One part is the resolution strategies generated by aircraft m facing a conflict with invading aircraft i. The other part is the resolution strategies generated by aircraft m facing a conflict with the potentially invading aircraft j. Similarly, the candidate strategies for aircraft i and aircraft j are also formed in this way. It can be seen from the pairwise conflict resolution algorithm that every aircraft has two strategies to choose from when the two aircraft are in conflict alone. For example, taking aircraft m as the target aircraft in the three-aircraft scenario, it is obvious that aircraft m has two choices of maneuver strategies, respectively, in the face of conflict with i and j. In other words, aircraft m has 4 alternative maneuver strategies. Therefore, in the three-aircraft conflict scenario, there are 64 combinations of maneuver strategies between the three aircraft. Figure 8 shows one combination of candidate strategies. The other part is the resolution strategies generated by aircraft m facing a conflict with the potentially invading aircraft j. Similarly, the candidate strategies for aircraft i and aircraft j are also formed in this way. It can be seen from the pairwise conflict resolution algorithm that every aircraft has two strategies to choose from when the two aircraft are in conflict alone. For example, taking aircraft m as the target aircraft in the three-aircraft scenario, it is obvious that aircraft m has two choices of maneuver strategies, respectively, in the face of conflict with i and j. In other words, aircraft m has 4 alternative maneuver strategies. Therefore, in the three-aircraft conflict scenario, there are 64 combinations of maneuver strategies between the three aircraft. Figure 8 shows one combination of candidate strategies. We assume that there will a three-aircraft conflict in a narrow airspace. Supposing at moment t, two of the three aircraft come into conflict first. Each of the two aircraft will reach their CPAh after the time of ℎ, 、 ℎ, 、 ℎ, , respectively. =1 or −1 means the direction of collision avoidance is "climb" or "descend". For example, = 1 means that aircraft m chooses the "climb" maneuver when facing the conflict with aircraft i; = −1 means that aircraft j chooses the "descend" maneuver when facing the conflict with aircraft m.
It can be seen from the pairwise conflict resolution algorithm that when aircraft m faces a conflict with aircraft i alone, there are two resolution strategies. ∆ , and ∆ , are the speed change intensity when the aircraft m makes a collision avoidance maneuver. Similarly, the candidate strategies for aircraft i and j can be derived, so all candidate conflict resolution strategies are shown in summary in Table 2.

Aircraft
Candidate Strategies We assume that there will a three-aircraft conflict in a narrow airspace. Supposing at moment t, two of the three aircraft come into conflict first. Each of the two aircraft will reach their CPA h after the time of τ mi h,t , τ mj h,t , τ ij h,t , respectively. c t = 1 or −1 means the direction of collision avoidance is "climb" or "descend". For example, c mi t = 1 means that aircraft m chooses the "climb" maneuver when facing the conflict with aircraft i; c jm t = −1 means that aircraft j chooses the "descend" maneuver when facing the conflict with aircraft m.
It can be seen from the pairwise conflict resolution algorithm that when aircraft m faces a conflict with aircraft i alone, there are two resolution strategies. ∆ mi z,t and ∆ mj z,t are the speed change intensity when the aircraft m makes a collision avoidance maneuver.
When aircraft m faces a conflict with aircraft j alone, there are also two resolution strategies: Similarly, the candidate strategies for aircraft i and j can be derived, so all candidate conflict resolution strategies are shown in summary in Table 2.

Collaborative Decision-Making Module
The collaborative decision-making module shown in Figure 9 is the core of the collaborative multi-aircraft conflict resolution algorithm. After the collaboration, the proposed CAS selects an optimal strategy combination from the 64 candidate strategy combinations that can ensure the resolution of all conflicts. We assume that aircraft m receives the RA first, which means that aircraft m must make the strategic choice first. The basis for decision-making is the principle of threat aircraft trajectory information and the maximum vertical distance principle. Therefore, aircraft m should choose a strategy that does not collide with other threatening aircraft (potential intruder j), while avoiding collision with the most threatening aircraft (intruder i). When there are multiple selectable strategies, the choice is made according to the principle of maximum vertical distance to increase the fault tolerance of the algorithm. After target aircraft m determines the optimal strategy, it shares its decision. Then, the intruder i determines its optimal collision avoidance strategy according to the decision of aircraft m and shares it. Finally, the potential intruder j selects the optimal strategy based on the optimal collision avoidance strategy of aircraft m and i to eliminate the potential threats. At this point, all aircraft have completed the selection of collision avoidance maneuvers with the help of a collaborative decision-making module, forming an optimal strategy combination to achieve conflict resolution.

Simulation
In this chapter, we simulate a three-aircraft scenario and conduct a contrast simulation to verify the algorithm's effectiveness. By recording waypoints of trajectories and analyzing the aircraft's status in the procedure, we can see the effect of the algorithms. The contrast simulation is conducted on Gmas and InCAS software, respectively. Among them, CAS proposed in this paper for the threeaircraft scenario is simulated in Gmas simulation software, while the TCAS scenario is simulated in InCAS simulation software. We assume that aircraft m receives the RA first, which means that aircraft m must make the strategic choice first. The basis for decision-making is the principle of threat aircraft trajectory information and the maximum vertical distance principle. Therefore, aircraft m should choose a strategy that does not collide with other threatening aircraft (potential intruder j), while avoiding collision with the most threatening aircraft (intruder i). When there are multiple selectable strategies, the choice is made according to the principle of maximum vertical distance to increase the fault tolerance of the algorithm. After target aircraft m determines the optimal strategy, it shares its decision. Then, the intruder i determines its optimal collision avoidance strategy according to the decision of aircraft m and shares it. Finally, the potential intruder j selects the optimal strategy based on the optimal collision avoidance strategy of aircraft m and i to eliminate the potential threats. At this point, all aircraft have completed the selection of collision avoidance maneuvers with the help of a collaborative decision-making module, forming an optimal strategy combination to achieve conflict resolution.

Simulation
In this chapter, we simulate a three-aircraft scenario and conduct a contrast simulation to verify the algorithm's effectiveness. By recording waypoints of trajectories and analyzing the aircraft's status in the procedure, we can see the effect of the algorithms. The contrast simulation is conducted on Gmas and InCAS software, respectively. Among them, CAS proposed in this paper for the three-aircraft scenario is simulated in Gmas simulation software, while the TCAS scenario is simulated in InCAS simulation software.

Introduction of Simulation Software
The platform for modeling and simulation is Gmas simulation software, which is constructed by the author's team. The platform is a graphical modeling and analysis method based on a time series state. Each graphical component is realized by a graphical programming language named Java Swing. The framework of the graphical modeling module is realized by Spring architecture. It supports staff to drag graphical components and configure attributes of graphical components and their interaction relations. The simulation model is built in this way.
In Gmas simulation software, a Gmas simulation model (GM) is mapped to a six tuple, GM = (S, D, H, H , F, E). The platform for modeling and simulation is Gmas simulation software, which is constructed by the author's team. The platform is a graphical modeling and analysis method based on a time series state. Each graphical component is realized by a graphical programming language named Java Swing. The framework of the graphical modeling module is realized by Spring architecture. It supports staff to drag graphical components and configure attributes of graphical components and their interaction relations. The simulation model is built in this way.
In Gmas simulation software, a Gmas simulation model (GM) is mapped to a six tuple, = ( , , , ′, , ). Indeed, is the end component. The components of the simulation model are shown in Figure 10   The running interface and result interface of Gmas software can be represented by Figure 12a  The composition and form of the simulation model can be represented by Figure 11 [25]. The platform for modeling and simulation is Gmas simulation software, which is constructed by the author's team. The platform is a graphical modeling and analysis method based on a time series state. Each graphical component is realized by a graphical programming language named Java Swing. The framework of the graphical modeling module is realized by Spring architecture. It supports staff to drag graphical components and configure attributes of graphical components and their interaction relations. The simulation model is built in this way.
In Gmas simulation software, a Gmas simulation model (GM) is mapped to a six tuple, = ( , , , ′, , ). Indeed, is a data component set, is the end component. The components of the simulation model are shown in Figure 10   The running interface and result interface of Gmas software can be represented by Figure 12a,b, respectively. The running interface and result interface of Gmas software can be represented by Figure 12a,b, respectively.  InCAS is a flexible and fully integrated TCAS simulator, including all features required to prepare, run, and analyze TCAS simulations of aircraft conflicts taken from real radar data. InCAS provides a platform to configure TCAS scenarios, run or playback TCAS simulations, view a TCAS conflict through simulated pilot and controller displays, analyze and diagnose TCAS behavior, and print hard copies of the various views of a TCAS simulation.

Simulation Modeling
The model of CAS for the three-aircraft scenario, which is shown in Figure 13, is divided into three modules according to their function. Different block diagrams represent different functions of the model. InCAS is a flexible and fully integrated TCAS simulator, including all features required to prepare, run, and analyze TCAS simulations of aircraft conflicts taken from real radar data. InCAS provides a platform to configure TCAS scenarios, run or playback TCAS simulations, view a TCAS conflict through simulated pilot and controller displays, analyze and diagnose TCAS behavior, and print hard copies of the various views of a TCAS simulation.

Simulation Modeling
The model of CAS for the three-aircraft scenario, which is shown in Figure 13, is divided into three modules according to their function. Different block diagrams represent different functions of the model. The function of Module 1 is conflict detection, in which three aircraft are monitoring the surrounding airspace to determine whether there is a risk. The function of Module 2 is conflict relief, providing suggestions including direction and intensity to aircraft involved in the conflict. The function of Module 3 is to guide aircraft to return to their original trajectory. The detailed introduction of each parameter in the simulation model is shown in Table 3.  The function of Module 1 is conflict detection, in which three aircraft are monitoring the surrounding airspace to determine whether there is a risk. The function of Module 2 is conflict relief, providing suggestions including direction and intensity to aircraft involved in the conflict. The function of Module 3 is to guide aircraft to return to their original trajectory. The detailed introduction of each parameter in the simulation model is shown in Table 3. Aircraft 1,2,3 cid*ac*x*y*z*vx*vy*vz P13 Aircraft 1,2,3 cid*ac*x*y*z*vx*vy*vz P14 Aircraft 1,2,3 cid*ac*x*y*z*vx*vy*vz P15 Aircraft 1,2,3 cid*ac*x*y*z*vx*vy*vz Note: tra = time of the CAS issues RA, ALIM = the altitude limitation, DMOD = distance modification, ZTHR = the vertical threshold value, cid = conflict id, ac = aircraft, cid*ac*x*y*z*vx*vy*vz = an 8-tuple with the listed elements.
In order to generate a three-aircraft scenario, this paper adopts MIT Lincoln Laboratory's CASSATT to evaluate TCAS multi-aircraft conflict [26][27][28]. At first, we used the model to generate a pairwise conflict between two aircraft. Then, we use a modified version of conflict models to generate a third aircraft involved in the conflict. Finally, we get a three-aircraft conflict scenario. Table 4 summarizes the sensitivity level, and the threshold values used to issue TAs and RAs in simulation. Besides, ALIM defines the requested vertical minimum distance at CPA h . Note: DMOD = distance modification, ZTHR = the vertical threshold value, ALIM = the altitude limitation.

Result Analysis
We use Gmas and InCAS software to simulate the procedure of collision avoidance under the TCAS scenario and the proposed CAS for a three-aircraft scenario, respectively. Through recording waypoints of aircraft trajectory and their vertical miss distance (VMD), we can contrast the performance of TCAS and CAS in dealing with three-aircraft conflict.

P15
Aircraft 1,2,3 cid*ac*x*y*z*vx*vy*vz Note: tra = time of the CAS issues RA, ALIM = the altitude limitation, DMOD = distance modification, ZTHR = the vertical threshold value, cid = conflict id, ac = aircraft, cid*ac*x*y*z*vx*vy*vz = an 8-tuple with the listed elements. In order to generate a three-aircraft scenario, this paper adopts MIT Lincoln Laboratory's CASSATT to evaluate TCAS multi-aircraft conflict [26][27][28]. At first, we used the model to generate a pairwise conflict between two aircraft. Then, we use a modified version of conflict models to generate a third aircraft involved in the conflict. Finally, we get a three-aircraft conflict scenario. Table 4 summarizes the sensitivity level, and the threshold values used to issue TAs and RAs in simulation. Besides, ALIM defines the requested vertical minimum distance at CPAh.

Result Analysis
We use Gmas and InCAS software to simulate the procedure of collision avoidance under the TCAS scenario and the proposed CAS for a three-aircraft scenario, respectively. Through recording waypoints of aircraft trajectory and their vertical miss distance (VMD), we can contrast the performance of TCAS and CAS in dealing with three-aircraft conflict.  As is depicted in Figure 14, blue lines represent the trajectory of Aircraft 1, yellow lines represent the trajectory of Aircraft 2, and gray lines represent the trajectory of Aircraft 3. The three aircraft cruise in different directions. Aircraft 1 and Aircraft 2 level off at different altitudes, while Aircraft 3 is climbing from a low altitude.
If the tracks of the three aircraft are extrapolated into the future without pilot intervention, the three aircraft will come into conflict. Table 5    As is depicted in Figure 14, blue lines represent the trajectory of Aircraft 1, yellow lines represent the trajectory of Aircraft 2, and gray lines represent the trajectory of Aircraft 3. The three aircraft cruise in different directions. Aircraft 1 and Aircraft 2 level off at different altitudes, while Aircraft 3 is climbing from a low altitude.
If the tracks of the three aircraft are extrapolated into the future without pilot intervention, the three aircraft will come into conflict. Table 5 Figure 15 shows the procedure of collision avoidance under InCAS simulation software. When Aircraft 1 and Aircraft 3 come into conflict, TCAS issues "climb" for Aircraft 1, and "descend" for Aircraft 3. The descending Aircraft 3 come into conflict with climbing Aircraft 2. TCAS cannot issue a simple instruction of "climb" and "descent" for Aircraft 2 and 3 as a normal pairwise conflict because Aircraft 3 is still in conflict with Aircraft 1. If choosing to climb, it will return to conflict with Aircraft 1. If it continues descending, it will come into collision with Aircraft 2. In the end, TCAS issues "LO" for Aircraft 3. That is to say, the descending Aircraft 3 can only choose to level off. When Aircraft 2 and 3 reach CPA h , the vertical miss distance (VMD) is about 150 ft, the horizontal distance is less than 0.8 NM, and there is a great possibility of collision between Aircraft 2 and 3. TCAS could not deal with three-aircraft conflict satisfactorily.    Figure 16 shows the procedure of collision avoidance under Gmas simulation software. When Aircraft 1 and Aircraft 3 come into conflict, the proposed CAS does not issue an RA as pairwise conflict avoidance logic. Judging Aircraft 3 as a potential intruder that will come into conflict, the proposed CAS issues an RA for all aircraft, including Aircraft 2, although it is not yet in conflict at this moment. In order to avoid conflict, the proposed CAS issues an RA in which Aircraft 1 chooses to climb, Aircraft 3 chooses to level off, and Aircraft 2 chooses to level off. In this procedure, the three aircraft will achieve at least ALIM vertical separation. The result shows that the collision avoidance  Figure 16 shows the procedure of collision avoidance under Gmas simulation software. When Aircraft 1 and Aircraft 3 come into conflict, the proposed CAS does not issue an RA as pairwise conflict avoidance logic. Judging Aircraft 3 as a potential intruder that will come into conflict, the proposed CAS issues an RA for all aircraft, including Aircraft 2, although it is not yet in conflict at this moment. In order to avoid conflict, the proposed CAS issues an RA in which Aircraft 1 chooses to climb, Aircraft 3 chooses to level off, and Aircraft 2 chooses to level off. In this procedure, the three aircraft will achieve at least ALIM vertical separation. The result shows that the collision avoidance algorithm of a three-aircraft scenario can handle three-aircraft conflict satisfactorily.    Figure 16 shows the procedure of collision avoidance under Gmas simulation software. When Aircraft 1 and Aircraft 3 come into conflict, the proposed CAS does not issue an RA as pairwise conflict avoidance logic. Judging Aircraft 3 as a potential intruder that will come into conflict, the proposed CAS issues an RA for all aircraft, including Aircraft 2, although it is not yet in conflict at this moment. In order to avoid conflict, the proposed CAS issues an RA in which Aircraft 1 chooses to climb, Aircraft 3 chooses to level off, and Aircraft 2 chooses to level off. In this procedure, the three aircraft will achieve at least ALIM vertical separation. The result shows that the collision avoidance algorithm of a three-aircraft scenario can handle three-aircraft conflict satisfactorily.

Conclusions
This paper makes an indepth study of multi-aircraft conflict, especially of three-aircraft conflict. The summary and conclusions are as follows:  This paper studies the collision avoidance of multi-aircraft conflict and innovatively proposes a collaborative optimization CAS strategy based on the state prediction of invading aircraft and

Conclusions
This paper makes an indepth study of multi-aircraft conflict, especially of three-aircraft conflict. The summary and conclusions are as follows: • This paper studies the collision avoidance of multi-aircraft conflict and innovatively proposes a collaborative optimization CAS strategy based on the state prediction of invading aircraft and potential invading aircraft under complex conditions. The simulation performed on the relevant case study shows that the proposed algorithm effectively compensates the existing research gap on multi-aircraft conflict resolution. • This paper improves the ability and efficiency of TCAS in solving multi-aircraft conflicts, especially three-aircraft conflict. In the collaborative decision-making algorithm proposed in this paper, the target aircraft takes into account the potential invader aircraft that poses a threat during the process of collision avoidance. It can avoid situations where target aircraft come into conflict with another aircraft when avoiding an invader aircraft. Through contrast experiments, the result shows that the proposed collaborative multi-aircraft CAS is better than TCAS in dealing with three-aircraft conflict.
Future research will focus on the following aspects. Further experiments on different conflict scenarios will be performed to show that the proposed algorithm is able to deal with any three-aircraft conflict scenarios, expanding the scope of simulation from three-aircraft conflict to multi-aircraft conflict. Additionally, future research should further increase the robustness of the algorithm in different scenarios, such as UAV conflict resolution.