Predicting Electric Vehicle Energy Consumption From Field Data Using Machine Learning
Predicting Electric Vehicle Energy Consumption From Field Data Using Machine Learning
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
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
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
Data split
Model development
Energy consumption prediction
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
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
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
TABLE I: Elements for feature construction and the resulting feature pool
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
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
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
V Z Y D U
Evar
Fig. 4: Illustration of the trip-based energy consumption data E95
&