1. Introduction
With the rising prevalence of electric buses, modelling their energy efficiency emerges as a critical challenge, supporting effective operational planning and fleet optimisation. Energy consumption in these vehicles is influenced by multiple aspects, including driving dynamics, operating conditions, terrain topography, and vehicle technical parameters. Accurate modelling allows improving energy efficiency, optimising charging strategies, and extending battery life. Analysing energy consumption in electric buses can support the optimisation of energy management strategies and improve the efficiency of transportation systems. Using statistical methods, machine learning algorithms, and physical modelling enables precise energy consumption forecasting and the adjustment of operational strategies [
1]. In urban conditions, eco-driving practices have been shown to reduce vehicle energy use, supporting operational goals in public transport [
2]. Additionally, vehicle configuration has been shown to shape energy demand; a comparative study of short versus long city buses reported systematic differences in energy consumption with implications for e-mobility planning [
3].
For public transport applications, the Standardised On-Road Test (SORT) methodology serves as an important tool to assess vehicle energy efficiency in quasi-real operating environments. It involves three driving cycles, SORT 1 (intensive urban), SORT 2 (moderate urban), and SORT 3 (suburban), each characterised by differences in speed profiles, stop patterns, and passenger loads [
4,
5]. Unlike previous test cycles (e.g., ESC, ETC), the SORT methodology evaluates the entire vehicle, not just the engine, allowing for accurate energy consumption comparisons and the effectiveness of recuperation systems. The results of these tests are widely used in tenders for rolling stock purchases and operational optimisation processes. Within such evaluations, broader sustainability indicators for surface public transport should also be considered [
6].
Predictive models have assumed greater importance for public transport in recent years, contributing to real-time optimisation of energy efficiency. Models based on predictive control (MPC) can adapt energy management strategies to current road conditions, battery status, and predicted driving speeds, reducing energy consumption by up to several per cent compared to traditional methods [
7,
8,
9,
10,
11]. Modern modelling approaches increasingly employ machine and deep learning techniques, including long short-term memory (LSTM) and bidirectional LSTM (BiLSTM), which enhance predictive accuracy and allow adaptation to dynamic operating conditions. Predictive models can also account for component ageing, translating into extended battery life and reduced fleet maintenance costs [
12].
A key element in improving the efficiency of electric buses is the strategy of energy recuperation during braking. Supercapacitors, flywheels, or flow batteries offer high cycle life and fast energy exchange, making them promising for energy storage in SORT-based systems. These findings align with emerging research on dynamic energy transfer at intersections, which leverages regenerative braking to optimise system-wide energy recovery [
13]. Modern energy recovery systems can recover from 25 to as much as 51% of braking energy. The use of advanced control methods, such as threshold logic, fuzzy control, or genetic algorithms, can increase this recovery by another dozen or so per cent compared to basic strategies [
14,
15]. Optimising energy recuperation translates into reduced overall energy consumption, extended vehicle range, and better battery protection, especially when integrated with hybrid energy storage systems.
Despite progress, the literature indicates significant research gaps in analysing instantaneous energy consumption in electric buses during SORT tests. There is a lack of comprehensive studies combining instantaneous energy consumption profiles with linear and non-linear models in real-world operating scenarios. Previous work shows that non-linear models, such as neural networks, better represent complex relationships than linear models, but they require the inclusion of additional variables, time delays, and environmental factors to improve forecast accuracy [
4,
16].
This paper analyses electric buses’ instantaneous energy consumption and recuperation (IECR) based on SORT tests. The study included vehicles equipped with one battery with a pantograph, four batteries, and eight batteries, each of which underwent ten test runs. The study applied linear regression together with artificial neural networks to capture how driving parameters influence energy consumption. The obtained results enabled the assessment of the effect of speed and acceleration on instantaneous energy consumption and recuperation, as well as the analysis of the impact of battery configuration on vehicle energy efficiency. These results can provide a basis for further optimising public transport systems through advanced energy management strategies and precise range forecasting of electric buses in urban environments.
2. Literature Review
Modelling energy consumption in electric bus drive systems is key to optimising public transport. Abdelaty et al. [
17] and Abdelaty & Mohamed [
18] demonstrated the high effectiveness of machine learning models, such as neural networks, in predicting energy consumption. Li et al. [
1] proposed a model combining physical and historical data, which allows for more accurate predictions. Energy consumption modelling in electric vehicles has been widely studied in the scientific literature. Kozłowski et al. [
19] indicated that vehicle speed, acceleration, and the transformations of these characteristics are key factors determining energy consumption in electric vehicles. These studies demonstrated that dynamic speed changes can significantly affect energy efficiency, which is particularly important in urban conditions. Further research by Kozłowski et al. [
4] focused on analysing instantaneous energy consumption and the recuperation (IECR) process, drawing on SORT test measurements. In parallel to consumption modelling, EV routing studies integrate battery range and charger topology; GA-based methods are a common and effective option [
20]. These results confirm the significance of efficient energy control strategies, especially in optimising energy recovery systems.
Dabčević et al. [
21] developed a model to analyse bus trip data, considering average speed and distance travelled. Vepsäläinen et al. [
22] highlighted the computational efficiency of predictive methods, which is crucial for applications in real-world operating conditions. Kozłowski et al. [
19] analysed the availability of technical systems using a semi-Markov model, which allows for considering random periods of idleness and operation of electric vehicles. Applying this model in public transport analysis can be crucial for predicting the reliability of electric buses and their effective management. At the system level, initiatives such as Bus Rapid Transit (BRT) have proven effective in improving the efficiency and sustainability of bus operations, thereby facilitating the integration of predictive modelling with urban mobility planning [
23]. In addition, Kozłowski et al. [
4] investigated instantaneous energy use and the recuperation process using data obtained from SORT trials. These results confirm the importance of effective energy management, especially in optimising energy recovery systems. In the context of predictive methods, Kłosowski et al. [
24] applied LSTM neural networks to monitor complex industrial systems, demonstrating the potential application of this technology in modelling energy consumption in electric buses. Furthermore, Pawlik et al. [
25] demonstrated the effectiveness of artificial neural networks in diagnosing machines operating under variable conditions, suggesting the possibility of using similar techniques in the operational analysis of electric vehicles.
An important issue in energy consumption analysis is obtaining measurement data. Electric vehicles use, among others, on-board diagnosis (OBD) systems, the control area network (CAN) bus, on-board sensors, and external data loggers. OBD-II enables real-time acquisition of parameters such as speed, battery current and voltage, and state of charge (SOC), which allows for conducting research in real-world conditions [
26,
27,
28,
29]. Access to the CAN bus enables the recording of detailed data from the drivetrain and auxiliary systems, characterised by a higher frequency of measurements [
30]. On-board sensors allow for direct measurement of current, voltage, speed, acceleration, and environmental conditions [
29,
31]. Data loggers enable long-term recording of parameters from multiple sources, integrating data from GPS and environmental sensors, which is particularly useful in predictive models [
28,
30,
31].
Energy consumption models can be regression-based or based on neural networks. Linear regression models are interpretable and straightforward but often fail to model non-linear dependencies [
32,
33,
34]. Neural networks are good at modelling non-linearities [
35,
36], while recurrent architectures (RNN, LSTM, GRU) enable the representation of temporal dependencies and achieve higher forecast accuracy [
37,
38,
39].
Speed, acceleration, vehicle mass, and route profile primarily influence instantaneous energy consumption. Higher speeds and rapid accelerations increase energy consumption due to increased aerodynamic drag and power requirements (Suarez et al., 2022; Skuza et al., 2024 [
40,
41]). Higher mass—due to the number of passengers or battery configuration—increases consumption, especially on hills [
42]. Route configuration, number of stops, and traffic density also play a significant role [
43,
44].
Recovering electrical energy during braking is one of the key mechanisms for improving efficiency. Chidambaram et al. [
45] show that a high recuperation level at low charging currents benefits battery life. The braking strategy significantly impacts energy balance—aggressive methods allow for the recovery of more energy at the expense of faster cell degradation. In contrast, gentle methods are more beneficial for battery durability [
46]. Additionally, advanced control strategies, such as fuzzy control or hybrid systems with supercapacitors, can increase energy recovery efficiency by up to 15% [
47,
48]. The number of batteries in an electric vehicle can affect its energy consumption, mainly due to increased weight.
The literature on braking energy recovery shows that the recovery strategy affects the efficiency of energy recovery. An aggressive strategy enables the recovery of a larger amount of electrical energy during braking, which translates into an increase in range. Although a gentle method produces less electrical energy, it may be more convenient for the vehicle driver and drivetrain [
49]. Comparative assessment of regenerative braking performance in a fully electric car was performed. An aggressive method causes a higher current load on the battery, which may cause its faster degradation and shorten its lifespan. In turn, a gentle method is better for battery longevity. Driving style also affects the speed of battery regeneration and energy recovery efficiency from braking [
50]. Another factor influencing energy consumption is the configuration of the battery system [
42]. An increase in the number of batteries means an increase in weight. This relationship is directly proportional—the more batteries, the greater the weight. An increase in weight also has an impact on increasing rolling resistance. Optimising the weight and arrangement of batteries affects the vehicle’s energy efficiency and maximises range [
49]. The number of batteries also increases the range. For most users, the optimal range is 350–480 km. Further increase in battery capacity becomes less effective [
42,
49].
Comparisons of laboratory test results (e.g., SORT) with data from real-world routes indicate significant differences resulting from the influence of traffic conditions, driver behaviour, and environmental factors [
51]. Therefore, combining both data sources to obtain reliable models is recommended.
Energy efficiency assessment requires the use of statistical analysis methods and model validation methods [
52,
53]. It is important to use visual inspection of residual plots and error measures (RMSE, MAE, correlation coefficient) to assess model fit comprehensively.
Environmental factors also influence energy consumption. Low temperatures increase energy demand due to increased heating consumption and reduced battery efficiency, which can increase consumption by up to 35–50% in winter conditions [
54,
55]. High temperatures also increase consumption due to air conditioning [
36]. Unfavourable weather conditions, such as wind, rain, or snow, further reduce efficiency [
56,
57].
3. Materials and Methods
Electric buses’ IECR were analysed during the SORT test. The study included three vehicle configurations as follows:
Electric bus with one battery and fitted with a pantograph;
Electric bus with four batteries;
Electric bus with eight batteries.
The tests were conducted on standard 12-metre low-floor city buses in three battery configurations: one pack with a pantograph (nominal capacity 72.4 kWh), four packs (nominal capacity 290 kWh), and eight packs (nominal capacity 579 kWh). All buses were loaded to their permissible gross vehicle weight (approx. 18,000 kg) to ensure comparable test conditions.
Ten test runs were conducted for each variant. The analysis sought to identify the effect of battery number on energy consumption and recuperation while driving and to assess the dependence of IECR on speed and driving dynamics (acceleration). Modelling was conducted using the following:
A linear model considering the contrast describing the system state (acceleration, braking, steady driving, stopping);
A complex linear model considering the states of the system;
Artificial neural network;
Recurrent neural network.
Linear models, despite the generally non-linear nature of the dependence of IECR on velocity and acceleration, linearly use variables and their transformations in estimating the effect on IECR.
3.1. Measuring Equipment
The following devices were used for the measurements:
Yokogawa WT-1806 power analyser (Musashino, Japan);
APPA 32 current clamp (Shin-Tien, Taiwan);
LAB-EL LB-702 thermohygrobarometer—measuring probe No. 1371 and reading panel No. 1073 (Łódź, Poland);
CFM Master anemometer model 8901; serial number 8809870 (Frankfurt, Germany);
CORSYS-DATRON measuring head type L-400 serial no. 41434 (Darmstadt, Germany);
DINI ARGEO non-automatic electronic scale type WWSD6T; serial number 01001852335 (Modena, Italy).
Speed was measured using a DATRON optical head, synchronised with energy consumption and recovery measurements. The measurement system displayed a speed profile to the driver by the SORT cycle requirements, ensuring high repeatability of runs.
Current clamps were connected at points in the vehicle’s high-voltage system (PowerBox, main HV connectors), allowing for the recording of current flow during acceleration, braking, constant speed driving, and standstill. These points are illustrated in the measurement system diagrams. Voltage measurements were performed at dedicated points in the electrical system, enabling battery performance monitoring during operation and charging.
3.2. Measurement Location and Conditions
The tests were carried out on Road No. 56 near Stary Jasiniec. The measurement section, 2100 m in length, featured a maximum gradient of 0.35% and was located at an elevation of 98 m above sea level, with a smooth road surface. During the trials, atmospheric conditions remained stable, with wind speeds along the route between 0.40 and 0.54 m/s, air temperature ranging from 5.2 to 4.7 °C, relative humidity of 60.4–65.3%, and pressure between 1005.1 and 1005.3 hPa.
3.3. SORT Test Procedure
The SORT developed by UITP includes three variants as follows:
SORT 1—intense city traffic (average speed approx. 12 km/h, 6–8 stops/km, stop time up to 35% of driving time);
SORT 2—moderate city traffic (approx. 18 km/h, 3–5 stops/km, standing still approx. 20% of the time);
SORT 3—suburban route (approx. 25 km/h, 1–2 stops/km, stops approx. 10% of the time).
The tests maintained the full load per its permissible gross vehicle weight. Multiple iterations were performed for each vehicle variant to obtain data with minimal deviation from the reference profile. The results were measured in kWh/km, recording energy consumption and recuperation during braking.
3.4. Data Analysis
The collected data were time-synchronised, and the dependence of IECR on vehicle speed, acceleration, and driving states was then modelled. The effect of battery number on energy consumption and recovery characteristics was considered. The models were assessed for fit and predictive ability.
4. Research Tools
This section presents the research tools applied in the study, including both statistical and computational methods. The aim was to evaluate the instantaneous energy consumption and recuperation under different operational conditions of the buses. The methods range from linear models, which provide a simplified view of the system, to advanced neural networks, which enable capturing complex non-linear dependencies. The following subsections describe the tools in detail.
4.1. Linear Model
Let
denote a dataset, where
denotes the energy consumed during 1 s of measurement (Wh),
is the average vehicle speed (
),
acceleration
, and
is the number of batteries installed in the bus. Since the variable describing the number of batteries is a qualitative variable, we choose 1 battery with a pantograph as the reference level. Speed and acceleration are the main factors influencing the amount of energy consumed and recovered, which is why four vehicle states were distinguished. Therefore, the vehicle’s journey is described by its stay in the states. We distinguish between four states:
—acceleration,
—braking,
—driving, and
—stop. Therefore, a function
of the form was constructed
The value denotes the minimum vehicle speed below which we assume that the bus is in state S, and is the absolute value of acceleration. If the bus speed exceeds and acceleration is below the level—, we assume that the vehicle is in state B (braking). If the speed exceeds and acceleration exceeds , we assume that the vehicle is in state A (acceleration). When the speed exceeds and the absolute value of acceleration is below , then we accept that the vehicle is in state D (driving).
To check the influence of the number of batteries installed in the bus, speed, and acceleration on the IECR at each moment
,
, we consider a linear model as follows:
where the predictors
linearly influence the size of IECR, and
for
and
, while external factors’ influence is represented by a random variable with a normal distribution
.
Parameter
corresponds to the intercept in the model for the case of a bus with one battery and is in a state of acceleration, and
is responsible for the change in IECR for the state of braking.
is the state of driving,
is the for the state of stop,
is the change in IECR for a bus with four batteries, and
for a bus with eight batteries. The remaining parameters in model (1) are responsible for the vehicle dynamics influence on the instantaneous energy consumption. Therefore, for the training set, we solve the problem
The squares method is used to estimate the structural parameters
[
58,
59]. IECR predictions estimate
4.2. Extended Linear Model Concerning States
Since we use
to determine the vehicle states, we analyzed the linear dependence of battery quantity, speed, and acceleration, as well as the transformation of these variables for each state (acceleration, braking, driving) and the influence of battery quantity on the stop state. The extended linear model (ELM) concerning states is presented as follows:
The structural parameters in (4)–(8) satisfy the constraints. Thus, the problem of estimation of structural parameters in model (4) is a linear quadratic task with constraints, namely, for the acceleration state , for the braking state , for the driving state , and for the stop state .
To estimate the structural parameters in the ELM (4), we solve the problem
where
, and the set of feasible solutions is
. To estimate the significance of the structural parameters, we use the boostrapping technique. Namely, to estimate the distribution of each structural parameter, we perform resampling with replacement for the dataset
and solve the problem (9) based on the sample. By repeating
the sampling process, we obtain sequences of estimators of the structural parameters
,
,
for
and
for
. From the central limit theorem, for
, the sampling distribution tends to the normal distribution.
For each parameter, we determine the mean values and standard deviation for .
We assume that the prediction value of IECR is
where
are the estimates of the structural parameters for Equations (5)–(8). For models (1) and (4), the residuals
denotes the differences between the predicted and empirical values of IECR for
and
denotes the residual vector, while the value
denotes the variance of the residuals, where
denotes the number of structural model’s parameters. To assess the impact of individual predictors [
58,
59] for each structural parameter at the significance level
, we create a null hypothesis.
H0: (the influence of theth factor is insignificant on IECR).
The alternative hypothesis is as follows:
H1: (theth factor significantly affects IECR).
A statistic that describes the ratio of a parameter
to the standard deviation of that parameter
as follows:
There is a t distribution with
degrees of freedom. Because the structural parameters for the ELM (4) can be estimated for Equations (5)–(8) separately, for the states acceleration, braking, and driving, the number of degrees of freedom is
, while for the stop state, the number of degrees of freedom is
. When testing the significance of parameters in Equation (1), the number of degrees of freedom is equal to
. The test probability is as follows:
where
T is a random variable with a t distribution and an appropriate number of degrees of freedom. If
, then at the significance level
, there is no basis for rejecting the hypothesis
. Then, the structural parameter is insignificantly different from zero, and the predictor has a nonsignificant effect on explaining the variability of IECR. If
, at the significance level
, we reject the null hypothesis
in favour of
. Then, the structural parameter is significantly different from zero, and the predictor significantly impacts explaining IECR variability.
4.3. Neural Networks
Neural networks (NNs) were used to analyse IECR. For this purpose, the dataset
is presented in the form
, where
and
. NNs are among the most widely used machine learning techniques and are typically used for both classification and regression modelling [
24,
25,
58,
60,
61,
62], where the difference in the applications of regression or classification problems lies primarily in the selection of the activation function, especially for the last layer of the network. Each NN consists of inputs, weights (parameters), an aggregation function (defined as the dot product of the inputs and weights), an activation function, and outputs. In multilayer networks, the inputs of the first layer are predictors from the training set. However, the inputs of the subsequent layers are defined as the outputs of the activation function of the current layer. The result of the aggregation function of a neural network is sent to the activation function
as follows:
where
denotes the weight vector and
denotes the bias for
. For the input layer, we take
. The output of the last layer (activation of the output layer) is defined as the output obtained from the NN. Thus, from (12), the last layer is defined
The analysed networks used a linear activation function of the form
To identify the regression relationship using a neural network, the task is
where the objective function is defined as Mean Squared Error (MSE). The MSE is estimated as the average value of the squared differences between the actual and predicted values. The result obtained for the network’s last layer is taken as the forecast
. If the predictors are correlated, we can regularise some layers by introducing a case for large values of the structural parameters. Given the above function’s purpose. We can present it in the form of
where
denotes the set of network layers for which we apply regularisation techniques, where
and
denote
and
norms, respectively. For NNs without regularisation, we assume
.
In feed-forward neural networks, the entire input dataset is processed simultaneously. In contrast, recurrent neural networks (RNNs) handle the input sequentially, retaining information about previously processed elements. Through this feedback mechanism, RNNs incorporate the results of earlier iterations into subsequent computations. The backwards propagation algorithm estimates weights and biases, i.e., solves the problem (13).
4.4. Assessment of Model Fit and Prediction
For the analysis of the model fit [
56,
57,
61], the coefficient of determination was estimated
where
denotes the observed value of the dependent variable,
is the predicted value based on the model,
, and
is the mean value of the dependent variable. The coefficient of determination shows how much of the variability in the dependent variable is explained by the model. Additionally, the correlation coefficient between this variable’s actual and predicted values was determined as follows:
where
denotes the mean of the predicted values. To analyse the forecast discrepancies [
58,
59], the following indicators are used:
5. Case Study: Energy Consumption and Recuperation Analysis
During the electric buses’ run, the consumed and recovered energy were analysed in conditions consistent with the SORT procedure. Using a Yokogawa WT-1806 power analyser, the consumed and recovered energy were recorded. The readings as time series
and
present a sequence representing consumed and recovered energy accordingly, and the sequence
presents IECR, where
. The impact of the bus run on consumed and recovered energy was analysed, specifically the speed, vehicle acceleration, and battery capacity. The vehicle’s run was described by its periods in
—acceleration,
—braking,
—driving, and
—stop states, as well as the number of batteries installed in the vehicle. Particular attention was paid to instantaneous energy consumption during acceleration and energy recovery during braking. For each battery count, 10 runs lasting 3 min were performed. High repeatability of the driving conditions was achieved thanks to the driver’s precise driving, who reproduced the speed profile in each run with high compliance with the assumed cycle.
Figure 1a shows the area circled in blue, illustrating the range between the highest and lowest speeds at each test moment, while
Figure 1b shows the standard deviations as a function of cycle time. To facilitate the analysis of journey repeatability,
Figure 1b shows the standard deviation (black curve) of speed measurements during the SORT test, where the states in which the vehicle was moving are marked for each moment.
In the SORT test, the speed pattern reveals recurring intervals of acceleration, uniform-speed operation, deceleration, and halting. The narrow speed range within each phase (
Figure 1a) indicates high repeatability, which is crucial for comparing battery types. The standard deviation values (
Figure 1b) confirm this stability—the lowest deviations occur during constant speed driving and stopping. In contrast, the highest deviations are observed during acceleration and braking, reflecting the natural speed variability during these phases.
An example SORT test run and electricity consumption for a bus with eight batteries are shown in
Figure 2.
The vehicle speed curve (
Figure 2a) reflects a typical SORT cycle, with clearly defined standstill phases, acceleration, constant speed, and braking. Instantaneous energy consumption (
Figure 2b) peaks during intense acceleration, dropping to almost zero during standstill and coasting. Analysis of instantaneous energy recuperation (
Figure 2c) shows significant negative power values during braking, indicating effective energy recovery during these phases. The most significant recuperation potential is observed during the transition from high speed to standstill, which has significant implications for the vehicle’s energy balance.
To evaluate how the number of batteries, acceleration, and speed affect performance, the dataset was split into training (80%) and testing (20%) subsets. The partitioning was performed by vehicle state, with 80% of the records from each state allocated to the training subset and the remaining 20% to the testing subset. This approach decoupled the analysis from the entire trip sequence (time series) and, consequently, from the specific operating conditions of the vehicle.
5.1. Linear Model
Using a linear model (1), we explain the impact of battery capacity, speed, and acceleration on the training set’s IECR. The estimator values, standard deviations of these parameters, the
test statistic (11), and
the test probability for each parameter are presented in
Table 1.
For model (1), the value of the coefficient of determination is 0.7859, which indicates a good fit of the model to the experimental data, with a standard deviation of the residuals of 6.97. Most explanatory variables statistically affect the IECR, including vehicle speed , acceleration , its square , and the interaction of speed with acceleration . The influence of vehicle operating states, such as braking (braking), driving (driving), and standstill (stop), also turned out to be significant, suggesting that driving dynamics significantly shape IECR.
In turn, the number of batteries in the four- and eight-battery configurations is characterised by high test probability values (), indicating a lack of significant effect of this variable on IECR within the adopted linear model. These results suggest that the effect of battery number on energy consumption is only revealed under different operating conditions or is masked by the dominant influence of vehicle motion parameters. For the linear model (1), the residuals were analysed. The graph below shows the histogram, cumulative distribution function, residual autocorrelation, and Q-Q plot (visual verification of the normality postulate of residuals).
Analysis of the residual series
of the linear model (1), based on
Figure 3, indicates the presence of outliers and significant autocorrelation for lags τ = 1 and τ = 2. The distribution of the residuals deviates from normality, as evidenced by the “fat tails” visible in the Q-Q plot and the differences between the empirical and theoretical distribution functions. The histogram and density function reveal asymmetry and a greater concentration of values around zero, but with a few outlying observations. These results suggest that the assumptions regarding normality and independence of the residuals are not fully met, which may indicate the influence of additional factors not accounted for in the model.
We used the Shapiro–Wilk, Cramér–von Mises, Anderson–Darling, Lilliefors (Kolmogorov–Smirnov), D’Agostino Omnibus, and Jarque–Bera tests, as well as the independence of the residuals using the Ljung-Box test for shifts
.
Table 2 provides the statistics and test probability values.
Analysis of the distribution of the linear model residuals revealed significant deviations from normality. All tests performed, Shapiro–Wilk, Cramér–von Mises, Anderson–Darling, Lilliefors (Kolmogorov–Smirnov), D’Agostino Omnibus, Jarque–Bera, and Ljung–Box, yielded test probability values close to zero, which is below the significance level of α = 0.05, so the hypotheses of a normal distribution of residuals should be rejected.
Such consistent results across all tests suggest that the residuals exhibit substantial deviations from normality, which may result from non-linear relationships between variables, the presence of outliers, or heteroscedasticity. The results of the Ljung–Box test additionally indicate the presence of autocorrelation in the residuals, which may indicate the validity of considering models with a different structure, e.g., non-linear or recurrent neural networks.
Then, model (1) was validated on the test set.
Figure 4 shows the actual and predicted values of the IECR.
A comparison of actual and predicted values for instantaneous energy consumption and recovery indicates a good agreement with the linear model concerning the overall trend. Data points are distributed along the red line (the line of perfect agreement between actual and predicted values). However, some scatter is visible, particularly for extreme positive and negative values. This scatter suggests that the model may have limited accuracy in predicting extreme energy consumption and recovery values, which may be due to non-linear relationships not captured by the model. Nevertheless, prediction accuracy is relatively high within the range of average values.
5.2. Extended Linear Model Concerning States
For model (4) for the acceleration state, the values of the estimators, standard deviations of these parameters, the value of
the test statistic (11), and
the test probability for each parameter are presented in
Table 3.
In the case of the linear model describing the acceleration condition, all main variables showed a significant effect on the explained variable, at a significance level of α = 0.05. The parameters of the number of batteries (both four- and eight-battery configurations) are statistically significant, indicating a noticeable effect of the power supply configuration on the IECR value during acceleration. The speed variable , acceleration , and their interactions are characterised by very high statistical values and , values close to zero, confirming their key role in the model. The value for the component is also significant, although with a higher p-value compared to the other predictors. Such a high level of significance for parameters related to driving dynamics suggests that in the acceleration state, the variability of the IECR is strongly dependent on vehicle speed and acceleration, and the effect of battery number, although smaller than that of the motion parameters, remains significant.
For model (4) for the braking state, the values of the estimators, the standard deviations of these parameters, the value
test statistic (11), and
the test probability for each parameter are presented in
Table 4.
For the linear model describing the braking state, most of the parameters were highly statistically significant, and the test probability values were close to zero, which indicates their strong influence on IECR in this driving phase. The configuration of the number of batteries (four- and eight-battery configurations), the variable speed, and the product of velocity and acceleration are significant at a level bordering on absolute statistical certainty.
The structural parameters with acceleration variables and the square of acceleration show higher test probability values, which suggests a minor role of these variables in the energy recovery process during braking compared to the vehicle speed and the interaction of speed and acceleration. The interactive component, in turn, is significant and reflects the intricate interplay of speed and acceleration during energy recuperation.
The results indicate that in the braking state, the dominant factor determining the IECR is the vehicle speed, the product of acceleration and speed, and the number of batteries. In contrast, the influence of acceleration is complementary.
For model (4) for the driving state, the values of the estimators, standard deviations of these parameters, the value
test statistic (11), and
the test probability for each parameter are shown in
Table 5.
Due to the linear model describing the driving state (driving), the analysis indicates that, of all variables, only speed and the interactive term significantly affect IECR (< 0.05). The test probability value for speed is extremely low, , which confirms its dominant influence on IECR in the steady-state driving phase.
In turn, the number of batteries (both four- and eight-battery configurations) and acceleration-related variables ( do not reach statistical significance, suggesting that they have limited significance in this condition. The intercept in the model is also significantly different from zero.
For model (4) for the stop state, the values of the estimators, the standard deviations of these parameters, the value
test statistic (11), and
the test probability for each parameter are presented in
Table 6.
In the model describing the stopped state (stop), the only statistically significant parameter is the intercept (intercept), whose value is positive (.769), and the test probability is 5.463 × 10−63 (below the significance level of 0.05), which indicates that the average energy consumption is 0.769 Wh during the stopped state. Neither the number of batteries in the four- nor eight-battery configuration significantly affects the dependent variable IECR (for these structural parameters, the test probability is above the significance level of 0.05).
Model (4) is characterised by a high value of the coefficient of determination = 0.9124, which means that it reasonably reflects the variability of IECR in the states of acceleration, braking, driving, and stopping, with a low standard deviation of the residuals equal to 4.2648.
For the ELM (4), the residuals were analysed.
Figure 5 presents the histogram, cumulative distribution function, autocorrelation of the residuals, and Q-Q plot.
The analysis of the residuals for model (4) indicates the presence of extreme values in the series
and a significant autocorrelation for the τ shifts ∈ {1, 2}. The histogram and density function reveal a distribution close to normal, although with visible “fat tails”, as confirmed by the Q-Q plot. The empirical distribution function differs from the theoretical normal distribution function, but the agreement is better than the baseline model (1). Statistical tests (Shapiro–Wilk, Cramér–von Mises, Anderson–Darling, Jarque–Bera, Lilliefors/Kolmogorov–Smirnov, D’Agostino Omnibus) confirm deviations from normality, and the Ljung–Box test for shifts 1 ≤ τ ≤ 10 indicates partial dependence between subsequent residuals. The values of the statistics and test probabilities are summarised in
Table 7.
On normality tests (Shapiro–Wilk, Anderson–Darling, Cramér–von Mises, Lilliefors, Jarque–Bera, D’Agostino Omnibus), we see very low test probability values (below the 0.05 significance level), which indicates the rejection of the hypothesis of normality of the residual distribution in the model considering job states. Additionally, the Ljung–Box test confirms the presence of autocorrelation in the residuals. This indicates that model (4) fits the data better than model (1); however, the distribution of the residuals deviates from normality and shows significant time dependence.
Then, model (4) was validated on the test set.
Figure 6 shows the actual and predicted values of the instantaneous energy consumption and recuperation.
The model validation (4) results on the test set demonstrate good agreement between the actual and predicted values of IECR. The points align along the perfect fit line (red line), confirming high prediction accuracy. However, a greater discrepancy is visible at the extreme values, possibly due to the smaller number of observations in these ranges and non-linear effects not captured by the linear model.
5.3. Neural Network
For the neural network without regularisation (
,
) and with the dropout technique applied (20%), the dependency model is presented in
Table 8.
The neural network model consists of five layers: an input layer with 11 features, two dense layers with ten and five neurons, respectively, a dropout layer to reduce the risk of overfitting, and an output layer with a single neuron. All dense layers use a linear activation function, which is justified by the nature of the regression problem. The total number of parameters is 181.
On the training set, the coefficient of determination
for the NN is 0.9059, while the standard deviation of the residuals is 4.4332. The residuals were analysed for the neural network, and the visual analysis is presented in
Figure 7.
The figure shows the occurrence of extreme values in a series of residuals
and a significant correlation with lag
. The Q-Q plot reveals “fat tails”, and comparing the empirical and theoretical (normal) distribution functions indicates significant deviations from the normal distribution. The normality of the residual distribution was verified using the Shapiro–Wilk, Anderson–Darling, Cramér–von Mises, Lilliefors (KS), Jarque–Bera, and D’Agostino Omnibus tests, and independence was verified using the Ljung–Box test for 1 ≤ τ ≤ 10. Detailed results are presented in
Table 9.
Table 9 presents the results of eight statistical tests (normality and autocorrelation) for the neural network model residuals. For each test, the test probability value is significantly below the 0.05 significance level, indicating rejection of the null hypothesis of normality in the residuals. The results of the Jarque–Bera, D’Agostino Omnibus, and Ljung–Box tests confirm that the residuals exhibit both significant deviations from normality and autocorrelation. The neural network model presented in
Table 8, as well as models (1) and (4), do not fully reflect the data’s variability structure.
Figure 8 compares actual and predicted values for IECR obtained from the NN model. A strong correlation is visible between the observed data and the predictions, with most points falling along the red line (the line of perfect fit), confirming the model’s high agreement with reality. Deviations from the red line mainly concern extreme values, where greater scatter in the predictions appears.
5.4. Recurrent Neural Network
For the recurrent neural network without regularisation and with the dropout technique (20%), the dependency model is presented in
Table 10.
Table 10 shows the detailed architecture of the recurrent neural network without regularisation, which uses a 20% dropout technique. The table shows the type and order of layers, the shape of the output data, the number of trainable parameters, and the activation functions used in each layer. The total number of model parameters is 531, including weights and biases of all layers.
On the training set, the coefficient of determination
for the RNN is 0.9343, while the standard deviation of the residuals is 3.7047. The residuals were also analysed for the neural network.
Figure 9 presents the histogram, cumulative distribution function, Q-Q plot, and autocorrelation of the residuals.
The residuals reveal the presence of extreme values in the residual series
and significant autocorrelation for the shifts τ ∈ {1, 2, 5… 12}. The Q–Q plot indicates the presence of “fat tails”, and comparing cumulative distribution functions confirms apparent differences between the theoretical and empirical normal distributions. The normality of the residual distribution was verified using the Shapiro–Wilk, Cramér–von Mises, Anderson–Darling, Lilliefors (Kolmogorov–Smirnov), Jarque–Bera, and D’Agostino Omnibus tests, while the independence of the residuals was checked using the Ljung–Box test for shifts 1 ≤ τ ≤ 10. The results of the statistics and test probabilities are shown in
Table 11.
Table 11 shows the results of normality tests and correlation tests for the residuals of the RNN for the Shapiro–Wilk, Cramér–von Mises, Anderson–Darling, Lilliefors (Kolmogorov–Smirnov), Jarque–Bera, D’Agostino Omnibus, and Ljung–Box tests. All test probability values are below the 0.05 significance level, indicating a significant deviation of the residual distribution from normality and correlation in the time series.
Figure 10 compares actual and predicted instantaneous energy consumption values obtained from the RNN. The distribution of points along the perfect fit line indicates a high degree of agreement between the predictions and the measurements. However, a greater scatter is visible for the extreme values, particularly in high and low energy consumption areas.
Figure 11 shows the speed and quality of learning for the neural network models. The batch was divided into two parts for each epoch: 85% was used for training the network and 15% was used for validation. The training process involved 200 epochs.
Figure 11 shows the training curves of a classical NN and RNN, along with their corresponding validation curves. Both models exhibit a sharp decline in the Mean Squared Error in the initial epochs, followed by a stabilisation at a low level after approximately 50 epochs. This curve indicates an effective model fit and no signs of overfitting.
5.5. Prediction Comparison
To compare the predictions of the models on the test set, the correlation coefficient (
) between the actual and predicted values was estimated. Instantaneous energy consumption and recuperation, Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and Mean Absolute Error (MAE) were evaluated. The values these coefficients (16)–(19) represent are shown in
Table 12.
Table 12 compares the prediction quality of four models: linear, extended linear, neural network, and recurrent neural network. The best prediction results were obtained for the recurrent neural network, characterised by the highest correlation coefficient (r = 0.9666) and the lowest error values (MSE = 13.72; RMSE = 3.70; MAE = 2.24), indicating its highest accuracy in representing the test data. The Taylor diagram illustrates the graphical agreement between the models and the reference data.
The Taylor diagram (
Figure 12) illustrates the fit of four models: linear model, extended linear model, classical neural network, and recurrent neural network (RNN). Both neural models have the highest correlation coefficient (above 0.95) and a standard deviation close to the reference value, indicating greater precision in representing the data than linear models.
6. Discussion of the Results
During SORT tests, the analysis of IECR in electric buses revealed a clear impact of both driving parameters (speed, acceleration) and battery configuration on vehicle energy efficiency. The obtained results confirm observations from the literature that driving profile—particularly acceleration intensity and frequency—is a key factor determining instantaneous energy consumption [
40,
41].
A comparison of three vehicle configurations (one battery with a pantograph, four batteries, eight batteries) showed that increasing the number of batteries. Therefore, vehicle weight leads to a noticeable increase in energy consumption during acceleration. This effect is consistent with previous studies, which indicate a significant role of the total vehicle weight in shaping energy losses, especially on routes with frequent speed changes [
42,
43]. At the same time, larger battery capacity promotes range extension, but, as emphasised by Yin et al. [
48], this increase becomes increasingly inefficient above a certain threshold, and excessive weight increases can negatively impact the overall energy balance.
Regarding energy recovery, the obtained results confirm that its effectiveness is closely related to braking dynamics. Intensive braking phases generated higher energy recovery, which is consistent with the results of studies that strategies based on higher braking force values allow for the recovery of 25–51% of kinetic energy [
15,
48]. For the cases examined, the ratio of recovered to consumed energy corresponded to values reported in the literature. Nevertheless, refinements to the braking strategy, such as the application of fuzzy control or threshold algorithms, may further raise this indicator and improve the efficiency of the system as a whole [
63].
The applied modelling approaches confirmed that non-linear models (NNs and RNNs) better represent the complex relationships between IECR and driving parameters than linear models. Higher values of the coefficient of determination and lower prediction errors (RMSE, MAE) for neural networks indicate their greater ability to capture non-linearities characteristic of real-world driving profiles. These results are consistent with the observations of other authors, according to which recurrent architectures (LSTM, GRU) provide perfect accuracy in the analysis of temporal data in transport [
37,
38]. The extended linear model, concerning vehicle states, illustrates the dependencies between the vehicle driving dynamics, the number of batteries installed in the bus, and NN models.
Analysis of the impact of driving states revealed that the most significant differences between linear and non-linear models occurred during acceleration phases, where power demand is highest. These differences were less significant during constant speed and standstill phases, confirming that the main benefits of advanced modelling are related to conditions of high-speed variability. These results fit into the broader literature context, which indicates the need for adaptive, scenario-specific predictive models in public transport [
4].
The strict implementation of the speed profile consistent with the SORT methodology ensured the high repeatability of the measurement results, which enables direct comparisons between the tested variants. SORT, as a method for assessing the energy efficiency of entire vehicles in near-real-world conditions, remains an indispensable tool in research on public transport optimisation [
4,
5].
Based on the present findings, the most critical next step for validating and deploying the proposed modelling approach is systematically collecting and integrating real-world operational data. While SORT tests ensure high repeatability and provide reliable benchmarks, they cannot fully capture the stochastic variability of urban traffic, driver behaviour, and environmental conditions. Extending the models with operational datasets would allow for assessing their robustness in diverse scenarios and strengthening their applicability to fleet-level decision-making, including scheduling and charging optimisation. Testing under different climatic conditions and accounting for operational factors such as breakdowns, defects, or battery degradation remain important complementary directions; however, immediate priority should be given to verifying model fidelity against in-service data.
In summary, the obtained results confirm the following:
The number of batteries significantly influences the instantaneous energy consumption, especially during dynamic driving phases.
The effectiveness of recuperation depends on the braking strategy and can be increased by implementing advanced control methods.
The extended linear model concerning states is more straightforward to interpret and simple to adapt for IECR prediction; on the other hand, the quality of prediction is comparable to neural networks.
Neural network models are more effective than classical linear models in predicting IECR, especially under conditions of high-speed variability.
Standardisation of test conditions (SORT) is crucial for reliable comparison of configurations and energy efficiency evaluation.
7. Conclusions
The analysis was conducted to compare the effectiveness of linear models and neural networks, including recurrent architectures, in predicting instantaneous energy consumption and recuperation. The linear models, both the baseline (1) and the extended model with state variables (4), achieved coefficients of determination of 0.7859 and 0.9124, respectively, in the extended version. However, parameter analysis revealed that not all explanatory variables were statistically significant for the classic model—for example, the number of batteries, whose effect on IECR was insignificant. It is worth emphasising that the extended linear model showed that vehicle dynamics and battery number may be crucial for estimating the IECR prediction for different states. Analysis of the residuals revealed the presence of outliers, significant time correlations in the range τ ∈ {1,…,12}, and apparent deviations from the normality of the distribution, as confirmed by the Shapiro–Wilk, Anderson–Darling, Lilliefors, Cramér–von Mises, Jarque–Bera, and D’Agostino Omnibus tests, while the Ljung–Box test additionally indicated the lack of independence of the residuals.
Using a classical neural network allowed for a significantly higher coefficient of determination (around 0.91) with a lower standard deviation of the residuals. The values of for the extended linear model concerning states and the neural network models are very similar. Fit plots confirmed excellent agreement of the forecasted values with the actual data, especially in the range of average loads. However, analysis of the residuals still revealed the presence of extreme values and “fat tails” of the distribution and temporal correlations for selected delays. Introducing a recurrent architecture (RNN) further improved the accuracy of short-term forecasts, especially during rapid load changes and transitions between energy consumption and recuperation phases. Fit plots for the RNN were characterised by minimal phase shifts relative to the actual data, indicating a good ability to represent the dynamics of the processes. However, “fat tails” and some temporal correlations were still observed in the residuals for selected delays.
A comparison of the model fit and stability based on the Taylor diagram and summary indices demonstrated the advantage of neural models over linear models. NN models, particularly RNNs, achieved better correlation with measured data, lower RMSD errors, and minor shifts in the amplitude of IECR changes. The neural network training process was stable over 200 epochs, with the data divided into training (85%) and validation (15%), which avoided overfitting. The results indicate that the most effective approach for applications requiring high-precision representation of instantaneous IECR values is to use neural architectures, especially recurrent ones, due to their ability to model temporal dependencies. Linear models are more easily interpretable and can be used in simplified cases requiring low computational complexity; however, their limited flexibility translates into larger fitting errors. However, concerning states, the extended linear model achieved prediction accuracy comparable to that of neural networks. Regardless of the method used, it may be important to implement techniques that limit the influence of outliers and eliminate temporal correlations in the residuals. At the same time, further research may include expanding the set of variables with additional parameters describing the vehicle state and environmental conditions, as well as testing hybrid architectures combining RNNs with attention mechanisms.