You are on page 1of 5

2021 NANJING

Calculation Method of Electric Vehicle Power


Consumption Based on Naive Bayes Classification
Fu Zhixin Bao Hanzhou Yuan Yue
Hohai University Hohai University Hohai University
College of Energy and Electrical Engineering College of Energy and Electrical Engineering College of Energy and Electrical Engineering
Nanjing China Nanjing China Nanjing China
zhixinfu@hhu.edu.cn 1063995340@qq.com yyuan@hhu.edu.cn
2021 IEEE Sustainable Power and Energy Conference (iSPEC) | 978-1-6654-1439-5/21/$31.00 ©2021 IEEE | DOI: 10.1109/iSPEC53008.2021.9735457

Abstract—Electric vehicle charging load forecasting is the electric vehicle power consumption calculations, can it
basis of charging station planning and construction and electric provide a reliable basis for load forecasting.
vehicle dispatching. Electric vehicle power consumption
calculation is an important part of load forecasting. This paper The power consumption of electric vehicles is related to
proposes a method for calculating the power consumption of many influencing factors. It is extremely difficult to accurately
electric vehicles based on Naive Bayesian classification. Firstly, obtain the power consumption per kilometer. Its value is
the problems faced by electric vehicle power consumption generally 0.15~0.30kW h/km, depending on factors such as
calculation and the application of naive Bayesian classification the battery life, traffic index, driver’s driving habits,
in electric vehicle power consumption calculation are analyzed. temperature, and battery energy management system
Then, based on the principle of Naive Bayesian classification, a efficiency. Traffic congestion will not only cause the vehicle's
calculation model of electric vehicle power consumption is driving speed to drop, but also cause the vehicle to brake and
established. Finally, based on some electric vehicle travel data in start frequently, which will increase the additional power
Nanjing in June 2021, simulation calculations are performed consumption. The change in ambient temperature not only
using Python software. The simulation results show that the affects the performance of the power battery, but also when
proposed method has high accuracy in calculating the power the car air conditioner is turned on in hot weather will also
consumption of electric vehicles and is simple to operate. cause additional power consumption. The literature [1]
Keywords—Electric vehicle; Load forecasting; Naive comprehensively considers the effects of traffic and
Bayesian classification; Power consumption calculation temperature to calculate the power consumption per unit
mileage of electric vehicles. Literature [5] is based on the
I. INTRODUCTION actual road driving data of electric vehicles for modeling, and
With the global energy shortage and the development of the analysis shows that the actual congestion degree of
new energy technologies, the number of electric vehicles is different levels of roads and the driving state of vehicles will
increasing rapidly and is gradually replacing traditional fuel affect the power consumption per unit mileage of electric
vehicles. Electric vehicle load forecasting is the basis of vehicles. Therefore, according to the "Urban Road
charging station planning and construction and electric Engineering Design Code", literature [5] establish a model of
vehicle scheduling. It is of great significance to the design of electricity consumption per unit mileage of electric vehicles
electric vehicle mileage, the formulation of charging station for roads above grade 3 in cities. Literature [6] established an
electricity prices, and the development of urban transportation electric vehicle model through Cruise software, and when
construction and the electric vehicle industry. calculating the power consumption per unit mileage, three
In recent years, domestic and foreign scholars have random factors of temperature, vehicle speed and driving
conducted a lot of research on electric vehicle load forecasting. behavior were mainly considered. Literature [7] established a
Literature [1] proposes a method for modeling the probability model of electric vehicle power consumption per unit mileage
of the temporal and spatial distribution of electric vehicle considering the influence of passenger load. Literature [8]
charging load based on dynamic traffic flow. The established uses the relationship between the average speed and the power
model is composed of three parts: a traffic network model, a consumption of electric vehicles to calculate the power
vehicle temporal and spatial transfer model, and a resident consumption per unit mileage by predicting the average speed
travel probability model. Literature [2] established an electric of the car. The above methods predict the power consumption
vehicle model based on the analysis of the characteristics of per unit mileage of electric vehicles to a certain extent, but the
electric vehicle charging load, using the six influencing factors research process is more complicated and difficult.
of daily driving distance, initial charging time, charging power, In order to improve the accuracy of the calculation of
charging time, initial state of charge and electric vehicle electric vehicle power consumption and reduce the difficulty
ownership. And literature [2] describes in detail the steps of of calculation, this article starts from the statistical point of
using Monte Carlo simulation algorithm to solve the model. view, and uses the principle of naive Bayes classification to
In addition, data-driven deep learning methods have also propose an electric vehicle power consumption based on the
achieved good results in the field of electric vehicle charging naive Bayes classification. Firstly, obtain the historical travel
load forecasting[3-4]. The above research on electric vehicle data of electric vehicles, including the power consumption of
load forecasting must consider the power consumption of electric vehicles, the types of electric vehicles, the distance
electric vehicles, and calculate the power consumption of traveled, and the travel time. The type of electric vehicles, the
electric vehicles to provide a data reference for charging load distance traveled, and the travel time of electric vehicles are
forecasting, and the above-mentioned research cannot used as characteristic attributes to form a training sample set.
accurately calculate the electric vehicle’s power consumption. Secondly, calculate the frequency of each type of electric
Power consumption, only by improving the accuracy of vehicle power consumption in the training sample and the
This work is supported by State Grid Corporation of China Research Program conditional probability estimation of each feature attribute
(No. 5418-202018247A-0-0-00). division for each type of electric vehicle power consumption,
978-1-6654-1439-5/21/$31.00 ©2021 IEEE
Paper No. iSPEC 2021CP0269 Page 1/5 3562

Authorized licensed use limited to: Yildirim Beyazit Univ. Downloaded on November 04,2022 at 11:16:42 UTC from IEEE Xplore. Restrictions apply.
2021 NANJING

and record the result to form a classifier. Finally, the classifier Obtain historical
is used to predict the power consumption of electric vehicles travel data of
with known characteristic attributes but unknown power electric vehicles

consumption. This paper uses Python software and takes part


of the travel data of electric vehicles in Nanjing, Jiangsu
Divide feature
Province in June 2021 as an example to carry out experimental attributes to form
simulations to verify that the method can calculate the power training samples
consumption of electric vehicles more accurately.
II. CONCLUSION METHOD OF ELECTRIC VEHICLE POWER 1.Calculate the frequency of each
power consumption in the training
CONSUMPION sample.
2.Calculate the conditional
A. Analysis of Calculation Methods of Electric Vehicle probability estimation of each
characteristic attribute division for
Power Consumption each power consumption.
It can be seen from the above analysis that the current
research mainly analyzes and calculates the power Enter a set of
consumption of electric vehicles from the aspects of travel data for
electric vehicles
temperature, vehicle speed, traffic conditions, driving Classifier with known
behavior, etc. However, it is not easy to obtain data such as characteristics and
unknown power
temperature, vehicle speed, traffic conditions, and driving consumption.
behavior. The changes of these data are irregular and change
greatly in different scenarios. Not only that, when the power Calculate the
consumption is calculated while considering these factors at power
consumption of
the same time, the established model will become more each electric car
complicated, and the calculation will be more difficult.
Therefore, in order to ensure the accuracy of the calculation of
electric vehicle power consumption and reduce the difficulty Fig. 1. Calculation process of electric vehicle power consumption based
of calculation, this paper proposes a calculation method for on Naive Bayes classification
electric vehicle power consumption based on naive Bayesian
classification. Firstly, according to the type, mileage, travel time, and
power consumption of electric vehicles known in historical
B. Application of Naive Bayes Classification in Calculation data, the type, mileage, and travel time of electric vehicles are
of Electric Vehicle Power Consumption used as characteristic attributes, and each type of power
Naive Bayes classification is mainly based on Bayes' consumption is regarded as a category. Form a collection of
theorem (𝑃(𝐵|𝐴) =
𝑃(𝐴|𝐵)𝑃(𝐵)
), and its ideological basis is: training samples. Secondly, calculate the frequency of each
𝑃(𝐴) power consumption in the training sample and the conditional
For the given item to be classified, the probability of each probability estimation of each feature attribute division for
category appearing under the condition of the occurrence of each power consumption, and record the result to form a
this item is solved, which category has the greatest probability classifier. Finally, use the classifier to predict the power
of appearing, and then the category to be classified is consumption of electric vehicles with known characteristic
considered to belong to which category. It is mainly divided attributes but unknown power consumption, and solve the
into three stages: Firstly, a part of the data is known, the probability of various power consumption under the
characteristic attributes are determined according to the condition of determining each characteristic attribute, and
specific situation, and each characteristic attribute is which power consumption occurs with the greatest
appropriately divided, and then a part of the items to be probability, the power consumption of this electric vehicle is
classified is classified to form a training sample set. Secondly, considered to be this.
calculate the frequency of each category in the training sample
and the conditional probability estimation of each feature According to the above analysis, compared with the
attribute division for each category, and record the results to traditional calculation method, because the Naive Bayesian
form a classifier. Finally, use the classifier to classify the items classification uses the historical travel data of electric
to be classified with known feature attributes but unknown vehicles as a reference when calculating the power
categories, and solve the probability of each category consumption of electric vehicles, there is no need to directly
appearing under the condition of the occurrence of this item. consider temperature, vehicle speed, and battery. , traffic and
Which category has the highest probability of occurrence, then other factors, so it has strong reliability and high accuracy,
consider which category the item to be classified belongs to. and at the same time reduces the difficulty of model
establishment and the difficulty of calculation.
The process of calculating the power consumption of
electric vehicles by naive Bayes classification is shown in III. CALCULATION MODEL OF ELECTRIC VEHICLE POWER
Figure 1: CONSUMPTION BASED ON NAIVE BAYES CLASSIFICATION
Model establishment is divided into three stages:
The first stage-the preparatory work stage, to obtain the
historical travel data of electric vehicles, including the type of
electric vehicle, travel distance, travel time, and power
consumption. The type, travel distance, and travel time of the
electric vehicle are set as characteristic attributes, set as a1 ,

Paper No. iSPEC 2021CP0269 Page 2/5 3563

Authorized licensed use limited to: Yildirim Beyazit Univ. Downloaded on November 04,2022 at 11:16:42 UTC from IEEE Xplore. Restrictions apply.
2021 NANJING

a 2 , a3 ; each power consumption is set as a category, set as It can be predicted that the power consumption of electric
vehicle X is ccmp .
c j , j  1, C  , C indicates that there are several power
consumptions in the historical travel data, thus forming IV. CASE ANALYSIS
training sample collection.
This article uses part of the historical travel data of electric
The second stage-the classifier training stage, calculate the vehicles in Nanjing, Jiangsu Province from June 1st to June
frequency P ( c j ) of each power consumption in the training 15th, 2021. 5000 sets of daily data are taken. Each set of data
includes the power consumption of the vehicle, the type of the
sample, c j represents the number of samples with power vehicle, the distance traveled, and travel time. Take the data
from June 1 to June 10 as the training set to form a classifier,
consumption c j , D represents the total number of samples, and use part of the data from June 11 to June 15 as the test set
as shown in formula (1): to verify the simulation results.

cj In the training sample, the characteristic attributes are


P (c j ) = , j  1, C  (1) taken as the type of vehicle, the number of traveled mileage
D and the travel duration. The types of vehicles include buses,
time-sharing rental vehicle, and online taxis. In order to
Calculate the conditional probability estimation P ai c j ( ) simplify the calculation, take out the data that the travel
mileage does not exceed 50km and the travel duration does
of each characteristic attribute for each power consumption, not exceed 3 hours. The simulation results are as follows:
as shown in equation (2):

P ( ai c j )
Power consumption

(
P ai c j =) P (c j )
, i = 1, 2,3; j  1, C  (2)
16

14
Predictive value
MRE of prediction

12
Record all the above calculation results to form a classifier.
Power consumption/kWh

10
The third stage-the application stage, using the data
8
calculated in the classifier, the type of electric vehicle a1 ,
6
travel mileage a 2 , travel time a3 of the three characteristics
4
of the electric vehicle is known but the power consumption c j
2
is unknown (set as X ) for power consumption prediction, set
X = ( a1 , a2 , a3 ) , find the maximum value of P = ( c j X ) , 0

-2
according to the Bayes formula, as shown in formula (3): 0 10 20 30 40 50

(
P X c j P (c j ) )
Mileage/km

P (c j X ) = , i = 1, 2,3; j  1, C  (3)


P( X ) Fig. 2. Bus load forecasting result graph

The calculation of P = X c j ( ) is shown in equation (4): TABLE I. FORECAST RESULTS OF POWER CONSUMPTION FOR SOME
BUSES

( ) (
P X c j = P a1 , a2, , a3 c j , j  1, C  ) (4)
distance
traveled
km
actual value
kWh
predictive
value
kWh
absolute
error
kWh
relative
error

Since the three characteristic attributes of electric vehicle 5 1.53 1.55 0.02 1.57%
type a1 , travel mileage a 2 and travel time a3 are
10 3.60 3.62 0.02 0.56%
conditionally independent of each other, the conditional
probability obtained by equation (4) is the product of the 15 4.68 4.66 0.02 0.45%
probabilities corresponding to each individual characteristic
20 5.79 5.69 0.02 1.68%
attribute, such as (5), as shown in the formula:
25 7.68 7.76 0.08 1.03%
( ) ( ) ( )
3
P X c j = P a1 , a2 , a3 c j =  P ai c j , j  1, C  (5) 30 9.00 8.80 0.20 2.22%
i =1

Since P ( X ) is constant for each power consumption, in


35 10.56 10.50 0.06 0.57%

actual applications we only need to calculate the numerator 40 12.06 11.91 0.15 1.24%
part of the formula (3), find the maximum value, and then 45 13.59 13.51 0.08 0.59%
assign X to the maximum value corresponding to the power
consumption ccmp , as shown in equation (6): 50 15.13 15.02 0.11 0.73%

( ( )
P ( ccmp X ) = max P X c j P ( c j ) , j  1, C  ) (6)
Figure 2 is a diagram of the prediction results of the power
consumption of buses. The black dots represent the actual
value of power consumption, the red dots represent the
predicted value of power consumption, and the blue dots

Paper No. iSPEC 2021CP0269 Page 3/5 3564

Authorized licensed use limited to: Yildirim Beyazit Univ. Downloaded on November 04,2022 at 11:16:42 UTC from IEEE Xplore. Restrictions apply.
2021 NANJING

represent the relative error between the two. Table 1 shows the
Power consumption
forecast data results of some buses. Predictive value
14 MRE of prediction
Power consumption
Predictive value 12
MRA of prediction

Power consumption/kWh
10 10

8
8
Power consumption

6
4

2
4

0
2
-2
0 10 20 30 40 50
0 Mileage/km

0 10 20 30 40 50
Mileage/km Fig. 4. Forecast results of electricity consumption of online taxis

TABLE III. FORECAST RESULTS OF POWER CONSUMPTION FOR SOME


Fig. 3. Forecast results of power consumption for time-sharing vehicles ONLINE TAXIS
distance predictive absolute
TABLE II. FORECAST RESULTS OF POWER CONSUMPTION FOR SOME actual value relative
traveled value error
TIME-SHARING VEHICLES kWh error
km kWh kWh
distance predictive absolute 5 1.46 1.56 0.10 6.87%
actual value relative
traveled value error
kWh error
km kWh kWh 10 2.62 2.60 0.02 0.95%
5 1.01 1.05 0.04 4.21%
15 4.08 4.16 0.08 1.84%
10 2.00 2.10 0.10 4.90%
20 5.20 5.20 0.00 0.00%
15 3.20 3.16 0.04 1.25%
25 6.50 6.25 0.25 3.85%
20 3.80 3.69 0.11 2.89%
30 7.80 7.80 0.00 0.00%
25 5.01 4.91 0.10 2.00%
35 9.10 9.35 0.25 2.75%
30 5.80 5.79 0.01 0.17%
40 10.66 10.91 0.25 2.35%
35 7.00 6.85 0.15 2.14%
45 11.7 11.45 0.25 2.14%
40 7.80 7.89 0.09 1.15%
50 12.87 12.50 0.37 2.91%
45 9.00 8.95 0.05 0.56%
Figure 4 is a graph of the predicted results of the power
50 9.80 9.99 0.19 1.93% consumption of online taxis. The black dots represent the
actual value of power consumption, the red dots represent the
Figure 3 is a graph of the predicted results of the power predicted value of power consumption, and the blue dots
consumption of the time-sharing rental vehicle. The black dots represent the relative error between the two. Table 3 shows the
represent the actual value of power consumption, the red dots forecast data results of some of the power consumption of
represent the predicted value of power consumption, and the online taxis.
blue dots represent the relative error between the two. Table 2
shows the forecast data results of some time-sharing rental From the above three figures and three tables, it can be
vehicles. seen that the absolute error between the predicted value and
the true value of power consumption is basically less than
0.5kWh, the relative error is basically close to 0, and as the
amount of data increases, the absolute error and the relative
error are keeping decreasing, keep getting close to 0.
Literature [6] builds an electric vehicle model through
Cruise software, and uses RUISE software to drag the vehicle
module, motor module, battery module, gearbox module,
wheel module, and driver module into the working area of
Cruise based on the characteristics of electric vehicles, and the
brake control function, drive control function and a constant
unit module are established at the same time. After selecting
each subsystem module, use Connect to establish the
mechanical connection and electrical connection between the
modules according to the configuration plan of the vehicle and

Paper No. iSPEC 2021CP0269 Page 4/5 3565

Authorized licensed use limited to: Yildirim Beyazit Univ. Downloaded on November 04,2022 at 11:16:42 UTC from IEEE Xplore. Restrictions apply.
2021 NANJING

the connection relationship between the components. By distance, and travel duration as characteristic attributes to
setting the constant speed working condition in the Constant calculate the power consumption of electric vehicles. The
Drive module, setting simulation tasks such as acceleration research results show that this method has good accuracy,
and deceleration conditions in the Full Load Acceleration simple principle and easy operation.
module to calculate the power consumption per kilometer of
electric vehicles under different driving behaviors. Simulate In the future research, we will conduct in-depth research
and calculate the power consumption per kilometer of electric on the load characteristics and power efficiency of electric
vehicles at different temperatures, speeds and driving vehicles, and continue to enrich the dimensions of the Naïve
behaviors, and take into account the discrete and Bayesian classification feature attributes, so as to further
disaggregated nature of the Agent-Cellular Automata model improve the accuracy of the method.
to obtain the power consumption per kilometer of the electric ACKNOWLEDGMENT
vehicle in the cellular automata model under different
operating conditions. In addition, literature [7] established a We are very grateful to the relevant units who provided
model of electric vehicle power consumption per unit mileage electric vehicle travel data for this article. Without the relevant
considering the influence of passenger weight. Literature [8] data provided by them, it would be difficult to complete the
uses the relationship between the average speed and the power research content of this article. At the same time, we are very
consumption of electric vehicles to calculate the power grateful to other members of the research group who provided
consumption per unit mileage by predicting the average speed suggestions and assistance for the research of this article.
of the car. Thank you very much.

Compared with literature [6], literature [7], and literature REFERENCES


[8], this paper uses Naive Bayesian classification, based on the [1] SONG Yunong,LIN Shunjiang,TANG Zhiqiang,et al. Spatial-
historical data of electric vehicles, to calculate the load of Temporal Distribution Probabilistic Modeling of Electric Vehicle
electric vehicles with unknown load. Therefore, it ensures the Charging Load Based on Dynamic Traffic Flow[J]. Automation of
Electric Power Systems,2020,44(23):47-56.
reliability of reference data, and there is no need to directly
consider the driving behavior, driving speed, traffic conditions [2] CHANG Xiaoqiang, SONG Zhengxiang ,WANG Jianhua , et
al . Electric Vehicle Charging Load Prediction and System
and temperature of electric vehicles, which greatly reduces the Development Based on Monte Carlo Algorithm[J] . High Voltage
difficulty of modeling, simplifies the calculation process, Apparatus,2020, 56(8):0001-0005.
improves the calculation speed, and ensures the calculation [3] Zhu Juncheng,Yang Zhile,Guo Yuanjin,et al.Short-Term Load
accuracy of the results. Forecasting for Electric Vehicle Charging Stations Based on Deep
Learning Approaches[J].Applied Sciences,2019,9(9):1723.
From the above analysis, it can be seen that the Naive [4] Li Yunyan,Huang Yuansheng,Zhang Meimei.Short-Term Load
Bayesian classification has simple principles and high Forecasting for Electric Vehicle Charging Station Based on Niche
accuracy in calculating the power consumption of electric Immunity Lion Algorithm and Convolutional Neural
vehicles. With the continuous refinement of electric vehicle Network[J].Energies,2018,11(5):1253.
modeling and the continuous in-depth research on its travel [5] LI Lei,ZHAO Xin,LI Xiaohui, et al.Electric Vehicle Charging
habits, charging characteristics, and the efficiency of Demand Prediction Model Based on Dynamic Traffic Information and
Its Impacts on Distribution Networks [J].Power System and Clean
individual electric vehicles, this method will have higher Energy,2020,36(3):0107.
accuracy in the calculation of electric vehicle power [6] SU Shu , LIN Xiangning , ZHANG Hongzhi , et al. Spatial and
consumption. The load forecasting of electric vehicles and the temporal distribution model of electric vehicle charging demand[J].
dispatching of electric vehicles by the power grid provide Proceedings of the CSEE,2017,37(16):4618-4629.
more reliable data support. [7] GAO Pengyan,ZHAO Xingyong,YAO Fang,et al. Modeling of
charging loads considering the temporal and special distributions of
V. CONCLUSION electric vehicles [ J ] . JOURNAL OF ELECTRIC POWER
SCIENCE AND TECHNOLOGY,2019,34(3):005.
This paper proposes a method for calculating the power [8] CHEN Jiangzhou , YU Zirong , CHEN Shan , et al. Energy
consumption of electric vehicles based on Naive Bayesian consumption prediction of electric vehicle considering multiple
classification, which uses the type of electric vehicle, travel influences in urban road network[J]. Electrical Measurement &
Instrumentation,2020,50(20):90-97

Paper No. iSPEC 2021CP0269 Page 5/5 3566

Authorized licensed use limited to: Yildirim Beyazit Univ. Downloaded on November 04,2022 at 11:16:42 UTC from IEEE Xplore. Restrictions apply.

You might also like