Published July 19, 2026 | Version v1

An IoT and AI-Based Framework for Real-Time Energy Monitoring and Cost Forecasting

Description

Developing countries are increasingly transitioning to continuous 24/7 electricity supply through multi-tier tariff systems. While improving reliability, this transition imposes a financial strain on consumers struggling to manage real-time consumption. This paper proposes a novel IoT-based Demand Side Management (DSM) and Short-Term Load Forecasting (STLF) framework utilizing an inexpensive Raspberry Pi 3 Model B edge gateway. The system was validated using high-resolution field measurements from the Runaki project in Zakho, Kurdistan, collected between December 1, 2025, and April 1, 2026. Among the four regression algorithms evaluated—Linear Regression, SVR, XGBoost, and Random Forest—the Random Forest model demonstrated superior performance, achieving a Root Mean Square Error (RMSE) of 0.1152 kW and an R-squared (R2) of 0.9858.

Files

43.pdf

Files (789.2 kB)

Name Size Download all
md5:c5a1b0c251fb2dcc65b8a0b10dd30bfb
789.2 kB Preview Download

Additional details

References

  • Farhangi, H. The Path of the Smart Grid. IEEE power and energy magazine 2009, 8, 18–28. DOI: https://doi.org/10.1109/MPE.2009.934876 Mills, R.; Salman, M. Powering Iraq: Challenges Facing the Electricity Sector in Iraq; FES, 2020; پڕۆژەی ڕووناکی Available online: https://runaki.gov.krd/ (accessed on 17 February 2026). Ghasempour, A. Internet of Things in Smart Grid: Architecture, Applications, Services, Key Technologies, and Challenges. Inventions 2019, 4, 22. DOI: https://doi.org/10.3390/inventions4010022 Marjani, M.; Nasaruddin, F.; Gani, A.; Karim, A.; Hashem, I.A.T.; Siddiqa, A.; Yaqoob, I. Big IoT Data Analytics: Architecture, Opportunities, and Open Research Challenges. ieee access 2017, 5, 5247–5261. DOI: https://doi.org/10.1109/ACCESS.2017.2689040 Jubber Nadaf, A.K.; Patil, V.; Mathiyalagan, P.; Naik, S.L.; Indira, R. A Privacy‑Preserving Edge Intelligence Framework for Real‑Time Multimodal Threat Detection in Smart Urban Surveillance Systems. Proceedings Copyright 117, 123. DOI: https://doi.org/10.5220/0013858400004919 Shi, W.; Cao, J.; Zhang, Q.; Li, Y.; Xu, L. Edge Computing: Vision and Challenges. IEEE internet of things journal 2016, 3, 637–646. DOI: https://doi.org/10.1109/JIOT.2016.2579198 Jendritz, S. Design, Fabrication, and Testing of a 3D Image Reconstruction Process, WORCESTER POLYTECHNIC INSTITUTE, 2018. Biglari, A.; Tang, W. A Review of Embedded Machine Learning Based on Hardware, Application, and Sensing Scheme. Sensors 2023, 23, 2131. DOI: https://doi.org/10.3390/s23042131 Yuniarto, H.A.; Normasari, N.M.E.; Gunawan, I.C.; Silalahi, S.F.; Deendarlianto; Aditya, I.A.; Simaremare, A.A.; Haryadi, F.N. Customer's Response to Dynamic Pricing in Utility Energy Tariff Quality and Reliability with the Time of Use: An Empirical Case Study of Household Electricity Customers in Indonesia. Heliyon 2024, 10, e31415, doi:10.1016/j.heliyon.2024.e31415. DOI: https://doi.org/10.1016/j.heliyon.2024.e31415 Salakapuri, R.; Pavankumar, T. A Meta-Learning Framework with Temporal Feature Integration for Electricity Load Forecasting. Energy Inform 2025, 8, 112, doi:10.1186/s42162-025-00572-y. Arsalan, M.; Ayaz, M.; Ali, Y.; Baig, U. AI-Enabled Energy Load Forecasting for Smart Grid 'Management. 2025, 8. Al-Ali, A.-R.; Zualkernan, I.A.; Rashid, M.; Gupta, R.; Alikarar, M. A Smart Home Energy Management System Using IoT and Big Data Analytics Approach. IEEE Transactions on Consumer Electronics 2018, 63, 426–434. DOI: https://doi.org/10.1109/TCE.2017.015014 Hafeez, G.; Alimgeer, K.S.; Khan, I. Electric Load Forecasting Based on Deep Learning and Optimized by Heuristic Algorithm in Smart Grid. Applied Energy 2020, 269, 114915, doi:10.1016/j.apenergy.2020.114915. DOI: https://doi.org/10.1016/j.apenergy.2020.114915 Faruqui, A.; Sergici, S. Dynamic Pricing of Electricity in the Mid-Atlantic Region: Econometric Results from the Baltimore Gas and Electric Company Experiment. J Regul Econ 2011, 40, 82–109, doi:10.1007/s11149-011-9152-5. DOI: https://doi.org/10.1007/s11149-011-9152-5 Kappagantu, R.; Daniel, S.A. Challenges and Issues of Smart Grid Implementation: A Case of Indian Scenario. Journal of Electrical Systems and Information Technology 2018, 5, 453–467. DOI: https://doi.org/10.1016/j.jesit.2018.01.002 Alex, B.; Johnson, M. A Framework for IoT-Enabled Smart Manufacturing for Energy and Resource Optimization. arXiv preprint arXiv:2502.03040 2025. Fontenot, H.; Ayyagari, K.S.; Dong, B.; Gatsis, N.; Taha, A. Buildings-to-Distribution-Network Integration for Coordinated Voltage Regulation and Building Energy Management via Distributed Resource Flexibility. Sustainable Cities and Society 2021, 69, 102832, doi:10.1016/j.scs.2021.102832. DOI: https://doi.org/10.1016/j.scs.2021.102832 Yatagha, R.; Mejri, O.; Waedt, K.; Ruland, C. Assessing the Complexity and Real-Time Performance of Anomaly Detection Algorithms in Resource-Constrained Environments. In Proceedings of the 2024 IEEE 20th International Conference on Intelligent Computer Communication and Processing (ICCP); October 2024; pp. 1–8. DOI: https://doi.org/10.1109/ICCP63557.2024.10793006 Salakapuri, R.; Pavankumar, T. A Meta-Learning Framework with Temporal Feature Integration for Electricity Load Forecasting. Energy Inform 2025, 8, 112, doi:10.1186/s42162-025-00572-y. DOI: https://doi.org/10.1186/s42162-025-00572-y Immadisetty, A. Machine Learning for Real-Time Anomaly Detection. Int. J. Multidiscip. Res. 2022, 6, 1–8. Carrasco-Gonzalez, D.; Sarrias-Mena, R.; Horrillo-Quintero, P.; Llorens-Iborra, F.; Fernandez-Ramirez, L.M. Design and Raspberry Pi-Based Implementation of an Intelligent Energy Management System for a Hybrid AC/DC Microgrid with Renewable Energy, Battery, Ultracapacitor and Hydrogen System. Computers and Electrical Engineering 2025, 123, 110253. DOI: https://doi.org/10.1016/j.compeleceng.2025.110253