# Incorporating Traffic Flow Model into A Deep Learning Method for Traffic State Estimation: A Hybrid Stepwise Modeling Framework

Authors: Yuyan Annie Pan; Jifu Guo; Yanyan Chen; Siyang Li; Wenhao Li
Journal: Journal of Advanced Transportation
 (2022)

---

## Abstract

Traffic state estimation (TSE), which reconstructs the traffic variables (e.g., speed, flow) on road segments using partially observed data, plays an essential role in intelligent transportation systems. Generally, traffic estimation problems can be divided into two categories: model-driven approaches and data-driven approaches. The model-driven method is commonly used to solve TSE efficiently and calibrate the parameters of these models. The data-driven method requires a large amount of historical observed traffic data in order to improve performance accurately. In order to combine the advantages of model-driven and data-driven methods, this paper proposed a hybrid framework incorporating the traffic flow model into deep learning (TFMDL) modeling that contains both model-driven and data-driven components. This paper focuses on highway TSE with observed data from loop detectors. We build a hybrid cost function to adjust the weights of model-driven and data-driven proportions. We then evaluate the proposed framework using the open-access performance measurement system (PMS) dataset on a corridor of US I-405 in Los Angeles, California. The experimental results show the advantages of the proposed TFMDL approach in performing better than several benchmark models in terms of estimation accuracy and data efficiency.


---

## Body

## 1. Introduction

The intelligent transportation system (ITS) needs real-time traffic information and an accurate estimate of the future traffic state to make effective decisions so that users can obtain reliable information (e.g., travel time, route choice). The bottleneck is a critical topographic feature leading to traffic congestion because of its low capacity in the road network [1]. Accurate estimation and prediction of the traffic state could reduce traffic jams, pollution, and urban traffic pressure [2]. Therefore, traffic state estimation (TSE) plays a crucial role in urban traffic planning, control, operations, and other transportation services.Traffic state estimation refers to inferring traffic state variables (i.e., flow, density, speed) on road segments using partially observed traffic data by traffic detectors [3]. The methods of estimating traffic conditions can be briefly divided into two main approaches: model-driven and data-driven. References [4, 5] have defined the data-driven method to infer traffic states based on the dependence learned from historical data using statistical or machine learning methods, such as convolutional neural networks (CNN), and long-term memory (LSTM) [6]. The model-driven approach is based on a priori knowledge of traffic dynamics, usually described by a physical model, e.g., the Lighthill-Whitham-Richards (LWR) models [7, 8], and the cell transmission model (CTM) [9].Macroscopic traffic state variables denote the traffic conditions on road links in a traffic segment. Traffic flow models describe the dynamic behavior of vehicles and drivers. After calibrating the traffic flow model, the model can estimate and predict future traffic states more accurately [10]. The model-driven approach uses real-time data as input to evaluate the traffic state in unobserved areas.Select traffic flow models could capture the relationship among traffic flow variables [11]. However, these traffic flow models were proposed based on ideal assumptions and conditions that may not fully capture real-world traffic phenomena.With the rapid development of information processing technology, the neural network is widely used in estimation and prediction because of its advantages in modeling and optimizing nonlinear systems. It is necessary to choose a suitable neural network model according to the study problem and requirements [12]. The neural network trains the model using historical data and then estimates and predicts the unobserved traffic state. However, for the hidden anomalies and mutation points in the data sequence, due to the lack of training data, it is difficult for machine learning to make accurate estimations and predictions, which is especially obvious during the flow breakdown in the bottleneck. The traffic flow model could establish a stable fundamental diagram with some key parameters, especially since it is more accurate and can be interpreted for the mutation situation (e.g., breakdown in bottleneck). Therefore, combining the machine learning method with the traffic flow model is a practical way to build a hybrid model, improving the accuracy of estimation and prediction of traffic state.There are some researchers focused on the hybrid method of modeling for estimation and prediction [5, 13, 14]. The latest representative study was published by [15, 16] and combined with LWR, CTM, and Deep Learning Neural Network to estimate traffic conditions accurately. Their study focused on the conditions with CAV and probe vehicle data in general conditions. However, it is more difficult and critical for traffic state estimation at the flow breakdown in the bottleneck. Therefore, this paper filled the gap in traffic state estimation and prediction under congestion conditions with a hybrid stepwise modeling framework, which can be further used for both modeling of the fundamental diagram and neural network intended to improve traffic state estimation and prediction accuracy. We hope to shed light on improving traffic state estimation accuracy across a hybrid modeling framework, especially suitable for the congestion situation. It makes possible the integration of the advantages of both model-driven and data-driven approaches while overcoming the weaknesses of either alone.The rest of this paper is organized as follows. Section2 reviews related work on traffic state estimation with a traffic flow model and a deep learning neural network. Section 3 builds a hybrid stepwise modeling framework for TSE by integrating the traffic flow model and deep learning to estimate and predict traffic states. Section 4 presents an experiment using the proposed method to verify the performance of the proposed method and details the evaluation of the experiment results and discussion. Section 5 concludes our work and suggests a research direction in the future.


## 2. Literature Review

### 2.1. Macroscopic Traffic Flow Model for Traffic State Estimation

Most traditional methods for traffic state estimation and prediction are model-driven. These models were proposed based on ideal assumptions and conditions that fully capture the traffic flow phenomena of the real world. The fundamental diagram is one of the most basic concepts in traffic flow theory, known as the relationship between flow-speed, density-flow, and density-speed. The fundamental diagram appears in almost all traffic flow theories related to the traffic state variables and contains remarkable information about traffic characteristics [17]. It needs to calibrate the critical parameters in the adopted traffic flow model to obtain traffic flow characteristics in a link, section, or corridor. Those key parameters include free-flow speed, critical speed, critical density, jam density, and ultimate capacity, among some other parameters [18]. Suppose the adopted traffic flow model could accurately capture the traffic state variables observed by the detector. The model-driven approach can precisely estimate and predict traffic states in unobserved areas [3]. Therefore, it is essential to use a suitable traffic flow model to systematically capture the fundamental relationships between traffic flow, speed, and density.Many calibration methods have been proposed to identify the parameter values in the fundamental diagram. Some studies are based on sensor data [19, 20], and others are based on GPS data [21, 22]. In addition, some studies combine sensor data with probe vehicle data [23, 24]. The fundamental diagram relates traffic state variables to each other and is a core part of traffic flow theory.It plays a significant role in most traffic state estimation methods. Selected the Payne traffic flow model [25] to integrate into the Kalman filter’s observation equation, [26] proposed a framework to estimate and predict travel time. Reference [27] highlighted a particle filter method to estimate traffic conditions in freeway networks based on a speed-extended CTM-based macroscopic model. Based on stochastic nonlinear macroscopic traffic flow modeling and an extended Kalman filtering model, [28] proposed a general approach to study traffic state estimation in freeways or networks.Furthermore, the LWR model is the most widely used for model-driven TSE. Reference [29] modified the LWR partial differential equation (PDE) to incorporate a correction term that reduces the discrepancy between the observed and estimated traffic flow state. Reference [30] examined a dynamic first-order modeling approach to solving the traffic data-cleaning problem. Reference [31] developed a Bayesian recursive framework to estimate traffic flow states based on a freeway traffic model with aggregated states.The model-driven TSE method could represent the physics of traffic flow and has high explanatory power for traffic flow characteristics. This means that even if the estimation is inaccurate, it would be possible to identify the reference value and confidence intervals. However, the performance of TSE might be poor if the model or calibrated models are inappropriate. Therefore, model-driven TSE requires careful selection of the traffic flow model and calibration of model parameters by measuring traffic flow data.


### 2.2. Data-Driven Method for Traffic State Estimation

Data-driven methods mainly rely on plentiful historical data, it predicts the traffic flow state by identifying the current traffic flow pattern from the collected historical traffic data, without detailed descriptions of intrinsic traffic dynamics based on traffic flow models [32]. Unlike the typical fundamental diagram, the data-driven methods are flexible in incorporating additional explanatory variables, such as time of day, day of week and weather [33].The Neural Network (NN) and Deep neural network (DNN) have been widely and successfully applied to traffic state estimation and prediction because of their advantages in modeling and optimizing nonlinear systems [34, 35]. Two popular DNN modeling tools are most used in TSE, CNN method is good at dealing with visual data [36], while LSTM specializes in sequential data processing [37]. Many studies apply neural networks to enhance the accuracy and robustness of traffic state estimation. Reference [38] proposed a CNN-based method that learns traffic as images and predicts traffic speed in a large-scale network with high accuracy. Reference [39] introduced Bayesian learning to neural networks for the accurate prediction of transportation estimation. However, relying on historical data means these methods could have worse results if there are irregular data or cases. Some studies focused on the irregular situation with a data-driven approach. To name only a few, [40] researched the prediction accuracy for traffic flow by machine learning and the DNN approach during the disaster recovery period. Reference [41] developed a framework that combines a linear model with a deep learning model that captures the nonlinear spatial-temporal traffic flow phenomenon. It needs to be emphasized that the case study in this paper did not analyze the irregular data or long-term trends. In addition, [42] presented a new approach to predicting freeway travel time based on recurrent neural networks. Their model could be capable of dealing with spatial-temporal relationships implicitly. Furthermore, traditional neural network approaches for traffic flow estimation and prediction are usually single-task learning models, and there are some researchers focused on the multitask learning (MTL) method for traffic flow forecasting. Reference [43] highlight the multitask learning-based neural network method that improves generalization for traffic flow forecasting. Reference [44] incorporated multitask learning into its deep architecture and investigate homogeneous MTL and heterogeneous MTL for traffic flow prediction. Reference [45] proposed a deep learning-based multitask learning Gated Recurrent Units (MTL-GRU) method to improve the forecasting accuracy of traffic flow and speed.To learn time series with long time spans, long short-term memory (LSTM) neural networks have been effectively applied in short-term traffic flow prediction. Reference [46] applied LSTM to effectively capture nonlinear traffic dynamics using remote microwave sensor data collected for the Beijing network. Along this line, [47] proposed a deep and embedding learning approach to estimate and predict traffic flow characteristics. The model consists of an embedding component, a CNN component, and an LSTM component. Motivated by the success of CNNs and LSTMs, [48] proposed a spatiotemporal image-based convolutional networks approach to predict the network-wide traffic state. Reference [49] proposed a novel Spatio-Temporal Graph Convolutional Networks (STGCN) to enhance the time series prediction accuracy for multi-scale traffic networks. In addition, some other machine learning approaches have been developed for traffic flow prediction, such as Diffusion Convolutional Recurrent Neural Network (DCRNN) [50], Spatio-Temporal Attention-based Neural Network (STANN) [51], spatial-temporal graph convolutional network (ASTGCN) [52], spatiotemporal feature selection algorithm (STFSA) with CNN model [53].Compared with model-driven methods, data-driven methods do not require explicit theoretical assumptions, such as the fundamental diagram and partial differential equation. They cannot guarantee that the results will be physically feasible. In addition, data-driven approaches typically rely on relatively simple models and heavily rely on the amount and variety of data used for training. However, reliance on historical data means these methods could have worse results if there is irregular data or long-term trends. The computational cost of training and learning can be very high [3]. In addition, the process can be considered a black box, meaning inductive insights are difficult to obtain. Therefore, some traffic experts constantly criticize the data-driven method for understanding the building blocks of the models [54].


### 2.3. Hybrid of Traffic Flow Models and Neural Networks

In a congestion bottleneck or adverse weather conditions, driver behavior becomes more complex and nonlinear, which leads to new challenges in traffic state estimation. However, neither model-driven nor data-driven methods alone can estimate such complex behavior with an allowable level of accuracy. Therefore, to mitigate the limitations of the previous TSE approaches, many researchers have studied a lot of research combining the advantages of data-driven and model-driven to compensate for their weaknesses.A hybrid method could approximate the traffic states described by some traffic flow models in nonlinear differential equations and discover unknown model parameters using observed traffic data. It can improve the accuracy and explanation of model-driven or data-driven methods alone in traditional. However, many areas and questions still need to be explored in developing the hybrid method. The traffic flow model was first proposed in the deep learning method by [55, 56] to solve the TSE problem with the PDE feature. Moreover, [4] proposed a framework to solve nonlinear partial differential equations TSE problems. This problem has both a physics-informed neural network and a physics-uninformed neural network. Whereafter, [5] proposed a hybrid framework, a physics-informed deep learning model, to combine second-order traffic flow models and neural networks for the TSE. And they used experiments to demonstrate the proposed model in terms of data efficiency and estimation accuracy. Reference [15] presented a physics-informed deep learning method to improve the accuracy of the TSE problem. And they demonstrated the powerful capability of the model in utilizing limited data for real-time TSE. Reference [57] developed a hybrid model that integrates both linear regression models with a neural network layered by LSTM. They used this model to forecast the demand for taxi rides, and the results showed that this model could enhance the forecasting performance. Reference [58] proposed a kinematic wave-based deep CNN to estimate traffic speed dynamics. This method combines the advantages and mitigates the disadvantages of model-driven and data-driven approaches for TSE.


## 2.1. Macroscopic Traffic Flow Model for Traffic State Estimation

Most traditional methods for traffic state estimation and prediction are model-driven. These models were proposed based on ideal assumptions and conditions that fully capture the traffic flow phenomena of the real world. The fundamental diagram is one of the most basic concepts in traffic flow theory, known as the relationship between flow-speed, density-flow, and density-speed. The fundamental diagram appears in almost all traffic flow theories related to the traffic state variables and contains remarkable information about traffic characteristics [17]. It needs to calibrate the critical parameters in the adopted traffic flow model to obtain traffic flow characteristics in a link, section, or corridor. Those key parameters include free-flow speed, critical speed, critical density, jam density, and ultimate capacity, among some other parameters [18]. Suppose the adopted traffic flow model could accurately capture the traffic state variables observed by the detector. The model-driven approach can precisely estimate and predict traffic states in unobserved areas [3]. Therefore, it is essential to use a suitable traffic flow model to systematically capture the fundamental relationships between traffic flow, speed, and density.Many calibration methods have been proposed to identify the parameter values in the fundamental diagram. Some studies are based on sensor data [19, 20], and others are based on GPS data [21, 22]. In addition, some studies combine sensor data with probe vehicle data [23, 24]. The fundamental diagram relates traffic state variables to each other and is a core part of traffic flow theory.It plays a significant role in most traffic state estimation methods. Selected the Payne traffic flow model [25] to integrate into the Kalman filter’s observation equation, [26] proposed a framework to estimate and predict travel time. Reference [27] highlighted a particle filter method to estimate traffic conditions in freeway networks based on a speed-extended CTM-based macroscopic model. Based on stochastic nonlinear macroscopic traffic flow modeling and an extended Kalman filtering model, [28] proposed a general approach to study traffic state estimation in freeways or networks.Furthermore, the LWR model is the most widely used for model-driven TSE. Reference [29] modified the LWR partial differential equation (PDE) to incorporate a correction term that reduces the discrepancy between the observed and estimated traffic flow state. Reference [30] examined a dynamic first-order modeling approach to solving the traffic data-cleaning problem. Reference [31] developed a Bayesian recursive framework to estimate traffic flow states based on a freeway traffic model with aggregated states.The model-driven TSE method could represent the physics of traffic flow and has high explanatory power for traffic flow characteristics. This means that even if the estimation is inaccurate, it would be possible to identify the reference value and confidence intervals. However, the performance of TSE might be poor if the model or calibrated models are inappropriate. Therefore, model-driven TSE requires careful selection of the traffic flow model and calibration of model parameters by measuring traffic flow data.


## 2.2. Data-Driven Method for Traffic State Estimation

Data-driven methods mainly rely on plentiful historical data, it predicts the traffic flow state by identifying the current traffic flow pattern from the collected historical traffic data, without detailed descriptions of intrinsic traffic dynamics based on traffic flow models [32]. Unlike the typical fundamental diagram, the data-driven methods are flexible in incorporating additional explanatory variables, such as time of day, day of week and weather [33].The Neural Network (NN) and Deep neural network (DNN) have been widely and successfully applied to traffic state estimation and prediction because of their advantages in modeling and optimizing nonlinear systems [34, 35]. Two popular DNN modeling tools are most used in TSE, CNN method is good at dealing with visual data [36], while LSTM specializes in sequential data processing [37]. Many studies apply neural networks to enhance the accuracy and robustness of traffic state estimation. Reference [38] proposed a CNN-based method that learns traffic as images and predicts traffic speed in a large-scale network with high accuracy. Reference [39] introduced Bayesian learning to neural networks for the accurate prediction of transportation estimation. However, relying on historical data means these methods could have worse results if there are irregular data or cases. Some studies focused on the irregular situation with a data-driven approach. To name only a few, [40] researched the prediction accuracy for traffic flow by machine learning and the DNN approach during the disaster recovery period. Reference [41] developed a framework that combines a linear model with a deep learning model that captures the nonlinear spatial-temporal traffic flow phenomenon. It needs to be emphasized that the case study in this paper did not analyze the irregular data or long-term trends. In addition, [42] presented a new approach to predicting freeway travel time based on recurrent neural networks. Their model could be capable of dealing with spatial-temporal relationships implicitly. Furthermore, traditional neural network approaches for traffic flow estimation and prediction are usually single-task learning models, and there are some researchers focused on the multitask learning (MTL) method for traffic flow forecasting. Reference [43] highlight the multitask learning-based neural network method that improves generalization for traffic flow forecasting. Reference [44] incorporated multitask learning into its deep architecture and investigate homogeneous MTL and heterogeneous MTL for traffic flow prediction. Reference [45] proposed a deep learning-based multitask learning Gated Recurrent Units (MTL-GRU) method to improve the forecasting accuracy of traffic flow and speed.To learn time series with long time spans, long short-term memory (LSTM) neural networks have been effectively applied in short-term traffic flow prediction. Reference [46] applied LSTM to effectively capture nonlinear traffic dynamics using remote microwave sensor data collected for the Beijing network. Along this line, [47] proposed a deep and embedding learning approach to estimate and predict traffic flow characteristics. The model consists of an embedding component, a CNN component, and an LSTM component. Motivated by the success of CNNs and LSTMs, [48] proposed a spatiotemporal image-based convolutional networks approach to predict the network-wide traffic state. Reference [49] proposed a novel Spatio-Temporal Graph Convolutional Networks (STGCN) to enhance the time series prediction accuracy for multi-scale traffic networks. In addition, some other machine learning approaches have been developed for traffic flow prediction, such as Diffusion Convolutional Recurrent Neural Network (DCRNN) [50], Spatio-Temporal Attention-based Neural Network (STANN) [51], spatial-temporal graph convolutional network (ASTGCN) [52], spatiotemporal feature selection algorithm (STFSA) with CNN model [53].Compared with model-driven methods, data-driven methods do not require explicit theoretical assumptions, such as the fundamental diagram and partial differential equation. They cannot guarantee that the results will be physically feasible. In addition, data-driven approaches typically rely on relatively simple models and heavily rely on the amount and variety of data used for training. However, reliance on historical data means these methods could have worse results if there is irregular data or long-term trends. The computational cost of training and learning can be very high [3]. In addition, the process can be considered a black box, meaning inductive insights are difficult to obtain. Therefore, some traffic experts constantly criticize the data-driven method for understanding the building blocks of the models [54].


## 2.3. Hybrid of Traffic Flow Models and Neural Networks

In a congestion bottleneck or adverse weather conditions, driver behavior becomes more complex and nonlinear, which leads to new challenges in traffic state estimation. However, neither model-driven nor data-driven methods alone can estimate such complex behavior with an allowable level of accuracy. Therefore, to mitigate the limitations of the previous TSE approaches, many researchers have studied a lot of research combining the advantages of data-driven and model-driven to compensate for their weaknesses.A hybrid method could approximate the traffic states described by some traffic flow models in nonlinear differential equations and discover unknown model parameters using observed traffic data. It can improve the accuracy and explanation of model-driven or data-driven methods alone in traditional. However, many areas and questions still need to be explored in developing the hybrid method. The traffic flow model was first proposed in the deep learning method by [55, 56] to solve the TSE problem with the PDE feature. Moreover, [4] proposed a framework to solve nonlinear partial differential equations TSE problems. This problem has both a physics-informed neural network and a physics-uninformed neural network. Whereafter, [5] proposed a hybrid framework, a physics-informed deep learning model, to combine second-order traffic flow models and neural networks for the TSE. And they used experiments to demonstrate the proposed model in terms of data efficiency and estimation accuracy. Reference [15] presented a physics-informed deep learning method to improve the accuracy of the TSE problem. And they demonstrated the powerful capability of the model in utilizing limited data for real-time TSE. Reference [57] developed a hybrid model that integrates both linear regression models with a neural network layered by LSTM. They used this model to forecast the demand for taxi rides, and the results showed that this model could enhance the forecasting performance. Reference [58] proposed a kinematic wave-based deep CNN to estimate traffic speed dynamics. This method combines the advantages and mitigates the disadvantages of model-driven and data-driven approaches for TSE.


## 3. Methodology

### 3.1. Conceptual Illustration

It is critical for TSE to collect ample historical data. The recorded data is used to calibrate or identify traffic flow states in a model-driven method. Real-time information is collected at the moment when the traffic state is unknown. The conceptual illustration between traffic state estimation, real-time data, and historical data is shown in Figure1. By combining the long-term historical and real-time data could estimate the unknown traffic state between the two locationsFigure 1
Illustration of traffic state estimation considers the spatial-temporal correlation.


### 3.2. Model-Driven Method

The fundamental diagram (FD) appears in almost all traffic flow theories as it relates to the traffic state variables and contains remarkable information about traffic characteristics [59]. Some important traffic flow model parameters (free speed vf, critical density kc, critical speed vc, jam density kj, and capacity c) could influence the shape of the FD, especially in the undersaturated regime (A) and oversaturated regime (B). Figure 2 is the fundamental diagram with undersaturated and oversaturated conditions.Figure 2
The curve of speed-flow, flow-density, and speed-density relationships.In this paper, the model-driven adopted of a newS-shaped three-parameter (S3) traffic flow model [60] to estimate the relationships among three fundamental variables (i.e., flow, speed, and density). This traffic flow model could capture the flow-speed-density relationship simultaneously under all possible densities, especially at high densities.The S3 model has the following density-speed relationship, as shown in (1)(1)v=vf1+k/kcm2/m,where, vf is the free-flow speed and kc is the critical density. The term m is introduced to control the smoothness or flatness of the curves for different planes across the feasible range of traffic congestion conditions. q, k, and v are flow, density, and speed, respectively. According to the conservative law q=kv, we could derive the density-flow relationship, as shown in (2)(2)q=k⋅vf1+k/kcm2/m.Traffic flow models use empirical data from devices and develop hypotheses to calibrate and validate model parameters [34]. We could calibrate those key parameters vf,kc and m using observed multi-day speed and flow data.For the results to be scale-independent, we normalize the average flow and average density as follows:And then, we could derive the estimation traffic flow on a new day at the timeline, namely the estimated speedv^tfx,t and estimated flow q^tfx,t, as shown in (3) and (4):(3)v^tfx,t=vf1+kobsx,t/kcm2/m,(4)q^tfx,t=kobsx,t⋅vf1+kobsx,t/kcm2/m.For the results to be scale-independent, we normalize the flow data and speed data as follows(5)q˜x,t=qx,t−qminx,tqmaxx,t−qminx,t.(6)v˜x,t=vx,t−vminx,tvmaxx,t−vminx,t,qmaxx,t and qminx,t are the global maximum and minimum flow over all time indexes. Similarly, vmaxx,t and vminx,t are the global maximum and minimum speed over all time index.According to (5) and (6), we could normalize the observed flow data q˜obsx,t, the observed speed data v˜obsx,t, the estimated flow data q˜tfx,t by model-driven method, and the estimated speed data v˜tfx,t by model-driven method, respectively.Then we could calculate the error between the normalized observed data and normalized estimated data by the traffic flow model.(7)err1=q˜obsx,t−q˜tfx,t+v˜obsx,t−v˜tfx,t.The calibrated traffic flow model could accurately demonstrate the relationship among observed traffic state variables. The model-driven method could precisely estimate and predict traffic states in unobserved areas and provide a higher resolution of the estimated traffic flow state. The traffic flow relationship curve can be obtained by calibrating the selected traffic flow model using observed actual data from a loop detector, which can obtain explainable parameters. However, the robustness of the calibrated traffic flow model needs to be improved in the event of traffic accidents or adverse weather conditions.


### 3.3. Data-Driven Method

Another solution to improve the accuracy of traffic state estimation is the data-driven method. Instead of relying on the calibrated traffic flow models based on empirical or historical observed data, it applies the rapidly emerging machine learning techniques to recognize the relationship between traffic state variables. Based on the real-time input data, the data-driven method could capture the traffic flow pattern in a specific environment, such as congestion and peak periods. Therefore, the data-driven approach is expected to be more reliable when the measured traffic data is abnormal or missing.Deep learning is a subset learning method of machine learning techniques. Long short-term memory is an artificial recurrent neural network (RNN) architecture used in the deep learning area. It is a novel recurrent neural network architecture developed to capture the long-term temporal dependency for short-term travel speed or flow estimation and prediction. As the Long short-term memory recurrent neural network (LSTM) has been recommended by many existing works [6], especially for time series forecasting. Thus, LSTM was selected as the deep learning algorithm in the proposed model in the paper. A typical LSTM model consists of an input, output, forget, and external input gate. The structure of LSTM is shown in Figure 3.Figure 3
The structure of LSTM.The first step in the LSTM model is the forget gateft. It uses the sigmoid function δ to remove unnecessary information.(8)ft=δWff⋅ht−1+Wxf⋅xt−1+bf.The second step is the input gateit and external input gate gt. It then updates and decides the new information.(9)it=δWgg⋅ht−1+Wxg⋅xt−1+bg,gt=tanhWgg⋅ht−1+Wxg⋅xt−1+bg.The third step is mainly to update the old cell statest.(10)st=ft⋅ft+it⋅gt.The last step is the output gateot.(11)ot=δWoo⋅ht−1+Wxo⋅xt−1+bo,ht=ot⋅tanhst,δ denotes the standard logistics sigmoid function.(12)δx=11+e−x,where Wff, Wxf, Wgg, Wxg, Woo, Wxo is weight and bf, bg, bo is bias. ht, xt is variable, ⊗ denotes the Hadamard product.Before building the LSTM model, the parameters of the model should be determined. The parameters automatically adjusted by the model can be obtained through training and learning in model training without human intervention. The hyperparameters need to be set manually, including the number of input layers, the number of hidden layers in the network, the number of nodes in hidden layers, the number of output layers, activation function, loss function, optimization function, step size, iteration times, etc. The network structure of the LSTM model established in this paper includes one input layer, three hidden layers, and one output layer. In this study, the same data are used to test LSTM models with hidden layers 1, 2, and 3, respectively, and the model with the minimized error is selected by comparing the test results.Similarly, we used (5) and (6) to normalize the observed data and estimated data by the data-driven method. Then we could calculate the error between the normalized observed data and normalized estimated data by the LSTM model, as shown in (13)(13)err1=q˜obsx,t−q˜dlx,t+v˜obsx,t−v˜dlx,t,where, q˜dlx,t and v˜dlx,t are the normalized estimated flow and speed by the data-driven method. As previously mentioned, q˜obsx,t and v˜obsx,t are the normalized observed flow and observed speed data at location x in time t, respectively.


### 3.4. TFMDL-Based Traffic State Estimation Model

The traffic flow model could simulate the evolution of the traffic flow state, especially in particular circumstances like accidents or bad weather. We could obtain accurate and interpretable traffic state estimation results by calibrating the traffic flow model. In addition, considering the potential resource waste and privacy problems associated with the massive use of traffic data, traffic flow models can be used to minimize data utilization while achieving estimation accuracy. The neural network could improve the accuracy of data estimation, especially in the normal condition of good weather. The estimation and prediction results have high reliability [61]. Therefore, this paper proposes a hybrid model that could accurately estimate congestion duration on the bottleneck, the start and end times of congestion. It is suitable for specific weather and can also improve the real-time accuracy of traffic state estimation and prediction. When we derive the estimated data using different methods, we could use a hybrid stepwise modeling method to further improve the accuracy of TSE by incorporating the traffic flow model into the deep learning-based method (TFMDL). The flowchart of the hybrid method framework is shown in Figure 4. Algorithm 1 gives the algorithm framework of the proposed hybrid stepwise traffic state estimation framework.Figure 4
The framework of the proposed TFMDL structure.Algorithm 1: Implementation for building TFMDL-base TSE framework.
Step 1: Select multi-day data to calibrate the key parameters in the traffic flow model, and we could derive the calibrated traffic flow model, including the flow-speed curve, flow-density curve, and speed-density curve.Step 2: Using the calibrated model to estimate and predict the traffic flow state in an unobserved area (with partially observed data).Step 3: Calculate theerror 1 (model-driven error) between the observed and estimated value by the model-driven method.Step 4: Build a machine learning model and divide the data set into training and testing data sets.Step 5: Check if you have reached the maximum training threshold and return to Step 4 or step forward.Step 6: Calculateerror 2 (data-driven error) between the observed and estimated value by the data-driven method.Step 7: Calculate the total cost function with the TFMDL model.The total cost functionJ of TFMDL for traffic state estimation is calculated by the following (14):(14)J=α⋅Jtf+1−α⋅Jdl,where J is the total cost function, Jtf is cost from the model-driven method, and Jdl is cost from the data-driven method. The range of α is 0 or 1.


## 3.1. Conceptual Illustration

It is critical for TSE to collect ample historical data. The recorded data is used to calibrate or identify traffic flow states in a model-driven method. Real-time information is collected at the moment when the traffic state is unknown. The conceptual illustration between traffic state estimation, real-time data, and historical data is shown in Figure1. By combining the long-term historical and real-time data could estimate the unknown traffic state between the two locationsFigure 1
Illustration of traffic state estimation considers the spatial-temporal correlation.


## 3.2. Model-Driven Method

The fundamental diagram (FD) appears in almost all traffic flow theories as it relates to the traffic state variables and contains remarkable information about traffic characteristics [59]. Some important traffic flow model parameters (free speed vf, critical density kc, critical speed vc, jam density kj, and capacity c) could influence the shape of the FD, especially in the undersaturated regime (A) and oversaturated regime (B). Figure 2 is the fundamental diagram with undersaturated and oversaturated conditions.Figure 2
The curve of speed-flow, flow-density, and speed-density relationships.In this paper, the model-driven adopted of a newS-shaped three-parameter (S3) traffic flow model [60] to estimate the relationships among three fundamental variables (i.e., flow, speed, and density). This traffic flow model could capture the flow-speed-density relationship simultaneously under all possible densities, especially at high densities.The S3 model has the following density-speed relationship, as shown in (1)(1)v=vf1+k/kcm2/m,where, vf is the free-flow speed and kc is the critical density. The term m is introduced to control the smoothness or flatness of the curves for different planes across the feasible range of traffic congestion conditions. q, k, and v are flow, density, and speed, respectively. According to the conservative law q=kv, we could derive the density-flow relationship, as shown in (2)(2)q=k⋅vf1+k/kcm2/m.Traffic flow models use empirical data from devices and develop hypotheses to calibrate and validate model parameters [34]. We could calibrate those key parameters vf,kc and m using observed multi-day speed and flow data.For the results to be scale-independent, we normalize the average flow and average density as follows:And then, we could derive the estimation traffic flow on a new day at the timeline, namely the estimated speedv^tfx,t and estimated flow q^tfx,t, as shown in (3) and (4):(3)v^tfx,t=vf1+kobsx,t/kcm2/m,(4)q^tfx,t=kobsx,t⋅vf1+kobsx,t/kcm2/m.For the results to be scale-independent, we normalize the flow data and speed data as follows(5)q˜x,t=qx,t−qminx,tqmaxx,t−qminx,t.(6)v˜x,t=vx,t−vminx,tvmaxx,t−vminx,t,qmaxx,t and qminx,t are the global maximum and minimum flow over all time indexes. Similarly, vmaxx,t and vminx,t are the global maximum and minimum speed over all time index.According to (5) and (6), we could normalize the observed flow data q˜obsx,t, the observed speed data v˜obsx,t, the estimated flow data q˜tfx,t by model-driven method, and the estimated speed data v˜tfx,t by model-driven method, respectively.Then we could calculate the error between the normalized observed data and normalized estimated data by the traffic flow model.(7)err1=q˜obsx,t−q˜tfx,t+v˜obsx,t−v˜tfx,t.The calibrated traffic flow model could accurately demonstrate the relationship among observed traffic state variables. The model-driven method could precisely estimate and predict traffic states in unobserved areas and provide a higher resolution of the estimated traffic flow state. The traffic flow relationship curve can be obtained by calibrating the selected traffic flow model using observed actual data from a loop detector, which can obtain explainable parameters. However, the robustness of the calibrated traffic flow model needs to be improved in the event of traffic accidents or adverse weather conditions.


## 3.3. Data-Driven Method

Another solution to improve the accuracy of traffic state estimation is the data-driven method. Instead of relying on the calibrated traffic flow models based on empirical or historical observed data, it applies the rapidly emerging machine learning techniques to recognize the relationship between traffic state variables. Based on the real-time input data, the data-driven method could capture the traffic flow pattern in a specific environment, such as congestion and peak periods. Therefore, the data-driven approach is expected to be more reliable when the measured traffic data is abnormal or missing.Deep learning is a subset learning method of machine learning techniques. Long short-term memory is an artificial recurrent neural network (RNN) architecture used in the deep learning area. It is a novel recurrent neural network architecture developed to capture the long-term temporal dependency for short-term travel speed or flow estimation and prediction. As the Long short-term memory recurrent neural network (LSTM) has been recommended by many existing works [6], especially for time series forecasting. Thus, LSTM was selected as the deep learning algorithm in the proposed model in the paper. A typical LSTM model consists of an input, output, forget, and external input gate. The structure of LSTM is shown in Figure 3.Figure 3
The structure of LSTM.The first step in the LSTM model is the forget gateft. It uses the sigmoid function δ to remove unnecessary information.(8)ft=δWff⋅ht−1+Wxf⋅xt−1+bf.The second step is the input gateit and external input gate gt. It then updates and decides the new information.(9)it=δWgg⋅ht−1+Wxg⋅xt−1+bg,gt=tanhWgg⋅ht−1+Wxg⋅xt−1+bg.The third step is mainly to update the old cell statest.(10)st=ft⋅ft+it⋅gt.The last step is the output gateot.(11)ot=δWoo⋅ht−1+Wxo⋅xt−1+bo,ht=ot⋅tanhst,δ denotes the standard logistics sigmoid function.(12)δx=11+e−x,where Wff, Wxf, Wgg, Wxg, Woo, Wxo is weight and bf, bg, bo is bias. ht, xt is variable, ⊗ denotes the Hadamard product.Before building the LSTM model, the parameters of the model should be determined. The parameters automatically adjusted by the model can be obtained through training and learning in model training without human intervention. The hyperparameters need to be set manually, including the number of input layers, the number of hidden layers in the network, the number of nodes in hidden layers, the number of output layers, activation function, loss function, optimization function, step size, iteration times, etc. The network structure of the LSTM model established in this paper includes one input layer, three hidden layers, and one output layer. In this study, the same data are used to test LSTM models with hidden layers 1, 2, and 3, respectively, and the model with the minimized error is selected by comparing the test results.Similarly, we used (5) and (6) to normalize the observed data and estimated data by the data-driven method. Then we could calculate the error between the normalized observed data and normalized estimated data by the LSTM model, as shown in (13)(13)err1=q˜obsx,t−q˜dlx,t+v˜obsx,t−v˜dlx,t,where, q˜dlx,t and v˜dlx,t are the normalized estimated flow and speed by the data-driven method. As previously mentioned, q˜obsx,t and v˜obsx,t are the normalized observed flow and observed speed data at location x in time t, respectively.


## 3.4. TFMDL-Based Traffic State Estimation Model

The traffic flow model could simulate the evolution of the traffic flow state, especially in particular circumstances like accidents or bad weather. We could obtain accurate and interpretable traffic state estimation results by calibrating the traffic flow model. In addition, considering the potential resource waste and privacy problems associated with the massive use of traffic data, traffic flow models can be used to minimize data utilization while achieving estimation accuracy. The neural network could improve the accuracy of data estimation, especially in the normal condition of good weather. The estimation and prediction results have high reliability [61]. Therefore, this paper proposes a hybrid model that could accurately estimate congestion duration on the bottleneck, the start and end times of congestion. It is suitable for specific weather and can also improve the real-time accuracy of traffic state estimation and prediction. When we derive the estimated data using different methods, we could use a hybrid stepwise modeling method to further improve the accuracy of TSE by incorporating the traffic flow model into the deep learning-based method (TFMDL). The flowchart of the hybrid method framework is shown in Figure 4. Algorithm 1 gives the algorithm framework of the proposed hybrid stepwise traffic state estimation framework.Figure 4
The framework of the proposed TFMDL structure.Algorithm 1: Implementation for building TFMDL-base TSE framework.
Step 1: Select multi-day data to calibrate the key parameters in the traffic flow model, and we could derive the calibrated traffic flow model, including the flow-speed curve, flow-density curve, and speed-density curve.Step 2: Using the calibrated model to estimate and predict the traffic flow state in an unobserved area (with partially observed data).Step 3: Calculate theerror 1 (model-driven error) between the observed and estimated value by the model-driven method.Step 4: Build a machine learning model and divide the data set into training and testing data sets.Step 5: Check if you have reached the maximum training threshold and return to Step 4 or step forward.Step 6: Calculateerror 2 (data-driven error) between the observed and estimated value by the data-driven method.Step 7: Calculate the total cost function with the TFMDL model.The total cost functionJ of TFMDL for traffic state estimation is calculated by the following (14):(14)J=α⋅Jtf+1−α⋅Jdl,where J is the total cost function, Jtf is cost from the model-driven method, and Jdl is cost from the data-driven method. The range of α is 0 or 1.


## 4. Case Study

### 4.1. Data Description

The data collection site is the I-405 corridor in Los Angeles, the United States, with uninterrupted traffic flow, as shown in Figure5. There are nine detectors with absolute mileage (9.87–13.74) in July 2021 (0: 00–24: 00). It includes 31 days of data, including 27 days of training data and 4 days of testing data. The observed data includes traffic flow, speed, and occupancy. The detailed detector information is shown in Table 1.Figure 5
Data acquisition. (a) Freeway segment location. (b) Bottleneck identification.
(a)(b)Table 1
Descriptive information about detectors.
Detector IDAbsolute mileLength (mile)Number of lanes113.740.574213.510.234312.930.585412.620.315511.930.696611.370.566711.170.26810.670.5699.870.84


### 4.2. Evaluation for Estimation Results

The performance of evaluation criteria focuses on traditional measures that are scalable and quickly explained: mean squared error (MSE), root mean squared error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and R-square (R2). The definitions of them are shown as follows(15)MSE=1N∑x=1Nmeasuredx−estimatedx2,RMSE=∑x=1Nmeasuredx−estimatedx2N,MAE=1N∑x=1Nmeasuredx−estimatedx,MAPE=100%N∑x=1Nmeasuredx−estimatedxmeasuredx,R2=1−∑x=1Nmeasuredx−estimatedx2∑x=1Nmeasuredx−averagedx2,where measuredx is the measured traffic counts for x, estimatedx is the estimated traffic counts for x, averagedx is the average traffic counts for x, N is the total number of counts.


### 4.3. Estimated Flow and Speed by Traffic Flow Model

We use the traffic flow modelS3 to fit the measurement training data, and the fundamental diagram of the case data is shown in Figure 6. The calibrated key parameters of the traffic flow are shown in Table 2.Figure 6
Fundamental diagram in Los Angeles case. (a) flow-density relationship. (b) speed-flow relationship. (c) speed-density relationship.
(a)(b)(c)Table 2
Key parameters in the Los Angeles case.
Free-flow speed (km/hr)Critical speed (km/hr)Critical density (veh/km/ln)Ultimate capacity (veh/km/ln)m7052.483015744.8Then we could derive the estimated speed and flow by calibrated traffic flow model, as shown in (16) and (17).(16)v^tfx,t=701+kobsx,t/304.80.42,(17)q^tfx,t=kobsx,t⋅701+kobsx,t/304.80.42.


### 4.4. Estimated Flow and Speed by Machine Learning Model

The network structure of the LSTM model established in this paper includes one input layer, three hidden layers, and one output layer. The number of nodes of each hidden layer is 64, the optimization function is Adam, the excitation function is Sigmoid, and the number of iterations of each training is 100. This paper uses the same data to test LSTM models with the same parameters and hidden layers of 1, 2 and 3, respectively, for the selection of network layers. The comparison results are shown in Tables3 and 4. It can be seen that the LSTM model with a three-layer hidden layer has the best performance, which has fewer RMSE, MAE, and MAPE than other tests. The estimated flow and speed by the data-driven method in the Los Angeles case are shown in Figures 7 and 8, respectively.Table 3
Compare evaluation indicators in the machine learning model.
LayersRMSEMAEMAPEOne-layer109.6180.3110.75Two-layers107.3676.3410.69Three-layers105.8776.1910.38Table 4
Compare evaluation indicators in the machine learning model.
LayersRMSEMAEMAPEOne-layer4.282.115.16Two-layers4.061.914.92Three-layers3.851.854.51Figure 7
Estimated flow by the data-driven method in the Los Angeles case. (a) one-layer; (b) two-layer. (c) three-layer.
(a)(b)(c)Figure 8
Estimated speed by the data-driven method in the Los Angeles case. (a) one-layer. (b) two-layer. (c) three-layer.
(a)(b)(c)To determine the benefits of the proposed method, several benchmark models are also tested in the case study, and we provide more comparative analysis by referring to some literature [14, 62]. The benchmark algorithms include the LSTM model, k-Nearest Neighbor (KNN), ARIMA model, and Random Forest (RF). We further compare the observed data with estimated data by different methods, as shown in Tables 5 and 6. We could find that the proposed TFMDL framework is better than the other benchmark methods.Table 5
Compare evaluation indicators with different models using flow data.
MethodsMAERMSEMAPE (%)LSTM76.19105.8710.38KNN31.1944.698.94ARIMA32.8447.5210.85Random forest112.70156.259.91This paper41.9469.384.26Average58.9784.748.87Table 6
Compare evaluation indicators with different models using speed data.
MethodsMAERMSEMAPE (%)LSTM1.853.854.51KNN4.356.868.83ARIMA1.422.713.41Random forest13.1319.094.09This paper1.202.242.75Average4.396.954.72As shown in Table5 and 6, we could find that the proposed TFMDL framework has better performance than the other models. The findings can be summarized as follows:(1)
On the whole, the precision of the proposed method is slightly higher than the other methods, especially in estimating the state of traffic speed. The proposed model shows the best performance in MAE, RMSE, and MAPE, with values of 1.20, 2.24, and 2.75%, respectively.(2)
In terms of flow estimation, the proposed model shows the best performance in MAPE, with a value of 4.26%, while the KNN method performed well in MAE and RMSE, respectively.


### 4.5. Spatiotemporal Analysis of TFMDL

We further evaluate the average performance and stability of the proposed TFMDL framework, and Figure9 depicts the observed and estimated speed profiles on four days in spatiotemporal. The solid blue line indicates the prominent difference between the observation and the estimation. It shows the transition between the free-flow and the congested states. Reference [63] systematically analyze the spatiotemporal transition characteristics of traffic conditions near an on-ramp bottleneck. The accuracy of speed estimations on different days and for different absolute miles is shown in Table 7. Figure 10 shows the average comparison error in each location for four days. The findings can be summarized in Figures 9 and 10 Table 7 and by the following:(1)
The proposed framework could accurately estimate speed on all datasets. At absolute mile 12.93 on 07/31/2017, it has the lowest MAE (0.83 m/s), while at absolute mile 9.87 on 07/27/2017, it has the highest MAE (1.89 m/s). The average MAE of the dataset is all less than 1.8 m/s. In terms of MAPE, the average MAPE of the dataset are all less than 7%. Absolute mile 12.93 on 07/31/2017 has the lowest MAPE (1.87%), while absolute mile 10.67 on 07/26/2017 has the highest MAPE (10.54%).(2)
The proposed framework could accurately estimate speed in oversaturated conditions. It may depend mainly on the traffic flow model (S3), which could better fit real-world observations, particularly under high traffic density ranges. However, compared to datasets with oversaturated conditions (i.e., absolute miles 9.87, 10.67, and 11.17), better estimation results are observed on datasets with light traffic conditions (i.e., absolute miles 12.93 and 13.74). We could further analyze whether model-driven or data-driven approaches occupy a more significant proportion during congestion period estimation in Section 4.6.(3)
This framework could capture the state of traffic congestion and noncongestion conditions, and we could obtain the start time of congestion and the end time of congestion. Obviously, the estimation effect is significantly better in the noncongestion period (i.e., green in the figure) and slightly worse in the congestion period (i.e., yellow and red in the figure).(4)
It is observed that, compared to observed speed profiles, the estimated speed profiles look not smooth enough, and we can find some sharp speed changes. The main reason may be related to the parameterα in equation (14) only selecting integer values of 0 or 1. Considering the decimal value of the parameter α is expected to improve the estimation performance under congested traffic conditions, and it is also the further work of this study.(5)
As shown in Figure10, the estimated average error on 07/31/2017 is the lowest, and the estimated average error on 07/28/2017 is the highest. Combining the last four Figures 9(e)–9(h) in Figure 9, we could find that this is probably related to the overall congestion range. It is obvious that the spatiotemporal congestion on 07/28/2017 is on a much larger scale than the other days.Figure 9
Comparison speed between observations and estimations on different days. (a) Speed observations on 07/26/2017, (b) Speed estimations on 07/26/2017, (c) Speed observations on 07/27/2017, (d) Speed estimations on 07/27/2017, (e) Speed observations on 07/28/2017, (f) Speed estimations on 07/28/2017, (g) Speed observations on 07/31/2017, and (h) Speed estimations on 07/31/2017.
(a)(b)(c)(d)(e)(f)(g)(h)Table 7
Comparison error between observations and estimations on different days on different absolute mile.
07/26/201707/27/201707/28/201707/31/2017Absolute mileMAE/MAPEMAE/MAPEMAE/MAPEMAE/MAPE13.741.62/5.241.56/4.231.55/4.780.95/2.1913.511.71/5.731.64/4.611.65/5.681.07/2.5812.931.68/5.131.40/3.361.70/4.820.83/1.8712.621.60/5.591.83/5.391.88/5.721.14/2.5211.931.66/4.701.40/3.411.77/4.721.17/2.4111.371.37/5.811.24/4.591.72/6.931.01/3.2611.171.73/7.981.39/4.711.67/5.651.29/3.6310.671.52/10.541.60/8.331.70/8.881.26/4.599.871.82/9.191.89/7.251.87/8.251.58/4.35Average1.63/6.661.55/5.101.72/6.161.14/3.04Figure 10
Comparison of average error in each location within four days in all day.


### 4.6. Model-Driven and Data-Driven Proportion Analysis

According to Figure9, we could find that the congestion duration is 12:00 am 8:00 pm. Therefore, we further analyze the proportion of model-driven and data-driven in our proposed TFMDL framework all day (as shown in Figure 11) and during the peak period (as shown in Figure 12). The corresponding proportion analysis of model-driven and data-driven methods is shown in Tables 8 and 9, respectively. The following findings can be summarized in Figures 11 and 12, Tables 8 and 9.(1)
In all-day analysis, the estimated data by model-driven and data-driven proportions are almost identical, as shown in Figures11(a)–11(c), while on 31/07/2017, as shown in Figure 11(d), the proportion of data-driven is more significant than the data estimated by model-driven.(2)
When we analyze the estimation data during the peak period (12: 00 am–8:00 pm), it is obvious that the data estimated by the model-driven method is larger than the data-driven method. However, one of the exceptions is the data on 31/07/2017. The estimated data by model-driven and data-driven proportions are almost identical.(3)
According to Tables8 and 9, we can find that the proportion of model-driven estimated data during the peak period is significantly higher than the data-driven method. Therefore, we could conclude that the model-driven could better capture the congested traffic flow with fewer data points. Furthermore, the mode-driven method could better explain the traffic flow dynamics, especially during the congestion period. On the contrary, the data-driven approach infers traffic states based on historical data and a lack of accurate estimates of congestion periods.Figure 11
Comparison of speed estimation between model-driven and data-driven in all days. (a) Comparison estimation on 07/26/2017, (b) Comparison estimations on 07/27/2017, (c) Comparison estimation on 07/28/2017, and (d) Comparison estimations on 07/31/2017.
(a)(b)(c)(d)Figure 12
Comparison of speed estimation between model-driven and data-driven in the peak period. (a) Comparison estimation on 07/26/2017, (b) Comparison estimations on 07/27/2017, (c) Comparison estimation on 07/28/2017, and (d) Comparison estimations on 07/31/2017.
(a)(b)(c)(d)Table 8
Compare account for estimation between model-driven and data-driven in all-day.
07/26/201707/27/201707/28/201707/31/2017Absolute mileModel-drivenData-drivenModel-drivenData-drivenModel-drivenData-drivenModel-drivenData-driven13.740.570.430.470.530.510.490.400.6013.510.600.400.480.520.510.490.480.5212.930.660.340.510.490.550.450.380.6212.620.730.270.740.260.760.240.090.9111.930.470.530.360.640.410.590.360.6411.370.630.370.530.470.600.400.360.6411.170.780.220.610.390.610.390.500.5010.670.630.380.450.550.530.470.340.669.870.510.490.280.720.440.560.280.72Average0.620.380.490.510.550.450.350.65Table 9
Compare accounts for estimation between model-driven and data-driven in the peak period.
07/26/201707/27/201707/28/201707/31/2017Absolute mileModel-drivenData-drivenModel-drivenData-drivenModel-drivenData-drivenModel-drivenData-driven13.740.790.210.760.240.900.100.510.4913.510.840.160.700.300.900.100.530.4712.930.840.160.810.190.940.060.490.5112.620.990.010.900.101.000.000.190.8111.930.580.420.440.560.670.330.450.5511.370.840.160.640.360.940.060.340.6611.170.950.050.700.300.770.230.590.4110.670.820.180.530.470.740.260.300.709.870.790.210.460.540.690.310.280.72Average0.830.170.660.340.840.160.410.59


## 4.1. Data Description

The data collection site is the I-405 corridor in Los Angeles, the United States, with uninterrupted traffic flow, as shown in Figure5. There are nine detectors with absolute mileage (9.87–13.74) in July 2021 (0: 00–24: 00). It includes 31 days of data, including 27 days of training data and 4 days of testing data. The observed data includes traffic flow, speed, and occupancy. The detailed detector information is shown in Table 1.Figure 5
Data acquisition. (a) Freeway segment location. (b) Bottleneck identification.
(a)(b)Table 1
Descriptive information about detectors.
Detector IDAbsolute mileLength (mile)Number of lanes113.740.574213.510.234312.930.585412.620.315511.930.696611.370.566711.170.26810.670.5699.870.84


## 4.2. Evaluation for Estimation Results

The performance of evaluation criteria focuses on traditional measures that are scalable and quickly explained: mean squared error (MSE), root mean squared error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and R-square (R2). The definitions of them are shown as follows(15)MSE=1N∑x=1Nmeasuredx−estimatedx2,RMSE=∑x=1Nmeasuredx−estimatedx2N,MAE=1N∑x=1Nmeasuredx−estimatedx,MAPE=100%N∑x=1Nmeasuredx−estimatedxmeasuredx,R2=1−∑x=1Nmeasuredx−estimatedx2∑x=1Nmeasuredx−averagedx2,where measuredx is the measured traffic counts for x, estimatedx is the estimated traffic counts for x, averagedx is the average traffic counts for x, N is the total number of counts.


## 4.3. Estimated Flow and Speed by Traffic Flow Model

We use the traffic flow modelS3 to fit the measurement training data, and the fundamental diagram of the case data is shown in Figure 6. The calibrated key parameters of the traffic flow are shown in Table 2.Figure 6
Fundamental diagram in Los Angeles case. (a) flow-density relationship. (b) speed-flow relationship. (c) speed-density relationship.
(a)(b)(c)Table 2
Key parameters in the Los Angeles case.
Free-flow speed (km/hr)Critical speed (km/hr)Critical density (veh/km/ln)Ultimate capacity (veh/km/ln)m7052.483015744.8Then we could derive the estimated speed and flow by calibrated traffic flow model, as shown in (16) and (17).(16)v^tfx,t=701+kobsx,t/304.80.42,(17)q^tfx,t=kobsx,t⋅701+kobsx,t/304.80.42.


## 4.4. Estimated Flow and Speed by Machine Learning Model

The network structure of the LSTM model established in this paper includes one input layer, three hidden layers, and one output layer. The number of nodes of each hidden layer is 64, the optimization function is Adam, the excitation function is Sigmoid, and the number of iterations of each training is 100. This paper uses the same data to test LSTM models with the same parameters and hidden layers of 1, 2 and 3, respectively, for the selection of network layers. The comparison results are shown in Tables3 and 4. It can be seen that the LSTM model with a three-layer hidden layer has the best performance, which has fewer RMSE, MAE, and MAPE than other tests. The estimated flow and speed by the data-driven method in the Los Angeles case are shown in Figures 7 and 8, respectively.Table 3
Compare evaluation indicators in the machine learning model.
LayersRMSEMAEMAPEOne-layer109.6180.3110.75Two-layers107.3676.3410.69Three-layers105.8776.1910.38Table 4
Compare evaluation indicators in the machine learning model.
LayersRMSEMAEMAPEOne-layer4.282.115.16Two-layers4.061.914.92Three-layers3.851.854.51Figure 7
Estimated flow by the data-driven method in the Los Angeles case. (a) one-layer; (b) two-layer. (c) three-layer.
(a)(b)(c)Figure 8
Estimated speed by the data-driven method in the Los Angeles case. (a) one-layer. (b) two-layer. (c) three-layer.
(a)(b)(c)To determine the benefits of the proposed method, several benchmark models are also tested in the case study, and we provide more comparative analysis by referring to some literature [14, 62]. The benchmark algorithms include the LSTM model, k-Nearest Neighbor (KNN), ARIMA model, and Random Forest (RF). We further compare the observed data with estimated data by different methods, as shown in Tables 5 and 6. We could find that the proposed TFMDL framework is better than the other benchmark methods.Table 5
Compare evaluation indicators with different models using flow data.
MethodsMAERMSEMAPE (%)LSTM76.19105.8710.38KNN31.1944.698.94ARIMA32.8447.5210.85Random forest112.70156.259.91This paper41.9469.384.26Average58.9784.748.87Table 6
Compare evaluation indicators with different models using speed data.
MethodsMAERMSEMAPE (%)LSTM1.853.854.51KNN4.356.868.83ARIMA1.422.713.41Random forest13.1319.094.09This paper1.202.242.75Average4.396.954.72As shown in Table5 and 6, we could find that the proposed TFMDL framework has better performance than the other models. The findings can be summarized as follows:(1)
On the whole, the precision of the proposed method is slightly higher than the other methods, especially in estimating the state of traffic speed. The proposed model shows the best performance in MAE, RMSE, and MAPE, with values of 1.20, 2.24, and 2.75%, respectively.(2)
In terms of flow estimation, the proposed model shows the best performance in MAPE, with a value of 4.26%, while the KNN method performed well in MAE and RMSE, respectively.


## 4.5. Spatiotemporal Analysis of TFMDL

We further evaluate the average performance and stability of the proposed TFMDL framework, and Figure9 depicts the observed and estimated speed profiles on four days in spatiotemporal. The solid blue line indicates the prominent difference between the observation and the estimation. It shows the transition between the free-flow and the congested states. Reference [63] systematically analyze the spatiotemporal transition characteristics of traffic conditions near an on-ramp bottleneck. The accuracy of speed estimations on different days and for different absolute miles is shown in Table 7. Figure 10 shows the average comparison error in each location for four days. The findings can be summarized in Figures 9 and 10 Table 7 and by the following:(1)
The proposed framework could accurately estimate speed on all datasets. At absolute mile 12.93 on 07/31/2017, it has the lowest MAE (0.83 m/s), while at absolute mile 9.87 on 07/27/2017, it has the highest MAE (1.89 m/s). The average MAE of the dataset is all less than 1.8 m/s. In terms of MAPE, the average MAPE of the dataset are all less than 7%. Absolute mile 12.93 on 07/31/2017 has the lowest MAPE (1.87%), while absolute mile 10.67 on 07/26/2017 has the highest MAPE (10.54%).(2)
The proposed framework could accurately estimate speed in oversaturated conditions. It may depend mainly on the traffic flow model (S3), which could better fit real-world observations, particularly under high traffic density ranges. However, compared to datasets with oversaturated conditions (i.e., absolute miles 9.87, 10.67, and 11.17), better estimation results are observed on datasets with light traffic conditions (i.e., absolute miles 12.93 and 13.74). We could further analyze whether model-driven or data-driven approaches occupy a more significant proportion during congestion period estimation in Section 4.6.(3)
This framework could capture the state of traffic congestion and noncongestion conditions, and we could obtain the start time of congestion and the end time of congestion. Obviously, the estimation effect is significantly better in the noncongestion period (i.e., green in the figure) and slightly worse in the congestion period (i.e., yellow and red in the figure).(4)
It is observed that, compared to observed speed profiles, the estimated speed profiles look not smooth enough, and we can find some sharp speed changes. The main reason may be related to the parameterα in equation (14) only selecting integer values of 0 or 1. Considering the decimal value of the parameter α is expected to improve the estimation performance under congested traffic conditions, and it is also the further work of this study.(5)
As shown in Figure10, the estimated average error on 07/31/2017 is the lowest, and the estimated average error on 07/28/2017 is the highest. Combining the last four Figures 9(e)–9(h) in Figure 9, we could find that this is probably related to the overall congestion range. It is obvious that the spatiotemporal congestion on 07/28/2017 is on a much larger scale than the other days.Figure 9
Comparison speed between observations and estimations on different days. (a) Speed observations on 07/26/2017, (b) Speed estimations on 07/26/2017, (c) Speed observations on 07/27/2017, (d) Speed estimations on 07/27/2017, (e) Speed observations on 07/28/2017, (f) Speed estimations on 07/28/2017, (g) Speed observations on 07/31/2017, and (h) Speed estimations on 07/31/2017.
(a)(b)(c)(d)(e)(f)(g)(h)Table 7
Comparison error between observations and estimations on different days on different absolute mile.
07/26/201707/27/201707/28/201707/31/2017Absolute mileMAE/MAPEMAE/MAPEMAE/MAPEMAE/MAPE13.741.62/5.241.56/4.231.55/4.780.95/2.1913.511.71/5.731.64/4.611.65/5.681.07/2.5812.931.68/5.131.40/3.361.70/4.820.83/1.8712.621.60/5.591.83/5.391.88/5.721.14/2.5211.931.66/4.701.40/3.411.77/4.721.17/2.4111.371.37/5.811.24/4.591.72/6.931.01/3.2611.171.73/7.981.39/4.711.67/5.651.29/3.6310.671.52/10.541.60/8.331.70/8.881.26/4.599.871.82/9.191.89/7.251.87/8.251.58/4.35Average1.63/6.661.55/5.101.72/6.161.14/3.04Figure 10
Comparison of average error in each location within four days in all day.


## 4.6. Model-Driven and Data-Driven Proportion Analysis

According to Figure9, we could find that the congestion duration is 12:00 am 8:00 pm. Therefore, we further analyze the proportion of model-driven and data-driven in our proposed TFMDL framework all day (as shown in Figure 11) and during the peak period (as shown in Figure 12). The corresponding proportion analysis of model-driven and data-driven methods is shown in Tables 8 and 9, respectively. The following findings can be summarized in Figures 11 and 12, Tables 8 and 9.(1)
In all-day analysis, the estimated data by model-driven and data-driven proportions are almost identical, as shown in Figures11(a)–11(c), while on 31/07/2017, as shown in Figure 11(d), the proportion of data-driven is more significant than the data estimated by model-driven.(2)
When we analyze the estimation data during the peak period (12: 00 am–8:00 pm), it is obvious that the data estimated by the model-driven method is larger than the data-driven method. However, one of the exceptions is the data on 31/07/2017. The estimated data by model-driven and data-driven proportions are almost identical.(3)
According to Tables8 and 9, we can find that the proportion of model-driven estimated data during the peak period is significantly higher than the data-driven method. Therefore, we could conclude that the model-driven could better capture the congested traffic flow with fewer data points. Furthermore, the mode-driven method could better explain the traffic flow dynamics, especially during the congestion period. On the contrary, the data-driven approach infers traffic states based on historical data and a lack of accurate estimates of congestion periods.Figure 11
Comparison of speed estimation between model-driven and data-driven in all days. (a) Comparison estimation on 07/26/2017, (b) Comparison estimations on 07/27/2017, (c) Comparison estimation on 07/28/2017, and (d) Comparison estimations on 07/31/2017.
(a)(b)(c)(d)Figure 12
Comparison of speed estimation between model-driven and data-driven in the peak period. (a) Comparison estimation on 07/26/2017, (b) Comparison estimations on 07/27/2017, (c) Comparison estimation on 07/28/2017, and (d) Comparison estimations on 07/31/2017.
(a)(b)(c)(d)Table 8
Compare account for estimation between model-driven and data-driven in all-day.
07/26/201707/27/201707/28/201707/31/2017Absolute mileModel-drivenData-drivenModel-drivenData-drivenModel-drivenData-drivenModel-drivenData-driven13.740.570.430.470.530.510.490.400.6013.510.600.400.480.520.510.490.480.5212.930.660.340.510.490.550.450.380.6212.620.730.270.740.260.760.240.090.9111.930.470.530.360.640.410.590.360.6411.370.630.370.530.470.600.400.360.6411.170.780.220.610.390.610.390.500.5010.670.630.380.450.550.530.470.340.669.870.510.490.280.720.440.560.280.72Average0.620.380.490.510.550.450.350.65Table 9
Compare accounts for estimation between model-driven and data-driven in the peak period.
07/26/201707/27/201707/28/201707/31/2017Absolute mileModel-drivenData-drivenModel-drivenData-drivenModel-drivenData-drivenModel-drivenData-driven13.740.790.210.760.240.900.100.510.4913.510.840.160.700.300.900.100.530.4712.930.840.160.810.190.940.060.490.5112.620.990.010.900.101.000.000.190.8111.930.580.420.440.560.670.330.450.5511.370.840.160.640.360.940.060.340.6611.170.950.050.700.300.770.230.590.4110.670.820.180.530.470.740.260.300.709.870.790.210.460.540.690.310.280.72Average0.830.170.660.340.840.160.410.59


## 5. Conclusion and Future Work

Traffic flow estimation and forecasting is a critical problem in transportation planning. In this paper, we proposed a hybrid framework incorporating model-driven and data-driven methods for traffic state estimation. The results of numerical experiments based on real-world datasets demonstrate the effectiveness of the proposed framework. Experiments in the real-world show that the proposed TFMDL framework could improve performance better than model-driven or data-driven methods alone in terms of estimation accuracy and data efficiency. Meanwhile, this hybrid stepwise modeling framework could better capture dynamic traffic flow states during congestion conditions.The study focuses on traffic speed and flow estimation and prediction, but a comprehensive traffic state estimation and prediction, which includes travel time and queue length, would have more significance for passengers. Therefore, the future work of this study includes: (1) trying to consider the relations among different formats of traffic data and then building a multiple input/output traffic framework to output a comprehensive traffic state estimation and prediction result. (2) embedding queue models in the proposed framework to improve the performance under oversaturated traffic conditions. (3) considering the dynamic value of a parameterα is expected to improve the estimation performance under different traffic conditions.



---

*Source: 5926663-2022-11-04.xml*