Particle Filter for Estimating Freeway Traffic State in Beijing

Freewaytrafficstateestimationisusefulforintelligenttrafficguidance,control,andmanagement.Thefreewaytrafficstateisfeatured withrapidanddramaticfluctuations,whichpresentsastrongnonlinearfeature.Intheory,aparticlefilterhasgoodperformance insolvingnonlinearproblems.Thispaperproposesaparticlefilterbasedapproachtoestimatefreewaytrafficstate.Thefreeway linkbetweenthewestofPeaceBridgeandthewestofSanYuanBridgeofthethirdringinBeijingisusedastheexperimental object.Accordingtothetrafficcharacteristicsandmeasurementmodeofthelink,thesecond-ordervalidatedmacroscopictraffic flowmodelisadoptedtosetupthelinkmodel.Theimplementationstepsoftheparticlefilterforfreewaytrafficstateestimation aredescribedindetail.Theestimationerroranalysisfortheexperimentsprovesthattheproposedapproachhasanencouraging estimationperformance.


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][6][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.

Traffic Flow Modeling of a Freeway
2.1.Description of a Freeway.A freeway network can be represented as a directed graph.Bifurcations, junctions, onramps, 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  + 1,   is the average density in section , V  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   = (  1, ,   2, , . . .,   , )  , and  , = (V , ,  , )  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,  in  is the number of vehicles entering Section 1 during the interval [  ,  +1 ), V in  is the average speed of these vehicles,  out  specifies the outflow at the speed V out  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  + 1 during the time interval [  ,  +1 ) 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.

Macroscopic Traffic Flow Model of a
Freeway.The secondorder 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   ,  = 1, 2, . . ., , the time discretization is based on a time step , and  ( = 0, 1, 2, . ..) 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 V  () (in km/h) is the average speed of the vehicles in section  at time , where  V in or out () is the measurement value of the average speed through entrance or exit during the interval [( − 1), ) and  V in or out () is the measurement noise of the speed.
The measurement function of the density for the link entrance or exit is where   in or out () is the measurement value of the mean density through entrance or exit during the interval [(−1), ) and   in or out () is the measurement noise of the density.

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.

Particle Filter Theory.
The discrete-time stochastic model of a dynamic system is described as follows: where   is the observation vector at time 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 0 ≤    ≤ 1 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.

Application to Freeway Traffic State Estimation.
The application steps of freeway traffic state estimation based on particle filter are as follows.
(2) Particle Generation.For  = 1, 2, . . ., ,    is sampled from (  |   −1 ,   ) 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 (0, 1].
, the th particle is resampled as follows: (5) State Estimation.The approximate posterior PDF is computed using (10) 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.

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   = 3,   = 500 m,  = 120 s, V  = 80 km/h, and  cr = 50 veh/km.Based on the prior knowledge, other parameters can be set as  = 20 s,  = 45 km 2 /s, and  = 15 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 x represents the estimation state.The REs of speed estimation and density estimation for each section are, respectively, shown in Figures 5 and 6 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.

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.

Figure 1 :
Figure 1: Freeway links and measurement points.

Figure 2 :Figure 3 :
Figure 2: Traffic state example of exit in the link.

Figure 6 :
Figure 6: REs of density estimation for three sections.
, , , , and  are the model parameters which are the same given values for all sections, (6) V  denotes the free flow speed,  cr is the critical density, and  is the exponent of the stationary speed equation, traffic flow   () (in veh/h) is the number of vehicles leaving section  during the interval [, ( + 1)), divided by , (4)   () is the on-ramp inflow and   () is the off-ramp outflow (both in veh/h) in section .(5) ,   represents the state vector at time ,   is the nonlinear state transition function, and ℎ  is the nonlinear observation function.The stochastic processes   and V  represent the state noise process and the measurement noise process, respectively.The available information at time  is the set of measurements   = {  .Suppose that the initial probability density function of the state vector is ( 0 |  0 ) = ( 0 ); then we have [9, 10]  (  |  −1 ) = ∫  (  |  −1 )  ( −1 |  −1 )  −1 , (7)  (  |   ) =  (  |   )  (  |  −1 )  (  |  −1 ) , :  = 1, 2, . . ., }.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 ; then the state is estimated by 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.

Table 1 :
MSE and RMSRE of estimation of density and speed.