Research on obstacle avoidance technology of fixed wing formation based on improved artificial potential field method with stereo vision

To solve the problem that distributed fixed wing formation cannot know all the other aircraft states through the ground station and may collide, the improved artificial potential field method based on binocular stereo vision was proposed. This method makes the fixed wing aircraft not need to obtain the position information of other fixed wing aircraft from the ground station, but only need the binocular stereo vision module to obtain the relative position and relative speed information of other fixed wing aircraft. These two parameters are used to improve the traditional artificial potential field method to meet the requirements of distributed fixed wing formation flight. The experimental results show that the improved artificial potential field method improves the safety and reliability of distributed fixed wing formation flying.


Introduction
With the development of artificial intelligence technology, intelligent UAV cluster cooperation to complete complex tasks has become a research hotspot. The traditional UAV cluster mainly adopts the centralized control method. A single UAV can obtain the information of other UAVs to avoid collision. However, when GPS information is abnormal or the central controller fails, it may lead to a collision accident in formation flight [1].
In order to solve the pain point of centralized control, distributed control is proposed as a UAV cluster control algorithm. In the distributed control method, a single UAV only needs to sense the status of other UAVs around it, and make self-adjustment according to other UAVs, without sharing information, making it more flexible [2]. So how to realize the environmental perception and obstacle avoidance of a single UAV has become an urgent problem to be solved.
At present, the main obstacle avoidance measurement methods are: ultrasonic measurement, 3D lidar survey, monocular vision detection and binocular vision detection. The feasibility of these methods is discussed respectively in the application scenario of obstacle avoidance of distributed fixed wing formation. First of all, the ultrasonic sensor can only provide two-dimensional single point information, and in the complex air flow conditions at high altitude, the acoustic wave is easy to be interfered, and the measurement accuracy is not high. 3D lidar can provide accurate 3D information of obstacles, but it is bulky and expensive, which increases the load of aircraft and is not suitable for engineering application. Secondly, monocular vision detection needs to estimate the distance according to the size of the target in the image, so the accuracy is not high [3]. And there are some problems, such as small field angle, small range of avoidable obstacle and so on. These common methods of obstacle avoidance are not suitable for distributed fixed wing formation. Therefore, in order to ensure the accuracy and meet the engineering application conditions, we choose to use binocular camera. It uses parallax to calculate distance, and its precision is higher than monocular camera. Moreover, the binocular camera is relatively small in size and moderate in price, which is suitable for UAV formation flying application scenarios.
In the selection of obstacle avoidance algorithm, artificial potential field method does not need global information and is suitable for distributed cluster control. At the same time, because of its simple structure, high calculation efficiency and convenience for the realtime control of the bottom layer, the artificial potential field method is selected in this paper [4][5][6]. However, due to the fast speed of fixed wing and the minimum turning radius constraint, the traditional artificial potential field method cannot meet the obstacle avoidance requirements and needs to be improved.
Based on the above analysis, this paper proposes an improved artificial potential field method which combines stereo vision with deep learning to realize the UAV's perception of the environment and obstacle avoidance. The second section introduces how to use binocular vision module to obtain the obstacle information, the third section introduces how to use the obstacle information to improve the artificial potential field method, and the fourth part has carried on the simulation verification test [7][8].

Obstacle information extraction based on stereo vision
By using binocular camera to recognize obstacles, the pixel coordinates of the ROI can be obtained. By combining the pixel coordinates with the 3D point cloud, the 3D space coordinates of the obstacle camera coordinate system can be obtained [10]. The specific implementation steps are as follows: 1. By using the Yolo detection algorithm, real-time detection is carried out on the picture taken by the left eye camera, and the pixel coordinates and types of obstacles in front of the UAV are obtained [9].
4. The relative velocity vector can be calculated by comparing the relative positions of obstacles in the front and back frames po v .

3.1Traditional artificial potential field method
Khatib proposed the artificial potential field method based on virtual force method in 1986, which is a local obstacle avoidance algorithm [10]. The force field of UAV is as follows: Ts (l,t) = Tg (l,t) Suppose that the position of fixed wing aircraft in space is p , the position of target point is q , and the force field function is as follows:

Gravitational force field function
The gravitational field function and gravity of the aircraft are as follows: Artificial potential field method does not need global information and is suitable for distributed cluster control. But it also has the following disadvantages: 1. Unable to reach target when the gravity is small and the repulsion is large. 2. Fall into local optimum when repulsion and gravitation are equal, and the direction is opposite, which may lead to the continuous positive vibration. 3. The traditional artificial potential field method only considers the distance factor, but the fixed wing needs to increase the speed factor because of the restriction of its high speed and minimum turning radius, so the traditional method needs to be improved.

Improved artificial potential field method
For the obstacle avoidance problem of fixed wing formation, it is not easy to theorize due to too many factors that need to be considered in practice. Therefore, the following reasonable assumptions are made: 1. It is assumed that the fixed wing formation is always flying at the same altitude. Because there is no collision problem in different altitude flight, it is not discussed in this paper. 2. Obstacles are divided into static obstacles and dynamic obstacles. Static obstacles include no fly zones, buildings, etc. the location of such obstacles is known. Moving obstacles are other aircraft in the formation. 3. The relative position and speed of moving obstacles relative to the machine are measured by binocular stereo vision module.

Improved gravitational force field function
is the unit vector of the position of the target point relative to the UAV p .

Improved repulsive force field function
The relative velocity of obstacles and UAVs is introduced into the repulsive force field function according to the direct flight characteristics of fixed wing aircraft and the minimum turning radius constraint. The component poz v of the relative velocity po v in the z-axis direction is used as the judgment basis. Only when 0 poz v < , the effect of relative where, 1 ξ , 2 ξ is the repulsion coefficient and 0 ρ is the influence range of obstacles.
Among them: pro X is the unit vector of the position of UAV p relative to obstacle o .If the repulsion force provided by the speed parameter is increased, the buffer time is provided, so that the fixed wing can move away slowly, avoiding large angle maneuver. This improvement meets the requirements of fixed wing flight, and can solve the problems of local optimum and target unreachable.

Simulation results and analysis
Simulation is used to verify the improved artificial potential field method. The simulation environment is Matlab 2017A under Windows 10 operating system. Take two fixed wing aircraft as an example, in which fixed wing aircraft A starts from point S to point E, and on the way, it needs to avoid two static obstacles and another fixed wing aircraft B flying in a straight line. The purpose of simulation is to verify that the improved method can meet the flight requirements of fixed wing formation by comparing the former method with the latter one.  As shown in the Fig.2, when fixed wing A passes through the second static obstacle, there is a movement track of large maneuver turning, which does not conform to the flight characteristics of fixed wing aircraft. At the same time, the distance curve in Fig. 3 shows high frequency oscillation, which indicates that the speed of aircraft A changes rapidly, not only increases energy consumption but also is not conducive to flight safety. In order to solve these problems, the artificial potential field method is improved, and the velocity variable is introduced into the force field function. The simulation diagram is as follows. As shown in the Fig. 4, the improved artificial potential field method can ensure the safety of the fixed wing aircraft without changing the course in large maneuver. From Fig.  5, it can be seen that fixed wing A enters into the influence range of B at high speed. Due to the consideration of the influence of speed, it will suffer a lot of repulsion force, so that it quickly stays out of the influence range. At the same time, the speed of fixed wing A will not fluctuate at high frequency, which will reduce the impact on the performance of fixed wing a and reduce the energy consumption.

Conclusion
In this paper, for the application of distributed fixed wing formation, binocular stereo vision is used to obtain the relative position information and relative speed information of other aircraft around, and the relative speed is used as a parameter to improve the force field function. The experimental results show that the improved artificial potential field method can meet the flight characteristics of the fixed wing and prevent the aircraft from turning at a large angle. At the same time, the addition of velocity component ensures the safety of flight and reduces the high frequency oscillation.