Smart Energy Management: A Machine Learning Framework for Predicting Periodic Electricity Demand in a Government Building in Iraq

Authors

DOI:

https://doi.org/10.24203/tf5h8515

Keywords:

Machine Learning, Artificial Intellegence, Energy, LSTM, MAPE, XGBoost, IoT

Abstract

The surge in need for energy management across utility public infrastructure leads to demands of high-resolution forecasting systems, intelligent in particular third world countries like Iraq that often yield storm clouds littered with intermittent energy supply and unavoidably unpredictable inefficiencies. In this study, we present a smart energy management framework based on Machine Learning (ML) methods which predicts periodic electricity consumption in a government building situated in Baghdad. The proposed technique draws from historical electricity consumption data, meteorological data input and factors within operations: equilibrium between residential and noncommercial usage (all day), public holidays and so on. It is not so with traditional methods. Several machine learning models were developed including Long Short-Term Memory (LSTM), XGBoost, and a Combined Ensemble that integrates these two. The ensemble model achieved the best result in terms of prediction accuracy with a Mean Absolute Percentage Error (MAPE) of 3.79% and an R² score of 0.958. This predictive system can in real time predict electricity demand, supports information-based decision making and load management. Moreover, a practical architecture for scalability of the system was designed together with a smart dashboard allowing visualization and alarms. The findings show how localized ML-based systems could greatly enhance energy efficiency in government buildings, and suggest implications for wider points of energy policy and sustainable development. Future extensions will include a focus on multi-building applications, learning models able to adapt and onwards linking up with sensor systems based on the Internet of Things (IoT).

References

1. Kamal, A. R., & Mahmood, T. (2023). Comparative study of building energy prediction in Iraqi regions. Heliyon, 9(3), e13345. https://doi.org/10.1016/j.heliyon.2023.e13345

2. Al-Araji, S. J., and et. al. (2023). Electric energy management system in Iraq: A forecasting model using machine learning. Energy Reports, 9, 418–431. https://doi.org/10.1016/j.egyr.2023.01.045

3. Huang, Y., & Li, F. (2022). Energy efficiency forecasting using IoT and machine learning. IEEE Internet of Things Journal, 9(5), 3475–3484. https://doi.org/10.1109/JIOT.2021.3083937

4. Al-Wattar, Z. A., & Fadhil, H. A. (2023). Smart electricity consumption forecasting for governmental buildings using LSTM and GRU neural networks. International Journal of Electrical and Computer Engineering, 13(1), 88–97. https://doi.org/10.11591/ijece.v13i1.pp88-97

5. Waleed, A., & Kareem, A. (2023). Solar-aware hybrid ML models for public building energy forecasting. Renewable Energy, 210, 432–445. https://doi.org/10.1016/j.renene.2023.01.056

6. Hassan, H. H., & Al-Khazraji, H. R. (2025). Energy forecasting models in Iraqi government facilities using optimized machine learning algorithms. Journal of Cleaner Energy Technologies, 13(2), 220–228. https://doi.org/10.18178/jocet.2025.13.2.1219

7. Abu AlNasr, M., & Samir, E. (2022). Adaptive predictive modeling for urban buildings in Iraq. Journal of Ambient Intelligence and Humanized Computing, 13, 4053–4064. https://doi.org/10.1007/s12652-021-03458-4

8. Zhang, and et al. (2022). A hybrid model based on machine learning and time series decomposition for short-term electricity load forecasting. IEEE Access, 10, 12497–12510. https://doi.org/10.1109/ACCESS.2022.3145452

9. Mohammed, and et al. (2024). Electricity consumption forecasting using ensemble learning in smart buildings. Journal of Building Engineering, 76, 107283. https://doi.org/10.1016/j.jobe.2023.107283

10. Al-Dabbagh, M. A., & Saeed, S. H. (2023). Optimized ML models for energy demand prediction in Middle Eastern climates. Energy Informatics, 6(1), 20. https://doi.org/10.1186/s42162-023-00264-3

11. Dai, and et al. (2023). LSTM-based load forecasting model for building energy consumption. Energy and Buildings, 279, 112647. https://doi.org/10.1016/j.enbuild.2023.112647

12. Chen, L., Xu, Z., & Zhao, W. (2023). Hybrid deep learning models for energy consumption forecasting: A review. Energy and AI, 11, 100207. https://doi.org/10.1016/j.egyai.2023.100207

13. Li, H., and et al. (2022). Deep learning methods in electricity load forecasting: A review. Applied Energy, 310, 118451. https://doi.org/10.1016/j.apenergy.2021.118451

14. Ahmed, S. S., & Hussein, B. (2024). Reinforcement learning in smart building energy systems. Journal of Cleaner Production, 420, 139888. https://doi.org/10.1016/j.jclepro.2023.139888

15. Zhou, X., and et al. (2023). Smart metering, IoT, and ML integration in building energy prediction. Sustainable Cities and Society, 90, 104451. https://doi.org/10.1016/j.scs.2023.104451

16. Basheer, K., & Ali, H. (2024). ML-driven HVAC load prediction for energy optimization. Energy and Buildings, 282, 112771. https://doi.org/10.1016/j.enbuild.2023.112771

17. Murugesan, S., & Duraisamy, A. (2024). Real-time load forecasting using LSTM with attention mechanism. Energy and AI, 14, 100312. https://doi.org/10.1016/j.egyai.2024.100312

18. Ahmad, and et al. (2022). Forecasting hourly electricity consumption using ensemble machine learning models. Energy Reports, 8, 104-116. https://doi.org/10.1016/j.egyr.2022.10.005

19. Sahoo, S. R., & Mohanta, D. K. (2022). Demand-side energy forecasting using hybrid evolutionary and ML algorithms. Renewable and Sustainable Energy Reviews, 158, 112122. https://doi.org/10.1016/j.rser.2022.112122

20. Tanveer, M., & Hassan, T. (2025). AI-based load forecasting for climate-sensitive buildings. Energy Reports, 11, 250–263. https://doi.org/10.1016/j.egyr.2025.02.007

Downloads

Published

2026-02-27

How to Cite

Smart Energy Management: A Machine Learning Framework for Predicting Periodic Electricity Demand in a Government Building in Iraq. (2026). International Journal of Computer and Information Technology(2279-0764), 15(1). https://doi.org/10.24203/tf5h8515

Similar Articles

31-40 of 67

You may also start an advanced similarity search for this article.