Next Article in Journal
The Multifunctional Nuclear Magnetic Flowmeter for Control to the Consumption and Condition of Coolant in Nuclear Reactors
Next Article in Special Issue
An Hour-Ahead PV Power Forecasting Method Based on an RNN-LSTM Model for Three Different PV Plants
Previous Article in Journal
A Novel Smart Charging Method to Mitigate Voltage Fluctuation at Fast Charging Stations
Previous Article in Special Issue
Forecasting Solar Home System Customers’ Electricity Usage with a 3D Convolutional Neural Network to Improve Energy Access
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Prediction of Electric Buses Energy Consumption from Trip Parameters Using Deep Learning

1
Faculty of Transport and Aviation Engineering, Silesian University of Technology, 40-019 Katowice, Poland
2
Rockwell Automation, 40-382 Katowice, Poland
*
Author to whom correspondence should be addressed.
Energies 2022, 15(5), 1747; https://doi.org/10.3390/en15051747
Submission received: 2 February 2022 / Revised: 19 February 2022 / Accepted: 24 February 2022 / Published: 26 February 2022
(This article belongs to the Special Issue Energy Consumption Forecasting Using Machine Learning)

Abstract

:
The energy demand of electric buses (EBs) is a very important parameter that should be considered by transport companies when introducing electric buses into the urban bus fleet. This article proposes a novel deep-learning-based model for predicting energy consumption of an electric bus traveling in an urban area. The model addresses two important issues: accuracy and cost of prediction. The aim of the research was to develop the deep-learning-based prediction model, which requires only the data readily available to bus fleet operators, such as location of the bus stops (coordinates, altitude), route traveled, schedule, travel time between stops, and to find the most suitable type and configuration of neural network to evaluate the model. The developed prediction model was assessed with different types of deep neural networks using real data collected for several bus lines in a medium-sized city in Poland. Conducted research has shown that the deep learning network with autoencoders (DLNA) neural network allows for the most accurate energy consumption estimation of 93%. The proposed model can be used by public transport companies to plan driving schedules and energy management when introducing electric buses.

1. Introduction

Public transport is critical to the operation of urban systems. Worldwide, more and more attention is being paid to reducing the environmental impact of transport. There is still a growing discussion on converting transport to so-called clean transport (using clean fuels) while improving service availability [1]. The popularity of electrification of public urban transport is growing due to the low greenhouse gas emissions and noise reduction compared to buses with conventional drive.
The electrification of existing bus fleets requires determining the electric bus range and methods of charging, as well as planning the charging infrastructure and schedule that will not interrupt normal bus operation. Designing an efficient electric bus network also requires determining the energy demand and selecting the appropriate battery capacity. The energy demand varies throughout the day under different traffic conditions which makes it difficult to estimate using conventional methods.
Efficient operation of electric buses requires a good charging planning strategy in daily operation, mainly due to the limited capacity of the batteries [2]. The complexity of the task is influenced by the number of public transport lines and the diversity of the bus fleet [3].
In the literature, there are studies in which the energy demand for electric buses was estimated by calculating the average demand for the distance traveled or travel time. The types of bus and travel conditions were not taken into account [4,5]. This approach is often used in studies related to the planning of charging electric buses. This approach is very simple to implement, but the use of average energy consumption values only gives a rough estimate of energy needs and does not take into account route features such as degree of inclination and travel conditions of travels at different times of the day. During peak hours, bus journeys can take much more time than off-peak hours (often over 50%), resulting in a much higher energy demand.
In this article, we propose a novel, original deep learning model for predicting energy consumption of a battery electric bus that uses readily available parameters: travel time between stops, the difference in altitude between stops, rush hours for a given line, weather conditions, and the distance between bus stops. The acquisition of such parameters does not introduce any additional excessive costs to bus operators and does not require specialized equipment or many additional person-hours. The model performs well with various types of networks and, even with regression function, achieves high accuracy of the prediction.
Selection of parameters, impacting the energy consumption of electric buses, is based on our statistical analysis of available real data. With such easily obtainable data, the developed model predicts energy consumption with 93% of accuracy.
The behavior and accuracy of any model depends also on the neural network type used to evaluate it. Thus, the aim of the research was also to find a neural network type and configuration which provides the best accuracy of the prediction. We have considered various configurations and types of neural networks, such as deep learning networks with an autoencoder layer (DLNA) and a network of long short-term memory (LSTM) type. For comparison, the model was also evaluated with a classic multilayer perceptron (MLP) network.
The work presented here is a continuation of the research from [6]. The work presented here aimed at improving the accuracy of the model without cost increase. Thorough analysis of available real data for additional bus lines showed that there are other parameters which can strongly impact the prediction accuracy. Our new energy demand prediction model includes a new input parameter—the peak hour. We describe how to enter this parameter in Section 3.
To evaluate the model, we considered other neural network types and their configurations, searching for the one which will provide the best results. Additionally, data from other bus lines was also analyzed and used to evaluate the model.
In the literature, there are many models for estimating energy consumption of electric buses based on artificial intelligence methods, but to the best of the authors’ knowledge, no model has been found that, based on similar parameters, would allow for estimating energy consumption with the accuracy that we have obtained in our research. Most models require specific input data not readily available, requiring additional measurements or complex measurement devices, which generates costs to bus operators.
Highlights of this work:
  • A novel deep learning model for predicting energy consumption of battery electric buses in an urban area.
  • The model uses five readily available bus travel parameters: travel time between stops, the difference in altitude between stops, rush hours for a given line, weather conditions, and the distance between bus stops; thus, it can be easily applied to any urban bus network, avoiding unnecessary expenses on additional specialized equipment.
  • The model performs well with various types of neural networks.
  • The model provides at least 93% accuracy of energy consumption estimate regardless of neural network used (validated on real data for several bus lines).
  • The proposed model could bring benefits in energy-related transport planning and traffic operation studies.
The rest of the article is organized as follows. Section 2 reviews existing energy consumption models and neural network types and configurations used for their validation. Section 3 provides information on the dataset used for training, validation, and testing of the proposed model and more details on data analysis. At the end of the section, the methodology used to derive the model is presented. Section 4 presents the derived energy demand prediction model and discusses the architectures of the chosen deep learning neural networks on which the described model is evaluated. Section 5 presents the results of the experimental studies obtained with the proposed approach and discusses the results. Lastly, Section 6 contains conclusions and future research plans.

2. Energy Consumption Models and Neural Networks

A number of analytical models have been proposed in the literature to estimate energy consumption. For example, [7] presents a simplified model of estimating the energy demand of electric buses in the existing bus networks. The input data of the model consists of information about the arrival and departure times of buses. High-resolution bus journey profile information is not needed.
In other studies, standard driving cycles from literature data were used [8,9,10]. Driving cycle measurements are based on traffic measurements carried out in different cities. However, applying the standard driving cycle in a different city may lead to different results. Moreover, this study does not take into account the traffic conditions for different bus lines. They are usually not identical, especially on large bus networks, as buses have a low average speed with many stops and a long delay in reaching the stop.
The results of the studies presented in [11] indicate that an estimate of energy can be obtained using route characteristics, such as distance covered, inclination of the road and number of turns, and travel parameters, such as speed and acceleration. The presented case studies involve a small number of routes and indicate a need for further validation of the proposed estimation method.
The authors in [12] developed a general framework for estimating the energy demand of electric buses. After analyzing electric bus journeys using mapping data from the spatial information system for large bus networks, they noticed that the difference in height for the bus route is one of the main factors of energy consumption.
In [13], the authors investigated the influence of environmental conditions, route characteristics, and dynamic traffic conditions on the energy consumption of electric buses. The results showed that including more variables can significantly improve forecasting performance. The research described in this paper shows that route characteristics have the largest impact on energy consumption. This is important for journeys of less than 20 km. The conclusions of this study are consistent with the results obtained in our article. Compared to [6], which used four input parameters, the addition of the fifth parameter improved the accuracy of energy consumption estimation by one percentage point, from 7.2% to 6.2% (MAPE—mean absolute percentage error).
The energy consumption of electric buses (EBs) depends on various factors, such as vehicle characteristics, vehicle speed, road grade and acceleration, frequency of stops, weather conditions (air conditioning and heating), etc. [14]. In fact, these factors vary widely, making energy consumption estimation a complex problem. The study of [15] also found that topography and the frequency of stops have a large impact (9.5% and 8.3%, respectively) on the EB energy consumption.
Energy consumption models for EBs are very different to other electric vehicles (EV). In [16,17], the impact of the number of passengers getting on and off, as well as auxiliary systems, was studied. Such models usually require additional data that is difficult to obtain, e.g., the numbers of passengers getting on and off.
In [18,19], authors proposed a model based on explicit modeling of the motor efficiency. In particular, good performance was estimated from component-based simulations using vehicle-specific data provided by the manufacturer.
The nonlinearity and complexity caused by a combination of factors impacting energy consumption make the problem too complex for standard techniques but appropriate for a deep learning approach.
In recent literature, descriptions of many models for estimating energy consumption can be found, but there are few models that utilize deep learning and data that is readily available from bus fleet operators. The increase in computing power of personal computers (NVIDIA graphics cards, above 8 GB of RAM, fast SSD disks) and the improvement of learning algorithms made it possible to effectively train deep learning networks [20]. For this reason, deep learning architectures have found application in solving many problems, such as classification and recognition of images, forecasting traffic intensity, and predicting the result based on a sequence of parameters.
In [21], a probabilistic model of energy consumption using machine learning was proposed. The model makes it possible to estimate the energy consumption for road connections. The authors obtained an error in estimating their energy consumption less than 6%. However, the test data only covered a 4-day period in January, so it is not very representative. Parameters taken into account were state of charge, auxiliary power, and vehicle speed.
Another example of the use of deep learning to predict vehicle speed is presented in [22]. The speed prediction method is based on historical data such as vehicle speed, acceleration, location, and driving date. The authors state that the use of deep learning networks has produced satisfactory results.
The LSTM network was used for speed prediction in [23] and for estimating engine power [24]. The LSTM training is performed on the dataset collected from the traffic simulator using real data representing described city routes.
In [25], authors conducted an analysis of deep learning methods used in the energy sector. Deep learning was found to be very useful for problems related to new perspectives on energy, including state estimation, generation of renewable scenarios, and power grid synthesis. This article presents the energy demand model that does not require high-resolution velocity profile measurements or any other sophisticated data.
The development of electromobility in smart cities in Poland is an important research topic [26]. The case study was performed for data obtained from a public transport company (PKM Jaworzno) in the city of Jaworzno in Poland, which has been successfully introducing battery electric buses into its fleet for several years [27].
As a result of the analysis of the actual available data, we determined the impact of various bus travel parameters on energy consumption. To assess the demand for energy, we proposed to use five parameters, such as travel time between stops, the difference in altitude between stops, rush hours for a given line, weather conditions, and the distance between bus stops.
Although the preparation of the model requires a time-consuming and precise preparation of the training sequence as well as the selection of the type and appropriate configuration of the neural network, after training, such a model allows to quickly and accurately estimate the energy consumption of an existing system.
The thorough analysis of neural network types and configuration yields that the proposed model performs best with a deep learning neural network with autoencoders.
Such a model evaluated for a routes simulator can provide vital information to electric bus network infrastructure designers. It may be also useful for solving other electric bus fleet problems related to battery size, charging strategy, and infrastructure.
The presented work, by providing experimental results, proves that a deep learning architecture is suitable for the problem of energy estimation of EBs. Considering the promising results of the conducted experiments, we plan to evaluate other types of deep learning networks and its usability to a derived energy estimation model.
Key achievements of this work:
  • A novel deep learning prediction model using readily available parameters increasing the accuracy of energy consumption estimation.
  • Determination of parameters influencing the energy consumption of electric buses based on statistical analysis of available real data.
  • Determination of the type and configuration of neural network which is best suited to implement and evaluate the model to provide the best accuracy.

3. Dataset Description, Analysis, and Methodology

The first step required to prepare a useful prediction model was to classify obtained datasets and thoroughly analyze them to determine all parameters which could strongly impact energy consumption of EBs.

3.1. Dataset

The data obtained from a public transport company PKM Jaworzno includes the GPS coordinates of the bus stops locations, the arrival times at bus stops, and the energy consumed between successive stops (state of battery on consecutive bus stops).
The aim of data analysis was to determine the impact of various available parameters on the energy consumption of an electric bus between consecutive bus stops.
Data were registered for working days in summer and winter months of 2018 (July, August, September excluded); one working day in each month, except for holiday months. Data were collected throughout the day from around 5 a.m. to 11 p.m. for two bus lines. As the bus line is, in many cases, a loop (buses travel the same routes cyclically), the data was recorded multiple times for the same round-trip connections. Due to this, it is possible to check the change of energy consumption of the bus introduced by the stops elevation, traffic density, and rush hours in different seasons and weather conditions. In total, energy consumption was analyzed for over 4000 journeys between 136 stops. Electric buses with batteries with a capacity of 160 kWh (Solaris Urbino 12 Electric) were taken into account.
Sample data for nine consecutive stops visited during the bus operation on one of the PKM Jaworzno bus lines (blue line in Figure 1) in February are presented in Table 1.
The data in Table 1 allowed calculating the distance between the stops, the elevation each stop, and the energy required to travel every road section. For the exemplary data in Table 1, the time needed to cover the nine sections of the route, including the stay at the stops, was 9 min 21 s. The distance traveled was 3878 m. The electric bus needed 3.795 kWh to cover this route.
The dataset obtained from the PKM Jaworzno Company was reviewed, and incomplete data and the data indicating stoppage between bus journeys were removed from the dataset.

3.2. Analysis of Variations in Bus Energy Consumption Due to Various Parameters—Determination of Model Input Parameters

Figure 2 shows the average bus travel time between stops datasets and the average energy consumption datasets between the stops, broken down into individual months in which the data were recorded. It can be seen that energy consumption is not always directly proportional to the time the buses travel between stops and the time they spend at the stops. The weather conditions and the direction of travel (route elevation, up and down) also affect energy consumption. The average values of energy consumption in January and June are very high, mainly due to high utilization of heating systems in winter and air conditioning system in summer. Both systems are very energy-demanding.
The graphs in Figure 2 show the average journey durations and energy consumption for a given month and the same distance between stops of 512 m.

3.2.1. Analysis of Weather Conditions

Average energy consumption depends strongly on the weather conditions. On the days when the data were collected, the temperatures ranged from −5 °C in January to 24 °C in June. The chosen days (one per month) displayed average conditions for the season. In Figure 2 it can be seen that the average energy consumption for journeys in January and June is almost equal (heating in January, air-conditioning in June). For February and December, also, the average energy consumption is similar. For the purposes of the neural network, the weather condition parameter wn was added to the model. The most energy-demanding months due to weather conditions are coded with the greatest value. For the rest, the value decreases with decrease of energy demand. Table 2 presents the values assigned to weather condition parameter wn for each month, after datasets analysis.

3.2.2. Altitude Parameter

The energy consumption for a bus journey between two stops at a distance of 386 m, for which the elevation difference is 25 m, for two different bus lines was analyzed. The length of the journey in this case is the same in both directions. Figure 3 shows energy consumption under different weather conditions for a direct connection between two stops for round-trip journeys for two days in April and June. In this case, the bus needed about 30% (April) and 20% (June) more energy when going uphill, compared to the energy used when driving downhill. To better show the difference, a moving average has been added in steps of two (MA2—moving average). Up and down lines on the graph represent different bus lines which operate on the same route but in opposite directions.
The graph in Figure 3 also shows that the energy consumption throughout the day (6 a.m.–2 p.m.) differs. The reason may be the uneven road gradient on this section, as well as the greater number of passengers transported at certain times. Number of passengers is reflected by the time the bus spends at the bus stop.

3.2.3. The Peak-Hour Parameter

Peak (rush) hours are usually associated with increased energy consumption as the load (number of passengers) on the bus increases. Due to increased number of passengers, not only does load increase, but stops with open doors are also longer, which requires more energy for heating or air-conditioning.
In order to analyze the data in terms of energy consumption during peak hours, the average values and the median of several days of electric bus travels in the summer and winter period were taken into account. Figure 4 shows that the rush hours for analyzed bus lines start at 2.30 p.m. and end around 7.00 p.m. From 9 p.m. onwards, energy consumption starts to increase again.
The entire travel period was divided into six time intervals, and for the purpose of training the neural network, the peak hour parameter thpn was assigned the values (whp1–whp2) presented in Table 3.
The coding values are based on the bus traveling hours and the energy used. The greater the energy value, the greater the coding value determined for a specific time interval.

3.3. Methodology

Based on the analysis of the collected data, the values needed to train and test the neural network for energy consumption estimation were determined. We propose to use five parameters: distance, travel time between consecutive bus stops, road elevation, weather conditions, and peak hours (hour of bus travel).
Figure 5a shows the methodology of neural network preparation for the proposed neural energy consumption prediction model. First, GPS coordinates, battery charge levels, and arrival times at bus stops are recorded for a specific bus line. Then, the inputs to our network models need to be normalized and prepared. Finally, one needs to choose the appropriate machine learning method to process the prepared inputs.
Figure 5b shows the method of using a trained neural network to predict energy consumption of an electric bus. In our case, 4600 data samples were collected during travels between stops, 4000 of which were used to train and validate neural networks, and 600 to verify model accuracy.

4. Evaluation of EB Energy Consumption Models Using Various Neural Network Types and Configurations

Thorough analysis of bus travel parameters and their impacts on bus energy consumption yielded the model expressed using the following function:
E n = f ( d n , Δ t n   , Δ h n , w n , t p h n ) ,
where
dn—distances between bus stops;
Δtn—travel times: time taken to travel between consecutive bus stops;
Δhn—elevation differences;
wn—weather conditions;
tphn—hour of travel codes;
n—the number of the bus trip of a bus line.
The relationships between five variables in Function (1) are nonlinear [28]; thus, the best methods to evaluate it are the deep learning neural network methods. Figure 6 shows a general diagram of the proposed energy consumption model for electric buses.
Different types of networks and their different configurations provide different accuracy of the result. In order to find the best neural network to evaluate the model, a thorough analysis was performed and three types of networks were chosen for comparison: two deep learning networks (DLNA and LSTM) and one multilayer perceptron (MLP) network.
Diagrams of selected networks are presented in Figure 7, Figure 8 and Figure 9, respectively, and their configurations are described below. Research was carried out for all the neural networks mentioned. The input parameters for all the networks are as follows:
  • pn(1)—time Δtn;
  • pn(2)—distance dn;
  • pn(3)—elevation differences Δhn;
  • pn(4)—weather condition wn;
  • pn(5)—peak hours tphn,
where n is the n-th bus route section between two stops. The analyzed bus lines are presented in Figure 1. The output of the model is the predicted energy value En.

4.1. Deep Learning Networks with Autoencoders (DLNA) Model

The first network studied is a deep learning network with autoencoders. Figure 7 shows a schematic diagram of such a neural network.
The proposed deep learning network consists of a set of stacked autoencoders whose output is passed to a fully connection layer with a backpropagation learning (BP) algorithm from which outputs are passed to the output layer.
The layers are first trained separately; the so-called pretraining is performed, and then, after the initial setting of the weights, combined into one network. Such a network is retrained in order to best match the output value to the input sequence.
Configurations with one or two layers of autoencoders with the number of neurons from 10–50 were tested. In the hidden BP layer, the number of neurons was between 5 and 20. As a result of training and validation, the best configuration, 5-30a-5-1, was selected (5 inputs, 30 neurons in the autoencoder layer, 5 neurons in the BP hidden layer, and one neuron in the output layer).

4.2. Deep Learning LSTM Model

The LSTM network is a special type of recursive network (RNN). The LSTM network is good at mapping correlations between data sequences, especially those representing time series. The LSTM network consists of memory units (memory cells), the structure and operation of which are described in the literature [29].
The LSTM network was used in this study because of its properties. Compared to conventional neural networks, the LSTM network is able to capture the characteristics of the sequence or time series over a longer period of time. Therefore, the prediction evaluation can yield better results when using LSTM networks. Figure 8 shows a diagram of this neural network.
We tested a network consisting of one and two layers of LSTM units containing from 100 to 200 units, and for the fully connection layer (FC) from 10 to 50 neurons. For typical regression tasks, the regression layer should follow the last fully connected layer.

4.3. Multilayer Perceptron Model (MLP)

The MLP type network is a classic neural network that is often used to map linear and nonlinear functional relationships. In this study, it was mainly used for comparison with deep learning networks. It is a one-way network that consists of a series of layers. In the MLP type network, each subsequent layer is connected from the previous layer. The first layer has a connection from the network input. The last layer consists of one neuron; that output is the network’s output—Figure 9.
The backpropagation learning method with the Levenberg–Marquardt fast weight modification algorithm was used for the network. A sigmoid transition function was used in the hidden layers for each neuron. The network with 5-8-8-1 configuration turned out to be the best.
The yj outputs of the hidden layer neurons are defined as
y j = 1 1 + exp ( s j )   ,
where sj is the weighted sum of the network inputs, i.e., pn(1), pn(2),…, pn(k):
s j = i = 1 k ( w i j p n ( i ) + b j )  
At the output of the network, the predicted energy value En is the sum of the weighted values of the outputs of the neurons of the hidden layer:
E n = j = 0 M 1 ( w j y j + b ) ,
where M is the number of neurons in the hidden layer.
During learning, the weights of the network inputs and the weights of the neuron outputs of the hidden layer are determined. The operating error (B) of the neural network (objective function) is minimized:
B = 1 n i = 1 n ( E e x E i ) 2 ,
where n—number of training sequence data, Eex—expected value from the training string for the given input sequence pn(1), pn(2), …, pn(k), Ei—consecutive calculated energy values, i = 1, …, n for the current neuron weights.
The network was trained until the training error 0.001, or to 200 epochs. The learning sequence consisted of 4000 input vectors of five elements and the corresponding output value—energies (En), which is output of the neural network, and the learning rate λ = 0.01, momentum α = 0.7.

4.4. Multiple Linear Regression Function (MLR)

A multiple regression function was added to compare the results with neural networks. The coefficients of the MLR were calculated and the values of the regression function were compared with the results of the neural networks. Regression function coefficients were calculated for the same training data that was used to train the neural networks.
Research has shown that the multiple linear regression function can meet the requirements of energy consumption estimation but gives values 1 percentage point (MAPE) worse than the best neural model. In this case, the estimated energy consumption En is calculated as follows:
E n = m 1 Δ t n + m 2 d n + m 3 Δ h n + m 4 w n + m 5 t p h n + b
The results prove that the proposed model may be suitable for estimating energy consumption. The values of the m1m5 coefficients calculated for the set of 4000 data are {3.1265, 0.09206, 0.01622, −0.11534, −0.01336, b = 0.09596}, respectively, which shows that all variables are necessary to calculate the estimates.

5. Results and Discussion

As a result of the verification with the use of non-learning test data, we tested three types of neural networks:
-
Deep learning network with autoencoders (DLNA).
-
Long short-term memory network (LSTM).
-
Classic three-layer feedforward network (MLP).
The network that showed the smallest MAPE and RMSE errors was selected as best for the implementation of the presented energy consumption model. The first neural network configuration used to evaluate the deep learning energy consumption model was one autoencoder, with the number of neurons varying from 10 to 50, and a backpropagation layer, with the number of neurons in the hidden layer ranging from 5 to 10. The training dataset consisted of 4000 sequences of recorded bus travel parameters and the test dataset of 600 sequences. In total, 4600 data samples collected during bus travels between stops were included in the study. Prediction accuracy is evaluated using two errors: root mean square error (RMSE) and mean absolute percentage error (MAPE):
R M S E = 1 n i = 1 n ( E r i E i ) 2                 M A P E = 1 n i = 1 n | E r i E i E r i | 100 %
where Ei, Eri—respectively, predicted and real energy consumption for journey i, n = 600.
RMSE is the square root of the mean of the squares of the differences. It shows how close the observed data values are to the predicted values of the model. Mean absolute percentage error (MAPE) informs about the average magnitude of forecast errors for the test period, expressed as a percentage.
The model evaluation was conducted with the use of the MATLAB 2020a environment (academic license), and computer with Intel(R) Core(TM) i5 2.40 GHz processor, 8 GB of RAM, and with a graphics card NVIDIA GeForce MX330.
Figure 10, Figure 11, Figure 12 and Figure 13 show test results for 100 samples of data from a test dataset of 600 sequences, for sequences 501 to 600. These sequences are selected as representative because they show the greatest number of differences between test results obtained for different network models. The total RMSE and MAPE error values test dataset of 600 sequences are shown in Table 4. The histograms show the distribution of the difference between the actual and predicted values. The RMSE error is the square root of the mean of these differences for the 100 test links.
Figure 10 shows the DLNA test results for the 5-30a-5-1 configuration. Figure 10a compares the values obtained from the network with the actual values. Figure 10b shows a histogram of the difference between the actual and predicted values corresponding to the left-hand graph. It can be seen that many of the predicted values underestimated the actual energy consumption values. Underestimated values (the difference between the actual and predicted value is greater than zero) in this case constitute 65% of all tested data. These dependencies can also be observed in Figure 10a. The red line shows the data predicted by the DLNA network. The RMSE error for this 100-element test set is 0.038 kWh.
Next, the LSTM network was analyzed. Figure 11 shows the results of the LSTM network test for the 5-200u-1 configuration (five inputs, 200 LSTM units and 1 neuron) in the FC layer.
In the case of this network, the number of cases for which the difference between the actual and predicted values is greater than zero is similar to the opposite cases and amounts to 51%. The RMSE error for this 100-element test set is 0.054 kWh.
Finally, MLP network results were analyzed. Figure 12 shows the results of the MLP network test for the 5-8-8-1 configuration (five input values, eight neurons in the first hidden layer, eight neurons in the second hidden layer, and one neuron in the output layer).
This network, similar to the DLNA network, predicts a lower energy value than the real one in 61% of 100 test data. The RMSE error for this 100-element test set is 0.045 kWh.
Additionally, MLR function results were compared to the ones obtained from neural networks. Figure 13 shows the test results for the multiple linear regression function (MLR). The histogram shows that the most data from the test set was estimated with an error of −0.05 kWh, i.e., the values were higher than the real. However, the average frequency shows that out of 100 connections, 50% of the values were higher and the remainder were lower than the real.
The RMSE error for sequences 501 to 600 is 0.052 kWh.
Total MAPE and RMSE error was calculated for 600 test sequences. The values of MAPE and RMSE errors obtained for all described above networks and functions are presented in Table 4.
RMSE is an absolute measure of fit and R2 is a relative measure of fit. For predictive models, RMSE is one of the most important indicators of the quality of fit.
In Table 4, the DLN model has the lowest value of 0.052 kWh, which means the best fit of the model to the data. The best coefficient of determination R2 also reached a value of 0.973 for the model with the DLNA network.
The MAPE value allows you to compare the accuracy of the forecasts of different models. In Table 4, the lowest value of the MAPE error equal to 6.2% was also obtained for the DLNA model. In general, it can be said that all models give good accuracy. The values of 6.7% for the MLP model and 7.2% for the LSTM and MLR models are also very good results.
Figure 14 shows the frequency distribution of the relative errors for all tested models. The largest number of predicted energy values for the test data with an error close to zero occurred for the DLNA network. Second in terms of the accuracy of estimating energy consumption models is the MLP; the other models gave very similar results.
Better results could be expected for the recently popular LSTM network. However, the LSTM network gives the best results for the time series. The five parameters used to estimate the amount of energy consumed can be time series; however, they are short sequences for journeys between the same stops or several bus connections. It can be assumed that this type of network would give better results if the obtained data were grouped into time series. However, this is a broad topic for another study.
The accuracy of the model is highly dependent on the test data. To illustrate the obtained results even better, the graph in Figure 15 shows the MAPE error plot for the test set divided into three groups of 200 sequences, from 1–200, 201–400, and 401–600.
For these three groups, the best results were still achieved with the DLNA model. The MAPE error for this model for sequences from 1–200, 201–400, and 401–600 was 5.76%, 6.57%, and 6.41%, respectively (on average 6.2%), and these are the lowest values in relation to other models.
Finally, we have compared new results with the ones obtained for the first version of the model described in [13]. Both results are shown in Table 5.
It can be seen that MAPE values obtained for the new model are better than the previous ones, and the difference is around 1%. The additional input parameter also improved values of RMSE and R2. Overall, the accuracy of the new model is better, and the cost of obtaining the new parameter is negligible as it is also a readily available parameter.

6. Conclusions

The article describes efficient application of the energy prediction of electric buses problem to neural networks which can provide high accuracy of the result. The authors propose a neural network model for estimating energy consumption by an electric bus traveling within the city. The model uses readily available bus travel parameters, thus avoiding additional expenses for bus operators, e.g., for specialized measurement equipment. The model input parameters are data that are normally available to the bus operator. There are no special speed profiles or detailed information about the technical data of the electric bus or installation of specialized, costly measuring equipment. Thus, the model can efficiently serve bus operators when introducing electric buses and planning charging infrastructure.
The suitability of three types of neural networks for the purpose of model validation was tested. The training sequence consisted of 4000 sequences, which represented 4000 bus connections between over 100 stops on two bus lines in the city of Jaworzno in Poland. The test dataset consisted of 600 sequences that were not a subset of the training set.
The best results were achieved for deep learning networks with autoencoders (DLNA). The MAPE error for this network is 6.2%, and the other networks gave the accuracy of 6.7% (MLP) and 7.2% (LSTM). Additionally, the results obtained with the use of neural networks with the linear regression function were compared, and an error of 7.2% was obtained for the same test data. As can be observed, the model is very efficient even with less computationally heavy methods, i.e., MLR. Thus, if smaller accuracy is accepted and very low cost of prediction is required, then the model can be evaluated with MLR, still providing good energy demand estimation.
The experimental results showed that the proposed model is very accurate, and its accuracy exceeds the accuracy of models based on other types of neural network and analytical models that require a lot of additional data.
Although all neural network types are able to map nonlinear dependencies as defined in Function (1), the conducted study yields that the selection of the appropriate type of network impacts the accuracy of estimation of energy consumed by an electric bus.
It was verified that adding additional parameter to the model increases its accuracy by 1% (MAPE).
We are negotiating with other bus companies which operate in bigger cities in order to acquire new datasets for future analysis and research on the matter. We plan to assess the importance of additional parameters on energy prediction.
We plan to analyze the impact of other parameters on the accuracy of the prediction, such as instantaneous speed, auxiliary loads, and technical condition of the vehicle. Furthermore, we would like to analyze the impact of road incidents on reliability of the model.
The obtained model and its validation results can form the basis for further research on charging strategies and requirements related to the charging infrastructure.

Author Contributions

Conceptualization, T.P.; methodology, T.P.; software, T.P.; validation, T.P. and D.P.; formal analysis, T.P.; investigation, T.P. and D.P.; resources, T.P.; data curation, T.P. and D.P.; writing—original draft preparation, D.P.; writing—review and editing, D.P.; visualization, T.P. and D.P.; supervision, T.P.; project administration, T.P. and D.P. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

The data used in the research was provided by the PKM Jaworzno company, for which the authors are very grateful.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. European Commission. European Green Deal. 2019. Available online: https://ec.europa.eu/info/strategy/priorities-2019-2024/european-green-deal_en (accessed on 20 October 2021).
  2. Mathieu, L. Electric Buses Arrive on Time. Marketplace, Economic, Technology, Environmental and Policy Perspectives for Fully Electric Buses in the EU. Transport and Environment. 2018. Available online: https://www.transportenvironment.org/sites/te/files/publications/Electric%20buses%20arrive%20on%20time.pdf (accessed on 20 October 2021).
  3. Clairand, J.-M.; Guerra-Terán, P.; Serrano-Guerrero, X.; González-Rodríguez, M.; Escrivá-Escrivá, G. Electric Vehicles for Public Transportation in Power Systems: A Review of Methodologies. Energies 2019, 12, 3114. [Google Scholar] [CrossRef] [Green Version]
  4. Jovanovic, R.; Bayram, I.S.; Bayhan, S.; Voß, S. A GRASP Approach for Solving Large-Scale Electric Bus Scheduling Problems. Energies 2021, 14, 6610. [Google Scholar] [CrossRef]
  5. Zoltowska, I.; Lin, J. Optimal Charging Schedule Planning for Electric Buses Using Aggregated Day-Ahead Auction Bids. Energies 2021, 14, 4727. [Google Scholar] [CrossRef]
  6. Pamula, T.; Pamula, W. Estimation of the Energy Consumption of Battery Electric Buses for Public Transport Networks Using Real-World Data and Deep Learning. Energies 2020, 13, 2340. [Google Scholar] [CrossRef]
  7. Gallet, M.; Massier, T.; Hamacherb, T. Estimation of the energy demand of electric buses based on real-world data for large-scale public transport network. Appl. Energy 2018, 230, 344–356. [Google Scholar] [CrossRef]
  8. Nylund, N.-O.; Erkkilä, K.; Clark, N.; Rideout, G. Evaluation of Duty Cycles for Heavy-Duty Urban Vehicles: Final Report of IEA AMF Annex XXIX; VTT Technical Research Centre of Finland: Espoo, Finland, 2007. [Google Scholar]
  9. Vilppo, O.; Markkula, J. Feasibility of electric buses in public transport. In EVS28 28th International Electric Vehicle Symposium and Exhibition; KINTEX: Goyang, Korea, 2015. [Google Scholar]
  10. Halmeaho, T.; Rahkola, P.; Tammi, K.; Pippuri, J.; Pellikka, A.P.; Manninen, A.; Ruotsalainen, S. Experimental validation of electric bus powertrain model under city driving cycles. IET Electr. Syst. Transp. 2017, 7, 74–83. [Google Scholar] [CrossRef]
  11. Sinhuber, P.; Rohlfs, W.; Sauer, D.U. Study on power and energy demand for sizing the energy storage systems for electrified local public transport buses. In Proceedings of the 2012 IEEE Vehicle Power and Propulsion Conference, Seoul, Korea, 9–12 October 2012; pp. 315–320. [Google Scholar]
  12. Al-Ogaili, A.S.; Ramasamy, A.; Hashim, T.J.T.; Al-Masri, A.N.; Hoon, Y.; Jebur, M.N.; Verayiah, R.; Marsadek, M. Estimation of the energy consumption of battery driven electric buses by integrating digital elevation and longitudinal dynamic models: Malaysia as a case study. Appl. Energy 2020, 280, 115873. [Google Scholar] [CrossRef]
  13. Li, P.; Zhang, Y.; Jiang, M. The effects of dynamic traffic conditions, route characteristics and environmental conditions on trip-based electricity consumption prediction of electric bus. Energy 2020, 218, 119437. [Google Scholar] [CrossRef]
  14. Bartlomiejczyk, M.; Kolacz, R. The reduction of auxiliaries power demand: The challenge for electromobility in public transportation. J. Clean. Prod. 2020, 252, 119776. [Google Scholar] [CrossRef]
  15. Pettersson, P.; Johannesson, P.; Jacobson, B.; Bruzelius, F.; Fast, L.; Berglund, S. A statistical operating cycle description for prediction of road vehicles’ energy consumption. Transp. Res. Part D Transp. Environ. 2019, 73, 205–229. [Google Scholar] [CrossRef]
  16. Kivekäs, K.; VepsäläInen, J.; Tammi, K. Stochastic Driving Cycle Synthesis for Analyzing the Energy Consumption of a Battery Electric Bus. IEEE Access 2018, 6, 55586–55598. [Google Scholar] [CrossRef]
  17. Vepsalainen, J.; Kivekas, K.; Otto, K.; Lajunen, A.; Tammi, K. Development and validation of energy demand uncertainty model for electric city buses. Transp. Res. Part D Transp. Environ. 2018, 63, 347–361. [Google Scholar] [CrossRef]
  18. Basso, R.; Kulcsár, B.; Egardt, B.; Lindroth, P.; Sanchez-Diaz, I. Energy consumption estimation integrated into the Electric Vehicle Routing Problem. Transp. Res. Part D Transp. Environ. 2019, 69, 141–167. [Google Scholar] [CrossRef]
  19. Fiori, C.; Ahn, K.; Rakha, H.A. Power-based electric vehicle energy consumption model: Model development and validation. Appl. Energy 2016, 16, 257–268. [Google Scholar] [CrossRef]
  20. Modi, S.; Bhattacharya, J.; Basak, P. Estimation of energy consumption of electric vehicles using Deep Convolutional Neural Network to reduce driver’s range anxiety. ISA Trans. 2020, 98, 454–470. [Google Scholar] [CrossRef]
  21. Basso, R.; Kulcsár, B.; Sanchez-Diaz, I. Electric vehicle routing problem with machine learning for energy prediction. Transp. Res. Part B 2021, 145, 24–55. [Google Scholar] [CrossRef]
  22. Yan, M.; Li, M.; He, H. Deep learning for vehicle speed prediction. In Proceedings of the CUE2018—Applied Energy Symposium and Forum 2018: Low Carbon Cities and Urban Energy Systems, Shanghai, China, 5–7 June 2018. [Google Scholar]
  23. Malek, Y.N.; Najib, M.; Bakhouya, M.; Essaaidi, M. Multivariate Deep Learning Approach for Electric Vehicle Speed Forecasting. Big Data Min. Anal. 2021, 4, 56–64. [Google Scholar] [CrossRef]
  24. Kan, Y.; Liu, H.; Lu, X.; Chen, Q. A Deep Learning Engine Power Model for Estimating the Fuel Consumption of Heavy-Duty Trucks. In Proceedings of the 2020 6th IEEE International Energy Conference (ENERGYCON), Tunis, Tunisia, 28 September–1 October 2020. [Google Scholar]
  25. Khodayar, M.; Liu, G.; Wang, J.; Khodayar, M.E. Deep Learning in Power Systems Research: A Review. CSEE J. Power Energy Syst. 2021, 7, 209–220. [Google Scholar]
  26. Sierpiński, G.; Staniek, M. Platform to support the implementation of electromobility in smart cities based on ICT applications—Concept for an electric travelling project. Sci. J. Sil. Univ. Technol. 2018, 100, 181–189. [Google Scholar] [CrossRef]
  27. Krawiec, K. Vehicle cycle hierarchization model to determine the order of battery electric bus deployment in public transport. Transp. Probl. 2021, 16, 99–112. [Google Scholar] [CrossRef]
  28. Pamuła, T. Neural networks in transportation research—Recent applications. Transp. Probl. 2016, 11, 27–36. [Google Scholar] [CrossRef] [Green Version]
  29. Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Routes of analyzed bus lines. source: “© autorzy OpenStreetMap”.
Figure 1. Routes of analyzed bus lines. source: “© autorzy OpenStreetMap”.
Energies 15 01747 g001
Figure 2. Average bus travel time and average energy consumption.
Figure 2. Average bus travel time and average energy consumption.
Energies 15 01747 g002
Figure 3. Energy consumption for trip between stops in both directions (up and down).
Figure 3. Energy consumption for trip between stops in both directions (up and down).
Energies 15 01747 g003
Figure 4. Average values of energy consumed by the electric bus, depending on the time of day.
Figure 4. Average values of energy consumed by the electric bus, depending on the time of day.
Energies 15 01747 g004
Figure 5. Methodology—Diagram of the method of predicting energy demand of an electric bus; (a) data acquisition and neural networks configuration; (b) model validation.
Figure 5. Methodology—Diagram of the method of predicting energy demand of an electric bus; (a) data acquisition and neural networks configuration; (b) model validation.
Energies 15 01747 g005
Figure 6. Neural model of energy consumption by an electric bus.
Figure 6. Neural model of energy consumption by an electric bus.
Energies 15 01747 g006
Figure 7. Energy consumption estimation model using a DLNA network.
Figure 7. Energy consumption estimation model using a DLNA network.
Energies 15 01747 g007
Figure 8. Structure of LSTM proposed network.
Figure 8. Structure of LSTM proposed network.
Energies 15 01747 g008
Figure 9. Structure of MLP neural network model of energy consumption.
Figure 9. Structure of MLP neural network model of energy consumption.
Energies 15 01747 g009
Figure 10. (a) Real and predicted energy consumption for test data from 501 to 600; (b) histogram for RMSE errors for DLNA networks for 100 test data.
Figure 10. (a) Real and predicted energy consumption for test data from 501 to 600; (b) histogram for RMSE errors for DLNA networks for 100 test data.
Energies 15 01747 g010
Figure 11. (a) Real and predicted energy consumption for test data from 501 to 600; (b) histogram for RMSE errors for LSTM networks for 100 test data.
Figure 11. (a) Real and predicted energy consumption for test data from 501 to 600; (b) histogram for RMSE errors for LSTM networks for 100 test data.
Energies 15 01747 g011
Figure 12. (a) Real and predicted energy consumption for test data from 501 to 600; (b) Histogram for RMSE errors for MLP networks for 100 test data.
Figure 12. (a) Real and predicted energy consumption for test data from 501 to 600; (b) Histogram for RMSE errors for MLP networks for 100 test data.
Energies 15 01747 g012
Figure 13. (a) Real and predicted energy consumption for test data from 501 to 600; (b) Histogram for RMSE errors for MLR models for 100 test data.
Figure 13. (a) Real and predicted energy consumption for test data from 501 to 600; (b) Histogram for RMSE errors for MLR models for 100 test data.
Energies 15 01747 g013
Figure 14. Heatmap for frequency of differences between the actual and predicted values for 600 test data.
Figure 14. Heatmap for frequency of differences between the actual and predicted values for 600 test data.
Energies 15 01747 g014
Figure 15. MAPE energy estimation error for four methods for a test set divided into three parts.
Figure 15. MAPE energy estimation error for four methods for a test set divided into three parts.
Energies 15 01747 g015
Table 1. Bus journey parameters.
Table 1. Bus journey parameters.
No.Bus Stop NameGPS Coordinates of Bus StopsTime of ArrivalEnergy Consumption (kWh)
1SD19.29268150.24673409:35:13bsp 1
2SPrz19.29429650.24357709:36:130.50
3SOG19.28925550.24048909:37:280.63
4Spo19.28630950.24086509:37:490.18
5GP19.27675450.23929609:39:190.75
6GPBS19.27470450.24250309:40:190.50
7BD19.27359550.24495409:41:190.50
8DD19.26090550.2477809:43:191.01
9Dl19.25436150.24821609:44:340.63
1 bsp—bus starting point.
Table 2. Weather conditions wn values.
Table 2. Weather conditions wn values.
JanuaryFebruaryMarchAprilMayJuneOctoberNovemberDecember
432214113
Table 3. Peak hours whp coding values.
Table 3. Peak hours whp coding values.
whp1whp2whp3whp4whp5whp6
124313
Table 4. MAPE and RMSE errors for all tested prediction models.
Table 4. MAPE and RMSE errors for all tested prediction models.
DLNAMLPMLRLSTM
RMSE (kWh)0.0520.0560.0550.057
MAPE (%)6.26.77.27.2
R20.9730.9680.9670.966
Table 5. MAPE and RMSE errors for two models.
Table 5. MAPE and RMSE errors for two models.
DLNAMLRDLNA *MLR *
RMSE [kWh]0.0520.0550.0770.085
MAPE [%]6.27.27.18.2
R20.9730.9670.9440.935
* Results for four input parameters [13].
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Pamuła, T.; Pamuła, D. Prediction of Electric Buses Energy Consumption from Trip Parameters Using Deep Learning. Energies 2022, 15, 1747. https://doi.org/10.3390/en15051747

AMA Style

Pamuła T, Pamuła D. Prediction of Electric Buses Energy Consumption from Trip Parameters Using Deep Learning. Energies. 2022; 15(5):1747. https://doi.org/10.3390/en15051747

Chicago/Turabian Style

Pamuła, Teresa, and Danuta Pamuła. 2022. "Prediction of Electric Buses Energy Consumption from Trip Parameters Using Deep Learning" Energies 15, no. 5: 1747. https://doi.org/10.3390/en15051747

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop