Research Article | Open Access

Jun Bi, Can Chang, Yang Fan, "Particle Filter for Estimating Freeway Traffic State in Beijing", *Mathematical Problems in Engineering*, vol. 2013, Article ID 382042, 6 pages, 2013. https://doi.org/10.1155/2013/382042

# Particle Filter for Estimating Freeway Traffic State in Beijing

**Academic Editor:**Wuhong Wang

#### Abstract

Freeway traffic state estimation is useful for intelligent traffic guidance, control, and management. The freeway traffic state is featured with rapid and dramatic fluctuations, which presents a strong nonlinear feature. In theory, a particle filter has good performance in solving nonlinear problems. This paper proposes a particle filter based approach to estimate freeway traffic state. The freeway link between the west of Peace Bridge and the west of San Yuan Bridge of the third ring in Beijing is used as the experimental object. According to the traffic characteristics and measurement mode of the link, the second-order validated macroscopic traffic flow model is adopted to set up the link model. The implementation steps of the particle filter for freeway traffic state estimation are described in detail. The estimation error analysis for the experiments proves that the proposed approach has an encouraging estimation performance.

#### 1. Introduction

The increasing traffic flow is resulting in serious congestion of urban road network, which can decrease flow rate, delay travel time, increase fuel consumption and travel cost, and make negative environmental effect. Measures should be taken to alleviate traffic congestion. Traffic state estimation of freeway network is useful for traffic management, which involves estimating the traffic variables of the network based on available real-time traffic measurements [1]. A real-time Lagrangian traffic state estimator for freeway state has been proposed, which is considered to be more accurate and more computationally efficient than the Eulerian approach [2, 3]. However, the Lagrangian method is only appropriate for the sensing data obtained via GPS technology or other tracking devices providing position and velocity of individual vehicles. Chao Deng et al. present an approach using cluster analysis and multiclass support vector machine to estimate freeway traffic state. Historical traffic flow data are divided into clusters with different traffic states and the multiclass support vector machine is applied to identify the real-time traffic states [4]. Many previous researches in estimating aggregated traffic variables are based on applications of Kalman filter or extended Kalman filter [5–7]. Furthermore, most of them assume that noises obey Gaussian distribution and use linear models for state functions and observation functions. However, traffic state can fluctuate rapidly and dramatically in a short time, which indicates the strong nonlinear features of the freeway traffic state. Therefore, using Kalman filter may cause inaccurate estimation results and even divergent results. Particle filter is a powerful approximate solution to a general nonlinear problem or a non-Gaussian filtering problem [8, 9]. The basic idea of particle filter is that a posterior probability density function (PDF) of state can be represented by a set of particles with associated weights, and the estimation can be computed as the expected value of the discrete PDF [10, 11]. Currently only limited number of papers have discussed freeway traffic state estimation using particle filter algorithm. Mihaylova and Boel [12] proposed a particle filter (PF) to estimate freeway traffic based on the model of aggregated states and observations, and the investigations are conducted using the real traffic data from a Belgian freeway. Nicolae Marinica developed a particle filter (PF) state estimator using a platoon based model for urban traffic networks [13]. This paper uses the second-order validated macroscopic traffic flow model to evaluate a freeway link in Beijing according to its characteristics and proposes a particle filter method for estimating the freeway speed and density.

The rest of the paper is organized as follows. Section 2 describes a freeway traffic flow model in Beijing. Section 3 presents the design of the traffic state estimator based on the particle filter algorithm. In Section 4, several experiments are conducted to evaluate the particle filter estimation performance. Finally, the conclusions are summarized in Section 5.

#### 2. Traffic Flow Modeling of a Freeway

##### 2.1. Description of a Freeway

A freeway network can be represented as a directed graph. Bifurcations, junctions, on-ramps, and off-ramps of a freeway are represented as nodes, and a freeway stretch between two nodes is represented as a link in the graph [12]. A bidirectional freeway stretch is modeled as two opposite directional links. As shown in Figure 1, the freeway is divided into several links and each link is composed of several sections. In the paper, each link is assumed to have homogeneous geometric characteristics such as the number of lanes, slopes, and curvatures. Detectors are available only at some boundaries between sections. In Figure 1, is the average number of vehicles at the boundary between sections and , is the average density in section , is the average speed in section , is the traffic flow into ramp , and is the traffic flow off ramp . The whole state of the link at time is described by the vector , and is a local state vector of the th section.

The progression from one sampling time to the next sampling time is described by the update equation where denotes the vector of all time-varying parameters such as road conditions and the number of available lanes, is the number of vehicles entering Section 1 during the interval , is the average speed of these vehicles, specifies the outflow at the speed from section , and is a disturbance vector reflecting random fluctuation in the traffic states and the model error.

Noisy measurements of the average speed of vehicles crossing the boundary between section and section during the time interval together with noisy measurements of the mean density of the vehicles are collected as the measurement data. The observation equation is given as where is the state at time and is the measurement noise.

##### 2.2. Macroscopic Traffic Flow Model of a Freeway

The second-order validated macroscopic traffic flow model is employed to describe the dynamic behavior of traffic flow along a freeway stretch in terms of appropriate aggregated traffic variables such as traffic density, space average speed, and traffic flow [14]. Generally, a freeway stretch is divided into a number of sections. Assume that the length of each section is , , the time discretization is based on a time step , and is a discrete time index. For the section , the stochastic nonlinear difference equations based on the second-order macroscopic traffic flow model are described as follows [14]:

In (3), the variables and parameters are denoted as follows:(1)traffic density (in veh/km/lane) is the number of vehicles in section at time divided by the section length and the number of lanes ,(2)space average speed (in km/h) is the average speed of the vehicles in section at time ,(3)traffic flow (in veh/h) is the number of vehicles leaving section during the interval , divided by ,(4) is the on-ramp inflow and is the off-ramp outflow (both in veh/h) in section ,(5), , , , and are the model parameters which are the same given values for all sections,(6) denotes the free flow speed, is the critical density, and is the exponent of the stationary speed equation,(7) and reflect the model error, denotes the zero-mean Gaussian white noise acting on the empirical speed equation, and denotes the zero-mean Gaussian white noise acting on the approximate flow equation.

The detectors in the link entrance or exit can collect the speed data and density data. The speed measurement function is where is the measurement value of the average speed through entrance or exit during the interval and is the measurement noise of the speed.

The measurement function of the density for the link entrance or exit is where is the measurement value of the mean density through entrance or exit during the interval and is the measurement noise of the density.

#### 3. Particle Filter for Freeway Traffic State Estimation

Nonlinear characteristics exist in the freeway traffic state, which makes it difficult to estimate the traffic state. Since particle filter is able to solve a general nonlinear problem in theory, particle filter is well studied to estimate the traffic state based on the second-order validated macroscopic traffic flow model.

##### 3.1. Particle Filter Theory

The discrete-time stochastic model of a dynamic system is described as follows: where is the observation vector at time , represents the state vector at time , is the nonlinear state transition function, and is the nonlinear observation function. The stochastic processes and represent the state noise process and the measurement noise process, respectively. The available information at time is the set of measurements . According to the Bayesian theory, all state information can be obtained from the posterior state distribution. Within the Bayesian framework, particle filter is used to sequentially update a priori knowledge about predetermined state vector by using the measurements data . Suppose that the initial probability density function of the state vector is ; then we have [9, 10]

Particle filter uses Monte Carlo techniques and sequence importance sampling (SIS) methods to solve (7). The posterior PDF is computed based on samples from an important distribution function, as follows, where is the weight of each particle and satisfies and is an important distribution function.

Particle filter has good effects in solving both nonlinear and non-Gaussian applications, which is suitable for estimating the nonlinear freeway state.

##### 3.2. Application to Freeway Traffic State Estimation

The application steps of freeway traffic state estimation based on particle filter are as follows.

*(**1) Initialization*. Set the iteration variable . The particle set (, is the number of particles) is obtained based on the initial distribution .

*(**2) Particle Generation*. For , is sampled from according to (3).

*(**3) Weight Computation*. Equation (12) is complex to compute the weight, and usually the weight is updated by the following equation when the new measurement data are obtained by the detector in the section:
The normalized weight is computed using (11).

*(**4) Resampling*. Drawing a random sample from the uniform distribution over . If satisfies , the th particle is resampled as follows:
*(**5) State Estimation.* The approximate posterior PDF is computed using (10); then the state is estimated by
*(**6) ** Is increased by Itself*. If the end condition of algorithm is not satisfied, the algorithm goes to step (2) again; otherwise, it ends.

#### 4. Freeway State Estimation Experiments

##### 4.1. Experimental Object

A freeway between the west of Peace Bridge and the west of San Yuan Bridge of third ring in Beijing is used as an experimental link. The link has no ramps. The length of the link is 1476 m. The link is composed of 3 sections with 3 lanes and the length of each section is 556 m, 475 m, and 445 m, respectively. The measurement detectors are located in the boundaries between the first section and the third section. The detectors can collect the traffic flow, speed, and density of the link every 2 min.

One example of the entrance traffic state during 3 hours between 8:00 and 11:00 AM on July 23, 2010, is shown in Figure 2. We know that the traffic flow varied between 40 veh/2 min and 60 veh/2 min, the speed varied between 32 km/h and 50 km/h, and the density varied between 23 veh/km and 58 veh/km. In most of the time, the traffic state varied smoothly except for a rapid change at 8:20 AM.

##### 4.2. Experiments and Analysis

The state vector and measurement vector are computed, respectively, as follows: The parameters of traffic model in Section 2 are set as follows.

According to the experimental object in Section 4.1, each section of the freeway has 3 lanes, and the length of each section is about 500 m. The data detection period is 2 min. In daytime, the free flow speed of the freeway is about 80 km/h and the critical density is about 50 veh/km. Therefore, some of the parameters can be set as , m, s, km/h, and veh/km. Based on the prior knowledge, other parameters can be set as s, km^{2}/s, and veh/km/lane.

According to the data analysis in Figure 2, the initial state is set to be The number of particles is set to be 500.

The freeway speed and density are estimated using the particle filter algorithm in the Section 3. The estimation results for the speed and the density of each section are, respectively, shown in Figures 3 and 4. In the horizontal axis of each figure, the step time interval is 2 min which is equal to the data collecting interval of the detectors. According to Figures 3 and 4, the estimation trend is similar to the true trend.

The indices of relative error (RE), mean square error (MSE), and root mean square relative error (RMSRE) are utilized to evaluate estimation performance.

The indices of RE, MSE, and RMSE are, respectively, defined as follows: where represents the true state and represents the estimation state.

The REs of speed estimation and density estimation for each section are, respectively, shown in Figures 5 and 6. In the horizontal axis of each figure, each step time interval is 2 min.

According to Figures 5 and 6, the RE is in [−10%, +10%] and varies smoothly in most of the time. Only at several time intervals, the absolute RE is more than 15%.

The MSE and RMSRE of speed estimation and the MSE and RMSRE of density estimation for each section are shown in Table 1. The maximum MSE difference of speed estimation among the sections is 1.8675 and the maximum RMSRE difference of speed estimation among the sections is 0.0156. The maximum MSE difference of density estimation among the sections is 1.0273 and the maximum RMSRE difference of density estimation among the sections is 0.0062. The mean MSE of the speed estimation is 3.7136, the mean RMSRE of the speed estimation is 0.0750, the mean MSE of the density estimation is 2.6859, and the mean RMSRE of the density estimation is 0.0751. Therefore, the estimation effect is desirable.

In theory, the resampling procedure in particle filter has a complexity of ; is the number of sample variables generated from the uniform distribution [11]. In fact, the computation time can be reduced in the particle filter implementation by using the multithread programming technology.

#### 5. Conclusion

This paper proposes an approach to estimate the freeway traffic state based on the particle filter algorithm. The freeway traffic is modeled by the second-order validated macroscopic traffic flow model. A freeway link between the west of Peace Bridge and the west of San Yuan Bridge of third ring in Beijing is used as an experimental object and real traffic data are used in the experiments. The mean square error of the speed estimation is 3.7136 and the mean square error of the density estimation is 2.6859. The results suggest that particle filter is valid and effective in freeway traffic state estimation. In addition, the proposed approach for traffic state estimation is modular, and therefore different traffic models can be used in different sections on a freeway link. In the future research, we will use parallel computation to improve the performance of the particle filter for estimating freeway state.

#### Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

#### Acknowledgments

This paper is sponsored by the National 863 Program (2011AA110303) and the Fundamental Research Funds for the Central Universities (2013JBM052).

#### References

- Y. B. Wang and M. Papageorgiou, “Real-time freeway traffic state estimation based on extended Kalman filter: a case study,”
*Transportation Science*, vol. 41, no. 2, pp. 167–181, 2007. View at: Publisher Site | Google Scholar - C. Herrera and A. M. Bayen, “Incorporation of Lagrangian measurements in freeway traffic state estimation,”
*Transportation Research B*, vol. 44, no. 4, pp. 460–481, 2010. View at: Publisher Site | Google Scholar - Y. F. Yuan, J. W. C. van Lint, R. E. Wilson, and F. van Wageningen-Kessels, “Real-time lagrangian traffic state estimator for freeways,”
*IEEE Transactions on Intelligent Transportation Systems*, vol. 13, no. 1, pp. 59–70, 2012. View at: Publisher Site | Google Scholar - C. Deng, F. Wang, and H. M. Shi, “Real-time freeway traffic state estimation based on cluster analysis and multiclass support vector machine,” in
*Proceedings of the 1st International Workshop Intelligent Systems and Applications*, pp. 1–4, May 2009. View at: Publisher Site | Google Scholar - Y. C. Zhao, Y. C. Liu, L. Q. Shan, and B. Zhou, “Dynamic analysis of Kalman filter for traffic flow forecasting in sensornets,”
*Information Technology Journal*, vol. 11, no. 10, pp. 1518–1522, 2012. View at: Publisher Site | Google Scholar - Y. B. Wang and M. Papageorgiou, “Real-time freeway traffic state estimation based on extended Kalman filter: adaptive capabilities and real data testing,”
*Transportation Research A*, vol. 42, no. 10, pp. 1340–1358, 2008. View at: Publisher Site | Google Scholar - C. P. I. J. van Hinsbergen, T. Schreiter, and F. S. Zuurbier, “Localized extended kalman filter for scalable real-time traffic state estimation,”
*IEEE Transactions on Intelligent Transportation Systems*, vol. 13, no. 1, pp. 385–394, 2012. View at: Publisher Site | Google Scholar - K. Nummiaro, E. Koller-Meier, and L. van Gool, “An adaptive color-based particle filter,”
*Image and Vision Computing*, vol. 21, no. 1, pp. 99–110, 2003. View at: Publisher Site | Google Scholar - A. Doucet, N. de Freitas, and N. Gordon, Eds.,
*Sequential Monte Carlo in Practice*, Springer, New York, NY, USA, 2001. - J. Bi, Y. F. Fung, T. K. Ho, and B.H. Mao, “Parallel resampling particle filter algorithm,”
*Journal of Computational Information Systems*, vol. 7, no. 6, pp. 1838–1845, 2011. View at: Google Scholar - W. Yi, M. R. Morelande, L. J. Kong, and J. Y. Yang, “A computationally efficient particle filter for multitarget tracking using an independence approximation,”
*IEEE Transactions on Signal Processing*, vol. 61, no. 4, pp. 843–856, 2013. View at: Google Scholar - L. Mihaylova and R. Boel, “A particle filter for freeway traffic estimation,” in
*Proceedings of the 43rd IEEE Conference on Decision and Control (CDC '14)*, pp. 2106–2111, December 2004. View at: Publisher Site | Google Scholar - N. Marinica and R. Boel, “Particle filter for platoon based models of urban traffic,” in
*Proceedings of the 15th WSEAS International Conference on Systems*, pp. 42–47, July 2011. View at: Google Scholar - M. Papageorgiou, “Some remarks on macroscopic traffic flow modelling,”
*Transportation Research A*, vol. 32, no. 5, pp. 323–329, 1998. View at: Google Scholar

#### Copyright

Copyright © 2013 Jun Bi et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.