Study on Composing Dense Formations in a Dynamic Environment of Multirotor UAVs by Distributed Control

In order to make multirotor unmanned aerial vehicles (UAV) compose a desired dense formation and improve the practicality of UAV formation, a distributed algorithm based on fuzzy logic was proposed. The airflow created by multirotor UAVs was analyzed according to the structure of themultirotor UAV and the characteristic equation of the fluid.This paper presented a dynamic model for the process of formation of and path search algorithm based on this model. The membership function in this model combines the factors of position, flow field, and movement. Integrating the dynamic model and its desired position in formations, each UAV evaluates the surrounding points and then selects the direction for step motion. Through simulation, this algorithm was improved by a by-step formation approach, and the effectiveness of this method in dense formation of multirotor UAVs was proved.


Introduction
1.1.Development Status.The improvement of communication abilities and the distributed systems have led researchers to pay increasing attention to multiagent systems [1,2].Among them, the control of movement and fuzzy control methods have also been widely applied in the multiagent field [3,4].At the same time, in recent years, a wide range of applications of unmanned aerial vehicles (UAVs) flying in formation has emerged in both the military and civilian environments.Compared with a single UAV, a UAV system, especially a distributed multiagent UAV system, has many obvious advantages [5,6].And for multirotor UAVs, owing to its advantages of simple control and hovering flight, it has an irreplaceable role in application [7].
However, research on distributed control drones is often used in fixed-wing drones to study how to make the formation well maintained in high-speed movement and achieve rapid convergence after avoiding obstacles [8][9][10]; and multirotor UAV formations often use centralized control to plan flight routes in advance according to the expected formation.It is the high-precision positioning based on visual and advanced communication technologies that often determines the formation complexity and completion [11,12].For example, at the 2018 Winter Olympic Games, a number of multirotor UAVs are designed to carry out light show.The show used many small multirotor UAVs according to show needs.The smaller volume of UAV makes it easier to avoid collisions, and the lighter weight reduces the effects of the drone flow field.It is precisely positioned by high-precision GPS, using the ground station to plan the route of each UAV.The related technology has been well verified in the show, but the following points need to be considered in order to make multirotor UAVs become real agents for formation.

Influence of Flow Field.
Unlike fixed-wing drones and other intelligent robots, multirotor drones rely on the rotation of rotors to generate power, which will generate powerful airflow.Especially for drones those weights are not so light; strong airflow will be generated, affecting the flight safety of other drones.In applications, the space between drones is maintained at a sufficiently large safe distance.And if we want to reduce the spacing as much as possible, it is necessary to consider the effect of flow field according to the characteristics of the UAV.In addition, the improvement of control technology provides technical support for further narrowing the safety distance, while reducing the distance between drones can enhance the performance of UAV formations.Therefore, the impact of airflow determines the minimum distance when carrying out dense formation.

Limitations of Control Methods.
Although the centralized control of the UAV can easily achieve the collaborative flight, however, in practice, there are many limitations in this way.Without the control of the base station, UAVs will lose control.The route must be planned in advance and cannot be controlled in real time.And, with the increase in the number of drones, as well as the increase in algorithm speed and computational complexity, control bottlenecks will be encountered.
Distributed control can get rid of these restrictions in application and make multirotor UAVs into true intelligent agents.In recent years, the intelligent agent system based on distributed control has been rapidly developed.Various types of robot formation technology had gradually improved [13].The behavior-based approach is widely used in distributed control.This approach is based on the correspondence between purpose and action.Its input can be a signal collected by a sensor or an output of other behaviors in the system.Accordingly, its output is either the action of the UAV or input consisting of other behaviors.This method is effective for cluster control.However, mathematical quantitative description and analysis are difficult using this approach [14,15].

Method of Movement.
The multirotor UAV has the characteristic of simple and flexible control and high degree of freedom of movement, making it similar to the intelligent robot [16].Many methods for ground-based smart robots can be used for multirotor drones.However, the multirotor UAV movement is performed in a three-dimensional space and can complete the motion combined every degrees of motion, making the control method of the smart robot unable to be used directly in multirotor drones.
Regarding problems mentioned above, this paper analyzed the characteristics of flow field of multi-rotor UAVs.According to the characteristics of multirotor UAV, designed membership functions in fuzzy logic, and a distributed formation algorithm were proposed.The remainder of this paper is organized as follows: the influence of multirotor UAV flow field is introduced in Section 2. The distributed formation algorithm for multirotor UAV is presented in Section 3. Section 4 presents the simulation results.Finally, Section 5 concludes the paper and discusses future work.

Influence of Multirotor UAV Flow Field
2.1.Theory of Flow Field Simulation.CFD (Computational Fluid Dynamics) simulation is a common method of analyzing flow fields.Using finite element analysis method; the continuous fluids is discretized.This method first uses the fluid conservation equation to describe the discrete fluids mathematically, forming a large algebraic equation group, and then choose the transport equation to close the system of equations and calculate it on a computer [17,18].The fluid conservation equation is expressed as follows: where  is the density;  is the flow velocity;  is the fluid viscosity; Γ, 0 is constant; S is the original item.
This paper selects the S-A model; the transport equation is a function of the turbulent kinetic energy k: where   ,   are empirical constant.  is turbulent viscosity.

Flow Field When
Hovering.Take the model in Figure 1 as an example.When hovering, the UAV weights are equal to the lift force generated by the rotor.Therefore, the pressure between the rotating circular surfaces of each rotor is where R is the radius of the rotor and  is the weight of the drone.
By pressure equivalent replacement method, we can get the flow field when hovering, as shown in Figure 2. The color represents the flow rate, and the arrows in the figure indicate the direction of the airflow.

Flow Field When Moving. When flying, multirotor
UAV pitch angle changes coupling.The component of lift in the horizontal direction is equal to the air resistance.The air resistance received is the integral of air pressure on the surface of the drone.Through the simulation, we can get pitch angles at different flight speeds.
V ∝  = ∫ d (8) Figure 1: Model of multirotor UAV selected for analysis.where  is the UAV surface,  is the pitch angle, and V is the moving speed.
In this way, we can get the flow field of UAV when moving, as shown in Figure 3.

Summary of Multirotor UAV Flow Field Characteristics.
It can be seen from the simulation results that, in the horizontal direction, the disturbed area is approximately circular due to the symmetrical shape of the multirotor UAV structure.The radius of the disturbed area is slightly larger than the drone radius.In the vertical direction, the disturbed area of the flow field is mainly located below the UAV.Overall, the area is approximately cylindrical.The intensity of interference decreases with the distance to the UAV increase.The tilt of the cylindrical air flow is opposite to that of the drone's movement, approximately perpendicular to the plane of the fuselage.Due to the speed limitation when carrying out dense formation, the tilt angle is generally not greater than 10 degrees.In addition, the drone itself has a certain degree of ability to resist wind, and it can resist the interference of airflow with a certain intensity.Therefore, the airflow generated by a multirotor UAV primarily affects the area below it; the direction is slightly inclined according to the direction of flight.And the horizontal spacing can be significantly less than the vertical spacing.

Distributed Formation Algorithm for Multirotor UAV Based on the Concept of Fuzzy
According to the needs of distributed formations, this paper adopts a behavior-based control approach.Each drone performs calculations based on the information it receives and chooses behaviors.The multirotor UAV can move to all directions because of its control features.The output can be set to the step motion in one of the directions to neighbor point.

Membership Function in Two-Dimensional Space.
In a dynamic environment, the drones have different motion states.Therefore, it is necessary to introduce fuzzy concepts to express this uncertainty [19,20].The position and motion state of each drone and the flow field can be expressed in fuzzy sets.The membership function of the multiagent fuzzy control on the two-dimensional plane is often set as a continuous convex function.The function  1 is a function of the coordinate point on plane.It represents the degree of membership of an agent at point (x c , y c ) to the current coordinate point.It takes the maximum value at the center of the agent and decreases as the distance to the agent increases.Due to the uncertainty in the dynamic environment, the influence of areas outside a certain distance is difficult to determine, so it is set to 0. At the same time, it can reduce the computational complexity and reduce unnecessary computational spend.So, the membership function can be set to where x c =0 and y c =0; the function image is as shown in Figure 4.  1 is the effective radius of the membership function.
For moving objects, the membership function should include the speed of motion.The membership function can be set to the following form: This formula introducing function ,  in this function represents the velocity vector of the object, and  is the vector from the current point (x, y) to the center of the object (x c , y c ).  can be set to where a is  constant and 0 ≤  ≤ 1 and  is the angle between  and .The image is shown in Figure 5.It can be seen that by add function , the attenuation of the value of the membership function slows down in the area that is consistent with the direction of motion of the object, whereas the attenuation is faster in the area of opposite direction.Although the environment is dynamic, the environment is changing gradually, so, in the next moment, the direction of movement is not usually so different from the current direction of movement.Therefore, this membership function can reflect the expectations for the next moment.

Membership Function of Multirotor UAV and Its
Flow Field in Three-Dimensional Space.Refer to the twodimensional membership function; the membership function in three-dimensional space is a function of the points in space.According to the above analysis, the membership function when the multi-rotor drone hovering should have the following characteristics: (1) At the drone center, the membership function takes the maximum value (2) When hovering, the central axis of the air flow is directly below the drone, perpendicular to the ground (3) At the same height level, the function value decreases as the distance to the intermediate axis increases (4) When at different height levels, as the height difference to the drone increases, the function value gradually decays.After many comparisons, the attenuation coefficient is set to the cube of height difference, which can reflect the actual flow field conditions well.
So the membership function can be set to where  is the length of the cylindrical area affected by the flow field.When x c =y c =z c =0, the function image is as shown in Figure 6.
The graph represents the value of the function by color and evenly selects the slice for observation.As can be seen in the figure, the value of the membership function can express the degree of threat posed by the drone and the flow field approximately.
For a moving drone, the area affected by the flow field will be skewed.According to geometric relations, the membership function can be set to where  is the pitch angle of the drone, as is shown in Figure 7.
With reference to the two-dimensional membership function, the attenuation of the function in the direction of motion can be reduced, and this can optimize the dynamic characteristics of the model.We can also introduce the function ; the membership function can be changed to: The function image is shown in Figure 8. Through improvement, the value of the region where the membership function takes a large value shifts toward the direction of speed, reflecting the prediction of the next moment.

Membership Functions of Position Points in Formations.
In addition, in order to let the drone move to its own position in the formation, target location needs to attract its drone.The closer the distance to the target is, the more favorable it will be to form a formation.Set function  2 as the target attraction function, expressing the degree of beneficial formation: In the formula, (x t ,y t ,z t ) is the coordinates of the target point;  2 is the radius of the flying range that forms the formation.

Action Decision.
The local search method is used in this paper.Each drone selects the direction of movement only by analyzing the conditions in its surrounding area.The analysis of the surrounding environment has mainly two aspects: the likelihood of a collision and whether it is conducive to achieving desired formation.After considering these two factors find the point with the highest evaluation around and move to this point.In this article, the evaluation function is set to: where A and B are a constant and the value is positive;  is the adjacent coordinates point of the UAV's current coordinates;  1, is the value of the membership function of UAV .The first item in the equation indicates the target's attraction to the coordinate point, and the latter item indicates the effect of other drones on this point.At this time, the best action can be selected to move a certain step to the point which has the highest value.Through local search, the evaluation values of the surrounding coordinate points are calculated and the direction is selected.In practical applications, the formation usually uses the same kind of drone.Assuming drones have the same motion characteristics and step speeds.

Simulation.
In this paper, we set the triangular formation as the desired formation.Set the initial position of the UAV randomly and then carry out the formation.We repeat 50 tests and statistical simulation results.Table 1 shows the results and the time steps when the number of drones is 3, 5, and 7, respectively.
From the simulation results and process, it is found that when the number of drones is small, the success rate is high.But when the number of drones increases, success rate is not high and often falls into a local minimum due to the limitation of local information.Since the range of membership functions is larger than the real size of the drone, when the formation is dense, each drone is limited by local information, and sometimes it is difficult to bypass the area affected by other drones, resulting in a local minimum point.
For ease of analysis, we define the cost function  as the total distance of all drones from the target point: Figures 10 and 11 show one of the situations where they fall into a local minimum.In the figure, the sphere represents the drone, and the lines of different colors indicate the flight routes of the drones.It can be seen that one drone is surrounded by the flow fields generated by several drones above and cannot move and falls into a local minimum.
In order to solve the problem of low success rate caused by local minimum, the by-step formation can be used, first to form the formation with the same structure, but a larger spacing between each other.As the membership function area remains the same, relatively sparse formations make formation easier.But at the same time, too large spacing   will increase the range of the entire drone group, which will cause difficulties for communication, and it will also increase the time for the formation to complete.Based on the above factors, when the distance is set to 2 to 3 times the minimum distance, the formation is well achieved.After that, reduce spacing to complete the desired dense formation.
One of the simulation results is shown in Figures 12 and  13.From the results of many simulations, it can be seen that, with this method, drones can increase the success rate of forming a dense formation with similar time consumption.In this way, the success rate of the formation can be greatly improved in the case of a large number of drones.The statistical results are shown in Table 2.

Conclusion and Future Work
This article designed a position-based formation method in dynamic environment and added the factor of speed.This method uses distributed control, using local search to reduce the computational complexity and taking into account the movement in three-dimensional space, collision avoidance, and the influence of the flow field.Through the above methods, dense formations of multirotor UAVs can  be achieved with a high success rate.And the process of the formation meets the common sense.At the same time, the parameters in this algorithm are difficult to set, especially when the number of drones changes; the optimal parameter settings in the algorithm will also change.In addition, further increasing the success rate of the formation requires the addition of more advanced sensing equipment and faster computing equipment.Therefore, the future work can find the optimal parameters autonomously through related methods such as machine learning and enhanced learning and try to sense more information to improve the performance of the formation.

3. 1 .
Selection of Input and Output.This article uses a pointbased formation method, that means, all drones have the same set of global coordinates.And in a dynamic environment, the three-dimensional coordinates of the drone can be provided with high-precision GPS.Taking into account multiple drones, point-to-point communication expense is too large.So we can use the blackboard to achieve communication.Drones broadcast their own coordinates and speeds, providing reference for other drones.With its own coordinates, these can be set as input to the formation control system.

4. 1 .Figure 9 .
Figure 9.Each drone acquires the coordinates and speed direction of other drones through the communication device.Through local search, the evaluation values of the surrounding coordinate points are calculated and the direction is selected.In practical applications, the formation usually uses the same kind of drone.Assuming drones have the same motion characteristics and step speeds.

Figure 4 :
Figure 4: Membership function of two-dimensional stationary object.

Figure 7 :Figure 8 :
Figure 7: Membership function of multirotor UAV when moving in three-dimensions.

Figure 13 :
Figure 13: Simulation results using by-step formation.

Table 2 :
Simulation result statistics using by-step formation.