Research on automatic emergency steering collision avoidance and stability control of intelligent driving vehicle

In view of the need for emergency steering to avoid collision when the vehicle is in a dangerous scene, and the stability control of the vehicle during collision avoidance. This paper proposes a planning and control framework. A path planner considering the kinematics and dynamics of the vehicle system is used to formulate the safe driving path under emergency conditions. LQR lateral control algorithm is designed to calculate the output steering wheel angle. On this basis, adaptive MPC control algorithm and four-wheel braking force distribution control algorithm are designed to achieve coordinated control of vehicle driving stability and collision avoidance safety. The simulation results show that the proposed algorithm can complete the steering collision avoidance task quickly and stably.


Introduction
The Advanced Driver Assistance Systems (ADAS) are effective in reducing crashes. Most ADAS systems have one thing in common, that is, they all affect the longitudinal control of the vehicle to avoid the collision (Borrello et al., 2020;Rabhi et al., 2021;Zha et al., 2021;Hang et al., 2022;Wu et al., 2023).
Although, there are certain situations where a collision cannot be avoided by braking but only by steering operations. However, lots of studies show that in the case of an impending rear-end collision, many drivers tend to only brake rather than try to avoid obstacles by steering (Schieben et al., 2014). There are different reasons for this behavior. Firstly, it is an instinctive reaction to stop in order to reduce the impact of an impending collision. Secondly, steering is more complex than braking, so it requires the driver to have a higher awareness of the situation and a higher driving ability. Therefore, Automatic Emergency Steering System (AES) is of great significance.
For vehicle trajectory planning, Yang proposed a dynamic planning method for vehicle collaborative trajectory planning under the scenario of forced lane change, which aims to provide suggested lane change distance and reference trajectory for each autonomous vehicle in a coordinated manner (Yang et al., 2022). A dynamic programming way is established to determine the suggested distance of all vehicles and the non-convex quadratic constraint is applied to characterize the trajectory determination problem. Considering driver comfort and collision risk, Li et al. (2022) proposed a human-like motion planning strategy based on probabilistic prediction under dynamic environment. They realized path generation based on quintic polynomials, and optimized the target trajectory by using cost functions with four indexes including safety, consistency, smoothness and distance from local path to global path. Cheng et al. (2022) proposed a deep reinforcement learning method based on time difference to solve the longitudinal trajectory planning of autonomous vehicles at signal-controlled intersections. Xiao et al. (2021) [10] proposed the control barrier function method for critical safety control and developed a real-time control framework that combines the optimal trajectory generated with the computational efficiency method that provides safety assurance.
Vehicle collision risk assessment is the key to trigger AES. For vehicle risk assessment,  proposed a multi-scene collision avoidance decision algorithm for autonomous vehicles, and used the situation assessment module based on conditional random field to assess the risk level of the surrounding traffic participants. Based on the situation assessment module, collision avoidance strategies with driving style preferences (such as aggressive or conservative) are proposed to meet the needs of different drivers. Cui et al. (2021) proposed a layered framework of manned or autonomous vehicles for collision avoidance in emergency situations. They adopted finite-state machine (FSM) technology to determine appropriate strategies for collision avoidance, and established a collision risk model, taking into account vehicle risks around overlapping areas, road attachment risks and vehicle stability performance. Gilbert et al. (2021) proposed a decision-making system that selects the lightest collision when vehicles are confronted with inevitable collisions on the highway. They applied the multi-attribute decision-making method to judge the severity of the collision. For the autonomous lane change decision of trucks, Chen et al. (2020) proposed a lane change decision model based on support vector machine. Ren and Wu, 2020 proposed a fusion architecture of decision planning under dynamic Environment And Used Back Propagation Neural Network (BPNN) to predict the lane change of vehicles around the block.
The AES control layer will track the trajectory planned by the decision layer. For the vehicle trajectory tracking, Ge et al., 2022 rely on the precise model for the traditional MPC. When the autonomous vehicle encounters external interference and perturbation, the steadystate non-offset tracking cannot be realized, and the MPC solver is biased to solve the coupling control problem.  studied that under extreme driving conditions, the coupling between the longitudinal and transverse motion of the vehicle becomes significant due to the highly non-linear force of the tire, which affects the stability of the vehicle. They proposed a model prediction controller of electric vehicle driven by four-wheel independent motor, in which changes in the longitudinal velocity are regarded as interference in the vehicle dynamics model. Then, the additional torque generated by the model-based controller with the multiobjective design is considered for balance. Tork et al. (2021) proposed an independent model control based on neural network for path tracking control. The control scheme utilized the input of steering Angle and torque to realize cooperative control of transverse and longitudinal motion.
In summary, collision avoidance and stabilization are the two critical issues when an autonomous vehicle in an emergency situation, which usually occurs in a short time and requires large actuator inputs, as well as a highly non-linear response. Real-time vehicle decision-making, planning and control plays an important role in avoiding collisions while stabilizing autonomous vehicles in extreme scenarios. Liu et al. (2017) proposed a method to establish the stability criterion of vehicle yaw based on the phase plane method of sideslip-yaw rate, which solved the problem of judging the type of vehicle stability region under different driving conditions, and provided a theoretical basis for the intervention algorithm of stability control system. Zhang et al. (2017) considered the influence of tire slip and actuator torque saturation on driving and braking, and designed a dynamic controller to overcome integral saturation by using a conditional integrator to ensure accurate tracking of the required signals under the influence of tire force and actuator constraints. Vehicle state and parameter estimation is an important part of vehicle dynamic control. Liu et al. (2021) proposed a new estimation method of vehicle side-slip angle based on kinematic model, which integrated the information of Global Navigation Satellite System (GNSS) and inertial Measurement Unit (IMU). Xia et al. (2018) proposed a method to estimate the attitude and lateral velocity of an autonomous vehicle with the assistance of vehicle dynamics using a sixdegree-of-freedom IMU. Liu et al. (2018) proposed a method based on kinematics model that integrates intelligent vehicle sensors to estimate sideslip angle, aiming at the problem that the non-linear characteristics and parameter uncertainties of vehicles make it difficult for the method based on dynamic model to estimate the sideslip angle of vehicles under harsh working conditions. Xiong et al. (2020) proposed a new automatic vehicle sideslip angle and attitude estimation method based on IMU for low sampling rate GNSS speed and position parallel adaptive Kalman filters.
The existing steering collision avoidance system often only considers the safety risk of collision avoidance, but does not consider the impact of dynamic factors on stability. At the same time, stability has a certain impact on tracking control accuracy, which should also be considered. Therefore, the contribution of this paper is to propose a real-time emergency steering collision avoidance and stability control method, and design a simulation experiment based on the influence of stability control on tracking accuracy and other factors.
As shown in Figure 1, the lateral path planning and path tracking control considering motion stability designed in this paper are parts of the coordinated control architecture of vehicle driving stability and collision avoidance safety, which can realize automatic collision avoidance control and ensure the vehicle's security and stability. Based on perception and state estimation information, the framework judges driving safety and collision risk and makes decisions based on TTC (time to collision), and uses dynamic programming and quadratic programming methods to plan paths and determine collision-free paths. Then, according to the characteristics of stability control in emergency collision avoidance scenarios, an adaptive MPC control algorithm is designed. Finally, the obtained steering wheel angle and four-wheel braking force are applied to the actual vehicle.

3-DOF vehicle dynamics model
We rationally simplified the vehicle model (Wu G. 2021) to obtain a three-degree-of-freedom(3-DOF) vehicle dynamics model, Frontiers in Robotics and AI frontiersin.org as shown in Figure 2, which mainly includes vehicle longitudinal, lateral and yaw motions, where δ f is the front wheel angle, and F Xi is the wheel braking force, F Yi is the wheel lateral force, v x is the longitudinal speed, v y is the lateral speed, v is the speed of the vehicle, β is the sideslip angle, l f and l r are the distance of the center of mass and the front and rear axles, l s is the wheelbase, β f is the sideslip angle of the front wheel, T d is the sum of the yaw moment of the vehicle, r is the yaw rate of the vehicle. The differential equations of motion of the vehicle: So far, the establishment of the 3-DOF model of the vehicle considering the lateral, longitudinal and yaw motions has been completed, and this model will be used to describe the basic characteristics of the vehicle during motion.

Linear tire model
In the case of a small vehicle front wheel angle, the relationship between the wheel lateral force and the sideslip angle of this wheel can be approximately regarded as a linear relationship (Wu G. 2021), thus: Where k f and k r are the cornering stiffnesses of the front and rear axles, respectively. Front and rear wheel sideslip angles, vehicle sideslip angle and their derivatives are:

Collision avoidance trajectory planning
The goal of trajectory planning is to generate a smooth enough curve to change the position of the vehicle under the premise of ensuring the safety of the vehicle. The smoothness is to ensure that the vehicle can track along the trajectory. The trajectory planning module will receive the environment information including vehicle location information and road information. A planned trajectory is transmitted to the vehicle motion control module as shown in Figure 3.

FIGURE 1
Coordinated control for vehicle driving stability and collision avoidance safety.

Frontiers in Robotics and AI frontiersin.org
Usually trajectory planning can be decomposed into speed planning and path planning. Since the change of speed is not considered in the planning process of steering collision avoidance, we assume that the longitudinal speed is constant in the planning process, and only the path planning is designed here.

Path planning
Using numerical methods, the path planning problem in discrete space can be abstracted as a quadratic programming problem, and the construction of this problem mainly includes two parts: the design cost function and the determination of the constraints of the problem. In designing the cost function, we need to consider the requirements of smoothness, not deviating from the road centerline and being away from obstacles. At the same time, in order to accelerate the solution, we first use dynamic programming to open up feasible space and therefore determine the constraints of the planning problem. After the problem is constructed, we use the iterative method to solve the quadratic programming problem.
The cost function of path planning can be divided into smoothing cost, reference line cost and obstacle cost. The road is discretized along the centerline and its perpendicular direction, x is the coordinate of the road centerline, and y is the coordinate of the point which is perpendicular to the road.
The smoothing cost Cp smooth is divided into three parts, Wp smooth1 , Wp smooth3 , and Wp smooth3 , and their meanings correspond to the cost weights generated by the first, second, and third derivatives of the path: Cp smooth Wp smooth1 y′ T y, +Wp smooth2 y″ T y″ + Wp smooth3 y″′ T y‴ (5) The reference line cost is Cp ref , and Wp ref represents the corresponding weight: The obstacle cost is Cp collision , Wp collision represents the corresponding weight, and d represents the distance between the obstacle and the vehicle, where Wp collision is a rather large value.
Combining the above three formulas, the total planning cost Cp node of each discrete point can be obtained, and its value is equal to the sum of the above three costs: The planned trajectory needs that the curvature is continuous. Δx is the sampling interval in the direction of the road centerline, y i ′ is the first derivative of y to x at the i-th sampling point, y i ″ is the second derivative of y to x at the i-th sampling point: The solution of the planning is first to obtain the initial solution by dynamic programming, and then to obtain the final result by secondary programming, as shown in Figure 4. In order to speed up the calculation of the quadratic programming problem, the result of the dynamic programming is regarded as a rough solution and a feasible space is opened up. y max(j) , y min(j) is the maximum and minimum value of the feasible space, y min(j) ′ , y max(j) ′ is the value range of the path restricted by the road, y obs is the position corresponding to the obstacle car, width/2 is the width of the obstacle car:

Quadratic programming problem solving
The advantage of Dynamic Programming (DP) is to decompose each column of the discrete space into a sub-problem and solve the optimal path from the last column through the inverse method. On the basis of discretization of the solution space, the initial path can be calculated by using dynamic programming. According to this path, a preliminary decision can be made on the path planning problem to

Control strategy of collision avoidance system
In this paper, a path-following control system considering motion stability is proposed. Its purpose is to judge the risk of collision when an obstacle appears in front of the vehicle, and automatically implement emergency collision avoidance with the stability of the vehicle body, as shown in Figure 5. The structure of the system can be mainly divided into three parts: TTC risk assessment, LQR lateral control and adaptive Model Predictive Control (MPC) stability control.
First, according to the collision risk assessment module, the collision time TTC is calculated according to the state of the vehicle and the environment perception information to judge the safety of the current vehicle. TTC refers to the time it would take for a collision to occur at the prevailing speeds, distances, and trajectories associated with the driver's vehicle and the closest lead vehicle. TTC can be kinematically defined as the range between a following and lead vehicle divided by the relative velocity between these vehicles. Hence, TTC provides a measure of crash risk or the time before impact if prevailing conditions continue (Coelingh FIGURE 4 Path planning feasible space(DP).

FIGURE 3
Trajectory planning during the steering.
Frontiers in Robotics and AI frontiersin.org 05 et al., 2010; Han et al., 2014). We have carried out related research in this part, but it is not the focus of this article. Considering the complex and changeable traffic conditions, as well as the possible instability of the vehicle caused by the large action of the actuator, this paper designs an adaptive MPC module to control the yaw moment of the vehicle to ensure the stability of the vehicle. The module judges whether to intervene. In addition, the linear quadratic regulator (LQR) controller is proposed in this paper to calculate the output signal steering angle δ according to the lateral error e h and heading angle error e y , so that the vehicle can always track the road centerline. Finally, in terms of braking force control and distribution, the braking force distribution and control module will calculate the braking forces F X1 、F X2 、F X3 、F X4 according to the expected deceleration and the expected additional yaw moment of the vehicle, and From this, the braking pressures P X1 、P X2 、P X3 、P X4 of each wheel cylinder are further obtained.

LQR lateral control
The main purpose of lateral control is to control the lateral error within a certain range. As a result we can get a better track of the desired path and the heading angle of the vehicle. The content of this section is mainly based on the LQR to design the controller to track path. The state variables of the control system are four parameters, including: lateral error e y , rate of change of lateral error _ e y , and heading angle error e h , the rate of change of heading angle error _ e h . The following formula is the state space equation of the system: Where: Eq.11 can be expressed as: _ e rr Ae rr + Bu + C _ θ r Error: e rr e y _ e y e h _ e h T (14)

FIGURE 5
Vehicle emergency steering and collision avoidance stability control.

FIGURE 6
Four-wheel braking force distribution.

Frontiers in Robotics and AI frontiersin.org
The control quantity is δ f . From the above state equation, we can get the objective function and corresponding constraints of the LQR controller: Where [t 0 , t f ] is the time domain, Q and R represent the weighted matrix of state and control quantity. The optimal solution of this problem satisfies the following: J* e rr t ( ) T P e rr t ( ) The expression of P is: The LQR controller is: Where K −R −1 (t)B T (t) P(t) represents the controller gain.

Adaptive model predictive control stability control module
In order to trade off the calculation efficiency and calculation accuracy, we assume that the longitudinal velocity v x in the Formula. 1 of the vehicle dynamics model remains unchanged. At this time, the three-degree-of-freedom model of the vehicle is simplified to two-degree-of-freedom. At the same time, it is brought into the Formula. 4, where the longitudinal velocity v x is a time-varying model parameter, and the sideslip angle and the yaw rate are taken as the state quantities, which can be finally simplified to obtain the following state space equation: Where select x [ r β ] T as the state quantity, and u T d as the control quantity. Eq. 9 will calculate the reference values of the vehicle's yaw rate and sideslip angle. The deviation value is used as the index of vehicle lateral stability, and the larger the value, the greater the risk of lateral instability of the vehicle.
r ref , β ref are the reference yaw rate and sideslip angle, respectively, and K is the stability factor.
MPC is a feedback control strategy that discretizes the vehicle dynamics equation, and sets the sampling time as T s 5 × 10 −4 s. For time k, there is the following discrete equation: Where, x(k), u(k), y(k) represent the state, control input and output of the system at time k, respectively. Assuming that the prediction time domain is p s , and the control time domain is m s , the control quantity will not change when the time exceeds the control time domain. Then the input and output predicted by time k are: The control goal is to track the target and reduce the tracking error, that is, At the same time, the control constraints and output constraints of the system are set. Finally the optimization goal function that can characterize the control performance of the system is proposed. It needs to consider the cost of the expected tracking error and some other performances, such as the control action as small as possible. The objective function is: Γ y is the weight of the output quantity, and Γ y u is the weight of the control quantity increment. For time k, the open-loop optimization problem is transformed into solving min(J(x(k), U(k), m s , p s )) for the control variable U. In order to improve the calculation efficiency, the longitudinal velocity v x is assumed to be constant when calculating the state space equation, but in the process of emergency collision avoidance, its longitudinal velocity v x is a time variable. At this time, the internal model of MPC will also change with time, so an adaptive MPC solution method is proposed. The longitudinal velocity and longitudinal acceleration output by the system are fed back to the MPC controller to update the internal model of the controller, which is beneficial to improve controller performance.
After a large number of parameter tuning and system identification, the system can maintain the best performance as much as possible, and the corresponding parameters of the adaptive MPC controller are selected: prediction time domain p s = 10, control time domain m s = 5, and add hard constraints to the control input, Take u min 4000Nm, u max 4000Nm, Δu max ± 1000Nm, Γ u 0.02, Γ y [ 1 2 ].
So far, the parameter setting of the adaptive MPC controller is completed, and the optimal additional yaw moment ΔM can be calculated to avoid vehicle instability.
Frontiers in Robotics and AI frontiersin.org Vehicle tire braking force distribution strategy The additional yaw moment T d required by the vehicle has been obtained from the MPC controller as shown in Figure 6: F ri , F fi are the longitudinal forces of the front and rear tires, d ri , d fi are the lateral distances from the front and rear tires to the center of gravity of the vehicle. I represents the left or right side of the vehicle.
At present, the braking force distribution schemes for active braking of vehicles can be roughly divided into two types, single-wheel braking and multi-wheel braking. The braking force provided by the multi-wheel Tire selection strategy.
Frontiers in Robotics and AI frontiersin.org 08 braking scheme is greater than that of the single-wheel braking scheme, but at the same time, the impact generated by the double-wheel braking scheme in the active braking process is also relatively large. In addition, the additional yaw moment generated by the wheel braking scheme is also larger. Therefore, in the face of emergencies, a multi-wheel braking scheme with faster control speed and larger upper limit of additional yaw moment is often adopted.
During the turning, the effects of braking different wheels on the steering dynamic performance are different, and the single-wheel control strategy will select different wheels for control under different vehicle states. If it is a two-wheel braking scheme, when the car is about to flick or understeer, the system will adopt the method of active braking the two wheels on the outer side of the vehicle's rotation direction at the same time to adjust the body state. The two wheels on the inner side of the steering wheel perform active braking to correct the body condition.
Then, it is necessary to select the most effective wheel to generate T d according to the actual situation. If the front wheels cannot provide enough additional yaw moment, the remaining yaw moment can be generated by the training wheels. In order to design the wheel selection strategy, define the following formula: As shown in Figure 7, the wheel selection strategy is proposed based on ƛ M and ƛ γ . In Figure 7 [left front, right front wheel, rear left and right rear wheel], when the value in the vector is set to 1, corresponding tire brakes, when the value in the vector is set to 0, tire don't brake, 0|1 said whether need the auxiliary brake wheel brake,  Frontiers in Robotics and AI frontiersin.org for example, if the right front wheel braking does not produce enough yawing moment, we need to brake the right rear wheel to generate enough yaw torque. If the vehicle is oversteering (ƛ<0), the priority braking wheels are the front outer wheels of the vehicle. When the vehicle understeers (ƛ>0), the priority braking wheel is the rear inner wheel. Once the yaw moment provided by the front wheels is not enough, the remaining yaw moment can be generated by the selected auxiliary wheels. Finally, according to the selected braking wheels, the distributed four-wheel braking force can be obtained from Formula. 26.

Simulation experiments
In order to verify the effectiveness of the algorithm in this paper, a joint simulation model was built in Carsim and MATLAB/Simulink, as shown in Figure 8. During the operation of the collision avoidance algorithm, the vehicle is driving at a speed of about 84 km/h. The obstacle car is located at (40, −2) position, as shown in Figure 9B. At this time, the vehicle is about to have a frontal collision, and the collision avoidance algorithm starts to run and the steering wheel is turned to the right. As shown in Table 1, the simulated vehicle parameters are selected from Carsim.

Without the stability control
Without the stability control, the planning algorithm and the lateral control algorithm as shown in Figures 9, 10 perceive that there is a slow-moving car at a speed of 10 km/h 40 m ahead, and then start to perform lane change to avoid obstacles. After about 2 s, the ego vehicle avoids obstacles, and in about 6 s, the heading angle gradually stabilizes near 0, but the yaw angle speed stabilizes slowly. At this time, the longitudinal velocity v x of the ego vehicle remains basically unchanged.
The tracking performance can be represented by the change of lateral error (The distance between the vehicle and its projection to the planned path) with time, as shown in the following Figure 11.

Parameters
Units Value mass kg 1570 The moment of inertia of the body around the z-axis kg · m 2 4192 Vehicle center of mass to front axle distance m 1.04 Vehicle center of mass to rear axle distance m 1.56 Vehicle front axle cornering stiffness Nm/rad −78329 Vehicle rear axle cornering stiffness Nm/rad −78329

FIGURE 11
Variation of lateral error with time. Frontiers in Robotics and AI frontiersin.org

With the stability control
The stability control intervenes within 2-4 s after the vehicle avoids the obstacle as shown in Figures 12, 13. At this time, the change of the yaw rate is quickly suppressed. At the same time, it can be seen that the heading angle stabilizes rapidly to 1°in 2.5 s. But there is a certain heading angle error. The reason why 2-4 s is chosen is due to the consideration of stability control on path tracking accuracy. Firstly, before avoiding obstacles (that is, before 2 s, this time is calculated by TTC), the stability control has a certain impact on obstacle avoidance, and may even lead to accidents, which should be avoided as much as possible. Secondly, if the stability control intervention time is too long or the stability control intervenes when the yaw angle is large, the lateral control algorithm cannot control the heading angle error to zero. This will cause the planning control algorithm to be unable to track the path stably according to the road centerline after the lane change. The change of tyre braking force with time as shown in Figure 14.

Trajectory planning
On the premise of keeping other planning parameters consistent, we changed Wp smooth2 from 1000 to 20,000 for a total of 20 tests (indicated by different colored trajectories). It can be seen that our algorithm successfully avoided the obstacle car ahead under the condition of considering the smooth trajectory as shown in Figure 15, which proves the effectiveness of our algorithm.

FIGURE 14
Change of tyre braking force with time.
Frontiers in Robotics and AI frontiersin.org In this paper, the planning algorithm during steering and collision avoidance is studied based on the information and data given by vehicle environmental information perception and vehicle state parameter estimation The coordinated control of vehicle stability and safety is studied. The paper has carried out the following work: 1. Considering the calculation efficiency and control requirements of the model, a three-degree-of-freedom vehicle dynamics model and a linear tire model are established. 2. The planning module is proposed by the method of quadratic programming. This module will plan the driving trajectory of the vehicle by comprehensively considering the constraints and safety of vehicle execution. 3. Considering the vehicle trajectory tracking performance and stability, LQR lateral control and adaptive MPC control algorithms are proposed and the intervention time is proposed. 4. According to the results output by the MPC algorithm, the four-wheel braking force is distributed to realize the vehicle collision avoidance control under the comprehensive consideration of safety and stability. The results show that the planning algorithm in this paper can give a safe and reliable collision-free motion trajectory, and the proposed stability and safety coordination control algorithm can track the collision avoidance trajectory with high precision and stabilize the vehicle's heading angle about 0.5s after avoiding obstacles.

Data availability statement
The original contributions presented in the study are included in the article/Supplementary Material, further inquiries can be directed to the corresponding author.