0% found this document useful (0 votes)
65 views12 pages

Predicting Electric Vehicle Energy Consumption From Field Data Using Machine Learning

This article presents a novel machine learning framework for predicting electric vehicle (EV) energy consumption using real-world data, addressing the limitations of existing forecasting methods. The proposed model combines physics-informed features with online adaptation, achieving a significant reduction in prediction error from 6.30% to 5.04% and improving prediction interval coverage to 91.27%. The study highlights the importance of accurate energy consumption predictions for enhancing EV range management and optimizing charging strategies.

Uploaded by

vk.only.4uh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views12 pages

Predicting Electric Vehicle Energy Consumption From Field Data Using Machine Learning

This article presents a novel machine learning framework for predicting electric vehicle (EV) energy consumption using real-world data, addressing the limitations of existing forecasting methods. The proposed model combines physics-informed features with online adaptation, achieving a significant reduction in prediction error from 6.30% to 5.04% and improving prediction interval coverage to 91.27%. The study highlights the importance of accurate energy consumption predictions for enhancing EV range management and optimizing charging strategies.

Uploaded by

vk.only.4uh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

This article has been accepted for publication in IEEE Transactions on Transportation Electrification.

This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/TTE.2024.3416532

IEEE TRANSACTIONS ON TRANSPORTATION ELECTRIFICATION 1

Predicting Electric Vehicle Energy Consumption


from Field Data Using Machine Learning
Qingbo Zhu, Yicun Huang, Chih Feng Lee, IEEE Senior Member, Peng Liu, Jin Zhang,
Torsten Wik, IEEE Member

Abstract—This study addresses the challenge of accurately grids, and the environment [3], [4]. Specifically, typical re-
forecasting the energy consumption of electric vehicles (EVs), search topics around EVs include but are not limited to battery
which is crucial for reducing range anxiety and advancing sizing [5], charging planning [6], driving range prediction [7],
strategies for charging and energy optimization. Despite the
limitations of current forecasting methods, including empirical, routing [8], speed control [9], [10], energy optimization [11],
physics-based, and data-driven models, this paper presents a and environmental analysis [12]. To tackle these problems, a
novel machine learning-based prediction framework. It integrates common and fundamental task is the development of a reliable
physics-informed features and combines offline global models and accurate model for EV energy consumption. In addition,
with vehicle-specific online adaptation to enhance prediction such an energy consumption model is a basis for making EV
accuracy and assess uncertainties. Our framework is tested
extensively on data from a real-world fleet of EVs. While regulations and policies, and for analyzing the supply risks of
the leading global model, quantile regression neural network battery resources.
(QRNN), demonstrates an average error of 6.30%, the online Accurately and quickly predicting the energy consumption
adaptation further achieves a notable reduction to 5.04%, with of EVs in completing a given trip is a non-trivial task due to
both surpassing the performance of existing models significantly. the presence of several technical challenges. First, the energy
Moreover, for a 95% prediction interval, the online adapted
QRNN improves coverage probability to 91.27% and reduces of an EV is consumed by various resistances (e.g., caused by
the average width of prediction intervals to 0.51. These results road friction, gravity, and aerodynamics), inevitable energy
demonstrate the effectiveness and efficiency of utilizing physics- losses (e.g., in motors, batteries, and braking systems), and
based features and vehicle-based online adaptation for predicting auxiliary vehicle components (e.g., the heating, ventilation,
EV energy consumption. and air conditioning system) while maintaining desired vehicle
Index Terms—Electric vehicles, energy consumption, modeling dynamics and comfort. Furthermore, this process involves a
and prediction, machine learning, field data. large set of parameters in vehicle design, operation, road
topology, traffic states, and the external environment [13],
some of which, such as the road conditions, wind speed, and
I. I NTRODUCTION driver behavior, are time-varying and stochastic. Compared to
A. Motivation & Technical Challenges commercial transit buses, private electric cars tend to have
complicated and highly volatile trips, and their prediction
Current road transport, heavily relying on fossil fuels, problem is even more challenging. Last but not least, an
has caused severe public concerns over the energy crisis, instantaneous prediction value is often expected for decision-
air pollution, and global warming. To achieve a sustainable making and system control, and, in contrast, a trip duration can
transport system, the mass deployment of electric vehicles range from several minutes to hours in which the associated
(EVs) is imperative and has become an unstoppable trend energy consumption is related to vehicle dynamics varying in
[1]. According to the International Energy Agency, the global milliseconds. The multiple timescales involved further com-
EV stock in the stated policies scenario will expand rapidly plicate the prediction task.
from almost 18 million in 2021 to 200 million by 2030, corre-
sponding to an average annual growth of more than 30% [2].
Such electric revolution in the transport sector entails various B. Literature Review
studies at different levels, ranging from vehicle components Considerable research efforts have been devoted to the
(e.g., batteries), individual EVs, and a vehicle fleet, up to traffic modeling of EV energy consumption. The obtained results can
networks and their interactions with road infrastructure, power generally be categorized into empirical models, physics-based
models, and data-driven models.
The work was supported by Chalmers Foundation and the Swedish Energy
Agency (Grant No. P2022-00960). The simplest empirical models assume constant energy con-
Qingbo Zhu, Yicun Huang, and Torsten Wik is with the Department sumption rates in EVs. For example, the electricity consump-
of Electrical Engineering, Chalmers University of Technology, Gothen- tion has been hypothetically fixed at 1.5 kWh/km in [14] for
burg 41296, Sweden (E-mail: [email protected]; [email protected];
[email protected]). electric buses in Stockholm, Sweden, whereas it was defined
Chih Feng Lee is with Polestar Performance AB, Gothenburg 41878, to be 1.2 kWh/km in [15] for mixed bus fleet scheduling.
Sweden (E-mail: [email protected]). By using the Renault Zoe as a case study, Desreveaux et
Peng Liu and Jin Zhang are with the National Engineering Research Center
of Electric Vehicles, Beijing Institute of Technology, Beijing 100081, China al. demonstrated an important impact of velocity profiles on
(E-mail: [email protected]; [email protected]). energy consumption, particularly the maximal velocity, while

Authorized licensed use limited to: Jaypee Insituite of Information Technology-Noida Sec 128 (L3). Downloaded on September 21,2024 at 10:58:46 UTC from IEEE Xplore. Restrictions apply.
© 2024 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.See https://www.ieee.org/publications/rights/index.html for more information.
This article has been accepted for publication in IEEE Transactions on Transportation Electrification. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/TTE.2024.3416532

IEEE TRANSACTIONS ON TRANSPORTATION ELECTRIFICATION 2

the maximal acceleration turned out to have a low impact [16]. learning-based models to explain the energy consumption
With this in mind, for improved model accuracy, Wu et al. fit- variance [13]. To be more realistic and potentially capture
ted the energy usage as a monotonically increasing polynomial the correlated effects of different vehicle parameters, a few
function of the velocity for in-city and freeway driving [17]. recent studies have made use of real-world vehicle data. For
Recently, Ji et al. developed an analytical model that describes example, Chen et al. established a recurrent neural network-
the trip-level energy consumption of the traction and battery based model from time-series ETB data for short-term energy
thermal management system as a linear logarithmic function prediction [32]. Towards trip-level predictions based upon field
of the ambient temperature, curb weight, travel distance, and data, relevant models can be found in [33], [34] for ETBs
trip travel time [18]. Similar works can be found in [19] and in [35], [36] for electric cars. The referred works have
and [20]. Although being useful to analyze and reveal how demonstrated the potential of machine learning-based models
some parameters affect the energy consumption of a specific for the long-term prediction of EV energy consumption.
EV, or an EV fleet, this class of models ignores many other
factors and can suffer from severely degraded performance C. Contributions of This Work
when being deployed to predict EV energy consumption in a
Inspired by the data-driven models discussed above, this
general case.
work presents a practical and generic machine learning-based
According to fundamental principles, such as Newton’s
modeling approach for EV energy consumption prediction that
second law and the law of energy conservation, the dynamics
not only significantly improves accuracy and robustness, but
of the mechanical, electrical, and thermal energy states of an
also provides the prediction uncertainties in real-time. The
EV can be formulated as differential equations, as in [21]–[25].
contributions are systematically achieved by: 1) proposing a
The obtained physics-based models have been widely used
new procedure to process and clean real-world EV data, 2)
in offline vehicle design [5], simulation-based studies [26],
constructing a comprehensive, physics-informed feature pool
[27], and short-horizon predictive control [9], [10]. However,
and extracting the best set of features, 3) applying several
the application of these models to long-term prediction is
powerful machine learning methods to develop prediction
challenging due to the need to identify a large number of
models for the consumed energy of an EV fleet with highly
parameters related to the considered vehicle, driver, road,
diverse trip information, 4) providing the uncertainty range
traffic, and environment, as well as the necessity to update
estimation associated with the point prediction, making it
all those time-varying parameters online continuously. To the
useful for corrective actions, decision-making, and safety
best of our knowledge, there is currently no well-established
control purposes, and 5) online adaptation of the selected
physics-based model accurately capturing all the microscopic
global models for further improved accuracy and tightened
dynamic behaviors of EVs throughout individual and typical
uncertainty range. The proposed machine learning pipeline is
trips. Furthermore, running the physics-based models requires
illustrated in Fig. 1.
detailed time-series input data concerning the planned trip,
such as vehicle and wind velocity profiles, which are not easy
II. DATA D ESCRIPTION A ND P ROCESSING
to acquire precisely. Even though there is a perfect physics-
based model with all its time-varying parameters described by A. Dataset
lookup tables or derived by online identification algorithms, The dataset was collected by the National Monitoring and
and a well-defined trip lasting tens of minutes, it can be Management Platform for New Energy Vehicles in China
computationally expensive to propagate the high-resolution from 55 battery electric taxis of the same brand and model.
model, e.g., at a sampling time of ten milliseconds, to generate Equipped with lithium nickel cobalt manganese oxide (NCM)
state trajectories for the calculation of accumulated energy batteries having 30.4 kWh nominal capacity, these taxis were
consumption. This outrules many applications, such as the designed to have a driving range of up to 200 km and a
planning of trips and charging schedules, where one needs maximum speed of 125 km/h. More specifications about them
an immediate estimate of energy consumption or even solving can be found in [35]. The states of vehicle operation (e.g.,
an online optimization problem based on the estimated value. mileage and speed), batteries, motors, motor controllers, the
Data-driven modeling approaches using machine learning braking system, fault alarms, and insulation resistance, as well
have recently become very popular in a wide range of research as the location information, were monitored in real-time. The
areas, including energy storage, electrified transportation and corresponding data were sent to the platform via wireless
vehicle technologies [28]–[31], and are good candidates to communication at a nominal frequency of 1 Hz. The detailed
solve the prediction problem for EV energy consumption. With data items, formats, and communication protocols follow the
millions of EVs deployed in the world, it is not technically standard given in [37]. The selected data reflect vehicles
difficult to collect a statistically sufficient amount of data, running in Beijing, with the earliest data points from March
though such data may not be readily accessible to many aca- 2017 and the latest from December 2018.
demic research groups. To overcome the data shortage issue, The obtained time-series data for each vehicle were seg-
Abdelaty et al. used a physics-based model for electric transit mented into different driving trips, where the trips end when-
buses (ETBs) to generate a large dataset by gradually varying ever a stop or idling state is longer than three minutes. In
a set of parameters, such as the initial state of charge (SoC), practice, these trips could be terminated due to parking or
minimum acceleration, average speed, and space between charging. When there was no data uploading, embodied as
consecutive bus stops, and then developed several machine data missing, or a series of zeros for more than three minutes,

Authorized licensed use limited to: Jaypee Insituite of Information Technology-Noida Sec 128 (L3). Downloaded on September 21,2024 at 10:58:46 UTC from IEEE Xplore. Restrictions apply.
© 2024 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.See https://www.ieee.org/publications/rights/index.html for more information.
This article has been accepted for publication in IEEE Transactions on Transportation Electrification. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/TTE.2024.3416532

IEEE TRANSACTIONS ON TRANSPORTATION ELECTRIFICATION 3

Data processing Feature engineering

Data cleaning Physics-informed


Feature engineering Machine learning methods
Raw dataset feature construction
Hyperparameter Model training
Outlier detection Feature selection tuning

Data split

Train Val. Test

Global model Online adaptation for


Test/streaming data Online prediction
deployment individualization

Model development
Energy consumption prediction

Fig. 1: Pipeline to develop data-driven algorithms for energy consumption prediction.

we also considered it as a trip completion. The data samples


between every two consecutive trips were ignored as the cor-
responding energy consumption was negligibly small. Without
energy consumption information from the vehicle cabin, e.g.,
for heating, ventilation, and air conditioning (HVAC), the
energy output from the motors has been considered as the
system output of interest, y, and was calculated by the time
integral of the product of the measured current and voltage
over the motor.
The measured GPS data from vehicles were input into
Google Earth to generate road elevation data allowing cal-
culation of road grade profiles. According to the recorded
time and position, the external environment measurements,
including ambient temperature, wind speed and direction,
dewpoint temperature, and humidity, were taken from the
weather website (https://www.xihe-energy.com) at a sampling
time of 30 minutes.
All the trips were labeled by dates, and when the daily
driving ranges became outside of [1, 600] km, the correspond-
ing trips were dropped. When the daily driving ranges are
less than 1 km, the included trips are very short, rendering
the energy consumption prediction unnecessary. On the other
hand, it is unusual for these taxis to drive 600 km in a day as
it means three full charges. As a result, a total of 91,932 trips
were extracted from the raw vehicle data. Fig. 2 exemplifies
the time-series velocity, acceleration, and elevation within two
trips and illustrates the distribution of their trip-level average
values over all the trips. It can be seen that the driving profiles Fig. 2: Data measured from electric taxis. (a)-(c) show the ve-
vary largely within a specific trip and among different trips. locity, acceleration, and elevation profiles, respectively, of two
continuous trips of a vehicle. (d)-(f) illustrate the histogram
trip-level average velocity, acceleration, and elevation, respec-
B. Data Processing tively, over all the trips, where both the positive acceleration,
The dataset described in Section II-A was transmitted wire- a+ , and the negative acceleration, a− , are considered.
lessly from the running taxis to the data platform. However,
wireless transmission is susceptible to interference and can be
affected by long distances, physical obstructions, channel dis- dataset should have inherently suffered from issues, such as
turbance, and weather conditions. In addition, digital-to-analog measurement noise, data latency, loss, or mismatch. Given that
conversion, sensor noise, and differentiation of measurements data quality is critical for machine learning, the existing issues
may also cause problems. Under such circumstances, our will inevitably weaken and even undermine the accuracy and

Authorized licensed use limited to: Jaypee Insituite of Information Technology-Noida Sec 128 (L3). Downloaded on September 21,2024 at 10:58:46 UTC from IEEE Xplore. Restrictions apply.
© 2024 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.See https://www.ieee.org/publications/rights/index.html for more information.
This article has been accepted for publication in IEEE Transactions on Transportation Electrification. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/TTE.2024.3416532

IEEE TRANSACTIONS ON TRANSPORTATION ELECTRIFICATION 4

D = [d1 , 1; · · · ; dN̄ , 1]. By defining D’s pseudoinverse as D† ,


namely D† = (DT D)−1 DT , the estimated value of Y is given
by
† †
· · · D1†N̄
 
D11 D12
† † †
 D21 D22 · · · D2N̄ 
 
Ŷ =  .  .. .. ..  Y, (3)
 .. .

. . 
† † †
DN̄ 1
DN̄ 2
· · · DN̄ N̄

where Dii is the leverage value and it indicates the distance
between a certain driving distance di and the average value of
di for all the N̄ trips.
Fig. 3: Illustration of raw data samples. (a) Probability of en-
According to its definition, the studentized residual for trip
ergy consumption over all the trips. (b) Total energy consump-
i, denoted by ri , is given by [38]
tion of each trip versus the corresponding driving distance.
yi − ŷi
ri = q , (4)

σ(y1 , · · · , yN̄ ) · (1 − Dii )
reliability of data-driven models for predicting vehicle energy
consumption. Hence, it is necessary to process and clean the where ŷi is derived from (3), yi − ŷi represents the ordinary
data. To do so, we use knowledge of vehicle usage and kinetics residual for trip i, and the function σ(·) is the standard
as well as statistical properties to phase out potential issues. deviation of yi in all the N̄ trips.
1) Data Cleaning. For any given trip i ∈ {1, 2, · · · , N̄ },
where N̄ is the number of all trips, we identify and quantify III. OVERVIEW OF P HYSICS - BASED M ODELING
the data loss by comparing the number of existing time-series In general, the energy consumption of a vehicle is to
data samples, denoted by Mi , to its expected value Σi . The overcome several types of driving resistance and to support
data loss rate, ρloss,i , is defined as auxiliary systems, e.g., HVAC. At the same time, it will be
ρloss,i = (Σi − Mi ) /Σi . (1) affected by regenerative braking and energy efficiencies in the
powertrain system and its components. By only considering
With the frequency of 1 Hz in collecting data, it is common energy flow from the vehicle motors, the energy consumption
that exists ρloss,i > 0. Analogously, the data mismatch rate, of an electric vehicle, ŷ, can be calculated by
ρmismatch,i , is calculated by
ŷ = Fr d/ηr + ηb Ebrake , (5)
ρmismatch,i = (Mi − Mmismatch,i ) /Mi , (2)
where Fr represents the propulsion force, Ebrake is the regener-
where Mmismatch,i is the number of expected data samples and ative braking energy, and ηr and ηb denote the corresponding
it can be exemplified as the situation where the motor current energy efficiencies. According to Newton’s second law of mo-
is zero while the vehicle speed is nonzero. tion, the propulsion force applied to vehicles can be expressed
2) Outlier Detection. Some outliers in the obtained dataset as [22]
can be detected from the labeled output while others can be CD A(V − Vair )2
isolated based on the trip-level features x that impact the Fr = mgf cos(θ) +
21.15
system output. As illustrated in Fig. 3(a), some trips have
+ mg sin(θ) + δma, (6)
consumed unusually more energy than others while a small
number of trips are on the other side of the spectrum. From where the four terms on the right-hand side of (6) represent
Fig. 3(b), it can be observed that the trip-level average energy the rolling resistance, air resistance, climb resistance, and
consumption yi tends to be linearly related to the driving acceleration resistance. g, δ, and CD denote the gravitational
distance di . In the bottom-left corner of the sub-figure, some acceleration, the transfer coefficient from the revolving mass
trips are featured with over 10 km driving distance whereas the to a linear mass, and the drag coefficient, respectively, and
corresponding energy consumption is around zero. To system- these three parameters are generally constant during vehicle
atically deal with these outliers, we combine the concepts of movement. m, A, and f are the vehicle mass, equivalent cross-
studentized residuals and leverage [38] to distinguish extreme sectional area, and tire rolling resistance coefficient. While m
output values in {y1 , · · · , yN̄ } and extreme feature values in can vary among different trips for a taxi, f and A are heavily
{d1 , · · · , dN̄ }. influenced by road conditions and the ambient environment.
Suppose yi = di β + ϵ for the relationship between the θ, V , and Vair are the road grade, vehicle velocity, and wind
energy consumption yi and driving distance di , where β is velocity, which are variables in a trip.
a scalar coefficient and ϵ is a parameter vector, representing If all the model parameters in (6) are known a priori and
the slope and bias of the linear regression model, respec- all the variables can be measured accurately, the instantaneous
tively. Then, according to the analytical solution to the linear propulsion force can be calculated directly at each time step.
least squares problem, the optimal value can be obtained as However, as noted in the introduction, these parameters and a
[β, ϵ]T = (DT D)−1 DT Y , where Y = [y1 , · · · , yN̄ ]T and set of energy efficiencies for a vehicle system can be affected

Authorized licensed use limited to: Jaypee Insituite of Information Technology-Noida Sec 128 (L3). Downloaded on September 21,2024 at 10:58:46 UTC from IEEE Xplore. Restrictions apply.
© 2024 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.See https://www.ieee.org/publications/rights/index.html for more information.
This article has been accepted for publication in IEEE Transactions on Transportation Electrification. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/TTE.2024.3416532

IEEE TRANSACTIONS ON TRANSPORTATION ELECTRIFICATION 5

by many complicated factors, and it is very expensive and Spearman correlation analysis is first conducted to assess the
difficult to quantify them accurately, particularly considering correlation between any feature x and the system output y. The
the wide range of uncertainties and stochasticity during vehicle Spearman’s rank correlation coefficient ρs that measures the
usage. strength and direction of the monotonic relationship between
x and y can be calculated as [39]
IV. DATA - DRIVEN M ODEL D EVELOPMENT
ri = Rxi − Ryi , (7)
Fully recognizing the complexities involved in precise pa-
6ΣN train 2
i=1 ri
rameterization and long-term simulation of physical models, ρs = 1 − 2 − , (8)
this study adopts a data-driven approach to efficiently forecast Ntrain (Ntrain 1)
the trip-level energy consumption of EVs. This approach where i is the index of the trip-based data samples, Ntrain
incorporates a set of features carefully constructed from the represents the number of training samples, and Rxi signifies
physics-based model described in Section III. the rank of xi after sorting all training samples for the
considered feature in ascending order. By setting a lower
A. Physics-informed Feature Construction and Engineering threshold for the Spearman’s rank correlation coefficient, i.e.,
ρs,min , any features with a score less than ρs,min will be
The first step in establishing a machine learning (ML)
discarded from the feature pool. Following the analysis for the
model is to extract elements for feature construction. All these
correlation between any feature and the system output, Pearson
elements are taken directly or are inspired by the physics-
correlation analysis [39] is applied to quantify the correlation
based model (6). As such, all essential physical insights into
between any two features within the remaining pool. For each
energy consumption can be systematically incorporated into
feature pair, when the Pearson correlation coefficient ρp is
the ML-based prediction model. As shown in the first three
greater than a specified upper threshold ρp,max , the feature with
columns of Table I, these elements can be categorized into
a lower value of ρs is abandoned to avoid multicollinearity
four classes, i.e., trip intrinsic attributes, road characteristics,
among features.
vehicle states, and ambient environments. Note that in addition
to the instantaneous acceleration, the positive and negative
values of acceleration are considered to better reflect the B. ML-based Prediction Models
vehicle states on the trip level. The relative wind velocity Vw , Within the realm of supervised machine learning, the pre-
defined as V − Vair , is also considered as part of the ambient diction of trip-based EV energy consumption is framed as a
environment. regression problem in terms of the selected features and the
With these physics-informed elements, a two-step procedure consumed energy y. The target is to develop reliable and ac-
is used to construct a comprehensive feature pool. First, the curate ML models that provide trip-wise point predictions and
time-series data of each of the considered elements over a the associated uncertainty range, where the latter aims to make
given trip is transformed into a form of histogram. Then, the prediction results interpretable. Four regression algorithms,
a variety of statistical properties of the histogram can be specifically the quantile regression (QR), quantile regression
extracted, including the mean, variance, 0.95 quantile, and neural network (QRNN), quantile extreme gradient boosting
0.05 quantile, which represent the characteristics of central regression (QEGBR), and quantile regression forests (QRF),
tendency, dispersion, and extreme situations of each driving are utilized in the offline pathway of Fig. 1 to develop novel
trip, respectively. The obtained library of elements and corre- prediction models for y. Note that none of these quantile-based
sponding constructed features is listed in Table I. Note that algorithms relies on the assumption of any specific distribution
in the absence of measured data, our feature pool does not of the system output, unlike other probabilistic models, such
explicitly incorporate locally distributed traffic information, as Gaussian process regression.
such as traffic density and congestion levels. However, we 1) QR: QR is a robust learning algorithm for estimating the
anticipate that the selected features related to vehicle velocity conditional quantiles of the target, y, from data, as opposed to
and acceleration implicitly capture the effects of varying traffic solely focusing on the median. From a physical perspective,
conditions on trip-based energy consumption. it divides the training dataset into two segments based on the
This employed feature construction strategy compresses value of quantile hyperparameters. The QR’s check function,
hundreds or thousands of time-series data samples in a trip into ρτ (ei , τ ), can be written as [40]
a small number of features, corresponding to each physical (
element. The strategy reduces the scale of the input data −(1 − τ )ei if ei < 0
by several orders of magnitude, resulting in significantly de- ρτ (ei , τ ) = (9)
τ ei if ei ≥ 0,
creased memory resources to store the data and computational
cost to train ML models. In addition, it enables efficient where the parameter τ ∈ (0, 1) represents the quantile of y,
predictions during the online implementation. Such a strategy and the discrepancy between yi and its predicted value ŷi is
is imperative when the raw data are stored originally and defined as ei = yi − ŷi for the i-th trip. If τ = 0.5, the goal
locally as histograms within the vehicle. is to fit a straight line that divides the dataset into two equal
With the constructed feature pool, feature engineering is parts, which isP equivalent to using the absolute loss (AL),
Ntrain
conducted to select a set of most relevant and independent LAL (yi , ŷi ) = i=1 |yi − ŷi |, as the loss function in linear
features for the development of ML models. To achieve this, regression. The determination of the upper and lower bounds

Authorized licensed use limited to: Jaypee Insituite of Information Technology-Noida Sec 128 (L3). Downloaded on September 21,2024 at 10:58:46 UTC from IEEE Xplore. Restrictions apply.
© 2024 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.See https://www.ieee.org/publications/rights/index.html for more information.
This article has been accepted for publication in IEEE Transactions on Transportation Electrification. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/TTE.2024.3416532

IEEE TRANSACTIONS ON TRANSPORTATION ELECTRIFICATION 6

TABLE I: Elements for feature construction and the resulting feature pool

Element classification Elements Description Features


d Driving distance of a trip d
Trip intrinsic attributes
td Driving time of a trip td
E Elevation of the road mean, variance, 0.95 quantile, 0.05 quantile
Road characteristics Gcos Cosine value of road grade mean, variance, 0.95 quantile, 0.05 quantile
Gtan Tangent value of road grade mean, variance, 0.95 quantile, 0.05 quantile
V Vehicle velocity mean, variance, 0.95 quantile, 0.05 quantile
V2 Square of vehicle velocity mean, variance, 0.95 quantile, 0.05 quantile
Vehicle states V3 Cube of vehicle velocity mean, variance, 0.95 quantile, 0.05 quantile
a Acceleration of vehicle variance, 0.95 quantile, 0.05 quantile
a+ Positive vehicle acceleration mean
a− Negative vehicle acceleration mean
Vw Relative wind velocity mean, variance, 0.95 quantile, 0.05 quantile
Vw2 Square of relative wind velocity mean, variance, 0.95 quantile, 0.05 quantile
Ta Ambient temperature mean
Ambient environments
Td Dewpoint temperature mean
H Humidity mean
P Precipitation mean

for a specified prediction interval can be achieved by setting [44]. With this in mind, we replace yˆi − yi in (10) by the
the values of τ in (9). quantile check function ρτ (yˆi − yi , τ ) defined in (9). The
2) QRNN: Neural networks (NNs), drawing inspiration obtained algorithm integrates XGBoost and the new quantile
from the human brain, are computational models composed loss function and is consequently termed QEGBR.
of interconnected nodes structured into layers. These nodes 4) QRF: Different from the previous three parametric
incorporate weighted connections and activation functions, en- quantile regression methods, which predict the target value
abling them to process data through feedforward computations by minimizing their respective loss functions, random forest-
for predictive tasks. The training process, known as back- based algorithms are non-parametric tree-based approaches
propagation, refines these networks that often include multiple without the process of optimizing parameters. QRF is a
hidden layers to facilitate deep learning. Deep neural networks generalization of the original random forest (RF) [45]. When
(DNNs) are a type of NNs characterized by having multiple constructing the forest, both QRF and RF utilize decision trees,
hidden layers, providing them with the ability to learn intricate employ bootstrapping to generate distinct subsets of data, and
representations, attain high model performance, and effectively make random selections for nodes and splitting points. In
process extensive datasets. In DNNs for regression problems, RF, the predicted value is the conditional mean, which is
the most commonly used loss functions are the squared loss approximated by averaging the predictions from all the trees
(SL) and AL, but they are restricted to making point predic- in the forest. Therefore, the only information needed in RF is
tions. According to [41], by integrating the QR algorithm into the mean of the observations that fall into each node across
a DNN structure, one can obtain both the point prediction all trees. Different from RF, QRF retains all the values of all
ŷ and the uncertainty range estimation associated with ŷ. In observations in all nodes, not just their mean, and then uses
this work, we incorporate the QR check P function into the loss this information to assess the target conditional distributions
Ntrain
function of QRNN, namely L(yi , ŷi ) = i=1 ρτ (ei , τ ). under different quantiles, thereby generating predictions for
3) QEGBR: Extreme gradient boosting (XGBoost) is a the system output and the associated uncertainty.
scalable end-to-end ML algorithm that leverages gradient
tree boosting to create ensemble models for predictions and C. Online Model Adaptation for Customized Prediction
classifications [42]. Unlike linear regression and NNs, which The global models in Section IV-B are trained and validated
offer flexibility in choosing loss functions that can be first- on historical vehicle data. When we apply the resulting models
or second-order differentiable, the loss function of XGBoost to predict vehicle energy consumption, they are blind to the
needs to be second-order differentiable as Newton’s method unique characteristics of new vehicles whose driving situations
is required for the optimization [43]. Commonly, the log-cosh may deviate largely from those in the training set. The predic-
loss function is applied in XGBoost with the following form: tions are essentially generated from an open-loop simulation
ρLC (yi , ŷi ) = log(cosh(ŷi − yi )). (10) based on the global models. The historical driving data of a
targeted vehicle during real-world usage shall contain valuable
Similar to classic DNNs, the XGBoost can provide point information for understanding and learning the characteristics
prediction but not the uncertainty range. To have both the of its future energy consumption. Taking this individualized
point and uncertainty range predictions, one would naturally information into consideration as feedback, online adaptive
expect some appropriate combinations of XGBoost and QR. models can be developed to potentially improve the prediction
Given that QR’s loss function is not second-order differen- performance, particularly for vehicles that have not been seen
tiable at the origin, a second-order differentiable function can during the training process. To test this concept for EV fleets,
be introduced to create a smooth approximation of the QR we for the first time develop online adaptive models for EV
loss function, allowing for a smooth transition at the origin energy consumption based on QRNN and QEGBR, where

Authorized licensed use limited to: Jaypee Insituite of Information Technology-Noida Sec 128 (L3). Downloaded on September 21,2024 at 10:58:46 UTC from IEEE Xplore. Restrictions apply.
© 2024 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.See https://www.ieee.org/publications/rights/index.html for more information.
This article has been accepted for publication in IEEE Transactions on Transportation Electrification. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/TTE.2024.3416532

IEEE TRANSACTIONS ON TRANSPORTATION ELECTRIFICATION 7

1
PN
model adaptations are made in real-time based on the latest N i=1 |yi − yˆi |
P M AE = 1
PN × 100%, (13)
trip the targeted vehicle has completed. i=1 |yi |
N
1) Online Adaptive QRNN: With continuous usage of the
where N is the number of data samples in the testing set.
targeted vehicle, new data samples will be available and can
The other two evaluation standards for assessing prediction
be used for individualized model development. The QRNN
intervals at the same probability level are the coverage proba-
often consists of many layers and neurons to learn complex
bility (CP) and average width (AW) of the prediction interval,
input-output relationships.
defined as
On one hand, if training the entire QRNN model at each (
N
time step k only against the newly arrived data sample, one can 1 X 1 yi ∈ [y i , y i ]
expect serious over-fitting. On the other hand, by adding the P ICP = Ci , where Ci = (14)
N i=1 0 yi ̸∈ [y i , y i ]
newly arrived data to the training set for model re-training,
N
the required time can be very long, hindering online model 1 X
P IAW = (y − y i ), (15)
adaptation. In addition, the result of model re-training will N i=1 i
still be dominated by the offline available dataset. To enhance
the impact of new data and facilitate efficient online learning, where y i and y i represent the predicted lower and upper
we adopt a learning-without-forgetting approach proposed in bounds, respectively, for a certain prediction interval.
[46]. The key idea is that while the overall structure and the
values of most parameters of the global model are preserved, A. Implementation Specification
the parameters of the hidden layer closest to the output layer, For data processing in Section II-B, to balance the degree of
denoted Θ, are updated as the new data sample arrives. While removing the detected issues and the number of data samples
various online parameter estimation methods can be appli- in model development, we set the tolerable thresholds for ρloss,i
cable, for demonstration purpose, we employ the stochastic and ρmismatch,i to 10% and 30%, respectively. Any trips in the
gradient descent to estimate Θk recursively according to dataset that do not satisfy the conditions will be removed. We

Θk+1 = Θk − α∇L(Θk ), (11) flag trip-level samples as outliers when Dii exceeds 6/N̄ or
the absolute value of ri is larger than 3.
where k + 1 means the trip next after trip k, α represents the We use Monte Carlo cross-validation to evaluate the accu-
learning rate, and ∇L(Θk ) is the gradient (vector) of the loss racy, efficiency, and robustness of the developed ML models.
function of QRNN with respect to Θk . From the processed dataset, 45 vehicles are randomly selected
2) Online Adaptive QEGBR: XGBoost can be implemented and used for model training, while the data from the remaining
through a mature and well-encapsulated toolbox, which limits 10 vehicles serve as the test set. This process of random data
modifications to the global model trained offline. The core of splitting is iterated 20 times to mitigate sample bias. Subse-
the QEGBR algorithm involves adding trees and repeatedly quently, the average results of these iterations are computed
performing feature splits to grow a tree, where a new function to provide a robust assessment of model performance. For
is learned each time, and a tree is added to fit the residual from feature engineering in Section IV-A, we set ρs,min = 0.05,
the previous prediction. To have the benefits of both offline and ρp,max = 0.8.
and online learning, we propose the online adaptive QEGBR For all the ML algorithms described in Section IV-B, the
algorithm. Specifically, with the arrival of each new training quantile values, τ , in their corresponding loss functions are
data from a targeted vehicle, we add a new tree in its modeling set as 0.5 for generating point predictions. The quantile values
to reduce the residual, thereby enabling individualized mod- are set to be 0.025 and 0.975 to obtain the lower and upper
eling for this specific vehicle in real-time. Differing from the bounds, of a 95% prediction interval, respectively.
online adaptive QRNN, the online adaptive QEGBR thus alters
the structure, rather than the parameters, of its corresponding
B. Results of Data Processing
global model.
Note that during the online phase, both the above two adap- The results of data processing, including data cleaning
tation algorithms will preserve the major model information and outlier detection conducted in Section II-A, are partially
from the previous learning step to reduce the risk of over- depicted. For brevity, only the data on trip-based energy
fitting, robustness issues, and large modeling errors. consumption and its correlation with driving distances are
presented in Fig. 4.
V. R ESULTS A ND D ISCUSSION Compared with the raw data samples displayed in Fig. 3, the
shapes of these two histogram plots are highly similar, both
Four evaluation metrics are applied to evaluate the predic- exhibiting a distinct right skewness. This means most trips
tion accuracy and uncertainty estimation performance. Two of had low energy consumption. However, the distribution of the
them are used to analyze the prediction accuracy, namely the cleaned dataset has a shorter and lighter tail than that of the
root mean squared error (RMSE) and the percentage mean raw dataset. Specifically, the trips with energy consumption
absolute error (PMAE) defined as of more than 15 kWh, which is about 50% of the maximum
energy stored in the battery system at the beginning of its life,
v
u
u1 X N
RM SE = t (yi − yˆi )2 , (12) are largely reduced. The removed data samples particularly
N i=1 include “skeptical trips” that consumed high energy within

Authorized licensed use limited to: Jaypee Insituite of Information Technology-Noida Sec 128 (L3). Downloaded on September 21,2024 at 10:58:46 UTC from IEEE Xplore. Restrictions apply.
© 2024 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.See https://www.ieee.org/publications/rights/index.html for more information.
This article has been accepted for publication in IEEE Transactions on Transportation Electrification. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/TTE.2024.3416532

IEEE TRANSACTIONS ON TRANSPORTATION ELECTRIFICATION 8

short driving distances. After the data processing, the linearity TABLE II: The selected features and their Spearman correla-
between driving distances and energy consumption becomes tion coefficients
more pronounced, and correspondingly, the variation of energy
Feature Description Coefficient
consumption generally becomes smaller for a given driving
d Driving distance 0.9831
distance. Vw,var Variance of relative wind velocity 0.4126
In total, 91,932 driving trips are extracted from the original Evar Variance of elevation 0.3928
time-series data. According to the tolerable thresholds of data V95 95th quantile of vehicle velocity 0.2945
Vave Average of vehicle velocity 0.2422
loss and mismatch in each trip specified in Section V-A, avar Variance of acceleration 0.2126
53.88% of the data samples are removed. After the data E95 95th quantile of of elevation 0.1871
cleaning, 816 data samples belong to the defined outliers, Gcos
var Variance of Gcos 0.1576
Gcos
95 95th quantile of Gcos 0.1399
corresponding to 0.8876% of the raw data. Overall, 41,585 Td Average of dewpoint temperature 0.1313
samples are retained for the training and testing of ML models. P Mean precipitation -0.0944
H Mean humidity 0.0880
Vw,5 5th quantile of relative wind velocity -0.0879
Gtan
5 5th quantile of Gtan 0.0752
V5 5th quantile of vehicle velocity -0.0665
Gtan
95 95th quantile of Gtan -0.0618
Gtan
var Variance of Gtan 0.0586

d
VZ YDU 

Evar  

V95   

Vave     


avar     

Fig. 4: Illustration of the trip-based energy consumption data E95      

resulting from data cleaning and outlier detection. cos


Gvar 

&RUUHODWLRQ
      
cos
G95        

Td         



P          
C. Results of Feature Engineering H           

This subsection presents results of feature engineering per- Vw             
í
G5tan             
formed in Section IV-A using ρs,min and ρp,max specified in
V5              
Section V-A. Table II lists the 17 selected features and their tan
G95                í
coefficients of Spearman correlation with the output y, i.e., tan
Gvar                
the trip-based energy consumption. For Pearson correlation
d

E95
Evar

Vave

Td
P
H
avar

G5tan

tan

tan
VZ YDU

V5
V95

cos

cos

Vw 

Gvar
Gvar

G95
G95

between each two features, the coefficients are also derived,


and Fig. 5. depicts the scores for the features applied in the
ML models. Fig. 5: Pearson correlation heatmap of the selected features
The driving distance d is found as the most relevant feature for the processed dataset.
to predict y, having a Spearman correlation coefficient as
high as 0.98. However, several other features also correlate
strongly with y, such as the driving time. However, these defined in Section V-A and the obtained hyperparameters in
features are heavily dependent on d according to the Pearson Table III, the overall prediction results for all data samples in
correlation analysis and were therefore excluded to mitigate the test set are summarized in Tables V–IV.
multicollinearity. In general, features related to vehicle states Although the task is challenging, it can be observed that
are more relevant to y than those features associated with the the best model, i.e., QRNN, can accurately predict EV energy
ambient environment. Specifically, the 95th quantile of the consumption. Specifically, after cleaning the data and remov-
vehicle velocity carries more weight than the average velocity, ing the outliers, the QRNN model can deliver predictions
and the variance of acceleration takes precedence over all with a PMAE of 6.3%. In addition to QRNN, QEGBR can
other acceleration-related features. It is noteworthy that the also effectively learn the characteristics of energy consumption
impact of both the variance of the relative wind velocity and from the diverse field data and make reliable predictions
the elevation on y is substantial, which is an underexplored for any given input that has not been seen during training.
aspect in the existing literature. These results verify the effectiveness of the developed energy
consumption models as well as the constructed and selected
physics-informed features underlying each model.
D. Results of the global ML models To evaluate the efficacy of our newly developed global mod-
1) Prediction Accuracy: By using the ML-based prediction els for energy prediction, as well as their underlying feature set
models developed in Section IV-B, we can continuously pre- (i.e., those in Table II and labeled here as Set 4), we compare
dict EV energy consumption in each trip. With the data split the obtained results with those achieved in three benchmarks

Authorized licensed use limited to: Jaypee Insituite of Information Technology-Noida Sec 128 (L3). Downloaded on September 21,2024 at 10:58:46 UTC from IEEE Xplore. Restrictions apply.
© 2024 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.See https://www.ieee.org/publications/rights/index.html for more information.
This article has been accepted for publication in IEEE Transactions on Transportation Electrification. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/TTE.2024.3416532

IEEE TRANSACTIONS ON TRANSPORTATION ELECTRIFICATION 9


45 45 0HDVXUHG
45) 45)  45
 
4511 4511 45)
4(*%5 4(*%5 4511
  4(*%5

(QHUJ\FRQVXPSWLRQ N:K


506( N:K



30$( 



 



 D E  F
                          
9HKLFOHLQGH[ 9HKLFOHLQGH[ 7ULSLQGH[

Fig. 6: Prediction results of the four global models for individual vehicles. (a) and (b) show the RMSE and PMAE values. (c)
exemplifies the predicted energy consumption in 30 trips from a randomly selected vehicle in the test set.

TABLE III: Hyperparameter values for the applied ML algo- in both the RMSE and PMAE. By using QRNN as an example,
rithms without the proposed data processing techniques, the PMAE
QR — can become 41% larger, and the RMSE will increase by 29%.
Hidden unit numbers: 256, 64, 32, 32, 8 Analysis of the results presented in the last two columns of
QRNN L2 regularization: 0.0005 Table V underscores that in addition to addressing data loss
Learning rate: 0.00001
Learning rate: 0.01 and mismatch issues, it is crucial to remove outliers.
QEGBR Total number of iterations: 8000 Upon detailed examination of the results, it is observed that
Early stopping rounds: 10
Maximum features: 17 for the two less accurate models, i.e., QR and QRF, the RMSE
Maximum tree depth: 20 values exhibit a marginal increase after the data cleaning, a
QRF
Minimum sample split: 10 phenomenon that initially appears counter-intuitive. It is found
Minimum sample leaf: 2
that the prediction errors from QR and QRF models tend to
escalate for longer trips. The data cleaning process primarily
removes data samples pertaining to shorter trips, which results
using different feature sets. The first benchmark has a feature in an increase in the average trip distance within the cleaned
set (i.e., Set 1) only incorporating driving distance. The second dataset. Consequently, this leads to slightly increased RMSE
benchmark adopts a more complex feature set derived in the values, specifically 0.274 for the QR model and 0.2506 for
state-of-the-art literature [35], which includes driving range, the QRF model. This observation further corroborates the
driving time, average velocity, 95% quantile of acceleration, significance of outlier removal from the dataset.
5% quantile of acceleration, and average temperature, and six By using the processed dataset, the prediction results for
categorical variables representing traffic conditions during rush individual vehicles in the test set are illustrated in Fig. 6.
and non-rush hours across various time frames and days. The QRNN and QEGBR generally outperform the other two mod-
third benchmark employs the proposed feature engineering els for individual vehicles and trips, consistent with the results
but only takes the ten features with the highest correlation obtained above. It can also be seen that the prediction errors do
coefficients from Table II, forming Set 3. To ensure a fair not appreciably increase with energy consumption (Fig. 6c),
comparison, all four machine learning (ML) models were im- showing the stability and robustness of the developed models.
plemented and fine-tuned across each benchmark. The results This implies that for trips with higher energy consumption, the
demonstrate a clear advantage of using our comprehensive relative errors tend to be smaller. In Fig. 6a–b, the trajectories
feature set (Set 4). Notably, our QRNN model achieves a of the four ML models have a similar variation trend. This
reduction in prediction error of 11.9% compared to the best- conveys that in addition to the ML algorithms, the prediction
performing benchmark and 19.6% relative to the state-of-the- results are also influenced by other factors, such as the data
art benchmark. quality in terms of resolution and level of detail. It may be
To assess the impact of data processing on prediction noticed that for test vehicle No. 6, the predictions have a
accuracy, we conducted a comparative analysis of results using low RMSE but a high PMAE. This is because we have used
the raw dataset and two processed datasets. Our findings the average energy consumption of all its trips, and shorter
indicate significant improvements in prediction accuracy after distances traveled by this vehicle result in a larger PMAE
data cleaning and outlier removal, as evidenced by reductions value.

Authorized licensed use limited to: Jaypee Insituite of Information Technology-Noida Sec 128 (L3). Downloaded on September 21,2024 at 10:58:46 UTC from IEEE Xplore. Restrictions apply.
© 2024 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.See https://www.ieee.org/publications/rights/index.html for more information.
This article has been accepted for publication in IEEE Transactions on Transportation Electrification. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/TTE.2024.3416532

IEEE TRANSACTIONS ON TRANSPORTATION ELECTRIFICATION 10

TABLE IV: Effects of different feature sets and online learning on prediction accuracy
Global models with different feature sets Online adaptive models
Model Error type
Set 1 Set 2 Set 3 Set 4 Set 4
RMSE 0.2891 0.2365 0.2343 0.2263
QR
PMAE 10.37% 8.29% 8.17% 7.90%
RMSE 0.2868 0.2232 0.2266 0.2132
QRF
PMAE 10.26% 7.88% 7.92% 7.31%
RMSE 0.2870 0.2193 0.2129 0.1788 0.1456
QRNN
PMAE 10.30% 7.84% 7.23% 6.30% 5.04%
RMSE 0.2875 0.2120 0.2012 0.1861 0.1604
QEGBR
PMAE 10.28% 7.50% 6.97% 6.47% 5.56%

TABLE V: Prediction errors of the developed models using different datasets


Model Error type Raw data Data with outliers Fully processed data
RMSE 0.2694 0.2740 0.2263
QR
PMAE 10.23% 8.43% 7.90%
RMSE 0.2482 0.2506 0.2132
QRF
PMAE 9.54% 7.70% 7.31%
RMSE 0.2311 0.2262 0.1788
QRNN
PMAE 8.88% 7.00% 6.30%
RMSE 0.2247 0.2128 0.1861
QEGBR
PMAE 8.84% 6.74% 6.47%

 4(*%5 D  0HDVXUHG  0HDVXUHG


 2QOLQH4(*%5 4511 4(*%5
(QHUJ\FRQVXPSWLRQ N:K

(QHUJ\FRQVXPSWLRQ N:K
4511  2QOLQH4511  2QOLQH4(*%5
 2QOLQH4511

30$( 

 

  
  
 E F
 
                        
9HKLFOHLQGH[ 7ULSLQGH[ 7ULSLQGH[
Fig. 7: Comparison of the point prediction results of the global models (QRNN and QEGBR) and their online adaptive models.
(a) PMAE values for all vehicles in the test set. (b) and (c) Trajectories of the ground truth and predictions for 30 trips from
a randomly selected vehicle in the test set.

TABLE VI: Uncertainty estimation by the global models and online adaptive models
Evaluation matrices QR QRF QRNN QEGBR Online QRNN Online QEGBR
PICP 0.9354 0.9165 0.8931 0.6377 0.9127 0.5785
PIAW 0.7446 0.6624 0.5981 0.5294 0.5082 0.4348

2) Uncertainty Estimation: To make the predictions in- (i.e., high PICP ) and to be as narrow as possible (namely low
terpretable for decision-making of EV charging and energy PIAW ). Within a 95% confidence interval, the ideal PICP for
usage, four quantile-based ML algorithms have been used in models evaluated on the test dataset is 0.95, though the actual
the prediction model development allowing the uncertainty values of PICP may vary with the data distribution of the test
associated with each prediction to be estimated at the same dataset and model structures.
time. To the best of our knowledge, this has not previously
been conducted in the literature of data-driven EV energy From the numerical and graphical results, it can be seen that
prediction. The coverage probability and average width of the prediction intervals generated by QR, QRF, and QRNN are
prediction intervals, i.e., PICP and PIAW , are used to quantify able to cover the measured trip-level energy consumption on
the performance of uncertainty estimation, with the results most occasions. While QR gives the highest PICP , QEGBR
presented in Table VI and Fig. 8. Without doubt, one would results in lowest PIAW thanks to the use of the synthetic quan-
desire prediction intervals to always cover the ground truth tile loss function, i.e., ρLC (yi , ŷi ) = log(cosh(ρτ (yˆi − yi , τ ))
as described in Section IV-B3. QRNN is capable of best

Authorized licensed use limited to: Jaypee Insituite of Information Technology-Noida Sec 128 (L3). Downloaded on September 21,2024 at 10:58:46 UTC from IEEE Xplore. Restrictions apply.
© 2024 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.See https://www.ieee.org/publications/rights/index.html for more information.
This article has been accepted for publication in IEEE Transactions on Transportation Electrification. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/TTE.2024.3416532

IEEE TRANSACTIONS ON TRANSPORTATION ELECTRIFICATION 11

 0HDVXUHG  0HDVXUHG


4511 4(*%5
 2QOLQH4511  2QOLQH4(*%5
(QHUJ\FRQVXPSWLRQ N:K

(QHUJ\FRQVXPSWLRQ N:K
 

 

 

 

 
             
7ULSLQGH[ 7ULSLQGH[

Fig. 8: The estimated uncertainties and the ground truth of energy consumption for a vehicle randomly selected from the test
set, where the rose- and turquoise-colored areas denote the 95% prediction intervals.

balancing PICP and PIAW , and can consequently serve as prediction intervals, PIAW , showing a decrease of 15% and
the most suitable candidate for uncertainty estimation. By 18%, respectively. Similar results are observed in Fig. 8 for
leveraging QRNN’s prediction interval bounds, i.e., y i and y i individual trips. Obviously, the turquoise-colored areas of the
generated for each trip i, it is possible to establish suitable online adaptive models are smaller than the rose-colored areas
constraints and safety margins for various decision actions. of the global models. Furthermore, the online QRNN cannot
3) Computational efficiency: In addition to performance only tighten the prediction intervals but also increase the
for point prediction and uncertainty estimation, the com- probability of containing the measured trajectory inside the
putational efficiency of ML models is crucial for real-time intervals. This makes its estimated bounds of each prediction
implementations. With this consideration, we investigate the interval, i.e., y and y, more valuable for advanced EV energy
computational time required by all the developed models. It is management. By contrast, the online QEGBR shrinks PIAW
found that the most accurate global model, namely the QRNN, but also decreases PICP . Such a low value of PICP implies that
requires only 15 microseconds on average to predict the energy the uncertainty predictions are less reliable and useful.
consumption for individual trips. This time is significantly less While significantly enhancing prediction and estimation per-
than the trip duration, rendering it negligible. formance, the online model adaptation will inevitably demand
additional computational effort. For instance, when using the
online QRNN model, the average computational time is 4.73
E. Results of Online Adaptive Models milliseconds for predicting the energy consumption of a single
The best global models, i.e., QRNN and QEGBR, have been trip. This minimal duration makes the developed ML models
adapted online, with the results demonstrated in Table V and highly suitable for online vehicular applications.
Fig. 7. It is evident that the two online adaptive ML models
significantly outperform their global models across all vehicles
VI. C ONCLUSIONS
in the test set (see Fig. 7a). The online QRNN can deliver
the highest accuracy, with a PMAE of 5.04%. Corresponding This paper has introduced a field data-based ML pipeline
to a reduction of more than 20% compared to the offline for the prediction of EV energy consumption. The first novelty
model performance. In comparison with the method proposed arises from the proposed data processing method tailored for
in [35], the reduction is as high as 35%. QEGBR, with a a large amount of real-world EV data that was inherently
PMAE of 5.56%, is also superior to all the global models. plagued by various issues and outliers. Then, a new feature
Further, for individual trips of a randomly selected vehicle set was constructed from physical insights and picked meticu-
(see Fig. 7b–c), the predicted values of the online adapted lously through systematic correlation analyses. Based on these
QRNN and QEGBR closely follow the ground truth in the data and features, four quantile-based machine learning algo-
entire range of energy consumption. This validates that our rithms were pertinently formulated and innovatively applied
proposed online adaptation method can judiciously learn the for the EV energy prediction, enabling accurate and reliable
energy consumption behavior of the target EV and effectively prediction of both the energy consumption and associated
combine it with the corresponding global model. uncertainties. Finally, the best-performing global ML models
The effect of online adaption on uncertainty estimation is were adapted online for individualized predictions, leading
also investigated. From Table VI, it is clear that the online to consistently improved accuracy and tightened confidence
QRNN and QEGBR effectively reduce the average width of internals.

Authorized licensed use limited to: Jaypee Insituite of Information Technology-Noida Sec 128 (L3). Downloaded on September 21,2024 at 10:58:46 UTC from IEEE Xplore. Restrictions apply.
© 2024 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.See https://www.ieee.org/publications/rights/index.html for more information.
This article has been accepted for publication in IEEE Transactions on Transportation Electrification. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/TTE.2024.3416532

IEEE TRANSACTIONS ON TRANSPORTATION ELECTRIFICATION 12

The developed ML models as well as their underpinning [21] S. Yang, M. Li, Y. Lin, and T. Tang, “Electric vehicle’s electricity
data processing and feature engineering were validated exten- consumption on a road with different slope,” Physica A: Stat. Mech.
Appl., vol. 402, pp. 41–48, 2014.
sively for EV energy prediction. Comprehensive comparisons [22] C. Fiori, K. Ahn, and H. A. Rakha, “Power-based electric vehicle energy
were conducted for different steps of data processing, between consumption model: Model development and validation,” Appl. Energy,
global models and online adaptive models, and with models vol. 168, pp. 257–268, 2016.
[23] G. Xia, L. Cao, and G. Bi, “A review on battery thermal management
in the literature. The online adaptive QRNN models outper- in electric vehicle application,” J. Power Sources, vol. 367, pp. 90–105,
formed all other models with an average prediction error of 2017.
5.04%, corresponding to an over 35% improvement over the [24] X. Yuan, C. Zhang, G. Hong, X. Huang, and L. Li, “Method for evalu-
ating the real-world driving energy consumptions of electric vehicles,”
state-of-the-art models. Substantial advantages have also been Energy, vol. 141, pp. 1955–1968, 2017.
observed from different steps of data processing and online [25] O. A. Hjelkrem, K. Y. Lervåg, S. Babri, C. Lu, and C.-J. Södersten, “A
model adaptation. battery electric bus energy consumption model for strategic purposes:
Validation of a proposed model structure with data from bus fleets in
china and norway,” Transp. Res. D, vol. 94, p. 102804, 2021.
R EFERENCES [26] B. Luin, S. Petelin, and F. Al-Mansour, “Microsimulation of electric
vehicle energy consumption,” Energy, vol. 174, pp. 24–32, 2019.
[1] G. J. Offer, “Automated vehicles and electrification of transport,” Energy [27] C. Zhang, F. Yang, X. Ke, Z. Liu, and C. Yuan, “Predictive modeling
Environ. Sci., vol. 8, no. 1, pp. 26–30, 2015. of energy consumption and greenhouse gas emissions from autonomous
[2] E. M. Bibra, E. Connelly, S. Dhir, M. Drtil, P. Henriot, I. Hwang, J.- electric vehicle operations,” Appl. Energy, vol. 254, p. 113597, 2019.
B. L. Marois, S. McBain, P. Leonardo, and T. Jacob, “Global EV outlook [28] M. Cocca, D. Giordano, M. Mellia, and L. Vassio, “Free floating electric
2022: Securing supplies for an electric future,” Int. Energy Agency, 2022. car sharing: A data driven approach for system design,” IEEE Trans. Int.
[3] G. Crabtree, “The coming electric vehicle transformation,” Science, vol. Transport. Syst., vol. 20, no. 12, pp. 4691–4703, 2019.
366, no. 6464, pp. 422–424, 2019. [29] A. T. Thorgeirsson, S. Scheubner, S. Fünfgeld, and F. Gauterin, “Prob-
[4] D. Tan, “Transportation electrification: Challenges and opportunities,” abilistic prediction of energy demand and driving range for electric
IEEE Power Electron. Mag., vol. 3, no. 2, pp. 50–52, 2016. vehicles with federated learning,” IEEE Open J. Veh. Technol., vol. 2,
[5] X. Hu, S. J. Moura, N. Murgovski, B. Egardt, and D. Cao, “Integrated pp. 151–161, 2021.
optimization of battery sizing, charging, and power management in plug- [30] T. Qian, C. Shao, X. Li, X. Wang, Z. Chen, and M. Shahidehpour,
in hybrid electric vehicles,” IEEE Trans. Contr. Syst. Technol., vol. 24, “Multi-agent deep reinforcement learning method for EV charging
no. 3, pp. 1036–1043, 2015. station game,” IEEE Trans. Power Syst., vol. 37, no. 3, pp. 1682–1694,
[6] Y. Xu, S. Çolak, E. C. Kara, S. J. Moura, and M. C. González, “Planning 2021.
for electric vehicle needs by coupling charging profiles with urban [31] X. Chen, Y. Ge, Y. Zhang, and T. Qian, “Leveraging transformer-based
mobility,” Nat. Energy, vol. 3, no. 6, pp. 484–493, 2018. non-parametric probabilistic prediction model for distributed energy
[7] D. Baek, Y. Chen, A. Bocca, L. Bottaccioli, S. Di Cataldo, V. Gatteschi, storage system dispatch,” Processes, vol. 12, no. 4, p. 779, 2024.
D. J. Pagliari, E. Patti, G. Urgese, N. Chang et al., “Battery-aware [32] Y. Chen, Y. Zhang, and R. Sun, “Data-driven estimation of energy con-
operation range estimation for terrestrial and aerial electric vehicles,” sumption for electric bus under real-world driving conditions,” Transp.
IEEE Trans. Veh. Technol., vol. 68, no. 6, pp. 5471–5482, 2019. Res. D, vol. 98, p. 102969, 2021.
[8] R. Basso, B. Kulcsár, and I. Sanchez-Diaz, “Electric vehicle routing [33] P. Li, Y. Zhang, K. Zhang, and M. Jiang, “The effects of dynamic traffic
problem with machine learning for energy prediction,” Transp. Res. B, conditions, route characteristics and environmental conditions on trip-
vol. 145, pp. 24–55, 2021. based electricity consumption prediction of electric bus,” Energy, vol.
[9] Y. Zhang, X. Qu, and L. Tong, “Optimal eco-driving control of au- 218, p. 119437, 2021.
tonomous and electric trucks in adaptation to highway topography: [34] P. Li, Y. Zhang, Y. Zhang, and K. Zhang, “Prediction of electric bus
Energy minimization and battery life extension,” IEEE Trans. Transport. energy consumption with stochastic speed profile generation modelling
Electrif., vol. 8, no. 2, pp. 2149–2163, 2022. and data driven method based on real-world big data,” Appl. Energy,
[10] J. Zhang, T.-Q. Tang, Y. Yan, and X. Qu, “Eco-driving control for vol. 298, p. 117204, 2021.
connected and automated electric vehicles at signalized intersections [35] J. Zhang, Z. Wang, P. Liu, and Z. Zhang, “Energy consumption analysis
with wireless charging,” Appl. Energy, vol. 282, p. 116215, 2021. and prediction of electric vehicles based on real-world driving data,”
[11] M. Sabri, K. A. Danapalasingam, and M. F. Rahmat, “A review on Appl. Energy, vol. 275, p. 115408, 2020.
hybrid electric vehicles architecture and energy management strategies,” [36] C. De Cauwer, W. Verbeke, T. Coosemans, S. Faid, and J. Van Mierlo,
Renew. Sustain. Energy Rev., vol. 53, pp. 1433–1442, 2016. “A data-driven method for energy consumption prediction and energy-
[12] G. Correa, P. Muñoz, and C. Rodriguez, “A comparative energy and efficient routing of electric vehicles in real-world conditions,” Energies,
environmental analysis of a diesel, hybrid, hydrogen and electric urban vol. 10, no. 5, p. 608, 2017.
bus,” Energy, vol. 187, p. 115906, 2019. [37] Chinese National Technical Committee of Auto Standardization, “Part
[13] H. Abdelaty, A. Al-Obaidi, M. Mohamed, and H. E. Farag, “Machine 3: Communication protocol and data format,” Technical specifications
learning prediction models for battery-electric bus energy consumption of remote service and management system for electric vehicles, 2016.
in transit,” Transp. Res. D, vol. 96, p. 102868, 2021. [38] D. Blatná, “Outliers in regression,” Trutnov, vol. 30, pp. 1–6, 2006.
[14] M. Xylia, S. Leduc, P. Patrizio, F. Kraxner, and S. Silveira, “Locating [39] A. Lehman, N. O’Rourke, L. Hatcher, and E. Stepanski, JMP for basic
charging infrastructure for electric buses in stockholm,” Transp. Res. C, univariate and multivariate statistics: methods for researchers and social
vol. 78, pp. 183–200, 2017. scientists. Sas Institute Inc., 2013.
[15] L. Li, H. K. Lo, and F. Xiao, “Mixed bus fleet scheduling under range [40] R. Koenker and G. Bassett, “Regression quantiles,” Econometrica,
and refueling constraints,” Transp. Res. C, vol. 104, pp. 443–462, 2019. vol. 46, no. 1, pp. 33–50, 1978.
[16] A. Desreveaux, A. Bouscayrol, R. Trigui, E. Castex, and J. Klein, [41] J. W. Taylor, “A quantile regression neural network approach to esti-
“Impact of the velocity profile on energy consumption of electric mating the conditional density of multiperiod returns,” J. Forecasting,
vehicles,” IEEE Trans. Veh. Technol., vol. 68, no. 12, pp. 11 420–11 426, vol. 19, no. 4, pp. 299–311, 2000.
2019. [42] T. Chen and C. Guestrin, “Xgboost: A scalable tree boosting system,”
[17] X. Wu, D. Freese, A. Cabrera, and W. A. Kitch, “Electric vehicles’ in Proc. of the 22nd ACM SIGKDD Int. Conf. on Knowledge Discovery
energy consumption measurement and estimation,” Transp. Res. D, and Data Mining, 2016, pp. 785–794.
vol. 34, pp. 52–67, 2015. [43] Q. Wang, Y. Ma, K. Zhao, and Y. Tian, “A comprehensive survey of
[18] J. Ji, Y. Bie, Z. Zeng, and L. Wang, “Trip energy consumption estimation loss functions in machine learning,” Ann. Data Sci., pp. 1–26, 2020.
for electric buses,” Commun. Transp. Res., vol. 2, p. 100069, 2022. [44] C. Chen, “A finite smoothing algorithm for quantile regression,” J.
[19] C. Zhao, G. Gong, C. Yu, Y. Liu, S. Zhong, Y. Song, C. Deng, A. Zhou, Comput. Graph. Statist., vol. 16, no. 1, pp. 136–164, 2007.
and H. Ye, “Research on key factors for range and energy consumption [45] N. Meinshausen and G. Ridgeway, “Quantile regression forests.” J.
of electric vehicles,” SAE Technical Paper, Tech. Rep., 2019. Mach. Learn. Res., vol. 7, no. 6, 2006.
[20] G. M. Fetene, S. Kaplan, S. L. Mabit, A. F. Jensen, and C. G. Prato, [46] Z. Li and D. Hoiem, “Learning without forgetting,” IEEE Trans. Pattern
“Harnessing big data for estimating the energy consumption and driving Anal. Mach. Intell., vol. 40, no. 12, pp. 2935–2947, 2017.
range of electric vehicles,” Transp. Res. D, vol. 54, pp. 1–11, 2017.

Authorized licensed use limited to: Jaypee Insituite of Information Technology-Noida Sec 128 (L3). Downloaded on September 21,2024 at 10:58:46 UTC from IEEE Xplore. Restrictions apply.
© 2024 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.See https://www.ieee.org/publications/rights/index.html for more information.

You might also like