Hierarchical Collaboration Approach for Tracking of Flying Target by UAVs

This paper investigates a hierarchical target tracking method based on the collaboration of unmanned aerial vehicles (UAVs) at different altitudes. To enhance the target tracking range, the high-altitude UAVs monitor the wide area, and transmit their surveillance information to low-altitude UAVs which directly detect and collect information about the target’s movements. The contributions of this paper are threefold: First, to track the flying target in a dynamic environment, a modified Lyapunov guidance vector field (LGVF) method is used to plan velocities for UAVs, where a time-varying vertical component is incorporated into the traditional LGVF function to satisfy the constraints of cluster communication. Secondly, a three-dimensional local collision-free guidance vector field (TLCGVF) method is proposed for UAVs to plan collision-free paths on line. To simultaneously track the target and avoid obstacles, the vector field by LGVF is used as the original vector field of TLCGVF. Thirdly, the rolling optimization strategy is used to adjust the reactive parameters of TLCGVF to enhance the path quality. The simulation results confirm the feasibility of the above approach.


I. INTRODUCTION
In recent years, UAVs will be widely utilized in multiple fields to perform operations such as detection, search, tracking and rescue, where target tracking is a complicated issue involving motion control, state prediction, intelligent communication and multi-sensor information fusion, etc. [1]- [4]. Besides, tracking low-altitude flying targets is more challenging in UAV capabilities of intelligence control and terrain-following than tracking ground targets, where real-time path planning is a key technology to solve this problem. Meanwhile, compared with a single UAV, multiple UAVs can accomplish tasks more efficiently [5], [6]. However, the issues of maintaining communications among UAVs, dealing with motion constraints, and avoiding collisions rise for multiple UAVs to complete flying target tracking tasks in complex environments.
Target tracking can be regarded as a path planning problem when the target's motion can be predicted. In [7], a 3D The associate editor coordinating the review of this manuscript and approving it for publication was Emre Koyuncu . path planning approach that can continuously monitor the target is proposed. But this approach is only suitable for static targets. Meng et al. [8] presents a controller design method based on the finite state automaton model, where the target is assumed to move uniformly along a straight line. In [9], a new virtual intersecting localization technique is proposed by measuring bearing to estimate the target's state while ignoring the relative angle between UAV and target. Chen et al. [10] constructs the LGVF and the tangent guidance vector field to track the target, where UAVs can track the target under path constraints and wind effects. Reference [11] presents a Lyapunov guidance algorithm for tracking a ground target with the UAV, which however does not apply to multiple UAVs. The LGVF methods are improved for multiple UAVs to track the target in [12]. Besides, to overcome complex environmental constraints, Sun et al. [13] proposes a wind state estimation method based on the Unscented Kalaman Filter, where LGVF is introduced to achieve standoff target tracking. Some other algorithms include the partially observable Markov decision process, backstepping-like technique, hierarchical collaboration and deep learning [14]- [17], where the hierarchical collaboration method is one of the most effective collaborative ways. In [16], a method for enhancing detection accuracy is proposed by improving the hierarchical probabilistic search algorithm of UAVs. It is worth noting that the above results are suitable for ground targets or 2D path planning, and cannot be applied to target tracking in three-dimensional complex environments, and hence deserve further investigations.
In the process of target tracking, UAVs often need to avoid the obstacles and threats in complex environments.
Therefore, the environmental constraints on UAVs should be taken into account in the problem of collision avoidance. To this end, many important results to ensure the path quality, mission efficiency and cooperation have been provided, such as model predictive control (MPC) [18], [19], guidance vector fields method [20], potential field-based method [21], [22], rapidly exploring random tree (RRT) [23] and interfered fluid dynamical system (IFDS) [24]. Sara et al. [25] design a minimum time search planned based on a colony algorithm that includes communication and collision avoidance constraints. By available information, the collision-free path of UAV can be obtained. Yu et al. [26] presents a Markov decision process-based algorithm, where UAVs avoid obstacles by predicting their position information. Reference [27] presents 'obstacles sense and avoid' algorithm and decision-making system based on Particle Swarm Optimization, which can aid UAV to re-route its current path to a safer flight course. In [28], the UAVs use a light-computational approach to avoid the obstacles. Liu et al. [23] proposes a new hybrid collision avoidance method by intelligent fuzzy logic approach to find the global optimal path. But the above results are effective in planning a real-time 2D path, while the computational quantity will increase explosively in complex 3D environments. Besides, the smoothness and feasibility of the path may not be satisfactory. In many cases, UAVs need to bypass obstacles and track targets at the same time, which is a hard task. In [29], a hybrid path planning method by combing LGVF and interfered fluid dynamical method has been presented, where vertical components are introduced into the vector field function of LGVF for the UAV target tracking, and IFDS is used to avoid obstacles. However, this method can only be used for a single UAV. Based on [29], a formation strategy is added to the LGVF method to satisfy the constraints of collaborative tracking in [30]. However, multiple UAVs need to maintain some fixed formations, which reduce UAVs' motilities. For improving the mobility and local exploration ability of UAV, a modified optimization integrating the basic grey wolf optimizer with the Guassian estimation of distribution strategy is proposed in [31]. The above methods are only used to track ground targets while tracking flying targets is more challenging than tracking ground targets. On this account, how to design a method that has the advantages of high path quality, low calculation complexity, and suitable for various complex situations is an important yet challenging problem that serves as a motivation of this study. In this paper, we provide a novel 3D dynamic path planning method for tracking of a flying target by multiple UAVs, where the LGVF and TLCGVF are combined based on the rolling optimization strategy to obtain the real-time optimal path. The contributions of this paper can be summarized as follows: (1) Hierarchical collaboration strategy is used to track flying target by UAVs, in which the high-altitude UAV is responsible for monitoring the target, and the low-altitude UAV is applied to detect the target motion state; (2) The introduction of time-varying vertical height into the Lyapunov function allows the generated speed to guide the UAVs to track flying targets with vertical and horizontal speeds, which breaks through the limitation that traditional LGVF can only track ground targets; (3) A new TLCGVF is constructed by involving vertical and horizontal velocity modulation matrices, which can generate smooth collision-free paths around obstacles and is suitable for more complex collision avoidance areas. In particular, the present method generates path plans that considering multiple obstacles and moving threat with little computation effort, making their generation applies to real-time collision avoidance.
The content of this paper is arranged as follows. In Section II, the research problem of this paper is described. The improved LGVF of hierarchical collaboration is proposed in Section III. The TLCGVF method is designed in Section IV. The rolling optimization strategy and objective function are introduced in Section V. The simulation results are presented in Section VI. Finally, Section VII gives the conclusion.

II. PROBLEM DESCRIPTION
As shown in Fig.1, first of all, when the UAVs find the target in hierarchical collaboration way during the cruise, they need to predict the target's motion state through the VOLUME 8, 2020 Extended Kalman Filter (EKF). Secondly, considering the dynamic constraints of UAVs, the guidance vector field velocity generated by LGVF based on the target's motion state will guide UAVs to track the flying target. Thirdly, the vector field of LGVF is taken as an original vector field of TLCGVF, and the modulation matrix is used to describe the influence of obstacles on the flight environment. Hence, the collision-free vector field is obtained, in which the streamlines are regarded as the paths to guide UAVs to avoid obstacles. Finally, the optimal path is obtained by rolling optimization strategy. In what follows, the UAV model, the EKF, environment constraints, will be described in detail.

A. UAV MODELING
This subsection provides the UAV motion model and motion constraints. As in previous works [30], taking the UAV n as an example, the motion model is described by the following three-degree-of-freedom point model in the inertial coordinate o_xyz: where S n = [x n , y n , z n ] T is UAV n 's position coordinate, v n is the flight velocity, α n is the flight path angle between v n and z-axis, β n is the heading angle between the horizontal velocity and x-axis, ω n is the turn rate, and N is the number of UAVs.
To ensure that the path is feasible, the position of the k-th waypoint S k n = [x k n , y k n , z k n ] T for k = 1, · · · , K should satisfy the following flight constraints: where ω max is the maximum turn rate of UAVs; α min and α max are the minimum and maximum flight path angles; v min and v max are the minimum and maximum flight velocities; h min and h max are the minimum and maximum heights; z k t is the flight altitude of the target. Moreover, UAVs will collide with each other if they are too close, and will lose communication connections if they are too far away. Hence, with the need for collision avoidance and cooperative communication, the distance between any two UAVs needs to be larger than the minimum distance d min required for collision avoidance and smaller than the maximum communication distance d max in hierarchical collaborative tracking.

B. STATE PREDICTION BY EKF
It is assumed that the target is regarded as a particle with variable acceleration speed. Its position, velocity and accelerated velocity are denoted as S t = [x t , y t , z t ] T , v t = [v tx , v ty , v tz ] T and a t = [a tx , a ty , a tz ] T . To avoid the target escaping from the UAVs' monitoring range, it is assumed that v t is always less than v max .
Due to the motion state of the target is unknown, it is difficult for UAV to keep continuous tracking after detecting the target. Therefore, EKF is used to predict the motion state of a dynamic obstacle or a flying target. The state and the observation equations are expressed as follows: where T is the motion state of a target or a threat at time k; Z k = [x k t , y k t , z k t ] T is the observed value of the corresponding position; f , g and are the state transition, observation and noise functions respectively; W k = [0, 0, 0, 0, 0, 0, w xk , w yk , w zk ] T and V k are the zero-mean dynamic noise and observation noise subject to normal distributions, i.e. W k ∼ N(0, Q) and V k ∼ N (0, R), where Q and R are the corresponding covariance matrices, the value of Q represents the process error, and the value of R is related to the sensor accuracy. Fig.2 shows the error of target tracking via the EKF, where the target's trajectory is defined by x t = 5000 cos(0.00392t), y t = 5000 sin(0.00392t) and z t = 200 sin(0.00785t). As shown in Fig.2, the prediction accuracy of EKF is very close to the target motion state, where the velocity estimation curve converges smoothly without fluctuation, and the position error is also within an acceptable range.

C. ENVIRONMENT MODELLING
Static obstacles or moving threats, such as mountains, buildings, trees and radars, are modeled as follows: where λ x , λ y and λ z are the size parameters; P x , P y and P z are the shape parameters; [e o , l o , q o ] is the center position of the obstacle with radius r o . By choosing different parameters in (4), the obstacles or threats can be represented in different shapes, such as sphere when λ x = λ y = λ z and P x = P y = P z = 1, cone when λ x = λ y , P x = P y = 1 and P z < 1, cylinder when λ x = λ y , P x = P y = 1 and P z > 1.
For any point the S n , F(S n ) ≤ 1 means S n is inside the obstacle; F(S n ) > 1 means S n is outside the obstacle. If UAV is particularly close to the obstacle, it collides with an obstacle inevitably due to the restrains of the size and performance. For safety, the collision-free path should be planned in a particular startup area with radius r x , where r x is the horizontal distance between the UAV and the center position of the obstacle. Moreover, assume that the UAV's sensing range is modeled as a circular region with a radius of r s and is determined by its sensor capabilities, which satisfies r x ∈ (r o , r s ).

III. COOPERATIVE FLYING TARGET TRACKING BY AN IMPROVED LGVF
The LGVF is used for ground target tracking. The UAV is controlled by two steps, which include steering angle control and velocity control. In the steering angle control, the turn rate of UAV is calculated by the Lyapunov distance function, which will guide the UAV to converge to the expected horizontal limit cycle. In the speed control, the speed of UAV is constantly adjusted by the Lyapunov phase function, making the UAV gradually move to the limit cycle. For tracking a flying target, the time-varying flight height should be taken into consideration. In this section, the improved LGVF based on the hierarchical collaboration will be proposed.

A. AN IMPROVED LGVF METHOD
The track altitude of a UAV is an important factor in tracking missions because changes in the tracking altitude affect the detection precision and motion state of the UAV. When multiple UAVs are used to track a single flying target, the tracking performance can be improved by adjusting the flight altitude of UAVs when the vertical height of target changes. Supposing that UAV n tracks a dynamic flying target S t = [x t , y t , z t ] T with the constant airspeed v 0 , the Lyapunov function can be written as follows: where r = (x n − x t ) 2 + (y n − y t ) 2 , R k is the horizontal radius of the limit cycle, h t = z n − z t , H k is the optimal flight height at time k. As shown in Fig.3, we assume that the UAV's detection area A for the target remains unchanged. If the search angle σ remains a constant, then Based on (5), the guidance vector field can be generated; the UAV n 's desired velocity u n is expressed as follows: where b is the vertical convergence constant that determines the rate of convergence to H k . Then the motion constraint of the UAV n is inferred by (5) and (6): where [v nx , v ny , v nz ] T = [ẋ n ,ẏ n ,ż n ] T is the velocity component of UAV n . Based on (7), dV (S n ) dt ≤ 0 always holds when the UAV converges to the limit cycle with radius R k and flight height H k , i.e. dV (S n ) dt = 0 when r = R k and h t = H k . The velocity u n will guide the UAV to converge to the desired location. Then the desired heading angle β n = arctan(v nx v ny ) and the turn rate ω n can be deduced as follows: The maximum turn rate is ω max = v 0 R k when r = R k and h t = H k . Therefore, the condition R k ≥ v 0 ω max should be satisfied. The flight path angle: when h t = h max − z t and r = R k , we obtain the minimum flight path angle: when h t = h min − z t and r = R k , the maximum flight path angle is inferred: The condition α min ≤ α 1 ≤ α n ≤ α 2 ≤ α max should be fulfilled. In tracking a flying target, the Lyapunov guidance vector field can be described as: where ϕ is the correction coefficient whose value can be solved by figuring the following formula to remain the airspeed equal to initial value v 0 : Because the UAV's velocity is always greater than the velocity of the target, (13) must have a positive solution so that it can be deduced: Therefore, the UAV can still converge to the limit cycle with optimal horizontal tracking distance and optimal flight height in the reference frame, and the velocity is [ ϕv nx + v tx ϕv ny + v ty ϕv nz + v tz ] T . Next, the feasibility of the path is discussed. The heading angle β n = arctan ϕv ny +v ty ϕv nx +v tx and the turn rateβ n satisfyβ n ≤ (ϕ 2 + ϕ) · ω n , where (8) gives that R k ≥ v 0 (ϕ 2 +ϕ) ω max . The path angle of UAV n is α n = arcsin ϕv nz +v tz v 0 and b need to satisfy: Fig.4 and Fig.5 illustrate a series of the desired flight paths of UAV by the two different LGVFs respectively. As shown in Fig.4 (a) and Fig.5 (a), wherever UAV starts, by improved and traditional LGVF, the path will always guide UAV gradually converge to the limit cycle in horizontal plane. Besides, by the improved LGVF, the route will guide UAV converge to optimal height in vertical plane as shown in Fig.5 (b), which means that the UAV can adjust its flight altitude when the target's altitude changes. Suppose there is only one aerial target. The paths with initial optimal flight height H 0 = 300m, monitor distance R max = 800m, h = 0.1, b = 0.5, 1.5, 4, are shown in Fig.6 (a). The paths with b = 0.5, h = 0.1, 0.5, 1 are shown in Fig.6 (b). All the paths can track the flying target successfully, but the shapes of flight paths are inconsistent with various parameters.

B. TARGET TRACKING BY MULTIPLE UAVs
At high altitudes, the UAV can obtain a wide range of detection information, but the quality of information they obtained is low. At low altitudes, the UAV can obtain high-quality detection information at a reduced detection range. Therefore, the tracking of a dynamic target with UAVs of different altitudes should not only ensure the accuracy of the information but also enhance the detection range. In this paper, communication is maintained by adjusting the horizontal radius of the limit cycle and the flight height, UAVs can only exchange data when they are within communication range, and their perception of the motion state of target is replaced with communication information. Note that the adjustment will not affect the path feasibility. In Section III, we introduce the improved LGVF of the high-altitude UAV, and then we will introduce the improved LGVF of low-altitude UAV. It is should be noted that the low-altitude UAV communicate with only high-altitude UAV tracking the same target.
There are two UAVs in the air environment. Fig.7 illustrates the positional relation between the UAVs and the target, where L is the straight line between the current position of the high-altitude UAV (UAV 1 ) and the target, R k is the vertical distance from the low-altitude UAV (UAV 2 ) to L, H k is the distance between the vertical point and the target. As shown in Fig.7, the limit cycle τ (S) with radius R k is centered at S , where S is the vertical point from UAV 2 to line segment L; the distance from any point on τ (S) to the UAV 1 is constant, as well as the distance to the target. If r 1 ∈ (d max , d min ), r 2 ∈ (R min , R max ), r 1 + r 2 < r 3 and r 1 − r 2 < r 3 , τ (S) can be seen as the limit cycle for the UAV 2 , where r 1 is the distance between the UAV 1 and the UAV 2 , r 2 and r 3 are the distance between the two UAVs and the target respectively.
Next, we will introduce how to solve τ (S). Assuming d = d max , r 2 = R max and the UAV 1 converges to the limit cycle, one can get The guidance vector field v l of the low-altitude UAV can be derived from (5) and (6) as follows:  To obtain the form of τ (S) and reduce the computational complexity, the transformation matrix C Mw is used to transform the original coordinate system o_xyz into the reference coordinate system o _x y z . which means that the UAV2 still converge to limit cycle τ (S). When the target moves, the velocity of UAV 2 can be calculated by (12), which can still equal to v 0 by properly choosing ϕ. Although dV (S n ) dt ≤ 0 holds in the inertial system, it may not hold in the new coordinate system since the new guidance vector field is not equal to the original one. But the new one will prevent the UAVs from leaving the communication range and losing the tracking target. Fig.8 illustrates the process of tracking a flight target in the inertial coordinate system and the target reference system respectively. It is assumed that the target flights from point S t = (0, 2000, 200)m, and the motion information are x = 10 * t, y = 1000 * sin(0.01781t) + 2000 and z = 100 * sin(0.01781t) + 200. The start point of UAVs are S 1 = (0, 600, 1500)m and S 2 = (0, 300, 1000)m, R 0 = 600m and H 0 = 800m; the communication range d max = 1200, the sensing distance r u = 1200m. By introducing the time-varying vertical component and transforming the reference coordinate system, UAVs can track the flying target successfully.

IV. OBSTACLE AVOIDANCE BY TLCGVF
In many missions, UAVs often need to fly in hazardous environments. It is reasonable and necessary to path planning with the avoidance of obstacles or threats. This section presents a TLCGVF method for this situation.

A. THE DESCRIPTION OF TLCGVF
As a 3D collision-avoidance method for UAVs, TLCGVF is proposed in the presence of moving threats and static obstacles. By constantly modifying UAV's velocity with a modulation matrix, a smooth and continuous collision-free path is obtained. To further consider collision avoidance tasks based on target tracking in Section III, the Lyapunov vector field V (S n ) is taken as the initial vector field of TLPGVF, and its velocity is defined as follows: (20) where d tI , I ∈ N is the distance between any UAV and the flying target.

B. COLLISION AVOIDANCE VECTOR FIELDS
Suppose a single UAV moving around an obstacle with radius r o according to model (1), as shown in Fig. 9. Since collision avoidance needs to consider the motion state of the UAV and the obstacle, two space coordinate systems are constructed in Fig.9: an inertial system fixed on the space point, and a relative motion system fixed on the obstacle or threat. It should be noted that Fig.9 shows the horizontal plane at the same height between the UAV and the obstacle.

1) TLCGVF FOR SINGLE OBSTACLE
Assuming that the UAV moves at speed v 0 along a certain direction, determined by α and β. There is a static obstacle with the horizontal radius r o located at be the spatially dependent vector field in the relative motion system, where S r = [x r , y r , z r ] T is a point in space; θ is the angle between E r and the inertial x-axis of a coordinate system centered at S o , where E r is the line of sight between points S o and S r . Therefore, consider the following system: where λ(r x , θ) is a function with λ(r s , θ) = 1 and λ(r o , θ) ≥ 0; λ ψ (r x , θ) is a continuous modulation function; r x = (x r − x o ) 2 + (y r − y o ) 2 ; ϑ is the angle between the velocity v o and E r . Because the obstacle is stationary, the v 0 is equal to v d . Next, λ ψ (r x , θ) and λ(r x , θ) are defined as the horizontal and vertical velocity modulation functions respectively described in (22) and (23), as shown at the bottom of the page, in which The form of γ (r x ) is inspired by the curvilinear function with x √ 1 + x 2, which can be partially revised to obtain the desired character for the velocity modulation matrix; η is the vertical modulation parameter. In conclusion, the TLCGVF generates guidance velocity v s (S) for a single static obstacle, and switches to relative motion system via the following function: (25) in which the W (θ) is the standard rotation matrix: Parameters a and r s can affect the smoothness and reactivity of the vector field. Furthermore, the distance where the activation of TLCGVF is determined by r s , the value of parameter a determines the acuteness of the transition between target tracking path planning and collision-free path planning. As shown in Fig.10, r s defines an area of influence around the obstacle, and any UAV inside this area is considered to perform collision avoidance operation. These parameters affect the motion state of the UAV. Notably, if r s is larger, the UAV has more space to bypass the obstacle. In contrast, if the value of a is larger, the turn rate of the UAV increases, and the UAV performs a more drastic operation.

2) MIXED TLCGVF FOR MULTIPLE OBSTACLES
It is assumed that UAV detects multiple obstacles through onboard sensors, and the minimum separation distance between them is where M is the number of obstacles. Furthermore, supposing that r s is chosen, the radius of the collision-avoidance area leads to the TLCGVF overlap. In this case, if the UAVs follow the path of one TLCGVF, it may collide with other obstacles. Hence, it is necessary to propose a more intelligent way to avoid multiple obstacles. To this end, a mixed TLCGVF is now defined concerning multiple obstacles by calculating their weighted value, while retaining r i o and r j o . The weight w i associated with each obstacle is determined by the radius r i s and the distance between UAV and obstacle. The multiple obstacles problem can be divided into two cases according to the radius of the overlapping area. Scenario 1: (27) where the UAV has to switch between two different motion schemes. If the UAV is outside any collision avoidance area, it will execute its original motion scheme; otherwise, the UAV will start modulate the new motion via TLCGVF. Scenario 2: The v s (S) can be defined as where m is the number of obstacles in the overlapping influencing area, and (29) in which the zero weight value is independent of the collisionavoidance motion whenever the UAV is outside the influence area of obstacles, whereas a weight value of 1 is associated with collision-avoidance motion around a single obstacle. As shown in Fig.11, these different paths indicate that the UAV can bypass obstacles under different parameters.

3) LOCAL TLCGVF FOR A MOVING THREAT
To avoid a moving threat, the path of the UAV cannot cross the boundary of the threat at any time. Therefore, we present a method to produce similar guidance vector fields around threat, and apply this method to the relative motion system, to produce a radial velocity of UAV in the inertial system, so as to meet the collision avoidance condition.
In the relative motion system, set v r as the UAV's velocity, as shown in Fig.9. A similar vector field is defined, set VOLUME 8, 2020 h r (S r ) = [ṙ t , r tθ ,ψ] as a spatially dependent vector field: ; ψ d is the angle between the velocity v 0 and x-axis direction in motion system; ξ (θ, ψ d ) = a tan 2(sin(θ −ψ d ), cos(θ −ψ d )). The corresponding velocity equations v 0 = v r + v b can be obtained by (30) in the inertial system. Since the UAV's speed v 0 is a constant, the relative velocity v r is calculated by solving v r + v b = v 0 . As such, similar guidance vector fields may be implemented, and the TLCGVF for a moving threat is defined as: If the performing of formula (31) is achieved perfectly, theṅ r ≥ 0 in the motion system when r = r o , which explains that the UAV will not enter the threatened area to avoid the moving threat. A sample of a collision-free path is illustrated in Fig. 11 in a mixed obstacle zone. One threat is defined as a cylinder, whose motion state is x = 1000 + 25 * t, y = 3000 − 2500 * sin(0.00785t), z = 0 and t ∈ [1,200]. As a result, the TLCGVF method can provide a motion plan for UAV guaranteeing collision avoidance for various threatened areas with constant velocity. The pseudocode of LGVF and TLCGVF algorithm is described in Table 1.

V. ROLLING OPTIMIZATION STRATEGY A. THE DESCRIPTION OF ROLLING OPTIMIZATION
The LGVF and TLCGVF have been proven to be feasible for tracking and collision avoidance in section III and IV, but the above method plan one-step path without considers the future motion of target or threat so that the UAV cannot adjust its flight trajectory in real time, which will make the path of LGVF + TLCGVF unfeasible sometimes e.g. large angle changes exist in the planned path. Besides, the reactive parameters have much influence on path quality as shown in Fig.6 and Fig.10∼11. As the selection of reactive parameters is aimless and blind, the quality of path cannot be ensured. To solve the problem, the rolling optimization strategy is used to arbitrarily adjust the value of the parameters. Then reliable local path will be obtained ahead by the real-time optimization in the future, which will satisfy all the path constraints. Taking the UAV n as an example, it is assumed that a Q-step path {S k n , · · · , S k+Q n } is planned in advance when the UAV n arrives at S k n at the time k. The UAV n only flies along S k n S k+Q n . In the process of executing the path S k n S k+1 n , a new Q-step path {S k+1 n , · · · , S k+Q+1 n } is planned. Note that the time of path planned should be less than the time of executing the path.

B. THE OPTIMIZING INDEX OF THE PATH
The value of the total objective function J (k) is used to evaluate the disadvantages of the local path. In general, the smaller J (k), the better the path quality is. The feasibility of the path should be determined: If the path satisfies any of the constraint boundaries defined in Section II, then the path is feasible. J (k) is made up of three parts: target tracking index T (k), collision avoidance index C(k) and path smoothness index G(k).
The UAV is guided to track the flying target and maintain a certain distance by modifying the velocity v. Therefore, the distance d i tI between UAV I and target at the point S i can be considered as the following index: The smoothness of the path as one of the evaluation criteria is defined as follows: Besides, the criticality of the i-th obstacle to the k-th waypoint S k n should be introduced into C(k): Note that the range of T (k), C(k) and G(k) are different, so they should be normalized before the calculation of J (k).

C. THE COMPLEXITY ANALYSIS OF ALGORITHM
The proposed tracking and collision-avoidance strategy are simulated by using MATLAB 2014b. The computer configuration is composed of 2GHZ CPU, the 4GB of memory and Windows 10 operation system. Suppose that the UAV performs tracking tasks in a complex environment. The tracking, motion prediction and collision avoidance programs are VOLUME 8, 2020

VI. SIMULATION
Some necessary parameters are designed in Table 2.
A. COOPERATIVE TARGET TRACKING BY LGVF As shown in Fig.8 and Fig.12, a flying target moves in the 3D space under the time-varying speed: v tx = 10, v ty = 17.81 * cos(0.01781t), v tz = 1.781 * cos(0.01781t), and two UAVs execute the mission of flying target tracking in the inertial system. The distance information is given in Fig. 12(a). The standoff distance of the UAV 1 and UAV 2 are smaller than the detection distance r u = 1200m in most the time.
To explain the position relation of the UAV 2 more readily, the black line and green line indicate that UAV 2 can maintain communication and detect target by constantly adjusting the standoff distance. The state variables of paths are displayed in Fig. 12(b) and Fig. 12(c). The turn rate and the flight   hemisphere, which are built in the planning space. By selecting different collision avoidance parameters, the corresponding collision-free paths are obtained, as shown in Fig.11. All the flight paths can avoid static obstacles.

2) DYNAMIC OBSTACLE
Suppose there is one moving threat in space with a radius of 0.6km and a starting point of (1000, 3000, 0) m. A collision-free path is showed in Fig. 13(c) and 13(d) for a moving threat, where the heading angle of UAV changes compared to 13(a) and 13(b) under same parameters, which depends on both the motion prediction of threat and UAV's velocity. Moreover, the TLCGVF leaves more space around the obstacle to perform the steering action for avoiding a possible collision. The parameters of collision avoidance are as follows: a = 5, r s = 1.6 * r o . As shown is Fig. 13(e), D tI is bigger than r o , which means that UAVs avoid the moving threat successfully, where D tI , I ∈ N shows the distance between UAV and threat.

C. COOPERATIVE TARGET TRACKING AND OBSTACLE AVOIDANCE
It is assumed that two UAVs are performing tracking tasks in a complex environment with obstacles and threats. Hence the strategy combing TLCGVF and LGVF is employed. Suppose there is a cylinder moving threat of the radius 400m with the start point (7, 1.5, 0)km in space, whose motion state is: x = 20t, y = 0, z = 100 sin(0.0314t) + 200. Besides, there are three static obstacles with radii 800m, 500m and 400m, respectively. Fig. 14(a) and Fig. 14(b) display the planned path under LGVF with the absence of obstacles. The LGVF method can generate the initial path. By introducing the time-varying vertical component, UAV can continuously adjust its vertical speed and successfully track target. Suppose that some obstacle in planning path, then the LGVF + TLCGVF method is used to plan path, as shown in Fig. 15. It is obvious that the obstacles have influence on the initial path. In order to eliminate influence and avoid obstacles, TLCGVF revised the initial path of UAV through the velocity modulation matrix. Besides, when dynamic threat exists in the planning space, the relative TLCGVF is determined by introducing the motion information of threat into formula (31).
As shown in Fig. 16, where the D Ii , I ∈ N , i ∈ M illustrates the distances between each UAV and each entry point of obstacles, such as D 11 , D 12 etc; r Ii o , I ∈ N , i ∈ M is the radius of obstacle i at height Z I . Note that the radius of the conical and cylindrical obstacles varies with the Z I ever changing. It is obvious that all the distance D Ii and D tI are bigger than danger distance r o , meaning that the UAVs will avoid obstacle and threat successfully. As we see, TLCGVF has good property of obstacle avoidance. Fig. 17 shows that the spacing of UAVs satisfies the spacing constraints, namely d min < d 12 < d max . UAVs will inevitably fly away from the limit cycle as the obstacle avoidance behavior occurs. But UAVs will transit to tracking motion once they have avoided obstacles safely. Therefore, the tasks of target tracking and obstacle avoidance are well performed simultaneously.

D. ROLLING OPTIMIZATION STRATEGY
A complex environment is designed in Fig. 18, and Fig. 19. Some obstacles are built randomly in this environment. One cylinder moving threat with radius 350m moves as follows: x = 1400 + 300 sin(0.055t), y = 2.5t and z = 0. The target moves the motion model: x = 5000 cos(0.00392t), y = 5000 sin(0.00392t) and z = 200 sin(0.00785t), t ∈ [1, 400]. Two UAVs will perform the mission with the start point (-500, 500, 1000)m and (-500, 500, 800)m. Fig. 18 illustrates the path under the one-step planning strategy via LGVF + TLCGVF, which means that only the current environmental information is considered without considering the future motion of target or threat. Therefore some drastic changes of flight angle exist in the path compare to Fig.19. When the rolling optimization strategy is utilized, all future motion of target or threat will be full considered, and many waypoints of UAVs are found over the horizon [k, k + Q]. These waypoints are generated at every time instant k by arbitrarily adjusting the values of the reactive parameters. The process of path planning is finding the flyable waypoints and connecting them to form the path. Of the paths in this selection, the local flyable path minimizing an appropriate cost function is chosen for us, this path can avoid this obstacle area easily and smoothly when UAV tracks the target, as shown in Fig.19. At the next time step, the calculations are repeated for the new UAV state.  Under different Q (Q = 1, 2, 3, 4, 5), Table 3 lists UAV path state variables. The distance between UAVs and obstacles or threats is always positive. When the one-step strategy is used, the average planning time T s is very short (0.0156s). However, D t2 is too small with the one-step strategy, which means the UAV 2 is very close to one of the obstacles. Although the T s increase significantly to 0.507s when Q = 5, it is still smaller than the flight time ( t =1s). If Q is too large, such as Q = 5, then the respective range ofψ and θ maybe larger than others. There is a reasonable value of Q, such as Q = 3 or 4, whose quality is much better than the one-step. The former has a better path quality compared to the performances with Q = 3 or Q = 4.

VII. CONCLUSION
This paper investigates a new methodology based on hierarchical collaboration for UAVs target tracking and collision avoidance in complex environments. This method enables us to obtain multiple guidance vector fields, called LGVF and TLCGVF, which are determined by decomposing UAVs kinematics and modulating the UAVs velocity components. The rolling optimization is then used to adjust the path. The proposed method has the advantages of tracking flying targets with vertical and horizontal speeds, avoiding complex obstacles and planning high-quality paths. Three simulation scenarios show the efficacy of the hybrid approach. In particular, the motion trajectory generated by the TLPGVF method takes into account the overlapping collision avoidance zones and moving threats with little computational effort. In the future, we will implement this approach on a real UAV platform.