# A Mesoscopic Traffic Data Assimilation Framework for Vehicle Density Estimation on Urban Traffic Networks Based on Particle Filters

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Mesoscopic Urban Traffic Model in the DEVS Formalism

#### 2.1. The Coupled DEVS Model of the Urban Traffic System

- source model A, which randomly generates platoons of vehicles according to the traffic arrival flow and sends them into the urban traffic network;
- segment model M, which represents either a section of road links S or a preselection lane P at the entrance of a intersection and describes the movement of vehicle platoons on it;
- assignment model D, which randomly assigns platoons that will enter an intersection to the preselection lanes according to the given turning probabilities;
- intersection model I, which imitates the behavior of a physical intersection in urban traffic networks and transfers platoons from the preselection lanes at entrance points to the exit links;
- traffic light model L, which sends index signals to an intersection model to switch the phase of traffic light periodically. In our study, the fixed-time traffic light control is employed;
- sink model B, which serves as the destination of vehicles and records information of platoons leaving the network under study.

- $platoon$ message, representing a group of vehicles traveling together with the same speed (i.e., the platoon of vehicles). The $platoon$ message is characterized by variables (${T}_{head}$, ${P}_{size}$), indicating the time instant when the head of the platoon arrives at the entrance boundary of the current segment/intersection and the number of vehicles within the platoon respectively;
- $exit$ message, used to block ($exit=0$) or free ($exit=1$) the exit boundaries of segment models (maybe via an intersection model);
- $revise$ message, used to revise the number of vehicles on the downstream segment when a platoon is split by the red traffic light. The $platoon$ messages and $revise$ messages are transmitted to a segment model via the same port. A $revise$ message consists of variables ($fla{g}_{r}$, ${N}_{r}$), where $fla{g}_{r}$ is used to distinguish the $revise$ message from the $platoon$ message (for example, $fla{g}_{r}=-1$ when ${T}_{head}\ge 0$ in $platoon$ messages are assured in a simulation) and ${N}_{r}$ indicates the number of vehicles failing to cross the stop line.
- $phase\_index$ message, which indexes the phase of the traffic light and is sent to an intersection model by a traffic light model;

#### 2.2. Key Atomic Components of the Urban Traffic System

#### 2.2.1. Source Model

#### 2.2.2. Segment Model

- $empty$, which indicates there is no vehicle on the segment (i.e., $vn=0$);
- $approach$, which indicates the first platoon in $platoonList$ is approaching the exit boundary of the segment;
- $cross$, which indicates the first platoon in $platoonList$ is crossing the exit boundary of the segment;
- $blocked$, which indicates the head of the first platoon in $platoonList$ has arrived at the blocked exit boundary and the segment can contain all the vehicles in $platoonList$;
- $blocked\_in$, which indicates the head of the first platoon in $platoonList$ has arrived at the blocked exit boundary and the last platoon in $platoonList$ is entering and will totally occupy the segment;
- $blocked\_full$, which indicates the exit boundary of the segment is blocked and the segment is totally occupied by vehicles;
- $transient\_p$, which is a transient phase with 0 time duration. The segment model moves to $transient\_p$ in order to output a $platoon$ message;
- $transient\_e$, which is also a transient phase. The segment model moves to $transient\_e$ in order to output an $exit$ message.

#### 2.2.3. Intersection Model

- $ODMap$, which maps a preselection lane in $Ent$ to an exit segment in $Ext$.
- $DOMap$, which maps an exit segment in $Ext$ to several preselection lanes in $Ent$.
- $TLPhases$, which contains all phases of the traffic light in an intersection. The phase of the traffic light is represented by a subset of $Ent$ (i.e., $TLPhases\left(i\right)\subset Ent$, where i is the index of the phase), which lists the preselection lanes for which the traffic light is green.

## 3. Data Assimilation Framework for Vehicle Density Estimation Based on Particle Filters

#### 3.1. The Evolution of Traffic State

#### 3.2. Measurement Model

- detection accuracy p, representing the probability that a vehicle passage is detected by a sensor successfully. Consequently, the probability of a missed detection is $1-p$.
- occurrence rate of false detection $\lambda $, indicating the number of false detections occurring in an unit time interval, which is assumed to be Poisson distributed.

#### 3.3. Vehicle Density Estimation Using Particle Filters

#### 3.3.1. Principles of Particle Filters

- augment each particle ${s}_{0:k-1}^{i}$ with sample ${s}_{k}^{i}\sim q\left({s}_{k}\right|{s}_{0:k-1}^{i},{m}_{1:k})$ to form ${s}_{0:k}^{i}\sim q\left({s}_{0:k}\right|{m}_{1:k})$, where $q\left({s}_{0:k}\right|{m}_{1:k})=q\left({s}_{k}\right|{s}_{0:k-1},{m}_{1:k})q\left({s}_{0:k-1}\right|{m}_{1:k-1})$;
- update weights by$${w}_{k}^{i}=\frac{p\left({s}_{0:k}^{i}\right|{m}_{1:k})}{q\left({s}_{0:k}^{i}\right|{m}_{1:k})}\propto \frac{p\left({m}_{k}\right|{s}_{0:k}^{i})p\left({s}_{k}^{i}\right|{s}_{0:k-1}^{i})p\left({s}_{0:k-1}^{i}\right|{m}_{1:k-1})}{q\left({s}_{k}^{i}\right|{s}_{0:k-1}^{i},{m}_{1:k})q\left({s}_{0:k-1}^{i}\right|{m}_{1:k-1})}=\frac{p\left({m}_{k}\right|{s}_{k}^{i})p\left({s}_{k}^{i}\right|{s}_{k-1}^{i})}{q\left({s}_{k}^{i}\right|{s}_{0:k-1}^{i},{m}_{1:k})}{w}_{k-1}^{i}.$$

#### 3.3.2. Particle Filtering for Vehicle Density Estimation

Algorithm 1: The particle filter for vehicle density estimation |

- Sampling step: for each particle, we run the mesoscopic traffic simulation for $\Delta T$, the particle is updated and the state trajectory over this interval is recorded. Then, the particle’s weight is calculated based on (noisy) newly available passage times and the recorded state trajectory (the method of weight computation is depicted in Section 3.3.3). After all particles are updated, the normalization of the weights is performed to prepare for resampling (lines 8–15).
- Output step: we obtain the estimated vehicle densities (i.e., the number of vehicles on segments) from the state of the particle with the highest weight (lines 16–17). The number of vehicles on a segment is calculated by excluding the vehicles which have not entered or have left the segment from $vn$, and the detailed process is illustrated in Algorithm 2.
- Resampling step: we resample the newly generated particles by replicating particles in proportion to their weights (lines 18–27).

Algorithm 2: Calculating the number of vehicles on segments based on the traffic state |

#### 3.3.3. Weight Computation

## 4. Experiments

#### 4.1. Experimental Design

#### 4.2. Evaluation Criteria

^{−1}, and 1000 particles are employed in the data assimilation system. The goal of our experiments is twofold: we intend to show that the filtered results are more accurate than the simulated results when compared with the ground truth, and we want to explore whether the filtered results can estimate the ground truth accurately.

#### 4.3. Experimental Results

#### 4.3.1. Test Case 1

#### 4.3.2. Test Case 2

#### 4.4. Sensitivity Analysis

#### 4.4.1. Effect of Measurement Data Quality

^{−1}) are selected as the baseline. When varying p, we remain $\lambda $ = 1/300 s

^{−1}; when varying $\lambda $, we keep $p=0.9$. The results are shown in Figure 7a,b, respectively. Coinciding with our expectations, in both cases, the data assimilation performance deteriorates as the data quality becomes worse. However, even when the detection accuracy falls to $0.6$ or the false rate increases to 1/60 s

^{−1}, the performance is still better than that of the estimation results without data assimilation (in test case 1 and case 2, the $\overline{RMSE}$ of the estimation results without data assimilation are 1.86 and 2.15, respectively), which indicates the robustness of this framework to measurement data errors.

#### 4.4.2. Effect of the Number of Particles

^{−1}in both cases and vary the number of particles used in the algorithm from 100 to 2000. The results are displayed in Figure 8a. From the figure, we can see that, as the number of particles increases from 100 to 2000, the $\overline{RMSE}$ error decreases in both cases. The more particles used, the better the performance. However, we note that the decrease of $\overline{RMSE}$ error is not proportional to the increase of the number of particles. Figure 8b shows the increased percentage of $\overline{RMSE}$ error relative to that at 1000 particles (i.e., ($\overline{RMSE}/\overline{RMSE}({N}_{p}=1000)-1)$). The plot tells that a reduction from 1000 to 100 leads to an increase of about 5.6% (6.54% in case 1, 4.83% in case 2) of the error measure, while doubling the number of particles improves the performance about 1.6% (1.44% in case 1, 1.84% in case 2).

## 5. Conclusions

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## References

- Hao, Z.; Boel, R.; Li, Z. Model based urban traffic control, part I: Local model and local model predictive controllers. Transp. Res. Part C Emerg. Technol.
**2018**, 97, 61–81. [Google Scholar] [CrossRef] - Cassidy, M.J.; Rudjanakanoknad, J. Increasing the capacity of an isolated merge by metering its on-ramp. Transp. Res. Part B Methodol.
**2005**, 39, 896–913. [Google Scholar] [CrossRef] - Smulders, S. Control of freeway traffic flow by variable speed signs. Transp. Res. Part B Methodol.
**1990**, 24, 111–132. [Google Scholar] [CrossRef] - Wang, S.; Djahel, S.; Zhang, Z.; McManis, J. Next road rerouting: A multiagent system for mitigating unexpected urban traffic congestion. IEEE Trans. Intell. Transp. Syst.
**2016**, 17, 2888–2899. [Google Scholar] [CrossRef] - Seo, T.; Bayen, A.M.; Kusakabe, T.; Asakura, Y. Traffic state estimation on highway: A comprehensive survey. Annu. Rev. Control
**2017**, 43, 128–151. [Google Scholar] [CrossRef] - Barceló, J. Fundamentals of Traffic Simulation; Springer: Berlin, Germany, 2010; Volume 145. [Google Scholar]
- Ciuffo, B.; Punzo, V.; Montanino, M. Global sensitivity analysis techniques to simplify the calibration of traffic simulation models. Methodology and application to the IDM car-following model. IET Intell. Transp. Syst.
**2014**, 8, 479–489. [Google Scholar] [CrossRef] - Lee, J.B.; Ozbay, K. New calibration methodology for microscopic traffic simulation using enhanced simultaneous perturbation stochastic approximation approach. Transp. Res. Rec.
**2009**, 2124, 233–240. [Google Scholar] [CrossRef] - Lemarchand, A.; Koenig, D.; Martinez, J.J. Robust design of a switched pi controller for an uncertain traffic model. In Proceedings of the 2010 49th IEEE Conference on Decision and Control (CDC), Atlanta, GA, USA, 15–17 December 2010; pp. 2149–2154. [Google Scholar]
- Jia, A.; Zhou, X.; Li, M.; Rouphail, N.M.; Williams, B.M. Incorporating stochastic road capacity into day-to-day traffic simulation and traveler learning framework: Model development and case study. Transp. Res. Rec.
**2011**, 2254, 112–121. [Google Scholar] [CrossRef] - Nichols, N. Data assimilation: Aims and basic concepts. In Data Assimilation for the Earth System; Springer: Berlin, Germany, 2003; pp. 9–20. [Google Scholar]
- Lahoz, W.; Ménard, R.; Zeigler, B.P.; Kim, T.G.; Praehofer, H. Data Assimilation: Making Sense of Observations; Springer: Berlin, Germany, 2010. [Google Scholar]
- Navon, I.M. Data assimilation for numerical weather prediction: A review. In Data Assimilation for Atmospheric, Oceanic and Hydrologic Applications; Springer: Berlin, Germany, 2009; pp. 21–65. [Google Scholar]
- Carton, J.A.; Giese, B.S. A reanalysis of ocean climate using Simple Ocean Data Assimilation (SODA). Mon. Weather Rev.
**2008**, 136, 2999–3017. [Google Scholar] [CrossRef] - Reichle, R.H.; McLaughlin, D.B.; Entekhabi, D. Hydrologic data assimilation with the ensemble Kalman filter. Mon. Weather Rev.
**2002**, 130, 103–114. [Google Scholar] [CrossRef] - Yuan, Y.; Van Lint, J.; Wilson, R.E.; van Wageningen-Kessels, F.; Hoogendoorn, S.P. Real-time Lagrangian traffic state estimator for freeways. IEEE Trans. Intell. Transp. Syst.
**2012**, 13, 59–70. [Google Scholar] [CrossRef] - Yuan, Y.; Van Lint, H.; Van Wageningen-Kessels, F.; Hoogendoorn, S. Network-wide traffic state estimation using loop detector and floating car data. J. Intell. Transp. Syst.
**2014**, 18, 41–50. [Google Scholar] [CrossRef] - Daganzo, C.F. The cell transmission model: A dynamic representation of highway traffic consistent with the hydrodynamic theory. Transp. Res. Part B Methodol.
**1994**, 28, 269–287. [Google Scholar] [CrossRef] - Blandin, S.; Couque, A.; Bayen, A.; Work, D. On sequential data assimilation for scalar macroscopic traffic flow models. Phys. D Nonlinear Phenom.
**2012**, 241, 1421–1440. [Google Scholar] [CrossRef] - Thai, J.; Bayen, A.M. State estimation for polyhedral hybrid systems and applications to the Godunov scheme for highway traffic estimation. IEEE Trans. Autom. Control
**2015**, 60, 311–326. [Google Scholar] [CrossRef] - Work, D.B.; Tossavainen, O.P.; Blandin, S.; Bayen, A.M.; Iwuchukwu, T.; Tracton, K. An ensemble Kalman filtering approach to highway traffic estimation using GPS enabled mobile devices. In Proceedings of the 47th IEEE Conference on Decision and Control (CDC 2008), Cancun, Mexico, 9–11 December 2008; pp. 5062–5068. [Google Scholar]
- Yuan, Y. Lagrangian Multi-Class Traffic State Estimation. Ph.D. Thesis, Delft University of Technology, Delft, The Netherlands, 2013. [Google Scholar]
- Mihaylova, L.; Boel, R.; Hegyi, A. Freeway traffic estimation within particle filtering framework. Automatica
**2007**, 43, 290–300. [Google Scholar] [CrossRef] - Xie, X.; van Lint, H.; Verbraeck, A. A generic data assimilation framework for vehicle trajectory reconstruction on signalized urban arterials using particle filters. Transp. Res. Part C Emerg. Technol.
**2018**, 92, 364–391. [Google Scholar] [CrossRef] - Pan, S.J.; Popa, I.S.; Zeitouni, K.; Borcea, C. Proactive Vehicular Traffic Rerouting for Lower Travel Time. IEEE Trans. Veh. Technol.
**2013**, 62, 3551–3568. [Google Scholar] [CrossRef] - Marinică, N.; Boel, R. Platoon based model for urban traffic control. In Proceedings of the 2012 IEEE American Control Conference (ACC), Montreal, QC, Canada, 27–29 June 2012; pp. 6563–6568. [Google Scholar]
- Zeigler, B.P.; Kim, T.G.; Praehofer, H. Theory of Modeling and Simulation; Academic Press: Cambridge, MA, USA, 2000. [Google Scholar]
- Honig, H.; Seck, M.D. ΦDEVS: Phase based discrete event modeling. In Proceedings of the 2012 Symposium on Theory of Modeling and Simulation-DEVS Integrative M&S Symposium, Orlando, FL, USA, 26–30 March 2012; pp. 39:1–39:8. [Google Scholar]
- Burghout, W. Hybrid Microscopic-Mesoscopic Traffic Simulation. Ph.D. Thesis, KTH, Stockholm, Sweden, 2004. [Google Scholar]
- Xie, X.; Verbraeck, A. A particle filter-based data assimilation framework for discrete event simulations. Simulation
**2018**. [Google Scholar] [CrossRef] - Thrun, S.; Burgard, W.; Fox, D. Probabilistic Robotics; MIT Press: Cambridge, MA, USA, 2005. [Google Scholar]
- Arulampalam, M.S.; Maskell, S.; Gordon, N.; Clapp, T. A tutorial on particle filters for online nonlinear/non-Gaussian Bayesian tracking. IEEE Trans. Signal Process.
**2002**, 50, 174–188. [Google Scholar] [CrossRef] - Xie, X. Data Assimilation in Discrete Event Simulations. Ph.D. Thesis, Delft University of Technology, Delft, The Netherlands, 2018. [Google Scholar]

**Figure 5.**Experimental results of case 1. (

**a**) RMSE results; (

**b**) The estimated number of vehicles on the 17th road segment with data assimilation.

**Figure 6.**Experimental results of case 2. (

**a**) RMSE results; (

**b**) The estimated number of vehicles on the 17th road segment with data assimilation.

**Figure 7.**The influence of sensor data quality on data assimilation results. (

**a**) The effect of p ($\lambda $ = 1/300 s

^{−1}, ${N}_{p}=1000$); (

**b**) The effect of $\lambda $ ($p=0.9$, ${N}_{p}=1000$).

**Figure 8.**The influence of number of particles on data assimilation results ($p=0.9,\lambda $ = 1/300 s

^{−1}). (

**a**) $\overline{RMSE}$ error; (

**b**) The increased percentage of $\overline{RMSE}$ relative to that at ${N}_{p}=1000$.

Model Type | Phases | State Variables | Description |
---|---|---|---|

Source | $active$ | $p\_time$ | The time when sending a $platoon$ message |

$p\_size$ | The number of vehicles within the generated platoon | ||

Segment | $empty$ $approach$ | ||

$cross$ $blocked$ | $platoonList$ | The container of the information of all platoons on the segment (the platoon that is entering or leaving the segment is also in it) | |

$blocked\_in$ | $vn$ | The number of all vehicles in $platoonList$ | |

$blocked\_full$ | $out$ | The state of the exit boundary of the segment (blocked or free) | |

$transient\_p$ $transient\_e$ | |||

Intersection | $empty$ | ||

$cross$ $transient\_p$ | $crossPlatoons$ | The container of related information of platoons which are entering the intersection | |

$transient\_e$ | $currentPhase$ | The current phase of the traffic light in the intersection |

$\mathit{flow}1$ (vehs/hour) | $\mathit{flow}2$ (vehs/hour) | ${\mathit{r}}_{1}$ | ${\mathit{r}}_{2}$ | ${\mathit{r}}_{3}$ | ${\mathit{r}}_{4}$ | |
---|---|---|---|---|---|---|

Perfect parameters | 1000 | 1200 | 0.4 | 0.6 | 0.6 | 0.4 |

Imperfect parameters (Case 1) | 1200 | 1000 | 0.4 | 0.6 | 0.6 | 0.4 |

Imperfect parameters (Case 2) | 1000 | 1200 | 0.6 | 0.4 | 0.4 | 0.6 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Wang, S.; Xie, X.; Ju, R. A Mesoscopic Traffic Data Assimilation Framework for Vehicle Density Estimation on Urban Traffic Networks Based on Particle Filters. *Entropy* **2019**, *21*, 358.
https://doi.org/10.3390/e21040358

**AMA Style**

Wang S, Xie X, Ju R. A Mesoscopic Traffic Data Assimilation Framework for Vehicle Density Estimation on Urban Traffic Networks Based on Particle Filters. *Entropy*. 2019; 21(4):358.
https://doi.org/10.3390/e21040358

**Chicago/Turabian Style**

Wang, Song, Xu Xie, and Rusheng Ju. 2019. "A Mesoscopic Traffic Data Assimilation Framework for Vehicle Density Estimation on Urban Traffic Networks Based on Particle Filters" *Entropy* 21, no. 4: 358.
https://doi.org/10.3390/e21040358