# Operation Energy Consumption Estimation Method of Electric Bus Based on CNN Time Series Prediction

Authors: Yan Xing; Yachao Li; Weidong Liu; Wenqing Li; Lingxuan Meng
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

In order to further improve the accuracy of electric bus energy consumption estimation and reduce the complexity of using data, the paper proposes a new method for estimating electric bus energy consumption based on a deep learning approach with a data-driven model. The method can estimate the single-trip energy consumption of an electric bus by employing CNN (convolutional neural network) to time series prediction, which takes into account easily accessible trip data of electric buses, including initial SOC (state of charge), average speed, average temperature. First, we need to convert the raw data into a trip dataset by preprocessing the collected real-world trip data of an electric bus. Then, the single trip of the bus from the original station to the terminal station is considered the basic unit for energy consumption estimation, and the trip data are processed in a quasi-time series. Following that, the trip data were modified so that the subsequent convolutional operations more closely matched the interactions between adjacent trips, and a time series prediction method based on CNN was used instead of the regression analysis methods used in traditional data-driven models. Finally, single-trip operation energy consumption estimation of electric buses is achieved with time series prediction based on CNN, and this method is compared and analysed with the LSTM (long-short term memory) time series prediction method and multivariate nonlinear regression prediction methods in traditional data-driven models. The results show that the energy consumption estimation model for electric buses developed in this paper has a higher prediction accuracy, which can improve by 3.68 percent over the traditional multivariate nonlinear regression prediction method and by 1.32 percent over the LSTM time series prediction method.


---

## Body

## 1. Introduction

By enhancing the precision of pure electric bus energy consumption and range estimation, it can better handle problems such as bus vehicle charging cooperative scheduling, operation organization optimization, charging pile design, and building. Currently, there are two primary mainstream ways of estimating EV energy consumption: dynamics-based and data-driven.The dynamics-based EV energy consumption estimation model can more accurately describe the EV’s energy consumption process, which typically includes energy consumption of drive, wind resistance, rolling friction, road slope, air conditioning, and other vehicle factors. Gao et al. [1] assessed the energy consumption and battery performance of an urban electric bus based on bus trip data and standardized operating circumstances. By modelling the nonlinear steady-state turning of an urban electric bus, Beckers and Besselink [2] calculated the proportion of turning energy to the overall energy consumption. Chen and Xie [3] developed an energy consumption estimation model based on the identification of working conditions that combined fuzzy energy consumption and the Kalman filter, and the model’s estimation accuracy was improved by 77% when compared to the traditional energy consumption estimation method. Lian et al. [4] separated real-world working condition data into segments by analysing the correlation between SOC and driving range and then developed an electric vehicle range prediction model based on battery SOC and driving condition identification. Liu et al. [5] predicted the vehicle’s energy consumption in the future period using the link between energy consumption and working circumstances, which was produced by determining the driving energy consumption and accessory energy consumption, respectively. Zhang and Yao [6] investigated the energy consumption characteristics of electric cars from a statistical and physical standpoint and provided a microscopic modelling framework for predicting the energy consumption of electric vehicles based on real driving state data. Al-Wreikat et al. [7] investigated the influence of variables such as journey distance, ambient temperature, and road gradient on specific energy consumption in various driving modes. Yin et al. [8] developed a simulation model of an entirely electric vehicle by expressing the typical parameters of 12 driving circumstances, such as speed and acceleration, in order to accomplish a simulation estimation of the entire vehicle’s energy consumption. By dividing electric vehicle driving power into three categories, motor power loss, driving resistance loss, and acceleration and deceleration power, Wu et al. [9] developed an analytical approach for predicting energy consumption. Xu and Wang [10] predicted future vehicle speed profiles based on historical data, elevation information, and real-time road congestion information and developed a mileage consumption estimation model based on travel cycle identification and prediction.The data-driven EV energy consumption estimation model examines the elements that influence energy consumption and employs statistical regression analysis and machine learning to obtain electric vehicle energy consumption estimates. Hu and Gao [11] proposed an energy consumption model based on temperature stratification to extract energy consumption influencing factors from an electric cab model’s operational data. Chen et al. [12] employed a neural network prediction model to estimate energy consumption or recovery values and a data partitioning approach to distinguish between charging and discharging modes. Fukushima et al. [13] developed a transfer learning-based energy consumption estimation approach to accomplish energy consumption estimation for novel electric vehicle models that are based on common electric vehicle models. Yang et al. [14] used a weighted type II fuzzy set model to estimate electric bus energy consumption based on the obtained pure electric bus position data and energy consumption-related data. Vatanparvar et al. [15] estimated electric vehicle energy consumption using the NARX neural network and driving behaviour. Fan et al. [16] employed observed and state data such as operating voltage and battery SOC to enhance the forecast accuracy of electric cars, using recursive least squares calibration of model parameters in conjunction with the ampere-time integration approach and EKF algorithm. Cauwer et al. [17] employed a data-driven method to estimate the energy consumption of an EV for a given road on a road network based on neural networks and multiple linear regression models, which combine microscopic driving parameters with external environmental parameters.The dynamics-based method for estimating the energy consumption of an EV has high data type requirements, which means more road conditions and real-time weather data (e.g., road slope, friction coefficient, wind speed, wind direction) are required. Data-driven energy consumption estimation approaches may be assessed using more easily available data, but they frequently suffer from a lack of estimation accuracy. Applying CNN to data-driven models can solve the higher requirement of data types in dynamics-based models and the insufficient accuracy in data-driven models. In this research, we employ CNN for time series prediction of electric bus trip data. The trip data are processed in a quasi-time series by considering a single bus trip from origin to destination as the fundamental unit for estimating energy consumption. Finally, a real trip data set of many electric buses in the city of Jilin Province is selected to train, validate, and test the CNN model to achieve the single-trip energy consumption estimation of electric buses.


## 2. CNN-Based Model Development

Even though it reduces the required data types and allows for the use of readily available data as input variables, the data-driven energy consumption estimating approach has insufficient estimation accuracy. Deep learning may effectively tackle the problem of insufficient estimation accuracy of typical data-driven models since it reflects the nonlinear and stochastic properties of data and has significant robustness.First, an electric bus energy consumption estimation model based on CNN is developed, followed by preprocessing and adapting the collected electric bus trip data to the CNN input matrix requirements. Finally, the model is trained, validated, and analysed using test set data, and its time cost and prediction accuracy are compared to those of multiple nonlinear regression models and LSTM time series prediction methods. The research idea of this paper is shown in Figure1.Figure 1
The research idea chart of energy consumption estimation method for electric bus.


### 2.1. The CNN Model’s Basic Structure

The CNN model employed in this study is based on the LeNet-5 model, with changes to the structure and size of each layer. Taking into account the size of the input matrix, the number of data processes, and the model’s correctness, two convolutional layers, one pooling layer and one fully connected layer, are designed. The output value is a single value, the loss function is chosen as MSE (mean squared error), and the step size of the convolution operation is 1. Figure2 depicts the CNN’s structure.Figure 2
CNN’s structure for operational energy consumption estimation.Four 3 × 3 convolutional kernels are used for convolutional layer 1 to guarantee that as many data characteristics as feasible are preserved while lowering the computational cost. The pooling layer employs the maximum pooling approach, with a 2 × 2 pooling area. The fully connected layer employs a full connection to get the output values.


### 2.2. Quasi-Timing Data Extraction and Multichannel Input Matrix Construction

When there is no set time interval yet there is a change in state, quasi-time series analysis is commonly applied. A quasi-time dataset is created based on the statistical temporal distribution of the acquired data and may be utilized for time series forecasting. In this work, the state is a single electric bus trip, and the change is a change in trip data. Hence, the trip data are processed in a quasi-time series by considering a single bus trip as the fundamental unit.For example, the departure time of an electric bus route is a set time as stated in Table1. The bus route has 8 and a half shifts in a day’s operational duty, and each shift has two round trips. Therefore, each bus on the route makes a total of 17 trips every day.Table 1
Electric bus departure schedule.
Vehicle noOriginal stationDeparture schedule1234567891Lei6:307:338:5110:1011:4013:0814:2615:4417:00Jian7:008:089:2610:4512:1513:4315:0116:192Lei6:407:469:0410:2511:5513:2114:3915:5717:10Jian7:108:219:3911:0012:3013:5615:1416:323Lei6:507:599:1710:4012:1013:3414:5216:1017:20Jian7:208:349:5211:1512:4514:0915:2716:454Lei6:307:308:4710:0511:3013:0014:2215:4016:58Jian7:008:129:3010:5512:2513:4715:0516:235Lei6:407:409:0010:1811:4513:1514:3515:5317:10Jian7:108:259:4311:1012:4014:0015:1816:366Lei6:507:549:1310:3112:0013:3014:4816:0617:20Jian7:208:389:5611:2512:5514:1315:3116:46As shown in Table2, the departure times of the vehicles operating on the line are counted and divided into different time intervals, so that each time interval contains the departure time of only 1 vehicle. Therefore, a quasi-time series based on 17 trips per vehicle per day can be constructed, as shown in Figure 3.Table 2
Time intervals for electric buses.
TripTime intervalsTripTime intervalsTripTime intervalsTripTime intervals16:30–6:5569:25–10:001112:58–13:401616:16–16:5027:00–7:25710:05–10:431213:41–14:151716:55–17:3037:30–8:00810:44–11:271314:16–14:55—48:05–8:40911:28–12:131415:00–15:35—58:45–9:201012:14–12:571515:36–16:15—Figure 3
Electric bus quasi-time series data construction schematic diagram.Because each variable’s sequence is not strongly correlated with each other when the input matrix is directly combined, this paper separates each variable for input to form a three-channel RGB input matrix similar to that of an image (as shown in Figure4). Each variable serves as an input channel, with each variable being combined into a three-dimensional matrix that serves as the input matrix. When the convolution operation is performed in the convolution layer, each channel is kept relatively independent. The results of each channel’s convolution operation are then combined, and the output is obtained by adding bias.Figure 4
Computational structure for multichannel input convolutional layers.


### 2.3. Quasi-Time Series Conversion of Trip Data Based on GAF

This paper employs the gram angular fields (GAF) used in the study by Modi [18] et al. to implement ascending dimension, which is to meet the requirements of the input matrix of each channel in the model while preserving the original time series relationship of the variables in each channel. GAF turns each variable’s one-dimensional quasi-time series structure into a two-dimensional channel structure, preserving the original time series relationships while reflecting the relationships between the interactions within the time series data. Gram angular fields can be divided into two forms, gram angular summation fields (GASF) and gram angular difference fields (GADF). The main idea of GAF is to convert one-dimensional time series into a polar coordinate system representation, where the time axis is represented by the radius of the polar coordinates and the angular values are represented by the values of the time series and then use trigonometric values between the different time series taking values to generate the GAF matrix.The GAF’s precise computation procedure is as follows:(1)
Because the angular values of polar coordinates include a range of values, the time series data are first normalized to the interval [−1, 1] or [0, 1]. Equations (1) and (2) show the normalization procedure.(1)x˜−1i=xi−maxX+xi−minXmaxX−minX,(2)orx˜0i=xi−minXmaxX−minX.xi is the i-th observation value of time series set X=x1,x2,…xn, and x˜−1i and x˜0i are the corresponding value normalized to [−1, 1] and [0, 1].(2)
The time series data are reconstructed based on the polar coordinate system. The calculation method is shown in the following equation:(3)ϕ=arccosx˜i,−1≤x˜i≤1,x˜i∈X˜,r=tiN,ti∈N.x˜i is the i-th value of time series set X˜ which after normalized, ti is the corresponding timestamp, N is the constant used to regularize the span of the polar coordinate system, ϕ,r forms the curve function of the polar coordinate system.It should be noted that when using [0, 1] normalization for the time series, the range of values ofϕ is 0,π/2. And the range of values of ϕ is 0,π when using [−1, 1] normalization.(3)
The construction of GAF is inspired by Gram’s matrix, and the angular sum or difference of trigonometric functions can be utilized to evaluate the data correlation between multiple time series points, as shown in the following equations:(4)GASF=cosϕi+ϕj=X˜′·X˜−I−X˜′2·I−X˜2,(5)GADF=sinϕi−ϕj=I−X˜′2·X˜−X˜′·I−X˜2.ϕi and ϕji,j=1,2,3,…,n are the angular values of the two time series points, which can be converted to Cartesian coordinate form by the sum and difference product formula. I is the unit row vector. X˜ and X˜ are two standardized time series matrices.Taking GASF as an example, its matrix representation is shown in the following equation:(6)GASF=cosϕ1+ϕ1cosϕ1+ϕ2⋯cosϕ1+ϕncosϕ2+ϕ1cosϕ2+ϕ2⋯cosϕ2+ϕn⋮⋮⋱⋮cosϕn+ϕ1cosϕn+ϕ2⋯cosϕn+ϕn.


## 2.1. The CNN Model’s Basic Structure

The CNN model employed in this study is based on the LeNet-5 model, with changes to the structure and size of each layer. Taking into account the size of the input matrix, the number of data processes, and the model’s correctness, two convolutional layers, one pooling layer and one fully connected layer, are designed. The output value is a single value, the loss function is chosen as MSE (mean squared error), and the step size of the convolution operation is 1. Figure2 depicts the CNN’s structure.Figure 2
CNN’s structure for operational energy consumption estimation.Four 3 × 3 convolutional kernels are used for convolutional layer 1 to guarantee that as many data characteristics as feasible are preserved while lowering the computational cost. The pooling layer employs the maximum pooling approach, with a 2 × 2 pooling area. The fully connected layer employs a full connection to get the output values.


## 2.2. Quasi-Timing Data Extraction and Multichannel Input Matrix Construction

When there is no set time interval yet there is a change in state, quasi-time series analysis is commonly applied. A quasi-time dataset is created based on the statistical temporal distribution of the acquired data and may be utilized for time series forecasting. In this work, the state is a single electric bus trip, and the change is a change in trip data. Hence, the trip data are processed in a quasi-time series by considering a single bus trip as the fundamental unit.For example, the departure time of an electric bus route is a set time as stated in Table1. The bus route has 8 and a half shifts in a day’s operational duty, and each shift has two round trips. Therefore, each bus on the route makes a total of 17 trips every day.Table 1
Electric bus departure schedule.
Vehicle noOriginal stationDeparture schedule1234567891Lei6:307:338:5110:1011:4013:0814:2615:4417:00Jian7:008:089:2610:4512:1513:4315:0116:192Lei6:407:469:0410:2511:5513:2114:3915:5717:10Jian7:108:219:3911:0012:3013:5615:1416:323Lei6:507:599:1710:4012:1013:3414:5216:1017:20Jian7:208:349:5211:1512:4514:0915:2716:454Lei6:307:308:4710:0511:3013:0014:2215:4016:58Jian7:008:129:3010:5512:2513:4715:0516:235Lei6:407:409:0010:1811:4513:1514:3515:5317:10Jian7:108:259:4311:1012:4014:0015:1816:366Lei6:507:549:1310:3112:0013:3014:4816:0617:20Jian7:208:389:5611:2512:5514:1315:3116:46As shown in Table2, the departure times of the vehicles operating on the line are counted and divided into different time intervals, so that each time interval contains the departure time of only 1 vehicle. Therefore, a quasi-time series based on 17 trips per vehicle per day can be constructed, as shown in Figure 3.Table 2
Time intervals for electric buses.
TripTime intervalsTripTime intervalsTripTime intervalsTripTime intervals16:30–6:5569:25–10:001112:58–13:401616:16–16:5027:00–7:25710:05–10:431213:41–14:151716:55–17:3037:30–8:00810:44–11:271314:16–14:55—48:05–8:40911:28–12:131415:00–15:35—58:45–9:201012:14–12:571515:36–16:15—Figure 3
Electric bus quasi-time series data construction schematic diagram.Because each variable’s sequence is not strongly correlated with each other when the input matrix is directly combined, this paper separates each variable for input to form a three-channel RGB input matrix similar to that of an image (as shown in Figure4). Each variable serves as an input channel, with each variable being combined into a three-dimensional matrix that serves as the input matrix. When the convolution operation is performed in the convolution layer, each channel is kept relatively independent. The results of each channel’s convolution operation are then combined, and the output is obtained by adding bias.Figure 4
Computational structure for multichannel input convolutional layers.


## 2.3. Quasi-Time Series Conversion of Trip Data Based on GAF

This paper employs the gram angular fields (GAF) used in the study by Modi [18] et al. to implement ascending dimension, which is to meet the requirements of the input matrix of each channel in the model while preserving the original time series relationship of the variables in each channel. GAF turns each variable’s one-dimensional quasi-time series structure into a two-dimensional channel structure, preserving the original time series relationships while reflecting the relationships between the interactions within the time series data. Gram angular fields can be divided into two forms, gram angular summation fields (GASF) and gram angular difference fields (GADF). The main idea of GAF is to convert one-dimensional time series into a polar coordinate system representation, where the time axis is represented by the radius of the polar coordinates and the angular values are represented by the values of the time series and then use trigonometric values between the different time series taking values to generate the GAF matrix.The GAF’s precise computation procedure is as follows:(1)
Because the angular values of polar coordinates include a range of values, the time series data are first normalized to the interval [−1, 1] or [0, 1]. Equations (1) and (2) show the normalization procedure.(1)x˜−1i=xi−maxX+xi−minXmaxX−minX,(2)orx˜0i=xi−minXmaxX−minX.xi is the i-th observation value of time series set X=x1,x2,…xn, and x˜−1i and x˜0i are the corresponding value normalized to [−1, 1] and [0, 1].(2)
The time series data are reconstructed based on the polar coordinate system. The calculation method is shown in the following equation:(3)ϕ=arccosx˜i,−1≤x˜i≤1,x˜i∈X˜,r=tiN,ti∈N.x˜i is the i-th value of time series set X˜ which after normalized, ti is the corresponding timestamp, N is the constant used to regularize the span of the polar coordinate system, ϕ,r forms the curve function of the polar coordinate system.It should be noted that when using [0, 1] normalization for the time series, the range of values ofϕ is 0,π/2. And the range of values of ϕ is 0,π when using [−1, 1] normalization.(3)
The construction of GAF is inspired by Gram’s matrix, and the angular sum or difference of trigonometric functions can be utilized to evaluate the data correlation between multiple time series points, as shown in the following equations:(4)GASF=cosϕi+ϕj=X˜′·X˜−I−X˜′2·I−X˜2,(5)GADF=sinϕi−ϕj=I−X˜′2·X˜−X˜′·I−X˜2.ϕi and ϕji,j=1,2,3,…,n are the angular values of the two time series points, which can be converted to Cartesian coordinate form by the sum and difference product formula. I is the unit row vector. X˜ and X˜ are two standardized time series matrices.Taking GASF as an example, its matrix representation is shown in the following equation:(6)GASF=cosϕ1+ϕ1cosϕ1+ϕ2⋯cosϕ1+ϕncosϕ2+ϕ1cosϕ2+ϕ2⋯cosϕ2+ϕn⋮⋮⋱⋮cosϕn+ϕ1cosϕn+ϕ2⋯cosϕn+ϕn.


## 3. Energy Consumption Estimation Model Training

### 3.1. Base Data Collection for Model Training

In this paper, a data-driven model is used to estimate the energy consumption of electric buses. The data collection site was chosen in Jilin Province, and real-time operation data of relevant vehicles were acquired using an online onboard networking platform while taking data collection expenses into account.The data collected includes the following: (1) the number of people getting on and off the bus at each stop along a predetermined route journey, as well as arrival and departure times based on data from in-bus surveillance cameras, (2) real-time vehicle position, state of charge, energy consumption, total mileage, and air conditioning switch data for specified routes based on an electric bus vehicle networking platform, (3) hourly temperature changes are observed and recorded hour by hour based on national surface weather stations. Some of the telematics platform’s raw recorded data are shown in Table3.Table 3
Some of the raw data recorded on the telematics platform.
Time momentSOC (%)Accumulated mileage (km)Energy consumption (kWh)Air conditioning on or offOriginal or terminal station6:5496.460993.05.6290Original station6:5896.060994.06.25407:0295.660995.26.88007:0595.260996.27.50507:0894.860997.38.13107:1194.460998.68.75607:1794.061000.69.38107:1894.061000.89.3810Terminal station


### 3.2. Preprocessing of Base Data for Model Training

Because this study only addresses the change in energy consumption during the operation of electric buses, and the gathered real-time data of electric buses may not be in the operation period, further data filtering is required to derive relevant data during the operating period. There is also a need for further data processing because the raw data obtained via video surveillance and telematics platforms differs from the needed trip data in terms of data kinds.


#### 3.2.1. Revenue Passenger Kilometre

Beause video surveillance data recording data is instant value, the data such as the number of people in the car, vehicle position, and driving speed must be converted to data values during a single trip. By integrating the curve of the number of passengers across the mileage throughout one trip, it is possible to reflect the change in the number of passengers from the whole trip, which has an impact on the trip energy consumption. The revenue passenger kilometre integral for a single trip is calculated as shown in the following equation:(7)PK=∫ODPsds.


#### 3.2.2. Raw Data to Single-Trip Data Conversion

In the original data record of the automobile network platform, the collected time value is the moment value of the SOC and other display values dropped. And in the trip data, the value of each indicator in the time period of a single trip is taken as a record. As shown in Table4, converting between the two types of data requires first determining the start and end points of the journey in order to calculate data like travel time and average speed.Table 4
Partial data after converting.
DateLicense plate numberDirectionDeparture timeEnding timeEnergy consumption (kWh)Initial SOC (%)Trip time (min)Average speed (km/h)2020/1/60151A6:306:574.437962717.8112020/1/63112B6:306:594.755972916.9822020/1/63123A6:407:063.640962619.1232020/1/66929B6:407:094.505992916.8962020/1/63157B6:507:154.595962519.113


#### 3.2.3. Estimated Average Temperature for a Single Trip

The hourly air temperature value is used as the initial moment air temperature value for that hour in the trip average air temperature calculation, and a time-averaged linear estimation is performed and rounded to the nearest whole number, as shown in Table5.Table 5
Estimation of average trip temperature using hourly temperature values.
Temperature statistics momentHourly temperature (°C)Start and end timesAverage temperature of trip (°C)6:00146:54177:00167:188:0019—Figure5 depicts the problem of estimating the trip’s average temperature, which necessitates first estimating the temperature values at the start and end of the journey. A weighted average estimate of the temperature over the different time periods is required if the starting and ending moments are not in the same whole time period. Equation (8) shows the specific calculation formula.(8)TOD¯=TO+ΔT=TB−TA×tO−tAtB−tA+TA+tB−tOtD−tO×TB−TA×tB−tOtB−tA+tD−tBtD−tO×TC−TB×tD−tBtC−tB.Figure 5
Illustration of the problem of estimating the average temperature for a single trip.TOD¯ indicates the average temperature of a single trip to be estimated. tA, tB, tC indicate time moments for hourly temperature observation. tO, tD are the start moment and end moment of the trip, respectively. TO is a median value to be estimated—temperature value at the start moment of the trip. ΔT is a median value—value for average temperature change during a trip; TA, TB, TC are the hourly actual temperature values.


### 3.3. Preprocessing of Data Set for Model Training

Trip data are converted to an electric bus trip data set after processing is completed. Then, the data are then split into layers within each month based on the distribution of the dataset throughout the dates. Finally, 1291 data points were separated in chronological order as the training set, 277 data points as the validation set, and 278 data points as the test set. The training set and validation set are used to train models, while the test set is used to compare the method presented in this paper to other methods.


#### 3.3.1. PCA Downscaling and Normalization of Trip Data

(1) PCA Downscaling. PCA (principal component analysis) is used to reduce the dimensionality of the input variables in order to obtain more concise and orthogonalized input variables, minimize the number of variables to reduce the number of operations, and enhance the running performance.PCA is a multiindicator statistical analysis method that uses dimensionality reduction to reduce the number of variables to a minimum. It allows for variable compression, i.e., replacing the original more indicators with indicators of fewer dimensions using PCA while keeping the original indicators’ information so that the new indicators (principal components) are not connected with each other.The scikit-learn package for Python can be used to realize the computation of PCA. The training matrix is created by filtering five factors from the training set data: beginning SOC, journey time, average speed, average temperature, and air conditioning on time. The initial five variables are reduced to four distinctive variables using PCA. Table6 shows the percentage variance of each of the four components that were kept, i.e., the variance contribution of individual variables.Table 6
Individual variable contribution to variance.
ComponentComponent 1Component 2Component 3Component 4Variance ratio0.570220.225620.147550.05033Feature value267.07475105.6715369.1099123.57421Based on the variance percentage results, the cumulative variance contribution of the four principle components was calculated to be 99.37 percent, which may cover the majority of the data information. As a result, the five variables can be transformed into four new principal component variables using eigenvectors, as illustrated in Table7.Table 7
The feature vector matrix of PCA.
Feature vectorInitial SOC (%)Trip time (min)Average speed (km/h)Average temperature (°C)Air conditioning on time (min)Component 1−0.87821−0.017170.016960.070940.47238Component 2−0.368050.06081−0.04010−0.73025−0.57093Component 30.296300.22515−0.13290−0.639140.65981Component 40.07415−0.797930.53789−0.230400.12414According to the values of the component coefficients of the feature vector matrix, it can be found that component 1 mainly contains the information of starting SOC (the absolute value of the component coefficient is greater than 0.8), component 2 mainly contains the information of average temperature (the absolute value of the component coefficient is greater than 0.7), component 3 mainly contains the information of average temperature and air conditioning on time (the absolute value of the component coefficient is greater than 0.6), and component 4 mainly contains the information of travel time and average speed (the absolute value of the component coefficient is greater than 0.5).The four principal component variables extracted from the above training set using PCA are used as input variables in energy consumption estimation using CNN. (9) depicts the relationship between them and the five initial variables.(9)p1=−0.878×SOCorigin−0.017×t+0.017×v+0.071×T+0.472×tAC,p2=−0.368×SOCorigin+0.061×t−0.040×v−0.730×T−0.571×tAC,p3=0.296×SOCorigin+0.225×t−0.133×v−0.639×T+0.660×tAC,p4=0.074×SOCorigin−0.798×t+0.538×v−0.230×T+0.124×tAC.p1, p2, p3, p4 are the values of the 4 principal components corresponding to each data, respectively. SOCorigin indicates the percentage value of the start SOC. t indicates the trip time, min. v indicates the average speed, km/h. T indicates the average temperature of trip, °C. tAC indicates the air conditioning on time during the trip, min.(2) Normalization. Before performing the CNN operation, the input data must be normalized to unify the magnitudes of the input variables and preserve the range of fluctuation of each variable within the interval of [−1, 1] (as required by GAF). Equation (10) shows the specific calculation formula.(10)p′=p−pmax+p−pminpmax−pmin.p′ indicates the value after the normalization process, p is the original value, pmax and pmin indicate the maximum and minimum values of the set where variable p is located.


#### 3.3.2. Input Sequence Construction and GAF Transformation

The symmetric quasi-time series generation approach, based on the input matrix and output structure of the convolutional neural network, is designed to match the electrical consumption values of more trip data and extract the data correlation between each surrounding trip. In Figure6, the relevant component values of the sequence corresponding to the output energy consumption variables are placed in the proposed timing median, and the quasi-time data before and after them are ordered according to the time period during which the trip is made. Missing trip value variables are replaced by the overall average of the time series.Figure 6
Construction of a symmetrical quasi-time series.The results of the constructed symmetric quasi-time series data are shown in Table8. The data for each variable under the associated trip are in one row with the energy consumption, and the other rows are the created symmetric suggested time series data. As a result, each energy consumption data corresponds to the four component factors of its own trip, as well as information on the component variables of nearby journeys, allowing for a more accurate representation of the influence of surrounding trip data.Table 8
A partial result of symmetrical quasi-time series construction.
DateLicense plate numberTripEnergy consumption (kWh)Component 1Component 2Component 3Component 49−0.354220.6190250.076912−0.023558−0.404960.6077180.142685−0.271987−0.499280.5920060.1723180.0132516−0.548540.5927410.2131480.0146185−0.620290.5576640.256781−0.060344−0.691520.5384940.2870840.050853−0.790330.5050360.385904−0.267592−0.85850.4723410.3744730.0651261.6015114.437−0.928070.4280280.3899120.1417622−0.85850.4723410.3744730.0651263−0.790330.5050360.385904−0.267594−0.691520.5384940.2870840.050855−0.620290.5576640.256781−0.060346−0.548540.5927410.2131480.0146187−0.499280.5920060.1723180.0132518−0.404960.6077180.142685−0.271989−0.354220.6190250.076912−0.02355The GASF method is employed to convert the one-dimensional proposed time-series data into a two-dimensional matrix. Figure7 depicts the four-component channel diagram (from left to right, components 1 to 4) for generating GAF using the first trip of a road electric bus as an example.Figure 7
GAF’s diagram of the component variables for the first trip of the electric bus.Figure7 shows that the pictures of the first three principal components have a centralized distribution, with the exception of component 4, which has a more uniform distribution of values at each point, implying that the component variables have a greater influence. The corresponding time period trip of each vehicle on each survey day is used as an input matrix, and the matrix of each input component variable of the same vehicle on the same day is set as a channel matrix, which is merged into a three-dimensional input matrix.This experimental environment’s software platform is Python 3.8.6, and the running environment is an Intel (R) CoreTM i5-4200M CPU @ 2.50 GHz. The input matrix (GAF quasi-time matrix), the designed CNN model, and the optimizer (RMSProp, which is chosen to achieve a faster and more globalized gradient descent) are input into the experimental environment, and the data of different bus routes in the training set are trained separately to obtain the CNN model for energy consumption estimation applicable to different bus routes.


## 3.1. Base Data Collection for Model Training

In this paper, a data-driven model is used to estimate the energy consumption of electric buses. The data collection site was chosen in Jilin Province, and real-time operation data of relevant vehicles were acquired using an online onboard networking platform while taking data collection expenses into account.The data collected includes the following: (1) the number of people getting on and off the bus at each stop along a predetermined route journey, as well as arrival and departure times based on data from in-bus surveillance cameras, (2) real-time vehicle position, state of charge, energy consumption, total mileage, and air conditioning switch data for specified routes based on an electric bus vehicle networking platform, (3) hourly temperature changes are observed and recorded hour by hour based on national surface weather stations. Some of the telematics platform’s raw recorded data are shown in Table3.Table 3
Some of the raw data recorded on the telematics platform.
Time momentSOC (%)Accumulated mileage (km)Energy consumption (kWh)Air conditioning on or offOriginal or terminal station6:5496.460993.05.6290Original station6:5896.060994.06.25407:0295.660995.26.88007:0595.260996.27.50507:0894.860997.38.13107:1194.460998.68.75607:1794.061000.69.38107:1894.061000.89.3810Terminal station


## 3.2. Preprocessing of Base Data for Model Training

Because this study only addresses the change in energy consumption during the operation of electric buses, and the gathered real-time data of electric buses may not be in the operation period, further data filtering is required to derive relevant data during the operating period. There is also a need for further data processing because the raw data obtained via video surveillance and telematics platforms differs from the needed trip data in terms of data kinds.


### 3.2.1. Revenue Passenger Kilometre

Beause video surveillance data recording data is instant value, the data such as the number of people in the car, vehicle position, and driving speed must be converted to data values during a single trip. By integrating the curve of the number of passengers across the mileage throughout one trip, it is possible to reflect the change in the number of passengers from the whole trip, which has an impact on the trip energy consumption. The revenue passenger kilometre integral for a single trip is calculated as shown in the following equation:(7)PK=∫ODPsds.


### 3.2.2. Raw Data to Single-Trip Data Conversion

In the original data record of the automobile network platform, the collected time value is the moment value of the SOC and other display values dropped. And in the trip data, the value of each indicator in the time period of a single trip is taken as a record. As shown in Table4, converting between the two types of data requires first determining the start and end points of the journey in order to calculate data like travel time and average speed.Table 4
Partial data after converting.
DateLicense plate numberDirectionDeparture timeEnding timeEnergy consumption (kWh)Initial SOC (%)Trip time (min)Average speed (km/h)2020/1/60151A6:306:574.437962717.8112020/1/63112B6:306:594.755972916.9822020/1/63123A6:407:063.640962619.1232020/1/66929B6:407:094.505992916.8962020/1/63157B6:507:154.595962519.113


### 3.2.3. Estimated Average Temperature for a Single Trip

The hourly air temperature value is used as the initial moment air temperature value for that hour in the trip average air temperature calculation, and a time-averaged linear estimation is performed and rounded to the nearest whole number, as shown in Table5.Table 5
Estimation of average trip temperature using hourly temperature values.
Temperature statistics momentHourly temperature (°C)Start and end timesAverage temperature of trip (°C)6:00146:54177:00167:188:0019—Figure5 depicts the problem of estimating the trip’s average temperature, which necessitates first estimating the temperature values at the start and end of the journey. A weighted average estimate of the temperature over the different time periods is required if the starting and ending moments are not in the same whole time period. Equation (8) shows the specific calculation formula.(8)TOD¯=TO+ΔT=TB−TA×tO−tAtB−tA+TA+tB−tOtD−tO×TB−TA×tB−tOtB−tA+tD−tBtD−tO×TC−TB×tD−tBtC−tB.Figure 5
Illustration of the problem of estimating the average temperature for a single trip.TOD¯ indicates the average temperature of a single trip to be estimated. tA, tB, tC indicate time moments for hourly temperature observation. tO, tD are the start moment and end moment of the trip, respectively. TO is a median value to be estimated—temperature value at the start moment of the trip. ΔT is a median value—value for average temperature change during a trip; TA, TB, TC are the hourly actual temperature values.


## 3.2.1. Revenue Passenger Kilometre

Beause video surveillance data recording data is instant value, the data such as the number of people in the car, vehicle position, and driving speed must be converted to data values during a single trip. By integrating the curve of the number of passengers across the mileage throughout one trip, it is possible to reflect the change in the number of passengers from the whole trip, which has an impact on the trip energy consumption. The revenue passenger kilometre integral for a single trip is calculated as shown in the following equation:(7)PK=∫ODPsds.


## 3.2.2. Raw Data to Single-Trip Data Conversion

In the original data record of the automobile network platform, the collected time value is the moment value of the SOC and other display values dropped. And in the trip data, the value of each indicator in the time period of a single trip is taken as a record. As shown in Table4, converting between the two types of data requires first determining the start and end points of the journey in order to calculate data like travel time and average speed.Table 4
Partial data after converting.
DateLicense plate numberDirectionDeparture timeEnding timeEnergy consumption (kWh)Initial SOC (%)Trip time (min)Average speed (km/h)2020/1/60151A6:306:574.437962717.8112020/1/63112B6:306:594.755972916.9822020/1/63123A6:407:063.640962619.1232020/1/66929B6:407:094.505992916.8962020/1/63157B6:507:154.595962519.113


## 3.2.3. Estimated Average Temperature for a Single Trip

The hourly air temperature value is used as the initial moment air temperature value for that hour in the trip average air temperature calculation, and a time-averaged linear estimation is performed and rounded to the nearest whole number, as shown in Table5.Table 5
Estimation of average trip temperature using hourly temperature values.
Temperature statistics momentHourly temperature (°C)Start and end timesAverage temperature of trip (°C)6:00146:54177:00167:188:0019—Figure5 depicts the problem of estimating the trip’s average temperature, which necessitates first estimating the temperature values at the start and end of the journey. A weighted average estimate of the temperature over the different time periods is required if the starting and ending moments are not in the same whole time period. Equation (8) shows the specific calculation formula.(8)TOD¯=TO+ΔT=TB−TA×tO−tAtB−tA+TA+tB−tOtD−tO×TB−TA×tB−tOtB−tA+tD−tBtD−tO×TC−TB×tD−tBtC−tB.Figure 5
Illustration of the problem of estimating the average temperature for a single trip.TOD¯ indicates the average temperature of a single trip to be estimated. tA, tB, tC indicate time moments for hourly temperature observation. tO, tD are the start moment and end moment of the trip, respectively. TO is a median value to be estimated—temperature value at the start moment of the trip. ΔT is a median value—value for average temperature change during a trip; TA, TB, TC are the hourly actual temperature values.


## 3.3. Preprocessing of Data Set for Model Training

Trip data are converted to an electric bus trip data set after processing is completed. Then, the data are then split into layers within each month based on the distribution of the dataset throughout the dates. Finally, 1291 data points were separated in chronological order as the training set, 277 data points as the validation set, and 278 data points as the test set. The training set and validation set are used to train models, while the test set is used to compare the method presented in this paper to other methods.


### 3.3.1. PCA Downscaling and Normalization of Trip Data

(1) PCA Downscaling. PCA (principal component analysis) is used to reduce the dimensionality of the input variables in order to obtain more concise and orthogonalized input variables, minimize the number of variables to reduce the number of operations, and enhance the running performance.PCA is a multiindicator statistical analysis method that uses dimensionality reduction to reduce the number of variables to a minimum. It allows for variable compression, i.e., replacing the original more indicators with indicators of fewer dimensions using PCA while keeping the original indicators’ information so that the new indicators (principal components) are not connected with each other.The scikit-learn package for Python can be used to realize the computation of PCA. The training matrix is created by filtering five factors from the training set data: beginning SOC, journey time, average speed, average temperature, and air conditioning on time. The initial five variables are reduced to four distinctive variables using PCA. Table6 shows the percentage variance of each of the four components that were kept, i.e., the variance contribution of individual variables.Table 6
Individual variable contribution to variance.
ComponentComponent 1Component 2Component 3Component 4Variance ratio0.570220.225620.147550.05033Feature value267.07475105.6715369.1099123.57421Based on the variance percentage results, the cumulative variance contribution of the four principle components was calculated to be 99.37 percent, which may cover the majority of the data information. As a result, the five variables can be transformed into four new principal component variables using eigenvectors, as illustrated in Table7.Table 7
The feature vector matrix of PCA.
Feature vectorInitial SOC (%)Trip time (min)Average speed (km/h)Average temperature (°C)Air conditioning on time (min)Component 1−0.87821−0.017170.016960.070940.47238Component 2−0.368050.06081−0.04010−0.73025−0.57093Component 30.296300.22515−0.13290−0.639140.65981Component 40.07415−0.797930.53789−0.230400.12414According to the values of the component coefficients of the feature vector matrix, it can be found that component 1 mainly contains the information of starting SOC (the absolute value of the component coefficient is greater than 0.8), component 2 mainly contains the information of average temperature (the absolute value of the component coefficient is greater than 0.7), component 3 mainly contains the information of average temperature and air conditioning on time (the absolute value of the component coefficient is greater than 0.6), and component 4 mainly contains the information of travel time and average speed (the absolute value of the component coefficient is greater than 0.5).The four principal component variables extracted from the above training set using PCA are used as input variables in energy consumption estimation using CNN. (9) depicts the relationship between them and the five initial variables.(9)p1=−0.878×SOCorigin−0.017×t+0.017×v+0.071×T+0.472×tAC,p2=−0.368×SOCorigin+0.061×t−0.040×v−0.730×T−0.571×tAC,p3=0.296×SOCorigin+0.225×t−0.133×v−0.639×T+0.660×tAC,p4=0.074×SOCorigin−0.798×t+0.538×v−0.230×T+0.124×tAC.p1, p2, p3, p4 are the values of the 4 principal components corresponding to each data, respectively. SOCorigin indicates the percentage value of the start SOC. t indicates the trip time, min. v indicates the average speed, km/h. T indicates the average temperature of trip, °C. tAC indicates the air conditioning on time during the trip, min.(2) Normalization. Before performing the CNN operation, the input data must be normalized to unify the magnitudes of the input variables and preserve the range of fluctuation of each variable within the interval of [−1, 1] (as required by GAF). Equation (10) shows the specific calculation formula.(10)p′=p−pmax+p−pminpmax−pmin.p′ indicates the value after the normalization process, p is the original value, pmax and pmin indicate the maximum and minimum values of the set where variable p is located.


### 3.3.2. Input Sequence Construction and GAF Transformation

The symmetric quasi-time series generation approach, based on the input matrix and output structure of the convolutional neural network, is designed to match the electrical consumption values of more trip data and extract the data correlation between each surrounding trip. In Figure6, the relevant component values of the sequence corresponding to the output energy consumption variables are placed in the proposed timing median, and the quasi-time data before and after them are ordered according to the time period during which the trip is made. Missing trip value variables are replaced by the overall average of the time series.Figure 6
Construction of a symmetrical quasi-time series.The results of the constructed symmetric quasi-time series data are shown in Table8. The data for each variable under the associated trip are in one row with the energy consumption, and the other rows are the created symmetric suggested time series data. As a result, each energy consumption data corresponds to the four component factors of its own trip, as well as information on the component variables of nearby journeys, allowing for a more accurate representation of the influence of surrounding trip data.Table 8
A partial result of symmetrical quasi-time series construction.
DateLicense plate numberTripEnergy consumption (kWh)Component 1Component 2Component 3Component 49−0.354220.6190250.076912−0.023558−0.404960.6077180.142685−0.271987−0.499280.5920060.1723180.0132516−0.548540.5927410.2131480.0146185−0.620290.5576640.256781−0.060344−0.691520.5384940.2870840.050853−0.790330.5050360.385904−0.267592−0.85850.4723410.3744730.0651261.6015114.437−0.928070.4280280.3899120.1417622−0.85850.4723410.3744730.0651263−0.790330.5050360.385904−0.267594−0.691520.5384940.2870840.050855−0.620290.5576640.256781−0.060346−0.548540.5927410.2131480.0146187−0.499280.5920060.1723180.0132518−0.404960.6077180.142685−0.271989−0.354220.6190250.076912−0.02355The GASF method is employed to convert the one-dimensional proposed time-series data into a two-dimensional matrix. Figure7 depicts the four-component channel diagram (from left to right, components 1 to 4) for generating GAF using the first trip of a road electric bus as an example.Figure 7
GAF’s diagram of the component variables for the first trip of the electric bus.Figure7 shows that the pictures of the first three principal components have a centralized distribution, with the exception of component 4, which has a more uniform distribution of values at each point, implying that the component variables have a greater influence. The corresponding time period trip of each vehicle on each survey day is used as an input matrix, and the matrix of each input component variable of the same vehicle on the same day is set as a channel matrix, which is merged into a three-dimensional input matrix.This experimental environment’s software platform is Python 3.8.6, and the running environment is an Intel (R) CoreTM i5-4200M CPU @ 2.50 GHz. The input matrix (GAF quasi-time matrix), the designed CNN model, and the optimizer (RMSProp, which is chosen to achieve a faster and more globalized gradient descent) are input into the experimental environment, and the data of different bus routes in the training set are trained separately to obtain the CNN model for energy consumption estimation applicable to different bus routes.


## 3.3.1. PCA Downscaling and Normalization of Trip Data

(1) PCA Downscaling. PCA (principal component analysis) is used to reduce the dimensionality of the input variables in order to obtain more concise and orthogonalized input variables, minimize the number of variables to reduce the number of operations, and enhance the running performance.PCA is a multiindicator statistical analysis method that uses dimensionality reduction to reduce the number of variables to a minimum. It allows for variable compression, i.e., replacing the original more indicators with indicators of fewer dimensions using PCA while keeping the original indicators’ information so that the new indicators (principal components) are not connected with each other.The scikit-learn package for Python can be used to realize the computation of PCA. The training matrix is created by filtering five factors from the training set data: beginning SOC, journey time, average speed, average temperature, and air conditioning on time. The initial five variables are reduced to four distinctive variables using PCA. Table6 shows the percentage variance of each of the four components that were kept, i.e., the variance contribution of individual variables.Table 6
Individual variable contribution to variance.
ComponentComponent 1Component 2Component 3Component 4Variance ratio0.570220.225620.147550.05033Feature value267.07475105.6715369.1099123.57421Based on the variance percentage results, the cumulative variance contribution of the four principle components was calculated to be 99.37 percent, which may cover the majority of the data information. As a result, the five variables can be transformed into four new principal component variables using eigenvectors, as illustrated in Table7.Table 7
The feature vector matrix of PCA.
Feature vectorInitial SOC (%)Trip time (min)Average speed (km/h)Average temperature (°C)Air conditioning on time (min)Component 1−0.87821−0.017170.016960.070940.47238Component 2−0.368050.06081−0.04010−0.73025−0.57093Component 30.296300.22515−0.13290−0.639140.65981Component 40.07415−0.797930.53789−0.230400.12414According to the values of the component coefficients of the feature vector matrix, it can be found that component 1 mainly contains the information of starting SOC (the absolute value of the component coefficient is greater than 0.8), component 2 mainly contains the information of average temperature (the absolute value of the component coefficient is greater than 0.7), component 3 mainly contains the information of average temperature and air conditioning on time (the absolute value of the component coefficient is greater than 0.6), and component 4 mainly contains the information of travel time and average speed (the absolute value of the component coefficient is greater than 0.5).The four principal component variables extracted from the above training set using PCA are used as input variables in energy consumption estimation using CNN. (9) depicts the relationship between them and the five initial variables.(9)p1=−0.878×SOCorigin−0.017×t+0.017×v+0.071×T+0.472×tAC,p2=−0.368×SOCorigin+0.061×t−0.040×v−0.730×T−0.571×tAC,p3=0.296×SOCorigin+0.225×t−0.133×v−0.639×T+0.660×tAC,p4=0.074×SOCorigin−0.798×t+0.538×v−0.230×T+0.124×tAC.p1, p2, p3, p4 are the values of the 4 principal components corresponding to each data, respectively. SOCorigin indicates the percentage value of the start SOC. t indicates the trip time, min. v indicates the average speed, km/h. T indicates the average temperature of trip, °C. tAC indicates the air conditioning on time during the trip, min.(2) Normalization. Before performing the CNN operation, the input data must be normalized to unify the magnitudes of the input variables and preserve the range of fluctuation of each variable within the interval of [−1, 1] (as required by GAF). Equation (10) shows the specific calculation formula.(10)p′=p−pmax+p−pminpmax−pmin.p′ indicates the value after the normalization process, p is the original value, pmax and pmin indicate the maximum and minimum values of the set where variable p is located.


## 3.3.2. Input Sequence Construction and GAF Transformation

The symmetric quasi-time series generation approach, based on the input matrix and output structure of the convolutional neural network, is designed to match the electrical consumption values of more trip data and extract the data correlation between each surrounding trip. In Figure6, the relevant component values of the sequence corresponding to the output energy consumption variables are placed in the proposed timing median, and the quasi-time data before and after them are ordered according to the time period during which the trip is made. Missing trip value variables are replaced by the overall average of the time series.Figure 6
Construction of a symmetrical quasi-time series.The results of the constructed symmetric quasi-time series data are shown in Table8. The data for each variable under the associated trip are in one row with the energy consumption, and the other rows are the created symmetric suggested time series data. As a result, each energy consumption data corresponds to the four component factors of its own trip, as well as information on the component variables of nearby journeys, allowing for a more accurate representation of the influence of surrounding trip data.Table 8
A partial result of symmetrical quasi-time series construction.
DateLicense plate numberTripEnergy consumption (kWh)Component 1Component 2Component 3Component 49−0.354220.6190250.076912−0.023558−0.404960.6077180.142685−0.271987−0.499280.5920060.1723180.0132516−0.548540.5927410.2131480.0146185−0.620290.5576640.256781−0.060344−0.691520.5384940.2870840.050853−0.790330.5050360.385904−0.267592−0.85850.4723410.3744730.0651261.6015114.437−0.928070.4280280.3899120.1417622−0.85850.4723410.3744730.0651263−0.790330.5050360.385904−0.267594−0.691520.5384940.2870840.050855−0.620290.5576640.256781−0.060346−0.548540.5927410.2131480.0146187−0.499280.5920060.1723180.0132518−0.404960.6077180.142685−0.271989−0.354220.6190250.076912−0.02355The GASF method is employed to convert the one-dimensional proposed time-series data into a two-dimensional matrix. Figure7 depicts the four-component channel diagram (from left to right, components 1 to 4) for generating GAF using the first trip of a road electric bus as an example.Figure 7
GAF’s diagram of the component variables for the first trip of the electric bus.Figure7 shows that the pictures of the first three principal components have a centralized distribution, with the exception of component 4, which has a more uniform distribution of values at each point, implying that the component variables have a greater influence. The corresponding time period trip of each vehicle on each survey day is used as an input matrix, and the matrix of each input component variable of the same vehicle on the same day is set as a channel matrix, which is merged into a three-dimensional input matrix.This experimental environment’s software platform is Python 3.8.6, and the running environment is an Intel (R) CoreTM i5-4200M CPU @ 2.50 GHz. The input matrix (GAF quasi-time matrix), the designed CNN model, and the optimizer (RMSProp, which is chosen to achieve a faster and more globalized gradient descent) are input into the experimental environment, and the data of different bus routes in the training set are trained separately to obtain the CNN model for energy consumption estimation applicable to different bus routes.


## 4. Validation Analysis of Model

The test set data consist of 278 trip data separated in chronological order from the electric bus trip data set. Substitute the test set into the CNN model for energy consumption estimation after the model training is completed. The multiple nonlinear regression prediction method and the LSTM time series prediction method are also used to predict the test set data, and the test results are compared with the prediction results of the CNN time series prediction method in this paper.The LSTM model structure for the LSTM time series prediction method includes two LSTM layers (each layer has 100 neurons), one fully connected layer, the ReLU function for activation, the MSE function for loss, and the RMSprop method for optimization. (11) displays the model relations obtained by the multiple nonlinear regression prediction approaches.(11)W=−0.116×ln1−SOCorigin100+0.149×t−0.009×v2+0.574×v−0.001×tAC2+0.075×tAC−7.585.In this paper, the program running time of the CNN time series prediction method is approximately 24% lower than that of the LSTM time series prediction method when using electric bus data for model training and testing.In order to observe more intuitively the prediction accuracy of each prediction method in energy consumption estimation, two electric buses with license plate numbers 3123 and 3338 from different bus routes in the test set were selected, and their energy consumption estimation results for all single trips in a day were compared and analysed. Figures8 and 9 represent the predicted energy consumption results for a single trip of bus 3123 (bus line 1) and bus 3338 (bus line 2) compared to the true values, respectively. The column in the figure represents the real value of single-trip energy consumption, and the three dotted line plots in black, red, and blue represent the predicted values of single-trip energy consumption for the multivariate nonlinear regression prediction method, the LSTM time series prediction method, and the CNN time series prediction method, respectively.Figure 8
Estimated energy consumption for a single trip of an electric bus with plate number 3123 (bus route 1).Figure 9
Estimated energy consumption for a single trip of an electric bus with plate number 3338 (bus route 2).According to the calculation results, the trained CNN model can achieve a prediction accuracy of 88.30% for bus route 1, which is 2.39% better than the prediction accuracy of 85.91% for the multivariate nonlinear regression prediction method and 1.21% better than the prediction accuracy of 87.09% for the LSTM time series prediction method.According to the calculation results, the trained CNN model can achieve a prediction accuracy of 94.31% for bus route 2, which is 4.98% better than the prediction accuracy of 89.33% for the multivariate nonlinear regression prediction method and 1.43% better than the prediction accuracy of 92.88% for the LSTM time series prediction method.As a result, the prediction accuracy of the trained CNN model improved by 3.69% compared to the multiple nonlinear regression method and by 1.32% compared to the LSTM time series prediction method.


## 5. Conclusion

This paper proposes a method of time-series prediction for trip data using CNN, which combines deep learning methods with data-driven models, to achieve single-trip energy consumption estimation for electric buses. The prediction accuracy of this method is higher than that of the LSTM time series prediction method and the multiple nonlinear regression prediction method, while the method reduces the requirement for the type of data used by using data for easy access to trip data, which can provide a new theoretical basis for rational scheduling and dispatching of electric buses. However, the quasi-time-series data selected in this paper in units of trips and the large data granularity level cannot constitute the real-time series data, which still has some influence on the accuracy of the electric bus energy consumption estimation. In a further step, data with lower data granularity will be selected for study to further improve the accuracy of the energy consumption estimation model.



---

*Source: 6904387-2022-10-27.xml*