Technical Field
The invention belongs to the technical field of multi-unmanned aerial vehicle cooperative target tracking, and particularly relates to a multi-unmanned aerial vehicle cooperative target tracking method for improving the combination of an APF (active power filter) and a segmented Bezier.
Technical Field
The multi-unmanned aerial vehicle cooperative target tracking means that multiple unmanned aerial vehicles cooperate to track a target and avoid obstacles in the tracking process, is one of research hotspots in the field of unmanned aerial vehicle cooperative cooperation, and has important application value in the military and civil fields.
Many methods for tracking the cooperative target of multiple unmanned aerial vehicles are available, and the methods can be mainly divided into two categories: the environment information is completely known and the environment information is unknown. The target tracking and obstacle avoidance methods with completely known environmental information comprise a free space method, a Dijkstra algorithm, an A-star algorithm and the like, and the methods are only suitable for target tracking and obstacle avoidance in a static environment because all information of the environment must be known in advance; the target tracking and obstacle avoidance method with unknown environmental information includes a navigation vector field, a D-algorithm (dynamic A-algorithm), an artificial potential field method and the like. The navigation vector field can keep observing the target in different directions and can keep consistent with the moving speed of the target, the method ensures that the threat of the target to the unmanned aerial vehicle is reduced while the target is continuously measured, but the method has the defects that the mechanism for joining and exiting the cluster of the UAVs is incomplete, and the condition of temporary exit or temporary joining of individual UAVs can exist. The algorithm D is a length-first algorithm, which can perform rerouting search using planned information, thereby improving efficiency of quadratic planning, but has disadvantages that a generated path is easily attached to an obstacle, and the planned path easily passes through the obstacle when the obstacle is relatively close to each other.
An Artificial Potential Field (APF) method is a virtual force method, and the basic idea is that an abstract potential force field is constructed, an unmanned aerial vehicle is influenced by the potential force field in the process of tracking a target, the target generates attractive force on the unmanned aerial vehicle, an obstacle generates repulsive force on the unmanned aerial vehicle, and the attractive force and the repulsive force are superposed to obtain a resultant force to control the unmanned aerial vehicle to move. The method is visual and small in calculation amount, is a dynamic path planning method, is widely applied to target tracking, and has the problems of easiness in falling into local optimization, path oscillation and the like.
Disclosure of Invention
The invention aims to provide a multi-unmanned aerial vehicle cooperative target tracking method for improving the combination of APF and segmented Bezier, which can enable a plurality of unmanned aerial vehicles to avoid obstacles and track to a target and ensure collision prevention between the unmanned aerial vehicles in the target tracking process.
In order to achieve the purpose, the invention adopts the following technical scheme:
a multi-unmanned aerial vehicle cooperative target tracking method for improving combination of APF and segmented Bezier comprises the following steps:
the first step, set up the environmental region size, unmanned aerial vehicle starting point position, unmanned aerial vehicle flight step length. And setting a gain coefficient comprising a target attraction gain k, an obstacle repulsion gain m and an unmanned aerial vehicle repulsion gain xi.
And secondly, detecting the position of the obstacle, the size of the obstacle and the target position by using the airborne camera and the laser radar.
Step three, judging whether J is larger than J (J is the total number of the unmanned aerial vehicles), if so, enabling J to be 1, and turning to the step four; if not, the fourth step is carried out.
Fourthly, the jth unmanned aerial vehicle is at t
kSensing the position of the obstacle and the target at any moment, acquiring the positions of other unmanned aerial vehicles, and calculating the gravity of the target currently suffered by the jth unmanned aerial vehicle
Magnitude of repulsive force of i-th obstacle
And the magnitude of repulsion of the z-th unmanned aerial vehicle
And finding the resultant force F
j。
The fifth step, judge the resultant force FjAnd if so, escaping from the local optimum by constructing a virtual obstacle method, otherwise, carrying out the sixth step.
Sixthly, calculating the position t of the jth unmanned aerial vehiclekThe flying angle at the moment is calculated by the flying step length of the jth unmanned aerial vehicle at tk+1=tkFlight waypoints at time + Δ t.
Seventhly, carrying out online smooth optimization on the flight track of the jth unmanned aerial vehicle by the segmented Bezier curve to obtain the jth unmanned aerial vehicle tk+1The waypoint at the time.
Eighthly, judging whether the jth unmanned aerial vehicle tracks the target, and if so, performing the ninth step; if not, j equals j +1, go to the second step.
Ninthly, judging whether the J unmanned aerial vehicles track the targets, and if so, finishing the multi-unmanned aerial vehicle cooperative target tracking; if not, j equals j +1, go to the second step.
The invention has the following advantages:
1. the unmanned aerial vehicle is used as a moving barrier, the reasonable definition of the self-repulsion potential field and repulsion of each unmanned aerial vehicle is given, and when the unmanned aerial vehicle flies to maneuver, the new repulsion prevents the unmanned aerial vehicle from frequently avoiding other unmanned aerial vehicles at large corners and slowly keeping away from other unmanned aerial vehicles; secondly, because the repulsion function has the continuity, avoided the phenomenon of the sharp turn of unmanned aerial vehicle that leads to because of repulsion jump change, effectively solved the problem of preventing bumping between many unmanned aerial vehicles.
2. When the APF algorithm is trapped in a local minimum, a virtual barrier is supposed to exist between the unmanned aerial vehicle and the target, and the unmanned aerial vehicle flies in the tangential direction of the circle influenced by the repulsion force of the virtual barrier, so that the local optimal problem of the APF algorithm is solved.
3. According to the invention, the segmented Bezier curve is adopted to carry out online smooth optimization on the planned path, the smoothness of the curve is ensured at the joint of the two segmented Bezier curves, the aircraft is prevented from making large-angle turning during flying, and the smooth airway not only does not have airway oscillation phenomenon, but also becomes smoother and smoother.
Description of the figures
FIG. 1 is a flow chart of the method of the present invention.
Fig. 2 is a schematic diagram of a local minimum of unmanned aerial vehicle escape improvement APF.
FIG. 3 is a schematic diagram of segmented Bezier curve route on-line smoothing.
Fig. 4 shows a conventional artificial potential field method for planning a multi-unmanned aerial vehicle cooperative target tracking route.
Fig. 5 shows the multi-unmanned aerial vehicle cooperative target tracking route planning by using the improved artificial potential field method.
FIG. 6 is a multi-UAV cooperative target tracking airway planning combining an improved artificial potential field method with a segmented Bezier.
Detailed Description
The technical scheme of the invention is specifically explained by combining the attached chart.
The invention discloses a multi-unmanned aerial vehicle cooperative target tracking method for improving combination of APF and segmented Bezier, which specifically comprises the following steps:
step 1, setting the size of an environment area, the starting point position of the unmanned aerial vehicle and the flight step length of the unmanned aerial vehicle. And setting a gain coefficient comprising a target attraction gain k, an obstacle repulsion gain m and an unmanned aerial vehicle repulsion gain xi.
And 2, detecting the position of the obstacle, the size of the obstacle and the target position by using the airborne camera and the laser radar.
Step 3, judging whether J is larger than J (J is the total number of the unmanned aerial vehicles), if so, changing J to 1, and turning to step 4; if not, go to step 4.
Step 4, the jth unmanned aerial vehicle is at t
kSense of timeAnd knowing the positions of the obstacles and the target, and acquiring the positions of other unmanned aerial vehicles. Calculate the jth unmanned plane at t
kTarget gravity of time
Ith obstacle repulsive force
And z-th unmanned aerial vehicle
And finding the resultant force F
j. The method specifically comprises the following steps:
(1) jth unmanned plane at t
kTarget gravity of time
Repulsive force with obstacle
The calculation formulas are respectively
Wherein q is a point in space,
representing the gravity generated by the target on the jth unmanned aerial vehicle,
and k is the gravity gain, and represents the distance from the jth unmanned aerial vehicle to the target a.
In the formula (I), the compound is shown in the specification,
represents the distance from the jth unmanned aerial vehicle to the obstacle r, m is the repulsive force gain, rho
0Is the maximum radius of influence of the obstacle.
(2) Repulsion force of z-th unmanned aerial vehicle to j-th unmanned aerial vehicle
Is calculated by the formula
In the formula, q is the position of the jth unmanned aerial vehicle,
indicating the distance from the jth unmanned plane to other unmanned planes; sigma
0The maximum influence radius of the repulsion field of the unmanned aerial vehicles is shown, wherein the maximum influence radius of the repulsion field of each unmanned aerial vehicle is the same; ξ denotes the drone repulsion gain.
(3) To obtain a resultant force Fj。
In the cooperative target tracking of the J-frame unmanned aerial vehicle, N barriers are in total, the J-th unmanned aerial vehicle is subjected to the repulsive force action of other J-1 unmanned aerial vehicles, so that the repulsive force borne by the unmanned aerial vehicle is the superposition of the N barriers and the repulsive force generated by other J-1 unmanned aerial vehicles, and the target generates the attractive force on the J-th unmanned aerial vehicle, so that the resultant force F isjIs calculated by the formula
In the formula (I), the compound is shown in the specification,
representing the attraction of the target to the jth drone,
indicating that the jth drone is subject to the repulsive force of the ith obstacle,
indicating that the jth drone is subject to the repulsive force of the zth drone.
Step 5, judging whether the resultant force F is generatedjAnd (4) if the APF is trapped in the local optimum, if so, escaping from the local optimum by constructing a virtual obstacle method, and turning to the step 6, otherwise, performing the step 6.
The method for constructing the virtual obstacle to escape from the local optimum comprises the following steps:
firstly, when the resultant force of the attraction force and the repulsion force borne by the unmanned aerial vehicle is zero, namely the attraction force and the resultant repulsion force are equal in magnitude and opposite in direction, but the attraction force is not zero, a virtual obstacle is supposed to exist between the unmanned aerial vehicle and the target, and the repulsion force generated by the virtual obstacle to the unmanned aerial vehicle is the resultant repulsion force of all the actual obstacles to the unmanned aerial vehicle at the moment, as shown in fig. 2;
secondly, the formula (2) is used for reverse deduction
To determine the specific location of the virtual obstacle, again within the range of repulsion of the virtual obstacle, p
0A circle with a radius;
and finally, determining that the flight direction of the unmanned aerial vehicle for escaping from the local optimum is along the tangential direction made to the circle, and the left tangent and the right tangent can be both.
Step 6, calculating the position t of the jth unmanned aerial vehiclekThe flying angle of the jth unmanned aerial vehicle is calculated by the flying step length of the jth unmanned aerial vehicle at the momentk+1=tkFlight waypoints at time + Δ t.
7, carrying out online smooth optimization on the flight track of the jth unmanned aerial vehicle by the segmented Bezier curve to obtain the jth unmanned aerial vehicle tk+1The waypoints at the moment specifically include:
let us assume at t0,t1,t2,t3The flying waypoints calculated by the potential field method at the moment are P0,P1,P2,P3,V1,V2,V3Are respectively a line segment P0P1,P1P2,P2P3As shown in fig. 3. Then by the control pointV1,P1,V2And V2,P2,V3The generated Bezier curve is at the connecting point V2Meets the conditions of continuity and smoothness. If the current time is t2At this moment, the unmanned plane is already pressed by V according to Bezier curve1Fly to V2Calculating the passing t by using an artificial potential field method3-t2Rear waypoint P3Along V2,P2,V3The generated Bezier curve flight is the navigation route of the next time period, and the process is circulated until t is obtainedk+1The waypoint at the time.
Step 8, judging whether the jth unmanned aerial vehicle tracks the target, and if so, performing step 9; if not, j equals j +1, go to step 2.
Step 9, judging whether the J unmanned aerial vehicles track the targets, if so, finishing the multi-unmanned aerial vehicle cooperative target tracking; if not, j equals j +1, go to step 2.
In order to verify the feasibility and effectiveness of the method, the invention is described in further detail below with reference to examples.
The simulation experiment is carried out on a computer with Intel Core i5-3210M, a main frequency 2.5GHz processor and a memory of 4GB, an operating system is Windows 10 and is realized by MATLAB2012 software. The simulated multi-unmanned aerial vehicle target tracking area is a 120km × 120km two-dimensional plane, assuming that the total number of unmanned aerial vehicles is J ═ 3, the three unmanned aerial vehicles are numbered as UAV1, UAV2 and UAV3, the starting positions of the three unmanned aerial vehicles are (50km, 0km), (8km, 0km) and (10km, 20km), 15 obstacles are distributed in the target tracking area according to the numbers 1-15, and specific parameters are shown in table 1.
Table 1 simulation parameter settings
The simulation experiment comprises three conditions of multi-unmanned aerial vehicle target tracking route planning based on traditional APF without increasing the repulsion field of the unmanned aerial vehicle, multi-unmanned aerial vehicle cooperative target tracking route planning based on improved APF with increasing the self repulsion field of the unmanned aerial vehicle and on-line smooth optimization of routes by combining an improved artificial potential field method with a segmented Bezier curve, and the effectiveness of the algorithm in multi-unmanned aerial vehicle cooperative target tracking is demonstrated.
Many unmanned aerial vehicle target tracking air route planning simulation result based on traditional APF that does not increase unmanned aerial vehicle repulsion field is shown as figure 4, and in the figure, 15 barriers number according to 1 ~ 15, and the size of barrier is represented to the interior circle of barrier, and unmanned aerial vehicle can not collide to it absolutely. The outer circle of the obstacle represents the influence range of the repulsive field of the obstacle, and the range is a circle with the radius of 10 km. The triangle represents the starting position of the drone. As can be seen from the air routes tracked by the targets of the three unmanned aerial vehicles, all the unmanned aerial vehicles avoid the obstacles and finally reach the target positions. However, the planning step lengths of the UAV1 and UAV2 set by the simulation parameters are 1km and 1.3km respectively, so the routes of the unmanned aerial vehicles UAV1 and UAV2 overlap between the obstacle 5 and the obstacle 6, and the two unmanned aerial vehicles collide in the area, so that the multi-unmanned aerial vehicle cooperative target tracking task fails.
The simulation result of the multi-unmanned aerial vehicle cooperative target tracking route planning based on the improved APF for increasing the self repulsive field of the unmanned aerial vehicle is shown in the figure 5. As is apparent from the figure, the routes of the UAV1 and the UAV2 generate route separation between the obstacle 5 and the obstacle 6, and no route overlapping phenomenon in fig. 4 occurs, which is caused by mutual repulsion between the drones, so that the problem of collision prevention between the drones in the cooperative target tracking process of multiple drones is solved. However, it is clear that when the drone is near an obstacle, severe oscillations of the route occur, which in practical situations are absolutely not allowed, whether from the point of view of the maneuvering characteristics of the plane, the energy consumption or the real-time tracking.
The simulation result of the online smooth optimization of the air route by combining the improved artificial potential field method with the segmented Bezier curve is shown in FIG. 6, so that the smooth optimization effect is obvious, and the path oscillation phenomenon is eliminated.