FORECASTING THE ELECTRICITY CONSUMPTION USING AN ENSEMBLE OF MACHINE LEARNING MODELS

2024;
: 20–29
https://doi.org/10.23939/ujit2024.02.020
Received: August 19, 2024
Accepted: November 19, 2024
1
Lviv Polytechnic National University, Software Development Department
2
Lviv Polytechnic National University, Software Engineering Department

The use of machine learning models for electricity consumption prediction for smart grid has been investigated. It was found that data pre-processing can improve the performance of the energy consumption prediction model, while machine learning algorithms can improve model prediction accuracy through the integration of multiple algorithms and hyperparameter optimization. It was found that the ensemble learning method can provide better prediction accuracy than each individual method by combining the strong features of different methods that have different structural characteristics. Based on this idea, a choice of basic models with different structures was offered – linear, recursive, tree-like. We have used for research publicly available dataset containing time series of electric power demand and weather data. The influence of climatic characteristics on the predicted value (electric power demand) was studied, correlation and autocorrelation analysis were carried out. Individual basic models for electric power demand prediction were built and trained using Autoregression, Support Vector Regression, Random Forest, Long Short-Term Memory and Extreme Gradient Boosting. Then testing of forecasting errors (Root Mean Squared Error, Mean Absolute Error, Mean Absolute Percentage Error) between actual power consumption and predicted values ​​was carried out. Optimization of the hyperparameters of each weak learner of the integrated model was carried out using the grid search method. An ensemble model (strong learner) for forecasting electricity consumption based linear combination of several basic models' forecasts (weak learners) with weighting coefficients was presented. The weighting coefficients of individual models' forecasts have been established and then optimized using the root-mean-square error loss function with the sequential least-squares optimization algorithm. It was established that the proposed ensemble model for forecasting electricity consumption showed smaller error metrics compared to individual basic models.

Therefore, the results demonstrated the effectiveness of our proposed ensemble model, it can be used to predict electricity consumption with greater accuracy and outperform the individual models with different structure, considering each base models' advantages.

1. Luo, X., & Oyedele, L. O. (2022). A self-adaptive deep learning model for building electricity load prediction with moving horizon. Machine Learning with Applications, 7, 100257. https://doi.org/10.1016/j.mlwa.2022.100257

2. Sanzana, M. R., Maul, T., Wong, J. Y., Abdulrazic, M. O. M., & Yip, C.-C. (2022). Application of deep learning in facility management and maintenance for heating, ventilation, and air conditioning. Automation in Construction, 141, 104445. https://doi.org/10.1016/j.autcon.2022.104445

3. Liu, H., Liang, J., Liu, Y., & Wu, H. (2023). A Review of Data-Driven Building Energy Prediction. Buildings, 13(2), 532. https://doi.org/10.3390/buildings13020532

4. Salam, A., & Hibaoui, A. E. (2018). Comparison of Machine Learning Algorithms for the Power Consumption Prediction: Case Study of Tetouan city. 2018 6th International Renewable and Sustainable Energy Conference (IRSEC), 1‑5. https://doi.org/10.1109/IRSEC.2018.8703007

5. Abdulwahed Salam, A. E. H. (2018). Power Consumption of Tetouan City Dataset. UCI Machine Learning Repository. https://doi.org/10.24432/C5B034

6. Shapi, M. K. M., Ramli, N. A., & Awalin, L. J. (2021). Energy consumption prediction by using machine learning for smart building: Case study in Malaysia. Developments in the Built Environment, 5, 100037. https://doi.org/10.1016/j.dibe.2020.100037

7. Faiq, M., Geok Tan, K., Pao Liew, C., Hossain, F., Tso, C.-P., Li Lim, L., Khang Wong, A. Y., & Mohd Shah, Z. (2023). Prediction of energy consumption in campus buildings using long short-term memory. Alexandria Engineering Journal, 67, 65‑76. https://doi.org/10.1016/j.aej.2022.12.015

8. Wang, Z., Hong, T., & Piette, M. A. (2020). Building thermal load prediction through shallow machine learning and deep learning. Applied Energy, 263, 114683. https://doi.org/10.1016/j.apenergy.2020.114683

9. Miraki, A., Parviainen, P., & Arghandeh, R. (2024). Electricity demand forecasting at distribution and household levels using explainable causal graph neural network. Energy and AI, 16, 100368. https://doi.org/10.1016/j.egyai.2024.100368

10. Hammoudeh, A., & Dupont, S. (2022). The prediction of residential building consumption using profiling and time encoding. Procedia Computer Science, 210, 7‑11. https://doi.org/10.1016/j.procs.2022.10.113

11. Jogunola, O., Adebisi, B., Hoang, K. V., Tsado, Y., Popoola, S. I., Hammoudeh, M., & Nawaz, R. (2022). CBLSTM-AE: A Hybrid Deep Learning Framework for Predicting Energy Consumption. Energies, 15(3), 810. https://doi.org/10.3390/en15030810

12. Geche, F., Batyuk, A., Mulesa, O., & Voloshchuk, V. (2020). The Combined Time Series Forecasting Model. 2020 IEEE Third International Conference on Data Stream Mining & Processing (DSMP), 272‑275. https://doi.org/10.1109/DSMP47368.2020.9204311

13. Vyshnevskyy, O., & Zhuravchak, L. (2023). Semantic Models for Buildings Energy Management. 2023 IEEE 18th International Conference on Computer Science and Information Technologies (CSIT), 1‑4. https://doi.org/10.1109/CSIT61576.2023.10324108

14. Yakovyna, V. S., & Symets І.І. (2021). Software defect prediction using neural network ensemble. Scientific Bulletin of UNFU, 31(6), 104-111. https://doi.org/10.36930/40310616

15. Li, Z., Qian, X., Li, L., & Xia, Z. (2024). Time series prediction model based on autoregression weight network. Engineering Reports, 6(4), e12756. https://doi.org/10.1002/eng2.12756

16. Manno, A., Intini, M., Jabali, O., Malucelli, F., & Rando, D. (2024). An ensemble of artificial neural network models to forecast hourly energy demand. Optimization and Engineering. https://doi.org/10.1007/s11081-024-09883-7

17. Tsalikidis, N., Mystakidis, A., Tjortjis, C., Koukaras, P., & Ioannidis, D. (2024). Energy load forecasting: One-step ahead hybrid model utilizing ensembling. Computing, 106(1), 241‑273. https://doi.org/10.1007/s00607-023-01217-2

18. AlKandari, M., & Ahmad, I. (2024). Solar power generation forecasting using ensemble approach based on deep learning and statistical methods. Applied Computing and Informatics, 20(3/4), 231‑250. https://doi.org/10.1016/j.aci.2019.11.002

19. Wu, N., Green, B., Ben, X., & O'Banion, S. (2020). Deep Transformer Models for Time Series Forecasting: The Influenza Prevalence Case (arXiv:2001.08317). arXiv. http://arxiv.org/abs/2001.08317

20. Liu, D., & Wang, H. (2024). Time series analysis model for forecasting unsteady electric load in buildings. Energy and Built Environment, 5(6), 900‑910. https://doi.org/10.1016/j.enbenv.2023.07.003