A Deep Learning Approach for Macroscopic Energy Consumption Prediction with Microscopic Quality for Electric Vehicles

by   Ayman Moawad, et al.
Argonne National Laboratory

This paper presents a machine learning approach to model the electric consumption of electric vehicles at macroscopic level, i.e., in the absence of a speed profile, while preserving microscopic level accuracy. For this work, we leveraged a high-performance, agent-based transportation tool to model trips that occur in the Greater Chicago region under various scenario changes, along with physics-based modeling and simulation tools to provide high-fidelity energy consumption values. The generated results constitute a very large dataset of vehicle-route energy outcomes that capture variability in vehicle and routing setting, and in which high-fidelity time series of vehicle speed dynamics is masked. We show that although all internal dynamics that affect energy consumption are masked, it is possible to learn aggregate-level energy consumption values quite accurately with a deep learning approach. When large-scale data is available, and with carefully tailored feature engineering, a well-designed model can overcome and retrieve latent information. This model has been deployed and integrated within POLARIS Transportation System Simulation Tool to support real-time behavioral transportation models for individual charging decision-making, and rerouting of electric vehicles.



There are no comments yet.


page 1

page 3

page 10


Vehicle Speed Prediction using Deep Learning

Global optimization of the energy consumption of dual power source vehic...

A Real-Time Energy and Cost Efficient Vehicle Route Assignment Neural Recommender System

This paper presents a neural network recommender system algorithm for as...

Extended vehicle energy dataset (eVED): an enhanced large-scale dataset for deep learning on vehicle trip energy consumption

This work presents an extended version of the Vehicle Energy Dataset (VE...

Data-Driven Prediction of Route-Level Energy Use for Mixed-Vehicle Transit Fleets

Due to increasing concerns about environmental impact, operating costs, ...

Effects of Electric Vehicle Adoption for State-Wide Intercity Trips on the Emission Saving and Energy Consumption

Electric vehicles (EVs) are considered as sustainable alternatives to co...

Soft Constraint Logic Programming for Electric Vehicle Travel Optimization

Soft Constraint Logic Programming is a natural and flexible declarative ...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

I Introduction

The energy consumption impacts of battery electric vehicles (EVs) have been well studied under standard drive cycles ([moawad_assessment_2016], [islam_extensive_2018], [islam_energy_2020], [islam_energy_2021]), and have shown promise as a solution to reduce emissions and dependence on petroleum. Although regulatory cycles are a good way to standardize energy benefit studies, they fail to represent real driving conditions and traffic variability. Therefore, recent research focuses on the predictability of energy consumption in EVs in more realistic settings, which would yield large impacts in many application fields, from driver range-anxiety studies, routing choices, eco-routing, and fleet management of shared vehicles or freight, to power grid and charging infrastructure requirements.

The driving and charging behavior of EV drivers is key to properly modeling an entire transportation system. Because EV penetration is expected to increase throughout the system, charging loads, needs, and routing decisions will change significantly. For example, the charging behavior of medium- and heavy-duty trucks (MD/HDTs) and transportation network company (TNC) vehicles can significantly disrupt the network, affecting EV charging station capacity and location. This new trend calls for better planning, namely by estimating EV charging demand needs under heterogeneous driving behaviors, various traffic conditions, and a variety of scenarios and EV technologies to tackle the true scale of the impact. A series of tools developed at Argonne help provide a pathway to simulate these high quality data. In section

II-A, we provide some details about our experimental design and the data generation process to address such a diversified setup. One critical component in identifying charging demand is tracking the state of charge (SOC) of a vehicle’s battery (Figure 1). Battery SOC evolution over a given trip, and generally throughout the day, is highly influenced by the battery capacity, initial SOC (i.e., the initial energy content of the battery), the anticipated route, and the subsequent dynamics of the vehicle. Therefore, in this work we focus on the predictability of battery energy depletion by looking at link-level (road segment) consumption over an expected trip. By accurately understanding battery consumption over large regions, transportation demand modeling tools can identify charging needs and predict when travelers are likely to schedule their charging trip based on their daily set of activities. We leverage the agent-based transportation tool POLARIS ([auld2016polaris]) to model all trips, activities, and vehicle distribution across the Greater Chicago region under various scenario changes. This data is then paired with the physics-based modeling and simulation tool Autonomie222Autonomie is a MATLAB-based software environment and framework for automotive modeling, control system design, simulation, and analysis. to produce large-scale energy consumption estimates. The results we generate serve as a very large backbone dataset of vehicle, route and energy outcomes that capture variability in vehicle classes, powertrain fleet distribution, vehicle technology, automation and connectivity levels, population, driving modes, ride sharing magnitude, e-commerce impact, and other factors, all of which impact traffic and driving behavior.

In section II and III, the development of a machine learning approach to efficiently estimate the link-level energy consumption of EVs over various routes using this dataset is described. We define a route as a sequence of links in which little internal dynamics information is known (i.e., vehicle speed dynamics is masked). In section IV, we summarize model results and argue that, when large-scale, rich, diversified, and carefully designed trip data is available, it is possible to learn aggregate-level energy consumption values quite accurately without high-fidelity speed profiles. As shown in Figure 1, with deployment goals in mind, the model needs to be lightweight, efficient, and scalable for subsequent integration into transportation systems, allowing real-time (on-the-road) querying of energy consumption and anticipated SOC, leading to a better understanding of charging demand across any given region. In section V, the deployment of the model developed is shown for the case of POLARIS with preliminary metrics of prediction accuracy and computational load with and without querying hundreds of thousands of predictions.

Fig. 1: Example flowchart of charging behavior scheduling/planning by transportation system agents. In this flow, an embedded real-time energy consumption prediction model helps anticipate SOC depletion in upcoming links of a trip. Charging decisions can be planned accordingly for every agent.

Ii Data and Learning Setup

Ii-a Data Generation Process

In order to determine the energy consumption of a metropolitan area under varying conditions, it is necessary to model the entire transportation system. Activity demand is generated to become the basis for the generation of trips. Trips generate traffic flow, which in turn affects average trip speed. Trip information at the link level can then be used along with powertrain information to inform fuel consumption. Autonomie333Autonomie is a MATLAB-based software environment and framework for automotive modeling, control system design, simulation, and analysis. ([freyermuth_energy_2019] and [freyermuth_powertrain_2020]), POLARIS ([auld2016polaris] and [gurumurthy2020integrating]) and SVTrip ([karbowski_trip_2014]) presents a complete workflow to study this complex and multidimensional system, as shown in Figure 2.

POLARIS is used to develop and validate a transportation system model for the Chicago Metropolitan Area. It uses population and vehicle synthesis, calibrated with Census data for the region, along with a complete activity demand generation and scheduling, and subsequent traffic simulation, to model the entire transportation system. On simulating trips in a region, link-level trajectories for all vehicle trips tied with vehicle characteristics is obtained. This route information is fed into SVTrip, which predicts 1-Hz speed profiles for each trip to extract microscopic changes in vehicle movement across a link. The resulting detailed trajectory data is then simulated with Autonomie to estimate the energy consumption of the transportation network for different vehicle technologies. This workflow provides energy estimates in an offline simulation based, high-performance computing setting, and in a one-way (POLARIS SVTrip Autonomie), slow and computationally demanding environment. Because of the high fidelity of the different pieces involved in the workflow, this setup provides accurate energy outcomes. However, it is inadequate for online, on-demand energy calls in which the mobility context is constantly changing, and in which real-time decisions need to be made, such as on-road EV charging decisions and rerouting.

Fig. 2: Data Generation and Training Process (grey box). After training, the model is deployed as a standalone model and integrated into POLARIS Transportation System to make on-demand queries of energy needs, and anticipate SOC status for new simulated agents (light blue box).

Ii-B Masking and Latent Energy Learning

The macroscopic-level trips generated from POLARIS in the workflow in Section II-A contain very basic information (expected average speed over link sequence) about the inner traffic dynamics (Figure 3). The goal is to learn energy consumption on that incomplete summary-level information of the dynamics. Typically, high-resolution speed behavior is key to estimating the energy profile. However, in our setting the learning occurs without it: learn the relationship between high-level route structure and vehicle feature interactions to understand how they correlate with the energy consumed. As a result, in the process described in Figure 2, the high-fidelity time series of vehicle speed dynamics is masked. The data used to train the energy model contain vehicle parameters and high-level aggregated route information only (i.e., macroscopic-level data). This approach is consistent with the information available in real-world situations (e.g., route information from HERE or Google maps). Correspondingly, POLARIS provides trajectory information at the link-level. Generated trips include details about the expected link average speed, link length, speed limits, and similar level parameters. Major vehicle attributes are generally considered available and known; if not, they can generally be retrieved as shown in [XAI_moawad] (vehicle weight, battery size, etc.). Therefore, vehicle information is needed and considered as input to the modeling. Although all internal dynamics that affect energy consumption are masked, we show that it is possible to learn aggregate-level energy consumption values quite accurately with a deep-learning approach. When large-scale data is available, and with some tailored feature engineering, such a model can overcome latent information.

Fig. 3: Macroscopic level trip information.

Ii-C The Data

Several scenarios have been defined to cover current and potential future vehicle specifications and transportation behaviors. These scenarios vary in time frame, connectivity and automation, ride sharing, freight systems, and other factors. One scenario reflects today’s situation, where most vehicles are privately owned. Other scenarios represent a short-term future where technology enables people to significantly increase the use of transit, car and ride sharing, and multi-modal travel. Partial automation is introduced, but it is mainly limited to the highway system. Later scenarios represent the long-term future where technology has taken over, enabling high usage of ride sharing and multi-modal trips, which are are convenient and affordable. As a result, private ownership has decreased and e-commerce is common, as is telecommuting. Partially and fully automated vehicles are widely accessible. This extends to scenarios where fully automated vehicles within households are common, and personal ownership results in a low ride-sharing market. The ability to own autonomous vehicles may lead to lower e-commerce and alternative work schedules, and feed urban sprawl. In each scenario the transportation system as a whole is affected, which causes rich and diverse mobility behavior. In addition, with moving time frames, vehicle technologies develop and diversify; in other words, vehicle specifications, power and efficiency maps, component sizes, and other vehicle aspects are affected. This design of simulation creates a dataset that covers a large portion of the sample space. It generates enough examples to model the joint distribution over the vehicle and route features, which allows the subsequent deep-learning model to learn systematic relationships and energy outcomes under a variety of cases. The generated data contains hundred of thousands of EV trips over 30,000+ Chicago links, among more than 3.5 million trips of all types of powertrains (conventional, hybrid vehicles, plug-in hybrids, fuel cells, etc.). It accommodates a wide range of light-duty vehicles, such as compact, midsize, sports utility, pickups, as well as MD/HDT, such as class 3, class 4, class 6, and 8 trucks with different vocations such as pickup and delivery trucks, walk-in, van, box, long-haul, and others. Figure

4 shows a sample count of powertrains and class distribution. As explained before, battery EVs are modeled with varying electric ranges, component sizes, specifications, automation levels (no automation, partial automation, full automation), and other parameters.

Fig. 4: Sample fleet distribution count over vehicle powertrains and classes modeled in a scenario. The battery EV data constitutes the core of the training set.

Figure 5

shows the distribution and summary statistics of the electric consumption of battery EVs over trips. The electric consumption values are in Wh. We see that the mean is significantly higher than the median, which indicates a large variance of consumption values.

Electric Consumption [Wh]
Statistic Value
Count 342920
Mean 3379.8
Std. Deviation 5084.9
Minimum 12.6
25%ile 695
50%ile 1785.9
75%ile 3930.6
Maximum 98398.3
Fig. 5: Training data summary statistics. Close to 350,000 EV trips (0.8 split) are sampled from the set of simulated trips.

Ii-D Initial Feature Engineering

Let be the sample space of data for trips. is a trip with links and dimensions so that , where is a link. We define and as the vehicle features and link features respectively with dimensional features. The labels

represent the electric consumption of vehicles on each link. As a result, the data is constructed as a rank 3 tensor of (

trips, links, features). The

features are concatenated from the vectors of vehicle and route features, along with manually feature-engineered ones. As explained before, raw route features data from a macroscopic framework, such as in POLARIS, provide very limited route information. Figure

6 shows the seven main POLARIS link-level activity outputs. These include a link ID, the link entering time for the vehicle, the link length, the expected stop duration on link, the expected link travel time, the expected average speed on link, and the speed limit on link. Because vehicles do not enter or exit the same link at the same time or in the same way, similar (or even identical) links do not necessarily yield similar energy profiles. In a given trip, a route is composed of a sequence of links and the energy consumed will depend on what happened in previous links and what is expected to happen on the next links. In other words, the structure of the current link (the focus) along with the surrounding behavior (the context) will dictate how much energy is expected to be consumed. This a priori known fact embodies our intuition to construct and engineer explicit features to recover a portion of such hidden dynamics (e.g., delta speed of surrounding links). Such macroscopic-level dynamics are the aftereffects of more granular microscopic changes. Designed features that capture sequence dependencies will explicitly guide and inform the model training to learn microscopic latent behavior.

Fig. 6: Data Construct from raw Autonomie and POLARIS outputs for trips, sequenced over a series of links, each described by vehicle and route features. Data is carefully analyzed, processed, and augmented with additional engineered features.

In the dataset used, we have the dimensionality of the vehicle features, and the dimensionality of the link features, so that . includes vehicle data such as vehicle class, weight, battery size, frontal area, etc. includes raw route features from macroscopic-level data, in addition to feature engineered ones, such as delta link speeds, delta length, naive congestion calculations comparing average expected speed to speed limits, and other calculated variables.

Ii-D1 The Problem of Varying Trip Length

Trips have different lengths based on traveler, activity, and their home locations. It is common to use zero padding to equalize data points to the same shape. However, in this case, the number of links can vary from 1 to 284, and padding jeopardizes the accuracy of the model by introducing irrelevant data. To better train the model, we experimented with different ways of batching the link sequence data, which had high variance in trip length. In one trial, we grouped the data by similar trip length (with shuffling at the end of each epoch to introduce noise) to minimize padding within a batch. On grouping by similar trip length, we further experimented with quantile bucketing and binning of different sizes. That is, if

, we discretize the range of trip length into levels . Based on this discretization, we partition the dataset into disjoint groups , where if . Then, for each group , we map all data points in into through padding zeros. In another trial, at the expense of less noise during training, we grouped the sequence data by exactly the same trip length to completely avoid padding. The latter approach yielded the best result.

Iii The Model

Iii-a Setup

Our goal is to build a model that can accurately estimate the electric consumption of EVs under large vehicle, roads, trips, and driving variability. Although we have features that seem to directly impact energy consumption, such as trip length, average speed, vehicle weight, there are significant difficulties in modeling the energy consumption explicitly at the link level. It is hard to capture the interactions between links. For example, since the fuel consumption rates for acceleration and slowing down are very different at the same average speed, a vehicle’s energy consumption on a link varies depending on how it enters and leaves the link. A neural network can learn such latent information from a sufficiently large and rich dataset.

Iii-B Overall Structure

In section II-D

, we manually and explicitly engineered features based on our knowledge of the problem. We design in this section a deep learning model to implicitly account for link dependencies through recurrent neural network (RNN) sequence modeling. In addition, we pre-process the sequence input with an automated feature extraction mechanism leveraging a convolutional neural network (CNN) (

[lecun_deep_2015], [NIPS2012_c399862d], [SimonyanZ14a], [7298594]).

More specifically, the fuel consumption of a vehicle on a link depends on the preceding and following links. For that modeling portion we leverage a bi-directional RNN with long short-term memory (LSTM) cells

[hochreiter1997long] stacked with a fully connected neural network as a series of time-distributed dense layers of varying dimensions. The time-distributed property preserves the output sequence for link-level evaluation of electric consumption (figure 7). The bi-directional aspect (BiLSTM, [650093]) captures the contextual qualities surrounding the current link. BiLSTMs understand context better because the sequence runs forward and backward, and two internal states summarizing the entire trip are combined. Overall, this portion of the network attempts to learn the sequential dependencies of links and their consumption. A high-level overview of the model is that, given an input batch of trips with length , the output is formulated as


where for an the size of the hidden units of the BiLSTM stack, , , and the output . The

is the rectified linear unit (ReLu) activation function, which computes

While the LSTM captures the context between links via message passing of computed internal cell states (capturing sequential dependencies), the CNN implicitly searches for direct local structures and interaction between the links as a feature extractor mechanism. The combination of CNN and LSTM allows us to enrich the feature space and expand the receptive field of trips over the links.

Fig. 7: Model Inference. The model takes a sequence of links over the trip with concatenated vehicle and route level features, then predicts link-level energy outcomes for a link by estimating link energy and battery SOC. On model training, represents a batched and bucketed dataset of trips of same length, provides input data for a given trip, and is the labeled energy outcome (in Wh) from training labeled data. Loss is minimized over the trip, link, and cumulative error.

Iii-C Loss Function and Training

Our goal is to estimate electric consumption at the link level while ensuring trip-energy accuracy is preserved, that is . A new trip can be a new combination of existing (adjacent) links and unknown (i.e previously unseen) to our model. Therefore, we require our model to be accurate on both link-level and trip-level consumption. Meanwhile, to further improve our model’s generalization ability, we impose an additional cumulative link loss that requires the model to be precise on partial trips up to each link. Our loss is formulated as:


We search the optimal solution,

through back-propagation gradient descent, where,

evaluates the model’s performance on the partial trip up to the -th link. We sum over all to be the cumulative link loss,

which evaluates the model’s predictions on partial trips up to each link. The trip-level loss

evaluates the model’s prediction on the final consumption of the entire trip, and

measures the model’s performance on each link. As mentioned in the previous section, we group trips based on their length without padding. Trips in the same batch share a common , so the objective function (2) is precise in training.

Iii-D Architecture Details and Implementation

The sequence modeling aspect of the model is wrapped in an encoder-decoder architecture [cho2014learning]. This allows the model to learn whole trip representations using an RNN encoder block. The encoder summarizes the entire trip into a fixed-length vector representing the entire sequence. The decoder is a second RNN block that is trained to generate the electric consumption outputs at each link. In the decoder, and for link are both conditioned on

, but also on the previous and next link states and inputs, via the bidirectional passes. The encoder and decoder are jointly trained to minimize the loss function in equation (

2). In our implementation, our encoder RNN is a deep LSTM with 2 layers, and 512 units at each layer. The decoder is a bidirectional LSTM of 256 units initialized with the encoder hidden and cell states. We stack the decoder with several fully connected neural network layers of size 128, 64, 32, and the last layer has 1 unit. As explained before, the neural network layers are time distributed; in other words, the same weights are applied to the encoder output for each link.

The input data is pre-processed before being fed to the encoder-decoder, by a 3-layer deep convolution neural network with residual connections between the layers. Batch normalization and max-pooling are performed at each layer. Kernel size was fixed at 3, while the number of filters doubled at every layer, starting with 32 filters. The convolution neural network was leveraged as a feature extractor of important trip features while also shortening the sequence at every pass of a convolution block. See Figure

8 for an overview of the architecture.

Fig. 8: General View of Model Architecture. Links for a trip constitute the input sequence that is fed to a deep convolution neural network for feature extraction. The processed sequence is encoded into a fixed latent vector . The decoder recurrent network is bidirectional, and each link level output is conditioned on the encoder latent vector in addition to the current link input and the bidirectional hidden states of surrounding links. The decoder output is processed by a time-distributed fully connected layer to output an energy consumption estimate at the link level.

Other implementation details:

  • We initialized all of the LSTM’s parameters with the uniform distribution. Non-recurrent weights were initialized by sampling from the isotropic zero-mean (white) Gaussian distribution.

  • Optimization is performed with stochastic gradient descent without momentum. We employed a dynamic learning rate, initialized at 0.001 and decay proportional to


  • Due to bucketing of trips (as per Section II-C), the batch size is variable but capped at 128 trips. The bucketing speeds up processing because batches contain similar sequence length and no computation is wasted on the presence of potentially shorter sequences.

  • Standard ReLu activation functions were used for convolutional and dense layers, and was used for recurrent layers.

  • Excluding the convolution and recurrent layers, we used dropout regularization.

Iii-E Computational Setting

For training and tuning purposes, we leveraged multiple graphical processing units (GPUs) spread across multiple machines with a multi-worker mirrored distributed training strategy. This strategy implements synchronous distributed training across multiple workers, each with potentially multiple GPUs. With the help of roughly 30 machines, each with at least 1 GPU, we were able to decrease the model training and tuning time for a dataset of this scale. Our hyperparameter search space contained different hyperparameters spanning different areas of model development including the different pre-processing approaches discussed in Section

II-C, model selection and design, and learning rates. In the remaining sections, we present the results of the best trained model.

Iv Results and Analysis

Iv-a Metrics

We evaluate the model performance on root mean square error (RMSE) and mean absolute error (MAE) at the link and trip levels. However, there are some long trips in the dataset where the energy consumption accumulates to tens of thousands of Wh. In these cases, a 1% error in prediction will lead to a large-magnitude RMSE and MAE. Therefore, we also evaluate our model on mean arctangent absolute percentage error (MAAPE). MAAPE is less sensitive to the standard mean absolute percentage error [maape], especially when is small.
MAAPE is formulated as:

It averages the AAPE, where each absolute percentage error is bounded by

in MAAPE, so the value of MAAPE will not be significantly affected by a small number of outliers when the sample size is large. Arctangent absolute percentage error also approximates absolute percentage error well for small errors. From a Taylor series of

, we see that for . As a result, MAAPE can give us a better idea of the overall performance of the model when there are outliers in errors.

Iv-B Residual Analysis

Iv-B1 Overall Performance

We measure the error by magnitude in Table I. The model has a fairly low overall MAE and RMSE on electric consumption predictions when compared to the range of the true values from the test set statistics shown. Trip-level performance results represent residual values over an entire trip (i.e., summed over all the links in trip). The MAAPE at trip level is less than 3%. However on the link level, the MAAPE is close to 14%, suggesting that the model’s performance on individual links decreases when isolated. This phenomenon is due to our loss function choice on which the model was optimized, favoring lower error as it accumulates along a trip; in other words, accurate estimation of total battery energy usage is prioritized to capture SOC depletion and charging needs.

Test Set Model Performance Metrics
Trip level RMSE 96.7 Wh
MAE 55.3 Wh
MAAPE 0.024
Link level RMSE 22.9 Wh
MAE 14.5 Wh
MAAPE 0.142
(a) Test set mean absolute error (MAE) & Root Mean Squared Error (RMSE) & MAAPE of trip and link-level electric consumption.
Test Set Electric Consumption Stats [Wh]
Mean Std Min 50% 75% Max
Trip level 3391.1 5078.8 14 1789 3951.2 92159.4
Link level 180 286.4 -754 108.9 213.2 25476.9
(b) Test Set Electric Consumption Distribution Statistics
TABLE I: Model Performance metrics compared with electric consumption distribution in the test dataset.

Figure 9 shows a joint density plot of arctangent percentage error (APE) with the raw residual error , which sheds light on the model fitting behavior. In Section I we observed very low error rates at the trip level despite having higher errors at the link level, even though a trip is constructed from a sequence of links. The density plot suggests that higher APE concentrates around low residuals (i.e., the true consumption is likely to be very small). In other words, small and short links that manifest very low consumption values do not impact model performance, because they contribute little to the overall result. We will see later that those represent short and brief transitional links. We also note that the marginal distribution over APE and the residuals are normal and centered around zero.

Fig. 9: Trip-level joint density plot of APE, calculated akin to AAPE without the absolute value component, & residual error of true consumption versus predicted.

We compute the AAPE of electric consumption over all links and trips and list the percentiles of those errors in Table II for more a granular view. For more than half of the trips, the electric consumption predictions of the model are off by less than 1.9% and 9.4% on the trip and link level, respectively. On the trip level, predictions remain contained within 6.5% error for more than 90% of the trips, although they can go up to %50 error on the link level. In fact, Figure 10

reveals that AAPE distribution over links is heavily right skewed with a rather fat tail.

Fig. 10: AAPE distribution over links and trips
Consumption 25th 50th 75th 90th 95th
Trip 0.008 0.019 0.037 0.065 0.092
Link 0.034 0.094 0.228 0.493 0.778
TABLE II: Trip and link level AAPE percentiles of electric consumption.

A final look at overall model performance can be seen in Figure 11, where the prediction electric consumption point for all the trips in the test dataset are plotted against the true consumption on a log scale. The model presents a very high .

Fig. 11: Scatter plot of predicted electric energy consumption on the test dataset versus true consumption.

Iv-B2 Detailed Example Result

In this subsection, we go over the details of two predicted trip results randomly sampled from the test set: Trip #56 and Trip #110.

Figure 11(a) and 12(a) show the high-level route profile outputs from simulated agents in POLARIS. This high-level routing information along with the vehicle feature information is provided to the model as input, as described in Section II. Figures 11(b) and 12(b) show the link-by-link predicted electric consumed output in Wh along with the true energy from the test set. We observe precise link-level estimates for the most part, except when the vehicle transitions to a very short, low consumption link. In Figures 11(c) and 12(c), we provide the cumulative energy consumed over the trip (top) and the APE computed at each accumulation step (i.e., by the end of the trip the last bar displays the trip-level energy error). Based on the (b) and (c) APE bar charts of both trips we recognize the interplay between positive and negative link-level APE and its impact on the cumulative error decreasing trend, as per the design of the model and its loss function. On both trips, the final APE is small: -0.12% and -1.3% for Trips #56 and #110, respectively.

(a) Route profile: Output of POLARIS, Input of Model.
(b) Link level predicted & true energy (top). Link level APE (bottom).
(c) Cumulative predicted & true energy (top). APE (bottom)
Fig. 12: Trip#56: Analysis of energy predictions against True.
(a) Route profile: Output of POLARIS, Input of Model.
(b) Link level predicted & true energy (top). Link level APE (bottom).
(c) Cumulative predicted & true energy (top). APE (bottom)
Fig. 13: Trip#110: Analysis of energy predictions against True.

Iv-B3 Network-Wide Application

Figure 14 provides an estimate of the predicted energy and its accuracy over the entirety of the test dataset. This can represent, for example, the complete mobility of agents within the region. The total energy consumed at the macroscopic level can be predicted and compared against the true energy outcomes aggregated from microscopic simulation results. In fact, the figure shows that the cumulative predicted energy is in the order of 234 MWh while the true energy calculated from the test set data is 232 MWh, which gives a network-wide energy consumption error of 0.6%.

Fig. 14: All trips in test data.

V Application to Charging Behavior

The model developed here through the processes described above provides a robust way to make predictions on energy consumption at the link level based on vehicle and route characteristics. The end goal of this exercise is to abstract the process carried out in estimating this model, that is the integrated process of stitching data from POLARIS, SVTrip, and Autonomie to produce robust energy consumption estimates. While the model was estimated rigorously through the TensorFlow framework using several GPUs to perform parameter updates in the fully-connected neural net, predictions using this framework can be computational expensive when analyzing several million vehicles in large regional simulations. The model developed was transferred onto the TensorFlowLite (TFLite) framework, which is a light-weight deployable version of TensorFlow. TFLite performs necessary optimizations on neural network structure and parameter precision to minimize prediction time while trying to retain a similar level of accuracy as the input model.

With POLARIS running on a high-performance C++ framework, the C++ API for TFLite was used to integrate the transferred model for use within the POLARIS simulation workflow. This API allows for quick allocating of non-contiguous memory and prepares the environment for model predictions. A tensor of the same length as used for estimation described above is the only required input to carry out prediction at the link level. By deploying this model at the link level, a continuous update of vehicle SOC becomes possible allowing travelers to make decisions on charging the battery throughout the day. Since TFLite abstracts parameter precision and performs other optimizations for quick prediction turnaround, the existing high-speed runtimes achieved in POLARIS are maintained with minimal changes in overall run time. This allows to continue modeling the travel demand for large regions, now including robust EV consumption tracking and charging events. Each prediction of battery consumption at the link level takes ms per call.

An example application of this process is visualized in Figures 15 and 16 for the case of the Greater Chicago region. Figure 15 shows the spatial demand structure of EV charging events throughout the region grouped by underlying traffic analysis zones (typically used by local Metropolitan Planning Organizations, or MPOs). Figure 16 shows average energy use by link in the region by averaging EV consumption of all vehicles passing through these links. Moving forward, a more detailed scenario setup will be studied to understand how varying electric vehicle penetration rates in a region and location and available of EV charging station impacts vehicle use and charging demands.

Fig. 15: Charging Events in Chicago at Home and at Charging Stations
Fig. 16: Predicted Link Consumption across Greater Chicago via POLARIS

Vi Discussion

Our work connects with a broad literature on electric consumption prediction of EVs, where the proposed approaches are categorized into vehicle model-driven methods and data-driven methods. The lack of, and difficulty in acquiring, microscopic data are major factors that hindered research advances until massive real-world driving data is available to predict the energy consumption of EVs with machine-learning algorithms. In most common settings, estimates are made on the basis of high-fidelity speed profiles and leveraging machine learning ([YAO2019276], [de_cauwer_data-driven_2017], [MODI2020454], [ZHANG2020115408], [GENIKOMSAKIS201798]). Some studies have already explored the use of CNN to estimate the energy consumption of EVs [MODI2020454], while others use classical statistical methods [LOPEZ2020124188], but again in the presence of precise stochastic speed profiles. In the meantime, Al-Wreikat et al. [ALWREIKAT2021117096] have carried out statistical analysis on how driving behavior and conditions affect the energy consumption of EVs, [fiori_effect_2019] and [XIE2020115081] pointed out that energy consumption is highly related to average traffic speed. [qi_data-driven_2016] and [QI201836] are some of the rare studies that employ such constraints to the modeling, by using average link-level speed information only. [YI2018344] proposed a data-driven density estimation method that accounts for trip average speed, and [BASSO2019141] attempted to derive explicit equations via thorough mathematical modeling, then took a machine-learning approach in [BASSO202124]. All such studies are motivated by the need to engage transportation network-level use-case applications (e.g., route planning, eco-routing, charging behavior). In general, we argue that it is challenging to estimate energy consumption on the basis of actual vehicle speed information because driving behaviors and traffic conditions are uncertain and heterogeneous. A predictive model trained only on macroscopic route input data but fine-tuned to equal microscopic results seems to be a more realistic approach. As we showed by designing a very large experiment using energy data generation from high-fidelity simulations and by the subsequent masking of microscopic information, a deep-learning approach can overcome latent information and retrieve accurate aggregated energy consumption values.

In this work, environment-related factors have been left out. In future work, the inclusion of ambient temperature, weather conditions and road grade [LIU201774] at the macroscopic level will be of interest to study within this modeling framework.


The work described was sponsored by the U.S. Department of Energy (DOE) Vehicle Technologies Office (VTO) under the Systems and Modeling for Accelerated Research in Transportation (SMART) Mobility Laboratory Consortium, an initiative of the Energy Efficient Mobility Systems (EEMS) Program. The following DOE Office of Energy Efficiency and Renewable Energy (EERE) managers played important roles in establishing the project concept, advancing implementation, and providing ongoing guidance: Erin Boyd, Danielle Chou, Heather Croteau, Prasad Gupte, and David Anderson. The submitted manuscript was created by UChicago Argonne, LLC, Operator of Argonne National Laboratory (Argonne). Argonne, a U.S. Department of Energy Office of Science laboratory, is operated under Contract No. DE- AC02-06CH11357. The U.S. Government retains for itself, and others acting on its behalf, a paid-up nonexclusive, irrevocable worldwide license in said article to reproduce, prepare derivative works, distribute copies to the public, and perform publicly and display publicly, by or on behalf of the Government.