Target Vehicle Selection Algorithm Based on Lane-changing Intention of Preceding Vehicle for ACC

 Abstract: In order to improve the ride comfort and safety of the traditional adaptive cruise control (ACC) system when the preceding vehicle changes lanes, this paper proposes a target vehicle selection algorithm based on the prediction of the lane-changing intention of the preceding vehicle. First, NGSIM dataset is used to train a lane-changing intention prediction algorithm based on sliding window SVM, and the lane-changing intent of the preceding vehicle in the current lane can be identified by lateral position offset. Secondly, according to the lane-changing intention and the collision threat of the preceding vehicle, the target vehicle selection algorithm is studied under three different conditions: safe lane-changing condition, dangerous lane-changing condition, and lane-changing cancellation condition. Finally, the effectiveness of the algorithm proposed in this paper is verified in the co-simulation platform. The simulation results show that the target vehicle selection algorithm proposed in this paper can ensure the smooth transfer of the target vehicle and effectively reduce the longitudinal acceleration fluctuation of the subject vehicle when the preceding vehicle changes lanes safely or cancels the lane change. In the case of a dangerous lane change, the target vehicle selection algorithm proposed in this paper can respond to the dangerous lane change in advance compared with the target vehicle selection method of the traditional ACC system, which can effectively avoid collisions and improve the safety of the subject vehicle. analysis, advanced driver assistance system, and human-machine interface.


Introduction
With the increasingly serious traffic congestion, adaptive cruise control (ACC), as the key technology of advanced driver assistance systems (ADAS), has been widely concerned, and gradually entered the lives of ordinary people. According to statistical reports, lane changes are the main cause in car crashes [1][2][3][4]. When the preceding vehicle changes lanes, traditional ACC system just declares the target vehicle (vehicle that the subject vehicle follows) as the closest one currently in the subject vehicle's lane, which cannot comprehensively consider the lane-changing vehicle. Under this condition, there will be large fluctuations in longitudinal acceleration which greatly reduces ride comfort, and may even cause collision risks [5][6]. In order to prevent this, a key enabling technology is a reliable lane-changing intention prediction technology, which can recognize that the preceding vehicle has the intention to change lanes before it crosses the lane line. This allows the subject vehicle to respond in advance to the preceding vehicle's lane-changing action, thereby reducing acceleration's fluctuation and avoiding collisions. The most relevant prediction methods of preceding vehicle's lane-changing intention in literature can be roughly divided into four categories, i.e., the fuzzy control-based method, the support vector machine (SVM)-based method, the hidden Markov model (HMM)-based method and the deep learning-based method. The fuzzy control-based method uses relative motion information between the subject vehicle and the preceding vehicle as the input variable. And through fuzzy logic, the lane-changing intention of the preceding vehicle can be ·3· obtained which can effectively realize human control strategy and experience. Seungwuk Moon et al. [7][8] introduce a lane-changing intention predictor based on fuzzy control, which uses the relative lateral distance and relative lateral speed between the preceding vehicle and the subject vehicle as the input, and uses the fuzzy rules to determine the lane-changing probability of the preceding vehicle. It is considered that the vehicles with smaller lateral relative distance and larger lateral relative speed have the higher probability to change lane. The fuzzy rules in the literature are mainly based on the fitting curve of relative speed and relative distance under the preceding vehicle's cut-in condition. However, the fuzzy controller largely depends on human experience, and cannot objectively identify lane-changing intention. The SVM-based method is to select the appropriate feature vector according to relative motion information, and obtain the best parameters of SVM through training, to predict the lane-changing intention of the preceding vehicle. Ma Guocheng et al. [9][10] uses data collected from actual traffic environment as training samples, to identify cut-in maneuver of adjacent lane vehicles based on fuzzy support vector machines (FSVM). In order to improve the training accuracy of cut-in identifier , a fuzzy membership coefficient is introduced for each sample in solving FSVM , and a grid optimization is conducted on the parameters of FSVM．Hanwool Woo et al. [11] define the feature vector as consisting of the distance from the centerline, the lateral velocity, and the potential feature. The potential feature is to characterize the possibility of lane-changing by analyzing the location relationship between the preceding vehicle and its surrounding vehicles. By adding potential feature, the proposed SVM algorithm can eliminate the false prediction caused by zigzag driving. The HMM-based method is mainly based on the observed state information of the preceding vehicle to identify the independent and invisible lane-changing intention. Ma Shijie established a mixed Gaussian-Hidden Markov model to describe the lane changing behavior of adjacent vehicles. The driver's decision states are segmented and described by the model parameters [12]. And the lateral distance between the preceding vehicle and the center of the host vehicle are used to characterize the changes of decision states. On the basis of the literature [12], Zhang Kexin divided the lane-changing process into the safe lane changing process and the dangerous lane changing process based on the collision risk [13]. According to the characteristics of lane keeping and lane change, and the characteristics of safe lane change and dangerous lane change, the HMM-based lane-changing identification method of sliding time window is designed respectively, and the driving state of each time window is judged in turn. Dejan Mitrovic proposed a simple and reliable method for identifying driving events using HMM [14]. By collecting real-vehicle experimental data and manually selecting observation sequences for training and verification, each observation sequence is classified into specific types of events, and the HMM model parameters of each driving event are trained respectively. The observation sequence from the training set is evaluated by multiple models. By comparing the probability of the observation sequence calculated by each HMM model, the event corresponding to the highest HMM model is selected as the estimation result. The deep learning-based method is to predict the preceding vehicle's lane-changing intention or driving trajectory through the neural network. This method requires a huge dataset for parameter training, to obtain better prediction results. Zhang Hailun et al. [15] uses the speech recognition framework as an example to map the behavior of the preceding vehicle (lane change, keep lane) to different speech words. Since the motion information of the preceding vehicle and the surrounding vehicles are both continuous and time-varying, and words of different sizes correspond to different driving styles during lane changes. The speech recognition model can be well applied to the recognition of the lane-changing behavior of the preceding vehicle. Seungje Yoon et al. [16] calculates the likelihood of multiple target lanes and trajectories of surrounding vehicles through a radial basis function network (RBFN). The RBFN prediction algorithm uses the classification distribution and the future trajectory to estimate the probability of each lane becoming the driver's target lane in parallel, and converts the RBFN into a probability model which considers uncertainty. Donghan Lee et al. [17] proposes a lane-changing intention recognizer based on Convolutional Neural Network (CNN). This method transforms real-world driving data to a simplified bird's-eye view, which enables a CNN-based inference approach with low computation cost and robustness to noisy input. Most of the current literature is to predict the lane-changing intention of the preceding vehicle in the adjacent lane (as shown in Figure 1), but the prediction result of the lane-changing intention of the preceding vehicle in the current lane (as shown in Figure 2) will also have an impact on the longitudinal acceleration of the subject vehicle. For example, when the preceding vehicle in the current lane changes lanes, if a low-speed commercial vehicle or a stationary object appears in front of the current lane, the subject vehicle will also face acceleration fluctuations or even the danger of collision. Therefore, this paper studies the lane-changing intention prediction algorithm for both the preceding vehicle in adjacent lane and the preceding vehicle in current lane. When most of the literature uses SVM to identify the intention of lane-changing of the preceding vehicle, they only select the certain feature vector and kernel function of SVM, and do not explain the reasons for the selection of those SVM parameters. This paper compares the prediction accuracy of different types of SVM, selects the radial basis function (RBF) as the kernel function and analyzes the influence of different sliding window sizes on the prediction accuracy. Moreover, most of the literature only studies the successful lane-change of the preceding vehicle, without considering the failure or cancellation of the preceding vehicle's lane change. This paper studies the selection of the target vehicle when the preceding vehicle fails to change lanes. The remaining of this paper is structured as follows: Section 2 illustrates the system architecture. Section 3 introduces the lane-changing intention prediction algorithm. Section 4 introduces the target vehicle selection algorithm. Section 5 studies the longitudinal motion control algorithm. Section 6 evaluates the proposed algorithm in simulation and Section 7 concludes the paper.

System Architecture
The overall framework proposed in this paper is shown in Figure 3. It is mainly divided into three parts: the lane-changing intention prediction, the target vehicle selection, and the longitudinal motion control. First, the lane-changing intention of the preceding vehicle is mainly predicted by the sliding window SVM algorithm. This paper uses the NGSIM dataset to train the parameters of the SVM, and determine the size of the sliding window.
The lane-changing intention of the preceding vehicle in current lane is predicted by lateral relative distance offset. The next step is to select the target vehicle . The target  vehicle selection is to determine the target vehicle under  three different conditions: safe lane-changing condition,  dangerous lane-changing condition, and lane-changing cancellation condition. Longitudinal motion control is to generate the actuator control quantity based on the status information of the target vehicle. The actuator control quantity is composed of two parts: the feedforward control quantity and the feedback control quantity.

Lane-changing intention prediction algorithm based on sliding window SVM
When the preceding vehicle changes lanes, the traditional ACC system cannot comprehensively consider the preceding vehicle in current lane and the lane-changing vehicle. There will be large fluctuations in longitudinal acceleration under this condition, which greatly reduces the ride comfort and may even cause collision danger. In order to avoid the violent fluctuation of the longitudinal acceleration caused by the jump of the target vehicle, the sliding window SVM algorithm is adapted to identify the lane-changing intention of the preceding vehicle.

NGSIM dataset preprocessing
This paper intends to use the public dataset recorded by the Next Generation Simulation (NGSIM) program initiated by the Federal Highway Administration in 2002 to train the sliding window SVM [18]. This project uses high-definition cameras installed above the road to record the vehicle driving data, and uses video processing software to obtain the vehicle trajectory data in a period of 0.1s. The lane-changing vehicle data on US 101 highway in the NGSIM dataset is used to train the lane-changing intention prediction SVM in this paper. The study aera schematic and camera coverage of NGSIM US 101 highway data is shown in Figure 4.

Figure 4
Study aera schematic and camera coverage of NGSIM US 101 highway data After simply filtering, 6100 individual vehicle driving data can be obtained. Since this paper studies the free lane-changing behavior of passenger cars, reasonable lane-changing vehicle data need to meet the following constraints: 1) Since this paper is to study the free lane changing of cars, it is necessary to restrict the types of vehicles to 2-cars. In order to reduce the influence of NGSIM dataset measurement error, Kalman filter is used to calculate the relative lateral velocity and relative lateral acceleration.
The estimated relative lateral velocity and relative lateral acceleration are shown in Figure 5 and Figure 6. The relative lateral velocity calculated by Kalman filter is basically the same as that obtained by local coordinate Y's difference in original NGSIM dataset, but the spike is effectively suppressed. Comparing the relative lateral acceleration calculated by Kalman filter with the acceleration data obtained by velocity difference, the relative lateral acceleration calculated by Kalman filter can well restrain the fluctuation caused by the difference.

SVM algorithm
SVM is a very widely used algorithm in machine learning. It is mainly to find a suitable hyperplane in a multi-dimensional space as a classification plane to maximize the minimum spacing of positive and negative samples in the sample space. The samples that reach the minimum spacing are called support vectors. For the linear inseparable case, the support vector machine can use the kernel function to transform the nonlinear classification situation into the linearly separable situation in the high-dimensional sample space [19][20][21]. The commonly used kernel functions are: polynomial kernel function, Gaussian kernel function, etc. Suppose the classification function is ， and , wb are the training parameters. In the prediction model of the lane-changing intention of the preceding vehicle, , ( ) 1 wb hx  means the preceding vehicle has the intention to change lanes, and , ( ) 0 wb hx  means that the preceding vehicle has no intention to change lanes and will continue to drive in the original lane. The optimization goal of the support vector machine is to maximize the geometric margins between positive and negative samples. The definition of geometric margin () i  is as follows, and γ are the smallest one: where m represents the number of samples in the training set.
The original optimization problem of support vector machine is as follows: Since there is a non-convex constraint 1 w  ‖ ‖ in the original optimization problem, the original problem is very difficult to solve. So, it needs to be transformed into a convex optimization problem: Through Lagrange duality, the above convex optimization problem can be transformed into a quadratic programming problem: represents the kernel function value of ( ) ( ) , ij xx , and  represents the Lagrange multiplier.

SVM feature vector selection
The feature vector selected in the literature [10] include: longitudinal relative distance between the subject vehicle and the preceding vehicle, lateral relative distance, longitudinal relative speed, lateral relative speed, longitudinal relative acceleration, lateral relative acceleration, and subject vehicle speed, which is shown in Figure 7. However, the training samples are limited and cannot cover the all feature vector that may appear during using SVM, for example: the current speed of the subject vehicle never appears in the training sample, or the current longitudinal relative distance, longitudinal relative speed, and longitudinal relative acceleration exceed the range of the feature vector in the training sample. In the above cases, the accuracy of lane-changing intention prediction obtained by SVM is very low. Literature [11] selects the lateral relative distance, lateral relative speed, and Potential Feature of the preceding vehicle relative to the centerline of the driving lane of the subject vehicle as feature vector. Potential feature, which analyzes the position relationship between the preceding vehicle and its surrounding traffic vehicles, represents the lane-changing risk degree of the preceding vehicle. This feature is added to improve the situation of false prediction when the preceding vehicle is zigzag driving in its original lane. However, millimeter-wave radar and cameras, as the main sensor systems of ADAS, cannot obtain comprehensive and accurate motion state information of traffic vehicles around the preceding vehicle. In addition, this paper holds that the preceding vehicle's zigzag driving in the original lane does not necessarily mean that it is in the process of lane-changing failure. It may also be due to the inexperienced driving of novice drivers, or the target vehicle is in the target lane adjustment stage after lane change. The potential feature cannot be used to solve all zigzag driving misjudgments. The feature vector selected in this paper include: the lateral relative distance d y and lateral relative speed v y of the preceding vehicle relative to the centerline of the driving lane of the subject vehicle. When only using the relative motion information at the current moment as the feature vector, a short-term misjudgment will often occur due to the jump of the motion state. However, the lane-changing intention prediction of the preceding vehicle at the current moment is often related to the relative motion information in the previous several cycles. Therefore, this paper takes the relative motion information of the preceding vehicle relative to the centerline of the driving lane of the subject vehicle in the previous k cycles as the feature vector. The feature vector t x at time t can be expressed as follows.
where y D is the feature of the lateral relative distance, and y V is the feature of the lateral relative speed. Selecting the relative motion information of the preceding vehicle relative to the centerline of the driving lane of the subject vehicle as the feature vector, instead of the relative motion information of the preceding vehicle relative to the subject vehicle, on the one hand, can avoid the influence of the lateral movement of the subject vehicle on the lane-changing intention prediction. On the other hand, it is very convenient to convert the relative lateral distance into d coordinate under Frenet coordinate when driving in curves.

t=T/2
Centerline Figure 8 Schematic diagram of feature vector selected in this paper

SVM parameter training
In order to solve the impact of different feature units, the z-score normalization is used to standardize the features. The mean value of each feature after processed is 0, and the standard deviation is 1. Before the SVM parameter training, NGSIM dataset samples are divided into training set and test set samples according to the ratio of 4:1. SVM with different parameters is trained by using training set samples, and the SVM prediction accuracy is tested by test set samples. At the same time, this paper uses cross validation method to divide the training set data into N copies (N=5 in this paper). In each training process, N-1 of them is selected for training, and the remaining one is used as the validation set. Through n-training, a group of parameters with the highest accuracy of the validation set is selected as the final training result. The flow chart of the SVM parameter training is shown in Figure 9.
Use NGSIM dataset to obtain training sample data

Figure 9
The flow chart of the SVM parameter training Linear function, quadratic function, cubic function, and radial basis function (RBF) are selected as the kernel function to train SVM. At the same time, in order to determine the size of the sliding window, this paper trains the SVM with four different kernel functions in the window size range of 0s~5s with an interval of 0.2s. The training result is shown in Figure 10. From Figure 10(d), when the sliding window size is 0.4s, the test set accuracy of the linear kernel function SVM reaches the maximum value of 0.676. Since quadratic kernel function, cubic kernel function and RBF kernel function can map sample features to higher space and achieve nonlinear classification, the validation set accuracy and test set accuracy of the above three kernel function SVM are improved in different degrees compared with linear kernel function SVM. The RBF kernel function SVM has the most obvious improvement effect. The test set accuracy of the RBF kernel function SVM can reach 0.935 when the sliding window is 2.2s. Therefore, this paper chooses the RBF kernel function SVM to predict the lane-changing intention of the preceding vehicle. Comparing the accuracy of test set and verification set, it can be found that the test set accuracy of the above three kernel function SVM is lower than the validation set accuracy to some extent. When the size of sliding window increases, the number of features increases, and overfitting occurred during SVM training. As the size of the sliding window increases, the validation set accuracy can be continuously improved. But when the sliding window size exceeds a certain range, the test set prediction accuracy decreases as the size of the time window increases (the RBF kernel function SVM is particularly obvious), that is, the size of sliding window is not the longer, the better. As shown in Figure 10(a), when the sliding window size is 2.2s, the test set accuracy of the RBF kernel function SVM reaches the highest. Therefore, this paper selects the RBF kernel function SVM with a sliding window size of 2.2s to predict the lane-changing intention of the preceding vehicle. After determining the SVM kernel function and sliding window size, this paper combines the test set samples and the training set samples to form a new training set sample, and trains to obtain the final lane-changing intention prediction SVM. The parameters of the final SVM for the lane-changing intention prediction of the preceding vehicle are shown in Table 1.

Prediction results of lane-changing intention of the preceding vehicle in adjacent lane
The prediction results of the lane-changing intention of the preceding vehicle in the adjacent lane is shown in Figure  11. It can be seen from Figure 11(a) that the preceding vehicle is zigzag driving in the original lane within 4.3s-7s after the start of the simulation. And the lane change starts at 10.5s, and ends at the 15s. The overall lane changing time is 4.5s. It can be seen from Figure 11(b) that the lane-changing intention prediction SVM based on sliding window designed in this paper (denoted as SVM_2.2s) predicts that the preceding vehicle has lane-changing intention at the 11.9s. From Figure 11 Figure 11(c) shows the prediction results of SVM that only uses the motion state information at the current moment as the feature vector (denoted as SVM_0s). There are short-term misjudgments in the 4.9s and 6s. Since SVM_0s only uses the motion state information at the current moment as the feature vector, it is easy to make misjudgments when the motion state jumps during the zigzag driving. The lane-changing intention prediction SVM designed in this paper uses the motion state information of the entire sliding window (the window size is 2.2s), so it can deal with the disturb of motion state changes caused by the zigzag driving.

Target vehicle selection based on the prediction of the lane-changing intention of the preceding vehicle
This paper does not consider the situation that both the preceding vehicle in the current lane and the preceding vehicle in the adjacent lane change lanes at the same time.
Only the situation that one of them changes lane is considered in this paper, and we take the lane change of the preceding vehicle in the adjacent lane as an example to illustrate the target vehicle selection process. In order to select the target vehicle, it is necessary to calculate the collision threat of each target. The collision threat is represented by 1 TTC  in this paper [22][23].
According to the longitudinal relative distance (1 ) min ,1 0.875 x main x inlane x x main x inlane x y Init y (1 )

Longitudinal motion control algorithm
According to whether there is a target vehicle ahead, the longitudinal motion control can be divided into speed control and following control. When there is no target vehicle in front of the subject vehicle, it is divided into speed control. In the speed control, only the subject vehicle speed subject v needs to be kept at the set speed set v .
Therefore, the control target in this mode is: 0 v  and the position error can be directly set to zero: When there is a target vehicle in front of the subject vehicle, it is divided into following control, that is, to control the speed of the subject vehicle to keep the same as that of the target vehicle, and meanwhile to keep a safe distance between the subject vehicle and the target vehicle. The constant time-gap safe distance is selected as the safe distance in this paper [24], which is calculated as follows: where h  is the time gap constant, generally set to 1.2-2s. 0 d is the distance constant, generally set to 2-3m. In this paper, h  is set to 2s, and 0 d is set to 3m.
In the following control, the subject vehicle speed needs to be kept the same as the target vehicle, and the distance x d between the subject vehicle and the target vehicle needs to be controlled as the safe distance des d , so the control target in this mode is: LQR controller is chosen to calculate the desired acceleration of the subject vehicle in this paper. The balance state in the longitudinal motion control is 0, 0 vd     , so it is very suitable to use the LQR controller to calculate the desire acceleration of the subject vehicle. At the same time, the LQR controller can consider the weight of the input variable and the state variable to obtain a good ride comfort during the longitudinal motion control. There is a time delay between the actual acceleration actual a and the input desired acceleration des a , which can be approximately represented by one-order inertia element:

Simulation and discussion
In this section, the co-simulation platform is built based on Matlab/Simulink, CarSim and Prescan software to verify the proposed algorithm. The scenario and sensor models are established in Prescan. The measurement data of the millimeter wave radar model in Prescan contains some noise, which can simulate the radar measurement data in the real world to a certain extent. The high-precision vehicle dynamics model is established in Carsim, and the simulation environment integration and control algorithm are established in Matlab/Simulink. Simulations are conducted under three different conditions: safe lane-changing condition, dangerous lane-changing condition, and lane-changing cancellation condition.

Simulation results under safe lane-changing condition
In order to verify the effectiveness of the target vehicle selection algorithm proposed in this paper under safe lane-changing condition, the following simulation conditions are designed in the co-simulation platform: At the initial time, the subject vehicle follows the preceding vehicle in the current lane at the set speed, which is 25m/s, and the longitudinal relative distance between the subject vehicle and the preceding vehicle in the current lane is 50m. In the left adjacent lane, there is a preceding vehicle. The driving speed of the preceding vehicle in the adjacent lane at the start of the simulation is 18m/s, and the longitudinal relative distance to the subject vehicle is 70m. The preceding vehicle starts to change lanes at 5s after the start of the simulation. The simulation results are shown in Figure 17 and Figure 18. From Figure 19(f) and Figure 20(e), the subject vehicle collides with the target vehicle in the adjacent lane at 7.56s when using the target vehicle selection method of the traditional ACC system. Because of the target vehicle selection method proposed in this paper, the subject vehicle can decelerate 0.75s in advance, and the minimum longitudinal relative distance between the subject vehicle and the target vehicle in the adjacent lane is 4.5m, effectively avoiding collision.

Simulation results under lane-changing cancellation condition
At the initial time, the subject vehicle follows the preceding vehicle in the current lane at the set speed, the driving speed is 25m/s, and the longitudinal relative distance between the subject vehicle and the preceding vehicle in the current lane is 50m. The driving speed of the preceding vehicle in the adjacent lane at the start of the simulation is 20m/s, and the longitudinal relative distance to the subject vehicle is 70m. The preceding vehicle starts to change lanes at 4.5s after the start of the simulation. The simulation results are shown in Figure 21 and Figure 22. It can be seen from the simulation results that the maximum longitudinal deceleration of the subject vehicle is 1.94m/s 2 during the entire control process by using the target vehicle selection algorithm proposed in this paper. When using the target vehicle selection method of the traditional ACC system, the maximum longitudinal deceleration of the subject vehicle is 3.70m/s 2 . The maximum longitudinal deceleration is reduced by 1.28m/s 2 . However, the maximum acceleration is almost the same. This is because at the current speed, the acceleration of the subject vehicle is limited, which means, within the range of 8.5-10s after the start of the simulation, the throttle opening of the subject vehicle has reached 100%. But from the desired acceleration curve, it can also be seen that through the smooth transition of the target vehicle, the maximum desired acceleration is reduced by about 1.14m/s 2 by using the target vehicle selection algorithm proposed in this paper (the maximum desired acceleration is 2.24m/s 2 ), compared with the target vehicle selection method of the traditional ACC system (the maximum desired acceleration is 3.38m/s 2 ).

Conclusions
In this paper, a target vehicle selection algorithm based on the prediction of the lane-changing intention of the preceding vehicle is proposed. And the lane-changing intention of the preceding vehicle is identified by the lane-changing intention prediction algorithm based on sliding window SVM, trained by the NGSIM dataset. The lane-changing intention prediction algorithm proposed in this paper is applicable to the preceding vehicle both in the current lane and in the adjacent lane. Through comparison with the target vehicle selection method of the traditional ACC system, the simulation results show that the target vehicle selection algorithm proposed in this paper can respond to the lane change of the preceding vehicle in advance, thus effectively reducing the longitudinal acceleration fluctuation and avoiding the collision under the dangerous lane-changing condition. As future work, the trajectory of the preceding vehicle will be predicted to further improve the driving safety of the subject vehicle. At the same time, the proposed algorithm will be verified on the real vehicle platform to verify the real-time of the algorithm and its robustness to interference in the real road environment.