# Prediction of Road Network Traffic State Using the NARX Neural Network

Authors: Ziwen Song; Feng Sun; Rongji Zhang; Yingcui Du; Chenchen Li
Journal: Journal of Advanced Transportation
 (2021)

---

## Abstract

To provide reliable traffic information and more convenient visual feedback to traffic managers and travelers, we proposed a prediction model that combines a neural network and a Macroscopic Fundamental Diagram (MFD) for predicting the traffic state of regional road networks over long periods. The method is broadly divided into the following steps. To obtain the current traffic state of the road network, the traffic state efficiency index formula proposed in this paper is used to derive it, and the MFD of the current state is drawn by using the classification of the design speed and free flow speed of the classified road. Then, based on the collected data from the monitoring stations and the weighting formula of the grade roads, the problem of insufficient measured data is solved. Meanwhile, the prediction performance of NARX, LSTM, and GRU is experimentally compared with traffic prediction, and it is found that NARX NN can predict long-term flow and the prediction performance is slightly better than both LSTM and GRU models. Afterward, the predicted data from the four stations were integrated based on the classified road weighting formula. Finally, according to the traffic state classification interval, the traffic state of the road network for the next day is obtained from the current MFD, the predicted traffic flow, and the corresponding speed. The results indicate that the combination of the NARX NN with the MFD is an effective attempt to predict and describe the long-term traffic state at the macroscopic level.


---

## Body

## 1. Introduction

Transportation is a key link to social development. According to the latest statistics from the Traffic Management Bureau of the Ministry of Public Security, the number of motor vehicles in China reached 384 million until June 2021, and this figure is still growing. It is difficult to meet the increasing demand for comfort in traveling, and the negative effects of congestion on various routes within the road network in urban areas are even more serious. In this context, accurate and reliable traffic information is very important for intelligent transportation systems (ITS), advanced traffic management systems (ATMS), and advanced traveler information systems (ATIS) [1]. In detail, it is important to use traffic information wisely and accurately determine the future traffic situation of the regional road network to support traffic managers and travelers in their management or travel decisions. The key to the problem is how to accurately predict traffic trips and induce travelers to choose travel routes, thus spreading the pressure of traffic trips within the road network.To tackle the traffic problems mentioned above, some scholars have proposed forecasting traffic events [2, 3] and traffic demand [4–6] in the study of traffic state prediction. Others have proposed short-term prediction of various traffic state parameters and have designed various prediction models [7, 8]. As a key component in achieving the purpose of traffic congestion mitigation, short-term prediction of traffic state is a combination of traffic information and mathematical algorithms. The future short-term traffic state parameters are predicted by building the corresponding prediction models. Usually, the time interval of short-term prediction does not exceed 15 min [9, 10]. However, due to the randomness and complexity of the traffic state, the traffic flow shows strong nonlinearity as the time interval is shortened [11]. It will add difficulty to the short-term traffic state prediction. Meanwhile, although the parameter prediction of short-term traffic flow can enable traffic managers to discover abnormal traffic operation states in time and take corresponding control measures, it is difficult to satisfy the demand for long-term traffic trips, and the information obtained by users is limited by the form of information output. In contrast, long-term traffic state prediction can provide the most direct traffic operation information for travelers and has greater application value.In the studies on the state of regional road networks, many studies only focused on the prediction target on a single section of varying length within the road network. It failed to consider the complex road conditions at the regional level and cannot demonstrate generalisability. And there are fewer studies on the traffic state prediction of road networks, which need to be improved and supplemented. Therefore, the challenges of current research in both traffic state prediction and highway network state studies are as follows:(i)
With limited data collection devices and the impact on the COVID-19 pandemic, how can traffic parameters and corresponding states of the entire road network be obtained?Despite the more advanced and diverse means of data collection on the road network at the present stage, some cities are relatively underdeveloped and lack sufficient data collection equipment and services (as in the area selected for this paper) to represent the effects of the data. The key in this situation is the effective mining and processing of the available collection data.(ii)
Expanding from both temporal and spatial dimensions, how can the traffic state of a road network be represented and predicted by using cross-sectional flows when faced with a larger road network?From a spatial perspective, basic traffic flow parameters are required as quantitative criteria to characterize traffic, whether it is a section, road, or network. However, the distinction is that the analytical methods utilized, the forms of representation, and their meanings are similar but different at the microscopic scale and the macroscopic scale. From a temporal perspective, it is unclear what time scales are defined for long-term traffic prediction and short-term traffic prediction, and what duration of time can achieve optimum performance.To address the above challenges, we have proposed a long-term prediction model that combines nonlinear autoregressive with exogenous inputs (NARX) neural network and Macroscopic Fundamental Diagram (MFD) for the state of the road network. First, the traffic state needs to be classified by the proposed formula of traffic state efficiency index and the design speed of the classified highway, and the MFD of the current state is drawn. To achieve the best prediction performance, the performance parameters were adjusted, such as the number of nodes and delay parameters of the NARX neural network (NARX NN). Finally, with the traffic state efficiency index and the predicted traffic output, the predicted MFD is drawn to express the traffic operation state. In this model, the capabilities of MFD to characterize traffic state relationships at the macroscopic scale and the capabilities of the NARX NN to handle traffic flows with time-series characteristics are utilized, respectively. To the best knowledge of the authors, this paper is one of the first attempts to combine a neural network forecasting model with the MFD and employ it for long-term traffic flow prediction on a regional road network.The main contributions of the paper are summarised as follows: (1) The NARX-MFD method for predicting long-term traffic state parameters is proposed and the NARX NN is verified to be capable of long-term traffic prediction. (2) The formula of the traffic state efficiency index is proposed. With the analysis of the traffic flow parameter curves, the traffic state of the regional road network is classified into four categories by using the smooth speeds in the curves and the design speeds of the classified highway. This will be used as an evaluation classification for the predicted state. (3) With the predicted traffic flow parameters and traffic state efficiency indicators, the predicted traffic state curve is produced and provides the traveler with more intuitive feedback on the future state of the road network.Our work is presented as follows. The second section introduces the related works of prediction methods of traffic state parameters and macroscopic evaluation of traffic state and analyzes the reasons for choosing NARX NN and MFD. The third section addresses the theoretical system of traffic state evaluation. It introduces the formulas of traffic state efficiency index and the evaluation grading of regional road networks derived from it. The fourth section mainly focuses on data description and experimental design and describes several time-series prediction models involved in the experiments. Section5 then presents the results of the comparison experiments of the prediction models and the outputs of the predicted traffic states and analyzes the reasons for them. Finally, in Section 6, we conclude our paper and outlook future research.


## 2. Related Work

In this chapter, the related work is reviewed and summarised in terms of two aspects: prediction methods of traffic state parameters and macroscopic evaluation of traffic state.


### 2.1. Traffic State Parameters Prediction

In the context of the ITS, numerous prediction methods for traffic state parameters have emerged. In the past research, prediction models for various types of traffic state parameters have been proposed in the relevant literature. According to the type of parameter, these include traffic flow, speed, density, occupancy, and the resulting travel time and travel time index. Based on the traffic flow parameter relationships proposed by Greenshields, when conducting the selection of indicators, some have argued that the selection of volumes is important because of the stability of volumes [12].Some have argued that speed prediction is more critical [1, 13], while others have argued that prediction accuracy can be improved by the combined effect of multiple traffic metrics, such as simultaneous characterization of volume and density [14]. In recent years, with the continuous improvement of algorithms and the development of data collection equipment, travel time and travel time index have received increasing attention as predictors. Li et al. [15] proposed a model based on an ensemble empirical mode decomposition and random vector functional link network to predict the travel time of a highway network. Xu et al. [16] chose the travel time index when dealing with the prediction of regional road networks. In contrast, due to the limitations of the collection equipment, other indices are difficult to obtain. So for the current work, we use traffic data for consideration. However, when these data are available, a multi-index prediction approach is taken.A comparative study by Smith et al. [17] found that studies of flow prediction models can be divided into parametric and nonparametric methods, with parametric methods being more time consuming and nonparametric methods being more effective when dealing with the random data.Research on parametric methods is much earlier and more established. Jensen [18] used linear regression methods for traffic forecasting in 1972, and Hogberg [19] used nonlinear regression methods to estimate the parameters in traffic forecasting models in 1973. Lee et al. [20] used the ARIMA model for short-term freeway traffic volume forecasting and proved to be able to accurately predict traffic variations with time-series characteristics. The method contains fewer parameters but has better forecasting results. ARIMA is widely applied as a parametric model for time-series forecasting, which is obtained by introducing hidden variables through moving average (MA). Tatsuya [21] eliminated the seasonal factor based on ARIMA and applied the SARIMA model to forecast both short-term and long-term traffic flows, which proved that SARIMA is more suitable for long-term prediction. On the freeway, the sudden changes in traffic conditions are often caused by the effects of weather, accidents, and surges in demand. Thus Bezuglov [22] tested three grey system theory models and demonstrate that grey system models are better adapted to the sudden changes in parameters. Cai et al. [23] then formulated a noise-immune Kalman filter model applied to short-term traffic flow prediction, which solved the problem that the Kalman filter is insensitive to traffic flows satisfied by non-Gaussian noises.The research on nonparametric methods mainly includes neural network models, support vector regression (SVM), and K-nearest neighbor (KNN) algorithms. Among them, the first application of KNN in traffic flow prediction was in [24]. Meanwhile, Harrou et al. [25] monitored the traffic congestion problem with the KNN algorithm, which was very effective and was based on the advantages of the Kalman filter (KF) and a piecewise switched linear traffic (PWSL). Support vector regression (SVR) models were applied and proven to be appropriate for traffic flow forecasting on urban roads, e.g., [26]. And Castro-Neto et al. [27] demonstrated that the OL-SVR model can well deal with the atypical conditions when they occur and is better than other prediction models. The Gauss-SVR model proposed by Li et al. [28] has better predictive performance than the neural network when it comes to urban traffic flow forecasting, but it should be noted that the structure of the BP neural network used in the paper is simpler.Although neural network models have been considered to be better suited for short-term traffic forecasting [29–31], and it has been argued that the accuracy of predictions gradually decreases as the range of predictions increases, neural networks do not work well for long-term traffic forecasting. However, Çetiner et al. [32] applied an artificial neural network (ANN) to predict long-term (1h) data and short-term (5 min) data for one day in a historical dataset for the city of Istanbul and discovered that better results were obtained with the long-term dataset. Hao et al. [33] demonstrated that Long Short-Term Memory (LSTM) neural networks can consistently and effectively achieve long-term traffic forecasting based on dynamic traffic flow probability graphs and alleviate the effect of missing data on the forecasting results. Therefore, the neural network can enable long-time forecasting. It has been demonstrated that NARX NN is also capable of predicting long time-series tasks [34].While parametric and nonparametric methods have their advantages and disadvantages, both should be tested and compared with the baseline model to obtain the optimal model. However, the use of combined a model, or algorithms, or heuristic approach for forecasting seems to be the current rage. This is very common in complex traffic forecasting, e.g., [23, 28]. But some problems have remained. In [35], Vlahogianni has discussed comparing the use of baseline and combined models and raised the question of when to combine predictions. It addressed the situation where combined models may make it difficult to control errors in long-term prediction.In the studies of traffic parameter prediction mentioned above, most of them were for single sites or individual road sections. In contrast, when analyzing macroscopic characteristics, traffic flow parameters have to be predicted for multiple sections on the road and the entire road network in an integrated manner. In a previous study, Williams [36] used the ARIMA model to predict traffic flows at several test sections within the city of Bonn, Germany. Kamananakis [37, 38] applied the STARIMA model to traffic flow forecasting on major arterial road sections in the city of Athens, Greece, and described the topological distance relationship with the sections by using a weight matrix. A comparison with ARIMA and VARMA revealed similar prediction performance. In a recent study, Li et al. [39] proposed a short-term multistep traffic prediction model for macroscopic road networks, Dynamic Graph Convolutional Network (DGCN), which is based on the Dynamic Graph Convolutional (DGC) model. Therefore, the above study shows that it is feasible to forecast the traffic state of the regional road network.


### 2.2. Macroscopic Evaluation of Traffic State

In macroscopic traffic state evaluation, the range of study is often extended to multiple cross sections or the entire road network based on the fundamental diagram theory of traffic flow. To describe the traffic state of urban road networks, scholars have proposed various theories, such as dimensional analysis theory [40] and two-fluid theory [41–43]. The MFD was proposed by Godfrey in 1969 [44]. Daganzo et al. [45, 46] in 2008 revealed the characterization of flows and trip completion rates by using GPS data of taxis in Yokohama, Japan, which has a high level of congestion. The existence of the MFD was formulated and verified, and a new paradigm was initiated. With the MFD, it is possible to significantly reduce the complexity of the traffic flow model, thus achieving a controlled design of the model for the urban network.After that, analytical modeling and control researches on MFD have been continuously proposed. The main difference between these models is that the controlling strategies are different and the controlled models are summarised as follows.(1)
Three-parameter baseline model: according to Edie's [47] simple definition of road network traffic flow, the arithmetic mean or weighted mean of the section traffic flow parameters can be obtained, as shown in the following equation:(1)Q¯=1N∑iQi,K¯=1N∑iKi,V¯=Q¯K¯,whereQ¯, K¯, and V¯ are the averages of the volume (pcu/h), density (pcu/km), and speed (km/h) in the road network, while N is the number of sections or road segments detected.(2)
Perimeter control models [48]: By defining a generic mathematical model for multireservoir networks with well-defined MFDs for each reservoir, maximizing the throughput of the system without the necessity to calculate workload and future demand data is achieved.(3)
Adaptive control models [49]: These models optimize the controller through real-time observation of changes to adapt the model to uncertainties and state delays under different parameters.(4)
Hierarchical perimeter control models [50]: This model is proposed to address the problem of traffic congestion with high traffic demand and heterogeneous distribution. The hierarchical control strategy is introduced, and each layer solves the corresponding problem according to different demands to achieve the stability of the traffic system.(5)
Robust control models [51, 52]: This model mainly considers the parameter uncertainty of single or multiple regional networks and sets different algorithms for robust controllers according to various demands to ensure stable operation of the model.And in addition to the MFD, new progress has been introduced to the study of macroscopic traffic flow analysis. Thonfer et al. [53] modularized the urban traffic network and proposed a model that contains signal control and is adapted to large-scale urban road networks, which can improve operational efficiency through parallel computation. Xiao et al. [54] presented traffic speed cloud maps that can dynamically capture the process of congestion formation and degradation, but the scale of data resources required is larger than that of the MFD.In summary, scholars have demonstrated in previous studies that traffic data is highly nonlinear, periodic, and time-varying, and that the NARX model also supports the prediction of traffic data with time-series features compared to the SARIMA model [55]. Although NARX NN has long-term forecasting capability, whether it can fulfill the task of long-term traffic state parameter prediction or not still needs to be verified [56]. In this paper, we decided to conduct comparative experiments using the NARX model with the other baseline models. While the MFD is better than other methods of macroscopic state evaluation in presenting the traffic state characteristics in terms of data relationships, we chose MFD.


## 2.1. Traffic State Parameters Prediction

In the context of the ITS, numerous prediction methods for traffic state parameters have emerged. In the past research, prediction models for various types of traffic state parameters have been proposed in the relevant literature. According to the type of parameter, these include traffic flow, speed, density, occupancy, and the resulting travel time and travel time index. Based on the traffic flow parameter relationships proposed by Greenshields, when conducting the selection of indicators, some have argued that the selection of volumes is important because of the stability of volumes [12].Some have argued that speed prediction is more critical [1, 13], while others have argued that prediction accuracy can be improved by the combined effect of multiple traffic metrics, such as simultaneous characterization of volume and density [14]. In recent years, with the continuous improvement of algorithms and the development of data collection equipment, travel time and travel time index have received increasing attention as predictors. Li et al. [15] proposed a model based on an ensemble empirical mode decomposition and random vector functional link network to predict the travel time of a highway network. Xu et al. [16] chose the travel time index when dealing with the prediction of regional road networks. In contrast, due to the limitations of the collection equipment, other indices are difficult to obtain. So for the current work, we use traffic data for consideration. However, when these data are available, a multi-index prediction approach is taken.A comparative study by Smith et al. [17] found that studies of flow prediction models can be divided into parametric and nonparametric methods, with parametric methods being more time consuming and nonparametric methods being more effective when dealing with the random data.Research on parametric methods is much earlier and more established. Jensen [18] used linear regression methods for traffic forecasting in 1972, and Hogberg [19] used nonlinear regression methods to estimate the parameters in traffic forecasting models in 1973. Lee et al. [20] used the ARIMA model for short-term freeway traffic volume forecasting and proved to be able to accurately predict traffic variations with time-series characteristics. The method contains fewer parameters but has better forecasting results. ARIMA is widely applied as a parametric model for time-series forecasting, which is obtained by introducing hidden variables through moving average (MA). Tatsuya [21] eliminated the seasonal factor based on ARIMA and applied the SARIMA model to forecast both short-term and long-term traffic flows, which proved that SARIMA is more suitable for long-term prediction. On the freeway, the sudden changes in traffic conditions are often caused by the effects of weather, accidents, and surges in demand. Thus Bezuglov [22] tested three grey system theory models and demonstrate that grey system models are better adapted to the sudden changes in parameters. Cai et al. [23] then formulated a noise-immune Kalman filter model applied to short-term traffic flow prediction, which solved the problem that the Kalman filter is insensitive to traffic flows satisfied by non-Gaussian noises.The research on nonparametric methods mainly includes neural network models, support vector regression (SVM), and K-nearest neighbor (KNN) algorithms. Among them, the first application of KNN in traffic flow prediction was in [24]. Meanwhile, Harrou et al. [25] monitored the traffic congestion problem with the KNN algorithm, which was very effective and was based on the advantages of the Kalman filter (KF) and a piecewise switched linear traffic (PWSL). Support vector regression (SVR) models were applied and proven to be appropriate for traffic flow forecasting on urban roads, e.g., [26]. And Castro-Neto et al. [27] demonstrated that the OL-SVR model can well deal with the atypical conditions when they occur and is better than other prediction models. The Gauss-SVR model proposed by Li et al. [28] has better predictive performance than the neural network when it comes to urban traffic flow forecasting, but it should be noted that the structure of the BP neural network used in the paper is simpler.Although neural network models have been considered to be better suited for short-term traffic forecasting [29–31], and it has been argued that the accuracy of predictions gradually decreases as the range of predictions increases, neural networks do not work well for long-term traffic forecasting. However, Çetiner et al. [32] applied an artificial neural network (ANN) to predict long-term (1h) data and short-term (5 min) data for one day in a historical dataset for the city of Istanbul and discovered that better results were obtained with the long-term dataset. Hao et al. [33] demonstrated that Long Short-Term Memory (LSTM) neural networks can consistently and effectively achieve long-term traffic forecasting based on dynamic traffic flow probability graphs and alleviate the effect of missing data on the forecasting results. Therefore, the neural network can enable long-time forecasting. It has been demonstrated that NARX NN is also capable of predicting long time-series tasks [34].While parametric and nonparametric methods have their advantages and disadvantages, both should be tested and compared with the baseline model to obtain the optimal model. However, the use of combined a model, or algorithms, or heuristic approach for forecasting seems to be the current rage. This is very common in complex traffic forecasting, e.g., [23, 28]. But some problems have remained. In [35], Vlahogianni has discussed comparing the use of baseline and combined models and raised the question of when to combine predictions. It addressed the situation where combined models may make it difficult to control errors in long-term prediction.In the studies of traffic parameter prediction mentioned above, most of them were for single sites or individual road sections. In contrast, when analyzing macroscopic characteristics, traffic flow parameters have to be predicted for multiple sections on the road and the entire road network in an integrated manner. In a previous study, Williams [36] used the ARIMA model to predict traffic flows at several test sections within the city of Bonn, Germany. Kamananakis [37, 38] applied the STARIMA model to traffic flow forecasting on major arterial road sections in the city of Athens, Greece, and described the topological distance relationship with the sections by using a weight matrix. A comparison with ARIMA and VARMA revealed similar prediction performance. In a recent study, Li et al. [39] proposed a short-term multistep traffic prediction model for macroscopic road networks, Dynamic Graph Convolutional Network (DGCN), which is based on the Dynamic Graph Convolutional (DGC) model. Therefore, the above study shows that it is feasible to forecast the traffic state of the regional road network.


## 2.2. Macroscopic Evaluation of Traffic State

In macroscopic traffic state evaluation, the range of study is often extended to multiple cross sections or the entire road network based on the fundamental diagram theory of traffic flow. To describe the traffic state of urban road networks, scholars have proposed various theories, such as dimensional analysis theory [40] and two-fluid theory [41–43]. The MFD was proposed by Godfrey in 1969 [44]. Daganzo et al. [45, 46] in 2008 revealed the characterization of flows and trip completion rates by using GPS data of taxis in Yokohama, Japan, which has a high level of congestion. The existence of the MFD was formulated and verified, and a new paradigm was initiated. With the MFD, it is possible to significantly reduce the complexity of the traffic flow model, thus achieving a controlled design of the model for the urban network.After that, analytical modeling and control researches on MFD have been continuously proposed. The main difference between these models is that the controlling strategies are different and the controlled models are summarised as follows.(1)
Three-parameter baseline model: according to Edie's [47] simple definition of road network traffic flow, the arithmetic mean or weighted mean of the section traffic flow parameters can be obtained, as shown in the following equation:(1)Q¯=1N∑iQi,K¯=1N∑iKi,V¯=Q¯K¯,whereQ¯, K¯, and V¯ are the averages of the volume (pcu/h), density (pcu/km), and speed (km/h) in the road network, while N is the number of sections or road segments detected.(2)
Perimeter control models [48]: By defining a generic mathematical model for multireservoir networks with well-defined MFDs for each reservoir, maximizing the throughput of the system without the necessity to calculate workload and future demand data is achieved.(3)
Adaptive control models [49]: These models optimize the controller through real-time observation of changes to adapt the model to uncertainties and state delays under different parameters.(4)
Hierarchical perimeter control models [50]: This model is proposed to address the problem of traffic congestion with high traffic demand and heterogeneous distribution. The hierarchical control strategy is introduced, and each layer solves the corresponding problem according to different demands to achieve the stability of the traffic system.(5)
Robust control models [51, 52]: This model mainly considers the parameter uncertainty of single or multiple regional networks and sets different algorithms for robust controllers according to various demands to ensure stable operation of the model.And in addition to the MFD, new progress has been introduced to the study of macroscopic traffic flow analysis. Thonfer et al. [53] modularized the urban traffic network and proposed a model that contains signal control and is adapted to large-scale urban road networks, which can improve operational efficiency through parallel computation. Xiao et al. [54] presented traffic speed cloud maps that can dynamically capture the process of congestion formation and degradation, but the scale of data resources required is larger than that of the MFD.In summary, scholars have demonstrated in previous studies that traffic data is highly nonlinear, periodic, and time-varying, and that the NARX model also supports the prediction of traffic data with time-series features compared to the SARIMA model [55]. Although NARX NN has long-term forecasting capability, whether it can fulfill the task of long-term traffic state parameter prediction or not still needs to be verified [56]. In this paper, we decided to conduct comparative experiments using the NARX model with the other baseline models. While the MFD is better than other methods of macroscopic state evaluation in presenting the traffic state characteristics in terms of data relationships, we chose MFD.


## 3. Evaluation Model of Regional Road Network’s Traffic State Based on the MFD

For our study, considering the large scope of road network evaluation, the traditional microscopic traffic models are not effective, so the MFD is used to reflect the traffic conditions of the road network.


### 3.1. Traffic State Classification and Index Calculation

As multiple indicators can reflect traffic conditions, the selection of the appropriate indicators is a key step. Therefore, the selection steps of indicators in this paper will follow the following principles: (1) Clear purpose, (2) comprehensive scope of the evaluation, and (3) being practical and operable. After reviewing the relevant literature [57, 58], the current commonly used traffic state evaluation indicators were compiled and shown in the following figure.The parameters of flow, speed, and occupancy were the most commonly used (see Figure1). Considering the difficulty of index acquisition, evaluation criteria, and model applicability, the traffic flow parameters of flow, density, and speed were selected in this paper to reflect the condition of the road network.Figure 1
Usage of common indicators for traffic state assessment.The essence of road network condition evaluation follows the basic evaluation principles and discriminates the traffic state through scientific and reasonable methods. In traditional traffic evaluation systems, the traffic flow fundamental diagram model is based on the analysis of historical data. It is established with statistical methods and characterizes the relationship between the parameters of a single section of road and has a limited scope of application. The relationships between spatially averaged flow variables of multiple sections or regional road networks are analyzed with MFDs, which provide an intuitive and systematic description of the overall structure of the road network.To discern whether the road network is congested or not, it is assumed that the road network is homogeneous and all the cross-sectional traffic parameters are compatible with the flow relationship curve. According to the critical speed in the flow model proposed by Greenshields, it is divided into congested and noncongested areas.Let∂Q/∂V=0; then, Vm=V/2 corresponding to Qmax can be obtained and thus the point Vf/2,Qm is the maximum value of the flow-velocity curve.The extreme value of the flow-velocity curveQm can be used as a dividing point between the uncongested and congested areas (see Figure 2).Figure 2
Traffic-velocity model congestion area division.In this paper, we have introducedM, the road network’s traffic condition efficiency index, which characterizes the state of vehicles per time in the road network. Its calculation is shown as follows:(2)M=QVL=KjV2−V3VfL,where L is the length of the road section in the road network.From equation (2), it can be seen that there is a threefold functional relationship between M and V, and there must be an Mmax corresponding to a V.When∂M/∂V=0, VA=2/3Vf can be obtained, which corresponds to Mmax. At this time, the point 2/3Vf,VA can be regarded as the dividing point between the free flow (F) state and the harmonic flow (H) state in uncongested areas. Similarly, VA corresponds to VD=1/3Vf of the same flow; then the point 1/3VM,QD can be regarded as the dividing point between the synchronous flow (S) state and the blocked flow (B) state in the congested area, as shown in Figure 3.Figure 3
Traffic state curve.In summary, the traffic state of the road network can be divided into four classes based on the traffic state curve. The intervals of each class are shown in Table1.Table 1
Traffic state classification intervals.
StateIntervalStateIntervalBlocked flow1/3,0VfHarmonic flow2/3,1/2VfSynchronous flow1/2,1/3VfFree flow1,2/3Vf


### 3.2. Evaluation Model of Road Network Traffic State

The road network is composed of highways of many different technical grades. The state of the road network cannot be generalized due to the technical variability of the different highway grades. Therefore, it is necessary to evaluate the traffic state of the same highway levels first, then divide the weights according to the different technical highway grades and calculate them, and finally formulate the traffic state model of the road network.(1)
The traffic state evaluation model for road networks of the same level uses the average speed of all vehicles in the road network as the state evaluation index, as shown in the following equation:(3)Vjk=∑i=1nVijkn,whereVjk (km/h) is speed state for all roads of grade j at the k-th inspection time interval; Vijk (km/h) is the speed state for the i-th road monitoring station of the grade j roads at the k-th inspection time interval, and n is the number of j-grade road monitoring stations in the road network.(2)
Equation for calculating road weights:The importance of a road section is related to its capacity and length. Variations in the operational state of road sections with higher capacities or smaller lengths will have a greater impact on the operational state of the road network. The importance weights of intersections and sections are modeled as follows in equation (4), where traffic monitoring stations are calculated as intersections:(4)ωcLij=CLijlLij≈QLijlLij,whereωc (Lij) is the section importance weight; C (Lij) is the section capacity, in veh/h; and l (Lij) is the section length, in m.Using the road section level and weights, a comprehensive weighting model for road sections is established using the following equation:(5)ωkLij=ωcLij∑i=1hωcLij=∑i,j=1nQkLij∑j=1mQkLj,whereωk (Lij) is the comprehensive weight for the i-th road monitoring station of the grade j roads at the k-th inspection time interval; Qk (Lij) is the flow for the i-th road monitoring station of the grade j roads at the k-th inspection time interval, in veh/h; Qk (Lj) is the flow for all roads of grade j at the k-th inspection time interval, in veh/h; m is the number of technical grade types and h is the number of road sections in the road network.(3)
Road network traffic state evaluation model:The traffic state evaluation model of the road network within the evaluation range is obtained by multiplying and adding each grade of the road according to the correspondence in equations (4) and (5), as shown in the following equation:(6)Fk=∑j=1mωkLijV¯jk,where Fk is the traffic state value of the road network in the k-th time interval, in (km/h).In this study, we only include primary roads and secondary roads due to the limitations of road network grades and monitoring devices in the selected areas. The higher the grade is, the more the transport functions it corresponds to undertake, and the more the weights that need to be assigned. In terms of the capacity of each road class, the weights of these two classes of roads were determined to be 0.6 and 0.4.


## 3.1. Traffic State Classification and Index Calculation

As multiple indicators can reflect traffic conditions, the selection of the appropriate indicators is a key step. Therefore, the selection steps of indicators in this paper will follow the following principles: (1) Clear purpose, (2) comprehensive scope of the evaluation, and (3) being practical and operable. After reviewing the relevant literature [57, 58], the current commonly used traffic state evaluation indicators were compiled and shown in the following figure.The parameters of flow, speed, and occupancy were the most commonly used (see Figure1). Considering the difficulty of index acquisition, evaluation criteria, and model applicability, the traffic flow parameters of flow, density, and speed were selected in this paper to reflect the condition of the road network.Figure 1
Usage of common indicators for traffic state assessment.The essence of road network condition evaluation follows the basic evaluation principles and discriminates the traffic state through scientific and reasonable methods. In traditional traffic evaluation systems, the traffic flow fundamental diagram model is based on the analysis of historical data. It is established with statistical methods and characterizes the relationship between the parameters of a single section of road and has a limited scope of application. The relationships between spatially averaged flow variables of multiple sections or regional road networks are analyzed with MFDs, which provide an intuitive and systematic description of the overall structure of the road network.To discern whether the road network is congested or not, it is assumed that the road network is homogeneous and all the cross-sectional traffic parameters are compatible with the flow relationship curve. According to the critical speed in the flow model proposed by Greenshields, it is divided into congested and noncongested areas.Let∂Q/∂V=0; then, Vm=V/2 corresponding to Qmax can be obtained and thus the point Vf/2,Qm is the maximum value of the flow-velocity curve.The extreme value of the flow-velocity curveQm can be used as a dividing point between the uncongested and congested areas (see Figure 2).Figure 2
Traffic-velocity model congestion area division.In this paper, we have introducedM, the road network’s traffic condition efficiency index, which characterizes the state of vehicles per time in the road network. Its calculation is shown as follows:(2)M=QVL=KjV2−V3VfL,where L is the length of the road section in the road network.From equation (2), it can be seen that there is a threefold functional relationship between M and V, and there must be an Mmax corresponding to a V.When∂M/∂V=0, VA=2/3Vf can be obtained, which corresponds to Mmax. At this time, the point 2/3Vf,VA can be regarded as the dividing point between the free flow (F) state and the harmonic flow (H) state in uncongested areas. Similarly, VA corresponds to VD=1/3Vf of the same flow; then the point 1/3VM,QD can be regarded as the dividing point between the synchronous flow (S) state and the blocked flow (B) state in the congested area, as shown in Figure 3.Figure 3
Traffic state curve.In summary, the traffic state of the road network can be divided into four classes based on the traffic state curve. The intervals of each class are shown in Table1.Table 1
Traffic state classification intervals.
StateIntervalStateIntervalBlocked flow1/3,0VfHarmonic flow2/3,1/2VfSynchronous flow1/2,1/3VfFree flow1,2/3Vf


## 3.2. Evaluation Model of Road Network Traffic State

The road network is composed of highways of many different technical grades. The state of the road network cannot be generalized due to the technical variability of the different highway grades. Therefore, it is necessary to evaluate the traffic state of the same highway levels first, then divide the weights according to the different technical highway grades and calculate them, and finally formulate the traffic state model of the road network.(1)
The traffic state evaluation model for road networks of the same level uses the average speed of all vehicles in the road network as the state evaluation index, as shown in the following equation:(3)Vjk=∑i=1nVijkn,whereVjk (km/h) is speed state for all roads of grade j at the k-th inspection time interval; Vijk (km/h) is the speed state for the i-th road monitoring station of the grade j roads at the k-th inspection time interval, and n is the number of j-grade road monitoring stations in the road network.(2)
Equation for calculating road weights:The importance of a road section is related to its capacity and length. Variations in the operational state of road sections with higher capacities or smaller lengths will have a greater impact on the operational state of the road network. The importance weights of intersections and sections are modeled as follows in equation (4), where traffic monitoring stations are calculated as intersections:(4)ωcLij=CLijlLij≈QLijlLij,whereωc (Lij) is the section importance weight; C (Lij) is the section capacity, in veh/h; and l (Lij) is the section length, in m.Using the road section level and weights, a comprehensive weighting model for road sections is established using the following equation:(5)ωkLij=ωcLij∑i=1hωcLij=∑i,j=1nQkLij∑j=1mQkLj,whereωk (Lij) is the comprehensive weight for the i-th road monitoring station of the grade j roads at the k-th inspection time interval; Qk (Lij) is the flow for the i-th road monitoring station of the grade j roads at the k-th inspection time interval, in veh/h; Qk (Lj) is the flow for all roads of grade j at the k-th inspection time interval, in veh/h; m is the number of technical grade types and h is the number of road sections in the road network.(3)
Road network traffic state evaluation model:The traffic state evaluation model of the road network within the evaluation range is obtained by multiplying and adding each grade of the road according to the correspondence in equations (4) and (5), as shown in the following equation:(6)Fk=∑j=1mωkLijV¯jk,where Fk is the traffic state value of the road network in the k-th time interval, in (km/h).In this study, we only include primary roads and secondary roads due to the limitations of road network grades and monitoring devices in the selected areas. The higher the grade is, the more the transport functions it corresponds to undertake, and the more the weights that need to be assigned. In terms of the capacity of each road class, the weights of these two classes of roads were determined to be 0.6 and 0.4.


## 4. Experiment

After analyzing and obtaining the above method, the experimental flowchart of this paper is summarised as follows (see Figure4).Figure 4
Flowchart of road network’s traffic state prediction.


### 4.1. Data Description

To test the operational effectiveness of the state prediction model over a large area, the location chosen for this study was in Linzi District, Zibo City, Shandong Province, which has an area of 672.58 km2 for the study. The area has long latitudinal boundaries as it is crossed by many roads of various grades to Qingzhou City. The traffic flow is inevitably high as vehicles must pass through the area to enter Qingzhou. Considering the large area of collection, the monitoring stations were selected to monitor four sites, Zi River, Bei Liu, Reed River, and Wu Tai, which are distributed on the main national roads (e.g., G308, G309, and G233) and provincial roads (e.g., S227, S228, and S102) in the region (see Figure 5(a)). Among them, there are more factories near the Reed River monitoring stations, and large vehicles will pass through the station, so the sectional traffic volume is larger than the other stations. The locations are relatively dispersed to reflect the intrinsic links of the regional road network. The weights are then divided according to the grade of each road, as shown in Figure 5(b).Figure 5
Selected road network in Linzi District. (a) Station location map in Linzi District. (b) Network diagram of links with the division of weights diagram.
(a)(b)To reflect the correlation and weight expression of adjacent links in the road network more intuitively, a spatial weight matrix W (0.6,0.4) was established, as shown in Figure6. In the figure, “0.6″ and “0.4″ indicate the corresponding road level weights between two nodes, and “0″ indicates that the two nodes are not connected.Figure 6
Spatial weight adjacency matrix W (0.6,0.4) for classified roads.The total length of the roads involved is 122.135 km. From 12/01/2019 to 02/28/2020, the raw data was provided by the Shandong Provincial Highway Traffic Investigation and Management Institute in Zibo, Shandong Province, China. All vehicles passing on these roads are recorded in the station's database with radar-based detectors and video collecting equipment at the monitoring stations. The traffic flow data was measured every 1 hour and the speed data is measured every 5 min. In addition, due to the epidemic, some roads were closed and the communication of the detector was faulty during the collecting period and resulting in some traffic data being missing (1.94%). To minimize the influence, the missing values were recovered by the average values of other days measured at the same time during data processing. To avoid any loss of monitor accuracy during rain and snow, which could have an impact on the accuracy of the acquired data, the data was recalibrated using video equipment to ensure accuracy. After the above steps and data processing and data imputation, the traffic flow data and average speeds obtained from each of the four detection points were grouped by hour, with 8,640 sets of data each (see Figure7). It implies that 90 days∗24 h of data were recorded for each monitoring station.Figure 7
Traffic flow raw data from four monitoring stations.


### 4.2. Traffic Flow Prediction Modeling and Baseline

As previously mentioned, one of the main objectives of this paper aims to investigate the feasibility of NARX NN in long-term traffic flow forecasting and compares it with other types of artificial intelligence methods. To make a fair comparison, the LSTM NN and GRU NN were chosen as the two methods.


#### 4.2.1. NARX NN

The NARX NN can be seen as a neural network version of the time-series model, which can consider external time-series inputs. Its predictions are based on historical data from the same series. As a standard NARX neural network architecture, the parallel architecture feeds the output back into the input of the feedforward neural network, where TDL is the tapped delay line. The other architectural mode is a series-parallel architecture that uses the real output rather than the output estimated by the feedback. It enables the input to the feedforward network to be more accurate and can be trained by using static backpropagation [59, 60]. The simple structure is shown in Figure 8.Figure 8
Two architectures of NARX networks. (a) Parallel architecture. (b) Series-parallel architecture.
(a)(b)As a typical nonlinear prediction model with input and output delays, in the NARX model, the traffic flowy^(t+1) is obtained from the input and output flow predictions before t. The model’s expression is shown in the following equation:(7)y^t+1=fxt−1,…xt−d,yt,yt−1,…yt−d,where f is a nonlinear function and d is the order of delay of the input and output.


#### 4.2.2. LSTM NN

As a special form derived from the RNN model, LSTM NN can better deal with data of longer sequences. Long-term memory is preserved through gating and cell state updates, and time-related information is retained through storage cells to solve the gradient disappearance and gradient explosion problems in RNN models.


#### 4.2.3. GRU NN

The GRU NN, as well as the LSTM NN mentioned above, is excellent variant of the RNN [61]. However, differing from the LSTM NN, the GRU network simplifies the structure by merging the forgetting gate and the input gate into an update gate. The updated state of the cell is controlled through the update gate, and the reset gate determines how to combine the new input information with the previous memory to make convergence faster.To compare the traffic flow prediction effect of the NARX NN, LSTM NN, and GRU NN models, the same traffic flow datasets are chosen. The root means square error (RMSE), mean absolute percentage error (MAPE), andR2 were selected to evaluate the difference between the real results Yt=y1,y2,…yn and predicted results Y^t=y^1,y^2,…y^n, as shown in equations (8)-(10):(8)RMSE=1m∑i=1myi−y^i2,(9)MAPE=1p∑i=1pyi−y^iyi,(10)R2=1−∑iy^i−y2∑iy¯−y2,where p is the number of samples, yiis the flow’s measured value, and y^i is the corresponding predicted value.


### 4.3. Experimental Settings

The purpose of this experiment would be to predict future day traffic values with three-month data and then obtain the predicted traffic status from MFD and traffic status evaluation intervals. For the structure of the dataset described in Section4.1 and the baseline model in Section 4.2, the dataset of each monitoring station is partitioned into a training set, a validation set, and a test set, corresponding to a ratio of 7 : 1.5 : 1.5. It is worth noting that the datasets of the methods used were uniform to be fair for comparisons between different methods. Moreover, some of the parameters were taken as constant or default values to facilitate the control of variables. The open-closed loop control (see Figure 8(a)) is chosen for the training of the NARX NN, while the closed loop control (see Figure 8(b)) is chosen for its prediction with a learning rate of 0.005, which is intended to obtain better prediction results in long-term traffic flow prediction. The corresponding training algorithm used the Levenberg-Marquardt (LM) algorithm to obtain a faster iteration rate. The training process for both LSTM NN and GRU NN utilized the Adam optimizer, with the MaxEpochs set to 250, the gradient threshold of 1, and an initial learning rate of 0.01. After the 125th training round, the learning rate is multiplied by 0.2 to reduce the learning rate. As it is a sequence of input and output data, both input and output are set to 1 dimension.To compare different prediction methods and to ensure the uniformity of the platform, the experimental equipment is composed of a 6-core AMD3600 X 3.80 GHz CPU, 16 GB of RAM, a GEFORCE RTX 2060S 8 GB GPU, and MATLAB 2021a is chosen for the experimental platform.


## 4.1. Data Description

To test the operational effectiveness of the state prediction model over a large area, the location chosen for this study was in Linzi District, Zibo City, Shandong Province, which has an area of 672.58 km2 for the study. The area has long latitudinal boundaries as it is crossed by many roads of various grades to Qingzhou City. The traffic flow is inevitably high as vehicles must pass through the area to enter Qingzhou. Considering the large area of collection, the monitoring stations were selected to monitor four sites, Zi River, Bei Liu, Reed River, and Wu Tai, which are distributed on the main national roads (e.g., G308, G309, and G233) and provincial roads (e.g., S227, S228, and S102) in the region (see Figure 5(a)). Among them, there are more factories near the Reed River monitoring stations, and large vehicles will pass through the station, so the sectional traffic volume is larger than the other stations. The locations are relatively dispersed to reflect the intrinsic links of the regional road network. The weights are then divided according to the grade of each road, as shown in Figure 5(b).Figure 5
Selected road network in Linzi District. (a) Station location map in Linzi District. (b) Network diagram of links with the division of weights diagram.
(a)(b)To reflect the correlation and weight expression of adjacent links in the road network more intuitively, a spatial weight matrix W (0.6,0.4) was established, as shown in Figure6. In the figure, “0.6″ and “0.4″ indicate the corresponding road level weights between two nodes, and “0″ indicates that the two nodes are not connected.Figure 6
Spatial weight adjacency matrix W (0.6,0.4) for classified roads.The total length of the roads involved is 122.135 km. From 12/01/2019 to 02/28/2020, the raw data was provided by the Shandong Provincial Highway Traffic Investigation and Management Institute in Zibo, Shandong Province, China. All vehicles passing on these roads are recorded in the station's database with radar-based detectors and video collecting equipment at the monitoring stations. The traffic flow data was measured every 1 hour and the speed data is measured every 5 min. In addition, due to the epidemic, some roads were closed and the communication of the detector was faulty during the collecting period and resulting in some traffic data being missing (1.94%). To minimize the influence, the missing values were recovered by the average values of other days measured at the same time during data processing. To avoid any loss of monitor accuracy during rain and snow, which could have an impact on the accuracy of the acquired data, the data was recalibrated using video equipment to ensure accuracy. After the above steps and data processing and data imputation, the traffic flow data and average speeds obtained from each of the four detection points were grouped by hour, with 8,640 sets of data each (see Figure7). It implies that 90 days∗24 h of data were recorded for each monitoring station.Figure 7
Traffic flow raw data from four monitoring stations.


## 4.2. Traffic Flow Prediction Modeling and Baseline

As previously mentioned, one of the main objectives of this paper aims to investigate the feasibility of NARX NN in long-term traffic flow forecasting and compares it with other types of artificial intelligence methods. To make a fair comparison, the LSTM NN and GRU NN were chosen as the two methods.


### 4.2.1. NARX NN

The NARX NN can be seen as a neural network version of the time-series model, which can consider external time-series inputs. Its predictions are based on historical data from the same series. As a standard NARX neural network architecture, the parallel architecture feeds the output back into the input of the feedforward neural network, where TDL is the tapped delay line. The other architectural mode is a series-parallel architecture that uses the real output rather than the output estimated by the feedback. It enables the input to the feedforward network to be more accurate and can be trained by using static backpropagation [59, 60]. The simple structure is shown in Figure 8.Figure 8
Two architectures of NARX networks. (a) Parallel architecture. (b) Series-parallel architecture.
(a)(b)As a typical nonlinear prediction model with input and output delays, in the NARX model, the traffic flowy^(t+1) is obtained from the input and output flow predictions before t. The model’s expression is shown in the following equation:(7)y^t+1=fxt−1,…xt−d,yt,yt−1,…yt−d,where f is a nonlinear function and d is the order of delay of the input and output.


### 4.2.2. LSTM NN

As a special form derived from the RNN model, LSTM NN can better deal with data of longer sequences. Long-term memory is preserved through gating and cell state updates, and time-related information is retained through storage cells to solve the gradient disappearance and gradient explosion problems in RNN models.


### 4.2.3. GRU NN

The GRU NN, as well as the LSTM NN mentioned above, is excellent variant of the RNN [61]. However, differing from the LSTM NN, the GRU network simplifies the structure by merging the forgetting gate and the input gate into an update gate. The updated state of the cell is controlled through the update gate, and the reset gate determines how to combine the new input information with the previous memory to make convergence faster.To compare the traffic flow prediction effect of the NARX NN, LSTM NN, and GRU NN models, the same traffic flow datasets are chosen. The root means square error (RMSE), mean absolute percentage error (MAPE), andR2 were selected to evaluate the difference between the real results Yt=y1,y2,…yn and predicted results Y^t=y^1,y^2,…y^n, as shown in equations (8)-(10):(8)RMSE=1m∑i=1myi−y^i2,(9)MAPE=1p∑i=1pyi−y^iyi,(10)R2=1−∑iy^i−y2∑iy¯−y2,where p is the number of samples, yiis the flow’s measured value, and y^i is the corresponding predicted value.


## 4.2.1. NARX NN

The NARX NN can be seen as a neural network version of the time-series model, which can consider external time-series inputs. Its predictions are based on historical data from the same series. As a standard NARX neural network architecture, the parallel architecture feeds the output back into the input of the feedforward neural network, where TDL is the tapped delay line. The other architectural mode is a series-parallel architecture that uses the real output rather than the output estimated by the feedback. It enables the input to the feedforward network to be more accurate and can be trained by using static backpropagation [59, 60]. The simple structure is shown in Figure 8.Figure 8
Two architectures of NARX networks. (a) Parallel architecture. (b) Series-parallel architecture.
(a)(b)As a typical nonlinear prediction model with input and output delays, in the NARX model, the traffic flowy^(t+1) is obtained from the input and output flow predictions before t. The model’s expression is shown in the following equation:(7)y^t+1=fxt−1,…xt−d,yt,yt−1,…yt−d,where f is a nonlinear function and d is the order of delay of the input and output.


## 4.2.2. LSTM NN

As a special form derived from the RNN model, LSTM NN can better deal with data of longer sequences. Long-term memory is preserved through gating and cell state updates, and time-related information is retained through storage cells to solve the gradient disappearance and gradient explosion problems in RNN models.


## 4.2.3. GRU NN

The GRU NN, as well as the LSTM NN mentioned above, is excellent variant of the RNN [61]. However, differing from the LSTM NN, the GRU network simplifies the structure by merging the forgetting gate and the input gate into an update gate. The updated state of the cell is controlled through the update gate, and the reset gate determines how to combine the new input information with the previous memory to make convergence faster.To compare the traffic flow prediction effect of the NARX NN, LSTM NN, and GRU NN models, the same traffic flow datasets are chosen. The root means square error (RMSE), mean absolute percentage error (MAPE), andR2 were selected to evaluate the difference between the real results Yt=y1,y2,…yn and predicted results Y^t=y^1,y^2,…y^n, as shown in equations (8)-(10):(8)RMSE=1m∑i=1myi−y^i2,(9)MAPE=1p∑i=1pyi−y^iyi,(10)R2=1−∑iy^i−y2∑iy¯−y2,where p is the number of samples, yiis the flow’s measured value, and y^i is the corresponding predicted value.


## 4.3. Experimental Settings

The purpose of this experiment would be to predict future day traffic values with three-month data and then obtain the predicted traffic status from MFD and traffic status evaluation intervals. For the structure of the dataset described in Section4.1 and the baseline model in Section 4.2, the dataset of each monitoring station is partitioned into a training set, a validation set, and a test set, corresponding to a ratio of 7 : 1.5 : 1.5. It is worth noting that the datasets of the methods used were uniform to be fair for comparisons between different methods. Moreover, some of the parameters were taken as constant or default values to facilitate the control of variables. The open-closed loop control (see Figure 8(a)) is chosen for the training of the NARX NN, while the closed loop control (see Figure 8(b)) is chosen for its prediction with a learning rate of 0.005, which is intended to obtain better prediction results in long-term traffic flow prediction. The corresponding training algorithm used the Levenberg-Marquardt (LM) algorithm to obtain a faster iteration rate. The training process for both LSTM NN and GRU NN utilized the Adam optimizer, with the MaxEpochs set to 250, the gradient threshold of 1, and an initial learning rate of 0.01. After the 125th training round, the learning rate is multiplied by 0.2 to reduce the learning rate. As it is a sequence of input and output data, both input and output are set to 1 dimension.To compare different prediction methods and to ensure the uniformity of the platform, the experimental equipment is composed of a 6-core AMD3600 X 3.80 GHz CPU, 16 GB of RAM, a GEFORCE RTX 2060S 8 GB GPU, and MATLAB 2021a is chosen for the experimental platform.


## 5. Results

According to the above progress, the corresponding steps of Figure4 and the obtained results are as follows.Step 1.
In this step, when classifying the regional states, the traffic state classification intervals in Table1 and the design speeds of the corresponding roads are used. We can obtain the smooth flow speed Vf, consequently 2Vf/3, Vf/2, Vf/3, and the boundary value of each state. In this study, we used the data for the three months from December 2019 to February 2020 as the basis to obtain the actual state classification intervals of the regional road network by the above method (see Table 2).
According to the relationship between the traffic flow parameters within the regional road network and the speed classification interval in the table above, we can obtain the MFD of the road network (see Figure9). At this time, the traffic flow of the overall network is classified into four different states according to the average speed values, with different colors representing different traffic flow states. As there are a large number of primary roads in the network and the monitoring stations are mainly located at the intersection of the two grades of roads, the classification intervals will be based on the primary roads.Table 2
State classification intervals of the regional road network.
Technical gradeBlocked flowSynchronous flowHarmonic flowFree flowPrimary roads0,3030,4040,190/3190/3,100Secondary roads0,2020,3030,4040,60Figure 9
MFD of the overall road network: (a) Q-V curve, (b) Q-K curve.
(a)(b)Step 2.
After Step1, we first evaluated and compared the performance of several of the above prediction models on the datasets from the four monitoring stations based on the experimental design in Section 4.3. By varying the number of hidden layers or units, we were able to filter out the best method of setting the model parameters to ensure higher prediction accuracy. The specific parameter data are shown in Tables 3–5.
The optimal selection of parameters for the different prediction models was collated for each monitoring station as shown in the figure below (see Figure10).
As a result of the above comparison experiments, it can be seen from the comparison of the indicators in Tables3–5 and Figure 10 that, due to the similar trend of the flow data at each monitoring station, it resulted in a very similar selection of parameter and evaluation indices for each location in each method. By comparing the performance evaluation metrics of each model with the best parameters, it was found that the R2 values of NARX NN are larger than both LSTM NN and GRU NN, but the RMSE values were smaller at some monitoring stations, and the MAPE values of NARX NN were smaller than both models.
Furthermore, it is surprising that when the number of nodes in the hidden layer of the LSTM NN is continuously increased, there is no gain in performance, but rather a decrease. The reason for this is that the method is already approaching the optimal number of nodes for this dataset, and increasing the number of nodes will complicate the network and tend to “overfit” or prolong the training time. Due to its simpler structure, the GRU NN converges faster than the LSTM model during training but has lower prediction accuracy than the LSTM.
Therefore, the traffic flow of the four observation stations was predicted based on the optimal number of hidden layers or units for the above-mentioned models. The results obtained are shown in Figure11 below.
After observing and analyzing the above prediction curves, it can be seen that all three models fit well at all four monitoring stations and that the NARX NN converges faster and with relatively smaller errors than the other two models. However, in some time intervals, the NARX model oscillates less than the other two models. This indicates that while the model is well adapted to the time-varying characteristics of the traffic flow data, it is not able to cope with sudden variations in the flow at some sites.Table 3
Traffic flow prediction accuracy evaluation of NARX NN
StationsNARX NNParametersHidden layer89101112Delay layer22222Wu TaiR276.749%85.321%88.433%79.343%77.545%RMSE122.75997.46373.736114.381123.269MAPE7.53%6.93%4.98%8.24%14.18%Zi RiverR292.784%93.494%94.983%93.923%89.621%RMSE62.04756.49239.83558.27775.53MAPE1.77%2.21%1.61%1.82%1.98%Bei LiuR293.442%94.249%96.600%92.101%92.509%RMSE183.368171.490131.763210.467195.711MAPE1.11%2.87%1.09%1.35%2.54%Reed RiverR288.094%94.853%95.047%94.756%89.006%RMSE245.781167.633174.916166.907252.857MAPE2.47%1.13%1.22%1.18%1.61%Table 4
Traffic flow prediction accuracy evaluation of LSTM NN.
StationsLSTM NNParametersHiddenUnites276282288294300SequenceInputLayer11111FullyConnectedLayer11111Wu TaiR292.979%94.380%94.036%92.305%91.237%RMSE75.9365.58272.51178.96382.293MAPE5.27%5.81%5.02%5.50%6.35%Zi RiverR299.039%99.081%99.112%99.105%99.007%RMSE21.84621.49921.29221.15822.365MAPE1.64%1.59%1.67%1.60%1.74%Bei LiuR293.340%94.916%95.774%94.480%95.665%RMSE198.882174.465159.654181.866162.147MAPE1.789%1.295%1.105%1.368%1.122%Reed RiverR286.063%87.124%91.011%90.481%86.132%RMSE275.21180.68162.572198.024228.13MAPE2.86%2.31%1.98%2.38%2.15%Table 5
Traffic flow prediction accuracy evaluation of GRU NN.
StationsGRU NNParametersHiddenUnites270276282288294SequenceInputLayer11111FullyConnectedLayer11111Wu TaiR281.181%93.552%88.85%79.53%84.01%RMSE118.07673.33294.207147.014113.782MAPE6.617%5.063%5.45%7.44%6.10%Zi RiverR298.971%98.966%98.865%99.068%99.091%RMSE22.80522.64224.00521.54221.242MAPE1.807%1.727%1.863%1.626%1.604%Bei LiuR295.736%96.024%96.145%95.882%96.117%RMSE160.169154.73887152.6051157.25165153.57241MAPE1.144%1.097%1.090%1.149%1.085%Reed RiverR279.014%85.961%88.093%81.664%83.526%RMSE281.021190.011170.425236.447200.634MAPE3.02%2.54%2.12%2.83%2.51%Figure 10
Comparison of evaluation indicators for predicted results at the four monitoring stations.
(a)(b)(c)Figure 11
Flow prediction curves for each monitoring station under different prediction models.
(a)(b)(c)(d)Step 3.
After the first two steps, the flow for the entire network is calculated with equations (4) and (5), the classified road weights, and the predicted flows for the four monitoring stations obtained. After processing the traffic data for the next day, a comparison of the three neural network models shows that the NARX model is highly adaptable and real-time for nonlinear traffic data, while the LSTM has better lagging performance (see Figure 12). The original values of traffic flow matched well with the predicted values. The predicted results are then evaluated. As can be seen from Table 6, the three evaluation indicators of the NARX model are slightly better than the other two models for predicting traffic flow for the next day. Though similar, it converges more quickly.
Finally, according to the traffic state classification interval, the traffic state of the road network for the next day is obtained from the current MFD, the predicted traffic flow, and the corresponding speed (see Figure13). The analysis in the figure shows that the free flow is distributed during the low peak hours of the day. The blocked flows are mainly distributed during the morning and evening peak hours, and the synchronic flows are distributed after them with the temporal progression, as the main state after the peak hours. Harmonic flows occur less frequently and occupy fewer hours. The main reason for the above phenomenon is that most of the selected monitoring stations are located in the surroundings of the central city. Residents have to pass through these points when entering and leaving the city. Due to a large number of factories in the selected areas, the frequent presence of large vehicles caused the blocked flow from midday until the evening peak.Figure 12
Comparison of prediction results.Table 6
Accuracy evaluation of traffic flow forecasting with three models.
R2 (%)MAPE (%)RMSENARX NN99.5760.37460.060LSTM NN99.5790.39565.034GRU NN99.5180.40369.039Figure 13
Predicted traffic distribution by the time of day.


## 6. Conclusions and Prospects

In this paper, we developed a state prediction model for regional road networks (NARX-MFD) and proposed a traffic state efficiency index formula. The traffic state of the regional road network is classified into four categories by using and analyzing the free flow speed and the design speed of the classified road in the traffic flow parameter curves. This will be used as the evaluation classification of the predicted state. Then, according to the traffic state parameters measured from the four monitoring stations, the MFD of the road network in Linzi District of Zibo City is obtained for the selected period.Afterward, a comparison experiment of LSTM, GRU, and NARX with the same dataset showed that NARX had slightly better prediction performance than LSTM and GRU and converged fastest and can cope well with long-time traffic data. However, it did not cope well with the sudden phenomenon of traffic changing and the oscillation amplitude was not large. The main reason for this is that only the test set has mutation data, and the model trained using the training set with regular variation can only cope well with such data. Finally, a prediction diagram of the future day's traffic state is obtained with MFD, predicted flows, and corresponding speeds based on the state classification intervals of the regional road network. It realizes the functions of data quality control, prediction, and visualization of the operation state of the road network. In summary, the road network operation state prediction model can provide a reliable basis for traffic managers’ decision-making and provide effective real-time traffic information for travelers, thus reducing travel time and improving travel efficiency.However, as there are still shortcomings in both macroscopic traffic state evaluation and predicted models in this paper, our future work will be carried out from these two aspects. In the macroscopic traffic evaluation section, the number of class categories affects the calculation of weights, the calculation of capacity, and even the classification of the road network state. And there are only three selected road class categories in the network, which could be further refined. In the prediction model section, firstly, as it is difficult to obtain data and the amount of data is not large enough, considering the scale of data under the practical application of the model, further research is needed to see whether the NARX model can maintain the current prediction effect when dealing with a large dataset. Secondly, trying to combine the NARX model with other models to improve the prediction accuracy of traffic flow is a part of future research.



---

*Source: 2564211-2021-11-28.xml*