UAV-BS Formation Control Method Based on Loose Coupling Structure

We propose a novel formation control method considering the challenges of formation keeping, unmanned aerial vehicle (UAV) control, and position adjustment in UAV Base Station (UAV-BS) formation control scenarios. The method is based on a loose coupling structure inspired by the traditional virtual structure method. Firstly, a type of new formation is designed for UAV-BS group. When the UAV-BS group keep a stable network, the centers of all UAV-BS moving trajectory, e.g., circular, are treated as virtual points to form a rigid body. When the UAV-BS group transforms between different formations, the real positions of the UAV-BS group are used to form a rigid body. Secondly, we redesign a trajectory tracking method for UAV-BS to control the flight direction. A flight direction controller is designed for UAV-BS, based on nonlinear guidance logic. According to the empirical model of error feedback, an error corrector is designed to control the position error between the UAV-BS and the virtual point. Simulation results show that the proposed algorithm can satisfactorily complete the formation and control of UA-BS. Besides, the algorithm can reduce the difficulty of formation control of UAV-BS and the requirements of formation control for computing power and network communication.


I. INTRODUCTION
Non-Terrestrial Networks (NTN) are regarded as an important direction of the next-generation communication system. The communication network based on UAV-BS has been widely used in rescue and disaster relief, major sports events and gatherings, military, and other occasions. However, most of the practical applications of building communication networks with UAV-BS only provide communication networks for small areas with a single UAV-BS. The relevant theoretical researches mainly concentrate on the location deployment and power distribution of UAV-BS, while the formation control methods of the UAV-BS group are less reported. However, the formation control method is essential to realize the dynamic adjustment of network structure and produce differentiated network services through the flexible mobility of UAV-BS in three-dimensional space.
The traditional formation control methods of UAV clusters mainly include: the leader follower-based method, The associate editor coordinating the review of this manuscript and approving it for publication was Halil Ersin Soken .
behavior-based method, consistency-based method, virtual structure-based method, and the graph theory-based method. In the leader-follower method, an UAV acts as the leader, the others play the role of followers. The leader is responsible for tracking a preset trajectory, the followers keep a relative motion trajectory to the leader. The essence of this strategy is to transform the formation control problem into the issue of error control in the classical control theory [1], [2], [3], [4], [5]. This formation control method can reduce computing and communication costs. But it also makes the formation stability depend on the state of the leader UAV, as a consequent, the anti-damage performance of the whole formation is poor. The behavior-based formation control algorithm is inspired by the behavior of biological groups. The algorithm defines several basic formation behaviors in advance, such as following, obstacle avoidance, and formation composition. And the final formation method is obtained by weighting these basic formation behaviors [6], [7], [8]. This method allows a single UAV to make more autonomous behavior decisions, so it can continuously maintain the stability of the formation even though some UAVs lose control. However, the flexibility and adaptability of formation are slightly insufficient in the framework of behavior-based formation control algorithm, this is because the UAVs generate control commands according to the preset information and trigger conditions,. In the consistency-based method, the state of an UAV is updated by referring with its neighboring UAVs. Compared with the two algorithms mentioned above, this algorithm has good flexibility and adaptability. However, the algorithm is relatively complex and has high requirements for communication channel capacity and communication delay. The formation control algorithm based on virtual structure takes the formation as a virtual rigid body [9], [10], [11], [12]. A virtual leader or geometric center is set in the formation, and the UAVs in the formation move according to the virtual leader or geometric center. Thus, the formation stability is independent to any UAV. The virtual structure-based method has a better anti-damage ability. But it still needs serious computing and communication consumption.
In addition, many researchers have also proposed numerous advanced UAV formation control algorithms, such as DQN based reinforcement learning method [13], Q-learning approach [14], nonlinear model predictive control (MPC) [15], Virtual Core in Improved Artificial Potential Field [16], Digraph [17]. Based on these mentioned algorithms, the hybrid methods which integrate different formation control are becoming popular. For example, Reference [18] combines the artificial potential field with the leader-follower formation control algorithm. Reference [19] combines the artificial potential field method with B-spline interpolation and proposes an improved synthetic possible field method. Reference [20] adopts six different metaheuristic algorithms to realize the tactical shape of UAV groups in the game to improve the rationality of UAV group formation in over-the-horizon combat and the probability of winning the war. Reference [21] combines particle swarm optimization algorithm with leader-follower method to minimize the absolute error in tracking and reduce the amplitude of control input to the system. Compared with any single control method, these integrated methods often perform better in the compactness and stability of formation. However, the above methods are always used in the formation control of UAVs. While in the case of the formation control of UAV-BS, we encounter many new problems, which mainly comes from four aspects: 1. In the UAV-BS formation, the position of each UAV base station changs in real-time, thus the relative position between multiple UAV-BSs is difficult to keep constant. Therefore, it needs a considerable price, such as calculation and communication costs, to maintain a compact formation structure. But these costs are unnecessary and unacceptable because they will seriously increase the power consumption of UAV-BS. 2. the previous formation control algorithms attach great importance to the formation maintenance, but the UAV-BS formation control pays more attention to the formation dynamic changes. For example, in scenarios such as rescue and disaster relief, large gatherings, and sports events, the UAV-BS formation needs to adjust its shape immediately according to the task requirements. 3. The UAV base stations are generally deployed at high altitude, a single UAV base station covers a broader range than the traditional ground base station. It means that UAV base stations are usually far away from each other [22]. Therefore, the collision problem between UAVs in the traditional sense is almost nonexistent in the formation control of UAV base stations. It is not necessary to consume too much caculation cost on collision detection and path planning problem. 4. The UAV base station are freely deployed in threedimensional space, and the UVA-BS needs to keep moving at a high speed. Therefore, on the premise of meeting the networking requirements, there are a large number of deployment methods at every moment.
If we continue to adopt the previous formation methods of UAV, the calculation efficiency will be reduced dramatically.
In order to realize the formation control of UAV-BS, we present a formation control algorithm based on a framework of virtual structure method, a nonlinear guidance logic and an error feedback model. The main contributions of this paper are summarized as follows: • Taking the virtual structure method as the basic framework, a UAV base station group formation control method is proposed.
• A flight direction controller of a UAV base station based on nonlinear guidance logic is designed. When the trajectory of a UAV base station is relatively smooth, such as the standard circular trajectory, we can complete the trajectory tracking with a small error only by relying on the flight direction controller.
• An error feedback empirical model is proposed. When the UAV base station flies in formation, the model works with the direction controller to track the desired path with minor errors to maintain the formation's stability.
The paper is organized as follows. In Section II, we presente the system models. In Section III, we illustrate the virtual structure based on loose coupling, direction controller based on nonlinear guidance logic, and error controller based on the error empirical feedback model. In Section IV, we present the simulation and numerical results. In Section V, we make the conclusion of the paper.

II. SYSTEM MODEL
In order to avoid frequent switching between different UAV-BSs, fixed wing UAV base stations are generally set to fly around a particular position, such as the geometric center of flight trajectory, to provide communication services for specific areas. Therefore, the UAV-BS can be divided into two states. The first is to provide communication services in VOLUME 10, 2022 a particular area, and the UAV-BS maintains a hovering flight state around a specific location. The second is to maneuver the UAV-BS to another mission area according to the needs of networking tasks. It is assumed that there are numbered fixedwing UAV-BSs. The typical process of UAV-BS formation control is shown in Figure 1:

A. THE STAGE OF STABLE NETWORKING
We assume that the formation of UAV-BS has been completed at T 0 , which is marked as S 0 . Each UAV-BS is responsible for providing communication services for users in a fixed area. At the same time, we assume that the UAV-BS hovers in the air, in which the center point of its trajectory is l 0 = (x 0 , y 0 , z 0 ), the radius is R 0 and the altitude is Z 0 . The instantaneous coordinates of UAV-BS u i at time t is l ui = (x ui , y ui , z ui ), which can be expressed as: where θ represents the included angle between UAV-BS and X axis at time t.
Since all UAV base stations move along a circular trajectory mentioned above, keeping the relative position between UAV base stations fixed is tricky. The virtual rigid body in the traditional virtual structure method is difficult to maintain in the UAV base station formation or needs to be maintained at a high cost. Therefore, in this working stage, we propose to construct a virtual rigid body based on the center of the motion trajectory of the UAV base station. When the relative distance between the center points of the UAV base station trajectory remains unchanged, the formation of the UAV base station group is considered stable. The mathematical expression is as follows: where d ui = l ui − l 0 represents the distance between the instantaneous position of the UAV-BS and the track center point, ε is an error threshold. R represents the preset trajectory radius of the UAV-BS. R i and R j represent the radius of the flight of the ith and jth UAV-BS respectively. The meaning of formula (2) is that the distance between the UAV base station and the trajectory center should be kept constant, and the distance between the two UAV base stations should be more than the sum of their respective trajectory radius. Very obviously, at this stage, there is a loose coupling relationship between the actual position of UAV-BS and virtual rigid body.

B. THE STAGE OF TRANSFERRING IN FORMATION
The instantaneous coordinate of UAV-BS u i at time t is l ui = (x ui , y ui , z ui ) and the instantaneous coordinate of UAV-BS u j at time t is l uj = x uj , y uj , z uj . In the process of transferring in formation, we hope that the formation of all UAV-BS is stable. We assume that the instantaneous coordinates and expected coordinates of the UAV-BS u i are respectively l ui = (x ui , y ui , z ui ), l ui = x ui , y ui , z ui . As is shown in Figure 2, u 1 , u 2 and u 3 represent the actual locations of the UAV-BS respectively. u 1 , u 2 and u 3 represent the expected locations of the UAV-BS respectively. We hope that l ui and l ui can remain unchanged as much as possible, i ∈ [1, N ]. In other words, this problem can be described as that we try to find a formation control method to minimize the total error between all UAV base stations and their desired position. Its mathematical expression can be expressed as follows:

C. THE STAGE OF ADJUSTING UAV-BS POSITION
It is assume that N UAV-BSs are performing networking tasks, and the location of UAV-BS i is represents the location matrix of UAV-BS. Due to the change of networking task, the deployment position of UAV-BS needs to be readjusted.
According to this assumption, the location adjustment of UAV-BS is to find a mapping relationship from L 1 to L 2 , that is: In order to find the optimal assignment scheme, C ij is defined as the cost of deploying ith the UAV-BS to the jth location, and 0-1 decision variable f ij is defined at the same time, f ij = 1 indicates that the ith UAV-BS is deployed to the jth location, otherwise,f ij = 0. Then, the cost of the assignment scheme of UAV-BS can be expressed as: where C ij is measured by many factors, such as time spent, energy consumed, stability, etc. This paper focuses on the analysis from the perspective of energy consumption of UAV-BS. The maintenance of UAV flight attitude is the main energy consumption of UAV-BS, and the location adjustment process of UAV base station can not provide communication services, so it can be regarded as ''invalid energy consumption''. Therefore, it is necessary to reduce this power consumption as much as possible. We mark the power consumption of UAV-BS at t is E (t). According to reference [23], when the UAV-BS keeps flying at a constant speed, the energy consumption of the UAV-BS is a constant. Then, during T , the energy consumption of UAV base station is: Therefore, the total flying distance of UAV-BS can be used to directly measure the power consumption of UAV-BS.  The optimal assignment scheme based on the principle of ''minimum invalid energy consumption'' can be expressed as: Subject: where, formula (7) indicates that the principle of assigning UAV-BS is to minimize the sum of adjustment paths of UAV-BSs, which is equivalent to the principle of minimizing additional power consumption. Limiting condition (8) indicates that each designated location can only be allocated one UAV-BS. Limiting condition (9) indicates that each UAV-BS can only be assigned to one mission area. Limiting condition (10) indicates that the UAV-BS has only two states relative to a mission area, that is, going to the area and not going to the area.

III. PROPOSED ALGORITHM A. METHOD OVERVIEW
The formation control method based on the loose structure proposed in this paper retains the basic framework of the traditional virtual structure formation control method. Still, many improvements have been made in the specific implementation. Firstly, when designing the virtual structure, we propose to take the geometric center of the motion trajectory of the UAV-BS as the virtual structure point. It can give the UAV-BS more degrees of freedom and reduce the communication and computing requirements of the UAV-BS. Secondly, based on the idea of nonlinear guidance logic, we design a direction controller to improve the tracking ability of the UAV-BS to curve trajectory. Finally, an error feedback empirical model is designed to enhance the compactness of the UAV-BS flying in formation. The overall flow of the algorithm is shown in Figure 3:  Figure 4: The location of UAV-BS doesn't strictly correspond to the virtual structure point in the stage of stable networking. It only maintains a relative distance of R, which belongs to a loose coupling relationship. In adjusting the formation position, it is restored to a typical virtual structure.

C. DIRECTION CONTROLLER BASED ON NONLINEAR GUIDANCE LOGIC
Nonlinear guidance logic is a guidance logic proposed by Sanghyuk Park, John Deyst in 2004 [24]. This logic performs very well when guiding UAV on curve track, and can effectively overcome the problems of excessive turning error and insufficient compact formation in traditional control methods [25], [26], so as to realize close tracking of curve track. The basic idea is shown in Figure 5: Where V represents the flight speed of UAV-BS, L 1 represents the distance between the UAV-BS and the track reference point, η represents the included angle between speed V and L 1 of UAV-BS. a represents the acceleration of UAV-BS in the vertical direction. According to reference [24], the value of a can be obtained in the following ways; It is defined that the sampling interval of UAV-BS control time is T , and the speed change of UAV-BS perpendicular to the flight direction in one sampling time period is V = T · a. If the initial speed of the UAV-BS in the vertical direction is V 0 = 0, then the vertical velocity V of UAV-BS after one sampling time period is At this moment, the flight direction of the UAV will deflect towards the direction close to the desired trajectory, and the deflection angle ϕ is: Obviously, when the flight trajectory of the UAV base station is a straight line, the ϕ will gradually converge to 0. When the flight path of UAV-BS is circular, ϕ will gradually converge to a constant value determined by equation (12). When the flight trajectory of UAV-BS is other curves, ϕ will gradually converge to the curvature of the curve.

D. ERROR CONTROLLER BASED ON ERROR EMPIRICAL FEEDBACK MODEL
Ideally, if all UAV-BSs move along the same trajectory with the same change rule, attitude, and speed, the stability of UAV-BS formation can be maintained only by using equation (12). However, due to the influence of UAV-BS performance, natural environment, and other factors, it is difficult for different UAV-BS to maintain a stable formation structure only through direction adjustment. Therefore, we also need an error controller to adjust the stability of UAV base station formation.
For convenience, the reference coordinate system of UAV-BS is established. The X axis of the reference coordinate system is consistent with the flight direction of UAV-BS, and the other directions are determined according to the righthand spiral criterion. It is assumed that the transformation matrix from inertial coordinate system to reference coordinate system is T trans , UAV-BS u i instantaneous position P in the inertial coordinate system is P ui = (x ui , y ui , z ui ), the corresponding instantaneous virtual point coordinate is P vi = (x vi , y vi , z vi ). Under the reference coordinate system, the corresponding coordinates are: P ui c = T trans · P ui P vi c = T trans · P vi (13) Under the reference coordinate system, the position error e between the actual position of the UAV-BS and the virtual reference point is: Assuming that the UAV-BS flies at a fixed altitude, dz = 0. The value of dy is closely related to the vertical acceleration and can be corrected by nonlinear guidance logic; The size of dx can be used as the main basis for the flight control feedback of UAV motion direction. Assuming that the horizontal acceleration and error dx are linear, the following empirical model is proposed: where, L has the same meaning as in equation (11), γ is a scale factor, which can be set according to the actual situation. Overall, the larger the γ value, the more sensitive the horizontal direction is to the error change, and the smaller the γ value, the more insensitive the horizontal direction is to the error change. When the expected path changes smoothly in the current period, a smaller γ value can be adopted, and when the expected path changes violently in the current period, a larger γ value can be adopted.  Table 1.

IV. SIMULATION RESULT
The coordinates of the UAV-BS mission area are shown in Table 2.
The definitions and values of other relevant parameters involved in this simulation are as follows:

B. SIMULATION RESULTS AND ANALYSIS 1) COMPLETE INITIAL FORMATION
We assume that six UAV base stations go to six areas to perform networking tasks according to the previous settings. As analyzed earlier, this is a typical assignment problem in operations research. The most commonly used solution is the Hungarian method for this kind of problem. Therefore, this paper also uses this method to complete the initial task assignment of UAV-BS. Firstly, according to the information in Table 1 and table 2, we can obtain the distance matrix D between the initial location and target location the equation can be derived, as shown at the bottom of next page.
Then, we perform a series of row and column transformations on matrix D, so that each row and each column appear 0 elements. Nextly, we try to find all independent 0 elements. If the number of independent 0 elements is the same as the number of matrix rows, set the matrix elements corresponding to these independent 0 elements to 1 and the rest to 0, then the solution corresponding to the matrix is the optimal solution. Otherwise, we perform row transformation and column transformation on the matrix again, and repeat the above steps until the number of independent 0 elements is the same as the number of rows of the matrix. According to the above steps, we can finally get the following result, which is shown in Table 4.
As has been analyzed earlier, due to the relatively sparse deployment of UAV-BSs, there is generally no collision problem between UAV base station. Therefore, it can be assumed that all UAV-BSs fly in a straight line from the starting point to the purpose in the process of adjusting the formation. Without losing generality, we illustrate the position adjustment process with one of the UAV-BSs. Firstly, it is assumed that the UAV-BSs fly according to the circular trajectory with radius r u at the initial position before completing the formation. When the destination and formation are determined according to the assignment algorithm, the UAV-BS goes to the destination along the straight-line trajectory, and then hovers around a center in the mission area to provide communication support services for VOLUME 10, 2022  users in their respective areas. For one of the UAV-BSs, the simulation results are shown in Figure 6: Most of the time, the actual flight trajectory of the UAV base station is very close to the desired course, especially in the stage of moving along the linear trajectory, even to the extent that it is impossible to distinguish them (See Figure 5 (d) for details). At the same time, as shown in Figure 5 (b) and (c), when the desired trajectory of the UAV base station changes significantly, the trajectory tracking error of the UAV base station changes significantly. To further illustrate the change of trajectory tracking error of UAV-BS, we draw the changing trend of trajectory error, as shown in Figure 7.
As can be seen from the above figure, the tracking error of the UAV-BS includes three stable tracking stages and two short change periods. The three steady tracking stages correspond to two circular and linear motion stages, respectively. These two rapidly changing regions correspond    to the change of the desired trajectory. The trend in tracking error is in complete agreement with the conclusions we have analyzed above. It happens because we have introduced nonlinear guidance logic. Hence, the flight direction of the UAV base station always has a dynamic acceleration, which is ultimately used to affect the flight direction of the UAV and the base station. The dynamic trend of vertical acceleration in UAV-BS is shown in Figure 8.
By combining Figure 7 and Figure 8, it is easy to conclude that the vertical acceleration of the UAV-BS shows the same trend as the tracking error. To further illustrate the relationship between tracking error and vertical acceleration, we count the mean value of tracking error and vertical acceleration in each motion stage of UAV-BS. The statistical results are shown in Table 5.
Where,E M tra represents the mean value of tracking error and A M ver represents the mean value of vertical acceleration.

2) ADJUST THE POSITION OF UAV-BS
It is assumed that the UAV-BS still presents a hexagonal formation, and the parameters and relative positions of We arbitrarily select two UAV base stations as the analysis object without losing generality. The simulation results are shown in Figure 9.
As shown in the figure above, the blue line in the middle represents the desired trajectory of the UAV-BS group, and the other two curves represent the tracking curves of the two UAV base stations. It can be seen that the tracking trajectory of UAV-BS is very consistent with the trajectory change trend of group formation, which shows the excellent tracking performance of the algorithm. The simulation process in the figure above can be divided into two stages: the first VOLUME 10, 2022  stage is that the UAV base station flies around a central point, and the trajectory can be well maintained only by relying on nonlinear guidance logic. The second stage is that the UAV-BS group moves in formation. To maintain the stability and compactness of a UAV-BS formation, a nonlinear guidance strategy and error feedback mechanism must be adopted simultaneously. The previous content of this paper has analyzed the tracking error in the first stage and proved that the tracking error could be controlled within an acceptable range only by relying on the direction controller based on nonlinear guidance logic. Therefore, this section focuses on analyzing the tracking error in the second stage. To explain the function of the error controller based on the error feedback empirical model proposed in this paper in  more detail, we draw the relative distance error between two UAV-BSs and the absolute position error of a single UAV-BS. The results are shown in Figure 10.
It is not difficult to draw such a conclusion. If only relying on the direction controller based on nonlinear guidance logic, the UAV base station will have a relatively large tracking error. However, when the direction controller based on nonlinear guidance logic and the error controller based on empirical error feedback model are introduced simultaneously, the tracking error of the UAV base station shows an apparent downward trend.
Under the dual action of the direction and error controllers, the UAV base station can generate the adjustment force in two directions in real time according to the error feedback value in the track tracking process. The adjustment in the vertical direction is the control of the direction of the UAV base station, as shown in Figure 11. The adjustment of the flight direction of the UAV base station is directly reflected in the change of the flight acceleration of the UAV, As shown in Figure 12.

V. CONCLUSION
In this paper, we summarize the particularity of UAV base station formation control and then propose a UAV base station formation strategy based on loose coupling according to the characteristics of UAV-BS formation control. We design a direction controller based on nonlinear guidance logic and a position error controller based on the error empirical feedback model. The simulation shows that when the UAV base station is in the stable networking stage, the formation control of the UAV base station can be completed only by relying on the direction controller based on the idea of nonlinear guidance logic. When the UAV base station transfers in the formation state, the formation control of the UAV base station can also be well completed under the cooperation of the direction controller based on nonlinear guidance logic and the error controller based on the error feedback empirical model.