Predicting Electrical Load Demand Using Bagging Ensemble of Multi-Layer Perceptron and Adjusted Long Short-Term Memory with Metaheuristic Methods

Document Type : Research paper

Authors

Department of Information Technology Management, Science and Research Branch, Islamic Azad University, Tehran, Iran.

Abstract

Effective prediction of electric power demand is critical for maintaining the stability and reliability of the energy supply in both residential and industrial sectors. Accurate energy demand forecasting is essential for balancing consumption needs with grid stability. However, the complexity of energy consumption data, influenced by a variety of factors, makes this forecasting challenging. Traditional methods often struggle to capture the intricacies of such complex data, highlighting the need for more advanced and adaptable approaches. In this research, we propose a novel solution based on a Bagging ensemble of Multi-Layer Perceptron (MLP) and Long Short-Term Memory (LSTM) networks, combined through a voting mechanism to improve the accuracy and generalization ability of the model. Metaheuristic methods, including Particle Swarm Optimization (PSO) and the Genetic Algorithm (GA), are employed for optimal hyperparameter tuning of the LSTM. Unlike many existing studies that rely on proprietary or limited datasets, this approach uses publicly available data from the Electric Power Consumption dataset of Tetouan city (01-01-2017 to 12-31-2017), making it more accessible and applicable to broader contexts. It also enhances prediction performance by combining the results of multiple models, allowing for a more robust and accurate prediction of energy consumption. Experimental results demonstrate that the proposed approach significantly outperforms existing machine learning and deep learning methods.

Keywords

Main Subjects


  1. M. M. Forootan, I. Larki, R. Zahedi, and A. Ahmadi, “Machine learning and deep learning in energy systems: A review,” Sustainability, vol. 14, no. 8, p. 4832, 2022.
  2. N. Kumar, S. Dahiya, and K. Singh Parmar, “Multi-objective economic emission dispatch optimization strategy considering battery energy storage system in islanded microgrid,” J. Oper. Autom. Power Eng., vol. 12, no. 4, pp. 296–311, 2024.
  3. R. Tugay and S. G. Oguducu, “Demand prediction using machine learning methods and stacked generalization,” arXiv preprint, 2020.
  4. D. Kontogiannis, D. Bargiotas, A. Daskalopulu, A. I. Arvanitidis, and L. H. Tsoukalas, “Structural ensemble regression for cluster-based aggregate electricity demand forecasting,” Electr., vol. 3, no. 4, pp. 480–504, 2022.
  5. D. Mhlanga, “Artificial intelligence and machine learning for energy consumption and production in emerging markets: A review,” Energies, vol. 16, no. 2, p. 745, 2023.
  6. S. Kapp, J.-K. Choi, and T. Hong, “Predicting industrial building energy consumption with statistical and machinelearning models informed by physical system parameters,” Renew. Sustain. Energy Rev., vol. 172, p. 113045, 2023.
  7. C. Li, Z. Ding, D. Zhao, J. Yi, and G. Zhang, “Building energy consumption prediction: An extreme deep learning approach,” Energies, vol. 10, no. 10, p. 1525, 2017.
  8. A. I. Grimaldo and J. Novak, “Combining machine learning with visual analytics for explainable forecasting of energy demand in prosumer scenarios,” Procedia Comput. Sci., vol. 175, pp. 525–532, 2020.
  9. E. U. Haq, X. Lyu, Y. Jia, M. Hua, and F. Ahmad, “Forecasting household electric appliances consumption and peak demand based on hybrid machine learning approach,” Energy Rep., vol. 6, pp. 1099–1105, 2020.
  10. F. Lazzari, G. Mor, J. Cipriano, E. Gabaldon, B. Grillone, D. Chemisana, et al., “User behaviour models to forecast electricity consumption of residential customers based on smart metering data,” Energy Rep., vol. 8, pp. 3680–3691, 2022.
  11. S. H. Almuhaini and N. Sultana, “Forecasting long-term electricity consumption in saudi arabia based on statistical and machine learning algorithms to enhance electric power supply management,” Energies, vol. 16, no. 4, p. 2035, 2023.
  12. J. Lee and Y. Cho, “National-scale electricity peak load forecasting: Traditional, machine learning, or hybrid model?,” Energy, vol. 239, p. 122366, 2022.
  13. R. Khalid, N. Javaid, F. A. Al-Zahrani, K. Aurangzeb, E.-u.-H. Qazi, and T. Ashfaq, “Electricity load and price forecasting using jaya-long short term memory (jlstm) in smart grids,” Entropy, vol. 22, no. 1, p. 10, 2019.
  14. T. Singh, A. Solanki, S. K. Sharma, N. Jhanjhi, and R. M. Ghoniem, “Grey wolf optimization based cnn-lstm network for the prediction of energy consumption in smart home environment,” IEEE Access, 2023.
  15. J. Hoxha, M. Y. Çodur, E. Mustafaraj, H. Kanj, and A. El Masri, “Prediction of transportation energy demand in türkiye using stacking ensemble models: Methodology and comparative analysis,” Appl. Energy, vol. 350, p. 121765, 2023.
  16. T. Balachander, S. A. Khot, R. Huseyn, S. Garg, S. Vijay, and V. Pandey, “An innovative method for short term electrical load forecasting based on adaptive cnn-mrmr model,” in Proc. Int. Conf. Electron., Comput., Commun. Control Technol., IEEE, 2024.
  17. G.-Q. Zheng, L.-R. Kong, Z.-E. Su, M.-S. Hu, and G.D. Wang, “Approach for short-term power load prediction utilizing the iceemdan–lstm–tcn–bagging model,” J. Electr. Eng. Technol., vol. 20, no. 1, pp. 231–243, 2025.
  18. H. Lian, Y. Ji, M. Niu, J. Gu, J. Xie, and J. Liu, “A hybrid load prediction method of office buildings based on physical simulation database and lightgbm algorithm,” Appl. Energy, vol. 377, p. 124620, 2025.
  19. M. S. Bakare, A. Abdulkarim, A. N. Shuaibu, and M. M. Muhamad, “A hybrid long-term industrial electrical load forecasting model using optimized anfis with gene expression programming,” Energy Rep., vol. 11, pp. 5831–5844, 2024.
  20. M. Abumohsen, A. Y. Owda, and M. Owda, “Electrical load forecasting using lstm, gru, and rnn algorithms,” Energies, vol. 16, no. 5, p. 2283, 2023.
  21. M. Shahriyari and H. Khoshkhoo, “A deep learning-based approach for comprehensive rotor angle stability assessment,” J. Oper. Autom. Power Eng., vol. 10, no. 2, pp. 105–112, 2022.
  22. N. Almuratova, M. Mustafin, K. Gali, M. Zharkymbekova, D. Chnybayeva, and M. Sakitzhanov, “Enhancing microgrid resilience with lstm and fuzzy logic for predictive maintenance,” J. Oper. Autom. Power Eng., vol. 12, pp. 1–20, 2024.

Articles in Press, Corrected Proof
Available Online from 06 October 2025
  • Receive Date: 17 July 2024
  • Revise Date: 30 March 2025
  • Accept Date: 30 April 2025
  • First Publish Date: 06 October 2025