A Novel Adaptive Cruise Control Strategy for Electric Vehicles Based on a Hierarchical Framework

: Conclusive evidence has demonstrated the critical importance of adaptive cruise control (ACC) in relieving trafﬁc congestion. To improve the performance of the ACC system, this paper proposes a novel ACC strategy for electric vehicles based on a hierarchical framework. Three main efforts have been made to distinguish our work from the existing research. Firstly, a sliding acceleration identiﬁcation model is established based on the recursive least squares algorithm with multiple forgetting factors (MFF-RLS). Secondly, with vehicle following, economy, and comfort as the optimization objectives, the upper-level controller is developed based on the model predictive control (MPC) algorithm. Beneﬁt from the identiﬁcation of the sliding acceleration, the MPC controller holds better capability in accommodating environmental changes. Thirdly, an iterative learning lower-level controller is designed to control the driving and braking systems. Considering the efﬁciency of regenerative braking, the braking force distribution strategy is also designed in the lower-level controller. Simulation results show that, compared with the conventional MPC-based ACC strategy, the proposed strategy has similar performance in vehicle following, but it makes great improvements in comfort and economy. The speciﬁc features are that the vehicle acceleration and speed ﬂuctuation are signiﬁcantly reduced, and the energy consumption is also reduced by 2.05%.


Introduction
In recent years, the rapid development of the economy has resulted in a great increase in car ownership, leading to a series of social problems such as environmental pollution, traffic congestion, and traffic accidents [1,2].Advanced driver assistance systems (ADAS) are regarded as an effective solution to these problems because of their great potential in reducing energy consumption, improving vehicle safety, and increasing road capacity [3,4].As a representative application of ADAS, the adaptive cruise control (ACC) system has been widely used in passenger vehicles.By automatically adjusting the throttle and brake, the ACC system can keep a safe vehicle space from the preceding vehicle, which is beneficial both in terms of saving energy and in reducing the collision risk caused by driver fatigue [5][6][7][8].
The performance of the ACC system is mainly determined by the design of the ACC controller.Currently, safe car-following is the most important issue in the design of the ACC controller.Meanwhile, many manufacturers are also considering how to improve comfort and economy on the premise of ensuring safe car-following [9][10][11].As safe car-following, comfort, and economy usually conflict with each other, coordinating them simultaneously creates great challenges for designers.Additionally, a well-designed ACC controller should not only satisfy the control objectives and constraints but also perform robustly under system disturbances and model mismatches.Nowadays, many researchers have been working on designing ACC controllers based on different control algorithms, such as Machines 2021, 9, 263 2 of 26 the optimal control algorithm [12], fuzzy control algorithm [13], sliding mode control algorithm [14], neural network learning algorithm [15], proportional-integral-derivative (PID) control algorithm [16], and the model predictive control (MPC) algorithm [17][18][19][20][21][22][23][24][25][26][27][28][29].
Among the above control algorithms, MPC is a closed-loop control algorithm that can predict the future state of the ACC system.Based on the future state information, MPC can easily realize closed-loop optimization of multiple control objectives under specific constraints, so as to reduce the control error caused by system disturbances and model mismatches [17][18][19].Therefore, MPC has received a great deal of attention for automotive control applications.For instance, Bageshwar et al. designed an ACC controller based on MPC, which considered distance error and speed error in the cost function, and the constraint was built by limiting the vehicle longitudinal acceleration [20].Li et al. adopted MPC theory in designing a multi-objective ACC controller.Car-following, fuel economy and the driver desired response were considered in the cost function.To avoid the unfeasible solution, the constraint softening method was employed [21].Kohut et al. presented an MPC-based headway control algorithm to balance trip time and fuel consumption while following the preceding vehicle [22].Yu et al. used MPC to maintain safe vehicle spacing from the lead vehicle.To optimize the vehicle speed trajectory, intelligent transportation systems(ITS) and road slope information were introduced into the controller [23].Sun et al. designed an ACC controller based on the MPC theory with a particle swarm optimization algorithm.With braking energy, tracking, comfort, and safety as the control objectives, the vehicle could recover braking energy as much as possible while satisfying the requirements of tracking, safety, and comfort [24].Sakhdari and Nasser L proposed an adaptive tube-based nonlinear model predictive control (AT-NMPC) method to design the ACC system.The proposed method contained two separate models, one for dealing with the problem constraints and the other for defining the objective function [25].Zhang et al. designed a multi-objective coordinated ACC controller based on an MPC framework, which could simultaneously handle issues regarding vehicle safety, lateral stability, and longitudinal tracking performance.To improve the overall tracking performance, a weight coefficient self-tuning strategy was introduced into the MPC controller so that the weight coefficients could be adjusted automatically with the change of traffic scenarios [26].Nie and Farzaneh developed an eco-driving ACC system for two typical car-following traffic scenes.The ACC system was designed using the MPC algorithm, which took driving safety, eco-driving, tracking capability, and comfort as the control objectives [27].Li et al. presented an MPC-based ACC controller, which considered the nonlinear powertrain dynamics, road elevation information, and spatiotemporal constraint from the preceding vehicle [28].Ma et al. used MPC to develop the CACC system for an electric vehicle platoon.To efficiently solve the problem of the discrete variables, a simulated annealing-particle swarm optimization (SA-PSO) algorithm was employed [29].
Most of the above research does not take the switching performance between driving and braking into consideration.In the design of the ACC controller, the driving and braking state of the ACC system is usually determined by the relationship between the sliding acceleration (acceleration when the vehicle is neither driving nor braking) and the desired acceleration.If the desired acceleration is greater than the sliding acceleration, the vehicle will enter driving mode, otherwise, it will enter braking mode [30][31][32].In real traffic systems, the vehicles are always accompanied by disturbances such as wind and road slope, which greatly affect the driving resistance, as well as the sliding acceleration.As the vehicle cannot measure the sliding acceleration in real-time, the ACC system usually presets a sliding acceleration.When the preset sliding acceleration is close to the actual value, the ACC system can accurately determine the driving or braking mode it should be in, which will not make negative impacts on the ACC performance.However, when the preset sliding acceleration deviates from the actual value and the desired acceleration is near the actual value, it is difficult for the ACC system to determine whether to drive or to brake.Once the mode is judged wrong, the control error caused by model mismatches will increase significantly.To reduce the error, the ACC system will frequently switch between driving and braking for feedback correction, which will lead to mechanical damage of vehicle components, the loss of energy, fluctuations of the vehicle dynamics, discomfort, and dissatisfaction from passengers [33].
As the switching performance between driving and braking is critical to the vehicle's comfort and economy, a novel ACC strategy that considers the switching performance is proposed in this paper.Compared with the current work, the main contributions of this paper are as follows: (1) A sliding acceleration identification model based on the recursive least squares algorithm with multiple forgetting factors (MFF-RLS) is established in the ACC system; (2) With vehicle following, economy, and comfort as the optimization objectives, the MPC upper-level controller is designed in the ACC system.Considering the influence of switching performance on economy and comfort, the identified sliding acceleration is introduced into the MPC controller and the switching performance is optimized.(3) An iterative learning lower-level controller is designed to control the driving and braking systems.To improve the efficiency of regenerative braking, the braking force distribution strategy is also designed in the lower-level controller.
The remainder of this paper is organized as follows.Section 2 describes the vehicle platform and the control framework.Section 3 presents the sliding acceleration identification model.Section 4 presents the MPC-based multi-objective ACC strategy with constraints.Section 5 explains the lower-level controller with the braking force distribution strategy.Simulation results and analysis are discussed in Section 6. Lastly, conclusions are drawn in Section 7.

Vehicle Platform
As shown in Figure 1, the ACC system proposed in this paper is deployed on a frontwheel-drive electric vehicle.The vehicle is equipped with radars to detect the moving obstacles ahead.A permanent magnet synchronous motor with a motor control unit (MCU) is used to drive the vehicle through the transmission and differential.To provide energy for the motor and store the recovered braking energy, the vehicle is equipped with a high-voltage battery pack and battery management system (BMS).There is a disc brake on each wheel of the vehicle.The pressure in the brake comes from the hydraulic regulation unit, which is controlled by a brake control unit (BCU).When the ACC system works, the ACC controller calculates the vehicle's accelerating and braking demands in real-time based on the environmental information from the radars.The MCU and BCU receive the corresponding commands from the ACC system and control the actuators to execute.Once the mode is judged wrong, the control error caused by model mismatches will increase significantly.To reduce the error, the ACC system will frequently switch between driving and braking for feedback correction, which will lead to mechanical damage of vehicle components, the loss of energy, fluctuations of the vehicle dynamics, discomfort, and dissatisfaction from passengers [33].
As the switching performance between driving and braking is critical to the vehicle's comfort and economy, a novel ACC strategy that considers the switching performance is proposed in this paper.Compared with the current work, the main contributions of this paper are as follows: (1) A sliding acceleration identification model based on the recursive least squares algorithm with multiple forgetting factors (MFF-RLS) is established in the ACC system; (2) With vehicle following, economy, and comfort as the optimization objectives, the MPC upper-level controller is designed in the ACC system.Considering the influence of switching performance on economy and comfort, the identified sliding acceleration is introduced into the MPC controller and the switching performance is optimized.(3) An iterative learning lower-level controller is designed to control the driving and braking systems.To improve the efficiency of regenerative braking, the braking force distribution strategy is also designed in the lower-level controller.
The remainder of this paper is organized as follows.Section 2 describes the vehicle platform and the control framework.Section 3 presents the sliding acceleration identification model.Section 4 presents the MPC-based multi-objective ACC strategy with constraints.Section 5 explains the lower-level controller with the braking force distribution strategy.Simulation results and analysis are discussed in Section 6. Lastly, conclusions are drawn in Section 7.

Vehicle Platform
As shown in Figure 1, the ACC system proposed in this paper is deployed on a frontwheel-drive electric vehicle.The vehicle is equipped with radars to detect the moving obstacles ahead.A permanent magnet synchronous motor with a motor control unit (MCU) is used to drive the vehicle through the transmission and differential.To provide energy for the motor and store the recovered braking energy, the vehicle is equipped with a highvoltage battery pack and battery management system (BMS).There is a disc brake on each wheel of the vehicle.The pressure in the brake comes from the hydraulic regulation unit, which is controlled by a brake control unit (BCU).When the ACC system works, the ACC controller calculates the vehicle's accelerating and braking demands in real-time based on the environmental information from the radars.The MCU and BCU receive the corresponding commands from the ACC system and control the actuators to execute.

Control Framework
The fundamental function of the ACC system is to automatically regulate the host vehicle speed to maintain safe vehicle spacing from the lead vehicle.As shown in Figure 2, the control framework of the ACC system is designed to be hierarchical.In the upper-level controller, a sliding acceleration identification model is firstly established based on MFF-RLS.Then the identified sliding acceleration is introduced into the MPC controller.With vehicle following, economy, and comfort as the optimization objectives, the desired acceleration is calculated.In the lower-level controller, the mode switching logic is designed first to determine the operating mode of the host vehicle (braking or driving).Then, the torque and pressure demands for driving and braking are calculated and sent to the vehicle model so that the host vehicle can accurately track the desired acceleration.

Control Framework
The fundamental function of the ACC system is to automatically regulate the host vehicle speed to maintain safe vehicle spacing from the lead vehicle.As shown in Figure 2, the control framework of the ACC system is designed to be hierarchical.In the upperlevel controller, a sliding acceleration identification model is firstly established based on MFF-RLS.Then the identified sliding acceleration is introduced into the MPC controller.With vehicle following, economy, and comfort as the optimization objectives, the desired acceleration is calculated.In the lower-level controller, the mode switching logic is designed first to determine the operating mode of the host vehicle (braking or driving).Then, the torque and pressure demands for driving and braking are calculated and sent to the vehicle model so that the host vehicle can accurately track the desired acceleration.The vehicle model is established by Matlab/Simulink, which consists of a traction system model, a hydraulic braking system model, and a vehicle dynamics model.The traction system model contains the motor, battery, MCU, and BMS models, which accept the desired motor torque and output the actual motor torque.The hydraulic braking system model contains the master cylinder, pedal simulator, hydraulic regulation unit, disc brakes, and BCU models, which control the solenoid valves in the hydraulic regulation unit according to the desired pressure and output the hydraulic braking torque.The vehicle dynamics model contains the wheel, suspension, and spring-loaded mass models, which accept the actual motor torque and hydraulic braking torque, and feeds the vehicle status to the upper and lower level controller.The specific modeling process of the vehicle model can be found in [34], which will not be discussed here.

Sliding Acceleration Identification Model
For mode switching optimization, the key point is to obtain the sliding acceleration of the host vehicle.During the normal driving process, since the vehicle driving system and braking system need to work in real-time, the vehicle can't enter the sliding state to acquire the sliding acceleration directly, so it's necessary to identify the sliding acceleration by other methods.At present, there is little research on the identification of sliding acceleration.Li SB et al. obtained the speed-sliding acceleration curve through the vehicle coast-down test and used it as the mode switching threshold [35,36].Tsai et al. ignored the test calibration and took zero as the sliding acceleration [37].Kim et al. constructed a linear function with constant parameters to fit the relationship between vehicle speed and sliding acceleration [38].Through theoretical analysis of vehicle longitudinal dynamics, Li et al. derived a formula of vehicle speed and sliding acceleration [39].
The above studies all obtained the speed-sliding acceleration relationship by one offline calculation, which neglected the effect of external drag changes on the sliding acceleration.Therefore, this section proposes an online sliding acceleration identification model.Firstly, the sliding acceleration identification model is established according to the vehicle driving equation.Then, based on the vehicle CAN information, the equivalent The vehicle model is established by Matlab/Simulink, which consists of a traction system model, a hydraulic braking system model, and a vehicle dynamics model.The traction system model contains the motor, battery, MCU, and BMS models, which accept the desired motor torque and output the actual motor torque.The hydraulic braking system model contains the master cylinder, pedal simulator, hydraulic regulation unit, disc brakes, and BCU models, which control the solenoid valves in the hydraulic regulation unit according to the desired pressure and output the hydraulic braking torque.The vehicle dynamics model contains the wheel, suspension, and spring-loaded mass models, which accept the actual motor torque and hydraulic braking torque, and feeds the vehicle status to the upper and lower level controller.The specific modeling process of the vehicle model can be found in [34], which will not be discussed here.

Sliding Acceleration Identification Model
For mode switching optimization, the key point is to obtain the sliding acceleration of the host vehicle.During the normal driving process, since the vehicle driving system and braking system need to work in real-time, the vehicle can't enter the sliding state to acquire the sliding acceleration directly, so it's necessary to identify the sliding acceleration by other methods.At present, there is little research on the identification of sliding acceleration.Li SB et al. obtained the speed-sliding acceleration curve through the vehicle coast-down test and used it as the mode switching threshold [35,36].Tsai et al. ignored the test calibration and took zero as the sliding acceleration [37].Kim et al. constructed a linear function with constant parameters to fit the relationship between vehicle speed and sliding acceleration [38].Through theoretical analysis of vehicle longitudinal dynamics, Li et al. derived a formula of vehicle speed and sliding acceleration [39].
The above studies all obtained the speed-sliding acceleration relationship by one offline calculation, which neglected the effect of external drag changes on the sliding acceleration.Therefore, this section proposes an online sliding acceleration identification model.Firstly, the sliding acceleration identification model is established according to the vehicle driving equation.Then, based on the vehicle CAN information, the equivalent sliding acceleration is calculated.Finally, the unknown parameters in the sliding acceleration identification model are estimated by the MFF-RLS algorithm.

Modeling of the Sliding Acceleration
As shown in Figure 3, the resistance of the host vehicle in the driving direction mainly includes four parts: rolling resistance, aerodynamic drag, accelerating resistance, and slope resistance caused by gravity.
sliding acceleration is calculated.Finally, the unknown parameters in the sliding acceleration identification model are estimated by the MFF-RLS algorithm.

Modeling of the Sliding Acceleration
As shown in Figure 3, the resistance of the host vehicle in the driving direction mainly includes four parts: rolling resistance, aerodynamic drag, accelerating resistance, and slope resistance caused by gravity.To overcome the above resistance, the motor generates the driving force acting on the wheel.The equation of driving force and running resistance of the host vehicle is listed as follows: where d F is the driving force, r F is the rolling resistance, ad F is the aerodynamic drag, s F is the slope resistance, a F is the accelerating resistance, m is the vehicle mass, f is the rolling resistance coefficient, g is the gravity acceleration, α is the road slope, ρ is the mass density of air, d C is the aerodynamic drag coefficient, S is the vehicle frontal area, h v is the host vehicle speed, wind v is the wind speed, δ is the correction coefficient of rotating mass, h a is the host vehicle acceleration.
When the host vehicle is in the sliding state, neither the driving system nor the braking system is in operation.At this time, the vehicle is only subject to rolling resistance, aerodynamic drag, slope resistance and accelerating resistance.The vehicle sliding acceleration can be expressed as follows:

(
) To overcome the above resistance, the motor generates the driving force acting on the wheel.The equation of driving force and running resistance of the host vehicle is listed as follows: where F d is the driving force, F r is the rolling resistance, F ad is the aerodynamic drag, F s is the slope resistance, F a is the accelerating resistance, m is the vehicle mass, f is the rolling resistance coefficient, g is the gravity acceleration, α is the road slope, ρ is the mass density of air, C d is the aerodynamic drag coefficient, S is the vehicle frontal area, v h is the host vehicle speed, v wind is the wind speed, δ is the correction coefficient of rotating mass, a h is the host vehicle acceleration.
When the host vehicle is in the sliding state, neither the driving system nor the braking system is in operation.At this time, the vehicle is only subject to rolling resistance, aerodynamic drag, slope resistance and accelerating resistance.The vehicle sliding acceleration can be expressed as follows: where a s is the vehicle sliding acceleration.
If we modify Formula (2), a mathematical model of the sliding acceleration can be established as shown in Formula (3).
It can be seen that A is the quadratic coefficient, which is related to vehicle design parameters; B is the primary coefficient, which is related to wind speed and vehicle design parameters; C is a constant term, which is related to vehicle design parameters, wind speed, and road conditions.Therefore, for a specific vehicle, A is a constant value, and B and C are time-varying values.If we could estimate the B and C coefficients in real-time, the sliding acceleration at any speed could be identified.

Calculation of Equivalent Sliding Acceleration
According to Formula (3), the estimation of parameters B and C requires real-time sliding acceleration data, which cannot be acquired directly.Therefore, the equivalent sliding acceleration is used instead of the actual sliding acceleration data for parameter estimation.
By observing and recording the CAN bus information, we can get the vehicle speed v h (k), vehicle acceleration a h (k), motor driving torque T d (k), motor braking torque T b (k), cylinder pressure of front and rear axle p f (k), p r (k) at k moment.
According to the balance equation of vehicle driving force and driving resistance, the equivalent sliding acceleration of the driving process can be obtained as follows: where a esd (k) is the equivalent sliding acceleration of the driving process, a d (k) is the vehicle acceleration generated by driving force, i t is the vehicle transmission ratio, η is the transmission efficiency, r w is the wheel radius.
According to the balance equation of vehicle braking force and driving resistance, the equivalent sliding acceleration of the braking process can be obtained as follows: where a esb (k) is the equivalent sliding acceleration of the braking process, a b (k) is the vehicle deceleration generated by braking force, D f ,D r are the cylinder diameters of the front and rear wheel, R f , R r are the effective radiuses of the front and rear wheel, K b f , K br are the braking efficiency factors of the front and rear wheel.Through equivalent treatment, the equivalent sliding acceleration of the driving and braking process can be unified as the equivalent sliding acceleration a es (k).According to Formulas (4) and ( 5), the equivalent sliding acceleration is the difference between vehicle actual acceleration and the vehicle acceleration generated by driving or braking force.Since a es (k) is obtained considering the effect of vehicle driving and braking system, it is close to the actual sliding acceleration, but with more dramatic fluctuations.
Due to the great fluctuations, the equivalent sliding acceleration cannot directly replace the actual sliding acceleration for ACC control, but it can be used for the estimation of unknown parameters.After estimating parameters B and C, the sliding acceleration can be calculated indirectly.
By replacing the vehicle actual sliding acceleration with the equivalent sliding acceleration, Formula (3) can be transformed into Formula (6).
In Formula (6), the equivalent sliding acceleration a es (k) can be calculated from vehicle acceleration, motor torque, and braking pressure, the vehicle speed v h (k) can be obtained from CAN bus, the parameter A is a constant value, so the only unknown parameters in Formula (6) are parameters B and C. As long as there are two sets of sampled data, the unknown parameters B and C can be estimated.The detailed estimating process of parameters B and C is described as follows.

Recursive Least Squares Algorithm with Multiple Forgetting Factors
After obtaining the equivalent sliding acceleration, we need to use experimental data to modify the mathematical model.By constructing the error function between model results and actual results, we can continuously estimate the unknown parameters B and C in the mathematical model with the objective of minimizing the error function.At present, the classical algorithms of parameter estimation mainly include the least-squares algorithm [40] and the maximum likelihood algorithm [41].With the development of optimization theory, some intelligent optimization algorithms which simulate and reveal natural phenomena and processes, such as genetic algorithm [42], particle swarm optimization algorithm [43], and ant colony algorithm [44] have been widely used because of their unique characteristics in parameter estimation of nonlinear systems.But the computational complexity of these intelligent optimization algorithms is too large to satisfy the function of online real-time identification.Now, the most widely used algorithm in parameter estimation is the recursive least squares (RLS) algorithm [45].However, the traditional RLS algorithm is more suitable for the system with constant parameters, when it comes to the system with time-varying parameters, the traditional RLS algorithm may not work well [46].In this paper, the parameters to be estimated are affected by the change of wind speed and road slope.In order to avoid the failure of parameter identification, we could increase the weight of the latest observation data and reduce the weight of the previous observation data.In other words, we can introduce the forgetting factor to solve the problem.Because there are two parameters to be estimated in this paper, we select the corresponding forgetting factors for both estimated parameters and propose the recursive least square algorithm with multiple forgetting factors (MFF-RLS).
Transform Formula (6) into the form of RLS requirements, namely: where m(k), ψ(k), θ(k) represent the measured value, coefficient matrix, the system parameter at k moment respectively.According to the basic idea of the least-squares algorithm, we select the residual sum of squares between the measured value and the estimated value to establish the fitness function as follows: where λ 1 and λ 2 represent forgetting factors for estimated parameters θ1 (k) and θ2 (k) respectively.
In order to determine the estimated parameter and minimize the fitness function value, set ∂V/∂ θ1 (k) = 0 and ∂V/∂ θ2 (k) = 0, then the estimated parameter can be obtained as: Machines 2021, 9, 263 8 of 26 To realize real-time parameter estimation, Formula (9) should be converted into the recursive form shown in Formulas (10) and (11).
In addition, because θ 1 (k) and θ 2 (k) are unknown in Formulas ( 10) and (11), the estimated values θ1 (k) and θ2 (k) are used instead, it can be obtained that:

MPC Controller Design
The upper-level ACC controller based on MPC is designed in this section.Firstly, the vehicle predictive model is established according to the vehicle longitudinal kinematic characteristics.Then, with vehicle following, economy, and comfort as the optimization objectives, the objective function for the ACC system is developed.Finally, the system constraints for speed error, distance error, and acceleration are introduced into the MPC controller.

Vehicle Predictive Model
The current control input of MPC is obtained by solving the optimal control problem in the prediction time domain, which requires high computational efficiency.In order to simplify the calculation, assuming that the lead vehicle can maintain a uniform acceleration at k moment, then the predictive model of the lead vehicle can be expressed as: where s l (k), v l (k), a l (k) are respectively the driving distance, speed and acceleration of the lead vehicle; T s is the sampling time.
For the host vehicle, since the vehicle driving system has delay characteristics, the relationship between the desired acceleration and the actual acceleration can be described by the first-order inertia link.
where τ is the time lag of the vehicle driving system, a des is the desired acceleration output by the MPC controller.
Using the differential approximation method, Formula ( 14) can be transformed into the discretized format as follows: Machines 2021, 9, 263 9 of 26 Combined with the vehicle longitudinal kinematic characteristics, the predictive model of the host vehicle can be established as follows: where s h (k) is the driving distance of the host vehicle.
Combining the lead and host vehicle predictive models, the integrated vehicle predictive model can be defined as Choose the driving distance of the lead vehicle s l (k), the speed of the lead vehicle v l (k), the acceleration of the lead vehicle a l (k), the driving distance of the host vehicle s h (k), the speed of the host vehicle v h (k), and the acceleration of the host vehicle a h (k) as the state variables, that is Choose the desired acceleration of the host vehicle a des (k) as the control input, that is u(k) = a des (k).Then, the integrated predictive model can be transformed into the form of state space equation as follows: Selecting the prediction time domain as P, the state variable at each moment under the prediction time domain can be expressed as . . .
Since the initial state of the ACC system is known, the state at next moment can be predicted according to the Formula (18).Based on the prediction results, the optimal control can be carried out.According to Formula (19), the prediction process can run continuously, and the state information at any time in the prediction time domain can be obtained.

Objective Function
The objective function of the proposed ACC system includes three indexes: the following performance index, the comfort performance index, and the economy index.
It is accepted that the following performance of the ACC system includes speed following and distance following.Therefore, speed error and distance error are considered in the calculation of the following index, which is shown as follows: where l f ollow is the following performance index, w ∆d is the weight coefficient of distance error, ∆d is the distance error, w ∆v is the weight coefficient of speed error, ∆v is the speed error, d des is the desired inter-vehicle distance.
With respect to d des , the desired inter-vehicle distance is affected by driver preference, road commuting efficiency, and vehicle safety.If the vehicle spacing is too narrow, the commuting efficiency will improve, but the anxiety of the driver may lead to crashes.On the contrary, a large vehicle spacing is the guarantee of vehicle safety, but the road commuting efficiency will get worse and the side lane vehicles can easily insert.Nowadays, the constant time headway (CTH) [47] is commonly used in vehicle spacing algorithm, which is shown as follows: where τ h is the nominal time headway, d 0 is the safe stopping distance.
As frequent mode (driving or braking) switching and unreasonable longitudinal acceleration make negative impacts on driver feeling and vehicle economy, the comfort and economy of the ACC system can be improved via penalizing acceleration and mode switching frequency.
For the mode switching frequency, assuming that B and C coefficients in Formula (6) remain unchanged in the prediction time domain, the ACC operating mode can be expressed by Formula (22).
where ξ is the ACC operating mode, 1 represents driving mode and 0 represents braking mode.According to Formula ( 22), the less ξ jumps between 0 and 1, the smaller the mode switching frequency.Therefore, the mode switching frequency of the ACC system can be expressed as where f switch is the mode switching frequency of ACC system.Combining the mode switching frequency and the square of the acceleration, the combined comfort and economy index of the ACC system can be expressed as where l com−eco is the combined comfort and economy index, w ξ is the weight coefficient of mode switching frequency, w a is the weight coefficient of acceleration.According to Formula (20) and Formula (24), the objective function can be expressed as

System Constraints
Considering the vehicle physical limitations as well as the driver-permissible following error range, the maximum and minimum values of the state variables and control commands are constrained as follows (26) Organizing the above objective function and constraint, the optimization problem can be transformed into the following form minJ where The objective function is a nonlinear discontinuous function, the interior point method can be used to solve this nonlinear programming problem [48].

Lower-Level Controller
The objectives of the lower-level controller are controlling the driving and braking systems so that the vehicle acceleration can steadily follow the desired acceleration.Since the driving and braking systems are two different systems that cannot work simultaneously, the lower-level controller should firstly determine the operating mode of the vehicle.In this paper, the driving and braking modes are determined based on the desired acceleration and the identified sliding acceleration.When the desired acceleration is greater than the sliding acceleration, the vehicle will enter the driving mode; when the desired acceleration is less than the sliding acceleration, the vehicle will enter the braking mode.
For the control of driving and braking torque, the iterative learning algorithm is used in this paper.As a control algorithm with self-learning ability, the iterative learning algorithm does not need the exact model of the system itself, and has strong adaptability to the nonlinear system and time-varying system.The principle of the iterative learning algorithm is to use the system input of the previous cycle and the tracking error of the current cycle to modify the system input of the current cycle so that the system output can gradually converge to the desired output.In addition, the iterative learning algorithm belongs to the feedforward control algorithm, its key lies in the design of the updating law.Currently, the commonly used updating law includes P-type, PI-type, PD-type, and PID-type [49].Considering that the vehicle dynamics model has certain hysteresis, the PD-type updating law is adopted to design the lower-level controller as follows: where, U(k) is the system input, e(k) is the tracking error, L p and L d represent the learning gain factors of proportional and differential parts respectively, n is the number of iterations.
In detail, when the mode switching logic determines that the vehicle should enter the driving mode, the desired acceleration will be modified by the ACC driving controller.The design of the driving controller is as follows: where, a drive_n (k) is the modified acceleration output to the vehicle driving system at nth iteration.To compensate for the disturbance of external driving resistance, the initial iteration value is set as the sliding acceleration identified by the MFF-RLS algorithm.
The modified driving acceleration obtained by the iterative learning algorithm needs to be converted into the motor driving torque requirements, which can be calculated by Formula (31): where, T dreq_n (k) is the required motor driving torque at nth iteration.
If the mode switching logic determines that the vehicle should enter the braking mode, the ACC braking controller will modify the desired acceleration.The braking controller of the ACC system is designed as follows: where, a brake_n (k) is the modified acceleration output to the vehicle braking system at nth iteration.
Convert the modified braking acceleration into the braking torque requirements, namely: where, T breq_n (k) is the required braking torque at nth iteration.
As the electric vehicle has regenerative braking function, the required braking torque needs to be distributed into motor braking torque and hydraulic braking torque according to the braking force distribution strategy.The key point of the braking force distribution strategy is to recycle as much energy as possible while ensuring braking safety.In this paper, the target vehicle is driven by the front axle, so the braking force distribution strategy should distribute more force to the front axle.
Considering the restriction of braking force distribution by ECE regulations, this paper designs the braking force distribution strategy as shown in Figure 4.When the braking strength z < z 1 , the braking force is provided by the front axle only; when the braking strength z 1 < z < z 2 , the braking force of front and rear axle is distributed along the ECE regulation line; when the braking strength z 2 < z < z 3 , the braking force of the front axle keeps unchanged and the braking force of the rear axle increases; when the braking strength z > z 3 , the motor braking is stopped, the braking force of front and rear axle is distributed along the β line.In the whole braking process, if the motor braking force is insufficient, the hydraulic braking force will compensate for the loss of total braking force.The braking force distribution can be expressed as follows: z <z<z ( 1) The boundary condition is calculated as follows: where bf F is the braking force of the front axle, br F is the braking force of the rear axle, b F is the total demand force, L is the total wheelbase, b is the rear wheelbase, g h is the height of mass center, max b T is the maximum value of motor braking torque, β is the brake force distribution coefficient.
In the above controller design process, the selection of the learning gain factors determines the convergence speed and control error of the iterative learning control algorithm.To improve the running efficiency of the ACC system, the iterative learning algorithm uses fixed learning gain factors.When the vehicle is in the driving mode, set ; When the vehicle is in the braking mode, set .
Figures 5 and 6 show the actual acceleration and desired acceleration curves of the vehicle during driving and braking processes.It can be seen that the control error gradually decreases as the number of iterations increases.After seven iterations, the actual The boundary condition is calculated as follows: where F b f is the braking force of the front axle, F br is the braking force of the rear axle, F b is the total demand force, L is the total wheelbase, b is the rear wheelbase, h g is the height of mass center, T bmax is the maximum value of motor braking torque, β is the brake force distribution coefficient.
In the above controller design process, the selection of the learning gain factors determines the convergence speed and control error of the iterative learning control algorithm.To improve the running efficiency of the ACC system, the iterative learning algorithm uses fixed learning gain factors.When the vehicle is in the driving mode, set L p = 1.5, L d = 0.2; When the vehicle is in the braking mode, set L p = 1.3, L d = 0.2.
Figures 5 and 6 show the actual acceleration and desired acceleration curves of the vehicle during driving and braking processes.It can be seen that the control error gradually decreases as the number of iterations increases.After seven iterations, the actual acceleration curve fits the desired acceleration curve almost exactly, showing the effectiveness of learning gain factor selection.

Simulation Results and Analysis
To verify the effectiveness of the proposed ACC strategy, several experiments are conducted utilizing Matlab/Simulink.The main parameters used in the simulations are set in Table 1.

Simulation Results and Analysis
To verify the effectiveness of the proposed ACC strategy, several experiments are conducted utilizing Matlab/Simulink.The main parameters used in the simulations are set in Table 1.

Simulation and Analysis of the Sliding Acceleration Identification Model
According to Formula (3), the sliding acceleration is mainly affected by the wind speed and road slope.Therefore, we select wind speed and road slope change conditions to verify the effectiveness of the sliding acceleration identification model.
In the case of wind speed change, the wind speed and vehicle speed curves are set as shown in Figure 7, where wind speed greater than zero means downwind driving, and wind speed less than zero means headwind driving.
The identification results of sliding acceleration under the change of wind speed are shown in Figures 8 and 9.It can be seen that when the wind speed does not change, the absolute value of the sliding acceleration increases with the increase of vehicle speed, and the change curve of the identified sliding acceleration basically matches with the actual sliding acceleration curve.When the wind speed changes suddenly, there is a deviation between the identified value and the actual value, but the identified value can quickly follow the actual value.
According to Formula (3), the sliding acceleration is mainly affected by the wind speed and road slope.Therefore, we select wind speed and road slope change conditions to verify the effectiveness of the sliding acceleration identification model.
In the case of wind speed change, the wind speed and vehicle speed curves are set as shown in Figure 7, where wind speed greater than zero means downwind driving, and wind speed less than zero means headwind driving.The identification results of sliding acceleration under the change of wind speed are shown in Figures 8 and 9.It can be seen that when the wind speed does not change, the absolute value of the sliding acceleration increases with the increase of vehicle speed, and the change curve of the identified sliding acceleration basically matches with the actual sliding acceleration curve.When the wind speed changes suddenly, there is a deviation between the identified value and the actual value, but the identified value can quickly follow the actual value.Figure 9 shows the identification error under the change of wind speed.It can be seen that the identification error rate is only high at the sudden change point of wind speed.As the wind speed gradually stabilizes, the identification error rate soon converges to 0. Take a closer look at the identification error rate at the sudden change point of wind speed, it can be seen that the identification error rate has been controlled within 16%.The larger the wind speed sudden change is, the larger the identification error rate is.  Figure 9 shows the identification error under the change of wind speed.It can be seen that the identification error rate is only high at the sudden change point of wind speed.As the wind speed gradually stabilizes, the identification error rate soon converges to 0. Take a closer look at the identification error rate at the sudden change point of wind speed, it can be seen that the identification error rate has been controlled within 16%.The larger the wind speed sudden change is, the larger the identification error rate is.
In the case of road slope change, the slope height and vehicle speed curves are shown in Figure 10.The identification results of sliding acceleration under the change of road slope are shown in Figures 11 and 12.It can be seen that when the vehicle is decelerating on the slope, the identified sliding acceleration fits well with the actual sliding acceleration.As the identification error is so small, the difference between the identified value and the actual value is used to express the identification error.Compared with the simulation results under wind speed variation, the identification error under slope height variation is much smaller because the road slope change is much slower than the wind speed change.In the case of road slope change, the slope height and vehicle speed curves are shown in Figure 10.The identification results of sliding acceleration under the change of road slope are shown in Figures 11 and 12.It can be seen that when the vehicle is decelerating on the slope, the identified sliding acceleration fits well with the actual sliding acceleration.As the identification error is so small, the difference between the identified value and the actual value is used to express the identification error.Compared with the simulation results under wind speed variation, the identification error under slope height variation is much smaller because the road slope change is much slower than the wind speed change.
In the actual driving process, wind speed and road slope interference usually occur simultaneously, and measurement disturbances will also have an impact on the identification results.To verify the robustness of the sliding acceleration identification model under multiple disturbances, the wind speed and road slope are set according to Figure 13, the desired vehicle speed is set according to Figure 14, while Gaussian white noise is added to the input signals to make the measurement error reach 5%.Figures 15 and 16 show the identification results of sliding acceleration.It can be seen that the identification error of sliding acceleration increases slightly after considering wind speed, road slope and measurement disturbances, but it can still converge quickly, showing the robustness of the sliding acceleration identification model.

Simulation and Analysis of the ACC Strategy
To verify the improved performance of the proposed ACC strategy, several comparative simulations under wind speed and road slope change conditions are carried out.The conventional MPC-based ACC strategy is selected as the comparison object, which has two parts less than the proposed ACC strategy, namely, the sliding acceleration identification model and the mode switching optimization.Because the compared ACC strategy cannot obtain the sliding acceleration in real-time, its mode switching boundary is set to 0. Figures 17-25 show the simulation results of the two ACC strategies, where the wind speed and road slope are set according to Figure 13, the initial inter-vehicle distance is set to 20 m, and the speed of the lead vehicle is set according to Figure 14.cation results.To verify the robustness of the sliding acceleration identification model un der multiple disturbances, the wind speed and road slope are set according to Figure 13 the desired vehicle speed is set according to Figure 14, while Gaussian white noise i added to the input signals to make the measurement error reach 5%.Figures 15 and 16 show the identification results of sliding acceleration.It can be seen that the identification error of sliding acceleration increases slightly after considering wind speed, road slope and measurement disturbances, but it can still converge quickly, showing the robustnes of the sliding acceleration identification model.

Simulation and Analysis of the ACC Strategy
To verify the improved performance of the proposed ACC strategy, several comparative under wind speed and road slope change conditions are carried out.The conventional MPC-based ACC strategy is selected as the comparison object, which has two parts less than the proposed ACC strategy, namely, the sliding acceleration identification model and the mode switching optimization.Because the compared ACC strategy cannot obtain the sliding acceleration in real-time, its mode switching boundary is set to 0. Figures 17-25 show the simulation results of the two ACC strategies, where the wind speed and road slope are set according to Figure 13, the initial inter-vehicle distance is set to 20 m, and the speed of the lead vehicle is set according to Figure 14.

Simulation and Analysis of the ACC Strategy
To verify the improved performance of the proposed ACC strategy, several comparative simulations under wind speed and road slope change conditions are carried out.The conventional MPC-based ACC strategy is selected as the comparison object, which has two parts less than the proposed ACC strategy, namely, the sliding acceleration identification model and the mode switching optimization.Because the compared ACC strategy cannot obtain the sliding acceleration in real-time, its mode switching boundary is set to 0. Figures 17-25 show the simulation results of the two ACC strategies, where the wind speed and road slope are set according to Figure 13, the initial inter-vehicle distance is set to 20 m, and the speed of the lead vehicle is set according to Figure 14.The speed and distance curves of the two ACC strategies are shown in Figures 17 and 19, and it can be seen that the two control strategies have similar performance in speed following and distance following.When it comes to the speed error and distance error of the two ACC strategies, Figures 18 and 20 show that both ACC strategies can maintain the speed error within 10 km/h and the distance error within 6 m, which can meet driving needs.Furthermore, the speed error and distance error curves of the two ACC strategies approximately overlap when the lead vehicle accelerates or decelerates.But when the lead vehicle drives at a constant speed, the speed error and distance error curves of the two ACC strategies will deviate.The reason is that the objective functions of the two strategies differ only in the mode switching optimization.As the host vehicle seldom switches between driving and braking when the lead vehicle accelerates or decelerates, the mode switching frequency remains 0 in most cases, which means that the mode switching optimization hardly plays a role in the calculation of the desired acceleration.Therefore, the speed error and distance error curves of the two ACC strategies approximately overlap at this time.However, when the lead vehicle drives at a constant speed, the host vehicle will often switch between driving and braking to keep a reasonable distance from the lead vehicle.At this time, the mode switching optimization will influence the calculation of the desired acceleration, leading to the deviation of the speed error and distance error curves of the two strategies.
To further compare the comfort performance of the two ACC strategies, the acceleration curves for both strategies are given in Figures 21 and 22.It can be seen that when the conventional ACC strategy works near the fixed switching boundary, the vehicle acceleration fluctuates greatly.According to the flag status in Figure 23 (1 represents the driving mode, 0 represents the braking mode), the conventional ACC strategy switches frequently between the driving mode and the braking mode.That is because the actual sliding acceleration is always changing with wind speed, road slope and vehicle speed.To adapt to sliding acceleration changes, the vehicle should adjust its working modes all the time.For example, at the 50th second of the simulation, the actual sliding acceleration is less than zero under the influence of road slope and wind speed.To keep the vehicle moving at a constant speed, the vehicle must be in the driving mode.However, the conventional ACC strategy cannot adjust the mode switching logic according to the change of the external environment.As a result, the vehicle may enter the braking mode by mistake.Once the mode is judged wrong, the tracking error will increase.To reduce the error, the conventional ACC strategy will frequently switch between driving and braking mode for feedback correction, which will lead to the fluctuation of acceleration.Furthermore, from Figures 17-20, it can be seen that the frequent switching of driving and braking will not only cause fluctuations in acceleration but also in its speed and inter-vehicle distance, resulting in poor comfort.
In contrast, since the proposed ACC strategy can identify the sliding acceleration online and introduce the sliding acceleration into the MPC controller, the problem of frequent mode switching under the changing environment has been effectively solved.From the results shown in Figure 24, we can see that when the desired acceleration is next to zero, the vehicle is always in the correct working mode, and the mode switching frequency of the proposed ACC strategy is significantly reduced, which not only improves the comfort performance but also avoids component wear and extends the operating life of the vehicle.As for the comfort performance of the proposed ACC strategy, it can be seen from  that no matter how the road slope and wind speed change, the vehicle is always kept in a stable running state.Compared to the conventional ACC strategy, the fluctuations of the vehicle speed, inter-vehicle distance, desired acceleration, and actual acceleration of the proposed ACC strategy are greatly reduced when the vehicle is driving at a constant speed.
Benefit from the mode switching optimization, the proposed ACC strategy also has an improvement in terms of vehicle economy.Figure 25 shows the State of charge (SOC) curves of the two ACC strategies; it can be seen that due to the inclusion of the braking force distribution strategy, the battery SOC will increase when the vehicle is braking with high intensity, which means that both strategies can effectively recover the braking energy.When it comes to the economy of the two strategies, Table 2 shows that the average energy consumption of the conventional ACC strategy is 4.87 kWh/100 km, and in contrast, the average energy consumption of the proposed ACC strategy is 4.77 kWh/100 km, which means that an improvement of 2.05% in power is achieved in this driving scenario.Since the proposed strategy adds the sliding acceleration identification model and mode switching optimization moreso than the conventional strategy, it needs higher computational efficiency.In the aforementioned simulation process, the actual running time of the conventional strategy is 239 s.In contrast, the proposed strategy needs 272 s to complete the simulation.As the actual running time required by both strategies is less than 300 s, both strategies have the potential to be applied in a real-time environment.

Conclusions
In this paper, a novel ACC strategy for electric vehicles was proposed, which mainly consisted of a sliding acceleration identification model and an MPC controller.The sliding acceleration identification model was designed based on the MFF-RLS algorithm.By introducing the identified sliding acceleration into the MPC controller, the economy, comfort and following performance of the vehicle could be optimized.The simulation results show that the proposed strategy can accurately identify the sliding acceleration under the interference of wind speed change and slope height change.Compared with the conventional MPC-based ACC strategy, the strategy proposed in this paper has similar performance in speed following and distance following under disturbances, but it significantly reduces the switching frequency between driving and braking modes.Benefitting from that, the comfort and economy of the vehicle are significantly improved.In the terms of comfort, the proposed strategy greatly reduces the vehicle acceleration fluctuation and speed fluctuation.With respect to the economy, the energy consumption of the proposed strategy is reduced by 2.05%.
In practice, the estimation results of the sliding acceleration are influenced by the measurement disturbance, and the MPC algorithm requires high running efficiency.To further verify the effectiveness of the proposed strategy, we will apply the proposed ACC strategy to a real vehicle in the future.In addition, we will study the driver's behavior characteristics to make the ACC system more suitable to the driver's needs.

Figure 1 .
Figure 1.Structure of the electric vehicle.Figure 1. Structure of the electric vehicle.

Figure 1 .
Figure 1.Structure of the electric vehicle.Figure 1. Structure of the electric vehicle.

Figure 2 .
Figure 2. Control framework of the ACC system.

Figure 2 .
Figure 2. Control framework of the ACC system.
Machines 2021, 9, x FOR PEER REVIEW 15 of 27 acceleration curve fits the desired acceleration curve almost exactly, showing the effectiveness of learning gain factor selection.

Figure 5 .
Figure 5. Actual and desired acceleration during the driving process.Figure 5. Actual and desired acceleration during the driving process.

Figure 5 .
Figure 5. Actual and desired acceleration during the driving process.Figure 5. Actual and desired acceleration during the driving process.

Figure 5 .
Figure 5. Actual and desired acceleration during the driving process.

Figure 6 .
Figure 6.Actual and desired acceleration during the braking process.

Table 1 .Figure 6 .
Figure 6.Actual and desired acceleration during the braking process.

Figure 7 .
Figure 7. Wind speed and vehicle speed curves.

Figure 7 .
Figure 7. Wind speed and vehicle speed curves.Machines 2021, 9, x FOR PEER REVIEW 17 of 27

Figure 8 .
Figure 8. Sliding acceleration under wind speed variation.Figure 8. Sliding acceleration under wind speed variation.

Figure 8 .
Figure 8. Sliding acceleration under wind speed variation.Figure 8. Sliding acceleration under wind speed variation.

Figure 9 .
Figure 9. Identification error under wind speed variation.

Figure 9 .
Figure 9. Identification error under wind speed variation.

Figure 10 .
Figure 10.Slope height and vehicle speed curve.

Figure 12 .
Figure 12.Identification error under slope height variation.

Figure 10 .
Figure 10.Slope height and vehicle speed curve.

Figure 10 .
Figure 10.Slope height and vehicle speed curve.

Figure 12 .
Figure 12.Identification error under slope height variation.

Figure 10 .
Figure 10.Slope height and vehicle speed curve.

Figure 12 .
Figure 12.Identification error under slope height variation.Figure 12. Identification error under slope height variation.

Figure 12 .
Figure 12.Identification error under slope height variation.Figure 12. Identification error under slope height variation.
added to the input signals to make the measurement error reach 5%.Figures 15 show the identification results of sliding acceleration.It can be seen that the identi error of sliding acceleration increases slightly after considering wind speed, roa and measurement disturbances, but it can still converge quickly, showing the rob of the sliding acceleration identification model.(a) Wind speed (b) Slope height

Figure 13 .
Figure 13.Wind speed and slope height curves.

Figure 13 .
Figure 13.Wind speed and slope height curves.

Figure 13 .
Figure 13.Wind speed and slope height curves.

Figure 15 .
Figure 15.Sliding acceleration under wind speed and slope height variation.

Figure 16 .
Figure 16.Identification error under wind speed and slope height variation.

Figure 15 .
Figure 15.Sliding acceleration under wind speed and slope height variation.

Figure 16 .
Figure 16.Identification error under wind speed and slope height variation.

Figure 23 .
Figure 23.Flag status of conventional ACC.Figure 23.Flag status of conventional ACC.

Figure 23 .
Figure 23.Flag status of conventional ACC.

Figure 24 .
Figure 24.Flag status of proposed ACC.

Figure 24 .
Figure 24.Flag status of proposed ACC.

Figure 23 .
Figure 23.Flag status of conventional ACC.

Figure 24 .
Figure 24.Flag status of proposed ACC.

Table 1 .
Main parameters used in the simulations.

Table 2 .
Energy consumption results.