Short-Term Traffic Prediction For Edge Computing-Enhanced Autonomous and Connected Cars
Short-Term Traffic Prediction For Edge Computing-Enhanced Autonomous and Connected Cars
4, APRIL 2019
should be able to predict the short-term road traffic conditions ETSI MEC architecture. In general, the development of a traf-
efficiently, and update the strategies/routes back to the ACCs fic prediction algorithm involves the following steps: (1) data
in a nearly road-segment by road-segment manner. This paper collection, (2) data organization, (3) model construction, (4) pa-
aims to address short-term traffic prediction for ACCs under rameters estimation, and (5) model verification. Each of these
the European Telecommunications Standards Institute (ETSI) steps requires a certain level of traffic data (current or historical)
multi-access EC (MEC) architecture, a solution to realize mobile and/or geographic data (e.g., road intersection coordinates). This
edge computing over cellular networks, that exhibits different paper aims to design and implement a data-centric experiment
constraints from conventional cloud computing. platform to facilitate traffic prediction algorithm development:
r specifically, the experiment platform incorporates the func-
A. Literature Review tionalities of OpenStreetMap, which is a collaborative
project that creates free editable geographic data of the
In the literature, short-term traffic prediction has attracted
worlds, and provides the interface with official traffic
extensive research efforts in the past three decades and still
databases (e.g., from Taipei-City Department of Trans-
remains a growingly active research topic nowadays under
portation) to automatically and periodically collect and
the umbrella of the “smart city”. At first, the researchers
parse the latest traffic data according to the geographic
have largely approached such traffic prediction problems
data of the specified areas;
from a classical statistical perspective (e.g., Autoregressive r our platform further transforms the geographic data into
Integrated Moving Average (ARIMA) [3], [4]). Then, with the
graph topological representation of the road networks, al-
dramatically increasing data availability and the advances of the
lowing a user-implemented route planning algorithm to be
computing capability to process such data and of the artificial
embedded into the platform more flexibly;
intelligence (AI) technologies, the recent research interests of r moreover, we also integrate the service of Google Maps
traffic forecasting have been gradually transferred to computa-
Directions API into the platform, by which the model de-
tional intelligence (CI) techniques [5]. Although lacking good
veloper can query the corresponding estimation by Google
theoretical formulation (and thus good model interpretability),
Maps for model performance comparison.
CI approaches, due to their better adaptability, allow to cope
The experiment platform is deployed within the MEC virtu-
with the problems of outliers, missing data and noise [6] and
alization environment as an MEC application.
describe non-linear relationships more effectively, instead.
In addition to the experiment platform design, this paper fur-
More specifically, according to the survey work in [7], the
ther proposes a novel short-term traffic prediction model that
existing traffic prediction methods can be generally divided into
integrates the following two sub-models, considering limited
two categories: parametric approaches and nonparametric ap-
computing resources of MEC servers:
proaches. In parametric approaches, justifiable analytical mod-
Traffic light model: We note that the waiting times at traffic
els (e.g., travel time functions and queueing models) or traffic
lights constitute a significant part of a driver’s total travel
simulation models (macroscopic, microscopic or mesoscopic)
time over a planned route. However, the effects of traffic
are applied, where the structures of the models are established
lights are complicated and have not been rigorously exam-
in advance and then real-time data are used to tune the inputs
ined in most, if not all, of the previous work for traffic fore-
and the parameters. On the other hand, neither the model struc-
casting. This work observes the behavior of traffic lights, an-
tures nor the values of the model parameters of nonparametric
alyzes the queueing time when a driver arrives at the entrance
approaches are predetermined, and are both decided from data.
intersection of a road segment and faces a red light, and de-
Consequently, compared with parametric approaches, nonpara-
rives formulas for the two times that constitute the whole
metric approaches are more flexible. Renowned nonparametric
red-light queueing time: (1) the remaining red-light time and
traffic prediction methods include: classical time series and re-
(2) the time that when the traffic light turns green, the driver
gression modeling and variations [8]–[10], Kalman filter theory
should wait at the traffic light until he/she, following all cars
[11]–[14], support vector regression [15]–[17], artificial neural
ahead, passes the traffic light. Compared with the existing
networks [18]–[20], fuzzy-neural networks [21]–[23], and hy-
models for the fixed-cycle traffic light queueing problem,
brid approaches that integrate the advantages of different types
our model considers real-time traffic signal timing informa-
of prediction methods [24]–[26].
tion from the government transportation department. More-
Although the CI approaches to short-term traffic prediction
over, we develop two computationally efficient approxima-
show good performance, due to their feature of high compu-
tions for the derivation of the red-light queueing time.
tational requirement, they may not be directly applicable to
Vehicle velocity model: To forecast the vehicle velocity
MEC environments that are equipped with limited computing
over a road segment, we propose a low-complexity semi-
resources, compared with a conventional cloud server. To the
parametric prediction model. As indicated in [23], road
best of our knowledge, none of the recent related works have
traffic typically exhibits obvious periodic patterns on a daily
investigated short-term traffic prediction for MEC taking into
basis. However, few studies take such periodic features into
account its characteristics and constraints.
account for traffic prediction (see the discussion in [23]
and related references therein). To address this, this paper
B. Motivations and New Contributions proposes using the mean of the traffic values observed at
This paper investigates traffic prediction systematically from the time point of a day to be estimated as the base of the
both the platform and model perspectives for ACCs under the prediction. Then, to capture the effects of dynamic road
3142 IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY, VOL. 68, NO. 4, APRIL 2019
TABLE I
THE GRAPH TABLE
route into several road segments, and estimate the time needed
on each segment, respectively. Finally, all travel times of the seg-
ments will be summed up as the total travel time of the whole
route. Note that the TP can retrieve the related historical traffic
data from the TIB. In this paper, we propose a novel traffic pre-
diction model, which will be elaborated on in Section III. The
TP will run this traffic prediction model by default. However,
users can deploy and substitute their own prediction model for Fig. 6. The queueing and passing times of a road segment.
it. Moreover, because the proposed traffic prediction model is
based on empirical data, the related historical traffic data for
Algorithm 1: Travel Time Estimation.
prediction will be obtained from the TIB.
4) Experiment Controller (EC): The EC manages the exe- 1: Input:
cution of the platform. The input is the OD pair requested by the 2: Route r, which consists of K(r) road segments;
user, and the output is the accuracy ratio of the estimated travel 3: Departure time Tr ;
time between the OD pair. The EC contains two entities: the 4:
Experiment Manager (EM), and the Accuracy Ratio Calculator 5: Output:
(ARC): 6: Estimated travel time tv (r, Tr ) of route r;
r The EM is responsible for handling the interactions be- 7:
tween other system components. When the EM receives 8: Initialization:
the OD pair, it will call the RC to return a route. Next, the 9: τ1 := Tr ;
EM will send the route to the TP and the GMQ respectively 10:
in order to get the travel time of the route. 11: Procedure:
r The ARC is responsible for calculating the accuracy ratios 12: for k := 1 → K(r) do
of the travel times sent from the TP and the GMQ. Specif- 13: Estimate tq (k, τk );
ically, the result that will be returned to the user includes 14: Estimate tp (k, τk + tq (k, τk ));
two accuracy ratios: one is the accuracy ratio between the 15: tv (k, τk ) = tq (k, τk ) + tp (k, τk + tq (k, τk ));
traffic prediction model and the actual traffic conditions; 16: τk +1 = τk + tv (k, τk );
the other one is the accuracy ratio between Google Maps 17: end for K (r )
and the actual traffic conditions. 18: tv (r, Tr ) ← k =1 tv (k, τk );
5) Google Maps Querier (GMQ): The GMQ is responsible
for querying the travel time from origin to destination estimated
by Google Maps. The input is the route from the RC (the same 3) Initialization stage: This stage (line 1) initializes the
as the input of TP), and the output is the total travel time of entering time τ1 into road segment 1 as the departure
the route. The GMQ contains two entities: the Google Maps time Tr .
Directions API (GMD-API) and the Duration in Traffic Parser 4) P rocedure: After initialization, the main procedure is
(DITP): started from line 1 to line 1. Starting from road segment 1
r The GMD-API is the service that provides detailed infor- of route r with starting time Tr , the procedure iteratively
mation about different routings from places to places via estimates the travel time tv (k, τk ) of each segment k and
HTTP requests. the entering time τk +1 into the next road segment k + 1
r The DITP is responsible for parsing the travel time of the (line 12). The travel time tv (k, τk ) can be divided into the
route estimated by Google Maps. following two parts:
r The queueing time tq (k, τk ) at the traffic light of the
entrance intersection of road segment k: When driver
III. THE PROCEDURE FOR TRAVEL TIME ESTIMATION
d arrives at the entrance intersection of road segment k
As mentioned in Section II-C3, we propose a traffic prediction and encounters a green traffic light (e.g., the entrance
model and implement it in TP to estimate the total travel time intersection of segment 2 in Fig. 6), d simply passes
of a route. This section describes the procedure our proposed the traffic light and tq (k, τk ) will be zero. On the other
traffic prediction model follows to estimate the travel time over hand, if d encounters a red traffic light, d needs to spend
a route candidate r for a driver d who wants to pass through r time queueing in front of the traffic light before travel-
at time Tr . The overall operation of the prediction procedure is ing over road segment k. Line 1 estimates tq (k, τk ) by
depicted in Algorithm 1, which is elaborated on in the following. using our proposed traffic-light model, which will be
1) Input parameters: Algorithm 1 takes two input param- discussed in Section IV.
eters: route r and the corresponding departure time Tr r The passing time tp (k, τk + tq (k, τk )) through road
(lines 1-1), where r consists of K(r) road segments as segment k: After the queueing time tq (k, τk ), driver d
Fig. 6 illustrates. will leave the traffic light at τk + tq (k, τk ). Line 1 of the
2) Output result: The output of Algorithm 1 (line 1) is main procedure further estimates the time tp (k, τk +
the estimated total travel time tv (r, Tr ) over r starting at tq (k, τk )) required by d to pass through road segment
time Tr . k by applying our proposed vehicle velocity prediction
3146 IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY, VOL. 68, NO. 4, APRIL 2019
K (r )
tv (r, Tr ) = tv (k, τk ), (1)
Fig. 7. A signal timing plan for a traffic light.
k =1
where derived as
tv (k, τk ) = tq (k, τk ) + tp (k, τk + tq (k, τk )). (2) tlf (k, τk ) = tc (k, τk ) − {[τk − τs (k, τk ) − to (k, τk )]
mod tc (k, τk )}. (4)
IV. THE TRAFFIC LIGHT MODEL
Besides, the elapsed red time tlb (k, τk ) (see Fig. 7) that will be
This section explains our model that estimates the queueing used to derive tw (k, τk ) in the next subsection can be obtained
time tq (k, τk ) at a traffic light. Note that when driver d arrives as
at the entrance intersection of road segment k at time point
τk , d can face a green light or a red light. Clearly, when the tlb (k, τk ) = tr (k, τk ) − tlf (k, τk ). (5)
traffic light is in the green phase, there is no queueing time, and
tq (k, τk ) = 0. However, if the traffic light is in the red phase, B. tw (k, τk ) Time
the time tq (k, τk ) needed for queueing in front of the traffic The tw (k, τk ) time depends on how many cars have arrived
light includes the remaining red time tlf (k, τk ), and the time and waited at the red light during the elapsed red time tlb (k, τk )
tw (k, τk ) that when the traffic light turns green, driver d should at time τk when driver d reaches the entrance intersection of
wait at the traffic light until he/she, following all cars ahead, segment k (see Fig. 7). Note that tlb (k, τk ) can be derived using
passes the traffic light. Therefore, tq (k, τk ) in this case can be Eq. (5) in the previous subsection. Assume that the cars arriving
expressed as at the entrance intersection of segment k follows a P oisson
process with arrival rate λ(k). In this case, the number of cars
tq (k, τk ) = tlf (k, τk ) + tw (k, τk ). (3)
Ncl (k, τk ) accumulating in front of driver d during tlb (k, τk )
In Eq. (3), the two times tlf (k, τk ) and tw (k, τk ) can be further is P oisson distributed with mean and variance both equal to
derived in the following two subsections. λ(k) tlb (k, τk ). Moreover, of these Ncl (k, τk ) + 1 cars (includ-
ing driver d’s car), let tI (υ, k) (υ ∈ [1, Ncl (k, τk )]) be, upon
the traffic light turns green, the interval between the two time
A. tlf (k, τk ) Time points when car υ and car υ + 1 pass through the traffic light,
To derive tlf (k, τk ), we first consider the operation of a traffic respectively. Then, tw (k, τk ) can be expressed as
light. A traffic light follows pre-defined signal timing plans N cl (k ,τ k )
to transit among the green, yellow and red phases, depending tw (k, τk ) = tI (υ, k). (6)
on the time of day (midnight, rush hours, or non-rush hours). υ =1
Assume that when driver d arrives at the entrance intersection of
segment k at τk , the traffic light of that intersection is executing If tI (υ, k) follows an exponential distribution with probabil-
a signal timing plan which starts from time point τs (k, τk ), as ity density function ft I (υ ,k ) (s) = ϕe−ϕs , mean 1/ϕ and vari-
illustrated in Fig. 7. Moreover, this signal timing plan specifies ance 1/ϕ2 , from (6), tw (k, τk )’s probability density function
that a green, a yellow and a red phases of lengths tg (k, τk ), ft w (k ,τ k ) (s) can be expressed as
ty (k, τk ) and tr (k, τk ), respectively, constitute a cycle of length ⎧ ∞
e−[λ(k ) t b (k ,τ k )]
l
⎪
⎪ ft w (k ,τ k ) (s) =
tc (k, τk ). ⎪
⎪ n =1
⎪
⎪ [λ(k) tlb (k, τk )]n
Note that Fig. 7 also shows an offset period to (k, τk ), which is ⎪
⎪
⎪
⎨ ×
used to coordinate the operation of consecutive traffic lights so
n!
that cars can pass through consecutive road segments without ϕ n (7)
⎪
⎪ × sn −1 e−ϕs for s > 0,
stopping. All the above traffic signal timing information can ⎪
⎪ (n − 1)!
⎪
⎪
be obtained from the government transportation department. ⎪
⎪
⎪
⎩
P (tw (k, τk ) = 0) = e−[λ(k ) t b (k ,τ k )]
l
With such information, the remaining red time tlf (k, τk ) can be for s = 0,
YANG et al.: SHORT-TERM TRAFFIC PREDICTION FOR EDGE COMPUTING-ENHANCED AUTONOMOUS AND CONNECTED CARS 3147
where the mean E[tw (k, τk )], variance V ar[tw (k, τk )], and
skewness κ can be further derived as follows [29]:
E[tw (k, τk )] = λ(k) tlb (k, τk )/ϕ,
V ar[tw (k, τk )] = 2λ(k) tlb (k, τk )/ϕ2 , and
κ= 3/ 2λ(k) tlb (k, τk ). (8)
Eq. (7) is not a closed form solution and can be approximated
by the following two approaches.
Normal approximation: We can use the normal distribu-
tion N (E[tw (k, τk )], V ar[tw (k, τk )]) with the same mean
and variance as the tw (k, τk ) time to approximate the dis-
tribution of tw (k, τk ), where the mean E[tw (k, τk )] and
variance V ar[tw (k, τk )] have been provided in (8).
Shifted gamma approximation: Another approach is to
use a shifted gamma distribution with probability density
βα α −1 −β (s−δ )
function ft w (k ,τ k ) (s) = Γ(α ) (s − δ) e for s ≥ δ,
2
√
mean δ + (α/β), variance α/β , and skewness 2/ α, to
approximate tw (k, τk )’s distribution. Similarly, we should
use the mean, variance and skewness of tw (k, τk ), provided
in (8), to set the corresponding values of the shifted gamma
distribution. Then, solving the following system of equa-
tions
⎧ α
⎪
⎪ E[tw (k, τk )] = δ + ,
⎪
⎨ β
α
V ar[tw (k, τk )] = 2 , (9)
⎪
⎪ β
⎪
⎩ κ = √2 ,
α
we obtain
Fig. 8. Velocity series.
4
α = 2,
κ
2 the traffic behaviors in Taipei City, Taiwan. Fig. 8 shows the
β=
, and
V ar[tw (k, τk )] κ velocity Zk ,t series observed on a certain road segment during
different days, where weekdays and weekends are investigated
2 V ar[tw (k, τk )] separately.
δ = E[tw (k, τk )] − .
κ This figure indicates that the Zk ,t values at the same time-step
during the observed consecutive days (e.g., [7:10, 7:11] from
V. THE VEHICLE VELOCITY PREDICTION MODEL
2015-09-21 to 2015-09-25 for the weekday case, and [8:25,
To estimate the passing time tp (k, τk + tq (k, τk )) of driver 8:26] on 2015-09-19, 20, 26, and 27 for the weekend case) are
d through road segment k at line 14 of Algorithm 1, this sec- close. That is, the velocity series exhibits repetitive patterns on
tion proposes a low-complexity semi-parametric vehicle veloc- a daily basis. Note that such phenomenon are also observed
ity prediction model. First, through intensive investigation of on most of other road segments. However, due to the space
real traffic data, we observe that road traffic exhibits similar limitation, the corresponding details are omitted. Those readers
characteristics on a daily basis. Therefore, we propose using the who are interested in these statistical road traffic data are referred
mean of the traffic values observed at the time point of a day to to [31].
be estimated as the base of the prediction. Then, to capture the Inspired by this observation, we claim that when predicting
effects of dynamic road events, we exploit statistical techniques the velocity value at a given time-step t, the mean of the velocity
to extract spatial and temporal correlations from the empirical values at this t during the past few days can serve as the basis
traffic data. These correlations are subsequently used to formu- of an accurate prediction. To be more specific, let Zkd,t be the
late a linear model for estimating the discrepancies between the observed on road k at time-step t of day d, and
velocity value
(base) mean traffic values and the real traffic values. X̄k ,t = ( li=1 Zkd−i
,t )/l be the long-term average velocity at this
t, which can be obtained directly from the historical data. Then,
A. Empirical Data-Based Vehicle Velocity Prediction Model we can express Zkd,t as
We collect realistic road traffic data from the Ministry of
Transportation and Communications, Taiwan [30] to analyze Zkd,t = X̄k ,t + Ykd,t , (10)
3148 IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY, VOL. 68, NO. 4, APRIL 2019
Ykd,t . This result is consistent with the fact that if the traffic on
some road segments is congested, their immediately following
road segments will have a high probability to be congested later
as well.
TABLE II
THE IMPROVEMENT RATIOS UNDER DIFFERENT (m, n) SETTINGS
IN THE STT MODEL
[21] C. Quek, M. Pasquier, and B. B. S. Lim, “Pop-traffic: A novel fuzzy Yu-Ju Su received the B.S. degree in computer sci-
neural approach to road traffic analysis and prediction,” IEEE Trans. Intell. ence and information engineering from the Chang
Transp. Syst., vol. 7, no. 2, pp. 133–146, Jun. 2006. Gung University, Taoyuan, Taiwan, in 2014, and the
[22] L. Dimitriou, T. Tsekeris, and A. Stathopoulos, “Adaptive hybrid fuzzy M.Sc. degree in communications engineering from
rule-based system approach for modeling and predicting urban traffic National Tsing Hua University, Hsinchu, Taiwan, in
flow,” Transp. Res. Part C: Emerg. Technol., vol. 16, no. 5, pp. 554–573, 2016. Since 2017, she has been an Android Media
Oct. 2008. Framework Engineer with MediaTek, Inc., Hsinchu,
[23] J. Tang, F. Liu, Y. Zou, W. Zhang, and Y. Wang, “An improved fuzzy neural Taiwan. Her current research interests include image
network for traffic speed prediction considering periodic characteristic,” compression and framework performance optimiza-
IEEE Trans. Intell. Transp. Syst., vol. 18, no. 9, pp. 2340–2350, Sep. 2017. tion.
[24] W. Zheng, D.-H. Lee, and Q. Shi, “Short-term freeway traffic flow pre-
diction: Bayesian combined neural network approach,” J. Transp. Eng.,
vol. 132, no. 2, pp. 114–121, Feb. 2006.
[25] K. Hamad, M. T. Shourijeh, E. Lee, and A. Faghri, “Near-term travel
speed prediction utilizing Hilbert-Huang transform,” Comput.-Aided Civil
Infrastructure Eng., vol. 24, no. 8, pp. 551–576, Nov. 2009.
[26] J. Tang, H. Wang, Y. Wang, X. Liu, and F. Liu, “Hybrid prediction approach
based on weekly similarities of traffic flow for different temporal scales,”
Transp. Res. Record: J. Transp. Res. Board, vol. 2443, pp. 21–31, Oct.
2014.
[27] W. Zeng and R. L. Church, “Finding shortest paths on real road networks:
The case for a*,” Int. J. Geographical Inf. Sci., vol. 23, no. 4, pp. 531–543, Yao-Yuan Chang received the B.S. degree in com-
2009. munications, navigation, and control engineering
[28] A. Furieri, “SpatiaLite,” 2012. [Online]. https://www.gaia-gis.it/fossil/ from the National Taiwan Ocean University, Keelung,
libspatialite/index. Accessed on: Aug. 13, 2012. Taiwan, in 2017. He is currently working toward
[29] S. M. Ross, Stochastic Processes, 2nd ed. New York, NY, USA: Wiley, the M.Sc. degree with the Institute of Communica-
1996. tions Engineering, National Tsing Hua University,
[30] “Real-time traffic database,” Institute of Transportation, Ministry of Hsinchu, Taiwan. In 2017, he joined the Wireless and
Transportation and Communications, Taiwan. 2018. [Online]. Available: Mobile Network Laboratory, Department of Com-
http://www.iot.gov.tw/ puter Science, Institute of Information Systems and
[31] H.-C. Chang and S.-R. Yang, “Temporal and spatial correlations Applications, and Institute of Communications Engi-
of road traffic data in Taipei city, Taiwan,” National Tsing Hua neering, National Tsing Hua University. His current
Univ., Hsinchu, Taiwan, Tech. Rep., Mar. 2018. [Online]. Available: research interests include multi-access edge computing, machine learning, and
http://www.cs.nthu.edu.tw/ sryang/submission/TSCRTDiTCT.pdf performance modeling.
[32] A. Bjorck, Numerical Methods for Least Squares Problems. Philadelphia,
PA, USA: SIAM, 1996.
[33] T. Vincenty, “Direct and inverse solutions of geodesics on the ellipsoid
with application of nested equations,” Survey Rev., vol. 23, no. 176, pp. 88–
93, 2013.