# Short-Term Traffic Flow Prediction of Expressway: A Hybrid Method Based on Singular Spectrum Analysis Decomposition

Authors: Chunyan Shuai; Zhengyang Pan; Lun Gao; HongWu Zuo
Journal: Advances in Civil Engineering
 (2021)

---

## Abstract

Real-time expressway traffic flow prediction is always an important research field of intelligent transportation, which is conducive to inducing and managing traffic flow in case of congestion. According to the characteristics of the traffic flow, this paper proposes a hybrid model, SSA-LSTM-SVR, to improve forecasting accuracy of the short-term traffic flow. Singular Spectrum Analysis (SSA) decomposes the traffic flow into one principle component and three random components, and then in terms of different characteristics of these components, Long Short-Term Memory (LSTM) and Support Vector Regression (SVR) are applied to make prediction of different components, respectively. By fusing respective forecast results, SSA-LSTM-SVR obtains the final short-term predictive value. Experiments on the traffic flows of Guizhou expressway in January 2016 show that the proposed SSA-LSTM-SVR model has lower predictive errors and a higher accuracy and fitting goodness than other baselines. This illustrates that a hybrid model for traffic flow prediction based on components decomposition is more effective than a single model, since it can capture the main regularity and random variations of traffic flow.


---

## Body

## 1. Introduction

Expressway traffic flow prediction and management is always an important research field of intelligent transportation [1]. Mastering the change laws of traffic flow and accurately predicting the real-time traffic flow are conducive to studying the traffic capacity of expressway and managing and inducing traffic flow, so as to relieve traffic congestion, reduce fuel consumption, and save the total social cost of traffic travel [2]. Expressway traffic flow is affected by human travel behaviour, in sequence with strong regularity, suddenness, and randomicity. Currently, different prediction models, such as classical statistical models, machine learning models, and Artificial Neural Network (ANN), have predicted the short-term traffic flow with different accuracies by obtaining different characteristics and changing laws of traffic flow [1].The classical statistical models mainly include Automatic Regressive Integrated Moving Average (ARIMA), Seasonal ARIMA (SARIMA) [3], and ARIMA hybrid models. To solve the problem of SARIMA requiring a sound data for model building, Kumar and Vanajakshi [3] made the traffic flow a stationary one by differencing and then used the autocorrelation function, partial autocorrelation function, and maximum likelihood method to identify the suitable parameters of the SARIMA model and made traffic flow forecast with limited data. Considering their limitations of the ARIMA needing the stationarity and autocorrelation of the time series and the variability of traffic flow, the ARIMA family is usually combined with other nonlinear models to make prediction of flow. Ding et al. [4] incorporated the dynamic volatility into the subway short-term ridership forecasting process, and they construct four kinds of the integrated ARIMA and GARCH models to model the mean part and volatility part of the short-term ridership in subway. However, this method needs identifying the volatility characteristic and parameters of different subway stations one by one. Hou et al. [5] proposed an adaptive hybrid model, in which ARIMA captures the linear laws and the Wavelet Neural Network method obtains the nonlinear changes. Then, outputs of the two individual models are combined by fuzzy logic and their weighted result is regarded as the final predicted values of the traffic flow. This hybrid model performs well in the data processing stage, but vehicles which are hard to identify will be ignored. Support Vector Regression (SVR) has been employed in linear and nonlinear time series regression widely; however, reasonable hyperparameters in SVR are a difficult problem. To overcome this shortage, Cai et al. [6] employed gravitational search algorithm (GSA) to search optimal SVR parameters and achieved a more accurate short-term traffic flow forecasting. SVR is generally combined with other models to achieve a short-term traffic flow forecasting. According to the different categories of the passenger flows entered in the subway station, Li et al. [7] determined the optimal time granularity and interval by utilizing Pearson’s correlation coefficient and then used Empirical Mode Decomposition (EMD) and SVR (EMD-SVR) to predict the passenger flow for each station. This framework obtains a significant improvement in forecasting passenger flow. However, it is difficult for the GSA and EMD in [6, 7] to obtain a uniform hyperparameter of SVR due to volatility characteristics of traffic or passenger flow on different stations. Feng et al. [8] explored both the randomness and nonlinearity of the traffic flow and combine polynomial kernel and Gaussian kernel to constitute an adaptive multi-kernel SVM (AMSVM), in which an adaptive particle swarm optimization algorithm is employed, that optimizes the parameters of AMSVM. The spatial-temporal correlation information is incorporated with AMSVM to predict the short-term traffic flow. Multiple kernels and hybrid methods make AMSVM can better adapt to the dynamic characteristic of traffic flow on urban roads, thus providing a more accurate predicted result, but the predicted values have a certain delay compared to the real values. K-nearest neighbors (KNN-based) models, as another common choice, implement traffic flow forecast by matching similarities in the historical data. Habtemichael and Cetin [9] gave more weight to the near neighbors, used a rank exponent to aggregate the candidates found by the enhanced KNN algorithm, and implemented short-term traffic forecasting. To explore the the inherent spatial heterogeneity of city traffic and unclear spatiotemporal dependency relationships, Cheng et al. [10] proposed an adaptive spatiotemporal KNN model (adaptive STKNN) for short-term traffic forecasting. Adaptive STKNN determines the sizes of spatial neighbors and the lengths of time windows for traffic influence using cross-correlation and autocorrelation functions and then introduces adaptive spatiotemporal weights into the distance functions to optimize the candidate neighbor search mechanism. The results demonstrated that the adaptive STKNN model outperforms other models during all time periods and especially the peak period. However, once the query does not appear in the historical data, the KNN-based models will suffer a big forecasting error.Compared with the traditional intelligent models, ANN and Deep Neural Networks (DNN-based) models can provide a more accurate traffic prediction due to their complex structure and nonlinear functional approximation. In which Long Short-Term Memory network (LSTM), Gated Recurrent Unit (GRU) performs well as it can learn about the inherent regularity of time series data, and the linear and nonlinear correlations with short-long distances. Tian et al. [11] presented multiscale temporal smoothing model to infer the missing data and used a revised LSTM approach to learn the prediction residual and forecast traffic flow. To exploit the impact of temporal features on prediction, Mou et al. [12] proposed a T-LSTM model that inputs the addition of temporal information into T-LSTM to improve the accuracy of short-term traffic flow prediction effectively. Furthermore, space-time hybrid models expand traffic flow forecast for a single station to the whole road network by fully considering the influences of the surrounding stations. Wu et al. [13] proposed a DNN-based traffic flow prediction model, which makes full use of weekly/daily periodicity and automatically learns the importance of past traffic flow. Then, a convolutional neural network and GRU are used to mine the spatial and the temporal features of traffic flow. Bogaerts et al. [14] utilized Graph Convolution Network [14] and Graph Attention mechanism [15] to capture the spatial features of traffic, and LSTM is used to obtain both short-term and long-term laws of traffic flows. This combination improves the accuracy of the traffic flow. However, the DNN-based models perform well in traffic flow prediction; however, they are difficult to interpret and require a large amount of data and a great time and space to train [3].To distinguish the regularities of traffic flow, Empirical Mode Decomposition (EMD) and Singular Spectrum Analysis (SSA) are applied to reduce the noise of traffic flow sequence. Chen et al. [16] introduced Ensemble EMD (EEMD) and Wavelet to suppress the potential data outliers and then provided LSTM to fulfill the traffic flow prediction. Kolidakis et al. [17] combined SSA with ANN to analysis time series and forecast road traffic volume. However, these algorithms of component decomposition probably eliminate some random elements in the traffic flow, which leads to a distortion of the raw traffic flow.Considering the complexity characteristics of the traffic flow, this paper proposes a hybrid model (SSA-LSTM-SVR), which decomposes the flow into different components and, according to their respective features, employs different models to make forecasting. Firstly, SSA is used to decompose the traffic flow into one principle component and multiple random components. LSTM is used to make a short-term prediction of the principle component due to its regularity and periodicity. For the random components, the SVR model is introduced to predict them. The corresponding prediction results of all components are superimposed to form the final predictive value. At the same time, Particle Swarm Optimization (PSO) algorithm [18] is applied to optimize the decomposition parameters of the SSA-LSTM-SVR model.The rest of the paper is organized as follows. Section2 illustrates the methodology. Section 3 contains the experiment results. Section 4 makes deep discussion about the experiment results. Section 5 contains the conclusions and future work.


## 2. Materials and Methods

### 2.1. Singular Spectrum Analysis (SSA)

Singular Spectrum Analysis (SSA) [19] is usually applied to the component decomposition and noise reduction of time series signals. In order to find out the regularities and random factors of the expressway traffic flow, this paper introduces the SSA algorithm to decompose the trajectory matrix of short-term traffic flow into principle and random components. SSA mainly includes five steps: embedding, singular value decomposition (SVD), grouping, diagonal average, and component decomposition (subcomponent extraction).Step 1. Embedding. Given a traffic flow series of length T, Xt=x1,x2,x3,…,xT, and the embedding dimension L2<L<T/2, Xt is arranged with time delay to obtain an L×K track matrix:(1)X=x1x2x3…xKx2x3x4…xK+1⋮⋮⋮⋮xLxL+1xL+2…xT,whereK=T−L+1, and the embedded dimension L is also called window’s length of Xt, usually being an integer multiple of the period of Xt.Step 2. Singular Value Decomposition (SVD). SVD of XXT is performed to obtain L eigenvalues λ1≥λ2≥λ3≥⋯≥λL≥0 and corresponding orthogonal eigenvectors U1,U2,U3,…,UL. Let Vi=XTUi/λii=1,2,3,…,L and d=rankX=maxi:λi>0 and(2)X=X1+X2+X3+⋯+Xd,whereXi=λiUiViTi=1,2,3,…,d. λi is the singular value of X, Ui is the left eigenvector, Vi is the right eigenvector, and λi,Ui,Vi is a trip of Xi.Step 3. Grouping. Decomposing each Xii=1,2,3,…,d into p groups, then(3)Xi=Xi1+Xi2+Xi3+⋯+Xip.Given the contribution rate ofXi to X as λi/∑i=1dλi, the contribution rate of the top rXi to X will be(4)Cr=∑i=1rλi∑i=1dλi.Step 4. Diagonal Averaging (Reconstruction Component). Obtain the diagonal average values of Xi=zijL×K, and convert X into the time series Rit=r1,r2,r3,…,rT of length T. This process is called reconstruction component (RC) and the sum of RCs is equal to the original sequence; namely,(5)Xt=∑i=1dRit.Thekth member of Rit is the average value of all members of Xi=zijL×K with respect to i+j=k+1, and the the details are shown as follows: (6)rk=1k∑m=1kzm,k−m+1,1≤k≤L,1L∑m=1Lzm,k−m+1,L≤k≤K,1T−k+1∑m=k−K+1Lzm,k−m+1,K≤k≤T.Step 5. Component Decomposition. By obtaining the diagonal average values of Xi=zijL×K, we obtain the time series Rit, i=1,2,3,…,d. According to the subscript order 1,2,3,…,d, it is divided into Γ parts, and the sum of the kth part Rit,Ri+1t,…,Ri+n−1t constitutes a new time series with certain characteristics:(7)Xkt=∑j=i+0j=i+nRjt,wherei+n≤d and 1≤k≤Γ. Xkt is the feature series of the original time series Xt, and each one has its own special features and they vary from each other. The sum of Xkt is equal to the original series; namely,(8)Xt=∑k=1ΓXkt.In order to make the prediction result of short-term traffic flow as close as the ground truth, we firstly decompose the traffic flows into principle components and some random components by using SSA, where Particle Swarm Optimization (PSO) [19] is used to optimize the decomposition parameters of SSA. Then, according to their respective characteristics, the next section will discuss the corresponding prediction models suitable to respective characters.


### 2.2. Long Short-Term Memory Neural Network (LSTM)

Since the principle component of expressway traffic flow decomposed by SSA can well reflect the periodicity and regularity of traffic flow, LSTM is introduced to make prediction. LSTM is an improvement of Recurrent Neural network (RNN) [20], which effectively solves the problems of gradient disappearance and gradient explosion of RNN. As LSTM can capture long short-term dependencies of a time series, it has been widely applied in the short-term traffic flow prediction. The hidden layer of LSTM is composed of several memory blocks, and each memory block contains a cell and three gates, namely, the input gate, the forget gate, and the output gate. The memory unit of LSTM is shown in Figure 1.Figure 1
Memory cell of LSTM.As Figure1 shows, xt and ht represent the input and output at the interval t. ft, gt, and οt are the outputs of the forget gate, input gate, and output gate, respectively, and their mapping functions are as follows:(9)ft=σWfht−1,xt+bf,gt=σWght−1,xt+bg,Jt=ReLUWJht−1,xt+bJ,οt=σWοht−1,xt+bο,st=ft∗st−1+gt∗Jt,ht=οt∗ReLUst,where σx=1+e−x−1 and ReLUx=max0,x.


### 2.3. Support Vector Regression (SVR)

As the stochastic component of expressway traffic flow has complex features and strong nonlinearity, the Support Vector Regression (SVR) algorithm is introduced to make prediction of these components. As a widely used traffic flow prediction model, SVR maps data points to an optimal hyperplane in the high-dimensional state space as far as possible to realize regression and prediction. For a sample setxi,yi,i=1,2,3,…,T of size T, in which xi and yi are the input and output values of the ith sample, the regression function of SVR is(10)fx=w⋅xi+b,where w⋅xi represents inner product of vectors w and xi, and b is the offset. The loss function will be(11)Lεy,fx=0,y−fx≤ε,y−fx,y−fx>ε,where the error ε>0. w and b can be obtained by solving the minimized objective function(12)min12wTw+C1n∑i=1nLεyi,fxi,where C>0 is the penalty factor. Among different kernel functions, the radial basis kernel function (RBF) is widely used due to its excellent nonlinearity, and the RBF is defined as(13)KRBFxi,x=exp−x−xi22γ2,where γ>0. At the same time, Lagrange multipliers τi and τi∗ are introduced to the duality problem of equation (12). By solving the duality problem under the KKT restriction, τi, τi∗, and b are obtained, and the regression function of SVR is descripted as(14)fx=∑i=1nτi−τi∗KRBFxi,x+b.


### 2.4. SSA-LSTM-SVR Structure

As shown in Figure2, SSA decomposes the input traffic flow Xt into Γ subcomponents with parameters, μ1,μ2,…,μΓ, which are optimized by the PSO algorithm. According to formula (8), the sum of all components is equal to Xt and the sum of μi is equal to 1; namely,(15)∑i=1Γμi=1.Figure 2
SSA-LSTM-SVR.The first principle componentX1t reflects the traffic volumes at different moments, the long-term regularities, and periodicity of the traffic flow. As discussed in Section 2.2, LSTM can capture these main and long-term law of the flow by iterating the inputs, so LSTM is used to forecast X1t. On the other hand, the left components, X2t,…,XΓt, mainly contain the short-term changes and fluctuations of the traffic flow, and SVR is more sensitive to short-term changes; therefore, SVR is applied to predict the left random flows, respectively. Finally, the corresponding prediction results, Y1t,Y2t,…,YΓt, of different components are superimposed to form the predictive value Yt of the original time series Xt and expressed as(16)Yt=∑i=1ΓYit.


## 2.1. Singular Spectrum Analysis (SSA)

Singular Spectrum Analysis (SSA) [19] is usually applied to the component decomposition and noise reduction of time series signals. In order to find out the regularities and random factors of the expressway traffic flow, this paper introduces the SSA algorithm to decompose the trajectory matrix of short-term traffic flow into principle and random components. SSA mainly includes five steps: embedding, singular value decomposition (SVD), grouping, diagonal average, and component decomposition (subcomponent extraction).Step 1. Embedding. Given a traffic flow series of length T, Xt=x1,x2,x3,…,xT, and the embedding dimension L2<L<T/2, Xt is arranged with time delay to obtain an L×K track matrix:(1)X=x1x2x3…xKx2x3x4…xK+1⋮⋮⋮⋮xLxL+1xL+2…xT,whereK=T−L+1, and the embedded dimension L is also called window’s length of Xt, usually being an integer multiple of the period of Xt.Step 2. Singular Value Decomposition (SVD). SVD of XXT is performed to obtain L eigenvalues λ1≥λ2≥λ3≥⋯≥λL≥0 and corresponding orthogonal eigenvectors U1,U2,U3,…,UL. Let Vi=XTUi/λii=1,2,3,…,L and d=rankX=maxi:λi>0 and(2)X=X1+X2+X3+⋯+Xd,whereXi=λiUiViTi=1,2,3,…,d. λi is the singular value of X, Ui is the left eigenvector, Vi is the right eigenvector, and λi,Ui,Vi is a trip of Xi.Step 3. Grouping. Decomposing each Xii=1,2,3,…,d into p groups, then(3)Xi=Xi1+Xi2+Xi3+⋯+Xip.Given the contribution rate ofXi to X as λi/∑i=1dλi, the contribution rate of the top rXi to X will be(4)Cr=∑i=1rλi∑i=1dλi.Step 4. Diagonal Averaging (Reconstruction Component). Obtain the diagonal average values of Xi=zijL×K, and convert X into the time series Rit=r1,r2,r3,…,rT of length T. This process is called reconstruction component (RC) and the sum of RCs is equal to the original sequence; namely,(5)Xt=∑i=1dRit.Thekth member of Rit is the average value of all members of Xi=zijL×K with respect to i+j=k+1, and the the details are shown as follows: (6)rk=1k∑m=1kzm,k−m+1,1≤k≤L,1L∑m=1Lzm,k−m+1,L≤k≤K,1T−k+1∑m=k−K+1Lzm,k−m+1,K≤k≤T.Step 5. Component Decomposition. By obtaining the diagonal average values of Xi=zijL×K, we obtain the time series Rit, i=1,2,3,…,d. According to the subscript order 1,2,3,…,d, it is divided into Γ parts, and the sum of the kth part Rit,Ri+1t,…,Ri+n−1t constitutes a new time series with certain characteristics:(7)Xkt=∑j=i+0j=i+nRjt,wherei+n≤d and 1≤k≤Γ. Xkt is the feature series of the original time series Xt, and each one has its own special features and they vary from each other. The sum of Xkt is equal to the original series; namely,(8)Xt=∑k=1ΓXkt.In order to make the prediction result of short-term traffic flow as close as the ground truth, we firstly decompose the traffic flows into principle components and some random components by using SSA, where Particle Swarm Optimization (PSO) [19] is used to optimize the decomposition parameters of SSA. Then, according to their respective characteristics, the next section will discuss the corresponding prediction models suitable to respective characters.


## 2.2. Long Short-Term Memory Neural Network (LSTM)

Since the principle component of expressway traffic flow decomposed by SSA can well reflect the periodicity and regularity of traffic flow, LSTM is introduced to make prediction. LSTM is an improvement of Recurrent Neural network (RNN) [20], which effectively solves the problems of gradient disappearance and gradient explosion of RNN. As LSTM can capture long short-term dependencies of a time series, it has been widely applied in the short-term traffic flow prediction. The hidden layer of LSTM is composed of several memory blocks, and each memory block contains a cell and three gates, namely, the input gate, the forget gate, and the output gate. The memory unit of LSTM is shown in Figure 1.Figure 1
Memory cell of LSTM.As Figure1 shows, xt and ht represent the input and output at the interval t. ft, gt, and οt are the outputs of the forget gate, input gate, and output gate, respectively, and their mapping functions are as follows:(9)ft=σWfht−1,xt+bf,gt=σWght−1,xt+bg,Jt=ReLUWJht−1,xt+bJ,οt=σWοht−1,xt+bο,st=ft∗st−1+gt∗Jt,ht=οt∗ReLUst,where σx=1+e−x−1 and ReLUx=max0,x.


## 2.3. Support Vector Regression (SVR)

As the stochastic component of expressway traffic flow has complex features and strong nonlinearity, the Support Vector Regression (SVR) algorithm is introduced to make prediction of these components. As a widely used traffic flow prediction model, SVR maps data points to an optimal hyperplane in the high-dimensional state space as far as possible to realize regression and prediction. For a sample setxi,yi,i=1,2,3,…,T of size T, in which xi and yi are the input and output values of the ith sample, the regression function of SVR is(10)fx=w⋅xi+b,where w⋅xi represents inner product of vectors w and xi, and b is the offset. The loss function will be(11)Lεy,fx=0,y−fx≤ε,y−fx,y−fx>ε,where the error ε>0. w and b can be obtained by solving the minimized objective function(12)min12wTw+C1n∑i=1nLεyi,fxi,where C>0 is the penalty factor. Among different kernel functions, the radial basis kernel function (RBF) is widely used due to its excellent nonlinearity, and the RBF is defined as(13)KRBFxi,x=exp−x−xi22γ2,where γ>0. At the same time, Lagrange multipliers τi and τi∗ are introduced to the duality problem of equation (12). By solving the duality problem under the KKT restriction, τi, τi∗, and b are obtained, and the regression function of SVR is descripted as(14)fx=∑i=1nτi−τi∗KRBFxi,x+b.


## 2.4. SSA-LSTM-SVR Structure

As shown in Figure2, SSA decomposes the input traffic flow Xt into Γ subcomponents with parameters, μ1,μ2,…,μΓ, which are optimized by the PSO algorithm. According to formula (8), the sum of all components is equal to Xt and the sum of μi is equal to 1; namely,(15)∑i=1Γμi=1.Figure 2
SSA-LSTM-SVR.The first principle componentX1t reflects the traffic volumes at different moments, the long-term regularities, and periodicity of the traffic flow. As discussed in Section 2.2, LSTM can capture these main and long-term law of the flow by iterating the inputs, so LSTM is used to forecast X1t. On the other hand, the left components, X2t,…,XΓt, mainly contain the short-term changes and fluctuations of the traffic flow, and SVR is more sensitive to short-term changes; therefore, SVR is applied to predict the left random flows, respectively. Finally, the corresponding prediction results, Y1t,Y2t,…,YΓt, of different components are superimposed to form the predictive value Yt of the original time series Xt and expressed as(16)Yt=∑i=1ΓYit.


## 3. Case Study

### 3.1. Dataset Description and Performance Indicators

The traffic flows of 347 toll stations of Guizhou province in China in January 2016 are obtained. Figure3 shows the positions of 347 toll stations. The maximum daily average traffic volume reaches 14120, the minimum value is 5, and the traffic volumes varies greatly from site to site. According to the daily average traffic volumes, the toll stations are divided into three types, namely, less than 2000, 2000 to 6000, and above 6000. The traffic flows with different volumes from 46 stations (about 13.5% of toll stations) in one month are selected as experimental data to evaluate the performance of our algorithm. The intervals are set to 5, 10, 15, 30, 45, and 60 minutes (min).Figure 3
Positions of 347 highway toll stations of Guizhou province in China.Usually, mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE), accuracy, and goodness of fit (R2) are used to evaluate the performances of predictive models, and they are defined as follows:(17)MAE=1n∑i=1ny^i−yi,RMSE=1n∑i=1ny^i−yi2,MAPE=1n∑i=1ny^i−yiyi,accuracy=1−∑i=1ny^i−yi2∑i=1nyi2,and(18)R2=1−∑i=1ny^i−yi2∑i=1nyi−yi¯2,where y^i and yi are predictive value and ground truth, and yi¯ is the mean of yi. Low prediction errors (MAE, RMSE, and MAPE) and a high accuracy and R2 imply a good prediction performance.


### 3.2. Characteristics of Traffic Flows and SSA Decomposition

Setting one day as the statistical period and 15 minutes (min) as the time interval, as an example, the traffic flows in the same historical periods in January 2016 of Guiyang North Toll Station are shown in Figure4. It can be seen the traffic flows vary from day to day, with relatively fixed change trends and laws and strong randomness.Figure 4
Characteristics of traffic flows during 15 minutes at Guiyang North Station.Set the population as 20, the maximum number of iterations as 100, the initial and termination weight factor as 0.9 and 0.2, both learning factors (ζ1 and ζ2) as 2, minimum and maximum moving speed as −1 and 1, and the objective function as the goodness of fitting (R2). PSO and SSA are applied on the traffic flows in 15 min of Guiyang North Toll Station from January 25 to 31, 2016. Then, the number of the components and their weights are obtained, and they are μ1=0.3, μ2=0.3, μ3=0.3, and μ4=0.1. Figure 5 demonstrates the original traffic flow and the decomposed 4 components. The principle component (the first one in Figure 5(b)) is basically consistent with the magnitude and change trends of the original traffic flow, and the traffic curve with obvious change rules is relatively smooth. The left three random components (Figures 5(c)–5(e)) have small magnitudes, large random disturbances, and no obvious change rules. These characters will greatly increase the difficulty of prediction; however, their influences on the original traffic flow cannot be ignored and discarded as noise in traffic flow prediction.Figure 5
Traffic flow decomposed by SSA. (a) Original traffic flow of a week, (b) the first component—principle component, (c) the second component—random component 1, (d) the third component—random component 2, and (e) the fourth component—random component 3.
(a)(b)(c)(d)(e)


### 3.3. Predictive Performance

With these decomposition parameters, the traffic flow of toll stations of Guiyang North Station in 5 min, 10 min, 15 min, 30 min, 45 min, and 60 min intervals are selected to verify the prediction performance of the SSA-LSTM-SVR model. Five prediction models, ARIMA, SVR, BP, KNN, and LSTM, are introduced for comparative analysis. These 5 comparative models have different implementation mechanisms, and they obtain the characteristics and variation laws of time series data and implement the traffic flow forecasting in different means. In which, ARIMA, BP, and LSTM directly obtain the temporal dependencies of the time serial, ARIMA is more sensitive to the short-term linear changes, and BP and LSTM can both capture the linear and nonlinear variations of the time series with long short-term dependencies, which are more robust and stable than the ARIMA. On the other hand, SVR and KNN adopt the hyperplane and similar pattern matching to achieve the traffic flow prediction.As shown in Table1, the MAE, RMSE, and MAPE of SSA-LSTM-SVR model are all minimum, and the fitting degree R2 and prediction accuracy are higher than those of others. They all indicate that the SSA-LSTM-SVR model can better recognize the time series short-term change rules of the traffic flow and has a better prediction performance.Table 1
Performance comparison of prediction models (Guiyang North Station).
Time interval (min)ModelsMAEMAPERMSEAccuracyR25ARIMA6.46770.23949.03270.85740.9399SVR6.63240.17789.2730.85690.9369BP7.66230.367110.11350.8440.9250KNN8.89140.283612.22650.81160.8905LSTM6.82880.22619.3640.85470.9348SSA-LSTM-SVR4.73610.12846.8210.91060.942110ARIMA11.12000.1999915.63000.87630.9541SVR10.76350.176515.3880.88120.9559BP11.21430.216115.69440.87880.9541KNN14.64990.226120.44010.84220.9222LSTM11.29550.186615.94690.87680.9525SSA-LSTM-SVR8.83460.120613.24180.93850.962315ARIMA15.49650.197321.67910.88530.9603SVR15.93330.158822.160.88570.9587BP21.46990.324427.80680.85660.9351KNN21.40680.217930.22270.84410.9238LSTM16.18340.191322.20710.88550.9588SSA-LSTM-SVR10.19420.137616.90090.93200.975830ARIMA30.60370.211842.11650.88850.9622SVR31.10610.140243.54840.88770.9599BP48.40230.510359.79060.84570.9246KNN39.34150.254354.75510.85770.9367LSTM38.12730.371949.21250.87240.9489SSA-LSTM-SVR25.28860.127333.9850.93240.950245ARIMA47.37470.191166.91070.88180.9573SVR47.87730.149668.86850.88120.9552BP73.5540.411894.39180.8370.9159KNN57.82640.201678.21230.86340.9421LSTM69.9180.282497.73820.82970.9093SSA-LSTM-SVR42.43570.086456.91490.93090.952860ARIMA74.28520.2414104.8100.86120.9410SVR77.62230.1775113.90670.85250.9309BP125.18460.5853157.72380.79520.8675KNN85.39780.2353114.61190.84990.9305LSTM117.97210.3366169.380.7780.847SSA-LSTM-SVR68.22090.124693.50780.91070.9493


### 3.4. Predictive Performance on More Stations

To verify the generalization of the SSA-LSTM-SSR, with the same parameters, we carry out more experiments on other 45 toll stations with different traffic volumes in whole month. Due to space limitation, only the prediction results in the 15 min, 30 min, and 60 min interval are shown in Table2. The MAE, MAPE, and RMSE of the SSA-LSTM-SVR model are still the minimum, and the fitting degree R2 and prediction accuracy are also higher than those of ARIMA, SVR, KNN, BP, and LSTM. This indicates that the SSA-LSTM-SVR model has a good generalization and better prediction performance than others. MAPE of the SSA-LSTM-SSR model is reduced by at least 5.00% and 6.33% on average, and the prediction accuracy is improved by at least 5.0% and 6% on average.Table 2
The performance of different methods on Guiyang City Road Toll Stations.
Time interval being 15 min/30 min/60 minTraffic volume (TV)ModelsMAEMAPERMSEAccuracyR215 stations (TV ≥ 6000)ARIMA12.33/25.51/61.830.29/0.31/0.4317.37/35.46/86.770.84/0.84/0.810.92/0.92/0.89SVR12.68/25.74/61.530.19/0.20/0.2317.96/36.89/93.120.84/0.84/0.800.92/0.91/0.87KNN15.83/30.30/56.460.27/0.25/0.2422.65/43.35/78.750.80/0.81/0.810.87/0.87/0.90BP16.15/37.43/92.900.57/0.67/0.8820.86/47.83/118.680.82/0.80/0.750.90/0.87/0.82LSTM13.71/27.16/84.170.39/0.40/0.5018.54/37.87/119.200.84/0.83/0.750.92/0.91/0.82SSA-LSTM-SVR9.47/18.64/45.510.15/0.14/0.1815.92/29.05/56.830.89/0.89/0.860.94/0.94/0.9115 stations (2000 ≤ TV < 6000)ARIMA6.86/12.33/24.490.84/0.38/0.419.58/17.13/33.550.80/0.82/0.820.89/0.90/0.90SVR7.02/12.44/24.500.23/0.23/0.259.83/17.6334.790.80/0.82/0.820.88/0.90/0.89KNN8.41/14.44/26.950.35/0.31/0.3612.01/20.56/38.920.75/0.79/0.800.82/0.86/0.88BP8.12/17.05/35.580.64/0.74/0.8210.49/21.06/43.300.78/0.78/0.770.86/0.86/0.84LSTM6.95/13.31/30.570.38/0.44/0.569.58/17.59/41.230.80/0.82/0.790.88/0.90/0.87SSA-LSTM-SVR5.22/10.01/20.510.19/0.18/0.207.27/15.36/28.070.85/0.88/0.880.90/0.93/0.9315 stations (TV < 2000)ARIMA4.51/8.03/16.570.43/0.50/0.626.33/11.41/23.450.74/0.76/0.750.82/0.85/0.83SVR4.55/8.08/16.680.26/0.26/0.316.46/11.73/24.660.74/0.76/0.750.82/0.84/0.82KNN5.79/10.18/18.450.44/0.41/0.698.38/15.14/27.760.66/0.69/0.710.69/0.73/0.76BP5.15/9.83/21.650.64/0.81/1.096.85/12.86/27.490.72/0.74/0.720.79/0.81/0.78LSTM4.56/8.81/19.000.44/0.62/0.906.49/12.15/26.330.74/0.75/0.720.81/0.83/0.79SSA-LSTM-SVR3.57/7.58/12.210.21/0.18/0.195.49/10.54/18.460.80/0.83/0.840.85/0.88/0.86Let time interval be 15 min. SVR, LSTM, and SSA-LSTM-SVR are selected to further observe the differences between the predictive values and the ground truth on three stations with different traffic volumes. As Figure6 shows, it can be seen that the predicted values of SSA-LSTM-SVR fit the ground truth well both in off-peak and peak hours, and it can capture the subtle changes of time series including the downward and upward tendencies. Overall prediction errors of SVR and LSTM are relatively large, especially in case of sudden changes of the traffic flow. As the traffic flow declines and ascends, LSTM and SVR cannot well capture the change tendencies in time.Figure 6
The prediction results of SVR, LSTM, and SSA-LSTM-SVR.
(a)(b)(c)


## 3.1. Dataset Description and Performance Indicators

The traffic flows of 347 toll stations of Guizhou province in China in January 2016 are obtained. Figure3 shows the positions of 347 toll stations. The maximum daily average traffic volume reaches 14120, the minimum value is 5, and the traffic volumes varies greatly from site to site. According to the daily average traffic volumes, the toll stations are divided into three types, namely, less than 2000, 2000 to 6000, and above 6000. The traffic flows with different volumes from 46 stations (about 13.5% of toll stations) in one month are selected as experimental data to evaluate the performance of our algorithm. The intervals are set to 5, 10, 15, 30, 45, and 60 minutes (min).Figure 3
Positions of 347 highway toll stations of Guizhou province in China.Usually, mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE), accuracy, and goodness of fit (R2) are used to evaluate the performances of predictive models, and they are defined as follows:(17)MAE=1n∑i=1ny^i−yi,RMSE=1n∑i=1ny^i−yi2,MAPE=1n∑i=1ny^i−yiyi,accuracy=1−∑i=1ny^i−yi2∑i=1nyi2,and(18)R2=1−∑i=1ny^i−yi2∑i=1nyi−yi¯2,where y^i and yi are predictive value and ground truth, and yi¯ is the mean of yi. Low prediction errors (MAE, RMSE, and MAPE) and a high accuracy and R2 imply a good prediction performance.


## 3.2. Characteristics of Traffic Flows and SSA Decomposition

Setting one day as the statistical period and 15 minutes (min) as the time interval, as an example, the traffic flows in the same historical periods in January 2016 of Guiyang North Toll Station are shown in Figure4. It can be seen the traffic flows vary from day to day, with relatively fixed change trends and laws and strong randomness.Figure 4
Characteristics of traffic flows during 15 minutes at Guiyang North Station.Set the population as 20, the maximum number of iterations as 100, the initial and termination weight factor as 0.9 and 0.2, both learning factors (ζ1 and ζ2) as 2, minimum and maximum moving speed as −1 and 1, and the objective function as the goodness of fitting (R2). PSO and SSA are applied on the traffic flows in 15 min of Guiyang North Toll Station from January 25 to 31, 2016. Then, the number of the components and their weights are obtained, and they are μ1=0.3, μ2=0.3, μ3=0.3, and μ4=0.1. Figure 5 demonstrates the original traffic flow and the decomposed 4 components. The principle component (the first one in Figure 5(b)) is basically consistent with the magnitude and change trends of the original traffic flow, and the traffic curve with obvious change rules is relatively smooth. The left three random components (Figures 5(c)–5(e)) have small magnitudes, large random disturbances, and no obvious change rules. These characters will greatly increase the difficulty of prediction; however, their influences on the original traffic flow cannot be ignored and discarded as noise in traffic flow prediction.Figure 5
Traffic flow decomposed by SSA. (a) Original traffic flow of a week, (b) the first component—principle component, (c) the second component—random component 1, (d) the third component—random component 2, and (e) the fourth component—random component 3.
(a)(b)(c)(d)(e)


## 3.3. Predictive Performance

With these decomposition parameters, the traffic flow of toll stations of Guiyang North Station in 5 min, 10 min, 15 min, 30 min, 45 min, and 60 min intervals are selected to verify the prediction performance of the SSA-LSTM-SVR model. Five prediction models, ARIMA, SVR, BP, KNN, and LSTM, are introduced for comparative analysis. These 5 comparative models have different implementation mechanisms, and they obtain the characteristics and variation laws of time series data and implement the traffic flow forecasting in different means. In which, ARIMA, BP, and LSTM directly obtain the temporal dependencies of the time serial, ARIMA is more sensitive to the short-term linear changes, and BP and LSTM can both capture the linear and nonlinear variations of the time series with long short-term dependencies, which are more robust and stable than the ARIMA. On the other hand, SVR and KNN adopt the hyperplane and similar pattern matching to achieve the traffic flow prediction.As shown in Table1, the MAE, RMSE, and MAPE of SSA-LSTM-SVR model are all minimum, and the fitting degree R2 and prediction accuracy are higher than those of others. They all indicate that the SSA-LSTM-SVR model can better recognize the time series short-term change rules of the traffic flow and has a better prediction performance.Table 1
Performance comparison of prediction models (Guiyang North Station).
Time interval (min)ModelsMAEMAPERMSEAccuracyR25ARIMA6.46770.23949.03270.85740.9399SVR6.63240.17789.2730.85690.9369BP7.66230.367110.11350.8440.9250KNN8.89140.283612.22650.81160.8905LSTM6.82880.22619.3640.85470.9348SSA-LSTM-SVR4.73610.12846.8210.91060.942110ARIMA11.12000.1999915.63000.87630.9541SVR10.76350.176515.3880.88120.9559BP11.21430.216115.69440.87880.9541KNN14.64990.226120.44010.84220.9222LSTM11.29550.186615.94690.87680.9525SSA-LSTM-SVR8.83460.120613.24180.93850.962315ARIMA15.49650.197321.67910.88530.9603SVR15.93330.158822.160.88570.9587BP21.46990.324427.80680.85660.9351KNN21.40680.217930.22270.84410.9238LSTM16.18340.191322.20710.88550.9588SSA-LSTM-SVR10.19420.137616.90090.93200.975830ARIMA30.60370.211842.11650.88850.9622SVR31.10610.140243.54840.88770.9599BP48.40230.510359.79060.84570.9246KNN39.34150.254354.75510.85770.9367LSTM38.12730.371949.21250.87240.9489SSA-LSTM-SVR25.28860.127333.9850.93240.950245ARIMA47.37470.191166.91070.88180.9573SVR47.87730.149668.86850.88120.9552BP73.5540.411894.39180.8370.9159KNN57.82640.201678.21230.86340.9421LSTM69.9180.282497.73820.82970.9093SSA-LSTM-SVR42.43570.086456.91490.93090.952860ARIMA74.28520.2414104.8100.86120.9410SVR77.62230.1775113.90670.85250.9309BP125.18460.5853157.72380.79520.8675KNN85.39780.2353114.61190.84990.9305LSTM117.97210.3366169.380.7780.847SSA-LSTM-SVR68.22090.124693.50780.91070.9493


## 3.4. Predictive Performance on More Stations

To verify the generalization of the SSA-LSTM-SSR, with the same parameters, we carry out more experiments on other 45 toll stations with different traffic volumes in whole month. Due to space limitation, only the prediction results in the 15 min, 30 min, and 60 min interval are shown in Table2. The MAE, MAPE, and RMSE of the SSA-LSTM-SVR model are still the minimum, and the fitting degree R2 and prediction accuracy are also higher than those of ARIMA, SVR, KNN, BP, and LSTM. This indicates that the SSA-LSTM-SVR model has a good generalization and better prediction performance than others. MAPE of the SSA-LSTM-SSR model is reduced by at least 5.00% and 6.33% on average, and the prediction accuracy is improved by at least 5.0% and 6% on average.Table 2
The performance of different methods on Guiyang City Road Toll Stations.
Time interval being 15 min/30 min/60 minTraffic volume (TV)ModelsMAEMAPERMSEAccuracyR215 stations (TV ≥ 6000)ARIMA12.33/25.51/61.830.29/0.31/0.4317.37/35.46/86.770.84/0.84/0.810.92/0.92/0.89SVR12.68/25.74/61.530.19/0.20/0.2317.96/36.89/93.120.84/0.84/0.800.92/0.91/0.87KNN15.83/30.30/56.460.27/0.25/0.2422.65/43.35/78.750.80/0.81/0.810.87/0.87/0.90BP16.15/37.43/92.900.57/0.67/0.8820.86/47.83/118.680.82/0.80/0.750.90/0.87/0.82LSTM13.71/27.16/84.170.39/0.40/0.5018.54/37.87/119.200.84/0.83/0.750.92/0.91/0.82SSA-LSTM-SVR9.47/18.64/45.510.15/0.14/0.1815.92/29.05/56.830.89/0.89/0.860.94/0.94/0.9115 stations (2000 ≤ TV < 6000)ARIMA6.86/12.33/24.490.84/0.38/0.419.58/17.13/33.550.80/0.82/0.820.89/0.90/0.90SVR7.02/12.44/24.500.23/0.23/0.259.83/17.6334.790.80/0.82/0.820.88/0.90/0.89KNN8.41/14.44/26.950.35/0.31/0.3612.01/20.56/38.920.75/0.79/0.800.82/0.86/0.88BP8.12/17.05/35.580.64/0.74/0.8210.49/21.06/43.300.78/0.78/0.770.86/0.86/0.84LSTM6.95/13.31/30.570.38/0.44/0.569.58/17.59/41.230.80/0.82/0.790.88/0.90/0.87SSA-LSTM-SVR5.22/10.01/20.510.19/0.18/0.207.27/15.36/28.070.85/0.88/0.880.90/0.93/0.9315 stations (TV < 2000)ARIMA4.51/8.03/16.570.43/0.50/0.626.33/11.41/23.450.74/0.76/0.750.82/0.85/0.83SVR4.55/8.08/16.680.26/0.26/0.316.46/11.73/24.660.74/0.76/0.750.82/0.84/0.82KNN5.79/10.18/18.450.44/0.41/0.698.38/15.14/27.760.66/0.69/0.710.69/0.73/0.76BP5.15/9.83/21.650.64/0.81/1.096.85/12.86/27.490.72/0.74/0.720.79/0.81/0.78LSTM4.56/8.81/19.000.44/0.62/0.906.49/12.15/26.330.74/0.75/0.720.81/0.83/0.79SSA-LSTM-SVR3.57/7.58/12.210.21/0.18/0.195.49/10.54/18.460.80/0.83/0.840.85/0.88/0.86Let time interval be 15 min. SVR, LSTM, and SSA-LSTM-SVR are selected to further observe the differences between the predictive values and the ground truth on three stations with different traffic volumes. As Figure6 shows, it can be seen that the predicted values of SSA-LSTM-SVR fit the ground truth well both in off-peak and peak hours, and it can capture the subtle changes of time series including the downward and upward tendencies. Overall prediction errors of SVR and LSTM are relatively large, especially in case of sudden changes of the traffic flow. As the traffic flow declines and ascends, LSTM and SVR cannot well capture the change tendencies in time.Figure 6
The prediction results of SVR, LSTM, and SSA-LSTM-SVR.
(a)(b)(c)


## 4. Discussion

Any prediction model has its applicable scope, advantages, and disadvantages. For example, ARIMA is suitable for stable time series, while it is difficult to obtain the nonlinear relationship in the series. When the query mode does not appear in the history database, KNN will produce a large prediction error, and when the input time step of LSTM exceeds 32, the prediction performance will decline. Therefore, reasonable model selection is the basis for accurate prediction. For the expressway traffic flow with periodic, sudden, and random changes, it is difficult for a single model to obtain all characteristics and accordingly make accurate short-time prediction.In our SSA-LSTM-SVR model, SVD firstly decomposes the track matrix constructed by the traffic flow serials, which is equivalent to finding and extracting the intrinsic autocorrelation relationships of the traffic flow sequence. And then according to these correlations, SSA finds out the inherent change regularities and random features in the sequence through grouping, reconstruction, and component decomposition. These operations decompose the traffic flow serials into different components and are conducive to highlighting their respective regularities and characteristics and weakening the mutual influence caused by component hybridity. In order to fully take advantage of the acquired features of different components, SSA-LSTM-SVR puts forward the idea of separately forecasting. LSTM is more suitable for the principle component with great regularity and smoothness, while SVR is more suitable for the left components with great random and sudden changes. Finally, in terms of respective predictive results, the SSA-LSTM-SVR model achieves a more accurate prediction performance, which actually reflects the short-term changes of the expressway traffic flow. In SSA-LSTM-SVR, SSA implements components decomposition according to the linear autocorrelation of the traffic flow serial, and the LSTM and SVR capture nonlinear relationships of different components. Therefore, compared with the ARIMA, KNN, BP, SVR, and LSTM models, the proposed SSA-LSTM-SVR model can catch more features and accordingly achieves a better prediction performance. In the SSA-LSTM-SVR, the differences between the predicted value and the real value of are the least, and the fitting effects are the best.The above experiments and discussion illustrate that it is difficult for a single model to fully capture the characteristics of the complicated traffic flow sequence of the expressway, while a mixed model will be a more reasonable choice.


## 5. Conclusion and Future Work

The real-time prediction of expressway traffic flow is always an important topic in traffic management. Due to the inherent complexity of expressway traffic flow, the prediction accuracy of a single model is limited; thus, the idea of combined prediction model is proposed in this paper. First, in terms of the characteristics of the traffic flow, it is decomposed into 1 principle component and 3 random components by SSA. As the magnitude and change regularities of the principle component are basically consistent with the original traffic flow, with smoother changes, LSTM is applied to capture these features and make short-term forecast. Since the left three random components have small magnitude, large random disturbance, and no obvious change rule, SVR is introduced to forecast, respectively. The estimates of each component are then added together to obtain the final forecast values. Experiments on the actual traffic flows of Guizhou expressway show that compared with the ARIMA, LSTM, KNN, BP, and SVR models, the SSA-LSTM-SVR model has a better prediction performance, whose differences between the predicted value and the real value are the least, and the fitting goodness is the best. Meanwhile, MAPE of SSA-LSTM-SSR is reduced by at least 5.0% and 6.33% on average, and the prediction accuracy is improved by at least 5.0% and 6% on average.From the findings, we would like to suggest that if the time series has complex characteristics, such as regularity, suddenness, and randomness, it may be an optimal choice to use the mixed model for short-term prediction. This paper only considers the traffic flows of single toll station. In the future research, the interaction affection of traffic flows between toll stations in the expressway network will be further discussed, so as to achieve a more accurate short-term traffic flow prediction.



---

*Source: 4313970-2021-10-08.xml*