An Adaptive Cruise Control Method Based on Improved Variable Time Headway Strategy and Particle Swarm Optimization Algorithm

During the car following process, in order to improve ACC ability to coordinate various goals and adaptability in a complex and variable driving environment, the variable time headway spacing strategy and multi-objective adaptive cruise control algorithm are studied. Aiming at the deceleration adaptability, an improved variable time headway strategy is proposed, which adjusts the value of acceleration weight according to the deceleration duration and deceleration changes to increase the relative distance between the two vehicles in deceleration conditions. In order to improve the multi-objective coordination ability, the longitudinal kinematics model between the two vehicles is established, the objective function and constraints considering multiple factors are designed, and the relaxation factor vector is introduced to soften the boundary of different hard constraints to solve the problem with no feasible solution. Based on model predictive control theory, the objective function is converted into a multi-constrained quadratic programming problem in the rolling optimization process, and an improved particle swarm algorithm is used to solve the function. Through numerical simulation, the results show that the improved ACC algorithm can effectively improve the safety of the vehicle during deceleration, as well as the fuel economy, comfort and tracking ability under cycling conditions. The effectiveness of the algorithm is verified by the joint simulation of MATLAB/Simulink and CarSim.


I. INTRODUCTION
The adaptive cruise control (ACC) system is one of the advanced driver assistance systems (ADAS). ACC can detect the position and speed of the vehicle in front through various on-board sensors, and automatically adjust the speed of the vehicle in accordance with the control strategy to maintain an appropriate safety distance [1], [2].
Spacing strategy is one of the important components of the ACC system. Whether its design is reasonable will directly affect the safety of vehicles and the utilization rate of roads [3]. Too small a distance between two vehicles will cause a rear-end collision, and excessive large distance will not only cause traffic volume to drop but also cause The associate editor coordinating the review of this manuscript and approving it for publication was Chao-Yang Chen . vehicle congestion in adjacent lane. In the spacing strategy, the main research is the spacing strategy of variable time headway (VTH) based on the headway spacing. Xu et al. [4] obtained the variable spacing strategy through curve fitting of human driver behavior provided by vehicle manufacturers. In the VTH strategy designed for the intelligent cruise control system, the time headway is proportional to the speed of the vehicle [5]. Yi et al. [6] designed a variable spacing strategy that considers the effect of tire-road friction on vehicle braking distance and driving mode. Yanakiev and Kanellakopoulos [7], [8] studied the longitudinal control problem of automatic heavy trucks and designed a realtime VTH strategy combined with relative speed. This strategy can reduce instantaneous errors and allow two vehicles to maintain a small distance. Based on the multi-objective ACC algorithm of the model predictive control framework, VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ a VTH strategy was proposed by Luo [9]. In this strategy, the acceleration of the preceding vehicle is introduced to simulate the changing trend of the preceding vehicle's speed. Wang and Rajamani [10], [11] proposed a variable spacing strategy based on macro traffic flow theory, and believed that the time headway is related to the road congestion density and free flow speed, which improves the stability of traffic flow and a higher capacity. Chen et al. [12] considered the relationship among macroscopic traffic flow theory, relative speed and vehicle acceleration, and proposed an improved variable spacing strategy. Jiang et al. [13] combined the advantages of nonlinear spacing strategy and improved VTH strategy on the basis of previous studies. The improved strategy is nonlinear to the relative velocity and proportional to the acceleration, thus modifying the stability and safety of the variable interval strategy. At present, the research of upper-layer control algorithms tends to be diversified and refined to better meet the needs in real life. Persson et al. [14] introduced a stop-and-go ACC suitable for urban road conditions. Li et al. [15] and Lin et al. [16] designed a multi-objective ACC that comprehensively coordinated fuel economy and economy while considering vehicle following safety. Fancher and Bareket [17] divides the operating conditions of the vehicle into cruise and follow conditions according to the time headway. Pei et al. [18] divided ACC vehicle into various following modes by time headway and the reciprocal collision avoidance time, so as to adapt to complex traffic environment. Imitation driver behavior ACC [19] and so on. The main idea is to improve driving comfort and fuel economy performance on the basis of ensuring safety. With the development of ACC theory, more scholars are studying collaborative adaptive cruise control systems. Zheng et al. [20] proposed a distributed reference governor (RG) approach to the constraint handling of vehicle platoons equipped with cooperative adaptive cruise control. Zhai et al. [21] established a distributed model predictive control (DMPC) algorithm for heterogeneous vehicle platoons with unidirectional topologies and a priori unknown desired set point. Abou Harfouch et al. [22] combined the eco-driving and platooning technologies to propose an ecological cooperative look-ahead control strategy, which is used for autonomous vehicle platoons travelling on a freeway with varying slopes. Ploeg et al. [23] studied a novel CACC strategy that overcomes the homogeneity assumption and that is able to adapt its action and achieve string stability even for uncertain heterogeneous platoons. Naus et al. [24] based on on-board sensors to estimate the acceleration of the previous vehicle, and proposed a control strategy for moderately degrading the CACC of a single vehicle to reduce the influence of communication obstacle.
In recent years, intelligent algorithms have developed rapidly. Compared with other optimization algorithms, particle swarm optimization (PSO) algorithm has the advantages of simple structure, fast operation, easy adjustment of parameters and obvious optimization results [25]. Susuki et al. [26] used PSO to optimize the weight of the objective function in MPC to achieve adaptation. Huang et al. [27] cited an improved PSO algorithm to solve the objective function with control variable constraints. Dong et al. [28] introduced a PSO algorithm with chaos initialization to solve the control optimization problem with both input constraints and state constraints. Mei et al. [29] combined the penalty function with the PSO algorithm, and used the penalty function to transform the constrained optimization problem into an unconstrained problem. Perze et al. [30] used dynamic inertial weight to avoid premature convergence, and proposed a penalty function with an adaptive penalty factor to solve constraint problems.
The focus of this article is to improve ACC's ability and adaptability to coordinate various goals in a complex and changing driving environment, especially the safety under deceleration. In Section II, the strategy of variable time headway is studied. In case of emergency deceleration of the preceding vehicle, the safety of the vehicle can be enhanced by improving variable time headway. In Section III, the longitudinal kinematics model of the two vehicles is established, the multi-objective problem is solved based on MPC principle, and the constraint conditions considering multiple factors are designed. In Section IV, in order to strengthen the coordination ability of multi-objective, improved particle swarm optimization is introduced to solve constrained multiobjective problems. Section V defines baseline scenarios for steady state and transition operations. In view of these situations, the simulated response of ACC system is evaluated and compared.

II. IMPROVED VARIABLE SPACING STRATEGY
In the process of ACC operation, the spacing strategy determines the expected following distance used by the vehicle during driving process, and provides reference distance input values for the subsequent ACC control algorithm, which is a very important step of the ACC system.
Since the variable spacing strategy can adapt to more complicated traffic environment, the following spacing strategy is adopted.
where d safe is the desired distance, t h is the time headway, v f is the speed of the ACC vehicle, and d 0 is the minimum safe distance. Yanakiev and Kanellakopoulos [7] studied the longitudinal control of automatic heavy trucks and designed a real-time VTH strategy that combines relative speed (v ref = v l − v f ) and the variable head distance decreases with increasing relative speed.
where t 0 is the parameter greater than zero, c v is the weight coefficient of relative velocity and v l is the speed of the preceding vehicle. In order to improve the dynamic performance of ACC control, Luo [9] proposed to consider the changing trend of the preceding vehicle speed in the spacing strategy.
where c a is the weight coefficient of the acceleration and a p is the acceleration of the preceding vehicle. Taking into account that the time headway is not negative, and too large will also cause waste of traffic flow. References [7]- [9] all use saturation functions to limit the time headway.
where t hmax and t hmin are the upper and lower limits of t h , respectively.
Based on reference [9], the simulation found that the constant value of c a cannot satisfy the following behavior of ACC vehicles when the preceding vehicle decelerates. When the deceleration of the preceding vehicle reaches a certain value, there is a danger of rear-end collision, and the safety of the vehicle cannot be guaranteed when it continues to decelerate. Therefore, in order to ensure its safety when the preceding vehicle is driving at a uniform deceleration, the time headway should be changed with the deceleration time of the preceding vehicle.
where k t is the duration of the deceleration of the preceding vehicle. (That is, if the preceding vehicle has the same acceleration as the previous one second, then k t = k t +1 otherwise k t = 1.) Considering that the time headway is non-negative, and excessively large traffic flow will also be wasted. In this article, the time headway is divided into an acceleration stage and a deceleration stage. This article uses the same method as above when the preceding vehicle is accelerating or driving at a constant speed. When the preceding vehicle decelerates, c a changes with the duration of deceleration. In the case of deceleration of the preceding vehicle, safety should be considered first, so a lower limit but no upper limit is used.

III. ACC UPPER CONTROL ALGORITHM
The upper-level control algorithm derives the desired acceleration based on the driving environment information, so that the ACC will drive according to the expected following distance. This article uses a multi-objective adaptive cruise upper control algorithm based on model predictive control theory.

A. KINEMATICS MODEL BETWEEN VEHICLES
According to the longitudinal kinematics relationship between the ACC vehicle and the target vehicle [31], let is the weight coefficient of the corresponding item. i represents the ith step prediction. A, B, C and G are coefficient matrices.
where T s is the sampling period, τ is the time delay constant of the lower controller.

B. FORECAST MODEL DESIGN
Suppose the current moment is k, the prediction time domain is P, and the control time domain is N . The discrete state space equation for predicting the ACC system through iterations from Eq (7), (8) and (9). where

1) ANALYSIS OF CONTROL OBJECTIVES
In the process of following the car, the ultimate goal of the operation of the ACC system is to achieve the driver's expectation, that is, the distance between the vehicles reaches the desired distance, and the speed of the ACC vehicle approaches the preceding vehicle speed. Then the optimization goal is, For comfort, changes in vehicle acceleration and acceleration change rate affect driving comfort. The smaller change amplitude, the better comfort performance, that is, the optimization goal is. min a f (k) min |j erk (k)| (14) 2) CONSTRAINT ANALYSIS In any driving situation, safety is the first consideration.
Although the dynamic operation of the ACC system can ensure that the two vehicles reach the desired distance within a period of time, a rear-end collision may have occurred during this process, so the distance between the two vehicles is strictly restricted.
Considering the limits of vehicle safety, fuel economy, own and transportation laws and regulations, we should limit the relative distance, own vehicle speed, acceleration, acceleration change rate and control variables within a certain range. In view of the situation that MPC has no solution under hard constraints during the rolling optimization process, this article uses the method in [18] to treat the constraints that need to be expanded differently, so the constraints are relaxed.
where Processing of constraints in the prediction time domain P. where Rolling optimization is a major feature of model predictive control. It performs optimization in a finite time domain forward in an infinite time domain. In order to meet the desired response to the control goals of safety, following, comfort, fuel economy, etc. during the driving process of the vehicle, sum up the objective function as follows.
Under the framework of MPC, the items irrelevant to the control variables in the objective function J are deleted, and the multi-objective ACC control algorithm is finally classified as a constrained quadratic programming problem. where LG · · · 0 . . .

IV. IMPROVED PARTICLE SWARM OPTIMIZATION ALGORITHM
The particle swarm optimization (PSO) algorithm is a swarm intelligence algorithm proposed by Kennedy and Eberhart [32] in 1995. The bird individuals are regarded as random particles, and the particles are guided to the optimal solution through local and global optimization.
where H ε and f ε are real matrices, and x is a column vector containing U N and ε.

2) CONSTRAINT EVALUATION FUNCTION
In the constraint processing, the constraint violation value f (x) of each group of particle swarms is calculated, and the function g(x) is used to determine whether the constraint violation value exceeds the constraint range, and the constraint evaluation function F(x) is obtained in a cumulative manner. The constraint evaluation function judges the violation of constraints of each group of particle swarms.
where f j (x i ) the violation value of the i-th particle swarm under the j-th constraint, a j is the jth row of the matrix , b j is the jth row of the matrix T , F (x i ) is the constraint evaluation function of the ith particle swarm, and n represents the number of constraints.

3) POSITION ITERATION
The next-generation next i is generated through the basic speed and position iteration formula. The next-generation compares the value of the constraint evaluation function F with the original generation x i . If the value of the constraint evaluation function is zero, the next iteration is performed. If neither is zero, the replacement value is defined and it is judged that the value of the constraint evaluation function is small to perform next-generation iterative calculation.

4) REPLACEMENT VALUE
When the value of the constraint evaluation function of the original generation and the next-generation is not zero, it means that all exceeds the constraint, and then the defined replacement value will replace the value of the original generation x i and the next-generation next i (the original generation is used as a backup group).
where a and b are the corresponding values when the constraint condition ax≤ b. rn 1 and rn 2 are two random numbers in [0, 1].

5) ALGORITHM FLOW CHART V. SIMULATION
The simulation analysis platform is MATLAB R2018a version under Microsoft Windows 10 64bit. The simulation parameters are shown in Table 1. Simulation experiments are carried out on the algorithm proposed in this article, and factors such as road and vehicle differences are not considered in the calculation process.

A. RELATIONSHIP BETWEEN c a AND a p
Assume that when the ACC vehicle and the preceding vehicle follow the vehicle normally, the preceding vehicle continues to decelerate at a constant deceleration until stops. By adjusting the value of c a , the scatter plot of the value of c a corresponding to different decelerations can be  obtained under different decelerations. (c a selection principle: relative distance is not greater than the initial distance and the minimum value of relative distance is greater than zero). Figure 3. (a) shows the scatter distribution of all c a values that satisfy the selection condition in each deceleration case. The relationship between c a and a p is obtained by selecting the intermediate value of all scatter distribution in each deceleration section that meets the conditions. As shown in the scatter plot shown in Figure 3. (b), find the relationship between c a and a p through 1stOpt software.
where p 1 , p 2 and p 3 are constant coefficients. By adjusting the value of c a under different decelerations, it can be known that it changes with the deceleration of the preceding vehicle. The time headway t h is obtained from the above simulation.

B. SIMULATION VERIFICATION
This article compares adaptive cruise control based on improved variable time headway strategy and particle swarm optimization algorithm (ACC(IVTH+PSO)) with adaptive cruise control (ACC), adaptive cruise control based on variable time headway strategy (ACC(VTH)), adaptive cruise control based on particle swarm optimization algorithm (ACC(PSO)),adaptive cruise control based on variable time headway and particle swarm (ACC(VTH+PSO)). Fuel consumption uses the EMIT model [33], and comfort evaluation uses the average value of the acceleration rate [31].  To reflect the vehicle's tracking capability, the tracking error is defined as [15] follows.
where δ and γ are the weight coefficients of d and v ref , respectively, and Num is the number of simulation steps.

1) EMERGENCY ACCELERATION AND DECELERATION CONDITIONS
In order to fully verify the vehicle's driving stability under emergency acceleration and deceleration, it is assumed that the initial speed of the ACC vehicle and the target vehicle both are 30m/s, and the relative distance is 50m. In the first 3s, the preceding vehicle decelerates at an acceleration of −3m/s 2 , and then accelerates at an acceleration of 2m/s 2 in the next 2s. The simulation results are shown in the Figure 4. (Since the spacing strategy is to increase its influence, there is no upper limit to the deceleration of the preceding vehicle. and soδ = 0, γ = 1).
In the whole process, the minimum value (d act − d 0 ) of ACC (IVTH+PSO) is much larger than other algorithms, which avoids rear-end collision accidents in the case of emergency deceleration of the preceding vehicle, and greatly improves the driving safety under deceleration conditions, as shown in Figure 4. (a).
Compared with other algorithms, ACC (IVTH+PSO) has a downward trend in the speed of the vehicle at the beginning and starts to increase at the 5th s. While other algorithms are in the deceleration phase of the preceding vehicle, the speed of the ACC vehicle is first increases and then decreases, as shown in Figure 4. (b). Therefore, ACC (IVTH+PSO) can better track the speed of the preceding vehicle and improve the tracking capability of the ACC vehicle.
In Figure 4. (c), the change interval of the relative speed of ACC(IVTH+PSO) algorithm is smaller than other algorithms, which further proves that this algorithm improves a certain tracking capability.
In the case of deceleration of the preceding vehicle in the first 3s, as shown in Figure 4. (d), the ACC (IVTH+PSO) algorithm has been in the deceleration situation, while other algorithms are accelerating. The acceleration time of ACC(VTH) and ACC algorithm lasted about 3s, increasing the risk of rear-end collision with the preceding vehicle. After the third second, the preceding vehicle accelerates for 2s. The deceleration of the ACC (IVTH+PSO) algorithm slowly decreases to adapt to the sudden acceleration of the preceding vehicle while the deceleration of other algorithms continues to increase. In addition, the acceleration change interval of the ACC (IVTH+PSO) algorithm is smaller than other algorithms. That is, the ACC (IVTH+PSO) algorithm improves a certain fuel economy and the adaptability of the vehicle under deceleration conditions. The total simulation time of ACC and ACC (PSO) programs is 1.869s and 1.852s respectively, that is, the introduction of PSO will not affect the program running time. The maximum number of iterations M is calculated by taking the sampled value and using the particle swarm algorithm. After a large number of simulation calculations, it can converge to a stable value in steps 5 to 15.
Under the emergency acceleration and deceleration conditions of the preceding vehicle, although the ACC algorithm ensures fuel economy performance, its comfort and tracking capability are greatly reduced, which can easily lead to safety accidents. ACC(PSO) has improved tracking capability compared to ACC, but it has increased fuel consumption. ACC(VTH) and ACC(PSO+VTH) improve certain comfort and tracking capability, but improve fuel consumption. ACC (PSO+IVTH) has better tracking capability, greatly improving safety performance, and keeping comfort and fuel economy to a minimum, as shown in Figure 5. In summary, ACC (PSO+IVTH) improves the ability of vehicles to coordinate multiple targets in emergency situations.

2) DIFFERENT DECELERATIONS FOLLOW OPERATING CONDITIONS
In order to verify the safety of the algorithm in each deceleration situation. Assume that the relative distance between the ACC vehicle and the target vehicle is 50m, and the speed is 20m/s. The preceding vehicle decelerates to a stop at a deceleration of −1m/s 2 , −2m/s 2 , −3m/s 2 , −4m/s 2 , −5m/s 2 , −6m/s 2 . The relative distance simulation results are shown in Figure 6.
It can be seen from the Figure 6 that the relative distance is stable to zero, it can be known that the minimum value of all relative distances does not exceed the set minimum safety distance d 0 . Thus, the algorithm proposed in this article can adapt to the complex and variable deceleration environment, which improves the safety of ACC in the deceleration environment.

3) CYCLE CONDITIONS
In order to fully reflect the performance of the vehicle under normal operating conditions. This article defines the front   As shown in the Figure 8, ACC (IVTH+PSO) improves the ability to coordinate multiple goals. Compared with the other four algorithms, ACC (IVTH+PSO) has improved at least 3.2%, 0.12% and 1.02% in terms of comfort, fuel economy and tracking capability.

C. JOINT SIMULATION VERIFICATION
In order to make the algorithm closer to the actual situation, MATLAB/Simulink and CarSim for joint simulation was shown in Figure 9. Build vehicle models and environmental information at CarSim. Build the lower controller model, braking pressure controller model and throttle opening    controller model in Simulink. The lower controller adopts feedback PID control (Target speed setting cycle conditions).
The lowest value of the actual relative distance(d act ) is within 2.5 m, which ensures the safety of the vehicle during driving, as shown in Figure 10. The speed of the vehicle can effectively track the speed of the preceding vehicle, and the VOLUME 8, 2020 maximum relative speed of the two vehicles does not exceed 10km/h, ensuring good tracking capability of the vehicle, as shown in Figure 11.

VI. CONCLUSION
In order to improve the adaptability of the spacing strategy ACC. Firstly, the variable time headway strategy based on the relative speed and the preceding vehicle of acceleration, this article proposes a variable time headway strategy that changes with the deceleration time and deceleration of the preceding vehicle. Secondly, designed the objective function and constraints considering multiple variables. Based on MPC theory, the multi-objective ACC control problem is transformed into a multi-constrained quadratic programming problem. Finally, in the rolling optimization of MPC, an improved PSO algorithm is proposed to solve the quadratic programming problem with multiple constraints. The numerical simulation results show that when accelerating and decelerating the preceding vehicle in an emergency, ACC (IVTH+PSO) can respond quickly and keep up with the preceding vehicle more safely, and it can better coordinate multiple objectives. Under different deceleration conditions, it can maintain good vehicle following performance and maintain a safe distance from the vehicle in front. Under cycling conditions, the algorithm improves certain comfort, fuel economy and tracking capability under the premise of ensuring safe follow-up. Simulink building model combined with CarSim co-simulation, the results show that this algorithm can safely and effectively track the vehicle ahead. In summary, the algorithm proposed in this article improves the adaptability and coordination ability of ACC.