Active obstacle avoidance method of autonomous vehicle based on improved artificial potential field

Aiming at the local minimum point problem in an artificial potential field based on a safe distance model, this article proposes an algorithm for active obstacle avoidance path planning and tracking of autonomous vehicles using an improved artificial potential field. First, a possible road operating condition in which the artificial potential field based on the safety-distance model falls into a local minimum point is studied. Subsequently, an improved artificial potential field method is proposed by introducing the second virtual target attraction potential field, which successfully overcomes the local minimum point problem. Second, a model for autonomous vehicle active obstacle avoidance path planning and tracking based on the improved artificial potential field is established. Finally, MATLAB/CarSim co-simulations were performed under the road conditions of constant- and variable-velocity obstacle vehicles. The simulation results demonstrate that the improved artificial potential field method can effectively solve the local minimum point problem of the artificial potential field based on the safe distance model. Additionally, the safety and stability of autonomous vehicle active obstacle avoidance are improved.


Introduction
Local path planning is an important method for solving active safety problems in autonomous vehicles (AVs). It has remarkable characteristics of strong real-time performance and high computational efficiency. [1][2][3][4] Currently, local path planning algorithms primarily include the A* algorithm, 5 genetic algorithm, 6 ant colony algorithm, 7 particle swarm algorithm, 8 and artificial potential field (APF) method. The APF method is a common obstacle avoidance planning algorithm that is easy to model and superior in calculation, and it has a short search time. Furthermore, compared with other algorithms, it is very suitable for the active obstacle avoidance of AVs. [9][10][11][12] Therefore, many scholars have performed in-depth research on path planning and tracking based on the APF. For instance, Sfeir et al. 13 redefined a new form of repulsive potential field based on the APF method to reduce the oscillation of the trajectory of a robot when it approaches obstacles. Lazarowska 14 determined collision-free paths for mobile robots in static and dynamic environments by optimizing a discrete APF.
However, the path planning method of vehicle active obstacle avoidance based on the traditional APF also has limitations. AVs based on the traditional APF cannot obtain global road condition information. Therefore, the next movement can only be performed according to the currently obtained information, which often causes the AVs to fall into a local minimum point, with the target being unreachable, or they will be unable to avoid obstacles properly 15,16 . Numerous studies have proposed and improved different solutions. [17][18][19][20] Lee and Park 21 proposed a new concept using a virtual obstacle to escape the local minimum point. The virtual obstacle was located at the local minimum and generated an extra force to repel the robot from the local minimum point. Zheng et al. 22 proposed a new minimum criterion and designed an improved virtual obstacle local path planning method to overcome the tendency of the APF algorithm to easily fall into local minima and other limitations. Matoui et al. 23 used a non-minimum velocity algorithm to solve the local minimum problem. Ning et al. 24 introduced a safety distance to eliminate the problem of local minima caused by obstacles around a target. Subsequently, an obstacle avoidance controller based on the improved APF was designed.
Among the aforementioned improvements on classical APF-based methods, the APF method based on the safe distance model (SDM) is a method of active obstacle avoidance path planning with higher efficiency and safety. By introducing an SDM, the method ensures that the AVs will not collide with other vehicles when changing lanes to avoid obstacles, and it reduces the probability of local minimum problems to a certain extent. 25 For instance, Yuan et al. 26,27 proposed a longitudinal SDM and a lane changing safety spacing model based on the minimum time of lane changing under the constraint of the sideslip angle. Based on this model, an active obstacle avoidance method using an improved APF was established. Ji et al. 28,29 proposed a 3D virtual dangerous potential field based on the SDM to quantify driving risk; it has good performance in active collision avoidance and path tracking. However, when AVs drive normally in their own lane, the emergency driving behavior of obstacle vehicles in adjacent lanes is difficult to capture and predict. Few studies have focused on that when an obstacle vehicle rapidly changes lanes and is driven directly in front of AVs, the longitudinal distance between the two vehicles is less than the safe distance, and the speed difference is large. The APF method, which introduces a safety distance, is likely to fall into the local minimum point. Based on this, this article proposes a solution to the problem of AVs trapped at local minimum points under the above conditions. In other words, by introducing the interference factor of the potential field of the second virtual target, the equilibrium state of the potential field is broken. Therefore, AVs can successfully eliminate the local minimum point and complete active obstacle avoidance.
The remainder of this article is organized as follows: In the preliminaries section, a possible road operating condition in which the APF based on SDM falls into a local minimum point is studied. Subsequently, an improved APF method is proposed by introducing the second virtual target attraction potential field, which successfully overcomes the local minimum point problem. Second, an active obstacle avoidance path planning and tracking model based on the improved APF is established. Finally, the superiority of the algorithm compared with the APF based on SDM is proved by the results of a CarSim/MATLAB co-simulation.

APF method based on SDM
The APF method is a virtual potential field force method proposed by Khatib. 30 As shown in Figure 1, the obstacle vehicle produces a repulsive force on the host vehicle. Simultaneously, the target point produces an attractive force on the host vehicle. Under the combined action of attraction and repulsion, the host vehicle moves in the direction of the resultant force. Subsequently, the host vehicle bypasses the obstacle vehicle and finally reaches the target point.

Model of the road potential field
Establishing an accurate mathematical model of the road boundary potential field is an important factor to ensure the safety of autonomous driving. As shown in Figure 1, the road on which the host vehicle travels is assumed to consist of two lanes. A and B are distributed on the right and left sides of the road, respectively. X and Y are the abscissa (direction of road width) and ordinate (direction of road length) of the road coordinate system, respectively. Therefore, according to the design principle of the AVs active obstacle avoidance system, the host vehicle should attempt to continue driving on the centerline of the A or B lane when the road is free of obstacle vehicles. If there is an obstacle vehicle on the road, the host vehicle should swerve to bypass it. Additionally, host vehicles should avoid driving out of the boundary on both sides of the road to prevent more severe traffic accidents.
Thus, the function P x of the road lateral dangerous potential field changing with the X direction is expressed as 28,29 The function P z of the road longitudinal dangerous potential field changing with the X direction is expressed as The function P y of the road longitudinal dangerous potential field changing with the Y direction is given by where ðX 0 ; Y 0 Þ represents the coordinates of the obstacle, D b represents the safe distance of the host vehicle, and D t represents the transition area. Therefore, the function U r of the road dangerous potential field is expressed as The lateral repulsion expression F rx of the road is given by The longitudinal repulsion expression F ry of the road is given by The attractive potential field expression U att is given by where D s represents the distance range of the vehicle forward path search, and X r represents the centerline of the A lane. Y v is the longitudinal position of the center of mass of the main vehicle in the coordinate system. The lateral attractive force expression F x att of the road is given by The longitudinal attractive force expression F y att of the road is given by Model of safety distance. When constructing the potential field of an obstacle vehicle, factors such as vehicle braking, steering performance, and road structure parameters should be considered. In addition, it is necessary to ensure that the host vehicle has sufficient decision-making time for steering behavior and high handling stability for active obstacle avoidance. Therefore, the safety distance D b and transition distance D t of active obstacle avoidance should be ensured to be at least 29 where v 1 and v 2 represent the initial speeds of the host and obstacle vehicles, respectively, on the road, F m represents the maximum braking force of a single wheel, M is the total mass of the host vehicle, L 1 is the body length of the obstacle vehicle.

Model of obstacle vehicle potential field
When the distance between the host and obstacle vehicles is D b , the host vehicle will perform active steering to avoid obstacles. At this time, the longitudinal coefficient c 2 of the obstacle repulsion field is expressed as The lateral coefficient expression c 1 of the obstacle repulsion field is given by where P t represents the switching threshold of the dangerous potential energy when the host vehicle approaches the obstacle vehicle, and L w represents the width of the vehicle body. According to equations (12) and (13), coefficients c 1 and c 2 are primarily determined by the switching threshold of dangerous potential energy, road structure parameters, and the dynamic characteristics of the vehicle.
Thus, the dangerous potential field U rep of the obstacle vehicle can be expressed as 31 Therefore, the lateral repulsion F x rep of the obstacle vehicle can be expressed as The longitudinal repulsion F y rep of the obstacle vehicle is given by The potential field expression U d ðX ; Y Þ of the vehicle at different positions is given by Furthermore, the resultant force F d received by the vehicle at different positions is given by Therefore, the road-obstacle vehicle potential field distribution is shown in Figure 2. The dangerous potential field at the center and sides of the road ensures that the host vehicle can stay in the center of the lane.

Improved APF model
Under certain road conditions, the APF method with the addition of a safe distance may have problems such as local minimum points. As shown in Figure 3, a possible road condition in which the host vehicle falls into a local minimum point is described as follows: When the host vehicle is driving normally in lane A, the slow moving obstacle vehicle in lane B ahead encounters an emergency and is driven laterally into lane A. Here, the speed difference between the obstacle and host vehicles behind it increases. The distance between the obstacle and host vehicles decreases, while D o < D b . As shown in Figure 4, the repulsive and attractive forces received by the host vehicle are collinear at this time, and the repulsive force increases continuously. Therefore, the preset safe and transition distances cannot completely eliminate the risk of falling into a local minimum point. This is likely to cause serious traffic accidents to the host vehicle. Therefore, this article proposes a solution to address the problem of AVs falling into a local minimum point. In other words, by introducing an interference factor for the second virtual target potential field, the equilibrium state of the potential field is broken. The host vehicle can then successfully eliminate the local minimum point and smoothly bypass the obstacle vehicle. Finally, the vehicle successfully reaches its target.
This method includes three steps. (1) It is determined whether the host vehicle is trapped at a local minimum The main process and algorithm are detailed as follows. Before the host vehicle falls into a local minimum point, it is driven in the direction of decreasing potential energy. At this point, the potential energy decreases. The resultant potential energy oscillation occurs after the host vehicle falls into the local minimum point. Therefore, the judgment condition for falling into the local minimum point can be set to 32 where U d represents the resultant potential energy at this moment, and U d ðt þ DtÞ represents the resultant potential energy at the next moment. When the host vehicle falls into a local minimum point, the potential energy at the next moment is greater than that at the current moment. Thus, e ! 0 should be set. The smaller the value, the more sensitive the judgment. To ensure the safety performance of the host vehicle, e is set to 0 in this article.

Virtual target point
After determining that the host vehicle is trapped at a local minimum point, the selection of the virtual target point position must be considered. First, it is necessary to ensure that the addition of this point will not cause it to combine with the repulsion or attraction field, causing the host vehicle to fall into the local minimum point again. Second, according to the design principle of the vehicle's active obstacle avoidance system, the host vehicle should try to keep driving on the centerline of the lane in actual driving. In other words, when the host vehicle adopts the behavior of turning to avoid obstacles, it should take priority to drive into the centerline of the adjacent lane. Thus, the abscissa X 1 of point P 1 should be set on the centerline of the lane B. In addition, the point P 1 should also ensure that the host vehicle can receive a large attractive potential force when it falls into a local minimum point. Then, the host vehicle can quickly get rid of the local minimum point and successfully complete the active obstacle avoidance. In summary, the virtual target point coordinates are set at P 1 X 1 ; Y 0 þY v 2 À Á . Subsequently, based on the spatial geometric relationship, the minimum distance d min between the virtual target point P 1 and the mass center point of the host vehicle P v ðX v ; Y v Þ is given by

Second virtual potential field force
To ensure that the introduced virtual target point can successfully solve the local minimum point problem, we introduce a reasonable attractive potential field function. The function must be able to trigger quickly and act as the main influencing factor when the host vehicle falls into a local minimum point.
The second virtual target attraction potential field function U tow is expressed as where K represent the attractive potential field gain coefficient. The corresponding potential field force F tow is the negative gradient of the attraction potential field U tow . Thus, the function of the second virtual target attraction potential field force F tow is given by F tow ¼ ÀrU tow ¼ ÀKd min (22) As shown in Figure 6, the host vehicle moves toward the virtual target point under the guidance of the second virtual potential field force. Subsequently, after removing the local

CarSim/MATLAB co-simulation
We assume that the host vehicle is driving normally in lane A at 25 m/s. Thereafter, the obstacle vehicle driving slowly in lane B ahead of the host vehicle encounters an emergency and rapidly enters lane A. Here, the speed difference between the obstacle vehicle and host vehicle behind increases, and the distance between the vehicles is smaller than the preset safe distance. Thus, the preset vehicle safety and transition distances cannot completely eliminate the risk of falling into a local minimum point. Thus, the host vehicle can be trapped at the local minimum point and local oscillations. To verify the feasibility of the improved APF under the aforementioned road conditions and the effect of path planning, we first performed a simulation analysis using MATLAB software. The simulation parameters and their corresponding values are listed in Table 1. Second, a CarSim/Simulink co-simulation platform was built. Subsequently, a MATLAB/CarSim co-simulation of the host vehicle's active obstacle avoidance was performed under road conditions of constant-speed and variable-speed obstacle vehicles. The mature optimal driver model in the CarSim software was used to track the obstacle avoidance path. We verified whether the obtained active obstacle avoidance path can satisfy the dynamic and kinematic requirements of an actual vehicle.

Constant velocity obstacle vehicle operating condition
To verify the obstacle avoidance path tracking performance of the host vehicle under the constant-speed obstacle vehicle operating condition, we performed a path tracking simulation analysis. The speeds of the host and obstacle vehicles were 25 and 15 m/s, respectively. Figure 7 shows that the maximum lateral tracking error between the actual travel path and planned path of the host vehicle was approximately 0.21 m. This demonstrated that the host vehicle can achieve a better tracking performance under the constant-speed obstacle vehicle operating condition. This also proved that the planned obstacle avoidance path can satisfy the requirements of actual road conditions. Let us assume that under the initial operating conditions, the obstacle vehicles in lane B drive laterally into lane A with constant longitudinal speeds of 5 and 0 m/s, respectively. Here, the distance between the obstacle and host vehicles is 22 m. Therefore, according to the current position and speed information of the obstacle vehicle, the host vehicle searches for and plans the obstacle avoidance path in real time. As shown in Figure 8(a), the speeds of the host and obstacle vehicles are 25 and 5 m/s, respectively. The distance between the host and obstacle vehicles is relatively small. At this time, the repulsive and attractive forces on  the host vehicle are collinear, and the repulsive force is greater than the attractive force. Consequently, the host vehicle using the APF method based on the SDM falls into a local minimum point between 0 and 2s. Local oscillation occurs in the driving path, which causes a significant safety hazard. However, the host vehicle using the improved APF method immediately triggers the second virtual attractive potential field when it is near the minimum point. After the host vehicle quickly escapes the local minimum point, it actively cancels the virtual target point. Finally, active obstacle avoidance of the host vehicle is completed. Figure 8(b) shows the simulation results of the active obstacle avoidance path when the obstacle and host vehicles have constant speeds of 0 and 25 m/s, respectively. The results indicated that the host vehicle using the APF method based on the SDM fell into a local minimum point between 0 and 2s. Here, the driving path of the vehicle oscillated locally, and the vehicle turned violently to avoid obstacles at approximately 1.8s, resulting in a significant increase in its security risk. However, the host vehicle using the improved APF method could quickly exit the local minimum point and smoothly bypass the obstacle vehicle.
In summary, under the constant-speed obstacle vehicle operating condition, the host vehicle based on the improved APF has a better active obstacle avoidance performance and path tracking performance. Compared to the APF method based on the SDM, it has higher security. Additionally, the host vehicle using the improved APF method can rapidly jump out of the local minimum point and successfully complete the vehicle's active obstacle avoidance.

Varying velocity obstacle vehicle operating condition
As shown in Figure 9, this simulation verified the obstacle avoidance path tracking performance of the host vehicle under a varying velocity obstacle. When the longitudinal speed of the obstacle vehicle changed, as shown in Figure 10, the maximum lateral tracking error between the actual travel path and planned path of the host vehicle was approximately 0.4 m. This demonstrated that a better tracking performance can be achieved when the speed of the host vehicle was 25 m/s. Moreover, we proved that the obtained obstacle avoidance path can satisfy the requirements of actual road conditions. Let us assume that, under the initial operating conditions, the obstacle vehicle with an initial longitudinal speed of 8 or 4 m/s is driven laterally from lane B into lane A, and   the obstacle vehicle brakes urgently at a braking deceleration of 8 m/s 2 . At this time, the distance between the obstacle and host vehicles is 22 m. To avoid a collision accident with an obstacle vehicle, the host vehicle should bypass the obstacle vehicle based on the actual traffic situation. Figure 11(a) and (b) shows the simulation results of the active obstacle avoidance path under the variable-velocity obstacle vehicle operating condition. When the speed of the obstacle vehicle changed, as shown in Figure. 12(a) and (b), the speed difference between the obstacle and host vehicles increased. Simultaneously, the distance between the obstacle vehicle and host vehicle decreased, and D o < D b . At this time, the repulsive and attractive forces on the host vehicle were collinear, and the repulsive force continued to increase. Subsequently, the host vehicle based on the APF and SDM fell into a local minimum point between 0 and 2s. Consequently, local oscillations occurred along the travel path of the vehicle. It steered violently after 1.7 and 1.8s. The security risk increased significantly. However, when the host vehicle based on the improved APF approached the minimum point, the second virtual attractive potential field was immediately triggered. After the host vehicle quickly exited the local minimum point, it actively canceled the virtual target point. Finally, active obstacle avoidance of the host vehicle was successfully completed.
In summary, under the variable-velocity obstacle vehicle operating condition, the host vehicle based on the improved APF has better active obstacle avoidance performance and path tracking performance. Compared with APF based on SDM, it has higher security. Additionally, the host vehicle using the improved APF method can quickly escape the local minimum point and successfully complete the vehicle's active obstacle avoidance.

Conclusion
Aiming at the local minimum point problem in APF based on SDM, this study investigated an improved APF method by introducing a second virtual target attraction potential field. Second, an active obstacle avoidance path planning and tracking model for AVs was established based on the improved APF. Finally, a MATLAB/CarSim co-simulation of active obstacle avoidance was performed under road conditions with constant-and variable-velocity obstacle vehicles. The co-simulation results showed that the improved APF method can effectively solve the local minimum point problem of the APF based on the SDM. Additionally, the path planning method for active obstacle avoidance based on the improved APF exhibits better performance in active obstacle avoidance and path tracking. Compared with the APF based on the SDM, the proposed method has higher security and stability.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.