Short-term Traffic Flow Prediction Based on Deep Learning Model

In order to improve the prediction accuracy of the intelligent transportation system and provide effective support for the dynamic control and guidance of the highway management department, with the goal of minimizing the short-term traffic flow prediction error, the long-term short-term memory (LSTM) model is trained, fitted and adjusted based on the deep learning framework. In addition, the established model is used to predict the short-term traffic flow of the expressway during holidays and working days. At the same time, the traffic flow was simulated by microscopic simulation software to further verify the feasibility of the LSTM


INTRODUCTION
With the explosive growth of traffic data, traffic management systems have become more and more datadriven, and Intelligent Transportation Systems (ITS) have emerged. Short-term traffic flow forecasting is a key technology in the intelligent transportation system, which allows the traffic management department to grasp the real-time status of traffic information in real time and implement traffic diversion in advance. As a type of machine learning, deep learning has received more and more attention from researchers in recent years, and a large number of short-term traffic flow prediction models have been developed accordingly. In [1], Vlahogmnni pointed out that traffic flow forecasting methods are gradually changing from traditional model-driven methods to datadriven methods, and shallow models based on modeldriven methods will not be able to better adapt to complex traffic flow conditions. Based on the deep learning framework, in [2], Liu Mingyu applied the gated recurrent unit neural network algorithm to urban short-term traffic flow prediction. By comparing the prediction performance of the GRU model with the BPNN, ARIMA and SVR models, it finally confirmed that the RGU model has high accuracy in urban traffic flow. in [3], Luo Wenhui verified the effectiveness of combining the convolutional neural network model and the support kukvector machine model. However, how to choose a suitable algorithm model to improve the accuracy of short-term traffic flow prediction is still the focus and difficulty of current research. Based on the LSTM deep learning model, this paper carried out a research on the prediction of expressway short-term traffic flow, and carried out a simulation analysis of the traffic flow through microscopic simulation software to further verify the accuracy of the prediction model.

Analysis of Prediction Problems
The problem of short-term traffic flow prediction can be simply expressed as: Based on the traffic flow parameter value at a certain time t, predict the traffic flow parameter value at the next time t t  + , where t  is the prediction time interval, and it is generally considered that t  does not exceed 15 minutes [4]. On the premise of satisfying the prediction accuracy and stability, the higher the forecast advance, the more conducive to the optimization of traffic dispatch.

Data Sources
The traffic flow data comes from the California Expressway Capacity Measurement System (Performance Measurement System, PeMS). Seven adjacent detection points on the 15-S highway are randomly selected as the research objects of this experiment. The road section includes three detection lanes. The key information includes traffic flow, velocity occupancy rate, etc., which are aggregated at a time frequency of 5 minutes. The time period is from April 3 to May 11. In order to ensure stable model performance, use time-adjacent record entries to replace missing and incorrect data records. The data sample

Introduction to RNN and LSTM Network Models
Recurrent Neural Network [5] (RNN) has a loop that points to itself, which can pass the message of the current moment to the next moment, and then infer the contextual logical relationship between sequence data. However, the recurrent neural network will forget the earlier data information in the sequence, and there will be problems such as gradient expansion and long-term dependence during the model training process. LSTM [6] neural network is a special kind of RNN. By adding forget gates, input gates and output gates similar to the gated structure, the weight of the neural network's self-loop is changed. When the parameters of the neural network are fixed, the integration scales at different moments are dynamically changed, thereby controlling the memory and forgetting degree of the previous and current information, which makes up for the long-term dependence of the recurrent neural network. The internal architecture of LSTM is shown in Fig. 1.
represents neuron cell output where t C is hidden cell state.

Parameter Settings
Generally speaking, the more layers the neural network contains, the stronger the representation and learning capabilities of the model, and the greater the difficulty of training. The input and output dimensions of each layer of the built LSTM model are shown in Fig. 2. The LSTM neural network includes two LSTM layers and a fully connected layer, and the fully connected layer uses the dropout function to prevent overfitting. The first and second layers are LSTM layers, each containing 64 hidden units the third layer dropout layer, containing 64 hidden units the fourth layer is a fully connected layer, including 1 neural unit. The model building and training is completed under the tensorflow deep learning framework, and the neural network library used is Keras 2.0. In order to minimize the training error of the LSTM model and avoid the interference of local minimum points during the training process, this paper uses the Adam optimizer to optimize the LSTM algorithm through the stochastic gradient descent (SGD) [7] method with adaptive learning rate.

Evaluation Index
In order to quantitatively evaluate the effectiveness of the prediction model, the commonly used error indicators are the mean absolute percentage error (MAPE) [8]and root mean square error (RMSE). The calculation methods are shown in (7)(8).
Where t x is the actual traffic flow value at time t and t x  is the predicted traffic flow value at time t.

Experimental Results
We randomly select the prediction results for a certain period of time. As shown in Fig. 3, blue represents the real data used for testing, and orange represents the data predicted by the model. The results show that the curve fit between the predicted value and the true value of traffic flow in different periods is above 0.9. In order to further verify the prediction effect of the model on working days and holidays, select April 8, 2018 (holiday), April 14, 2018 (holiday), April 17, 2018 (working day), and April 20, 2018 (working day) traffic flow data is used to evaluate the accuracy of prediction results. As shown in Tab.2, the effect of using the LSTM neural network model to predict highway traffic flow data on weekdays and holidays is relatively accurate. The MAPE is below 16.5%, and the RMSE value is below 12.8%. The short-term traffic flow prediction value has certain reference value.

Micro Simulation Verification
The microscopic simulation software VISSIM 4.30 is used to simulate and verify the short-term traffic flow prediction results of the LSTM model. Select the traffic flow data for a specific day at a certain observation point, construct the road section and set the signal delay in the VISSIM simulation software, take the road section occupancy rate and the average speed of the road section traffic as the input value, and use the real-time traffic flow and capacity of the road section as the output value, the specific simulation effect is shown in Fig.4. The comparison between the predicted value of the LSTM model and the simulation result is shown in Fig.5. The blue curve represents the simulated real-time traffic, and the orange curve represents the short-term traffic flow predicted by the LSTM model. It can be seen that the two curves are relatively close throughout the day. LSTM prediction model has certain feasibility.

CONCLUSION
In order to accurately predict the short-term traffic flow and better serve the intelligent transportation system, this paper uses the LSTM deep learning model to predict the short-term traffic flow. At the same time, the traffic flow prediction results are simulated and verified through micro-simulation software. The main conclusions are as follows: A neural network model for short-term traffic flow prediction is proposed. Based on PeMS data, the LSTM deep learning model is parameterized and model optimized. The evaluation results show that the prediction model has high prediction accuracy on weekdays and holidays. The mean square error percentage of the test data is below 16.5%, and the root mean square error is below 12.8%. At the same time, a microscopic simulation experiment was carried out on the prediction accuracy of the model under a specific time and a specific road section. The results showed that the traffic flow prediction value of the model and the simulation output value have high similarities throughout the day. The short-term traffic flow prediction method based on LSTM model has certain feasibility.