Back to search

Chalmers University of Technology

Energy consumption prediction for electric buses using machine learning

Abstract

dc:description.abstract

With the increased adoption of electric buses, understanding their energy consumption (EC) has become crucial. For stakeholders such as city planners and bus company owners, having accurate predictions of energy consumption is essential for effective planning and resource allocation. Thus, identifying the relevant data to be collected for accurate predictions is of high importance. Machine learning models have emerged as the most promising tools for predicting energy consumption, offering the precision and reliability needed by stakeholders. Hence, this report aims to forecast energy consumption in electric buses by finding the important features in energy consumption and then exploring a suitable machine learning technique for the given data. Additionally, the report compares the selected model of Multilayered Perceptron Nueral Network (MLPNN) with two other models and assesses the impact of temporal factors on energy consumption predictions. To achieve this purpose, first, feature selection is conducted using correlation analysis and multicollinearity checks via the Variance Inflation Factor (VIF). The base MLPNN model is constructed using the Keras library in Python, with hyperparameter optimisation performed using GridSearch from the sklearn library. Afterward, the performance of the MLPNN model is compared to that of two other models: Random Forest (RF) and Extreme Gradient Boosting (XGB), using standard metrics such as Mean Square Error (MSE) and Mean Absolute Error (MAE). Feature importance is evaluated for each model, with the MLPNN model assessed using SHapley Additive exPlanations (SHAP). Temporal effects on features are also analysed. The features deployed in the model are: ’total mileage’, ’speed’, ’AC switch’, ’outside temperature’, ’inside temperature’, ’run mileage’, ’run duration’, ’bus ID’ and ’time category’. The optimal hyperparameters for the MLPNN model are: batch size of 20, 100 epochs, Stochastic Gradient Descent (SGD) optimizer, Rectified Linear Unit (ReLU) activation function, learning rate of 0.01, 2 hidden layers, 32 neurons per layer, and no regularisation. The evaluation shows that the MLPNN model, using the selected features and optimised hyperparameters, does not outperform the RF and XGB models in terms of MAE and MSE. Feature importance analysis reveals that while MLPNN provides stable importance measures, RF and XGB models are dominated by a single feature: a run mileage (the Euclidean distance between the origin and destination of trips) of over 50%. And secondly, run duration with 20%. SHAP analysis suggests that Run duration and run mileage are most significant for MLPNN as well. When examining the temporal impact on features, no features are impacted by time, contrary to initial expectations that speed would show a substantial temporal effect. The study concludes that the MLPNN model, as constructed, is not significantly better than simpler models in predicting the energy consumption of electric buses for the given dataset. However, there is potential for improvement with additional features or more training data. Future research should explore the inclusion of other relevant features and larger datasets to enhance model performance.

Degree

thesis:*
Level thesis:degree_level
H
Department dc:contributor.department
Chalmers tekniska högskola / Institutionen för arkitektur och samhällsbyggnadsteknik (ACE)
Year dc:date.issued
2024

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Wise, Antonia
Advisor dc:contributor.supervisor
  • Gao, Kun
Committee member dc:contributor.committeemember
  • Gao, Kun

Subjects

dc:subject × 9

Rights

Language dc:language.iso
eng

Identifiers

dc:identifier.*
Dc Identifier Coursecode
ACEX30

Chain of custody

source
Harvested from
Chalmers University of Technology
Base URL
odr.chalmers.se/oai/request
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
citation

Wise, Antonia. Energy consumption prediction for electric buses using machine learning. H thesis, 2024. https://hdl.handle.net/20.500.12380/308070