Local path planning method for optimizing potential field force gain coefficient based on moth fire suppression
By introducing moth to flame to optimize the potential force gain coefficient in the local path planning of the vehicle, the local minimum value problem is solved, the vehicle's effective jump out and the target point movement is achieved, and the efficiency and accuracy of path planning are improved.
Patent Information
- Application Number
- CN202411057285.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-11-08
AI Technical Summary
Existing vehicle local path planning methods are prone to stop or oscillation when encountering local minimum values, making it difficult to effectively jump out, resulting in inefficient path planning.
Moth to flame is introduced to optimize the potential field force gain coefficient, and by optimizing the repulsive force and gravitational gain coefficients, the stress condition of the vehicle in the potential field is changed. The moth to flame is used to encourage the vehicle to jump out of the local minimum trap and move towards the target point.
It effectively avoids parking and oscillation of vehicles in local minimum positions, improves the accuracy and efficiency of path planning, and broadens the scope of application.
Smart Images

Figure CN118915764A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of vehicle path planning and autonomous navigation, and specifically relates to a vehicle local path planning method based on moth-optimized potential field force gain coefficient. Background Art
[0002] At present, vehicle autonomous driving technology is accelerating towards the direction of intelligence. Among them, local path planning is a typical autonomous driving technology. Specifically, it refers to planning a detailed driving route from the current position to the target position for the vehicle under the condition of known global map and environment. It usually involves obstacle avoidance, terrain feature consideration and shortest path selection. There are many types of existing local path planning methods, such as dynamic window method, model predictive control, deep learning and artificial potential field method. Among them, the dynamic window method realizes path planning by searching for the best speed and steering combination within the current speed range, but the parameter adjustment is difficult; model predictive control can handle complex intelligent vehicle dynamics and environmental constraints, but the computational cost is high; although deep learning technology can handle complex traffic scenes, it requires a lot of training data. Among them, the artificial potential field method has won the favor of many technical developers and engineers for its advantages such as simple structure, low computational complexity and strong obstacle avoidance ability, and is widely used in vehicle local path planning engineering applications. However, it is worth noting that in the process of implementing path planning using the traditional artificial potential field algorithm, due to factors such as the driving environment and algorithm defects, if the instantaneous force acting on the vehicle at a certain position in the potential field is zero, the vehicle will stop at this position or the trajectory will oscillate repeatedly in the area of the point position, that is, it will fall into the "local minimum" problem.
[0003] In view of the problem that the above-mentioned vehicle may fall into the "local minimum" problem during the local path planning process, Patent No. 202310995802X proposes a mobile robot path planning method based on an improved artificial potential field method of fuzzy logic algorithm. The invention aims to introduce a virtual target point to change the vehicle force in the potential field under the premise of satisfying the mobile robot's own steering constraint, so that the vehicle can jump out of the local minimum trap; Patent No. 2022111071132 invented a path planning method for autonomous driving vehicles based on an improved artificial potential field method. This method introduces a weed algorithm in the process of repulsive force redistribution to calculate the optimal sub-target, thereby ensuring that the vehicle can automatically escape when it falls into a local minimum point. The above methods all use the method of applying external force to break the equilibrium state of the vehicle, but because the direction and magnitude of the applied external force are difficult to control, the above methods have defects such as excessive calculation and high complexity. Summary of the invention
[0004] In order to overcome the defects of the prior art, the present invention provides a local path planning method based on moth-to-fire optimization of potential field force gain coefficients. If the vehicle falls into a local minimum, that is, the vehicle oscillates back and forth at the local minimum position, the moth-to-fire algorithm is introduced to optimize the repulsive and gravitational gain coefficients, change the size of the potential field force acting on the vehicle, so that it jumps out of the local minimum trap, and at the same time guides the vehicle to move towards the target point.
[0005] The technical solution adopted by the present invention to solve the technical problem is:
[0006] A local path planning method based on optimizing potential field force gain coefficients like a moth flying into a flame, comprising a vehicle local path planning system, wherein the vehicle local path planning system comprises a sensor unit, a potential field force calculation unit, a next step position calculation unit, a local minimum value judgment unit, a moth flying into a flame potential field force gain coefficient optimization unit, and a vehicle reaching a target point judgment unit;
[0007] The local path planning method comprises the following steps:
[0008] The sensor unit collects road information and transmits it to the potential field force calculation unit; the potential field force calculation unit calculates the repulsive force F of the vehicle in the potential field according to the set potential field force calculation formula. rep and gravity F att , and at the same time, the road information recognized by the sensor unit is transmitted to the next position calculation unit; the next position calculation unit calculates the next position of the vehicle according to the current position, heading angle and step length of the vehicle, and the signal is transmitted to the local minimum judgment unit; the local minimum judgment unit determines whether the vehicle falls into the local minimum through a pre-set judgment rule; if the vehicle falls into the local minimum, a 'yes' signal is output to the moth-to-fire potential field force gain coefficient optimization unit, and if the vehicle does not fall into the local minimum, a 'no' signal is output to the vehicle reaching the target point judgment unit; the moth-to-fire potential field force gain coefficient optimization unit optimizes the gain coefficients of repulsion and attraction according to the position of the vehicle, the position of the obstacle and the position of the target point, calculates the gain coefficient value and outputs it to the potential field force calculation unit, and the potential field force calculation unit recalculates the potential field force; the vehicle reaching the target point judgment unit receives the vehicle not falling into the local minimum signal, and determines whether the vehicle has reached the target point according to the judgment rule, if the target point is reached, a 'yes' signal is output to end, if the target point is not reached, a 'no' signal is output to the potential field force calculation unit, and the above operations are executed in a loop.
[0009] Furthermore, the local path planning method further comprises the following steps:
[0010] In the potential field force calculation unit, the traditional repulsive field is improved. After the improvement, the repulsive force of the obstacle on the vehicle is divided into two parts, one part is from the obstacle to the vehicle, and the other part is from the vehicle to the obstacle. The improved repulsive force function is:
[0011]
[0012] Where: ρ(P,P goal ) represents the Euclidean distance between the vehicle and the target point, ρ(P,P obs ) represents the Euclidean distance between the vehicle and the obstacle, P represents the position of the intelligent vehicle, and P goal represents the target point position, P obs represents the obstacle position, s is the adjustment factor, s is 1, k rep is the repulsion gain coefficient, ρ0 is a constant, indicating the maximum distance of the obstacle’s impact on the vehicle, F rep1 Represents the repulsive force of the obstacle toward the vehicle, F rep2 Represents the repulsive force of the vehicle pointing to the target point;
[0013] The improved obstacle repulsion is:
[0014] F rep =F rep1 +F rep2 (3)
[0015] In the traditional artificial potential field method, the gravitational part increases with the distance between the vehicle and the target point. When the car is far away from the target point, the gravitational part is too large, which may cause the car to collide with obstacles. To address this problem, the gravitational field formula is improved. The size of the gravitational field is determined by the distance between the car and the target point. When the distance is very large, the gravitational force will become very large, and the repulsive force will become very small relative to the gravitational force, causing the car to collide with obstacles. Therefore, the gravitational function is improved, and the formula is as follows:
[0016]
[0017] Where: ε is the gravitational field adjustment factor, k att is the gravity gain coefficient, d0 is the limit distance of the target point on the vehicle. When the distance between the vehicle and the target point is ≤d0, the gravity and the distance form a smooth straight line; when the distance between the vehicle and the target point is >d0, the gravity is regarded as a constant.
[0018] Furthermore, in the next step position calculation unit, when the vehicle moves to the current position (x i ,y i ), the vehicle driving step length L is set to 0.1, and according to the resultant angle value α of the current path point and the step length L, the next step to reach the position (x i+1 ,y i+1 ), then the next position coordinate expression of the vehicle is calculated by the next position calculation unit as follows:
[0019]
[0020] Furthermore, in the local minimum judgment unit, a rule for falling into the local minimum is set: when the repulsive force and the gravitational force acting on the vehicle in the two-dimensional plane are of the same magnitude and opposite direction, it is determined that the vehicle has fallen into the local minimum; otherwise, the vehicle has not fallen into the local minimum, and the output signal enters the vehicle reaching the target point judgment unit.
[0021] Furthermore, in the moth-to-fire potential field force gain coefficient optimization unit, based on the judgment rule of judging whether the vehicle is trapped in the local minimum unit, if the vehicle is trapped in the local minimum, the moth-to-fire algorithm is introduced to determine the appropriate fitness function according to the distance between the vehicle and the target point, optimize the gain coefficients of the obstacle repulsion, the road boundary repulsion, and the gravity, change the force magnitude and direction of the vehicle at the local minimum position, prompt the vehicle to jump out of the local minimum position, and guide the vehicle to move in the direction close to the target point;
[0022] The specific execution steps are as follows:
[0023] Step 1: Initialize the moth-to-fire algorithm: The optimization object is the obstacle repulsion gain coefficient, the road boundary repulsion gain coefficient, and the target point gravity gain coefficient of the vehicle in the force field. The dimension of the moth's search space is set to S. The upper and lower bounds of the search space are the possible driving range of the vehicle in the next step. The upper bound is ub and the lower bound is lb. The population size is M = 30, the maximum number of iterations is 100, and the fitness function is set to:
[0024]
[0025] Where: x goal ,y goal Respectively represent the horizontal and vertical coordinates of the target point, x j+1 ,y j+1 Respectively represent the horizontal and vertical coordinates of the vehicle at the next moment, represents the fitness function value of the d-th moth, Represents the fitness function value of the d+1th moth.
[0026] Step 2: Randomly generate moth positions in space and evaluate the fitness of each moth in the moth population; the moth population consists of the following parts:
[0027] x=[x1,x2,x3......,x M ] (7)
[0028] The position information of the dth moth is:
[0029] X=[x d1 ,x d2 ,x d3 ......,xdS ] (8)
[0030] The fitness value of the moth is saved in the matrix O D middle:
[0031]
[0032] The optimal fitness function is:
[0033] E sumy-n =min{O D} (10)
[0034] Step 3: Initialize the flame: To solve the local minimum problem, setting the number of flames to 1 can speed up the convergence of the algorithm. Select the first moth position as the initial flame and construct the flame as follows:
[0035]
[0036] Where: represents the position of the initial flame, and x1 represents the position of the first moth;
[0037] Step 4: Update the flame position: Evaluate the fitness values of all moths, find the moth with the best fitness value, and then update the flame position;
[0038]
[0039] In the formula: n means the best moth is the nth one;
[0040] Step 5: Update the moth position:
[0041] Calculate the distance d between the moth and the flame:
[0042]
[0043] Where: is the position of the moth, d=(1,2,...M), φ Fj is the position of the flame;
[0044] The position of the moth relative to the flame is described as follows:
[0045] φ d+1 =S(φ d ,F) (14)
[0046] Where: φ d represents the position of the dth moth, F is the characteristic value of the flame, S(·) is the spiral function; the spiral flight method is used for detection, and the logarithmic spiral method is used to calculate the main update mechanism of the moth's future flight; the spiral function is:
[0047] S(φd ,F)=R d ·e bσ ·cos(2πt)+F (15)
[0048] Where: b is a constant, σ represents the current number in the range [r, 1], r is a linearly decreasing change factor starting from the range [-2, -1], and t represents the flight time of the moth;
[0049] Step 6: Determine whether the maximum number of iterations has been reached or the global optimum remains unchanged: If the maximum number of iterations has not been reached or the global optimum remains unchanged, return to step 3 for further update and optimization; if the maximum number of iterations has been reached or the global optimum remains unchanged, the moth-to-flame algorithm ends, outputs the optimal repulsive gain coefficient and gravitational gain coefficient, and returns to the potential field force calculation unit.
[0050] Furthermore, in the vehicle reaching the target point judgment unit, according to the distance formula between the vehicle and the target point Where x goal ,y goal They represent the horizontal and vertical coordinates of the target point respectively. If the value is less than 1, the vehicle has reached the target point. If the value is greater than 1, the vehicle has not reached the target point, and it returns to the potential field force calculation unit and recycles until the vehicle reaches the target point, completing the path planning.
[0051] Compared with the prior art, the present invention has the following beneficial effects:
[0052] The present invention is based on the traditional artificial potential field method. It improves the traditional repulsive force field by adding a repulsive force pointing the vehicle to the target point. On this basis, when the vehicle falls into a local minimum trap, the moth-to-fire algorithm is introduced to optimize the potential field force gain coefficient, change the force on the vehicle in the potential field, prompt the vehicle to quickly jump out of the local minimum trap, and broaden the application scope of local path planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 Schematic diagram of the vehicle local path planning system.
[0054] Figure 2 This is the execution flow chart of the optimization unit based on the moth-to-fire potential field force gain coefficient.
[0055] Figure 3 This is a road model diagram.
[0056] Figure 4 To improve the repulsion diagram.
[0057] Figure 5(a) is a simulation diagram of the traditional artificial potential field.
[0058] Figure 5(b) is a simulation diagram of the improved artificial potential field. DETAILED DESCRIPTION
[0059] The present invention will be further described below in conjunction with the accompanying drawings.
[0060] like Figure 1 As shown, the vehicle local path planning system of the present invention is composed of a sensor unit 1, a potential field force calculation unit 2, a next position calculation unit 3, a local minimum value judgment unit 4, a moth-to-flame potential field force gain coefficient optimization unit 5 and a vehicle reaching the target point judgment unit 6.
[0061] The sensor unit 1 includes a camera, a millimeter wave radar, an infrared detector and other equipment. Multiple sensors jointly collect road information, and then fuse the multiple information. The fused information is processed again to determine the vehicle's heading angle, position coordinates, obstacle coordinates, road width, lane boundary and other information, and transmit them to the potential field force calculation unit 2; the potential field force calculation unit 2 calculates the repulsive force F of the vehicle in the potential field according to the set potential field force calculation formula. rep and gravity F att , and at the same time, the road information recognized by the sensor unit 1 is transmitted to the next position calculation unit 3; the next position calculation unit 3 calculates the next position of the vehicle according to the current position, heading angle and step length of the vehicle, and transmits the signal to the local minimum judgment unit 4; the local minimum judgment unit 4 determines whether the vehicle falls into the local minimum through a pre-set judgment rule; if the vehicle falls into the local minimum, a 'yes' signal is output to the moth-to-fire potential field force gain coefficient optimization unit 5, and if the vehicle does not fall into the local minimum, a 'no' signal is output to the vehicle reaching the target point judgment unit 6; the moth-to-fire potential field force gain coefficient optimization unit 5 optimizes the gain coefficients of repulsion and attraction according to the position of the vehicle, the position of the obstacle and the position of the target point, calculates the gain coefficient value and outputs it to the potential field force calculation unit 2, and the potential field force calculation unit recalculates the potential field force; the vehicle reaching the target point judgment unit 6 receives the vehicle not falling into the local minimum signal, and determines whether the vehicle has reached the target point according to the judgment rule. If the target point is reached, a 'yes' signal is output to end, and if the target point is not reached, a 'no' signal is output to the potential field force calculation unit 2, and the above operations are executed in a loop.
[0062] In the sensor unit 1, the starting point, obstacles and target point coordinates of the vehicle are first determined, and the boundary position of the road is established at the same time, and a two-dimensional space model of the vehicle's travel is constructed. In the two-dimensional space model, the starting point, obstacles and target point coordinates of the vehicle are obtained by reading on-board sensors such as laser radar, infrared sensing, inertial measurement unit, etc., and the number of obstacles n is determined.
[0063] In the potential field force calculation unit 2, according to the position coordinates, obstacle coordinates, and lane boundary information obtained by the sensor group unit 1, the upper boundary of the road is used as the X-axis of the coordinate system, and the one perpendicular to the center line is used as the Y-axis. The road boundary is divided into the upper boundary of the upper lane, the lower boundary of the upper lane, the upper boundary of the lower lane, and the lower boundary of the lower lane, and the road is divided into three areas. When the vehicle is driving in the middle area, it is subject to the repulsive force of the road boundary on the vehicle, and the direction is perpendicular to the X-axis, from the road boundary to the vehicle. It can be concluded that the repulsive force function is:
[0064]
[0065] Where: η edge is the boundary repulsion gain coefficient, y is the ordinate of the current position of the vehicle, D is the road width, v is the current speed of the vehicle, and w / 2 is the road boundary width.
[0066] The traditional repulsive field is improved. After the improvement, the repulsive force of the obstacle on the vehicle is divided into two parts, one part is from the obstacle to the vehicle, and the other part is from the vehicle to the obstacle. The improved repulsive function is:
[0067]
[0068] Where: ρ(P,P goal ) represents the Euclidean distance between the vehicle and the target point, ρ(P,P obs ) represents the Euclidean distance between the vehicle and the obstacle, P represents the position of the intelligent vehicle, and P goal represents the target point position, P obs represents the obstacle position, s is the adjustment factor, in this invention, s is 1, k rep is the repulsion gain coefficient, ρ0 is a constant, indicating the maximum distance of the obstacle’s impact on the vehicle, F rep1 Represents the repulsive force of the obstacle toward the vehicle, F rep2 Represents the repulsive force of the vehicle toward the target point.
[0069] The improved obstacle repulsion is:
[0070] F rep =F rep1 +F rep2 (3)
[0071] In the traditional artificial potential field method, the gravitational part increases with the distance between the vehicle and the target point. When the car is far away from the target point, the gravitational part is too large, which may cause the car to collide with obstacles. To address this problem, the gravitational field formula is improved. The size of the gravitational field is determined by the distance between the car and the target point. When the distance is very large, the gravitational force will become very large, and the repulsive force will become very small relative to the gravitational force, causing the car to collide with obstacles. Therefore, the gravitational function is improved, and the formula is as follows:
[0072]
[0073] Where: ε is the gravitational field adjustment factor, k att is the gravity gain coefficient, d0 is the limit distance of the target point on the vehicle. When the distance between the vehicle and the target point is ≤d0, the gravity and the distance form a smooth straight line; when the distance between the vehicle and the target point is >d0, the gravity is regarded as a constant.
[0074] In the next step position calculation unit 3, when the vehicle moves to the current position (x i ,y i ), the vehicle driving step length L is set to 0.1, and according to the resultant angle value α of the current path point and the step length L, the next step to reach the position (x i+1 ,y i+1 ), then the next position coordinate expression of the vehicle is calculated by the next position calculation unit 3 as follows:
[0075]
[0076] In the local minimum judgment unit 4, according to the cause of the local minimum, when the vehicle moves to a certain point, the gravitational force and repulsive force are equal in magnitude and opposite in direction, and the resultant force on the vehicle at this position is zero, and the vehicle is trapped in the local minimum. At this time, a rule for being trapped in the local minimum needs to be set: when the repulsive force and gravitational force on the vehicle in the two-dimensional plane are equal in magnitude and opposite in direction, it is determined that the vehicle is trapped in the local minimum; otherwise, the vehicle is not trapped in the local minimum, and the output signal enters the vehicle reaching the target point judgment unit 6.
[0077] In the moth-to-fire potential field force gain coefficient optimization unit 5, based on the judgment rule in the judging unit 4 whether the vehicle is trapped in the local minimum, if the vehicle is trapped in the local minimum, the moth-to-fire algorithm is introduced to determine the appropriate fitness function according to the distance between the vehicle and the target point, optimize the gain coefficients of obstacle repulsion, road boundary repulsion, and gravity, change the force size and direction of the vehicle at the local minimum position, prompt the vehicle to jump out of the local minimum position, and guide the vehicle to move in the direction close to the target point.
[0078] In the vehicle reaching the target point judgment unit 6, according to the distance formula between the vehicle and the target point Where x goal ,y goal They represent the horizontal and vertical coordinates of the target point respectively. If the value is less than 1, the vehicle has reached the target point. If the value is greater than 1, the vehicle has not reached the target point, and then it returns to the potential field force calculation unit 2 and recycles until the vehicle reaches the target point, completing the path planning.
[0079] like Figure 2 As shown, the specific execution steps of the moth-to-fire potential field force gain coefficient optimization unit 5 are as follows:
[0080] Step 1: Initialize the moth-to-fire algorithm. The optimization objects are the repulsion gain coefficient of the obstacle, the repulsion gain coefficient of the road boundary, and the gravitation gain coefficient of the target point in the force field. The dimension of the moth's search space is set to S. The upper and lower bounds of the search space are the possible driving range of the vehicle in the next step, the upper bound is ub, the lower bound is lb, the population size is M=30, the maximum number of iterations is 100, and the fitness function is set to:
[0081]
[0082] Where: x goal ,y goal Respectively represent the horizontal and vertical coordinates of the target point, x j+1 ,y j+1 Respectively represent the horizontal and vertical coordinates of the vehicle at the next moment, represents the fitness function value of the d-th moth, Represents the fitness function value of the d+1th moth.
[0083] Step 2: Randomly generate moth positions in space and evaluate the fitness of each moth in the moth population. The moth population consists of the following:
[0084] x=[x1,x2,x3......,x M ] (7)
[0085] The position information of the dth moth is:
[0086] X=[x d1 ,x d2 ,x d3 ......,x dS ] (8)
[0087] The fitness value of the moth is saved in the matrix O D middle:
[0088]
[0089] The optimal fitness function is:
[0090] Esumy-n =min{O D} (10)
[0091] Step 3: Initialize the flame: The present invention aims to solve the local minimum problem, so setting the number of flames to 1 can speed up the convergence of the algorithm, select the first moth position as the initial flame, and construct the flame as follows:
[0092]
[0093] Where: represents the position of the initial flame, and x1 represents the position of the first moth.
[0094] Step 4: Update the flame position: Evaluate the fitness values of all moths, find the moth with the best fitness value, and update the flame position.
[0095]
[0096] Where: n means the best moth is the nth one.
[0097] Step 5: Update the moth position:
[0098] Calculate the distance d between the moth and the flame:
[0099]
[0100] Where: is the position of the moth, d=(1,2,...M), φ Fj is the position of the flame.
[0101] The position of the moth relative to the flame is described as follows:
[0102] φ d+1 =S(φ d ,F) (14)
[0103] Where: φ d represents the position of the dth moth, F is the characteristic value of the flame, and S(·) is the spiral function. The spiral flight method is used for detection, and the logarithmic spiral method is used to calculate the main update mechanism of the moth's future flight. The spiral function is:
[0104] S(φ d ,F)=R d ·e bσ ·cos(2πt)+F (15)
[0105] Where: b is a constant, σ represents the current number in the range [r, 1], r is a linearly decreasing change factor starting from the range [-2, -1], and t represents the flight time of the moth.
[0106] Step 6: Determine whether the maximum number of iterations has been reached or the global optimum has not changed. If the maximum number of iterations has not been reached or the global optimum has not changed, return to step 3 for further update and optimization; if the maximum number of iterations has been reached or the global optimum has not changed, the moth-to-fire algorithm ends, outputs the optimal repulsive gain coefficient and attractive gain coefficient, and returns to the potential field force calculation unit 2.
[0107] like Figure 3 As shown, the present invention takes a two-lane road as an example. The gray area in the figure is the area where the vehicle should travel. The boundary of a single-lane road is divided into the upper boundary of the upper lane, the lower boundary of the upper lane, the upper boundary of the lower lane and the lower boundary of the lower lane, and the road is divided into three areas. D is the width of the road, and w / 2 is the width of the road boundary. When the vehicle travels in the middle area, it is subject to the repulsive force of the road boundary on the vehicle, and the direction is perpendicular to the X-axis, from the road boundary to the vehicle.
[0108] like Figure 4 As shown in the figure, the repulsive force F of the obstacle on the vehicle after improvement rep It is divided into two parts. One part is the repulsive force F directed from the obstacle to the vehicle. rep1 , part of which is the repulsive force F directed toward the obstacle by the vehicle rep2 The improved repulsion introduces the relationship between the distance between the vehicle and the target point. When the obstacle is close to the target point, when the vehicle approaches the target point, the repulsion of the obstacle on the vehicle will gradually decrease, which can effectively solve the problem of unreachable target point.
[0109] In order to verify the effectiveness of the present invention, the traditional artificial potential field algorithm is simulated by MATLAB software in a complex two-lane environment. The simulation diagrams of the traditional artificial potential field method and the improved artificial potential field method based on the moth-to-flame algorithm are shown in Figures 5(a) and 5(b).
[0110] The simulation results show that the traditional artificial potential field algorithm path planning is prone to vehicles falling into the local minimum position. Based on the improved artificial potential field, the moth-to-fire algorithm is introduced to optimize the potential field force gain coefficient, which solves the problem that vehicles are prone to falling into the local minimum during local path planning.
[0111] The magnitude of the potential field force gain coefficient can directly affect the magnitude and direction of the potential field force, thereby allowing the vehicle to jump out of the local minimum trap. The moth-to-fire algorithm is a typical swarm intelligence optimization algorithm. Compared with other algorithms, it has the characteristics of simple structure, easy programming, and advantages such as few parameters and simple parameter adjustment, and can effectively handle continuous space optimization problems. The present invention proposes to introduce the moth-to-fire algorithm to optimize the potential field force gain coefficient in the process of local path planning of the vehicle, thereby changing the force on the vehicle in the potential field, and prompting the vehicle to jump out of the local minimum trap in time.
Claims
1. A local path planning method based on optimizing potential field force gain coefficient like a moth flying into a flame, characterized by: It includes a vehicle local path planning system, which includes a sensor unit, a potential field force calculation unit, a next position calculation unit, a local minimum value judgment unit, a moth-to-fire potential field force gain coefficient optimization unit, and a vehicle reaching a target point judgment unit; The local path planning method comprises the following steps: The sensor unit collects road information and transmits it to the potential field force calculation unit; the potential field force calculation unit calculates the repulsive force F of the vehicle in the potential field according to the set potential field force calculation formula. rep and gravity F att , and at the same time, the road information recognized by the sensor unit is transmitted to the next position calculation unit; the next position calculation unit calculates the next position of the vehicle according to the current position, heading angle and step length of the vehicle, and the signal is transmitted to the local minimum judgment unit; the local minimum judgment unit determines whether the vehicle falls into the local minimum through a pre-set judgment rule; if the vehicle falls into the local minimum, a 'yes' signal is output to the moth-to-fire potential field force gain coefficient optimization unit, and if the vehicle does not fall into the local minimum, a 'no' signal is output to the vehicle reaching the target point judgment unit; the moth-to-fire potential field force gain coefficient optimization unit optimizes the gain coefficients of repulsion and attraction according to the position of the vehicle, the position of the obstacle and the position of the target point, calculates the gain coefficient value and outputs it to the potential field force calculation unit, and the potential field force calculation unit recalculates the potential field force; the vehicle reaching the target point judgment unit receives the vehicle not falling into the local minimum signal, and determines whether the vehicle has reached the target point according to the judgment rule, if the target point is reached, a 'yes' signal is output to end, if the target point is not reached, a 'no' signal is output to the potential field force calculation unit, and the above operations are executed in a loop.
2. The local path planning method based on the moth-to-flame optimization potential field force gain coefficient according to claim 1, characterized in that: The local path planning method further comprises the following steps: In the potential field force calculation unit, the traditional repulsive field is improved. After the improvement, the repulsive force of the obstacle on the vehicle is divided into two parts, one part is from the obstacle to the vehicle, and the other part is from the vehicle to the obstacle. The improved repulsive force function is: Where: ρ(P,P goal ) represents the Euclidean distance between the vehicle and the target point, ρ(P,P obs ) represents the Euclidean distance between the vehicle and the obstacle, P represents the position of the intelligent vehicle, and P goal represents the target point position, P obs represents the obstacle position, s is the adjustment factor, s is 1, k rep is the repulsion gain coefficient, ρ0 is a constant, indicating the maximum distance of the obstacle’s impact on the vehicle, F rep1 Represents the repulsive force of the obstacle toward the vehicle, F rep2 Represents the repulsive force of the vehicle pointing to the target point; The improved obstacle repulsion is: F rep =F rep1 +F rep2 (3) The gravity function is improved and the formula is as follows: Where: ε is the gravitational field adjustment factor, k att is the gravity gain coefficient, d0 is the limit distance of the target point on the vehicle. When the distance between the vehicle and the target point is ≤d0, the gravity and the distance form a smooth straight line; when the distance between the vehicle and the target point is >d0, the gravity is regarded as a constant.
3. The local path planning method based on the moth-to-flame optimization potential field force gain coefficient according to claim 1 or 2, characterized in that: In the next step position calculation unit, when the vehicle moves to the current position (x i ,y i ), the vehicle driving step length L is set to 0.1, and according to the resultant angle value α of the current path point and the step length L, the next step to reach the position (x i+1 ,y i+1 ), then the next position coordinate expression of the vehicle is calculated by the next position calculation unit as follows:
4. The local path planning method based on the moth-to-flame optimization potential field force gain coefficient according to claim 1 or 2, characterized in that: In the local minimum judgment unit, a rule for falling into a local minimum is set: when the repulsive force and the attractive force acting on the vehicle in a two-dimensional plane are of the same magnitude and opposite in direction, it is determined that the vehicle has fallen into a local minimum; otherwise, the vehicle has not fallen into a local minimum, and an output signal enters a vehicle reaching a target point judgment unit.
5. The local path planning method based on the moth-to-flame optimization potential field force gain coefficient according to claim 1 or 2, characterized in that: In the moth-to-fire potential field force gain coefficient optimization unit, based on the judgment rule of judging whether the vehicle is trapped in the local minimum unit, if the vehicle is trapped in the local minimum, the moth-to-fire algorithm is introduced to determine the appropriate fitness function according to the distance between the vehicle and the target point, optimize the gain coefficients of the obstacle repulsion, the road boundary repulsion, and the gravitational force, change the force magnitude and direction of the vehicle at the local minimum position, prompt the vehicle to jump out of the local minimum position, and guide the vehicle to move in the direction close to the target point; The specific execution steps are as follows: Step 1: Initialize the moth-to-fire algorithm: The optimization object is the obstacle repulsion gain coefficient, the road boundary repulsion gain coefficient, and the target point gravity gain coefficient of the vehicle in the force field. The dimension of the moth's search space is set to S. The upper and lower bounds of the search space are the possible driving range of the vehicle in the next step. The upper bound is ub and the lower bound is lb. The population size is M = 30, the maximum number of iterations is 100, and the fitness function is set to: Where: x goal ,y goal Respectively represent the horizontal and vertical coordinates of the target point, x j+1 ,y j+1 Respectively represent the horizontal and vertical coordinates of the vehicle at the next moment, O Dd represents the fitness function value of the dth moth, O Dd+1 represents the fitness function value of the d+1th moth; Step 2: Randomly generate moth positions in space and evaluate the fitness of each moth in the moth population; the moth population consists of the following parts: x=[x1,x2,x3......,x M ](7) The position information of the dth moth is: X=[x d1 ,x d2 ,x d3 ......,x dS ](8) The fitness value of the moth is saved in the matrix O D middle: The optimal fitness function is: E sumy-n =min{O D }(10) Step 3: Initialize the flame: To solve the local minimum problem, setting the number of flames to 1 can speed up the convergence of the algorithm. Select the first moth position as the initial flame and construct the flame as follows: Where: represents the position of the initial flame, and x1 represents the position of the first moth; Step 4: Update the flame position: Evaluate the fitness values of all moths, find the moth with the best fitness value, and then update the flame position; In the formula: n means the best moth is the nth one; Step 5: Update the moth position: Calculate the distance d between the moth and the flame: Where: is the position of the moth, d=(1,2,...M), φ Fj is the position of the flame; The position of the moth relative to the flame is described as follows: f d+1 =S(φ d ,F)(14) Where: φ d represents the position of the dth moth, F is the characteristic value of the flame, S(·) is the spiral function; the spiral flight method is used for detection, and the logarithmic spiral method is used to calculate the main update mechanism of the moth's future flight; the spiral function is: S(φ d ,F)=R d ·e bσ ·cos(2πt)+F(15) Where: b is a constant, σ represents the current number in the range [r, 1], r is a linearly decreasing change factor starting from the range [-2, -1], and t represents the flight time of the moth; Step 6: Determine whether the maximum number of iterations has been reached or the global optimum remains unchanged: If the maximum number of iterations has not been reached or the global optimum remains unchanged, return to step 3 for further update and optimization; if the maximum number of iterations has been reached or the global optimum remains unchanged, the moth-to-flame algorithm ends, outputs the optimal repulsive gain coefficient and gravitational gain coefficient, and returns to the potential field force calculation unit.
6. The local path planning method based on optimizing the potential field force gain coefficient of moth-to-flame according to claim 1 or 2, characterized in that: In the vehicle reaching the target point judgment unit, according to the distance formula between the vehicle and the target point Where x goal ,y goal They represent the horizontal and vertical coordinates of the target point respectively. If the value is less than 1, the vehicle has reached the target point. If the value is greater than 1, the vehicle has not reached the target point, and it returns to the potential field force calculation unit and recycles until the vehicle reaches the target point, completing the path planning.
Citation Information
Cited By
Unmanned aerial vehicle local dynamic flight path planning method and equipment for power distribution network line inspection
CN119292310A
Self-adaptive MPC vehicle trajectory tracking control method for danger level online identification
CN120143630A
