Vehicle Speed Prediction using Deep Learning
Joe Lemieux Yuan Ma
Department of Electrical and Computer Engineering Department of Electrical and Computer Engineering
University of Michigan University of Michigan
Dearborn, Mi USA Dearborn, Mi USA
jjlemieu@[Link] myuan@[Link]
Abstract— Global optimization of the energy consumption of data) could result in a sub-optimal solution if the conditions are
dual power source vehicles such as hybrid electric vehicles, plug- changing or the driver does not drive at the same speed the traffic
in hybrid electric vehicles, and plug in fuel cell electric vehicles is flowing.
requires knowledge of the complete route characteristics at the
beginning of the trip. One of the main characteristics is the vehicle The purpose of this study is to investigate if a deep learning
speed profile across the route. The profile will translate directly network based on Stacked Autoencoders(SAE) can learn
into energy requirements for a given vehicle. However, the vehicle features of a freeway section such that, when these features are
speed that a given driver chooses will vary from driver to driver used as the input to a tradition Neural Network that learns a
and from time to time, and may be slower, equal to, or faster than particular driver’s behavior, can accurately predict the vehicle
the average traffic flow. If the specific driver speed profile can be speed at each point over the drive route.
predicted, the energy usage can be optimized across the route
chosen. The purpose of this paper is to research the application of II. RELATED WORK
Deep Learning techniques to this problem to identify at the Much of the research on Deep Learning Networks such as
beginning of a drive cycle the driver specific vehicle speed profile Stacked Autoencoders (SAE) and Deep Belief Networks (DBN)
for an individual driver repeated drive cycle, which can be used in
have focused on image processing. However, some work has
an optimization algorithm to minimize the amount of fossil fuel
energy used during the trip.
been performed on traffic flow prediction. In [1], SAEs were
used to predict the flow of traffic using the Caltrans Performance
Keywords—Deep Learning, Stacked Auto Encoders, Neural Measurement System (PeMS) database. Although the paper
Networks, Traffic Prediction focused on traffic flow, extension to average speed is not
difficult. The performance results of SAEs shows good
I. INTRODUCTION performance on short term prediction, but increasing errors on
As concerns over global climate change, natural resource longer periods. However, this system measured traffic flow on
depletion, and urban pollution levels increase, governments are freeway sections, or the average across the sections vs. a profile
legislating lower and lower levels of CO2 emissions per 100 km. across the freeway. Information was lost and could not be used
This translates directly into reduced consumption / higher fuel for any type of vehicle control.
efficiency of fossil fuel burning vehicles. One way to Another example of an SAE used to define high level
accomplish this goal in a way that meets all drivers’ needs (e.g. features is shown in [3], where unlabeled images are used to
ability to travel over 100 miles between charges) is to use a dual learn high level features that could then be input into a classifier,
energy source vehicle, where one source is “clean” such as a although this step was not performed. This research showed that
battery, and the other is “dirty” such as an internal combustion an SAE can learn features based upon a large set of unlabeled
engine. However, once the “clean” energy is depleted, the data that can successfully identify images. For example, it
“dirty” energy source becomes primary resulting in overall developed a feature identifier (top level neuron) that could
generation of CO2 that is typically lower than the global identify that there was a face in the image with 80.7% accuracy.
optimum minimum CO2 generation for the specific drive cycle. It could be expected that adding a classifier layer could provide
If the vehicle control system is able to predict the energy more accurate identification of images with faces.
used during the complete trip, and also predict energy usage in The DBN is the most common and effective approach
subsections of the trip, it can optimize the balance between among all deep learning models. It is a stack of Restricted
“clean” and “dirty” energy sources to approach or equal the Boltzmann Machines (RBM), each having only one hidden
global optimal minimum CO2 generation. During a trip, the layer. The learned units’ activations of one RBM are used as the
primary vehicle characteristic that drives energy consumption is “data” for the next RBM in the stack. Hinton et al. proposed a
vehicle speed. If vehicle speed at small time increments is way to perform fast greedy learning of a DBN, which learns one
known (i.e. 1-sec intervals), the energy consumption for a given layer at a time [4].
vehicle can be calculated. However, predicting vehicle speed at
the beginning of a trip is difficult as it can be affected by road Huang et al. used DBN for traffic flow prediction combined
conditions and driver behavior. Using data such as average with Multitask Learning [2]. The work of predicting traffic flow
speed across the trip route from public data (i.e. TMC broadcast contains two steps - feature learning and model learning. The
DBN on the bottom of their Deep Architecture was used as the
feature learning model. History traffic flow data was fed into the
DBN to learn the features. Each layer in the DBN is a process of
nonlinear feature transformation. Features learned in the top
layer of the DBN are the most representative feature for the
modeling the data. Moreover, the output of the DBN was fed
into a regression layer to do the prediction. The proposed
method was used on two different datasets, PeMS and EESH, to
do prediction of the traffic flow on highway and stations. The
result of Huang et al. shows that their method performed better
that traditional methods, such as ARIMA model, NN, and so on,
especially for long term and high value traffic flow prediction.
This project uses some of the same concepts in current
research – big data input, multiple layer deep learning networks,
and unsupervised learning of historical data. However, the goal
of current research is to predict average traffic flow, not the
vehicle speed of an individual vehicle. In order to use the results Fig. 1. – TMC Data Extraction
of these predictions to develop an optimal powertrain control B. Drive Cycle Generation and Extraction
strategy, a high-fidelity profile of vehicle speed is required. Our
project attempts to predict this high-fidelity profile of vehicle To generate the driver specific data, vehicles were
speed so an optimal powertrain energy management strategy can instrumented with GPS data logging systems and information
be developed that is customer specific. was logged for every trip the driver took. Data collected
included instantaneous latitude, longitude, speed, altitude,
III. DATA GENERATION heading, time since beginning of trip, and date and time at start
For this project, two kinds of data are needed, one is the of trip. This research used the latitude, longitude, speed, and date
historic driver’s data, which show the driver’s speed profile and time at start of trip information only. Altitude information
along in the route. The other is the historical Traffic Message was not used for this study, but could be used in the future. Over
Channel (TMC) data, a technology for delivering traffic and 700 trips were logged for one driver. Processing of the trip data
travel information to motor vehicle drivers, are downloaded indicated that this driver had multiple repeated routes during this
from a Navteq database, which records all the current flow and time. The route we investigated is shown in figure 2.
freeway flow of all TMC sections in Michigan. Based on the
historic TMC data and driver, we want to predict the driver’s
speed profile along one route at the beginning of the trip. To
create data, two steps were required: extraction of TMC data
from the historical TMC database, and generation of real-world
drive cycle data across one route by a specific driver.
A. TMC Data Extraction
A TMC_data_Query system was implemented, which can
be used to query the complete history traffic flow data in the data
repository given a specific route. This system is shown in figure Fig. 2. Route used: Ann Arbor to Dearborn.
1. The system contains two subsystems:
Route_TMC_mapping and TMC_data_Extraction. The For this study, we chose roadway sections with TMC data as
Route_TMC_mapping subsystem is executed first to map the inputs to our network. Sections of this trip that did not include
route data to the TMC sections, i.e., to extract a minimum TMC data such as neighborhood and private roads were not
sequence of TMC sections that cover the given route. The output included.
of the first part is fed into the second subsystem
TMC_data_Extraction. Given a list of TMC codes, To obtain the necessary speed profile resolution, the route R
TMC_data_Extraction is capable of finding all corresponding was broken into a set of point called Standard Points SP as
history data in the data repository and saves these data into described in [5]. The trip is therefore defined as:
output files, which will be used to generate training and testing
𝑅 ≜ {𝑆𝑃0 , 𝑆𝑃1 , 𝑆𝑃2 , . . . 𝑆𝑃𝑙 }
dataset for the Deep Learning Network.
where l is the number of standard points on the route. The
C++ is the main programming language used here, which
velocity profile V is defined as:
gives a huge improvement in the speed of the program over the
interpreted Matlab environment. Two open C++ libraries 𝑉 ≜ {𝐷𝑉0 , 𝐷𝑉1 , 𝐷𝑉2 . . . 𝐷𝑉𝑙 } (2)
pugixml and boost filesystem were used in this system to ensure
the robustness and speed of program. The processing speed of Where DVi is the velocity of the individual driver at the
TMC_data_Query is 2 seconds per file. standard point i. The vectors V were extracted from the raw
route data and used as the target data for teaching the networks.
From the data we were provided, there were 21 trips on this
route.
IV. NETWORK DEFINITION AND DEVELOPMENT
Our target Deep Learning Network is constructed of two For our research, we used the Geometric Data for the current
parts as shown in Figure 3. Standard Point, and “looked forward” to the upcoming n
standard points, where n varied from 0 to 5.
B. Temporal and Spatial TMC Data
The SAE uses Traffic Message Channel (TMC) data that is
based upon the instantaneous speed along the drive route at the
start of the trip. For each Standard Point n, we used a window of
k TMC points before and after the current point. In addition, we
used the m previous samples of TMC data in the same window.
The SAE input for TMC data is therefore:
C. Driver Specific Speed Data
Fig. 3. Network Architecture
The final set of data that is input to the SAE is the actual
This network was chosen instead of using a traditional neural driver data for the r previous Standard Points before the current
based upon previous work that showed that deep learning Standard Point. The current Standard Point is not used as an
networks can learn features that traditional neural networks can input to the SAE – it is the target value. The final SAE Input is
not. For a repeated drive cycle, our hypothesis is that features then:
such as average speed, slowing traffic, etc. can be predicted and
used to predict the speeds at the standard points for a given
driver.
V. PLANNED EXPERIMENTS
The first part is a deep learning network which includes the
input layer and the N layers above it. In our work, this will be Presently, the driver data has been collected and TMC data
implemented as an SAE with the number of layers and number has been assembled. The route has been mapped and Standard
of units per layer varied through our experiments. The Input Points have been extracted. Teaching of the Stacked Auto
Layer consists of geographic data and speed data for a given Encoder is being performed now. It is expected that all
Standard Point SPn. The speed data is a combination of TMC calculations and comparisons will be completed by the end of
speed data and driver specific speed data. May.
The second part of the network is a prediction layer for a The following experiments will be performed and a
given standard point SPn, which is implemented with a neural comparison of results will be made.
network with one hidden layer that uses the output of the Look forward 0 to 5 Standard Points for Geometric
Stacked Autoencoder as the input. The output is the predicted Data.
driver specific speed at the standard point.
Ramp k from 1 to 5 and m from 0 to 10 for TMC input
The input to the SAE network consists of three components:
data.
1. Road Specific Geometric Data
Ramp r from 1 to 10 for the previous driver speed data.
2. Temporal and Spatial TMC Data
Vary the number of hidden nodes in both the SAE and
3. Driver Specific Speed Data the Neural Network.
A. Road Specific Geometric Data Results will be compared using the Root Mean Squared
The Road Specific Geometric Data consists of data that is Error calculation:
specific to the roadway at the standard point SP n. The data is
based upon the data at the closest Shape Points. Based on ∑𝑄𝑙=1(𝑉(𝑙) − 𝑉̂ (𝑙))2
NAVTEQ definition, shape points are geometric locations that 𝑅𝑀𝑆𝐸 = √
𝑄
are differentiated based on the change of road curvature. The
data at each SPn is: This will be compared to the RMSE of the trip versus the
using the following baseline, non-learned data as the prediction
Relative distance from standard point to upstream of the trip:
shape point - 𝐷𝑆𝑃 (𝑆𝑃𝑛 )
Curvature at the standard point - 𝛿(𝑆𝑃𝑛 ) 1. TMC data along the chosen route at the start of the trip,
Altitude at the standard point - 𝐴𝑙𝑡(𝑆𝑃𝑛 ) used directly.
Number of lanes at the standard point - 𝑙(𝑆𝑃𝑛 ) 2. Average vehicle speed at each TMC point in the route.
Speed limit at the standard point - 𝑉𝑙𝑖𝑚 (𝑆𝑃𝑛 )
3. Posted speed along the route. [2] W. Huang, G. Song, H. Hong, and K. Xie, “Deep Architecture for Traffic
Flow Prediction: Deep Belief Networks With Multitask Learning,” IEEE
VI. CONCLUSIONS Trans. Intell. Transp. Syst., vol. PP, no. 99, pp. 1–11, 2014.
[3] Q. Le, M. Ranzato, R. Monga, M. Devin, K. Chen, G. Corrado, J. Doan,
There are no conclusions at this point. Based upon the and A. Ng, “Building High-level Features Using Large Scale
RMSE values, the optimum values of number of look ahead Unsupervised Learning”, Proceedings of the 29th International
standard points, k, m, and r values, and the number of hidden Conference on Machine Learning, Edinburgh, Scotland, UK 2012.
nodes. From this, a learning model can be developed to provide [4] G. E. Hinton, S. Osindero, and Y.-W. Teh, “A fast learning algorithm for
an predicted drive cycle to an optimum control algorithm. deep belief nets,” Neural Comput., vol. 18, no. 7, pp. 1527–1554, May,
2006.
REFERENCES [5] J. Park, Y. Murphey, R. McGee, J. Kristinsson, M Kuang, and A. Phillips,
“Intelligent Trip Modeling for the Prediction of an Origina-Destination
Traveling Speed Profile” , IEEE Transactions on Intelligent
[1] Y. Lv, Y. Duan, W. Kang, Z. Li, and F.-Y. Wang, “Traffic Flow Transportation Systems, publication TBD
Prediction With Big Data: A Deep Learning Approach,” IEEE Trans. [6] Palm, Rasmus Berg. "Prediction as a candidate for learning deep
Intell. Transp. Syst., vol. PP, no. 99, pp. 1–9, 2014. hierarchical models of data." Technical University of Denmark,
Palm (2012).