Disclosure of Invention
In view of the above problems and limitations of existing methods, and considering dynamic obstacles in unknown environments, the present invention provides a trajectory planning method for unmanned aerial vehicles capable of avoiding obstacle flight, which predicts the movement trend of obstacles and takes action in advance to avoid collision.
In order to achieve the purpose, the technical scheme of the invention is as follows: an unmanned aerial vehicle path planning method for predicting and improving an artificial potential field method based on the position of an obstacle in an unknown environment is characterized in that: the method comprises the following steps:
aiming at the condition that the unmanned aerial vehicle operates at a fixed height, establishing an unmanned aerial vehicle and a barrier model, and acquiring an influence radius L of a barrier;
establishing a Markov obstacle path prediction model according to the obstacle raster map, and further predicting an obstacle track;
and improving the traditional artificial potential field, and combining the predicted position of the obstacle to obtain the dynamic path planning of the unmanned aerial vehicle.
Further, an unmanned aerial vehicle and an obstacle model are established, and specifically:
regard unmanned aerial vehicle and barrier as a spheroid, then unmanned aerial vehicle spheroid is with unmanned aerial vehicle's geometric centre OUVAAs the origin, the longest length d of the unmanned aerial vehicle bodyUVAIs a diameter, then its radius is RUVA=dUVAAnd/2, correspondingly, the center of the sphere of the obstacle is OobsRadius Robs(ii) a Because the collision problem occurs on a plane, the sphere of the unmanned aerial vehicle becomes the sphere with the center of circle of O in a two-dimensional Cartesian plane coordinate systemUVARadius RUVAThe obstacle sphere becomes the center of a circle O in a two-dimensional Cartesian plane coordinate systemobsRadius RobsIs circular.
Further, when an obstacle is detected, the heading angle of the drone will be offset
Yaw with course angular offset speed of omega
The time taken for the angle is
Assume that the drone is at constant speed V
UAVFlying to target point, position P of unmanned aerial vehicle
UAVAnd the position P of the obstacle
obsThe connecting line is P
UAVP
obs(ii) a Unmanned aerial vehicle speed is at line P
UAVP
obsProjection on is V
ref_UAV(ii) a When unmanned aerial vehicle deflects
Then, the unmanned plane is in P
UAVP
obsHas a projection velocity V
ref_UAV_NEWAnd V is
ref_UAV_NEW<V
ref_UAV;
Unmanned plane is in
The flight distance in time is
Obtaining L ═ s + R
UAV+R
obsThis distance is considered to be the safe distance between the drone and the obstacle; when the drone and the obstacle face each other,
obtaining the maximum obstacle collision distance;
when the distance between the unmanned aerial vehicle and the obstacle is smaller than L, potential collision danger exists; when the distance is between 2L and L, no human can observe the obstacle; in addition, when the distance is less than L, the unmanned aerial vehicle starts to avoid obstacles; the radius of influence of the obstacle is set to L.
Further, according to the barrier grid map, a markov barrier path prediction model is established, specifically:
when the position of the obstacle is predicted, a two-dimensional Cartesian rectangular grid is adopted to represent the environment, namely the obstacle information measured by a sensor is mapped into an environment coordinate system;
in a grid environment coordinate system, the obstacle can fly to 9 flying course angles around the obstacle from the current position; setting that each time interval tau of the obstacle can only move 1 cell to the periphery of the obstacle, so that the width of w is the moving step length of the obstacle in a unit time tau, and the step length is the moving distance of the obstacle in a unit detection interval detected by the unmanned aerial vehicle; 9 course angles of the obstacle respectively correspond to 0 pi, pi/4, pi/2, 3 pi/4, pi, 5 pi/4, 3 pi/2, 7 pi/4 and the original position from 1 to 9;
the obstacle state is obtained by meshing the space, that is, the current position of the obstacle occupies one grid, and the other 9 directions, which the obstacle may move to, are respectively NW, N, NE, W, E, SW, S, SE and the original position, which respectively correspond to nine states, E1,…,Ei,…,E9.EiE, i is 1,2, 9; matrix PmIs the m-th order state transition matrix of the Markov chain, and utilizes the Chapman-Kolmogorov equation to obtain the recurrence relation:
Pm=P1P(m-1)=P(m-1)P1 (2.1)
Pm=(P1)m (2.2)
wherein N isijRepresenting the number of times the obstacle transitions from state i to j; the number of times of conversion is observed by unmanned aerial vehicle when unmanned aerial vehicle and barrier distance are between 2L and L.
Further, predicting the obstacle trajectory specifically includes: based on Markov chain, and through weighting mode, obtaining a predicted value of each position transfer:
X(t)=a1S(t-1)P1+…+amS(t-m)Pm+…+akS(t-k)Pk (2.5)
in the formula, t is the current detection interval, t-1 is the previous detection interval, and so on until the kth detection interval (t-k); x (t) is the probability of the next position predicted by the weighting formula, which is a 1 x 9 matrix, each element being the probability of the corresponding flight action; s (t-m), wherein m is more than or equal to 1 and less than or equal to k represents m detection interval unmanned aerial vehicle moving states; k is the maximum order in the prediction process;
a1,…,am,…,akthe weight values respectively represent the influence degrees of the first 1, …, m, … and k movements on the next movement, and are obtained by calculation by an autocorrelation coefficient determination method:
in the formula rmThe autocorrelation coefficient of the mth order is shown, and A (t) is the current action of the barrier; a (t-m) is epsilon { E1,E2,…,E9The action of the unmanned aerial vehicle at m time intervals before the current moment is multiplied; the autocorrelation coefficients need to be normalized by equation (2.7), i.e.:
m is the maximum order calculated according to the prediction requirement;
and (3) selecting the largest element in X (t), taking the direction grid corresponding to the position of the largest element as the predicted next moving direction, and adding the moving coordinate value corresponding to the predicted next moving direction and the current position of the obstacle to obtain the predicted position of the obstacle.
Furthermore, by combining the predicted position of the obstacle, the dynamic path plan of the unmanned aerial vehicle is obtained:
placing a virtual obstacle at a possible local minimum point by using obstacle position prediction, the new repulsion of the virtual obstacle to the drone being:
wherein the virtual obstacle is a particle without a radius and having a centroid Pmin;PcurrRepresenting a current location of the drone; d (p)curr,pmin) Is the distance between the current unmanned aerial vehicle and the virtual obstacle, d0Is the obstacle influence distance, beta is the repulsion coefficient; at the original repulsive force ∑ FrepAnd gravitational force Fattr_currIn addition, the drone will also be subjected to the repulsion force F of the new virtual obstaclerep virtual(ii) a As a result, the potential field in which the drone is located changes, which causes the drone to re-plan a path.
Furthermore, the traditional artificial potential field is improved, specifically: when the repulsion of the obstacle to the unmanned aerial vehicle at a certain navigation point is larger than the attraction of the target point, the repulsion of the obstacle to the unmanned aerial vehicle at the next navigation point is smaller than the attraction of the target point, and the two situations alternately cause track oscillation, the unmanned aerial vehicle attraction coefficient alpha is increased by lambda gradient increments alpha0Such that the attractive force of the target point is greater than the repulsive force of the obstacle; if it is just increased to a certain number of alpha0Then, the attraction force and the repulsion force are equal in magnitude, and the alpha is continuously increased0Determining lambda; temporary increment Δ α ═ λ α0At this time, the stress condition of the unmanned aerial vehicle is as shown in formula (3.2):
wherein Fatt(q) is the attraction force after the attraction force coefficient adjustment, d (q, q)goal) Is the distance between the drone and the target point. And Frep(q) is repulsion force borne by the unmanned aerial vehicle, the unmanned aerial vehicle keeps unchanged when the attraction force is increased, and d (q, q)obs) Is the distance between the drone and the obstacle, d0The obstacle influencing distance is L above.
Due to the adoption of the technical scheme, the invention can obtain the following technical effects: the invention provides an artificial potential field method based on Markov prediction, aiming at the problem that an unmanned aerial vehicle has poor hiding effect on a dynamic obstacle in an unknown environment. The unmanned aerial vehicle can obtain the position of the obstacle at the next moment by using Markov prediction according to the probability that the obstacle moves to all directions around the unmanned aerial vehicle by detecting and recording the movement information of the obstacle. On the basis, the unmanned aerial vehicle acts in advance to improve the safety of unmanned aerial vehicle path planning when adopting the artificial potential field to avoid the barrier, and aiming at the local minimum value of the traditional artificial potential field, the unmanned aerial vehicle can predict whether the unmanned aerial vehicle falls into the local minimum value under the condition that the position of the barrier is predicted, so that the unmanned aerial vehicle can avoid by adopting a method of taking a minimum value point as a virtual barrier. In addition, after the unmanned aerial vehicle is trapped in the local oscillation, the gravity coefficient is increased by adopting gradient to inhibit the sudden change of the gravity and the repulsion force, and the unmanned aerial vehicle is guided to escape from the local oscillation. The method can improve the effect of the artificial potential field method for avoiding dynamic obstacles, and avoids local minimum values generated by the artificial potential field method, so that the unmanned aerial vehicle can escape from local oscillation.
Figure illustrates the drawings
FIG. 1 is a flow chart of an implementation of the present invention;
FIG. 2 is a model diagram of obstacle effect, wherein a is a model diagram of obstacle effect according to the present invention, and b is a model diagram of most ideal obstacle effect;
FIG. 3 is a diagram of the attitude of the obstacle of the present invention;
FIG. 4 is an obstacle grid map of the present invention;
FIG. 5 is a schematic diagram of a local minimum principle;
FIG. 6 is a schematic diagram illustrating the local oscillation principle of a target point;
FIG. 7 is a chart of example parameters of the present invention;
FIG. 8 is a graph illustrating the effect of k-order Markov obstacle prediction in accordance with the present invention;
FIG. 9 is a schematic diagram of a conventional artificial potential field method path;
FIG. 10 is a schematic diagram of the HOPA path of the algorithm of the present invention;
FIG. 11 is a diagram of a conventional artificial potential field unmanned aerial vehicle trajectory;
FIG. 12 is a diagram of the algorithm HOPA unmanned aerial vehicle trajectory of the present invention;
FIG. 13 is an enlarged view of a conventional artificial potential field method for obstacle avoidance;
FIG. 14 is an enlarged view of the algorithm of the present invention avoiding an obstacle;
FIG. 15 is a schematic diagram of a local minimum principle of a conventional artificial potential field method;
FIG. 16 is a schematic diagram of the local minimum principle of the algorithm of the present invention;
FIG. 17 is a schematic diagram of a local oscillation principle of a conventional artificial potential field method;
FIG. 18 is an enlarged view of a local oscillation by a conventional artificial potential field method;
FIG. 19 is a schematic diagram illustrating a principle of solving local oscillation by an algorithm according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and the detailed description. The following examples are presented to enable one of ordinary skill in the art to more fully understand the present invention and are not intended to limit the scope of the embodiments described herein.
The embodiment provides an unmanned aerial vehicle path planning method for improving an artificial potential field method based on obstacle position prediction in an unknown environment, which comprises the following steps:
s1: aiming at the situation that the unmanned aerial vehicle works at a fixed height and static and dynamic obstacles exist in the environment, establishing an unmanned aerial vehicle and an obstacle model, and acquiring the influence radius of the obstacles;
in general, the flight speed of a drone with respect to a terrestrial coordinate system may be described as:
wherein (x, y, z) represents the position of the unmanned aerial vehicle in the terrestrial coordinate systemV denotes unmanned aerial vehicle speed, θ and
respectively representing the pitch angle and the pitch angle of the drone. In the specific embodiment of the invention, the flying speed of the unmanned aerial vehicle is set to be 5 m/s. The flying height of the unmanned aerial vehicle ranges between 70 and 500 meters. In such narrow flight spaces, the drone should try to avoid collisions by changing heading or speed, rather than altitude. The invention realizes collision avoidance by changing the course and the speed of the horizontal plane, so the pitch angle is 0. The obstacle avoidance problem is solved by using two-dimensional cartesian plane coordinates (x, y).
In most path planning algorithms, the unmanned aerial vehicle and the obstacle are considered as a particle to be calculated, so that the appearance conditions of the unmanned aerial vehicle and the obstacle are ignored, errors can be generated in the path planning process, collision is caused, and path planning failure is caused. In order to increase the safety of the unmanned aerial vehicle in the flight process, the unmanned aerial vehicle and the barrier are regarded as a sphere, and the sphere of the unmanned aerial vehicle takes the geometric center O of the unmanned aerial vehicleUVAAs the origin, the longest length d of the unmanned aerial vehicle bodyUVAIs a diameter, then its radius is RUVA=dUVAAnd/2, correspondingly, the center of the sphere of the obstacle is OobsRadius Robs. Because the collision problem researched by the invention occurs on a plane, a sphere representing the unmanned aerial vehicle is changed into a sphere with a circle center of O in a two-dimensional Cartesian plane coordinate systemUVARadius RUVAThe obstacle sphere becomes the center of a circle O in a two-dimensional Cartesian plane coordinate systemobsRadius RobsIs circular. In the embodiment of the invention, the radiuses of the unmanned aerial vehicle and the obstacle are both 0.5 m.
Unmanned aerial vehicle can avoid the barrier at the flight in-process. When the unmanned aerial vehicle detects the obstacle, the course angle of the unmanned aerial vehicle deviates to a certain extent when the unmanned aerial vehicle plans a path according to an artificial potential field method to avoid the obstacle
The unmanned plane is influenced by the physical performance of the unmanned plane and has course angular offset speed ofω and there is a maximum deflection angle
Even if the course angle required for avoiding the obstacle is given according to the artificial potential field method
Offset greater than
Can only follow
The offset is made to avoid obstacles, but danger may occur at this time. Deflection
The required time is
In the embodiment, the parameters of the UAV in the Xinjiang province are referred, the turning angle of the UAV is set to be +/-60 degrees, and the heading angle deviation speed is 150 degrees/s, so that the UAV in the Xinjiang province is used as the reference
It was 0.8 s.
The minimum safe distance of the unmanned aerial vehicle is Lmin=RUAV+RobsThe distance between the unmanned aerial vehicle and the center of the obstacle sphere is greater than LminThe flight path that can be tasked with the drone is safe.
Assume that the drone is at constant speed V
UAVAnd flying to the target point. Position P of unmanned aerial vehicle
UAVAnd the position P of the obstacle
obsThe connecting line is P
UAVP
obs. Unmanned aerial vehicle speed is at line P
UAVP
obsProjection on is V
ref_UAV. When unmanned aerial vehicle deflects
Then, the unmanned plane is in P
UAVP
obsHas a projection velocity V
ref_UAV_NEWAnd V is
ref_UAV_NEW<V
ref_UAVAs shown in fig. 2.
Unmanned plane is in
The flight distance in time is
In this inventive example s is calculated to be 4 m. Thus, L ═ s + R can be obtained
UAV+R
obsL is 5m, which is considered a safe distance between the drone and the obstacle. When the drone and the obstacle face each other,
the obstacle speed in this example simulation is also 5 m/s. Thus, s is 8m and L is 9m, the maximum obstacle collision distance can be obtained.
When the distance between the drone and the obstacle is less than L, there will be a potential risk of collision. When the distance is between 2L and L, the drone may observe the obstacle. In addition, when the distance is less than L, the drone begins to avoid obstacles. Because 2L > 2LminThis ensures the flight safety of the drone. In the present invention, the influence radius of the obstacle is set to L.
S2: establishing a Markov obstacle path prediction model according to the obstacle raster map, and further predicting an obstacle track;
specifically, unmanned aerial vehicle detects the barrier position through the sensor, obtains the position of barrier relative to unmanned aerial vehicle. When the invention is used for position prediction of the barrier, the environment is represented by a two-dimensional Cartesian rectangular grid. The size of the grid is also selected to be related to the performance of the sensor, and if the sensor is high in precision and speed, the grid can be selected to be smaller. The obstacle information measured by the sensors may be mapped into an environmental coordinate system:
in the formula (2)
Is the coordinate of the measured point in the environment coordinate system, (x)
r,y
r,T
r) For the position of the drone in the environment coordinate system, T
rIs the angle between the drone and the X-axis of the ambient coordinate system, and T
iIs the included angle between the measured point and the x axis in the environment coordinate system, and d is the distance between the unmanned aerial vehicle and the measured point. The unmanned aerial vehicle coordinate system is selected by taking the center of the unmanned aerial vehicle body as an original point.
By equation (3), coordinates
Can be mapped onto the corresponding grid cell (i, j) in the environment coordinate system.
In the formula (3) (x)
e,y
e) Coordinates of the grid cell (i, j) in the environment coordinate system; c is the width of the grid cell (i, j).
Indicating that the numbers in parentheses are rounded up.
In which the obstacle may fly from the current position to its surrounding 9 flight heading angles, as shown in fig. 3. These 9 flight heading angles represent east, northeast, north, northwest, west, southwest, south, and southeast, respectively. Let the obstacle move only 1 cell around it per time interval τ, so the width of w is the step size of the obstacle's movement in one unit of time τ. The step length is the moving distance of the obstacle detected by the unmanned aerial vehicle in the unit detection interval. Therefore, the number of the flight actions of the obstacle is 9, and the flight actions correspond to the 9 flight heading angles respectively. Nine course angles of the obstacle are respectively corresponding to 0 pi from 1 to 9,
π、
And a home position, as shown in fig. 4.
The object studied in the invention is an obstacle, the state of which is determined by meshing the space, the position of the obstacle at present occupies one grid, and the other nine directions to which the obstacle can move are nine states, the nine directions are NW, N, NE, W, E, SW, S, SE and the original position, and respectively correspond to 9 states E1,…,Ei,…,E9.EiE, i ═ 1, 2. Matrix PmIs the m-th order state transition matrix of the Markov chain, and the recurrence relation can be obtained by utilizing a Chapman-Kolmogorov equation:
Pm=P1P(m-1)=P(m-1)P1 (4)
Pm=(P1)m (5)
wherein N isijIndicating the number of times the obstacle transitions from state i to j. The number of times of conversion is observed by unmanned aerial vehicle when unmanned aerial vehicle and barrier distance are between 2L and L.
The prediction of the moving position of the obstacle in the grid map is basically determined by the historical information of the current track and the statistical data of the historical track. It is clear that the more recent history state has a greater impact on the next position decision, while too early history states are negligible. Thus, the historical track of k steps can be kept according to the experience. And the influence of the tracks beyond the k steps on the decision of the next movement is too small to be ignored. Thus, a prediction value of each position transition can be obtained through a weighting mode based on the Markov chain:
X(t)=a1S(t-1)P1+…+amS(t-m)Pm+…+akS(t-k)Pk (8)
in the formula, t is the current detection interval, t-1 is the previous detection interval, and the rest are analogized until the m-th detection interval (t-m). X (t) is the probability of the next position predicted by the weighting formula, which is a 1 x 9 matrix, with each element being the probability of the corresponding flight action. S (t-m), wherein m is more than or equal to 1 and less than or equal to k represents m detection interval unmanned aerial vehicle moving states. k is the maximum order in the prediction process.
a1,…,am,…,akFor the weight, respectively representing the influence of the first 1, …, m, … and k movements on the next movement, which can be determined by experience, the invention adopts an autocorrelation coefficient determination method to calculate and obtain:
in the formula rmThe autocorrelation coefficient of the mth order is shown, A (t) is the current action of the barrier, and A (t-m) is epsilon { E1,E2,…,E9And the action of the unmanned aerial vehicle at m time intervals before the current moment is formed. The autocorrelation coefficients need to be normalized by equation (10), i.e.:
m is the maximum order calculated as required for the prediction.
The predicted position of the obstacle can be obtained by selecting the largest element in x (t), using the direction grid corresponding to the position of the largest element as the predicted next moving direction, and then adding the moving coordinate value corresponding to the predicted next moving direction to the current position of the obstacle.
S3: improving the traditional artificial potential field, and combining the predicted position of the obstacle to obtain the dynamic path plan of the unmanned aerial vehicle;
the traditional artificial potential field method is simple in principle, and the mathematical model is convenient to operate and suitable for a scene of rapid operation. But the method has the problems of local minimum value, local oscillation and the like, and is improved by combining obstacle position prediction.
Specifically, in the process that the unmanned aerial vehicle moves to a target point, the attraction force and the repulsion force applied to a certain point are the same, so that the unmanned aerial vehicle is trapped in stiff hold and cannot move, and the local minimum value is called as a local minimum value. At this time, the resultant force of the repulsive force exerted on the unmanned aerial vehicle is equal to the attractive force in magnitude and opposite in direction, as shown in fig. 5.
In the prior art, a method for solving the local minimum value is to change a step length, add a virtual force or enhance an attractive force potential field and the like to escape from the local minimum value after the unmanned aerial vehicle is trapped. According to the invention, the obstacle position prediction is introduced, and the motion condition of the unmanned aerial vehicle can be mastered, so that whether the unmanned aerial vehicle encounters a local minimum value at a future moment can be predicted, and the local minimum value can be avoided by using the obstacle position prediction to place the virtual obstacle on a possible local minimum value point. And the new repulsion of the virtual barrier to the unmanned aerial vehicle is:
wherein the virtual obstacle is a particle without a radius and having a centroid Pmin。PcurrRepresenting the current position of the drone, d (p)curr,pmin) Is the distance between the current unmanned aerial vehicle and the virtual obstacle, d0To influence the distance by an obstacle, β is the repulsive coefficient. At the original repulsive force ∑ FrepAnd gravitational force Fattr_currIn addition, the drone will also be subjected to the repulsion force F of the new virtual obstaclerep_virtual. As a result, the potential field in which the drone is located changes, which causes the drone to re-plan a path. By using the new repulsive force, the unmanned aerial vehicle can be prevented from flying to the virtual obstacle centroid PminThereby, local minima can be avoided fundamentally.
When planning a path using the conventional artificial potential field method, an unnecessary oscillation phenomenon may be generated. As shown in fig. 6, when there is an obstacle around the target point. The drone will not be able to reach the target point. The reason for this is that the repulsion of the obstacle to the unmanned aerial vehicle at a certain waypoint is greater than the attraction of the target point, and the attraction is greater than the repulsion at the next waypoint, and the two conditions alternately occur to cause track oscillation.
In summary, the fundamental cause of oscillation in the artificial potential field method is the cyclic sudden change of the strength of the potential field, and the solution idea is to go against the way and need to suppress the sudden change of the strength of the potential field. The method can inhibit mutation from two aspects, namely, the size of the repulsive force relative to the attractive force is enhanced, the repulsive force can be larger than the attractive force by adjusting the coefficient, the repulsive force coefficient is increased to enable the repulsive force to be larger than the attractive force, and the attractive force coefficient can also be reduced to enable the repulsive force to be larger than the attractive force. Secondly, the purpose can be achieved by enhancing the size of the attraction force relative to the repulsion force, and similarly, the purpose can also be achieved by enhancing the attraction force coefficient or reducing the repulsion force coefficient. However, the target point has relatively small attraction to the unmanned aerial vehicle, so that the influence is also small, and the larger relative attraction of the repulsive force tends to cause the unmanned aerial vehicle to fly towards the direction far away from the obstacle, so that the flight path of the unmanned aerial vehicle becomes larger, and the energy consumption of the unmanned aerial vehicle is increased. If the gravity is enhanced to a relative size, the unmanned aerial vehicle is prompted to operate towards a target point. However, if the attractive force and the repulsive force are increased by reducing the repulsive force, the repulsive force may be too small, and the unmanned aerial vehicle may collide with an obstacle. Therefore, the best way to avoid local oscillations is to enhance the attraction.
In the face of such a situation, the drone may take a way to increase the gravitational coefficient. The temporary increment of the gravity coefficient alpha adopts a gradient increasing method, and each gradient increment is alpha0. When the unmanned aerial vehicle is trapped in local oscillation, the gravity coefficient is increased by lambda alpha0So that the attractive force is greater than the repulsive force, if it is increased to a certain number of alpha0Then, if the attractive force and the repulsive force are equal, one alpha needs to be added continuously0Determining λ, the temporary increment Δ α ═ λ α0。
The method is obtained by an original attraction function and repulsion function formula of an artificial potential field method, after attraction and repulsion are enhanced, the stress condition of the unmanned aerial vehicle is shown in a formula (12):
wherein Fatt(q) is the attraction force after the attraction force coefficient adjustment, d (q, q)goal) Is the distance between the drone and the target point. Frep(q) is repulsion force borne by the unmanned aerial vehicle, the unmanned aerial vehicle keeps unchanged when the attraction force is increased, and d (q, q)obs) Is the distance between the drone and the obstacle, d0The distance is influenced for the obstacle.
Fig. 7 shows model parameter settings, which are set for the gravitational coefficient, the repulsive coefficient, the unmanned aerial vehicle flight speed and angular velocity, the maximum turning angle, and the obstacle radius. In the simulation, an obstacle which does irregular movement in two-dimensional cartesian coordinates is set. Wherein the Markov chain has the order from 1 to 10, and the prediction accuracy of each order is measured by thirty groups of random moving obstacles to be average. As shown in fig. 8, the obstacle position prediction method proposed herein can effectively predict the position of a moving obstacle. In a normal situation, the probability of the obstacle moving in 9 directions is 11.1%. The accuracy of the prediction method provided by the invention reaches 40% at the first order, and the accuracy is obviously improved when the order is changed from 1 to 2. After an order of 5, the accuracy reaches 73% which is relatively stable.
In the simulation diagram of the flight path of the unmanned aerial vehicle, a white hollow circle represents a starting point of the unmanned aerial vehicle, a hollow hexagram represents a target point, a black solid circle represents an obstacle, and the two black solid circles are connected with the arrow to represent that the obstacle moves in the direction of the arrow.
In fig. 9 and 10, when the target point is (15,15), and the obstacle represented by a black circle flies in a straight line from (14,1) to (4,9), the unmanned aerial vehicle will collide with the obstacle. Unmanned aerial vehicles have changed the mode of avoiding colliding. Fig. 9 is a path of a drone using a conventional APF. Fig. 10 is the HOPA computed drone path of the present invention. The unmanned aerial vehicle of fig. 10 turns in a safer different direction than fig. 9. The results show that obstacle location prediction for a k-order markov chain in the inventive HOPA algorithm can help unmanned aerial vehicles find relatively shorter and safer paths.
Fig. 11 and 12 show the trajectory of the drone in the conventional artificial potential field method and in the case of using the markov and artificial potential field hybrid algorithm based on the present invention, when performing a flight mission. The white open circles in the figure represent the starting points of the unmanned aerial vehicle, the open hexagons represent target points, the black solid circles in the figure represent obstacles, and the two black solid circles are connected and provided with arrows to represent that the obstacles move according to the directions of the arrows. As can be seen from the figure, because the algorithm of the present invention adds the prediction of the position of the obstacle on the basis of the improved artificial potential field method, and takes into account the distance that the unmanned aerial vehicle travels when turning into a corner when calculating the influence range of the object, the unmanned aerial vehicle in fig. 12 starts to avoid the obstacle earlier than that in fig. 11 when encountering the unmanned aerial vehicle, and avoids the obstacle farther, and the two detailed figures are such as fig. 13 and fig. 14, which shows that the algorithm of the present invention improves the safety of avoiding the obstacle.
Fig. 15 shows that in the conventional artificial potential field method, when the unmanned aerial vehicle travels to a specific point, the size of the attractive force and the repulsive force is the same, and the unmanned aerial vehicle sinks into a local minimum value and then sinks into a vicious office, and cannot move continuously. Fig. 16 shows that, under the algorithm of the present invention, because the unmanned aerial vehicle has the capability of predicting the future time position of the obstacle, it is determined whether the next step falls into a local minimum value in the flight process, for example, the point of fig. 15 falls into the local minimum value, but the local minimum value point in fig. 15 is determined in advance in the algorithm of the present invention, and thus the local minimum value point is set as a virtual obstacle, and the unmanned aerial vehicle is subjected to the repulsive force of the virtual obstacle, thereby avoiding the local minimum value point.
Fig. 17 is an image obtained by simulation in the conventional artificial potential field method, and it can be observed that, when an obstacle exists around a target point, an unmanned aerial vehicle is subjected to smaller and smaller attractive force and larger repulsive force around the target point, so that local oscillation is generated and the unmanned aerial vehicle cannot reach the target point. Amplifying the partial path generating the oscillation, as shown in fig. 18, according to the path planning of the artificial potential field method, the unmanned aerial vehicle first reaches point 1, and then reaches point 2. At point 2 the drone is pulled by attraction to point 3, since attraction is greater than repulsion, however, at point 3 repulsion is greater than attraction, and the obstacle is pushed to point 2 again. This process may continue to loop, causing the drone to fail to reach the target point.
As shown in fig. 19, when it is detected that the unmanned aerial vehicle oscillates, the algorithm of the present invention increases the attraction coefficient of the target point to increase the attraction of the target point to the unmanned aerial vehicle, so that the unmanned aerial vehicle gets rid of the oscillation between 2 points and 3 points, and after the oscillation for a period of time, the unmanned aerial vehicle moves according to the sequence of the points 3, 4, 5, and 6, so that the unmanned aerial vehicle can smoothly reach the target point.
The embodiments of the present invention are illustrative, but not restrictive, of the invention in any manner. The technical features or combinations of technical features described in the embodiments of the present invention should not be considered as being isolated, and they may be combined with each other to achieve a better technical effect. The scope of the preferred embodiments of the present invention may also include additional implementations, and this should be understood by those skilled in the art to which the embodiments of the present invention pertain.