Abstract

Car following is the most common phenomenon in single-lane traffic. The accuracy of acceleration prediction can be effectively improved by the driver’s memory in car-following behaviour. In addition, the Apollo autonomous driving platform launched by Baidu Inc. provides fast test vehicle following vehicle models. Therefore, this paper proposes a car-following model (CFDT) with driver time memory based on real-world traffic data. The CFDT model is firstly constructed by embedded gantry control unit storage capacity (GRU assisted) network. Secondly, the NGSIM dataset will be used to obtain the tracking data of small vehicles with similar driving behaviours from the common real road vehicle driving tracks for data preprocessing according to the response time of drivers. Then, the model is calibrated to obtain the driver’s driving memory and the optimal parameters of the model and structure. Finally, the Apollo simulation platform with high-speed automatic driving technology is used for 3D visualization interface verification. Comparative experiments on vehicle tracking characteristics show that the CFDT model is effective and robust, which improves the simulation accuracy. Meanwhile, the model is tested and validated using the Apollo simulation platform to ensure accuracy and utility of the model.

1. Introduction

Car-following (CF) behaviour is the most basic micro driving behaviour, referring to the interaction between two adjacent vehicles in a vehicle fleet driving on a single-lane road that does not allow passing [1]. The concept of CF originated in the early 1950s. Over the past six decades, CF models have been extensively and systematically studied, and fruitful achievements have been made [2]. Since the 1990s, research in related fields has gradually emerged in China. Researchers from various fields have attempted to interpret the observed microscopic phenomena from different perspectives [3].

There are currently many types of CF models that can be divided into two categories based on their origins: theory-driven and data-driven CF models [4].

In the development of the theory-driven models, the stimulus-response models are the most classic CF models, of which the General Motors (GM) model [5] is the most important. The GM model has been gradually developed and used since the late 1950s; it is the basis of many of the subsequent stimulus-response models. The GM model clearly reflects the characteristics of CF behaviour; it has a simple form and a clear physical meaning based on its originality. However, this model is prone to change with changes in traffic operational conditions and hence lacks universality.

With the increasing popularity of artificial intelligence, data-driven models have gradually become a focus of research of CF models. In 1988, Rumelhart proposed the back-propagation neural network (BPNN) [6], which is a multilayer feedforward neural network (FNN) that uses the error back-propagation algorithm to adjust weights. It is the most widely used NN model. Chen et al. proposed a deep learning method for learning potentially complex and irregular probability distributions, which can accurately estimate the values of CDF and PDF [7].

With the wide application of NNs in the field of traffic simulation, in 1998, Kehtarnavaz [8] applied the BPNN model to CF behaviour modelling for the first time, using the speed of the following car and the distance between the two cars as the model inputs and the relative speed of the two cars as the model output, thus verifying the validity of the model. Zhang et al. [9] established a closed-loop driving following model based on BP neural network and verified the adaptability of the model to different driving groups through experiments.

Support vector regression (SVR) [10] is a machine learning algorithm that converts the original problem into a convex quadratic programming problem and solves it using the optimality theory to obtain the global optimal solution. Wei and Liu [11] proposed a vehicle following model based on support vector regression and studied the asymmetric characteristics of vehicle following behaviour and its influence on the evolution of traffic flow. Parham et al. [12] propose car-following modelling using an efficient support vector regression method and prove that it has appropriate validity after inputting the driver’s instantaneous reaction time. However, studies based on such models are in their infancy.

CF behaviour is a continuous behaviour, so a driver can make a corresponding decision based on the memory of the previous time period [1315]. However, a large number of existing models do not fully consider the driver’s memory effect and only consider the instantaneous interaction between the following and leading cars. To process the CF time series data to use their historical information, the model must have a memory capability; this is lacking in both the BPNN- and SVR-based models.

Recurrent neural network (RNN) [16] is a class of neural network with memory capability. Yang [17] proposed a car-following model based on recurrent neural network (RNN) to effectively describe the state changes of vehicles while driving and road traffic congestion.

When an input sequence is long, the gradient explosion and vanishing problems, also known as the long-term dependency problem, will occur. To solve this problem, various modifications have been made on RNNs; the most effective method is to introduce various gating mechanisms such as the long short-term memory (LSTM) [18, 19] and the gated recurrent unit (GRU) [20] networks.

Based on the previously described studies, Wang et al. [21] proposed the use of GRU to model CF behaviour and embed the driver’s memory effect in the model, which used the speed of the following car, the relative speed of the two cars, and the distance between the two cars observed in the last several time intervals as inputs and the estimated speed of the following car at the next time point as the output. The test results showed that the proposed model has higher simulation accuracy than the existing CF models and provides a new concept for the study of traffic flow theory and simulation. However, the driver’s decision-making and reflection time are not considered in the judgment process.

However, influenced by multiple sources of information, a driver’s decision-making and judgment process exhibits a complex nonlinear modality during driving, and the driver’s psychological decision cannot be described with a simple mathematical expression. Fuzzy theories and artificial neural networks show certain operational advantages in handling complex nonlinear issues and also exhibit a good learning capacity under big data samples. Therefore, the fuzzy theory and artificial neural network are often used for simulating driving behaviours under different environments. However, the current schemes utilizing fuzzy theories and artificial neural networks only focus on the velocities and accelerations of the leading car and the following car, as well as the spacing there between, without considering driving environments [22]. In addition, how to obtain real-time traffic information (such as average speed, travel time, traffic flow, and traffic conditions) is also an important issue for unmanned driving. Many scholars have also done a lot of research on real-time traffic information. Chen proposed a cell probe (CP)-based method to analyse cellular network signals with an estimated accuracy of 97.63%, which is easier to obtain than traditional methods [23].

In April 2017, Baidu released its open platform Apollo for autonomous driving; after iterations of multiple versions, the platform has been enabled for localization, sensing, decision, and simulation. Apollo may help its partners in the automotive and autonomous driving industries to quickly develop a set of their own autonomous driving systems in consideration of vehicles and hardware systems. In the Apollo simulation environment, environment information including traffic signs, index lines, and the relationships with surrounding vehicles may be inputted into Dreamview via corresponding interfaces to thereby construct a driving environment. Besides, the Apollo platform is further enabled for validating the car-following model and optimizing the relevant algorithm through a 3D visual interface.

In this study, based on the previously described studies and combined with actual road conditions, we designed a CFDT model based on the data-driven model in combination with the improved RNN. In our model, the speed of the leading vehicle in the previous time interval, the speed of the following vehicle, and the distance between the two vehicles are used as inputs to predict the acceleration of the following vehicle at the next time point. Furthermore, the established model was calibrated using the CF data to determine the optimal parameters and optimal structure of the model, which were then verified through simulation. Finally, the proposed model was compared with the BPNN- and SVR-based models. It was confirmed that, compared with the traditional CF models, the RNN network-based CF model has high robustness and improved simulation accuracy, providing a methodological basis for studying the car-following behaviour.

The remainder of the paper is divided into four sections. Section 2 introduces conventional car-following models and the neural network based car-following model. Section 3 models CF behaviour mainly using the RNN network. Section 4 processes the data and briefly analyses the driver’s response time. Section 5 trains the proposed model to obtain the optimal parameters, compares it with the other two existing models, and verifies that the proposed model can achieve better simulation results. Section 6 conducts an empirical study of the three types of CF models based on the data and describes in detail the models’ verification experiments. Section 7 uses the Apollo simulation platform to verify the model and ensure the accuracy and practicability of the model. Section 8 introduces the summary and prospects.

2. Background

2.1. Traditional Car-Following Models

The stimulus-response framework is the most traditional modelling idea of the car-following behaviour, which embodies many essential characteristics of the car-following behaviour, while the GM model is the most important stimulus-response type of the traditional vehicle following model. The GM model assumes that a vehicle does not show passing or lane-changing behaviour when following. The driving dynamics theory is used to derive the basic equation:

In equation (1), is the instantaneous acceleration of a following car at time ; is the instantaneous speed of a following car at time ; is the relative speed of the two cars at time t; is the distance between the two cars at time t; T is the response time; is the sensitivity parameter to be calibrated; and and are additional parameters to be calibrated. Numerous studies have been focused on the parameter calibration and extension of the GM model.

The GM model clearly reflects the characteristics of CF behaviour; it has a simple form and a clear physical meaning based on its originality. However, this model is prone to change with changes in traffic operational conditions and hence lacks universality.

2.2. Basics of NN

NN is a highly nonlinear model with a neuron as its basic unit. When a neuron receives a set of input signals, it generates an output signal. A typical structure is shown in Figure 1.

where is the input, is the weight, and is a bias unit. The sum of the weighted inputs is described using the net input ; then, we have equation (2), as follows:where is the activation function. Then, the output can be expressed as follows in equation (3):

The commonly used activation functions, which are nonlinear, are as follows:Sigmoid function:Tanh function:ReLU function:Leaky ReLU function:

In practical application, the appropriate activation function can be selected according to the actual situation.

Historically, various NN structures have been proposed; those most commonly used include the feedforward NN, the feedback NN, and the graph network. In this study, the feedback NN was adopted. The neurons in a feedback NN can receive not only the signals of other neurons but also their own. Compared with those in a feedforward NN, the neurons in a feedback NN have a memory function and have different states at different times. The basic structure of a feedback NN is shown in Figure 2.

In a feedback NN, signals can propagate in one or both directions. This type of network includes RNN and the Boltzmann machine.

2.3. Gated RNN

To solve the long-term dependence problem of RNNs in the long sequence of training, a gating mechanism is introduced to selectively add new information while selectively forgetting the retained information. Such networks are collectively referred to as gated RNNs; the most popular include the LSTM and GRU networks.

2.3.1. LSTM Network

An LSTM network adds the new internal states and introduces three “gates”—the forgetting gate , input gate , and output gate . The value of a “gate” is within ; it is used to control the amount of information passed.

Specifically, the forgetting gate controls the amount of information to be forgotten by the internal state of the last time point ; the input gate controls the amount of information to be retained by the candidate state of the current time point; and the output gate controls the amount of information to be output to the external state by the internal state of the current time point.

Figure 3 shows the internal structure of the LSTM unit, where × represents the multiplication of vector elements and + represents the addition of vector elements; is the sigmoid activation function. Thus, the three gates of , , and can be calculated with equations (8)–(10), respectively. and stand for the weight matrix from the cell to gate, and denotes the vector of each gate.

The methods for status updating are described in equations (11)–(13) for , , and , respectively:

In equations (12) and (13), represents the multiplication of vector elements.

In an LSTM network, the internal state of the unit can retain certain key information for a significant amount of time.

2.3.2. GRU Network

The internal concept of a GRU network is similar to that of an LSTM network, and a GRU network can achieve a comparable effect. However, a GRU network has fewer parameters, lower training difficulty, and higher practicality.

Because the input and forgetting gates in the LSTM unit are complementary, in a GRU unit, they are combined into one gate, i.e., the update gate , while the output gate of the LSTM unit is deleted and a reset gate is added without introducing a new internal state. Its structure is shown in Figure 4.

Where the update gate controls the amount of information to be retained by the state of the current time point from the state of the last time point , as well as the amount of new information received from the candidate state , the reset gate controls the amount of information to be retained from the state of the last time point by the candidate state of the current time point . The methods for the calculation of the two gates are shown in equations (14) and (15). and stand for the weight matrix from the cell to gate, and denotes the vector of each gate.

The methods for updating the states are shown in equations (16) and (17):

In the case where , the GRU network degenerates into a simple RNN.

3. Approach to the Proposed Model

Herein, we adopted the RNN network to model CF behaviour. The proper choice of model inputs and outputs can improve the simulation accuracy of the model. Based on the GM model, we use the speed of the leading car at time t , the speed of the following car at time t , and the distance between the two cars as inputs and the acceleration of the following car at time as the output. Then, we have equation (18):where N is the length of the time interval of “memory.” Figure 5 is the specific structure diagram of the model proposed in this paper.

To eliminate the influence of dimension on the simulation accuracy and convergence rate of the model, the paper normalizes the vehicle following data (leading vehicle speed, following vehicle speed, and following vehicle acceleration). In different traffic environments, the behaviour of following a car is easily affected by the propagation of the slight disturbance of the speed of the leading car, the habit of acceleration and deceleration, the driver’s cognition of the environment, and the driver’s cognition of driving behaviour. The distribution of the car-following data cannot judge whether it is close to a Gaussian distribution. Therefore, the MinMaxScaler of the simplest method to eliminate the influence of dimensionality and data value range is selected in this paper to preserve the relationship existing in the original data. The formula for MinMaxScaler is as follows:where max and min are the maximum and minimum values of a given zoom range, respectively; i.e., the original data are scaled to the range of [max, min]. Specifically, the original data are scaled to the range of [0, 1]. Then, we have the following:

The CF data are constructed to the appropriate input and output shapes to comply with the input and output structures of the GRU model. Because the length of the “memory” interval (N) is closely related to the constructed data, it also directly affects the prediction accuracy of the model and so it was tested in detail in this study. Then, the dataset was randomly divided into training and test sets. Next, ReLU was selected as the activation function of the output layer to establish the GRU model. Because the number of hidden layers and the number of neurons in each hidden layer can have numerous combinations, it is necessary to separately test each of the models with different structures to obtain the optimal structure of the model.

The mean square error (MSE) (21) was used to construct the loss function and the Adam optimizer [2426], due to its excellent performance in most cases, was adopted.

In the input layer, the time step is set to N, and each step contains three input variables . Since it is necessary to predict the acceleration of the following vehicle with a continuous time of m, the input value is constructed into a matrix through the normalization of formula (19). Finally, the predicted acceleration of d for a continuous period of time of the following car was constructed into output through the GRU gate unit of multiple hidden layers. The pseudocode for the construction of the RNN-based CF model is shown in Algorithm 1.

GRU-based car-following model
Input:
Output:
(1) Data normalization using MinMaxScaler.
(2) The input is constructed as , The output is constructed as
(3) The constructed data is divided into training set and testing set.
(4) Modelling Sequential(), add GRU Layer and Dense Layer
(5) Compiler model, loss function = “MSE,” optimizer = “Adam”
(6)while model convergence do
(7)     Training model
(8) end while
(9) Test model

4. Data Preparation

4.1. Processing of the Following Vehicle Data

The Next Generation Simulation (NGSIM) program [27] was initiated by the U.S. Federal Highway Administration (FHWA). Through the established synchronous digital camera network, detailed vehicle trajectory data were acquired at a time interval of 0.1 seconds from the US-101 Freeway and the southbound direction of Lankershim Boulevard in Los Angeles, California; Interstate I-80 in Emeryville, California; and the eastbound direction of Peachtree Street in Atlanta, Georgia.

In this study, the detailed trajectory data of the eastbound vehicles on Interstate I-80 in Emeryville, California, were used. The data were acquired at 10 frames per second by seven cameras mounted on the 30-story Pacific Park Plaza Building located at Christie Avenue. The study road section is 503 m long and has six lanes. Lane 1 is a high occupancy vehicle (HOV) lane and Lane 6 is a collector-distributor lane, as shown in Figure 6.

The I-80 dataset includes vehicle trajectory data for three time periods. The road conditions are shown in Table 1.

In this study, we mainly analysed the CF behaviour of cars and their microscopic characteristics. The CF behaviour is closely related to the road conditions. To ensure the universality of the CF behaviour, we examined the vehicle trajectory data between 4:00 pm and 4:15 pm, which contain 1,028,575 trajectory records. Each record contains 18 fields, as fully described in Table 2.

4.1.1. Data Preprocessing

First, data of the following vehicles were found and filtered according to the following rules:(1)To avoid the potential difference in CF behaviour between different types of vehicles, we only focused on the CF behaviour of small cars (i.e., )(2)Cars from the HOV lane (i.e., ) and the collector-distributor lane (i.e., ) were excluded to ensure that the vehicles under study are associated with similar driving behaviour, i.e., to ensure the consistency of driving behaviour(3)The single-lane data of driving vehicles were adopted to avoid the influence of lane-changing behaviour on CF behaviour(4)Only the data for cars with a following time greater than 45 s (i.e., 450 records) were retained to ensure the integrity of the CF process and to ensure an adequate number of samples for model training

The pseudocode for the data processing is shown in Algorithm 2.

Processing of vehicle trajectory data.
Input: Vehicle Trajectory Data, the number of trajectory records n
Output: Car-following Data
(1)for to n
(2)  if then
(3)   
(4)   for to n
(5)    if and then
(6)     
(7)     
(8)   end if
(9)  end for
(10)  if then
(11)    The Data that holds the data is stored in CSV format
(12)  end if
(13)end for

Table 3 is a part of vehicle tracking data obtained through data preprocessing, whose lead vehicle ID is 66 and the following vehicle ID is 74.

4.1.2. Driver Reaction Time

The driver reaction time refers to the time between the driver perceiving a change in the surrounding environment and responding [28, 29]; it is also an important parameter in the CF model.

According to the restrictions of the CF, as the driving state of the leading car changes, the following car changes accordingly. However, changes in the driving states of the two are asynchronous. This is because the driver of the following car must have a reaction process to respond to a change by the leading vehicle. This reaction process includes four parts: perception, judgment, reaction initiation, and reaction execution; the required time is referred to as the reaction time. Assuming that the reaction time is T when the leading car makes a change at time t, the following car can only make the corresponding change at time .

The driver reaction time has been extensively investigated by many researchers. Kim et al. [30] analysed the braking reaction time of young and old drivers. Jin [31] studied the driver reaction time using least squares analysis via SPSS 13.0 and generated a reaction time distribution map (Figure 7). The calculation showed that the weighted average of driver reaction time is 1.077 s.

Lu et al. [32] obtained statistical information on driver reaction time through 63 samples, as shown in Table 4.

Based on the above discussion, we set the reaction time to 1 s in this study. Because the acquisition time interval of the adjacent two records of the CF data is 0.1 s, we excerpted one record for every 1 s (i.e., 10 records); the new dataset was saved for later use.

4.2. Evaluation Index

In this paper, MSE is used as the evaluation index of CFDT model. MSE is a risk function, related to the expected value of the squared error loss or quadratic loss. MSE is arguably the most important criterion used to evaluate the performance of a predictor or an estimator. It measures how close a fitted line is to data points. For every x data point, take the distance vertically from the point to the corresponding y value on the curve fit (the error), and square the value. The lower estimation value of MSE represents the lower error [33, 34]. The specific calculation formula of MSE has been shown in equation (21).

5. Training and Test

In this section, we used Keras, a Python-based deep learning library, to construct and train the CFDT model, and used TensorFlow as a back-end tool. The hardware environment of our experiment is as follows: processor Intel Xeon 2.10 GHz E5-2683 v4, memory 64 GB 2400 MHz, operating system Windows Server 2012 R2 standard, IDE: PyCharm.

According to this model training process, the optimal length of a “memory” time interval and the optimal structure of the model must be determined so the model has its best performance. The results of previous studies have shown that the optimal length of a “memory” time interval is not related to the structure of the model, and the NGSIM dataset does not need more than three hidden layers for model performance [21]. On this basis, we performed the following experiment.

First, we fixed the structure of the model. To reduce the training time, a simple structure with a single hidden layer and 20 neurons was adopted to separately perform the experiment with different N values. The results are shown in Figure 7.

Figure 8 shows that when the length of the “memory” time interval was 10, i.e., when the driver of the following car only considers the historical information within the time period of the last 10T, the model had the best performance.

On this basis, assuming N = 10, we separately trained and tested the models with the nine structures listed in Table 5.

The results showed that, for models with one hidden layer (Structures 1 through 3), the performance value of the model with Structure 3 is the minimum; for models with two hidden layers (Structures 4 through 6), the performance value of the model with Structure 5 is the minimum; and for models with three hidden layers (Structures 7 through 9), the performance value of the model with Structure 8 is the minimum. In terms of model performance, the performance values of the models are ranked in an ascending order: the model with Structure 3< the model with Structure 5< the model with Structure 8.

Next, the CF data, in which the vehicle ID of the leading car is 66 and that of the following car is 74, were trained using the model with Structure 3, the model with Structure 5, and the model with Structure 8. The simulation results were visualized and are shown in Figures 911.

In each of the figures, the first subplot shows the actual data, the second subplot shows the simulation data cluster belonging to 100 different training models, and the third subplot shows the simulation data cluster with error bars, i.e., mean ± std.

In summary, for the RNN-based CF model, the model with a “memory” time interval length of N = 10 and three hidden layers that contain 30, 10, and 10 neurons had the highest prediction accuracy and generated satisfactory simulation results for a road section that had continuous acceleration and deceleration behaviours.

6. Comparison with Other CF Models

To test the simulation accuracy of the RNN-based CF model, two other models, i.e., BPNN and SVR, were selected from the data-driven models to conduct a comparative experiment. Similarly, to ensure the fairness of the comparison, the speed of the leading car at time t , the speed of the following car at time t , and the distance between the two cars at time were used as the inputs to the model, and the acceleration of the following car at time was used as the output of the model. MSE continued to be adopted as the criterion for model evaluation.

6.1. BPNN-Based CF Model

First, a model as shown in Figure 12 was constructed based on the BPNN. The model can have various structures in terms of the number of hidden layers and the number of neurons in each layer. According to Kolmogorov’s theorem [35], a back-propagation neural network with three layers is sufficient to complete any mapping from n dimensions to m dimensions. Therefore, we choose the BPNN network with two hidden layers as the structure of the BPNN-based CF model. After multiple tests, the optimal structure, which included two hidden layers containing 20 and 10 neurons, was selected. The Tan h function was used as the activation function of the neurons.

The model was constructed and trained using Keras. Methods such as the holdout method were used to randomly create the training and test sets.

The CF data with the leading car ID of 2771 and the following car ID of 2812 were randomly selected; their simulation results are shown in Figure 13.

Figure 12 shows that because this dataset had a significant amount of “noise” (i.e., the following car was constantly in an accelerating or decelerating state), the resulting simulation results of the model have a low accuracy (i.e., there is a certain error when compared to the real data). Nevertheless, the results reflect the variation trend in the acceleration of the following car. Moreover, the model has a relatively simple structure and fast convergence rate. The above experiment demonstrates the validity of the BPNN-based CF model.

6.2. SVR-Based CF Model

we constructed an SVR-based CF model, as shown in Figure 14.

where the Gaussian kernel function was selected as the kernel function for the model.

To simplify the experimental process, we used the svm. SVR in the existing Scikit-learn framework for training and testing and assumed the parameter kernel of svm. SVR was “rbf.” As in the case of the BPNN-based model, the dataset was randomly split.

We again randomly selected a set of CF data that was associated with leading car 79 and following car 87. In addition, the following car exhibited frequent acceleration and deceleration behaviour. As shown in Figure 15, the simulation results indicate that the prediction error of the SVR-based model is small.

6.3. Comparison between Different CF Models

To compare the above three CF models, we tested each of the models on the same CF dataset (i.e., leading car 1503 and following car 1507). The simulation results are shown in Figure 16.

In this CF dataset, the acceleration and deceleration behaviour of the following car was infrequent, and the following car was driving at a constant speed nearly 40% of the time. As reflected in Figure 16, the polyline of the real data is relatively smooth. Therefore, all three models performed well in the simulation. However, in Figure 16, the GRU predicted acceleration is closer to the real acceleration than the BPNN model and the SVR model when the real acceleration of 0 to 5 seconds and 50 to 60 seconds has a significant continuous jump. Therefore, the GRU model proposed in this paper is superior to the SVR model and the BPNN model.

Figure 17 shows the MSE evaluation values of the above three models. The lower estimation value of MSE represents the lower error. Through the comparison of MSE evaluation index values in the above three model simulation experiments, it is found that the MSE value of BPNN model is the highest, while the model proposed in this paper is the lowest, which is only half of the MSE value of BPNN model. Therefore, the comparison of the MSE evaluation index values in the above three model simulation experiments shows that the proposed model is superior to the SVR model and the BPNN model.

To conclude, the above three models can not only reflect the variation trend in the acceleration of the following car but also accurately predict the values. However, for vehicles driving at variable speeds over a long period of time, the proposed model, which includes a memory unit, had better simulation results but, correspondingly, a slower convergence rate than the other two models.

7. Test Verification on Apollo Simulation Platform

The proposed method for predicting a car-following behaviour is combined with the Apollo platform as follows:

Differentiating scene information in an autonomous driving process of a vehicle into static information and dynamic information, and importing the static information and the dynamic information into Dreamview of the Apollo platform to construct a road scene, specifically including obtaining three-dimensional information of a traffic scene and motion information, wherein the three-dimensional information of the traffic scene refers to static information in the corresponding scene information and the motion information of the traffic scene refers to dynamic information in the scene information; preliminarily constructing a topological structure of the scene, wherein the topological information of the scene includes information such as the number of surrounding vehicles, the lanes occupied by surrounding vehicles, and the distance from a road edge; inputting such information into Dreamview via a corresponding interface of Apollo; configuring paths to specific modules based on the Table of Module Output Interface Standards (Table 6) provided by the simulation environment, and performing, by respective modules in the Standard, environment construction with reference to the traffic flow and simulated environment information resulting from understanding of the scene, as shown in Table 6.

During the construction process, the dynamic information and the static information during vehicle driving are obtained through understanding of the scene; the desired distance and reaction time are obtained by capturing the driver’s behaviour features, and the process of the car-following model is improved using RNN, computing the safety-and-comfort-based optimal solution of the following-car acceleration range. Meanwhile, the model is tested and validated using the Apollo simulation platform to ensure accuracy and utility of the model.

The method for predicting a car-following behaviour under the Apollo platform as disclosed is tested using the Apollo simulation platform. After the Apollo software environment is configured, the output interface of the Apollo platform is docked with the method. After successfully predicting information such as the following-car acceleration using the proposed method, the method is docked with the decision planning module Planning of Apollo; finally, the Apollo software implements testing and validation of the method; during multiple times of simulation process, the parameters are constantly adjusted, and the algorithm is optimized over the Apollo visual platform, specifically:

Deploying the environment (e.g., Docker environment), and pulling the container mirror of Apollo; entering the Apollo container, and compiling the simulation environment (e.g., Dreamview simulation environment); running the simulation environment after successful compilation; testing and validating the efficacy of the model using the corresponding simulation environment; the testing and validating interface refers to the simulation environment interface, wherein the interface is shown in Figure 18.

Docking the traffic flow and environment information outputted by Apollo with the input of the model; then, converting the predicted acceleration value obtained using the model into the Planning input simulation platform, wherein the specific docking path is shown in Table 7.

Docking the traffic flow and environment information outputted by Apollo with the input of the model; then, converting the predicted acceleration value obtained through the model into the Planning input simulation platform, wherein the specific docking path is shown in Figure 19.

Figure 20 is part of the following process diagram of the vehicle following behaviour visualization on the Apollo platform using the model proposed in this paper. In the figure, the cube with green border is the leading car and its current speed is shown directly above it. The blue car is the following car and its current speed is shown at the top right of the figure. In Figure 20(a), the speed of the leading car is 5 m/s (equivalent to 18 km/s), and the speed of the following car is 20 km/s. In Figure 20(b), the speed of the leading car is 5 m/s (equivalent to 18 km/s), and the speed of the following car is 21 km/s. In Figure 20(c), the speed of the leading car is 5 m/s (equivalent to 18 km/s), and the speed of the following car is 21 km/s. In Figure 20(d), the speed of the leading car is 5 m/s (equivalent to 18 km/s), and the speed of the following car is 23 km/s. In the comparison of Figures 20(a)20(d), it is found that the speed of the following car has been fluctuating from the speed of the leading car so that the speed of the following car is not longer than that of the leading car. Moreover, a relatively long distance is maintained between the following car and the leading car, which provides sufficient braking distance for the following car to ensure the driving safety of the following car. Through the visual simulation of the model proposed in this paper on the Apollo simulation platform, it was found that there would be no collision between the following car and the guiding car during the long time of following. Therefore, by using Apollo simulation platform to test the model visually, it is found that the model proposed in this paper is valid and practical.

8. Conclusions

In this study, we used high-precision vehicle trajectory data from Interstate I-80 in the NGSIM dataset to obtain the CF data through data preprocessing. Based on the characteristics of the CF behaviour, we verified the correctness of the data through experiments and chose the reaction time of T = 1 s to further filter the CF data. We modelled the CF behaviour based on the RNN network, using the speed of the leading car, the speed of the following car, and the distance between the two cars, all at time t, as inputs and the acceleration of the following car at time (t + T) as output. Finally, we performed in-depth examination and experiments on the length of the “memory” time interval and the network structure of the constructed model and obtained the parameters that enabled the model to have its best performance. Further, we compared the simulation results of the constructed model with those of the BPNN- and SVR-based models and demonstrated that the constructed model with a memory unit added had higher simulation accuracy. Both the BPNN- and SVR-based CF models were unstable; i.e., when the following vehicle had frequent acceleration and deceleration behaviour, their simulation results were poor. In comparison, the RNN-based CF model was able to make more accurate predictions because it considered the relevant information of the last several time intervals. At the same time, Apollo simulation platform was used to test and verify the model, ensuring the accuracy and practicability of the model.

The RNN-based CF model established in this study was only used to study the CF behaviour between small cars. In reality, the CF behaviours between different types of vehicles are different. In a follow-up study, we will construct models that consider various types of vehicle so that the existing model can be further improved according to the actual conditions such as asymmetric driving behaviour and multiple leading vehicles.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

The authors acknowledge the support from CERNET Innovation Project under Grant NGII20161201, Scientific and Technological Planning Project of Beilin District of Xi’an under Grant GX1819 supported by National Key Research and Development Program of China (2018YFB1201500), Natural Science Foundation of China (no. 61773313), and Teaching Research Foundation of Xi’an University of Technology (XJY1866).