Research on Vehicle Adaptive Cruise Control Method Based on Fuzzy Model Predictive Control

: Under complex working conditions, vehicle adaptive cruise control (ACC) systems with ﬁxed weight coefﬁcients cannot guarantee good car following performance under all conditions. In order to improve the tracking and comfort of vehicles in different modes, a fuzzy model predictive control (Fuzzy-MPC) algorithm is proposed. Based on the comprehensive consideration of safety, comfort, fuel economy and vehicle limitations, the objective function and constraints are designed. A relaxation factor vector is introduced to soften the hard constraint boundary in order to solve this problem, for which there was previously no feasible solution. In order to maintain driving stability under complex conditions, a multi-objective optimization method, which can update the weight coefﬁcient online, is proposed. In the numerical simulation, the values of velocity, relative distance, acceleration and acceleration change rate under different conditions are compared, and the results show that the proposed algorithm has better tracking and stability than the traditional algorithm. The effectiveness and reliability of the Fuzzy-MPC algorithm are veriﬁed by co-simulation with the designed PID lower layer control algorithm with front feedforward and feedback.


Introduction
Advanced Driver Assistant Systems (ADAS) [1] are currently widely deployed in automobiles. Among them, the adaptive cruise control (ACC) system is one of the most popular ADAS. The control method of the ACC system generally adopts layered control [2].
The upper-level control algorithm calculates the expected longitudinal acceleration of the vehicle based on the current state of the vehicle's motion, which is becoming more and more diversified. Zhang et al. [3] analyzed a PID-type vehicle-following controller for different spacing policies and designed a new vehicle-following controller. Chan et al. [4] used a distributed arithmetic structure based on FPGA-based high-efficiency PID as the ACC control algorithm. The study of Cananle et al. [5] personalized an adaptive cruise control with stop and go features (ACC/S&G) for urban scenery. Daniele et al. [6] adopted an adaptive method involving the terminal cost and constraint set MPC approach, which is commonly used for fixed set-point regulation, in order to achieve good tracking of a time-varying reference trajectory. Naus et al. [7] selected followability, driving comfort and fuel economy as the system optimization goals in the multi-objective ACC system designed based on MPC, so that the vehicle can improve the fuel economy on the premise of safe following and driving comfort. Firoozi et al. [8] designed an ACC system based on MPC considering the motion of the front vehicle and road gradient. Tran et al. [9] proposed an ACC system design method combining an analytical method and a stochastic MPC method. Eom et al. [10] proposed a new human-computer interaction design method, in which the proposed standards were used to determine the compatibility of machine models and interface models. If the models were not compatible, one or both models were modified to make them compatible. The results show that the modified machine model provides a more compact, acceptable, efficient and secure interface than the modified interface model. Subiantoro et al. [11] used a multi-level linear model to describe the nonlinear behavior of the ACC system, but the relationship between the parameter model matrices remained linear. A multi-stage predictive control based on nonlinear model predictive control (NMPC) was designed. Liu et al. [12] proposed an economical ACC to improve the fuel economy of hybrid electric vehicles (HEV) by simultaneously optimizing vehicle route, velocity, and power system control. Motivated by connected and automated vehicle (CAV) technologies, Zhao et al. [13] proposed a data-driven optimization-based MPC modeling framework for the Cooperative Adaptive Cruise Control (CACC) of a string of CAVs under uncertain traffic conditions. Wu et al. [14] designed an ACC system based on an active braking algorithm to improve vehicle safety and comfort. Jiang et al. [15] considered the driver's risk sensitivity under system and measurement uncertainty, and proposed a personalized stochastic optimal adaptive cruise control algorithm. It can be seen that the research on upper control algorithms is increasingly focused on how to better coordinate multiple objectives to meet real needs.
The lower controller is the actuator of the ACC system. Taking the expected acceleration output from the upper controller as input, the actual acceleration of the vehicle remains consistent with the expected acceleration output of the upper controller by controlling the accelerator pedal and brake pedal, so as to achieve the purpose of following the front vehicle. Satoru et al. [16] designed the lower controller of the ACC system based on PID control. It can keep the actual acceleration of the ACC system vehicle consistent with the expected acceleration output through the upper controller of the ACC system. Yi et al. [17] designed the lower controller of the ACC system based on PI control and feedforward control theory, which improved the response speed of the system. Fancher et al. [18] established an inverse longitudinal dynamic model and introduced a compensation algorithm to improve the model's anti-interference performance. To make the lower controller faster and achieve a more accurate control response and real-time performance, Li et al. [19] designed acceleration and braking look-up tables based on test data, and formulated acceleration and braking conversion rules. Zhang et al. [20] designed a lower controller suitable for electric vehicles, which enables energy to be recovered during the braking process to improve energy economy. Cheng et al. [21] designed a lower controller. The brake pressure calculation module used a slip ratio controller, and the electronic throttle opening calculation module used a look-up table method. David et al. [22] used a neural network to design a deceleration prediction system for an adaptive cruise control unit. The neural network was used to refine the determination of deceleration value of the vehicle in front of static or dynamic obstacles, and at the same time, some influences affecting the braking process are included, so as to improve the driving safety. Therefore, the lower controller tends to be more and more simplified while meeting the requirements.
In the process of following, we need to constantly change the weight of following according to different following environments to better coordinate multiple goals. At present, most of the current research algorithms cannot take into account multiple goals, and it is difficult to adapt to the changing following environment. In this paper, the longitudinal kinematics model between the two vehicles is established, and the objective function and constraint conditions are designed considering the vehicle speed, acceleration, acceleration rate of change, distance error and relative speed. A relaxation factor is introduced to soften the hard constraint boundary and expand the feasible region. Under the MPC theory, fuzzy rules of relative distance error, relative speed and vehicle following weight coefficient are designed. The variable weight coefficient method based on fuzzy control updates the data online in real time to adapt to the complex traffic conditions, and the simulation experiments are compared in the MATLAB environment. The lower controller adopts a threshold-based switching strategy, uses PID feedback control to minimize the acceleration error, and designs a braking force controller and a throttle opening controller. Finally, the algorithm is verified.

Fuzzy-MPC Based Vehicle Multi-Target Upper Controller
An upper control algorithm for ACC systems, based on fuzzy model predictive control (Fuzzy-MPC) theory, is designed in this paper. The four control objectives of followability, safety, comfort, and fuel economy are used as references for the design of performance indicators and system constraints, and the optimization objective is transformed into a constrained quadratic programming problem to be solved. At the same time, in order to meet the driving requirements of vehicles in different driving environments, a variable weight coefficient method is proposed based on fuzzy control.

Longitudinal Kinematics Modelling of Two Vehicles
During the car following process, the ACC system maintains a safe distance between the two vehicles and can keep up with the target vehicle smoothly and quickly. The longitudinal kinematics relationship between the two vehicles is shown in Figure 1.
Machines 2021, 9,160 3 of 16 acceleration error, and designs a braking force controller and a throttle opening controller. Finally, the algorithm is verified.

Fuzzy-MPC Based Vehicle Multi-Target Upper Controller
An upper control algorithm for ACC systems, based on fuzzy model predictive control (Fuzzy-MPC) theory, is designed in this paper. The four control objectives of followability, safety, comfort, and fuel economy are used as references for the design of performance indicators and system constraints, and the optimization objective is transformed into a constrained quadratic programming problem to be solved. At the same time, in order to meet the driving requirements of vehicles in different driving environments, a variable weight coefficient method is proposed based on fuzzy control.

Longitudinal Kinematics Modelling of Two Vehicles
During the car following process, the ACC system maintains a safe distance between the two vehicles and can keep up with the target vehicle smoothly and quickly. The longitudinal kinematics relationship between the two vehicles is shown in Figure 1.
where ( 1 ) x k k +| is the predicted value of k + 1 at time k, () uk is the control variable at time k , and () k  is the target vehicle acceleration disturbance at time k. The coefficient matrices A , B and G are, respectively, shown below.  According to the longitudinal kinematics relationship and spacing strategy between the ACC vehicle and the target vehicle [23], x(k) = [d, v f , v re f , j] T is selected as the state variable of the ACC system. The longitudinal kinematics state equation of ACC vehicle is expressed as Equation (1).
where x(k + 1 | k) is the predicted value of k + 1 at time k, u(k) is the control variable at time k, and ϕ(k) is the target vehicle acceleration disturbance at time k. The coefficient matrices A, B and G are, respectively, shown below.
where T s is the sampling period and τ is the time delay constant of the lower controller. Since safety, followability, comfort, and fuel economy are important indicators for evaluating ACC vehicles, let y(k) = [∆d, v re f , a f , j] T be the optimized performance index vector, ∆d the relative distance (∆d = d − d sa f e ), d sa f e (d sa f e = v · t h + d 0 ) the expected safe spacing with time headway(t h ), and d 0 the minimum safe spacing greater than the length of the vehicle.
where the coefficient matrices C and S are as follows. Due to differences in vehicle models and interference from the external environment, there will be a certain error between the predicted value of the prediction model and the actual value in the ACC system. In order to reduce this error, feedback correction is used to improve the accuracy and robustness of the ACC system. Therefore, according to the principle of feedback correction, the prediction error at time k is described as follows.
where e(k) is the prediction error, x(k) is the actual state of the system at time k, and x(k|k − 1) is the predicted value of k at time k − 1.
In order to improve the accuracy of the system's future prediction values, the weighting matrix is used to adjust the prediction error. Thus, Equation (1) can be transformed into Equation (4).
Considering the restrictions of safety, the vehicle itself and traffic laws, etc., relative distance, vehicle speed, acceleration, acceleration rate of change, and control variables are restricted within a certain range. In the process of MPC rolling optimization, for cases in which there is no solution under hard constraints, the method in [24] is used, which treats the constraints that need to be widened differently. Therefore, the constraints are relaxed.

Scrolling Optimization
Select safety, followability, driving comfort and fuel economy as the optimization performance indicators, and optimize the control variables and prediction errors, so that the ACC vehicle can better track the target vehicle. The final objective function is determined as follows.
where y p (k + i k) is the performance index vector in the prediction time domain, (k + i|k) represents that k is the prediction of k + i time under the time, y rel is the reference trajectory ∧y p (x) , N p is the prediction time domain, N c is the control time domain, u is the control variable, R is the weight of u (R = 1) and Q = (ς d , ς vre f , ς a f , ς j ) are weight coefficients.
Therefore, the objective function of the multi-objective ACC upper control algorithm will eventually be transformed into a constrained quadratic programming problem.
Machines 2021, 9, 160 where I is the unit vector and the dimension is N c , and Λ is the reference trajectory coefficient.

Variable Weight Coefficient Design Based on Fuzzy Control
In a complex and changeable traffic environment, different traffic conditions require different weighting factors. We design a variable weight coefficient based on fuzzy control theory to improve the adaptability of the ACC system and ensure that it can follow the target vehicle smoothly and safely.
The relative distance d, relative speed v rel , and the weight coefficient of the vehicle is always set to 1. At the same time, the change area of ς f is set as [0,5]. When ς is at [0, 1], it is believed that the demand for comfort and fuel economy is greater; and when ς is at [1,5], it is indicated that the demand for vehicle following safety is greater. From this, the membership functions of the input variables and output variables can be obtained, as shown in Figure 2.
: :  5]. When  is at [0, 1], it is believed that the demand for comfort and fuel economy is greater; and when  is at [1,5], it is indicated that the demand for vehicle following safety is greater. From this, the membership functions of the input variables and output variables can be obtained, as shown in Figure 2.  Table 1.

Numerical Simulation Verification
In order to verify the effectiveness of Fuzzy-MPC, the traditional MPC algorithm is compared in MATLAB and normal and emergency conditions are selected for simulation. The simulation parameters are shown in Table 2.   Table 1.

Numerical Simulation Verification
In order to verify the effectiveness of Fuzzy-MPC, the traditional MPC algorithm is compared in MATLAB and normal and emergency conditions are selected for simulation. The simulation parameters are shown in Table 2.
The speed between the ACC vehicle and the target vehicle is 10 m/s. The target vehicle performs acceleration and deceleration movement, the initial distance between the two vehicles is 20 m and the simulation results are shown in Figure 3. The speed between the ACC vehicle and the target vehicle is 10 m/s. The target vehicle performs acceleration and deceleration movement, the initial distance between the two vehicles is 20 m and the simulation results are shown in Figure 3.
It can be seen from Figure 3a that in the working condition of frequent shifting of the preceding vehicle, Fuzzy-MPC has faster response and smaller error than traditional MPC. Figure 3b shows that the actual relative distance error of Fuzzy-MPC is smaller than that of traditional MPC. Figure 3c,d shows that the acceleration of Fuzzy-MPC is more stable, and the fluctuation of the acceleration rate is smaller, indicating that the Fuzzy-MPC has better followability, comfort and fuel economy.

Emergency Conditions
Set the speed of both the ACC vehicle and the target vehicle to 30 m/s. At the 5th second, the target vehicle brakes at a deceleration of −2 m/s 2 . The initial relative distance between the two vehicles is 25 m. The simulation results are shown in Figure 4. It can be seen from Figure 3a that in the working condition of frequent shifting of the preceding vehicle, Fuzzy-MPC has faster response and smaller error than traditional MPC. Figure 3b shows that the actual relative distance error of Fuzzy-MPC is smaller than that of traditional MPC. Figure 3c,d shows that the acceleration of Fuzzy-MPC is more stable, and the fluctuation of the acceleration rate is smaller, indicating that the Fuzzy-MPC has better followability, comfort and fuel economy.

Emergency Conditions
Set the speed of both the ACC vehicle and the target vehicle to 30 m/s. At the 5th second, the target vehicle brakes at a deceleration of −2 m/s 2 . The initial relative distance between the two vehicles is 25 m. The simulation results are shown in Figure 4.  It can be seen from Figure 4a that Fuzzy-MPC is faster than the traditional MPC algorithm in terms of response. Figure 4b,c shows that the acceleration and acceleration change rate curve of the Fuzzy-MPC algorithm are more stable, which improves fuel economy and car following performance to a certain degree. In Figure 4d, the change range of the acceleration change rate of the Fuzzy-MPC is smaller, which improves comfort to a certain degree.
From the above simulation results, it can be seen that the ACC system control algorithm based on Fuzzy-MPC performs better than the traditional MPC under two working conditions, which not only ensures the safety of the vehicle, but also effectively improves the comfort and the fuel economy of the vehicle during driving.

Lower Controller Design
The lower controller calculates the throttle opening and brake pressure of the vehicle according to the output of the upper controller, so that the actual acceleration of the vehicle can track the expected acceleration, thereby achieving hierarchical control.

Throttle/Brake Switching Strategy
Frequent acceleration or deceleration of the vehicle not only damages the reliability of the corresponding parts of the vehicle, but it is also detrimental to the comfort of the drivers and passengers. To reduce this switching operation, the maximum deceleration reached at different vehicle speeds was measured when the vehicle was traveling freely in CarSim and plotted as a curve. To prevent frequent switching of the two systems, a transition area is set on both sides of the curve with a width of 2∆h and ∆h = 0.1, as shown in Figure 5.  It can be seen from Figure 4a that Fuzzy-MPC is faster than the traditional MPC algorithm in terms of response. Figure 4b,c shows that the acceleration and acceleration change rate curve of the Fuzzy-MPC algorithm are more stable, which improves fuel economy and car following performance to a certain degree. In Figure 4d, the change range of the acceleration change rate of the Fuzzy-MPC is smaller, which improves comfort to a certain degree.
From the above simulation results, it can be seen that the ACC system control algorithm based on Fuzzy-MPC performs better than the traditional MPC under two working conditions, which not only ensures the safety of the vehicle, but also effectively improves the comfort and the fuel economy of the vehicle during driving.

Lower Controller Design
The lower controller calculates the throttle opening and brake pressure of the vehicle according to the output of the upper controller, so that the actual acceleration of the vehicle can track the expected acceleration, thereby achieving hierarchical control.

Throttle/Brake Switching Strategy
Frequent acceleration or deceleration of the vehicle not only damages the reliability of the corresponding parts of the vehicle, but it is also detrimental to the comfort of the drivers and passengers. To reduce this switching operation, the maximum deceleration reached at different vehicle speeds was measured when the vehicle was traveling freely in CarSim and plotted as a curve. To prevent frequent switching of the two systems, a

Throttle Control
This article uses an experimental method to simulate the vehicle model selected in CarSim. The initial speed of the vehicle is from 0 km/h to 120 km/h, and the throttle opening required to achieve different accelerations at different vehicle speeds is tested, as shown in Table 3.

Brake Control
When the vehicle needs to decelerate, the control mode is switched to brake control. Firstly, obtain the desired braking torque through des a . Secondly, obtain the desired brake pressure des P through the reverse brake model. Finally, the vehicle dynamics system will perform braking control according to the desired braking pressure des P . When the vehicle is under braking conditions, the driving force is zero. The force analysis of the vehicle shows that the total resistance of the vehicle is r F .  Define the desired acceleration output by the upper controller as a des . According to the logical switching curve, when a(0) − ∆h ≤ a des ≤ a(0) + ∆h, it keeps the previous state; when a des ≥ a(0) + ∆h, it is throttle control; when a des ≤ a(0) − ∆h, it is brake control.

Throttle Control
This article uses an experimental method to simulate the vehicle model selected in CarSim. The initial speed of the vehicle is from 0 km/h to 120 km/h, and the throttle opening required to achieve different accelerations at different vehicle speeds is tested, as shown in Table 3.

Brake Control
When the vehicle needs to decelerate, the control mode is switched to brake control. Firstly, obtain the desired braking torque through a des . Secondly, obtain the desired brake pressure P des through the reverse brake model. Finally, the vehicle dynamics system will perform braking control according to the desired braking pressure P des .
When the vehicle is under braking conditions, the driving force is zero. The force analysis of the vehicle shows that the total resistance of the vehicle is F r .
where C D is the coefficient of air resistance, A is the windward area, ρ is the density of your air, M is the mass of the vehicle, g is the acceleration of gravity, and f is the rolling resistance coefficient.
Under braking conditions, when the braking force F br is less than the maximum braking force on the road, the braking force and braking pressure can satisfy the following relationship.
F br = K b P des (9) where K b is the ratio of braking force to braking pressure and P des is the braking pressure. Through simulation in CarSim, K b = 1582.3 can be obtained. According to Newton's second law, by combining Equations (8) and (9), the following can be obtained.

Design of Lower Controller Based on PID
To eliminate the error between the vehicle inverse dynamics model and the actual vehicle model, feedback control is used to adjust and improve the accuracy of the system model, as shown in Figure 6.
where D C is the coefficient of air resistance, A is the windward area,  is the density of your air, M is the mass of the vehicle, g is the acceleration of gravity, and f is the rolling resistance coefficient.
Under braking conditions, when the braking force br F is less than the maximum braking force on the road, the braking force and braking pressure can satisfy the following relationship. br b des F K P = (9) where b K is the ratio of braking force to braking pressure and des P is the braking pressure.
Through simulation in CarSim, can be obtained. According to Newton's second law, by combining Equations (8) and (9), the following can be obtained.

Design of Lower Controller Based on PID
To eliminate the error between the vehicle inverse dynamics model and the actual vehicle model, feedback control is used to adjust and improve the accuracy of the system model, as shown in Figure 6.
The PID control law is as follows.
It can then be converted to a transfer function form, as shown in Equation (13).
where () ut is the output, p k is the proportional coefficient, i k is the integral coefficient, d k is the differential coefficient and s is the time. Among them, e(t) is the error value between the expected acceleration a des and the actual acceleration a. e(t) = a des − a The PID control law is as follows.
It can then be converted to a transfer function form, as shown in Equation (13).
where u(t) is the output, k p is the proportional coefficient, k i is the integral coefficient, k d is the differential coefficient and s is the time.

Co-Simulation Verification and Analysis
To verify the effectiveness of the algorithm, MATLAB/Simulink and CarSim are used for co-simulation. Build the lower controller, braking controller and throttle opening controller in Simulink. This is shown in Figure 7. Three following conditions are selected to compare the ACC vehicle based on MPC (MPC_ACC) and the ACC vehicle based on Fuzzy-MPC (Fuzzy_MPC_ACC). The simulation parameters are shown in Table 3.

Co-Simulation Verification and Analysis
To verify the effectiveness of the algorithm, MATLAB/Simulink and CarSim are used for co-simulation. Build the lower controller, braking controller and throttle opening controller in Simulink. This is shown in Figure 7. Three following conditions are selected to compare the ACC vehicle based on MPC (MPC_ACC) and the ACC vehicle based on Fuzzy-MPC (Fuzzy_MPC_ACC). The simulation parameters are shown in Table 3.

Follow the Vehicle Smoothly
The initial speed of ACC in this working condition is 25 m/s. The target vehicle is 30 m ahead of the ACC and travels at a constant speed of 30 m/s. The simulation results are shown in Figure 8. As shown in Figure 8a,b, when the actual relative distance is greater than the expected relative distance, the ACC vehicle starts to accelerate uniformly. At the 10th second, the speed of the ACC vehicle is equal to the speed of the target vehicle, and the actual

Co-Simulation Verification and Analysis
To verify the effectiveness of the algorithm, MATLAB/Simulink and CarSim are used for co-simulation. Build the lower controller, braking controller and throttle opening controller in Simulink. This is shown in Figure 7. Three following conditions are selected to compare the ACC vehicle based on MPC (MPC_ACC) and the ACC vehicle based on Fuzzy-MPC (Fuzzy_MPC_ACC). The simulation parameters are shown in Table 3.

Follow the Vehicle Smoothly
The initial speed of ACC in this working condition is 25 m/s. The target vehicle is 30 m ahead of the ACC and travels at a constant speed of 30 m/s. The simulation results are shown in Figure 8. As shown in Figure 8a,b, when the actual relative distance is greater than the expected relative distance, the ACC vehicle starts to accelerate uniformly. At the 10th second, the speed of the ACC vehicle is equal to the speed of the target vehicle, and the actual As shown in Figure 8a,b, when the actual relative distance is greater than the expected relative distance, the ACC vehicle starts to accelerate uniformly. At the 10th second, the speed of the ACC vehicle is equal to the speed of the target vehicle, and the actual relative distance and the expected relative distance slowly converge. Throttle opening/braking pressure is shown in Figure 8c, with a reverse reaction time of 5 s. As shown in Figure 8d, the change of ς f in the whole process shows that the safety of following the vehicle is emphasized in the first 5 s. As can be seen from the Figure 8, under this condition, the effect of on-line adjustment of the weight parameters of Fuzzy_MPC_ACC is similar to that of the fixed weight parameters of MPC_ACC. Both can safely and effectively track the front vehicle, but Fuzzy_MPC_ACC follows the front vehicle slightly faster than MPC_ACC.

Target Vehicle Insertion
The initial distance between the two vehicles is 60 m, the speed of the ACC vehicle is 20 m/s, and the speed of the target vehicle is 15 m/s. When the target vehicle is inserted at t = 30 s, the actual distance between the two vehicles becomes 10 m. The target vehicle has a speed of 10 m/s and is in a state of uniform motion. The simulation results are shown in Figure 9.
in Figure 8d, the change of f  in the whole process shows that the safety of following the vehicle is emphasized in the first 5 s. As can be seen from the Figure 8, under this condition, the effect of on-line adjustment of the weight parameters of Fuzzy_MPC_ACC is similar to that of the fixed weight parameters of MPC_ACC. Both can safely and effectively track the front vehicle, but Fuzzy_MPC_ACC follows the front vehicle slightly faster than MPC_ACC.

Target Vehicle Insertion
The initial distance between the two vehicles is 60 m, the speed of the ACC vehicle is 20 m/s, and the speed of the target vehicle is 15 m/s. When the target vehicle is inserted at t = 30 s, the actual distance between the two vehicles becomes 10 m. The target vehicle has a speed of 10 m/s and is in a state of uniform motion. The simulation results are shown in Figure 9. In Figure 9a,b, the ACC decelerates at the beginning to follow the target vehicle. At the 10th second, the speeds of the two vehicles are close, and the distance error between the two vehicles tends to zero. At 30 s, the target vehicle cuts in and the actual distance between the two vehicles becomes 10 m. To ensure driving safety, the ACC continues to decelerate and can smoothly keep up with the vehicle in front in 40 s. From the two figures, it can be seen that in the deceleration stage of the vehicle after the vehicle in front is inserted, Fuzzy_MPC_ACC is more adaptable than MPC_ACC and the minimum value of relative distance is larger, the speed changes more gently, and it becomes safer and more comfortable. Figure 9c shows that the throttle opening and braking force change In Figure 9a,b, the ACC decelerates at the beginning to follow the target vehicle. At the 10th second, the speeds of the two vehicles are close, and the distance error between the two vehicles tends to zero. At 30 s, the target vehicle cuts in and the actual distance between the two vehicles becomes 10 m. To ensure driving safety, the ACC continues to decelerate and can smoothly keep up with the vehicle in front in 40 s. From the two figures, it can be seen that in the deceleration stage of the vehicle after the vehicle in front is inserted, Fuzzy_MPC_ACC is more adaptable than MPC_ACC and the minimum value of relative distance is larger, the speed changes more gently, and it becomes safer and more comfortable. Figure 9c shows that the throttle opening and braking force change reasonably. Figure 9d shows that ACC tends to be safer in the deceleration section, and more comfortable with greater fuel economy in the smooth following section.

Emergency Braking
The initial speed of ACC is 30 m/s. The target vehicle travels at a constant speed of 25 m/s, and suddenly brakes with an acceleration of −2 m/s 2 at the 20th second and continues for 5 s and then maintains a constant speed. The simulation results are shown in Figure 10. more comfortable with greater fuel economy in the smooth following section.

Emergency Braking
The initial speed of ACC is 30 m/s. The target vehicle travels at a constant speed of 25 m/s, and suddenly brakes with an acceleration of −2 m/s 2 at the 20th second and continues for 5 s and then maintains a constant speed. The simulation results are shown in Figure 10. In Figure 10a,b, the ACC decelerates at the beginning to follow the target vehicle, and the distance between the two vehicles gradually approaches the actual value. At the 10th second, the speeds of the two vehicles tend to be the same, and the distance between them tends towards the expected value. At the 20 s point, the target vehicle brakes abruptly, and the ACC also performs an emergency brake, which effectively avoids rear-end collisions and ensures the safety of the vehicle. As can be seen from the two figures, since the minimum relative distance of Fuzzy_MPC_ACC is greater than that of MPC_ACC, the speed change is smoother, and Fuzzy_MPC_ACC can track the vehicle in front more quickly and safely. Figure 10c shows that the lower controller has a better first response. Figure 10d shows that there are higher requirements for safety when the target vehicle brakes in an emergency. In Figure 10a,b, the ACC decelerates at the beginning to follow the target vehicle, and the distance between the two vehicles gradually approaches the actual value. At the 10th second, the speeds of the two vehicles tend to be the same, and the distance between them tends towards the expected value. At the 20 s point, the target vehicle brakes abruptly, and the ACC also performs an emergency brake, which effectively avoids rear-end collisions and ensures the safety of the vehicle. As can be seen from the two figures, since the minimum relative distance of Fuzzy_MPC_ACC is greater than that of MPC_ACC, the speed change is smoother, and Fuzzy_MPC_ACC can track the vehicle in front more quickly and safely. Figure 10c shows that the lower controller has a better first response. Figure 10d shows that there are higher requirements for safety when the target vehicle brakes in an emergency.

Conclusions
In order to improve the driving performance of ACC system in complex conditions, a Fuzzy-MPC algorithm is proposed. Based on the longitudinal kinematics model of two vehicles, the online variable weight Fuzzy-MPC algorithm is simulated. In the numerical simulation, the speed, relative distance, acceleration and acceleration change rate of the vehicle under normal and emergency conditions are calculated. The results show that, compared with the traditional MPC algorithm, the Fuzzy-MPC algorithm can follow the vehicle more quickly and stably when the driving condition changes, and has better safety, comfort and fuel economy. Combined with the mathematical model, control algorithm and low controller, the co-simulation of CarSim is carried out under the conditions of smooth following of the vehicle, target vehicle insertion and emergency braking. It is found that the changes of speed, relative distance and throttle opening/brake pressure are stable under the three working conditions.