Professional Documents
Culture Documents
OriginDestination Using HMM PDF
OriginDestination Using HMM PDF
net/publication/281282229
CITATIONS READS
0 375
6 authors, including:
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:
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.
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.
3. THE CONCEPT
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.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