A Unified Machine Learning Framework for Smart Grids: Integrating Real-Time Load Forecasting and Multi-Class Fault Diagnosis
Keywords:
Smart Grid, Machine Learning, XGBoost, Load Forecasting, Fault Diagnosis, Predictive Maintenance.Abstract
Modern Power Systems tend to get more complex along with their constant growth. The increasing complexity of modern power grids requires intelligent methods to keep things running reliably and manage energy efficiency. This paper proposes a practical machine learning framework using a single XGBoost-based model that addresses two fundamental challenges in power system management: future load forecasting and proactive fault diagnosis. The dataset contained about 8738 samples, each having 20 features. For load forecasting the model was trained on real smart grid data that includes only weather conditions, wind and solar power output and previous electricity consumption patterns. For load forecasting the proposed XGBoost-based model correctly predicted the future load with high R2 of 90% and was even able to forecast demand reliably for the next 7 days. While for fault detection the module achieved an overall efficiency of 96.11% and a weighted average F1-score of 0.96 and a macro average F1-score of 0.92, successfully distinguishing between Normal Operation, Overload Conditions and Transformer Faults. The training/testing split ratios for both Load Forecasting and Fault Detection are 80:20. For Normal Operations the precision is 0.98 and recall is also 0.98, for Transformer Faults the precision is 0.95 and recall is 0.84, and for Overload Conditions the precision is 0.82 and recall is 0.87. The ROC curves showing an AUC of 1.00 for all three cases means that it can classify all three cases without any error. The experimental results demonstrate that the proposed framework improves prediction accuracy and catches faults earlier than traditional methods. This framework helps power system operators make timely decisions, improve reliability, and reduce operational risks. The proposed model is simple, efficient and suitable for real-world smart grid applications.
References
J. Xie, I. Alvarez-Fernandez, and W. Sun, “A review of machine learning applications in power system resilience,” IEEE Power Energy Soc. Gen. Meet., vol. 2020-August, Aug. 2020, doi: 10.1109/PESGM41954.2020.9282137.
Etimad Fadel, V. C. Gungor, “A survey on wireless sensor networks for smart grid,” Comput. Commun., vol. 71, 2015, [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0140366415003400
X. Fang, S. Misra, G. Xue, and D. Yang, “Smart grid - The new and improved power grid: A survey,” IEEE Commun. Surv. Tutorials, vol. 14, no. 4, pp. 944–980, 2012, doi: 10.1109/SURV.2011.101911.00087.
A. M. Etman, M. S. Abdalzaher, A. A. Emran, A. Yahya and M. Shaaban, “A Survey on Machine Learning Techniques in Smart Grids Based on Wireless Sensor Networks,” IEEE Access, vol. 13, pp. 2604–2627, 2025, doi: 10.1109/ACCESS.2024.3524097.
Tao Hong, Shu Fan, “Probabilistic electric load forecasting: A tutorial review,” Int. J. Forecast., vol. 32, no. 3, pp. 914–938, 2016, [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0169207015001508
C. Roy and D. K. Das, “Improved Demand Side Management Scheme for Renewable-Energy-Integrated Smart Grid with Short-Term Load Forecasting,” J. Control. Autom. Electr. Syst. 2023 351, vol. 35, no. 1, pp. 74–91, Nov. 2023, doi: 10.1007/S40313-023-01047-9.
Seunghyoung Ryu, Jaekoo Noh, “Deep Neural Network Based Demand Side Short Term Load Forecasting,” Energies, vol. 10, no. 1, p. 3, 2017, doi: https://doi.org/10.3390/en10010003.
T. A. Rajaperumal & C. Christopher Columbus, “Enhanced wind power forecasting using machine learning, deep learning models and ensemble integration,” Sci. Rep., vol. 15, 2025, [Online]. Available: https://www.nature.com/articles/s41598-025-05250-3
M. R. Upma Singh, “A Machine Learning-Based Gradient Boosting Regression Approach for Wind Power Production Forecasting: A Step towards Smart Grid Environments,” Energies, vol. 14, no. 6, p. 5196, 2021, doi: https://doi.org/10.3390/en14165196.
Syeda Faiza Nasim, Sidra Aziz, “Fault Detection and Fault Diagnosis in Power System Using AI: A Review,” Sir Syed Univ. Res. J. Eng. Technol., vol. 14, no. 1, pp. 27–32, 2024, doi: 10.33317/ssurj.598.
Prabadevi Boopathy, Madhusanka Liyanage, “Deep learning for intelligent demand response and smart grids: A comprehensive survey,” Comput. Sci. Rev., vol. 51, 2024, [Online]. Available: https://www.sciencedirect.com/science/article/pii/S1574013724000017
G. Gupta, A. Tomar, S. Pamulaparthyvenkata, and A. Balakrishnan, “A Comprehensive Review of Machine Learning Techniques for Smart Grid Optimization,” Secur. Energy Optim. Leveraging Internet Things Artif. Intell. Enhanc. Effic., pp. 29–60, Jan. 2025, doi: 10.1002/9781394271849.CH2.
L. M. A. A.O. ABDULKAREEM, Bilkisu JIMADA-OJUOLAPE, Morufat O. BALOGUN, “Comparative Analysis of Xgboost and Random Forest Algorithms for Transformer Failure Prediction,” Ann. Fac. Eng. Hunedoara – Int. J. Eng., 2024, [Online]. Available: https://annals.fih.upt.ro/pdf-full/2024/ANNALS-2024-4-18.pdf
Patan Ameera Bakshu, Dr. K. Venkataramana, “Improving Grid Resilience Using XG Boost Classifier in Smart Grid System,” Int. J. Sci. Res. Sci. Eng. Technol., vol. 12, no. 3, 2025, doi: 10.32628/IJSRSET2512120.
A. Erturk, W. Dabboussi, K. A. Jbara, V. Simovic, and M. de la Roche, “Leveraging Artificial Intelligence to Promote Sustainability: Employing Machine Learning Techniques in Planning Predictive Maintenance of Wind Energy Systems,” Feb. 2025, doi: 10.20944/PREPRINTS202502.2194.V1.
V. Selvaraj, “A Hybrid AI-ML Framework for Predictive Maintenance and Load Forecasting in Smart Grid Infrastructures,” 3rd Int. Conf. Power Electron. Energy, ICPEE 2025, 2025, doi: 10.1109/ICPEE65973.2025.11411039.
Falah Dakheel, Mesut Çevik, “Optimizing Smart Grid Load Forecasting via a Hybrid Long Short-Term Memory-XGBoost Framework: Enhancing Accuracy, Robustness, and Energy Management,” Energies, vol. 18, no. 11, p. 2842, 2025, doi: https://doi.org/10.3390/en18112842.
H. Lin, G. Zhang, and Z. Sun, “A Hybrid Machine Learning and Deep Learning Framework for Effective Electricity Theft Detection in Smart Grids,” Proc. - 2025 5th Asia-Pacific Conf. Commun. Technol. Comput. Sci. ACCTCS 2025, pp. 589–595, 2025, doi: 10.1109/ACCTCS66275.2025.00108.
K. Redwan, S. Datto, M. Ahmed, N. Hannan, A. Shufian, and M. S. Mahmood, “Dynamic and Transformative Hybrid Machine Learning Strategies for Effective Stability Prediction in Smart Energy Networks,” 2024 27th Int. Conf. Comput. Inf. Technol. ICCIT 2024 - Proc., pp. 3602–3607, 2024, doi: 10.1109/ICCIT64611.2024.11022470.
K. Sarita, S. Kumar, and R. K. Saket, “Fault Detection of Smart Grid Equipment Using Machine Learning and Data Analytics,” Lect. Notes Electr. Eng., vol. 693 LNEE, pp. 37–49, 2021, doi: 10.1007/978-981-15-7675-1_4/SAVE-RESEARCH.
R. Vijayanand, D. Devaraj, and B. Kannapiran, “Support vector machine based intrusion detection system with reduced input features for advanced metering infrastructure of smart grid,” 2017 4th Int. Conf. Adv. Comput. Commun. Syst. ICACCS 2017, Aug. 2017, doi: 10.1109/ICACCS.2017.8014590.
M. Y. Arafat, M. J. Hossain, “Advanced Deep Learning Based Predictive Maintenance of DC Microgrids: Correlative Analysis,” Energies, vol. 18, no. 6, p. 1535, 2025, doi: https://doi.org/10.3390/en18061535.
Nitasha Sahani, Ruoxi Zhu, “Machine Learning-based Intrusion Detection for Smart Grid Computing: A Survey,” ACM Trans. Cyber-Physical Syst., vol. 7, no. 2, 2023, [Online]. Available: https://dl.acm.org/doi/10.1145/3578366
R. Mullur Nagaraja Murthy and U. B. Mahadevaswamy, “Automatic fault identification in WSN-based smart grid environment,” Int. J. Commun. Syst., vol. 35, no. 18, p. e5340, Dec. 2022, doi: 10.1002/DAC.5340;PAGEGROUP:STRING:PUBLICATION.
“IoT-Enabled Smart Grid Dataset.” Accessed: May 13, 2026. [Online]. Available: https://www.kaggle.com/datasets/ziya07/iot-enabled-smart-grid-dataset
Zijie Hong, Xiaoluo Zhou, “Prior-Guided Multi-Scale Temporal Modeling for Behavior-Driven Residential Load Forecasting,” Electronics, vol. 15, no. 10, p. 1996, 2026, doi: https://doi.org/10.3390/electronics15101996.
Fatemeh Stodt, Christoph Reich, “Context-aware anomaly detection by community detection in the Internet of Things,” Comput. Commun., vol. 248, 2026, [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0140366426000046
K. M. Mishra and K. J. Huhtala, “Fault Detection of Elevator Systems Using Multilayer Perceptron Neural Network,” IEEE Int. Conf. Emerg. Technol. Fact. Autom. ETFA, vol. 2019-September, pp. 904–909, Sep. 2019, doi: 10.1109/ETFA.2019.8869230.
“(PDF) Integrated Diagnostics and Prognostics of Rotating Machinery.” Accessed: Jun. 03, 2026. [Online]. Available: https://www.researchgate.net/publication/270891789_Integrated_Diagnostics_and_Prognostics_of_Rotating_Machinery
S. Kumar, “A Comprehensive Review of Condition Based Prognostic Maintenance (CBPM) for Induction Motor,” IEEE Access, vol. 7, pp. 90690–90704, 2019, doi: 10.1109/ACCESS.2019.2926527.
S. Kumar et al., “Probabilistic evaluation and design aspects for reliability enhancement of induction motor,” Int. J. Reliab. Saf., vol. 13, no. 4, pp. 267–290, 2019, doi: 10.1504/IJRS.2019.102879.
Marc Gillioz, Guillaume Dubuis, “Anomaly Detection with Machine Learning Algorithms in Large-Scale Power Grids,” arXiv:2602.10888v1, 2026, [Online]. Available: https://arxiv.org/html/2602.10888v1
Vasiliki Vita, Georgios Fotis, “Predictive Maintenance for Distribution System Operators in Increasing Transformers’ Reliability,” Electronics, vol. 12, no. 6, p. 1356, 2023.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 50sea

This work is licensed under a Creative Commons Attribution 4.0 International License.


















