Simultaneous Traffic Flow and Macro Model Estimation for Signalized
Junctions with Multiple Input Lanes
Luana Chetcuti Zammit, Simon G. Fabri and Kenneth Scerri
Department of Systems and Control Engineering, University of Malta, Msida, Malta MSD2080, Malta
Keywords:
Macro Model Estimation, Expectation-maximization Algorithm, Quasi Real-time Estimation, Traffic Junction
Modelling, Urban Traffic Control, Intelligent Transportation System.
Abstract:
A novel algorithm is presented for macro model estimation of the dynamics of traffic flow in a junction having
multiple input lanes for each turning direction. The proposed algorithm jointly estimates the states describing
the traffic flow under different traffic conditions, together with model parameters and their uncertainties of the
measurement and process noise. Use is made of the Expectation-Maximization methodology with a sliding
window over time in order to obtain quasi real-time estimation.
1 INTRODUCTION
Automatic control of signalized traffic intersections
is a vital component of modern traffic infrastructures.
The aim is to optimize the flow of vehicles through
the road network in the presence of time-varying traf-
fic conditions. Thus, the design and implementation
of such systems requires the use of computationally
efficient numerical models that continuously estimate
the dynamics of traffic flow.
There are two main classes of traffic modelling
techniques - macroscopic or microscopic. Macro-
scopic models estimate traffic quantities at a high
level of aggregation (Lighthill and Whitham, 1955;
Richards, 1956), whereas microscopic models cap-
ture the dynamic behaviour of individual vehicles.
For the purpose of automated traffic light control,
macroscopic models are stronger candidates due to a
lower computation demand and faster real-time esti-
mation. Hence, macroscopic models are vital to the
development of controllers capable to adapt to chang-
ing traffic behaviour.
Hence, this study is based on a data-driven,
macroscopic traffic junction model. This model is
rewritten in state-space form to allow the adoption
of various versatile control techniques from systems
theory. The model makes use of queuing theory to
describe the traffic dynamics. Queuing theory has
been applied to transport in classical works, (Beck-
mann et al., 1955; Webster, 1957) and more recently
in the works of Olszewski (1994); Viti and van Zuylen
(2004). Moreover, macro models in state-space form
making use of queuing theory to describe the dynam-
ics of traffic flow in a junction with a single input
lane have been presented in Homolova (2005); Kra-
tochvilova and Nagy (2004); Pecherkova et al. (2008);
Zammit et al. (2016). In this study this approach is
extended to describe the dynamics of traffic flow in a
junction having multiple input lanes for each turning
direction.
Additionally, traffic quantities are estimated by
the model in real-time, based only upon a few basic
sensor measurements and assuming little knowledge
of the underlying traffic parameters. The number of
sensors in a junction is kept to a minimum so as to re-
duce infrastructural costs, as discussed in more detail
in the next section.
This leads to a novel algorithm to estimate jointly,
in quasi real-time, the model states, the unknown and
possibly time-varying model parameters and noise co-
variances. This differs from the implementations of
previous works (Homolova, 2005; Kratochvilova and
Nagy, 2004; Pecherkova et al., 2008) where only the
estimation of model states was carried out and the
model parameters were tuned a priori from past traffic
measurements or from simulated data using software
such as Aimsun, SUMO and VISUM. Hence no real-
time updates of the parameters were obtained from
the previous works.
The joint estimation is based on the Expectation-
Maximization (EM) algorithm (Dempster et al.,
1977), but modified to obtain quasi real-time imple-
mentation by utilising a sliding window (Dang et al.,
2009). Despite the successful application of EM
Zammit, L., Fabri, S. and Scerri, K.
Simultaneous Traffic Flow and Macro Model Estimation for Signalized Junctions with Multiple Input Lanes.
DOI: 10.5220/0006244801570164
In Proceedings of the 3rd International Conference on Vehicle Technology and Intelligent Transport Systems (VEHITS 2017), pages 157-164
ISBN: 978-989-758-242-4
Copyright © 2017 by SCITEPRESS – Science and Technology Publications, Lda. All rights reserved
157
methods to several other fields, their potential utility
to traffic flow models as explored in this work is an
innovative contribution.
2 MODEL DEVELOPMENT
This work assumes that for a junction with two inflow
directions, only three sensors are installed per arm,
usually implemented as inductive loops (Dunn Engi-
neering Associates and Siemens Intelligent Transpo-
ration Systems, 2005). Two are placed at the input
lane to measure the inflow towards the junction for
each turning direction. The other sensor is placed next
to the output lane of the arm to measure the outflow
away from the junction as shown in Figure 1.
The variables denoting traffic flow through the
junction are: γ
I
(t) which represents the number of
unit vehicles (uv) entering an arm in a cycle in
[uv/cycle] where a cycle is the time required for one
complete sequence of traffic signal phases; lane oc-
cupancy φ(t) which is the proportion of time when a
sensor is occupied (and therefore activated) in a cy-
cle with respect to the total measuring period given
in [%]; and ζ(t) which represents the number of cars
waiting to pass through the intersection at the start of
the red phase of each cycle (in [uv]).
The sensor measurements include i) γ
I
(t) in
[uv/cycle], ii) φ(t) and iii) the outflow from an arm,
denoted as γ
O
(t) in [uv/cycle], which represents the
number of unit vehicles exiting an arm during the
green signal in a given cycle.
Let γ
I
(t), φ(t) and ζ(t) be the state variables of the
model’s state space equations with integer t denoting
the cycle index.
Traffic flow performance is subject to the so-called
unsaturated or saturated flow conditions (Gazis,
2002). Saturated flow corresponds to the maximal
Figure 1: 3-arm signalized junction with two input lanes for
each arm representing different turning directions.
number of vehicles that could flow through an arm.
This depends on characteristics such as road width,
number of traffic lanes in one direction, turning move-
ments and speed limits. Assume this maximal flow to
be a positive constant S [uv/cycle]. Otherwise the arm
is unsaturated.
The junction dynamics for a given arm can be rep-
resented using the following notation. Let z represent
the ratio of the green signal time for an arm to the to-
tal cycle time. w(t) is a white, zero-mean, Gaussian
noise process with covariance Q, capturing model in-
accuracy. Q is a diagonal matrix with q
l, j
representing
the elements of the inverse of Q and l and j represent
the rows and columns of the matrix respectively. v(t)
is a white, zero-mean, Gaussian measurement noise
with covariance R, capturing sensor deficiencies. R is
a diagonal matrix with r
l, j
representing the elements
of the inverse of R. A binary queue length indicator
δ(t) is defined that takes a value of 0 under unsatu-
rated conditions and 1 if a lane is saturated.
The queue length, ζ(t +1) is described by a piece-
wise linear throughput characteristic at the intersec-
tion, which applies the principle of conservation of
traffic flow (Pecherkova et al., 2008). If I
O
(t) repre-
sents the number of unit vehicles exiting an arm in a
cycle if a continuous green signal is shown throughout
the cycle, then the number of vehicles exiting during a
cycle with green ratio z(t), denoted as γ
O
(t), is given
by z(t)I
O
(t). Thus it follows that ζ(t +1) depends on
the previous queue length, ζ(t), the departed vehicles,
γ
O
(t) and the arrived cars γ
I
(t) in a cycle, as given by
Equation (1):
ζ(t + 1) = ζ(t) γ
O
(t) + γ
I
(t) (1)
For unsaturated traffic conditions, the model assumes
that the outflow is equal to the inflow if no queue ζ(t)
exists, otherwise the outflow increases according to
the queue ζ(t) and green time z. Hence for unsat-
urated traffic conditions, (γ
O
(t)<S(t)) the following
holds:
I
O
(t) = γ
I
(t) +
ζ(t)
z(t)
= γ
O
(t) = z(t)γ
I
(t) + ζ(t) (2)
For saturated traffic conditions, I
O
(t) is equal to S(t)
which implies that:
γ
O
(t) = z(t)S(t) (3)
Substituting for γ
O
(t) in Equation (1) for both un-
saturated and saturated traffic conditions, the queue
length at sample instant t + 1 is given by Equations
(4) and (5) respectively.
ζ(t + 1) = (1 z(t))γ
I
(t) (4)
ζ(t + 1) = ζ(t) + γ
I
(t) z(t)S(t) (5)
VEHITS 2017 - 3rd International Conference on Vehicle Technology and Intelligent Transport Systems
158
A Markovian random process is assumed to model the
dynamics of the inflow to the junction, γ
I
. Also the
occupancy φ(t + 1) is considered to depend upon the
occupancy at the previous cycle φ(t) and the queue
length ζ(t), linearly parameterized by two variables
κ(t) and β(t). The occupancy is a useful measurement
and is included to detect unusual situations, such as
road blockage during unsaturated traffic conditions.
The above equations can be represented in
discrete-time stochastic state-space form (6) and (7)
where the sampling period is taken to be the cycle
time. Unsaturated traffic conditions are represented
by Equation (6) and saturated traffic conditions by
Equation (7). The second equation in both (6) and
(7) represents the sensor readings of the controlled
intersection. The model equations (6) and (7) are
limited to one arm only, but they can be expanded to
model multiple arms in an intersection, indexed by
i = 1, 2, ..., n. In a 3-arm junction with bi-directional
traffic flow and separate lanes for different turning di-
rections towards arms a or b respectively as shown in
Figure 1, the output flow from each arm and hence the
number of cars leaving the junction, are represented
as γ
O
1
(t), γ
O
2
(t) and γ
O
3
(t) respectively. The outflow
for each arm, for unsaturated traffic conditions and for
saturated traffic conditions are respectively given by:
γ
O
1
(t) = (ζ
2a
(t) + z
2a
γ
I
2a
(t)) + (ζ
3a
(t) + z
3a
γ
I
3a
(t))
γ
O
2
(t) = (ζ
1a
(t) + z
1a
γ
I
1a
(t)) + (ζ
3b
(t) + z
3b
γ
I
3b
(t))
γ
O
3
(t) = (ζ
1b
(t) + z
1b
γ
I
1b
(t)) + (ζ
2b
(t) + z
2b
γ
I
2b
(t))
γ
O
1
(t) = S
2a
· z
2a
+ S
3a
· z
3a
γ
O
2
(t) = S
1a
· z
1a
+ S
3b
· z
3b
γ
O
3
(t) = S
1b
· z
1b
+ S
2b
· z
2b
where S
ia
represents the saturation flow for arm ia
and S
ib
represents the saturation flow for arm ib where
i=1, 2, 3.
3 JOINT ESTIMATION OF
STATES, PARAMETERS AND
NOISE
Joint estimation refers to the process of simultane-
ously estimating the state of a dynamic system and
the model which gives rise to the dynamics, including
all model parameters and covariances of the process
and measurement noise.
Published works on joint estimation methods
make use of nonlinear estimation algorithms such as
the extended Kalman filter (Wang et al., 2008), or
particle filtering (Mihaylova et al., 2007). However,
divergence problems associated with such joint esti-
mation methods and the high computational demands
associated with particle filters can restrain their appli-
cations (Huber, 2015). Furthermore, the Maximum
Likelihood (ML) principle (Ljung, 1999) plays a key
role in joint estimation. ML estimation, solved via a
gradient-based search strategy such as a Newton type
method (Soderstrom and Stoica, 1989) is sometimes
difficult to solve for state-space models. Hence, a
gradient-search free computation of the ML, such as
the EM algorithm (Dempster et al., 1977) is applied
in this work to infer both the state space model states
and its parameters.
For a n-arm junction, the unknown variables to be
estimated include the state vector x , [ζ
1a
, ζ
1b
... ζ
na
ζ
nb
γ
I
1a
γ
I
1b
... γ
I
na
γ
I
nb
φ
1a
φ
1b
... φ
na
φ
nb
]
T
, the vector
of model parameters θ
θ
θ , [ κ
1a
κ
1b
... κ
na
κ
nb
β
1a
β
1b
... β
na
β
nb
S
1a
S
1b
... S
na
S
nb
]
T
and noise covariances
Q, R. This work extends that in Zammit et al. (2016),
where instead of noise realisations, the measurement
and process noise covariances are estimated. Further-
more, the model parameters θ
θ
θ are considered separate
from the noise covariances Q and R, as reflected in
the estimation algorithm of Section 3.2. This differs
from the standard EM where Q and R are typically
grouped with the model parameters (Bishop, 2009).
Our approach thus allows the estimation algorithm to
be tuned according to the differing characteristics of
the model parameters and the elements of the covari-
ance matrices, such as their different orders of magni-
tude and their numerical constraints.
Futhermore, in this study the classical EM algo-
rithm is modified to effect quasi real-time estimation
since the standard EM is a multiple pass batch pro-
cessing algorithm, where estimation is carried out off-
line based on a batch of measurements available a pri-
ori in time as described in the next section.
3.1 Standard Batch-based EM
Let
ˆ
x denote the estimate of the state vector x, where
ˆ
x , [
ˆ
ζ
1a
,
ˆ
ζ
1b
...
ˆ
ζ
na
ˆ
ζ
nb
ˆ
γ
I
1a
ˆ
γ
I
1b
...
ˆ
γ
I
na
ˆ
γ
I
nb
ˆ
φ
1a
ˆ
φ
1b
...
ˆ
φ
na
ˆ
φ
nb
]
T
. In the standard EM,
ˆ
x is given by running
the Kalman Smoother recursions (Sarkka, 2013). To
solve for θ
θ
θ, the parameters that maximize the below
objective function (Chen, 2006) conditioned upon the
estimated states, are iteratively estimated over a batch
of N observations,
G(θ
θ
θ,
ˆ
θ
θ
θ) = E(logP(x, y|θ
θ
θ)|y,
ˆ
θ
θ
θ)
where
ˆ
θ
θ
θ is an estimate of θ
θ
θ and defined as
ˆ
θ
θ
θ , [
ˆ
κ
1a
ˆ
κ
1b
...
ˆ
κ
na
ˆ
κ
nb
ˆ
β
1a
ˆ
β
1b
...
ˆ
β
na
ˆ
β
nb
ˆ
S
1a
ˆ
S
1b
...
ˆ
S
na
ˆ
S
nb
]
T
.
Hence, on the k
th
iteration, partial differentiation
of the objective function with respect to each of the
elements of
ˆ
θ
θ
θ is performed, set to zero and solved
simultaneously. Due to the large number of param-
eters to be estimated, the equations are solved using
Simultaneous Traffic Flow and Macro Model Estimation for Signalized Junctions with Multiple Input Lanes
159
Unsaturation Case:
ζ(t + 1)
γ
I
(t + 1)
φ(t + 1)
=
0 1 z(t) 0
0 1 0
κ(t) 0 β(t)
ζ(t)
γ
I
(t)
φ(t)
+
w
1
(t)
w
2
(t)
w
3
(t)
γ
I
(t)
φ(t)
γ
O
(t)
=
0 1 0
0 0 1
1 z(t) 0
ζ(t)
γ
I
(t)
φ(t)
+
v
1
(t)
v
2
(t)
v
3
(t)
(6)
Saturation Case:
ζ(t + 1)
γ
I
(t + 1)
φ(t + 1)
=
1 1 0
0 1 0
κ(t) 0 β(t)
ζ(t)
γ
I
(t)
φ(t)
S(t)
0
0
z(t) +
w
1
(t)
w
2
(t)
w
3
(t)
γ
I
(t)
φ(t)
γ
O
(t)
=
0 1 0
0 0 1
0 0 0
ζ(t)
γ
I
(t)
φ(t)
+
0
0
S(t)
z(t) +
v
1
(t)
v
2
(t)
v
3
(t)
(7)
least squares estimation with positive constraints on
the saturation parameters.
Taking the partial derivative of the objective func-
tion with respect to κ
1a
and equating to 0, gives:
ˆ
κ
1a
(k)
N
k=t
ˆq
11,11
(k)
ˆ
ζ
1
a(k 1)
2
=
N
k=t
ˆq
11,11
(k)
ˆ
φ
1a
(k)
ˆ
ζ
1a
(k 1)}
ˆ
β
1a
(k)
N
k=t
ˆq
11,11
(k)
ˆ
φ
1a
(k 1)
ˆ
ζ
1a
(k 1) (8)
Similarly for
ˆ
β
1a
:
ˆ
β
1a
(k)
N
k=t
ˆq
11,11
(k)
ˆ
φ
1a
(k 1)
2
=
N
k=t
{ ˆq
11,11
(k)
ˆ
φ
1a
(k)
ˆ
φ
1a
(k 1)}
ˆ
κ
1a
(k)
N
k=t
ˆq
11,11
(k)
ˆ
φ
1a
(k 1)
ˆ
ζ
1a
(k 1) (9)
For
ˆ
S
1a
under saturated traffic conditions:
N
k=t
ˆq
1,1
(k)[
ˆ
ζ
1a
(k 1) +
ˆ
γ
I
1a
(k 1)]z
1a
(k 1)
ˆq
1,1
(k)
ˆ
ζ
1a
(k)z
1a
(k 1) + ˆr
15,15
(k)
ˆ
γ
O
3
(k)z
1a
(k)
ˆr
15,15
(k)
ˆ
S
2b
(k)z
2b
(k)z
1a
(k)
=
ˆ
S
1a
(k)
N
k=t
ˆr
15,15
(k)
z
1a
(k 1)
2
+ z
1a
(k)
2
(10)
Similarly, the covariances
ˆ
Q and
ˆ
R of the noise are
estimated by Equations (11) and (12), where
ˆ
A,
ˆ
B,
ˆ
C and
ˆ
D are the estimated state space matrices and
ˆ
Q and
ˆ
R are the estimated covariances of Q and R
with ˆr
l, j
and ˆq
l, j
being the estimates of r
l, j
and q
l, j
respectively. The quantities P
k|N
, P
k1,k
, P
k,k1
and
P
k1|N
are pre-computed from the Kalman Smoother
recursions (Chen, 2006).
ˆ
Q =
1
(N 1)
N
k=2
h
(
ˆ
x
k|N
ˆ
A(k 1)
ˆ
x
k1|N
ˆ
B(k 1)z(k 1))
(
ˆ
x
k|N
ˆ
A(k 1)
ˆ
x
k1|N
ˆ
B(k 1)z(k 1))
T
+ P
k|N
ˆ
A(k 1)P
k1,k
P
k,k1
ˆ
A(k 1)
T
+
ˆ
A(k 1)P
k1|N
ˆ
A(k 1)
T
i
(11)
ˆ
R =
1
N
N
k=1
h
(y(k)
ˆ
C(k 1)
ˆ
x
k|N
ˆ
D(k 1)z(k))
(y(k)
ˆ
C(k 1)
ˆ
x
k|N
ˆ
D(k 1)z(k))
T
+
ˆ
C(k 1)P
k|N
ˆ
C(k 1)
T
i
(12)
This process is repeated for all other variables de-
scribing the traffic dynamics within a signalized junc-
tion for unsaturated and saturated traffic conditions.
Equations (8) to (12) denote a batch algorithm which
is not suitable for real-time estimation and control.
Hence a novel modified algorithm for joint estimation
of states, noise and model parameters in quasi real-
time is proposed in the following section.
3.2 The Modified EM Algorithm
The modified EM algorithm is represented in Table 1.
Three main considerations are tackled: i) quasi real-
time implementation, ii) switching conditions and iii)
probing.
i) Quasi Real-Time Implementation: In practical
dynamic traffic situations, traffic conditions change
VEHITS 2017 - 3rd International Conference on Vehicle Technology and Intelligent Transport Systems
160
in real-time. Hence, the standard EM algorithm re-
quiring a sizeable batch of N data points is not suit-
able for online estimation. Instead, to carry out quasi
real-time estimation, the iterative algorithm in Table 1
makes use of two uniform windows, one of fixed time
length ¯n for joint states and parameter estimation, and
another of fixed time length ¯m for noise covariance es-
timation, hence separating the estimation of Q and R
from the estimation of model parameters, as already
discussed. To obtain optimal estimation results, dif-
ferent window sizes, ¯n and ¯m are allowed, but both are
significantly less than N to obtain quasi real-time esti-
mation. Joint parameter and state estimation is carried
out for those particular time points falling inside the
Table 1: EM algorithm for estimation of model parameters.
Initialise estimates for
ˆ
θ
θ
θ,
ˆ
Q and
ˆ
R
Commencing from t= ¯n + 1
Iterate for every time step t and measure y(t).
Iterate for k=(t ¯n),...,t
E-step
Run Kalman-Filter recursions followed by
the Kalman Smoother recursions in order
to compute
ˆ
x
k| ¯n
.
M-step
Maximise G(θ
θ
θ,
ˆ
θ
θ
θ
k
) over θ
θ
θ for
unsaturated conditions including
Equations (8)-(9) and for saturated
conditions including Equations (8)-(10)
with N replaced by ¯n.
Repeat until the log likelihood of
the objective function converges to a
constant value up to a small
predefined tolerance bound.
Update
ˆ
A,
ˆ
B,
ˆ
C,
ˆ
D, with
ˆ
θ
θ
θ
k
to reflect the
traffic conditions per arm.
Example:
ˆ
A=
(
ˆ
A
unsat
· ¯n
unsat
)(
ˆ
A
sat
· ¯n
sat
)
¯n
where
ˆ
A
unsat
and
ˆ
A
sat
represent the state
transition matrix for unsaturation and
saturation respectively, while ¯n
unsat
and
¯n
sat
represent the number of times an arm
is unsaturated or saturated. Hence
¯n= ¯n
unsat
+ ¯n
sat
.
If (t> ¯m) where m represents the size of the
second window
Iterate for k=(t ¯m),...,t
Maximise Q and R as in Equations
(11)-(12) with N replaced by ¯m.
t=t+1
first window, by applying the EM algorithm presented
in Table 1. At every time iteration, the window slides
forward by one instant and the procedure is repeated
again, with initial values for the parameters and the
states being fed from the previous time window. In
the second time window, noise covariance estimation
is carried out for those particular time points falling
inside this window. Tests to establish suitable window
lengths ¯m and ¯n were carried out through simulations
as described in Section IV.
This algorithm reduces the computational and
storage demands for a junction since traffic informa-
tion from sensors, including the inflow and the out-
flow, need not be available as a batch of N samples,
but rather within a much shorter window of ¯n or ¯m
samples.
ii) Switching Conditions: The presented model
is subject to changing traffic conditions, i.e. un-
saturated or saturated traffic conditions per arm and
direction. An arm can exhibit unsaturated or satu-
rated behaviour irrespective of other arms within the
same junction. An arm is saturated if the condition
(
ˆ
ζ
nd
(k) + z
nd
(k)
ˆ
γ
I
nd
(k))(
ˆ
S
nd
(k 1)z
nd
(k)) is satis-
fied with d=a or b denoting the arm for each turn-
ing direction. Conversely, an arm is unsaturated if
(
ˆ
ζ
nd
(k) + z
nd
(k)
ˆ
γ
I
nd
(k))<(
ˆ
S
nd
(k 1)z
nd
(k)). These
switching conditions are estimated through the mod-
ified EM algorithm results. For example, for a three
arm junction with two separate lanes for each direc-
tion a and b, sixty-four (2
3×2
) different combinations
of switching conditions exist. Thus during execution
of the modified EM algorithm, the state space model’s
matrices are all updated to reflect the different traffic
conditions per arm through the use of average weight-
ing. For one time instance, falling within a window
length ¯n, the number of times an arm is in unsaturation
or saturation is noted and average weighting of model
parameters and state space matrices are obtained as
indicated in Table 1.
iii) Probing: A small probing dither signal, con-
sisting of zero mean Gaussian noise with variance of
1 × 10
8
is introduced on the input green timing to
make the parameter estimation process more efficient
and to elicit richer information about the unknown pa-
rameters. This way, the system input is made more
persistently exciting to encourage better estimation
of the time-varying parameters (Astrom and Witten-
mark, 1995).
4 RESULTS
The proposed algorithm for joint estimation of states,
model parameters and noise covariances was tested
Simultaneous Traffic Flow and Macro Model Estimation for Signalized Junctions with Multiple Input Lanes
161
and validated on a signalized 3-arm junction, with
geometry similar to the junction presented in Fig-
ure 1. Two cases were tested: i) the estimation of
states and model parameters, with noise covariances
assumed known and ii) the estimation of states and
model parameters together with process and measure-
ment noise covariances.
A Root Mean Square Error (RMSE) measure is
defined to determine the accuracy of the estimation
results.
Definition 4.1. For some estimate ˆp, the RMSE is
given by the square root of the averaged mean square
error per sample in the time window, defined as:
J ,
s
¯n
(p(t) ˆp(t))
2
¯n
(13)
where p is the actual value.
For the signalized 3-arm junction, due to the un-
availability of actual data from a real junction, mea-
surements of cars entering and leaving each arm were
simulated in Aimsun as Traffic State per second. Traf-
fic light information such as phases and a cycle time
of 90 seconds were introduced to reflect typical traffic
characteristics. The simulation was executed to gen-
erate traffic count measurements similar to a physical
ITS junction purposely fitted with sensors.
Tests were first carried out to determine suitable
window sizes for the modified EM algorithm. To de-
termine ¯n, the expectation stage was executed sep-
arately from the maximization stage with different
window sizes. In addition, Monte Carlo runs with
1000 different realisations were executed for the max-
imization stage, with different window size ¯n, for dif-
ferent traffic conditions. As expected it was noted that
the accuracy of the estimation of states and parame-
ters improved with increasing time lags. However, a
balance between computation efficiency and estima-
tion accuracy needs to be sought. For the inflow, un-
der saturated traffic conditions, with ¯n = 20, the value
of J obtained was 11.5% of the mean inflow measure-
ments. With ¯n = 40, it was 8.5%, thus having only a
3% decrease in accuracy. Hence ¯n = 20 was preferred
over 40.
To determine ¯m, Monte Carlo runs with 1000 dif-
ferent realisations were executed for the maximiza-
tion stage of Q and R. The matrix Euclidean norm
of the estimated covariances,
ˆ
Q and
ˆ
R, represented
as k
ˆ
Qk and k
ˆ
Rk were calculated for different win-
dow sizes and compared with the Euclidean norm of
Q and R as shown in Table 2 and 3. With only a
0.02% difference in the Euclidean norm, ¯m = 1500
was preferred over 2000.
The training data generated by Aimsun, which in-
cludes γ
γ
γ
I
i
, φ
φ
φ
i
, γ
γ
γ
O
i
, i = 1, 2, 3, was used to generate
the sensor readings. The EM algorithm was then exe-
cuted to jointly estimate the states, the model parame-
ters and noise covariances. Table 4 shows some of the
results obtained for the saturation values of this junc-
tion compared with the actual values, averaged over
the whole training time, with a satisfactory % differ-
ence ranging from 0.121% to 1.025%.
To further test the model under different traffic
conditions, fresh validation datasets were generated
from Aimsun. The previously defined measure J for
both known and unknown covariances is shown in Ta-
ble 5. Here J is expressed as a percentage of
r
¯n
p
2
(t)
¯n
to yield a normalized measurement over one window.
For comparison reasons, one figure of merit was com-
puted for both tests shown in the last row of Table 5.
By taking the resultant mean value over all the 12 in-
dividual % RMSE estimates for each test, an average
of 0.501% was obtained when the noise covariances
are known, whilst the average with estimation of noise
covariances was 0.648%. Although the reduction in
accuracy in the second case is very minor, such a re-
duction is expected since more variables were esti-
mated than in the first case.
Figure 2 shows the results for γ
O
1
, one arbitrarily
selected parameter with noise covariance estimation.
Its corresponding parameter as calculated from Aim-
sun is also superimposed showing that the model es-
Table 2: Estimated Covariance
ˆ
Q.
Window
size ¯m
k
ˆ
Qk kQk %
Difference
1000 4.302 1 × 10
7
4.302 ×10
9
1500 9.998 ×
10
8
1 × 10
7
-0.02
2000 1 × 10
7
1 × 10
7
0.00
Table 3: Estimated Covariance
ˆ
R.
Window
size ¯m
k
ˆ
Rk kRk %
Difference
1000 0.110 1 × 10
7
1.10 × 10
8
1500 1 × 10
7
1 × 10
7
0.00
2000 1 × 10
7
1 × 10
7
0.00
Table 4: Estimated results for saturation parameters.
Saturation Estimated
Mean
Expected
mean
%
Difference
ˆ
S
1a
125.411 126 0.467
ˆ
S
1b
48.865 49 0.276
ˆ
S
2a
103.874 104 0.121
ˆ
S
2b
53.799 54 0.372
ˆ
S
3a
31.961 32 0.121
ˆ
S
3b
50.477 51 1.025
VEHITS 2017 - 3rd International Conference on Vehicle Technology and Intelligent Transport Systems
162
Figure 2: One Step Ahead Estimations of outflow.
timates compare highly with the ones obtained from
Aimsun. Aimsun, being a microsimulator, imple-
ments a car-following model known as the Gipps
model (Gipps, 1981) where vehicles accelerate to
achieve the desired speed and decelerate when drivers
have to avoid a collision, while trying to maintain the
desired speed. On the other hand, this study provides
a macrosocopic model, resulting in the general evalu-
ation of the traffic flow behaviour, rather than individ-
ual driver behaviour with its acceleration and decel-
eration instances. Nevertheless, despite this different
approach, Figure 2 only shows very minor discrep-
ancies between the results, which could be attributed
to the significant different nature of macro and micro
models.
In Pecherkova et al. (2008), where known param-
eters are assumed, J = 3.5897 was obtained for the
queue length, with data exhibiting a maximum value
of 40. This represents a RMSE of 8.974% of the max-
imum. In our case, with joint estimation of parame-
ters and noise covariances, for the queue lengths of
each arm we obtained a RMSE of 8.840%, 5.473%
and 6.892% of the maximum respectively, resulting
Table 5: Results on validation datasets with and without
noise estimation.
Estimate % RMSE with
known noise
covariance
% RMSE with
noise covariance
estimation
ˆ
ζ
1
0.016 0.036
ˆ
ζ
2
0.333 0.335
ˆ
ζ
3
1.233 1.248
ˆ
γ
O
1
0.427 0.488
ˆ
γ
O
2
0.401 0.411
ˆ
γ
O
3
0.123 0.123
ˆ
φ
1a
0.170 0.560
ˆ
φ
1b
0.195 0.484
ˆ
φ
2a
0.427 1.104
ˆ
φ
2b
0.210 0.267
ˆ
φ
3a
1.311 1.449
ˆ
φ
3b
1.166 1.269
Average %
RMSE
0.501 0.648
in a relatively smaller average RMSE of 7.068%.
5 CONCLUSIONS
To contribute to the autonomicity of traffic light sys-
tems, this work proposes a quasi real-time macro
model self-estimation method for the state variables,
model parameters and noise covariances describing
the dynamics of traffic flow in a junction with mul-
tiple lanes for each arm. Unlike previous works,
the model parameters are not assumed to be known
apriori. Modifications to the batch approach of the
EM algorithm are presented to jointly estimate the
states, the parameters and the noise covariances of the
model in quasi real-time, by using small time win-
dows of measurements. The results compare well
with Pecherkova et al. (2008) where model param-
eters are assumed to be known and state estimation
only is performed for much simpler traffic junction
macro models having single input-output lanes for
each arm. This highlights the advantages of the EM
algorithm when applied to traffic flow macro models
as explored in this work.
Future work could address improvement of com-
putational efficiency. In the proposed algorithm, uni-
form windows were applied, which look back in time
and move on a time grid dictated by uniform time
lags. Hence, the estimation algorithm is not strictly
a real-time methodology because it requires measure-
ment data to be stored for those time points falling in-
side the window frames. Improvements could be de-
veloped by using the measurement data only once and
without storage (Elliott and Krishnamurthy, 1999),
leading to a full real-time algorithm. To address the
real time integration of control, communications and
computational technologies, future work could inves-
tigate the reduction of strategic sensors per arm by
exploiting the increasing availability of vehicle infor-
mation from car-to-car and car-to-infrastructure com-
munication.
REFERENCES
Astrom, K. J. and Wittenmark, B. (1995). Adaptive Control.
Addison-Wesley, New York.
Beckmann, M., McGuire, C. B., and Winsten, C. B. (1955).
Studies in the Economics of Transportation. The
Cowles, Commission, Yale University Press.
Bishop, C. M. (2009). Pattern Recognition and Machine
Learning. Springer, New York.
Chen, S. (2006). The Application of the Expectation-
Maximization Algorithm to the Identification of Bi-
Simultaneous Traffic Flow and Macro Model Estimation for Signalized Junctions with Multiple Input Lanes
163
ological Models. Master’s thesis, Faculty of the Vir-
ginia Polytechnic Institute and State University.
Dang, X. H., Lee, V. C. S., Ng, W. K., Ciptadi, A., and Ong,
K. L. (2009). An EM-Based Algorithm for Clustering
Data Streams in Sliding Windows. In Proceedings of
the 14th International Conference on Database Sys-
tems for Advanced Applications, Australia, April 21-
23.
Dempster, A., Laird, N. M., and Rubin, D. B. (1977). ML
from incomplete data via the EM algorithm. Journal
of the Royal Statistical Society, Series B 39, 1-38.
Dunn Engineering Associates and Siemens Intelligent
Transporation Systems (2005). Traffic Control Sys-
tems Handbook. Technical report, Federal Highway
Administration.
Elliott, R. J. and Krishnamurthy, V. (1999). New Finite-
Dimensional Filters for Parameter Estimation of
Discrete-Time Linear Gaussian Models. IEEE Trans-
actions on Automatic Control, 44(5):938-951.
Gazis, D. C. (2002). Traffic Theory. Kluwer Academic
Publishers, New York.
Gipps, P. G. (1981). A behavioural car following model for
computer simulation. Transp. Res. B, 15, 403-414.
Homolova, J. (2005). Traffic Flow Control. In Proceed-
ings of the 15th International Conference on Process
Control, Slovak University of Technology, Bratislava,
June 7-10.
Huber, M. (2015). Nonlinear Gaussian Filtering: Theory,
Algorithms, and Applications. KIT Scientific Publish-
ing, Karlsruhe Institute of Technology.
Kratochvilova, J. and Nagy, I. (2004). Local traffic con-
trol of a microregion. Ministry of Transportation,
Czech Republic, National Programme of Research
2004-2009, Projectnum. 1F43A/003/120.
Lighthill, M. J. and Whitham, G. B. (1955). On kinematic
waves. II. A theory of traffic flow on long crowded
roads. In Proceedings of the Royal Society of London,
229, 317-345.
Ljung, L. (1999). System Identification: Theory for the
User. Prentice-Hall, Inc, Sweden.
Mihaylova, L., Boel, R., and Hegyi, A. (2007). Freeway
traffic estimation within particle filtering framework.
Automatica, 43, 290-300.
Olszewski, P. S. (1994). Modeling probability distribution
of delay at signalized intersections. Journal of ad-
vanced transportation, 28:3, 253-274.
Pecherkova, P., Dunik, J., and Flidr, M. (2008). Robotics
Automation and Control, chapter 17, Modelling and
Simultaneous Estimation of State and Parameters of
Traffic System. InTech.
Richards, P. I. (1956). Shock waves on the highway. Oper-
ations Research 4, 42-51.
Sarkka, S. (2013). Bayesian Filtering and Smoothing. Cam-
bridge University Press, Cambridge.
Soderstrom, T. and Stoica, P. (1989). System Identification.
Prentice-Hall, USA.
Viti, F. and van Zuylen, H. J. (2004). Modeling Queues
At Signalized Intersections. In Proceedings of the
83rd Annual Meeting of the Transportation Research
Board, Washington D.C., January 11-15.
Wang, Y., Papageorgiou, M., and Messmer, A. (2008).
Real-time freeway traffic state estimation based on ex-
tended Kalman filter: Adaptive capabilities and real
data testing. Transportation Research Part A, 42,
1340-1358.
Webster, F. V. (1957). Traffic Signal Settings. Technical
report, Road Research Technical Paper, No. 39, Road
Research Laboratory, London.
Zammit, L. C., Fabri, S. G., and Scerri, K. (2016). Joint
state and parameter estimation for a macro traffic junc-
tion model. In Proceedings of the 24th Mediterranean
Conference on Control and Automation, Greece, June
21-24.
VEHITS 2017 - 3rd International Conference on Vehicle Technology and Intelligent Transport Systems
164