You are on page 1of 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/281282229

Origin Destination Estimator Based on Hidden Markov Models for Adaptive


Traffic Control

Conference Paper · April 2012


DOI: 10.13140/RG.2.1.3978.6482

CITATIONS READS

0 375

6 authors, including:

Ahmad Haj Mosa Fadi Al Machot


PwC Vienna Research Center Borstel
23 PUBLICATIONS   77 CITATIONS    49 PUBLICATIONS   291 CITATIONS   

SEE PROFILE SEE PROFILE

Kyandoghere Kyamakya
Alpen-Adria-Universität Klagenfurt
212 PUBLICATIONS   1,919 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Deep Neurodynamic Optimization for Self Learning Robots View project

Non-intrusive Car Driver’s Emotion Recognition Using Thermal Camera View project

All content following this page was uploaded by Fadi Al Machot on 27 August 2015.

The user has requested enhancement of the downloaded file.


Proceedings of the 1st IFAC Conference on Embedded Systems,
Computational Intelligence and Telematics in Control - CESCIT
2012
3-5 April 2012. Würzburg, Germany

Origin Destination Estimator Based on


Hidden Markov Models for Adaptive
Traffic Control
Ahmad Haj Mosa ∗ Fadi Al Machot ∗ Alireza Fasih ∗
Fidaa Al Machot ∗∗ Kyandoghere Kyamakya ∗

Alpen-Adria-University Klagenfurt
9020 Klagenfurt, Universitätsstrasse 65-67, Austria
Email: forename.surname@uni-klu.ac.at
∗∗
Bergische Universität Wuppertal
Campus Freudenberg, Geb. FF, Rainer-Gruenter-Strae, 42119
Wuppertal
Email: forename.surname@uni-wuppertal.de

Abstract: Knowledge of the origin-destination (O-D) matrix of a traffic network is useful for
various planning and operations tasks. The matrix gives the traffic flow between a specific origin
and a specific destination. In this paper, we consider the traffic flow on a specific intersection
and we estimate the traffic flow in the next intersection based on Hidden Markov Model (HMM).
In this concept each street has two lanes. We observe the traffic flow on each lane individually.
Finally, we evaluate the proposed model using a real scenario with two different intersections.

Keywords: Estimation of OD matrix, Hidden Markov Model.

1. INTRODUCTION sample survey. The Approaches to O-D matrix estima-


tion using these data include network equilibrium, gravity,
In the traffic management literature the OD-matrix is a and distribution-assignment models Abrahamsson (1998).
basic information which is related to the traffic flows. The For the estimation of O-D matrix Sun (1999) are using
flows of traffic from origin to destination are expresses as location of vehicles and the re-identification of vehicles
a matrix. There are many different ways to estimate the technologies,”i.e. loop detectors with high speed scanning
O-D-matrix Haas (2001), Zhou (2006) and Wang (2005). detector cards” to prepare data for real time O-D matrix
These methods are related to some statistical process generation. An other technology is laser based detection
to obtain the O-D-matrix. The main concept is how systems that provide vehicle lengths Larson (1998), and
to track vehicle from a specific origin place to another the video image processing technology that generate video-
destination. In the classical methods which are based based vehicle signatures MacCarley (1998).
counting vehicles, we do need to cascade two sub-systems
such as an assignment model and O-D flow adjustment and These technologies can cover only short sector of the road
then by getting feedback from estimated O-D matrix, we and vehicles are identified indirectly from their physical
can tune the assignment model. The Traffic-count results features, thus data from them are of limited use for O-D
are loading into the O-D flows adjustment for updating matrix estimation Kwon (2005).
the O-D-matrix. In this paper authors are proposing a Zou Zou (2006)used Hidden Markov Models to model driv-
new method to estimate and calculate the O-D-matrix ing behaviors at intersections. Observed vehicle movement
with minimum infrastructure (i.e counting system, base on data are used to build up the model. A single HMM is
inductive loops) by using Hidden Markov Model (HMM). used to cluster the vehicle movements when they are close
This paper is organized as follows, in section two we to intersection. The re-estimated clustered HMMs provide
illustrate the related works. Section three shows the overall better prediction of the vehicle movements compared to
architecture of the concept. Section four explains HMM in traditional car-following models.
details. Section five presents the concept results and the
evaluation of the proposed model. Finally, is the conclusion Tebaldi and West propose a fully Bayesian framework
and future works related to O-D matrix generators. with non-informative priors based on Poisson traffic and
acknowledge the need for informative priors, but they
2. RELATED WORKS do not specify how to obtain them. In fact, using the
measurements at time t in order to estimate the O-D flows
The Origin-Destination (O-D) matrix is important in de- at the same epoch, flat priors overthe possible amount
scribing transportation in a region. This matrix has in- of traffic yield uniform or multi-modal posteriors Tebaldi
formation on the travel and transportation made between (1998).
different zones of a region. Traditionally, the O-D matrix
is estimated from link traffic counts combined with a

978-3-902661-97-5/12/$20.00 © 2012 IFAC 92 10.3182/20120403-3-DE-3010.00073


Airoldi and Faloutsos proposed i-FILTER, a method to
solve this problem, which improves the state-of-the-art by
(a) introducing explicit time dependence, and by (b) using
realistic, non-Gaussian marginals in the statistical models
for the traffic flows, as never attempted before Airoldi
(2004).
The previous proposed solutions are expensive and require
an expensive infrastructure. In this paper, we propose
an approach using only loop detectors in intersections to
prepare data for real time O-D matrix generation. Our
proposed solution is cheap, accurate and does not need
a huge infrastructure, it can be run in real time and on
embedded platforms.

3. THE CONCEPT

In this section, we consider the traffic flow on a specific


intersection and we estimate the traffic flow in the next Fig. 1. The description of the goal scenario:r observed and
intersection based on Hidden Markov Model (HMM). In destination stations
this concept each street has two lanes and the observation Table 1. The combination of traffic flow classes
of the traffic flow is based on each lane individually (See of the observation states in stations 1,2 and 3)
Figure 1).
• Station 1,2 and 3 affect the traffic flow on the desti-
nation station.
• Each station has two lanes, we observe the traffic flow
on each lane.
• Traffic flow represents the number of cars passing the
measurement station (inductive loop) within a time
window of 10 seconds.
• We observe the current traffic flow on station 1,2 and
3.
• The hidden states represent the combination of traffic
flow classes in the destination station (see Table 2).
• The observed traffic flow on stations 1,2 and 3 repre-
sents the observation states in HMM, while the traffic
flow on the destination station represent the hidden
state.
• We use these observations, combined with the current
hidden states at the destination for the prediction.
We classify the traffic flow to five classes:
• Very low
• Low
• Middle
• High
• Very high
In HMM the observation sta te represents the combination transition matrix. The transition matrix is learned from
of traffic flow classes in the three stations(1, 2 and 3), this training data and defines the probabilities of moving from
combination generates 15625 observation states (see Table one hidden state to another, assuring that the data are
1). correct. Hidden Markov Model is a dynamic statistical
model consists of citecapp2005inference:
• transition matrix consists of transition probabilities
between the hidden states. • Hidden set of states: S = s1 , s2 , s3 , ...., sn
• In the training phase we should obtain the transition • Observed set of states: O = o1 , o2 , o3 , ...., on
matrix between the hidden states as well as the In HMM, we have a hidden sequence which generates an
confusion matrix between the observation and hidden observed sequence. The goal is to predict the next hidden
states states depending on the current hidden states and the
next observed state. To define Hidden Markov model, the
4. HIDDEN MARKOV MODELS following probabilities have to be specified:
A HMM models temporal data as a sequence of states • State Transition matrix:
and their successive usage across time is governed by a A = aij : aij = P (sj,t |sj,t−1 ) (1)

CESCIT 2012 93
3-5 April 2012. Würzburg, Germany
Table 2. The combination of traffic flow classes mode estimates for the parameters (transition and emis-
of the hidden states in the destination state sion probabilities) of an HMM, when given only emissions
as training data.
In our scenario we have already the observation and the
hidden states, we need just the transition matrix and the
confusion matrix.
The goal is to compute the transition and the confusion
probabilities. As an example suppose, we have the history
data as in Table 7. The first row represents the time line
when we observe the states, the second row represents
the hidden states sequence (traffic flow on destination
lane sequence) according to the time line and the third
row represents the observation states sequence (traffic flow
combinations on intersection 1).

• Confusion matrix:
B = bij : bij = P (oj,t |sj,t ) (2)

4.1 The description of a HMM example

We suppose we have three stations 1,2 and 3 affect the


traffic flow on the destination station. Each station has two Fig. 2. A portion of HMM model: An Example of HMM
lanes, we observe the traffic flow on each lane. The hidden
states represent the combination of traffic flow classes To compute the transition probabilities between the hid-
in the destination station. We use these observations, den states, we use the equation (2) and Table 7:
combined with the current hidden states at the destination No. of recording S1 after S1 2
for the prediction. The observed traffic flow on stations 1,2 p(S1,t |S1,t−1 ) = = = 0.33
No. of recording S1 6
and 3 represents the observation states in HMM, while the (3)
traffic flow on the destination station represent the hidden No. of recording S2 after S1 4
state. Figure 2 shows the observation states and the hidden p(S2,t |S1,t−1 ) = = = 0.66
No. of recording S1 6
states of the proposed HMM example. To explain HMM, (4)
we use a simple example of our case where we have two No. of recording S2 after S2 1
Hidden states as shown in Table 3 and tow observations p(S2,t |S2,t−1 ) = = = 0.25
No. of recording S2 4
states as in Table 4: (5)
Table 3. The hidden states of the proposed No. of recording S1 after S2 3
example p(S1,t |S2,t−1 ) = = = 0.75
No. of recording S2 4
Hidden States/Flow on lanes Lane 4.1 Lane 4.2
(6)
S1 Low Low We use these results to build the transition matrix as in
S2 Low High Table 5:
Table 4. The observation states of the proposed Table 5. The transition matrix A of the pro-
example posed example
Hidden/Hidden S1 S2
S1 0.33 0.66
S2 0.75 0.25

4.2 Training phase of the proposed HMM example No. of recording O1 and S1 3
p(o1,t |S1,t ) = = = 0.5 (7)
To use a HMM, researchers need a training phase and a No. of recording S1 6
test phase. For the training stage, they usually work with No. of recording O2 and S1 3
p(o2,t |S1,t ) = = = 0.5
the Baum-Welch algorithm to estimate the parameters No. of recording S1 6
(π, A, B) for the HMM. This method is based on the (8)
maximum likelihood criterion Cappé (2005).
The BaumWelch algorithm is a particular case of a gen- No. of recording O1 and S2 3
p(o2,t |S2,t ) = = = 0.75
eralized expectation-maximization algorithm. It can com- No. of recording S2 4
pute maximum likelihood which estimates and posterior (9)

CESCIT 2012 94
3-5 April 2012. Würzburg, Germany
No. of recording O1 and S2 1 5. SIMULATION SCENARIO
p(o2,t |S2,t ) = = = 0.25
No. of recording S2 4 To test the HMM, we build a simulator using C# as in
(10)
Figure 3, the green boxes in Figure 3 contain the number
In 6 we see the confusion matrix according to the previous
of vehicles passed during 10 seconds for each lane, we use
results.
a random generator to generate these numbers then we
Table 6. The confusion matrix B of the pro- classify them to five classes of traffic flow using Table 8.
posed example The Red boxes in Figure 3 contain the traffic flow classes
for each lane. In the training phase we observe the traffic
Hidden/Observation O1 O2
flow classes in the origin and destination lanes as shown in
S1 0.5 0.5
the bottom of Figure 3. Since we have 15625 observation
S2 0.75 0.25
states we need a long data to train our model, therefore
we collected 500000 samples for training which means we
Table 7. History data of the hidden markov
are dealing with real data about two months of training
model example
(500000 *10 Seconds).
Table 8. The Traffic flow classes of the pro-
posed simulation
Traffic Flow Classes No. of vehicles passed during 10 sec.
4.3 Evaluation phase of the proposed HMM example Very Low Flow 0 ≤ and < 4
Low Flow 4≤ and < 8
After training the Hidden Markov Model, it can be used Middle Flow 8 ≤ and < 12
to predict the future states (traffic flow) of the destination High Flow 12 ≤ and < 16
state after observing the current states of lanes in inter- Very High Flow 16≤
section 1.
Thus, we have to compute the probabilities of all possible
hidden states occurring at time (t > 11) with the tran-
sition influence of the previous hidden state sh,t−1 and
the Observation state ok,t . Such an influential relation can
be represented by the function at (sh,t−1 , ok,t ) defined as
follows Sheng (2006):

at (sh,t−1 , ok,t )
= B[(:, [k])]T . ∗ A([h], :)
= [(P (ok |s1 )P (s1,t |sh,t−1 ),
P (ok |s2 )P (s2,t |sh,t−1 ), ....
P (ok |sn )P (sn,t |sh,t−1 )] Fig. 3. A snap shot of the HMM Simulator
Table 9. The obtained Results of different test
Where A([h], :) is the hth row of state-transition matrix scenarios
A and B(:, [k]) is the kth column of confusion matrix
B. The symbol of operator .* is an array multiplication, Test Number of Sample Success Performance
and thus, A .* B means the element-by-element vector 1 1000 95%
multiplication of A and B. Using the HMM example in 2 2000 94.4%
3 20000 96.2%
Figure (1) the goal is to predict the hidden state at
4 50000 95%
time (t = 12). In Table 7, we see that at time t = 12 5 500000 97%
the observation state is O2 and at time t = 11 we had
the hidden state S2, using the previous equation, the
probabilities of all possible hidden states occurring at time 6. EXPERIMENTAL RESULTS
t = 12 is:
In the evaluation phase we observe the traffic flow at the
at (s2,t=11 , o2,t=12 ) = origin and using HMM, we use them with the history
B(:, [2])T . ∗ A([2], :) = to predict the traffic flow at the destination. We divided
[P (s1,t=12 |s2,t=11 , o2,t=12 ), the data sets in two parts, a training dataset and a test
P (s2,t=12 |s2,t=11 , o2,t=12 )] = data set. We evaluated five tests of the proposed HMM
using different samples with different history. In Table 9,
[B(2, 1) ∗ A(2, 2), B(1, 2) ∗ A(2, 2)]
we see the results of these tests where the third column
[0.375, 0.0625] shows the overall success performance which means the
Finally, the probability of occurring S1 at time t = 12 successful match between observed and predicted states
is higher (0.375). Therefore, we take it as the predicted at the destination station. The overall performance of the
value which means the traffic flow status on the destination prediction is higher than 95%, especially after using 500000
station at time t = 12 is Low flow in both lanes (4.1 and samples the overall performance of the prediction model is
4.2). 97%.

CESCIT 2012 95
3-5 April 2012. Würzburg, Germany
7. CONCLUSION Sheng-Tun Li and Yi-Chung Cheng. A hidden Markov
model-based forecasting model for fuzzy time series. In
We developed a HMM model for estimating real-time OD Proceedings of the 10th WSEAS international confer-
matrices of traffic flow on a specific intersection and we ence on Systems (ICS’06), M. Isabel Garcia-Planas
estimate the traffic flow in the next intersection. The (Ed.). World Scientific and Engineering Academy and
proposed model is economic, performs well and does not Society (WSEAS), Stevens Point, Wisconsin, USA, pp
need a huge infrastructure, it can be run in real time 440-445, 2006.
and on embedded platforms. Our future goal is to use Cappé, O. and Moulines, E. and Ryden, T.Inference in
VISSIM 1 as simulator of the traffic dynamic and driver hidden Markov models. Springer Verlag, 2005.
behavior in real world. The proposed simulator we have Kwon, J. and Varaiya, P.Real-time estimation of origin-
implemented in this paper shows a high performance of destination matrices with partial trajectories from elec-
the model. Some future extensions of research work are tronic toll collection tag data. Transportation Research
suggested. The algorithm should be further studied. The Record: Journal of the Transportation Research Board,
model for a large-scale network can be explored. The volume 1923, pp 119–126, Trans Res Board, 2005.
model can also be extended to a dynamic framework.

REFERENCES
T. Abrahamsson, Estimation of Origin-Destination Matri-
ces using Traffic Counts-A Literature Survey. Technical
Report IR-98021, International Institute for Applied
Systems Analysis, 1998.
C. Sun, S.G. Ritchie, W. Tsai, and R. Jayakrishnan, Use of
vehicle signature analysis and lexicographic optimization
for vehicle reidentification on freeways. Transportation
Research, Part C, 7:167185, 1999.
Larson, J.E., Van Katwyk, K., Liu, C., Cheng, H.H., Shaw,
B., and Palen, J., A real-time laser-based prototype de-
tection system for measurement of delineations of mov-
ing vehicles. UCB-ITS-PWP-98-20, PATH, University
of California, Berkeley, CA, 1998.
C.A. MacCarley., Video-based vehicle signature analysis
and tracking system phase 2:algorithm development and
preliminary testing. UCB-ITS-PWP-98-10, PATH,
University of California, Berkeley, CA, 1998.
Xi Zou., Modeling Intersection Driving Behaviors: A Hid-
den Markov Model Approach (I). Journal of The
Transportation Research Board: Transportation Re-
search Record 1980 pp. 16-23, 2006.
Edoardo Airoldi and Christos Faloutsos Recovering Latent
Time Series from their Observed Sums:Network Tomog-
raphy with Particle Filters. Proceedings of the tenth
ACM SIGKDD international conference on Knowledge
discovery and data mining, pp30–39, ACM, 2004.
C. Tebaldi and M. West Bayesian inference on network
traffic using link count data. Journal of the American
Statistical Association, 93:557576, 1998.
Wang, X. and N. Zhang.GLS Estimation of OD Mmatrix
With Traffic Counts and Information From ATIS. Pro-
ceedings of the Eastern Asia Society for Transportation
Studies, pp 1188–1196, 2005.
Zhou, X. and Mahmassani, H.S.Dynamic origin-
destination demand estimation using automatic vehicle
identification data. Dynamic origin-destination demand
estimation using automatic vehicle identification data,
Intelligent Transportation Systems, IEEE Transactions
on, pp 105–114, 2006.
Haas, C.T., C.R. Bhat, and R.B.Internally-consistent es-
timation of dynamic network origin-destination flows
from intelligent transportation systems data using bi-
level optimization. The University of Texas at
Austin,Dissertation, December 2001.
1 http://www.ptvamerica.com/

CESCIT 2012 96
3-5 April 2012. Würzburg, Germany

View publication stats

You might also like