Obstacle-Avoidance Path-Planning Algorithm for Autonomous Vehicles Based on B-Spline Algorithm

<jats:p>To solve the problem of the real-time path-planning of autonomous vehicles for obstacle avoidance on structured roads, a path-planning approach based on the B-spline algorithm is proposed in this paper. Firstly, the mechanism of driver path planning is analyzed, and a dynamic risk-identification model based on the support vector machine is proposed. It combines the driver’s risk perception characteristics and a risk model. Then, the B-spline algorithm model is improved based on the risk-identification model. Furthermore, road features, road constraints and dynamic constraints are considered to further optimize the planning algorithm. To verify the path-planning approach proposed in this paper, a co-simulation experiment based on CarSim/Simulink is conducted. Results show that the improved algorithm is effective in static and dynamic obstacles avoidance. The algorithm can generate collision-free obstacle avoidance paths, and the paths meet the real-time requirements and dynamic constraints of obstacle avoidance scenarios. In addition, the proposed algorithm optimizes the path according to the driver’s operating characteristics, which can further improve the safety and comfort of autonomous vehicles.</jats:p>

section_content: Autonomous vehicles can reduce traffic accidents, improve traffic efficiency, reduce the operating burden of drivers and effectively improve the overall security of the traffic system [1, 2]. In recent years, the research on the technologies related to autonomous vehicles has received extensive attention and concern. Before realizing autonomous driving, we still need to solve the key problems, including real-time dynamic environment perception, complex decision making, dynamic path planning and so on [3] [4] [5]. Dynamic path planning needs to combine real-time environmental information to plan a real-time, reasonable and collision-free path. It is the key technology for the safe driving of autonomous vehicles. Many scholars have carried out a lot of research on dynamic path planning. 

Path planning finds the available trajectory for an autonomous vehicle in an environment with obstacles, so that they can be avoided. Dynamic obstacle-avoidance path planning has the characteristics of time-varying and highly dynamic scenes, which makes it difficult to design an algorithm with real-time capabilities; it is easy for solutions to fall into local optima [6, 7]. The current path-planning algorithms cannot meet all the working conditions needed and cannot ensure the optimal path selection. There is a certain tension between the real-time performance of the algorithm and the planning performance [8, 9]. In the research of local path planning for autonomous vehicles, how to use an appropriate planning algorithm according to the information while taking into account the search efficiency, and how to establish a relatively perfect path-planning model for obstacle-avoidance path planning and path optimization for autonomous vehicles in a dynamic environment have become new research hot spots. Common methods for vehicle obstacle avoidance path planning include the intelligent water drop algorithm, the grid method, the artificial potential field method, the rapidly exploring random tree (RRT) algorithm and the probabilistic road maps (PRM) algorithm. Ji et al. used the trapezoidal acceleration method to design the virtual ideal trajectories in lane changes, solved the relationship between the change rate of lateral acceleration and the lane change time and solved the planning problem of finding a lane-change path in a setting with known road parameters [10]. In order to improve the safety of obstacle-avoidance path planning, Luo converted the planning problem into a constrained optimization problem by using the time and distance involved in a lane change and designed a trajectory-function planning method based on a quantization polynomial [11]. This method can update the reference trajectory during lane change to avoid potential collisions. Chen proposed a low-speed obstacle-avoidance pathplanning method for autonomous vehicles based on the polar coordinate algorithm [12]. This algorithm has high adaptability in complex scenes, and the real-time performance and application performance of the algorithm still need to be improved. Wang fused the vehicles parameters and the driver's intention to quickly evaluate the risk level faced by vehicles during driving, and generated a smooth, safe collision-avoidance trajectory based on the improved fast exploration random tree algorithm according to the risk level [13]. 

Considering the requirements of safety and real-time performance in dynamic traffic scenario, an obstacle-avoidance path-planning algorithm based on B-spline curves for autonomous vehicles is proposed in this paper. The main contributions of this paper are as follows: firstly, the mechanism of driver path planning is analyzed, and a dynamic risk-identification model based on the support vector machine is proposed. It combines the driver's risk perception characteristics and a risk model. Then, the B-spline algorithm model is improved based on the risk-identification model. Furthermore, road features, road constraints and dynamic constraints are considered to further optimize the planning algorithm.
section_name: Introduction

section_content: According to research by the national highway traffic safety administration (NHTSA), nearly 30% of traffic accidents occur during lane changes [14]. In a dynamic traffic scenario, vehicles can avoid obstacles by changing lanes. Therefore, the establishment of a quantitative model of lane-changing risk has great influence in the path-planning algorithm design. In order to reduce the property loss and personal injuries caused by traffic accidents, researchers have classified the possible accidents during lane change and established risk-identification models [15]. The results showed that the severity of a collision during a lane change is related to the speed, motion state and physical characteristics of the obstacle. Therefore, combining the characteristics of the obstacle with the psychological characteristics and operational characteristics of drivers, the researchers believe that performing the obstacle avoidance operation 0. 3 to 1 s in advance would effectively improve the safety of the obstacle-avoidance process [16]. On this basis, a simplified obstacle-avoidance safety model was established by combining the above driving-risk model and driver-behavior characteristics. By analyzing the obstacle-avoidance-operation characteristics of human drivers, it can be seen that the parameters of the obstacle ahead, including the size, type, weight and other factors, have a great impact on the driver's lane-change decision. When the mass and volume of the obstacles are large, the driver thinks that the risk index of the current lane is high and tends to avoid the obstacle in advance. In addition, when the width of obstacles is large or the obstacle shows a trend of lateral movement, besides changing lane in advance, drivers usually keep larger lateral distance from obstacles to ensure the safety of the ego vehicle. 

In actual driving process, the obstacle avoidance strategies of static obstacles and dynamic obstacles are different. Due to the uncertainty of dynamic obstacles, the design of obstacle avoidance strategies and path-planning algorithms is more complex. Therefore, the generated paths of autonomous vehicle obstacle avoidance should not only be collision free; they should also optimize the generated paths with real-time scenario information, which can further improve the availability and safety of generated paths. Human drivers will plan and choose different obstacle avoidance paths through different types of obstacles. One of the key factors of the driver path-planning strategy is to evaluate the ego vehicle collision damage degrees with different obstacles [17]. The collision loss function describes the loss caused by collision between an ego-vehicle and obstacles when collision is unavoidable. The data show that the collision loss is related to the attributes of the collision object. The damage degree of ego-vehicle increases with the obstacle mass in collision. Therefore, the mass ratio of obstacle and ego-vehicle can be used to describe the impact of mass on collision loss. In addition, higher relative speed will also cause greater collision losses. Similarly, the speed ratio of the obstacle and the ego-vehicle can be used to describe the impact of speed on collision loss. Furthermore, the distance between the obstacle and egovehicle should also be considered, and the distance ratio is also used to describe collision losses. Based on the above analysis, the collision loss equation between ego-vehicle and obstacle can be expressed as [17] :

where ∆v 0 is the speed difference between the vehicle and the object i. In the determination of type T i value, the standard value can be set to one. For other types of objects, the T value is the ratio of the average loss of this type of object to the average loss of the standard type. When collisions are unavoidable, the types of obstacles that collide with autonomous vehicles can be generally divided into three types [17]. Additionally, according to the types, the risky level can be divided into three levels. Based on the above collision loss model, the risk level of obstacles ahead is related to their shape, weight and relative speed. In order to complete the dynamic risk assessment of autonomous vehicles, according to the above risk assessment model, an obstacle risk identification model based on support vector machine (SVM) is proposed. The model is trained with the NGSIM dataset. Various traffic state databases such as vehicle category, size, position, speed, acceleration, space headway, time headway and relationship with surrounding vehicles in the dataset are set as the input of the model. In order to obtain the optimal results, particle swarm optimization (PSO) algorithm is used to optimize the SVM model. The penalty coefficient C and the Gaussian kernel parameter g with the highest classification accuracy are selected. The optimization process is shown in Figure 1. 

sion. Therefore, the mass ratio of obstacle and ego-vehicle can be impact of mass on collision loss. In addition, higher relative speed w collision losses. Similarly, the speed ratio of the obstacle and the eg to describe the impact of speed on collision loss. Furthermore, the obstacle and ego-vehicle should also be considered, and the distanc describe collision losses. Based on the above analysis, the collision l ego-vehicle and obstacle can be expressed as [17] :

where ∆v 0 is the speed difference between the vehicle and the objec tion of type Ti value, the standard value can be set to one. For other value is the ratio of the average loss of this type of object to the averag type. When collisions are unavoidable, the types of obstacles that mous vehicles can be generally divided into three types [17]. Addi the types, the risky level can be divided into three levels. 

Based on the above collision loss model, the risk level of obstac their shape, weight and relative speed. In order to complete the dyn of autonomous vehicles, according to the above risk assessment m identification model based on support vector machine (SVM) is pro trained with the NGSIM dataset. Various traffic state databases suc size, position, speed, acceleration, space headway, time headway a surrounding vehicles in the dataset are set as the input of the mod the optimal results, particle swarm optimization (PSO) algorithm is SVM model. The penalty coefficient C and the Gaussian kernel param est classification accuracy are selected. The optimization process is s To verify the performance of the constructed PSO-SVM model, the test datasets are imported for classification verification. The results are shown in Figure 2. Through comparison with the actual results in the test set, the PSO-SVM model can correctly identify the samples in the test set and complete the identification of the types and the risk identification of obstacles. 

To verify the performance of the constructed PSO-SVM model, t imported for classification verification. The results are shown in Figur parison with the actual results in the test set, the PSO-SVM model ca the samples in the test set and complete the identification of the types fication of obstacles.
section_name: Risk-Identification Model Based on SVM

section_content: The B-spline curve was proposed by Schoen-berg in the 1940s [ generates a curve shape by combining control points with B-spline ba bic quasi-uniform B-spline curve is used for path planning in this pap bility of the panel point at both ends is k, the curve starts at the first con at the last control point. In the path-planning algorithm design proces of remaining collision free and vehicle dynamics constraints should control points are selected according to the above constraints. In orde avoidance paths meeting the application conditions, the selected contr with the B-spline basis function and safety model. The specific relations control points and B-spline basis functions is as follows, where Pi (i = control point, and n + 1 control points are fused with B-spline curve ba B-spline is:

,
section_name: B-Spline Algorithm

section_content: The B-spline curve was proposed by Schoen-berg in the 1940s [18]. The algorithm generates a curve shape by combining control points with B-spline basis functions. A cubic quasi-uniform B-spline curve is used for path planning in this paper. As the repeatability of the panel point at both ends is k, the curve starts at the first control point and ends at the last control point. In the path-planning algorithm design process, the requirements of remaining collision free and vehicle dynamics constraints should be meet. Then, the control points are selected according to the above constraints. In order to obtain obstacle avoidance paths meeting the application conditions, the selected control points are fused with the B-spline basis function and safety model. The specific relationship among curves, control points and B-spline basis functions is as follows, where P i (i = 0, 1, 2,. . ., n) is the control point, and n + 1 control points are fused with B-spline curve baseline. The k-order B-spline is:

where B i,k (t) represents the B-spline basis function of the ith order k at point t, t is the position independent variable, k is the degree of the basis function and t ∈ [0, 1]. The recurrence formula of B-spline basis function is expressed as follows:

World Electr. Veh. J. 2022, 13, 233 5 of 15

where i = 0, 1, 2,. . ., k -1; C j k+1 = (n+1)! j!(n+1j). Based on the above two formulas, it can be seen that the spline curve is generated by weighting the control points according to the spline basis function. The shape of the curve can be adjusted by changing the position of the spline control point, and it can synthesize the optimization results and computational complexity. A cubic quasi-uniform B-spline curve is applied to complete path planning in this paper, then:

According to the spline basis function, the cubic B-spline curve can be expressed as:

where P i is the control point and P 0 is the starting point, take four points as control points to get the first cubic B-spline curve. Then, starting with P 1, draw the second curve with the following four control points. The second derivative between curves is continuous. 

The local obstacle avoidance path-planning process of autonomous vehicles is composed of obstacle detection, information processing and obstacle avoidance path generation. The autonomous vehicle obtains environment information and vehicle state information through on-board sensors. Based on the environment information and vehicle state information, the obstacle avoidance system of autonomous vehicle analyzes the real-time potential risk, and then the optimal obstacle avoidance path is generated. Additionally, the autonomous vehicle returns to the original lane after obstacle avoidance. The road model is established as shown in Figure 3. The length and width of the vehicle are h 0 and m 0, respectively. The length of the road is L and the width is 2r. During normal driving, the vehicle body shall be in the lane, and it will not cross the road boundary except during lane changes. Then, the selection range of B-spline control point position (x, y) is:

where P i is the control point and P 0 is the starting point, take four points to get the first cubic B-spline curve. Then, starting with P 1, draw with the following four control points. The second derivative between c ous. 

The local obstacle avoidance path-planning process of autonomou posed of obstacle detection, information processing and obstacle avoida tion. The autonomous vehicle obtains environment information and v mation through on-board sensors. Based on the environment informa state information, the obstacle avoidance system of autonomous vehicle time potential risk, and then the optimal obstacle avoidance path is gen ally, the autonomous vehicle returns to the original lane after obstacle avo model is established as shown in Figure 3. The length and width of the m0, respectively. The length of the road is L and the width is 2r. During the vehicle body shall be in the lane, and it will not cross the road bound lane changes. Then, the selection range of B-spline control point position and real-time environment information. The cubic quasi-uniform B-spline algorithm can ensure the smoothness of the generated path, while the parameters of control points have a great impact on path availability. Therefore, in order to further ensure the availability of the generated path, the selection of control points of B-spline algorithm is improved in combination with obstacle avoidance scenarios in this paper. In the process of obstacle avoidance, autonomous vehicles cross lane lines to the target lane. The collision probability during lane change is greater than the other stage. Therefore, it is necessary to analyze the obstacle avoidance process and establish an obstacle avoidance safety model. 

In the process of obstacle avoidance, the conditions under which the ego-vehicle does not collide with the moving obstacle in front can be expressed as:

where It can be seen in Figure 4 that the longitudinal displacement generated by the egovehicle during the obstacle avoidance process can be expressed by the following formula:

Similarly, the longitudinal displacement of the obstacle vehicle during the obstacle avoidance process shown in Figure 4 can be expressed by the following formula:

where c is the time period in which the ego-vehicle starts decelerate and reach the critical point of collision. In order to ensure that there is no collision within the time period of obstacle avoidance shown in Figure 4, it can be inferred from formula (7) that the initial distance S should meet the following conditions:

Combining the above formula with the vehicle kinematics model in the obstacle avoidance process shown in Figure 4, the minimum longitudinal safety distance required for the ego-vehicle to complete the obstacle avoidance without collision can be expressed as: It can be seen in Figure 4 that the longitudinal displacement generated by the egovehicle during the obstacle avoidance process can be expressed by the following formula:

Similarly, the longitudinal displacement of the obstacle vehicle during the obstacle avoidance process shown in Figure 4 can be expressed by the following formula:

where t c is the time period in which the ego-vehicle starts decelerate and reach the critical point of collision. In order to ensure that there is no collision within the time period of obstacle avoidance shown in Figure 4, it can be inferred from formula (7) that the initial distance S should meet the following conditions:

Combining the above formula with the vehicle kinematics model in the obstacle avoidance process shown in Figure 4, the minimum longitudinal safety distance required for the ego-vehicle to complete the obstacle avoidance without collision can be expressed as:

Autonomous vehicle obstacle avoidance and lane changes take a short time in real traffic scenarios. The following assumptions can be made: the ego-vehicle braking deceleration is constant and the speed of the obstacle is stable. The time taken for the ego-vehicle to decelerate to the same speed as the obstacle vehicle can be regarded as the critical time of collision. 

In a real traffic scenario, the relative speed of the vehicle is usually low when it overtakes an obstacle vehicle, resulting in errors in the calculation results of formula (11). In order to ensure driving safety, this paper improves the minimum safe distance model in formula (11) by considering the headway and driver behavior characteristics, and the improved model can be expressed as:

where c represents the headway, d 0 represents the safety breaking distance threshold, σ is the hazard characterization coefficient of obstacles, which σ ∈ [1, 1. 5]. By considering the drivers' operation characteristics and combining the real-time obstacle information, the original minimum longitudinal safe distance is improved. The improved safety model can adjust the selection of safety margin in different scenarios according to the type and moving state of obstacles. This improvement can optimize the path-planning algorithm, further improve the safety of the generated paths and ensure the safety of autonomous vehicle obstacle avoidance. 

The control points position of the B-spline algorithm should be determined according to the real-time position of obstacles on the road. The rear center point of the obstacle vehicle is selected as (x 0, -r

2 ), and the first control point is set as

. Meanwhile, in order to satisfy that the yaw of autonomous vehicle at the initial time is zero without sudden change, set P 2 = (x 0 + h 0 -minD, -r 2 ). To further strengthen this constraint, set the control point P 1 = (x 0 + h 0 2 -minD, -r 2 ). Assuming that the vehicle is driving at the original speed, when the distance from the obstacle vehicle to the collision-free critical position is minD. At this time, the displacement of the obstacle vehicle can be expressed as:

Therefore, when the obstacle vehicle reaches the critical position, its rear abscissa is x 0 + x 1. If the head abscissa of the autonomous vehicle is located at x 0 + x 1, the vehicle can cross the lane line to the target lane. This ensures that the ego-vehicle has enough safety space from the obstacle vehicle and the roadside. In addition, the lateral displacement of the ego-vehicle is small in this period, which ensures that the lateral acceleration takes place within a reasonable range. Therefore, the control point is P 3 = (x 0 + x 1, r 2 ). After entering the target lane, the autonomous vehicle will drive along the center of the target lane. When the ego-vehicle finishes overtaking and reaches a safe distance from the obstacle vehicle, the ego-vehicle will return to the original lane. The time required for the autonomous vehicle to complete the above operations can be expressed as:

where h 0 is the length of the ego-vehicle; h 1 is the length of the obstacle vehicle. Therefore, the starting abscissa of autonomous driving back to the original lane can be expressed as:

Then, the control point P 4 = (x 0 + x 1 + X obs t 2 +h 0, r 2 ), P 5 = (x 2, r 2 ) is selected. The path back to the original lane is set to be symmetrical with the obstacle avoidance path. Additionally, the control point P 6 = (minD + x 2h 0, -r 2 ), P 7 = (minD + x 2 -h 0 2, -r 2 ), P 8 = (minD+x 2, -r 2 ) is selected, respectively.
section_name: B-Spline Algorithm

section_content: In order to verify the availability of the proposed planning algorithm in this paper, a series of simulation experiments are carried out. To fully verify the planning performance of the algorithm, static and dynamic obstacles are set for simulation testing in the dynamic traffic scenario. 

The simulation results of autonomous vehicle avoiding static obstacles are shown in Figures 5 and 6. The results show that the proposed algorithm can generate available paths for autonomous vehicle in dynamic traffic scenarios. The vehicle can track the path to bypass the static obstacles. Additionally, the risk-identification model proposed in this paper can complete the risk assessment of obstacles according to different obstacles. Additionally, the algorithm can generate different obstacle avoidance paths according to the real-time risk assessment results. For obstacles with higher risk level, the generated path has a higher safety margin. In addition, a large safety margin will be reserved when the relative speed between the ego-vehicle and the obstacle is large. The path planned by the algorithm proposed in this paper is more consistent with the operation habits of human drivers, which can further ensure vehicle safety and improve ride comfort.
section_name: Simulation Analysis

section_content: the real-time risk assessment results. For obstacles with higher risk level, the generated path has a higher safety margin. In addition, a large safety margin will be reserved when the relative speed between the ego-vehicle and the obstacle is large. The path planned by the algorithm proposed in this paper is more consistent with the operation habits of human drivers, which can further ensure vehicle safety and improve ride comfort. The simulation results of vehicles avoiding dynamic obstacles are shown in Figure 7 and Figure 8. The results show that the proposed algorithm can generate available paths for autonomous vehicles in a dynamic traffic scenario with moving obstacles. When the speed of the obstacle vehicle is 10km/h and the speed of the ego-vehicle is 35km/h and 70km/h, respectively, the algorithms in the above scenarios can generate reasonable realtime obstacle avoidance paths. The vehicle can track the path to bypass the moving obstacles. Furthermore, the risk-identification model proposed in this paper can complete the risk assessment of moving obstacles according to different moving states. Collision-free paths can be real-time generated for different types of vehicles in dynamic scenarios. A large safety margin will be reserved when the size of moving obstacle vehicles is large, which further ensures the safety performance of the generated paths. In addition, the generated paths also conform to the boundary constraints of the structured road, which can keep the ego-vehicle driving in the center of the structured road lane. the real-time risk assessment results. For obstacles with higher risk level, the generated path has a higher safety margin. In addition, a large safety margin will be reserved when the relative speed between the ego-vehicle and the obstacle is large. The path planned by the algorithm proposed in this paper is more consistent with the operation habits of human drivers, which can further ensure vehicle safety and improve ride comfort. The simulation results of vehicles avoiding dynamic obstacles are shown in Figure 7 and Figure 8. The results show that the proposed algorithm can generate available paths for autonomous vehicles in a dynamic traffic scenario with moving obstacles. When the speed of the obstacle vehicle is 10km/h and the speed of the ego-vehicle is 35km/h and 70km/h, respectively, the algorithms in the above scenarios can generate reasonable realtime obstacle avoidance paths. The vehicle can track the path to bypass the moving obstacles. Furthermore, the risk-identification model proposed in this paper can complete the risk assessment of moving obstacles according to different moving states. Collision-free paths can be real-time generated for different types of vehicles in dynamic scenarios. A large safety margin will be reserved when the size of moving obstacle vehicles is large, which further ensures the safety performance of the generated paths. In addition, the generated paths also conform to the boundary constraints of the structured road, which can keep the ego-vehicle driving in the center of the structured road lane. The simulation results of vehicles avoiding dynamic obstacles are shown in Figures 7 and 8. The results show that the proposed algorithm can generate available paths for autonomous vehicles in a dynamic traffic scenario with moving obstacles. When the speed of the obstacle vehicle is 10 km/h and the speed of the ego-vehicle is 35 km/h and 70 km/h, respectively, the algorithms in the above scenarios can generate reasonable real-time obstacle avoidance paths. The vehicle can track the path to bypass the moving obstacles. Furthermore, the risk-identification model proposed in this paper can complete the risk assessment of moving obstacles according to different moving states. Collision-free paths can be real-time generated for different types of vehicles in dynamic scenarios. A large safety margin will be reserved when the size of moving obstacle vehicles is large, which further ensures the safety performance of the generated paths. In addition, the generated paths also conform to the boundary constraints of the structured road, which can keep the ego-vehicle driving in the center of the structured road lane. risk assessment of moving obstacles according to different moving states. Collision-free paths can be real-time generated for different types of vehicles in dynamic scenarios. A large safety margin will be reserved when the size of moving obstacle vehicles is large, which further ensures the safety performance of the generated paths. In addition, the generated paths also conform to the boundary constraints of the structured road, which can keep the ego-vehicle driving in the center of the structured road lane.
section_name: 3, x FOR PEER REVIEW 8 of 15

section_content: The path-planning algorithm for autonomous vehicles should not only meet the requirements of a collision-free path, but also meets the requirements of path smoothness. paths can be real-time generated for different types of vehicles in dynamic scenarios. A large safety margin will be reserved when the size of moving obstacle vehicles is large, which further ensures the safety performance of the generated paths. In addition, the generated paths also conform to the boundary constraints of the structured road, which can keep the ego-vehicle driving in the center of the structured road lane.
section_name: Path Tracking Method Based on LQR

section_content: The path-planning algorithm for autonomous vehicles should not only meet the requirements of a collision-free path, but also meets the requirements of path smoothness.
section_name: Path Tracking Method Based on LQR

section_content: The path-planning algorithm for autonomous vehicles should not only meet the requirements of a collision-free path, but also meets the requirements of path smoothness. The generated paths are smooth and can be tracked by autonomous vehicles. The generated path should conform to the dynamic constraints of the vehicle. Therefore, it is necessary to further verify the availability of the generation paths. The effectiveness of the path generated by the obstacle avoidance path algorithm can be fully verified through real vehicle experiments. However, due to the high cost of real vehicle experiments and the risk of real vehicle high-speed path tracking experiments, most path availability experiments are currently completed through Co-simulation experiments. 

In order to verify the path availability, a path tracking model based on a Linear Quadratic Regulator (LQR) approach for autonomous vehicles is established in this paper. This method mainly obtains the optimal control effect by solving the state space equation and performance index function of the system [19]. The tracking control system in this paper consists of a prediction module, an error calculation module, a feedback coefficient calculation module, a feedforward control module and a front-wheel-angle control module. The tracking system calculates the next vehicle state according to the current vehicle position, speed, yaw angle, yaw rate and other parameters. Then, the calculated vehicle state is compared with the tracking path parameters to obtain the error. Finally, the error is combined with the feedback coefficient and feedforward value obtained from the vehicle steering index to control the front wheel angle of the vehicle. 

Combined with the two-degree-of-freedom vehicle dynamics model, the state space of the vehicle error model can be expressed as:

. 

where:

where C ∂ f is the front wheel steering stiffness, C ∂r is the rear wheel steering stiffness, u is the front wheel angle, m is the vehicle mass, ϕ is the vehicle yaw angle and θ is the course angle of the vehicle speed at the projection point under the Frenet coordinate system. 

. θ is the course angle derivative of vehicle speed at the projection point in the Frenet coordinate system. v x is the longitudinal speed of the vehicle. a is the distance from the front axle to the barycenter. b is the distance from the rear axle to the barycenter. e d is the lateral error. 

. e d is the derivative of lateral error. I z is the moment of inertia of the vehicle about the z-axis perpendicular to the ground. 

Due to the discrete LQR control mode in this paper, Equation ( 16 ) needs to be discretized. Ignoring C. θ, the formula can be expressed as:

. e = Ae + Bu,

Then, after discretization of the formula, the following formula is obtained:

where:

where I is the identity matrix. By establishing the following cost function:

where Q and R are the diagonal matrix, the parameter represents the weight coefficient of each variable. By calculating its minimum value under the constraint of Equation (23), then:

where

, it is called the feedback coefficient. P is obtained by the Riccati formula constructed in the solution process through multiple iterations. The Riccati formula is:

when u =ke, the formula of ( 16 ) can be converted into:

. 

In this formula,. 

e and e cannot be zero at the same time; that is, the error cannot be kept to zero during vehicle driving. Therefore, it needs the feedforward control part to optimize. The following formula is established:

where δ f is the feedforward control part. So

To satisfy that e is as zero as possible when. 

e is zero, after approximating some values, then:

where K is the curvature of the curve. 

In order to verify the availability of the generated path, a steering control module for autonomous vehicles based on LQR is established in this paper. Then, based on the proposed LQR tracking control algorithm, the MATLAB/CarSim Co-simulation experiments are carried out. For the four obstacle avoidance scenarios in this paper, the scenario of ego-vehicle to avoid dynamic obstacles requires high smoothness of the path. Therefore, a series of co-simulation tests are conducted to verify the availability of the generated paths. In the test scenarios, the speed of the obstacle vehicle is 10 km/h, and the controlled vehicle runs along the planned path at 35 km/h and 70 km/h, respectively. The ego-vehicle detects the obstacle and completes obstacle avoidance, and returns to the original lane after overtaking the obstacle vehicle. The proposed path-planning module generates the obstacle avoidance path according to the obstacle vehicle and environmental information, and the controlled vehicle tracks the generated path based on the proposed LQR algorithm. The simulation parameters of controlled vehicle are shown in Table 1. The steering wheel angle curve of the vehicle during the simulation is shown in Figure 9. The steering wheel angle curve is smooth and continuous without oscillation and sudden change. The simulation results show that the generated path is available and conforms to the operating characteristics of human drivers. 

Electr. Veh. J. 2022, 13, x FOR PEER REVIEW and the controlled vehicle tracks the generated path based on the prop rithm. The simulation parameters of controlled vehicle are shown in Tab The steering wheel angle curve of the vehicle during the simulation ure 9. The steering wheel angle curve is smooth and continuous withou sudden change. The simulation results show that the generated path is a forms to the operating characteristics of human drivers. Figure 11 shows the lateral acceleration curve of the controlled vehic the figure, when the controlled vehicle avoids obstacles at a speed of 70 k acceleration of the vehicle is large, and the maximum acceleration is 3. 65 m ulation scenario, the vehicle is running on a dry asphalt road. In order to vehicle tires are in a linear working area, the maximum lateral acceleration than 3. 92 m/s 2 (0. 4 times of the gravitational acceleration). The small late ensures the stability and comfort of the vehicle and proves the availability Figure 11 shows the lateral acceleration curve of the controlled vehicle. As shown in the figure, when the controlled vehicle avoids obstacles at a speed of 70 km/h, the lateral acceleration of the vehicle is large, and the maximum acceleration is 3. 65 m/s 2. In this simulation scenario, the vehicle is running on a dry asphalt road. In order to ensure that the vehicle tires are in a linear working area, the maximum lateral acceleration should be less than 3. 92 m/s 2 (0. 4 times of the gravitational acceleration). The small lateral acceleration ensures the stability and comfort of the vehicle and proves the availability of the path. The simulation results show that the paths generated by the path-p are collision free in both scenarios, and the controlled vehicle can accurate The simulation results show that the paths generated by the path-planning module are collision free in both scenarios, and the controlled vehicle can accurately track the generated reference path at speeds of 35 km/h and 70 km/h. The key dynamic parameters of the vehicle in the simulation process are analyzed. The results show that the controlled vehicle can ensure the vehicle handling stability when tracking the generated obstacle avoidance paths. The relatively small lateral acceleration can also ensure the driving comfort of the controlled vehicle, and can meet the vehicle dynamics constraints and lane constraints. All results prove that the proposed path-planning algorithm is consistent with the expected lane change results, and it meets the requirements of autonomous vehicle obstacle avoidance path planning.
section_name: Path Tracking Method Based on LQR

section_content: In order to realize the obstacle avoidance function in the dynamic traffic scenario, a path-planning approach based on the B-spline algorithm is proposed in this paper. Firstly, the mechanism of driver path planning is analyzed, and a dynamic risk-identification model based on the support vector machine is proposed. It combines the driver's risk perception characteristics and a risk model. Then, the B-spline algorithm model is improved based on the risk-identification model. Furthermore, road features, road constraints and dynamic constraints are considered to further optimize the planning algorithm. To verify the path-planning approach proposed in this paper, a co-simulation experiment based on CarSim/Simulink was conducted. Results show that the improved algorithm is effective in static and dynamic obstacles avoidance. The algorithm can generate collision free obstacle avoidance paths, and the paths meet the real-time requirements and dynamic constraints of obstacle avoidance scenario. In addition, the proposed algorithm optimizes the path according to the driver's operating characteristics, which can further improve the safety and comfort of autonomous vehicles. 

Limited by experimental conditions, the proposed path-planning algorithm in this paper is verified through simulation under relatively ideal conditions. The verification scheme of obstacle planning is simplified by using relatively simplified traffic scenarios. In the future, obstacle avoidance path planning in a complex environment with multiple obstacles and variable speed will be studied.
section_name: Conclusions

section_content: Funding: This work was supported in part by the National Natural Science Foundation Project of China under Grant 52102465, the Shandong provincial programme of introducing and cultivating talents of discipline to universities: research and innovation team of intelligent connected vehicle technology, the Innovation team project of "Qing-Chuang science and technology plan" of colleges and universities in Shandong Province 2021KJ083, the key R & D projects in Shandong under Grant 2019GHZ016, the Major Innovation Projects in Shandong under Grant 2020CXGC010405 and 2020CXGC010406 and the Postdoctoral Science Foundation of China and Shandong under Grant 2020M680091 and 202003042.

section_name: Conflicts of Interest:

section_content: Data Availability Statement: Not applicable.

section_content: The authors declare no conflict of interest.
section_name: Conflicts of Interest: