Intelligent vehicle road-finding method based on elliptical model artificial potential field method
Technical Field
The invention relates to the technical field of automatic road searching, in particular to an intelligent vehicle road searching method based on an elliptic model artificial potential field method.
Background
The intelligent vehicle senses the road environment through a vehicle-mounted sensor, automatically plans a driving route and controls the vehicle to reach a preset target. Integrates a plurality of technologies such as automatic control, architecture, artificial intelligence, visual computing and the like, is a highly developed product of computer science, pattern recognition and intelligent control technology, is an important mark for measuring national scientific research strength and industrial level, and has wide application prospect in the fields of national defense and national economy. In recent years, mobile robots and various unmanned aerial vehicles are widely developed and applied in various industries, and become another research hotspot, and a path planning technology is one of the most basic and important technologies in robot related research. Path planning refers to that a robot searches a working space for an obstacle avoidance path from a starting point to an end point according to specific indexes (such as least time, shortest walking path and the like). Path planning research begins in the 70 s of the 20 th century, after which the research on the path planning research by the robot research and development major nations is not interrupted, and the path planning research is achieved as soon as possible. At present, the commonly used path planning method is divided into a traditional algorithm and an intelligent bionic algorithm. Among them, the conventional artificial potential field method is widely used because of its simple and convenient calculation.
The traditional artificial potential field method assumes that the target point generates attractive force to the intelligent vehicle, and the obstacle generates repulsive force to the intelligent vehicle, so that the intelligent vehicle walks along the direction of potential decline, and the intelligent vehicle just like water flows to the lower part. The algorithm has the advantages of simple structure, contribution to the real-time performance of bottom control, capability of greatly reducing the calculated amount and the calculated time, generation of a relatively smooth path and contribution to maintaining the stability of an automatic driving vehicle. The problems of the algorithm are obvious, firstly, the problem that the target is unreachable, if the distance between the intelligent vehicle and the target point is far, the attractive force becomes extremely large, the repulsive force is smaller than the attractive force and even can be ignored, at the moment, the intelligent vehicle is likely to collide with the obstacle on the advancing path to cause the failure of the intelligent vehicle to seek paths, and when a large obstacle exists near the target point, the intelligent vehicle is subjected to the action of the extremely large repulsive force of the obstacle when approaching the target point, so that the end point cannot be reached. The problem of local minimum value and the problem of zero potential energy field are the bottleneck problems of an artificial potential field method, the reason for generating zero potential energy points is that the intelligent vehicle has a plurality of obstacle points in a working area, the position distribution is special, the attraction and the repulsion can be just equal in size at a certain point of the working area, the directions are opposite, the stress of the intelligent vehicle is zero, and the intelligent vehicle can swing back and forth near the point and can not reach a destination, so that the operation efficiency of the intelligent vehicle is seriously affected. Lee, J et al control obstacle avoidance planning of a mobile robot by using an arbitrary force algorithm to establish a new artificial potential field method function, and meanwhile, the problem of symmetrical ordering of the robot, obstacles and target points is solved. The li.chunshu et al proposes a "extended walk" method with memory function that determines whether the target point is surrounded by an obstacle by walking along the edge of the obstacle to jump out of the local minimum point of the artificial potential field method and recording and analyzing the local minimum point that the robot walks through, so as to avoid the robot from oscillating back and forth all the time or the position target point from turning around. Although the method solves the defects of the artificial potential field method to a certain extent, the intelligent vehicle cannot obtain a good obstacle avoidance effect under the condition that the environment of the intelligent vehicle is complex, and an optimal path cannot be obtained or a path curve is tortuous.
The invention solves the problem that the potential field method can not reach the target point and sink into local minimum value in the process of planning the path by improving the repulsive force function and establishing an elliptic model to set the virtual target point on the basis of the traditional artificial potential field.
Disclosure of Invention
The invention aims to solve the problems in the prior art, and provides an intelligent vehicle road-finding method based on an elliptic model artificial potential field method.
In order to achieve the above purpose, the present invention adopts the following technical scheme: an intelligent vehicle road-finding method based on an ellipse model artificial potential field method comprises the following steps:
step 1, constructing a corresponding map according to an area where an intelligent vehicle is located, gridding the map, establishing a coordinate system, and determining coordinates of the position of an obstacle and the position of a target point in the map;
step 2, judging whether the intelligent vehicle reaches the end position currently;
step 3, if the final position is reached, path planning is completed, and a final path is generated; if the terminal position is not reached, path planning is carried out by using an artificial potential field method;
step 4, calculating the magnitude and direction of attractive force, repulsive force and resultant force of the current position of the intelligent vehicle;
step 5, judging whether the problem of local minimum value is solved;
step 6, if the local minimum is not trapped, returning to the step 2 to continue judging and path planning, if the local minimum is trapped, constructing an elliptical model according to the problem point of the local minimum, adding a virtual target point, and increasing the attractive force of the end position direction to the intelligent vehicle so as to jump out the problem of the local minimum;
step 7, calculating again by using an elliptic model artificial potential field method until the vehicle runs to the end position;
step 8, carrying out secondary optimization on the planned path, sequentially detecting path nodes backwards from the starting point, judging whether the path nodes can reach straight lines, and deleting the path from the starting point to the nodes if the path nodes can reach straight lines; if the straight line can not be reached, the node position is used as the starting point position to continuously judge whether the straight line can be reached, so that the path is simplified.
In the above-mentioned intelligent vehicle road-finding method based on elliptic model artificial potential field method, adopting artificial potential field method to avoid the phenomenon that the intelligent vehicle is unreachable to the target in the course of movement, planning a safe path from the starting point to the target point for the intelligent vehicle in the working environment containing the obstacle, and judging whether the intelligent vehicle falls into the local minimum problem, comprising:
an X-O-Y coordinate system is established by a map, and the coordinate of the robot sinking into local balance is assumed to be P min (x min ,y min ) The end position coordinate is P goal (x goal ,y goal ) The midpoint coordinate position P of the two points b The method comprises the following steps:
with P min And P goal The connection line of the two points is taken as a new axis X', and P b As an origin, an axis Y 'which passes through the origin and is perpendicular to X' is established, and a new coordinate system is obtained by rotating and translating an original coordinate system, wherein the formula is as follows:
wherein the method comprises the steps ofIs a rotation matrix +.>Is a translation matrix;
the ellipse equation is established under the new coordinate system as follows:
focal length 2c= |p min -P goal I, a=ψc, ψ is the long axis factor, a 2 =b 2 +c 2 。
And taking the orthogonal point of the ellipse and the X' axis as an initial virtual target point, increasing the attraction of the end point position to the intelligent vehicle, breaking the local minimum state, enabling the intelligent vehicle to walk according to the virtual target point, and if the intelligent vehicle is detected to sink into local balance again, constructing a new ellipse model, and searching for a new virtual target point.
In the intelligent vehicle road-finding method based on the elliptic model artificial potential field method, the gravitation function of the artificial potential field method is as follows:
wherein X is g Representing the position (x g ,y g );λ 1 Representing the gravitational constant; ρ (X, X) g ) The geometric distance between the current position and the final position of the intelligent vehicle;
the first order derivative of the distance in the gravitational potential function is the gravitational force:
similarly, the repulsive potential function is as follows:
wherein X is 0 =(x 0 ,y 0 ) Representing the obstacle position; lambda (lambda) 2 Representing a repulsive force field constant; ρ 0 Representing the obstacle influencing radius; ρ (X, X) 0 ) Is an intelligent vehicle and an obstacleThe spacing between them;
the repulsive force function is used for solving the first derivative of the distance, namely repulsive force:
so the resultant force F applied by the intelligent vehicle in space total (X) is:
F total (X)=F att (X)+F rep (X)
the problem that the position of the target point cannot be reached is that the repulsive force generated by the obstacle around the target point of the intelligent vehicle is larger than the attractive force of the target point;
therefore, based on the traditional repulsive force function, a distance factor rho (X, X g ) The repulsive force value is reduced according to different situations; the improved repulsive force function is shown below:
when the distance ρ (X, X) between the intelligent vehicle and the end position g ) When the obstacle is less than 1 and the obstacle is close to the robot,and ρ (X, X) g ) 2 The values are all smaller than 1, so that the repulsive force value can be reduced, and the phenomenon that the target point cannot be reached due to overlarge repulsive force around the target point is prevented.
In the above-mentioned intelligent vehicle road-finding method based on elliptic model artificial potential field method, in step 3, the artificial potential field algorithm improves its repulsive force function, and according to the distance factor ρ (X, X) between the current position of the intelligent vehicle and the target point g ) Setting three different conditions, when the position of the intelligent vehicle appears within half of the radius value affected by the obstacle, the intelligent vehicle is very close to the obstacle, and considering the factors of safety obstacle avoidance, the repulsive force cannot be reduced too much, the square coefficient of the distance factor is taken here, and the other is takenIn this respect, when the robot is located between the half position of the obstacle influence radius value and the maximum value, the intelligent vehicle is just started to approach the obstacle, and in order to prevent the attraction force from being smaller than the repulsive force and thus the target point from being inaccessible, when the distance factor is larger than the obstacle influence radius, the intelligent vehicle is not affected.
In the above-mentioned intelligent vehicle road-finding method based on the artificial potential field method of the elliptic model, in step 6, an elliptic model is constructed by using the position of the local minimum point and the position of the target point, an X 'axis is established by using the direction pointing to the target point as the positive direction, a Y' axis perpendicular to the X 'axis is made at the midpoint position of the two points, thereby establishing a new coordinate system X' -O-Y ', setting the virtual target point as the intersection point of the positive direction of the X' axis and the elliptic model, thereby increasing the force of the target point on the intelligent vehicle in the gravitational direction, thereby breaking the local minimum state, and jumping out the local balance.
Compared with the prior art, the invention has the advantages that:
1. in a complex environment, an elliptical model is adopted to add a virtual target point, the attractive force generated by the virtual target point changes the state of the robot at a local minimum value, and the position of the virtual target point is continuously corrected on the elliptical model, so that the intelligent vehicle jumps out of a local balance area, and meanwhile, the time cost of an algorithm is greatly reduced;
2. according to the distance between the current position and the end position of the intelligent vehicle and according to three different conditions of setting distance influence factors, the safety of the intelligent vehicle planning path is better ensured.
Drawings
FIG. 1 is a basic schematic diagram of an artificial potential field method in an intelligent vehicle road-finding method based on an elliptical model artificial potential field method;
FIG. 2 is a diagram of a method for establishing virtual target points by an ellipse model in an intelligent vehicle road-finding method based on an ellipse model artificial potential field method;
FIG. 3 is a specific flowchart of an elliptical model artificial potential field method in an intelligent vehicle road-finding method based on the elliptical model artificial potential field method;
fig. 4 is an effect diagram of an ellipse model artificial potential field method planning path in an intelligent vehicle road-finding method based on an ellipse model artificial potential field method.
Detailed Description
The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
Examples
Referring to fig. 1-4, an intelligent vehicle road-finding method based on an elliptical model artificial potential field method comprises the following steps:
step 1, constructing a corresponding map according to an area where an intelligent vehicle is located, gridding the map, establishing a coordinate system, and determining coordinates of the position of an obstacle and the position of a target point in the map;
step 2, judging whether the intelligent vehicle reaches the end position currently;
step 3, if the final position is reached, path planning is completed, and a final path is generated; if the terminal position is not reached, path planning is carried out by using an artificial potential field method;
step 4, calculating the magnitude and direction of attractive force, repulsive force and resultant force of the current position of the intelligent vehicle;
step 5, judging whether the problem of local minimum value is solved;
step 6, if the local minimum is not trapped, returning to the step 2 to continue judging and path planning, if the local minimum is trapped, constructing an elliptical model according to the problem point of the local minimum, adding a virtual target point, and increasing the attractive force of the end position direction to the intelligent vehicle so as to jump out the problem of the local minimum;
step 7, calculating again by using an elliptic model artificial potential field method until the vehicle runs to the end position;
step 8, carrying out secondary optimization on the planned path, sequentially detecting path nodes backwards from the starting point, judging whether the path nodes can reach straight lines, and deleting the path from the starting point to the nodes if the path nodes can reach straight lines; if the straight line can not be reached, the node position is used as the starting point position to continuously judge whether the straight line can be reached, so that the path is simplified.
The artificial potential field method is adopted to avoid the phenomenon that an intelligent vehicle cannot reach a target in the moving process, a safe path from a starting point to a target point is planned for the intelligent vehicle in a working environment containing barriers, and whether the intelligent vehicle falls into a local minimum point is judged, and the method comprises the following steps:
an X-O-Y coordinate system is established by a map, and the coordinate of the robot sinking into local balance is assumed to be P min (x min ,y min ) The end position coordinate is P goal (x goal ,y goal ) The midpoint coordinate position P of the two points b The method comprises the following steps:
with P min And P goal The connection line of the two points is taken as a new axis X', and P b As an origin, an axis Y 'which passes through the origin and is perpendicular to X' is established, and a new coordinate system is obtained by rotating and translating an original coordinate system, wherein the formula is as follows:
wherein the method comprises the steps ofIs a rotation matrix +.>Is a translation matrix;
the ellipse equation is established under the new coordinate system as follows:
focal length 2c= |p min -P goal I, a=ψc, ψ is the long axis factor, a 2 =b 2 +c 2 ;
And taking the orthogonal point of the ellipse and the X' axis as an initial virtual target point, increasing the attraction of the end point position to the intelligent vehicle, breaking the local minimum state, enabling the intelligent vehicle to walk according to the virtual target point, and if the intelligent vehicle is detected to sink into local balance again, constructing a new ellipse model, and searching for a new virtual target point.
The gravitation function of the artificial potential field method is as follows:
wherein X is g Representing the position (x g ,y g );λ 1 Representing the gravitational constant; ρ (X, X) g ) The geometric distance between the current position and the final position of the intelligent vehicle;
the first order derivative of the distance in the gravitational potential function is the gravitational force:
similarly, the repulsive potential function is as follows:
wherein X is 0 =(x 0 ,y 0 ) Representing the obstacle position; lambda (lambda) 2 Representing a repulsive force field constant; ρ 0 Representing the obstacle influencing radius; ρ (X, X) 0 ) Is the distance between the intelligent vehicle and the obstacle;
the repulsive force function is used for solving the first derivative of the distance, namely repulsive force:
so the resultant force F applied by the intelligent vehicle in space total (X) is:
F total (X)=F att (X)+F rep (X)
the problem that the position of the target point cannot be reached is that the repulsive force generated by the obstacle around the target point of the intelligent vehicle is larger than the attractive force of the target point;
therefore, based on the traditional repulsive force function, a distance factor rho (X, X g ) The repulsive force value is reduced according to different situations; the improved repulsive force function is shown below:
when the distance ρ (X, X) between the intelligent vehicle and the end position g ) When the obstacle is less than 1 and the obstacle is close to the robot,and ρ (X, X) g ) 2 The values are all smaller than 1, so that the repulsive force value can be reduced, and the phenomenon that the target point cannot be reached due to overlarge repulsive force around the target point is prevented.
On the one hand, when the position of the robot appears within half of the radius value affected by the obstacle, the intelligent vehicle is very close to the obstacle, and the factors of safety obstacle avoidance are considered, so that the repulsive force cannot be reduced too much, and the square-open coefficient of the distance factor is taken. On the other hand, when the robot is located between the half position of the obstacle influence radius value and the maximum value, the intelligent vehicle just starts to approach the obstacle, and in order to prevent the attractive force from being smaller than the repulsive force and not approaching the target point, the repulsive force should be reduced as much as possible, so that the square coefficient of the distance factor is taken here.
In a more complex environment, the situation that the attractive force and the repulsive force applied by the intelligent vehicle are the same in magnitude and opposite in direction when the intelligent vehicle does not reach the target point position and the resultant force is zero may occur, which causes the intelligent vehicle to oscillate back and forth at the current position.
The invention provides a method for setting a virtual target point by establishing an elliptical model, wherein the attractive force generated by the virtual target point changes the state of a robot at a local minimum value, and the position of the virtual target point is continuously corrected on the elliptical model, so that an intelligent vehicle jumps out of a local balance area.
In step 3, the artificial potential field algorithm improves the repulsive force function thereof, and according to the distance factor ρ (X, X) between the current position of the intelligent vehicle and the target point g ) Setting up three kinds of different circumstances, when the position of intelligent car appears in the obstacle influences the half of radius value, the intelligent car has very near the obstacle, consider the factor of safe obstacle avoidance, can not cut down the repulsion too much, get the square coefficient of opening of distance factor here, on the other hand, the position of robot is in the obstacle when influencing the half position of radius value to the maximum value, the intelligent car just begins to be close to the obstacle, thereby in order to prevent that gravitation is less than repulsion and can't be close to the target point, when distance factor is greater than the obstacle and influences the radius, the intelligent car is not influenced.
In step 6, an elliptical model is constructed by taking the position of the local minimum point and the position of the target point, an X 'axis is established by taking the direction pointing to the target point as the positive direction, a Y' axis perpendicular to the X 'axis is made at the midpoint position of the two points, so that a new coordinate system X' -O-Y 'is established, the virtual target point is set as the intersection point of the positive direction of the X' axis and the elliptical model, the force of the target point on the intelligent vehicle in the attractive force direction is increased, the local minimum state is broken, and the local balance is jumped out.