Revolutionising Electricity Theft Detection in Smart Grids: An Edge-Centric Hybrid Machine Learning Framework with IoT Integration
Loading...
Date
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
University of the Witwatersrand, Johannesburg
Abstract
Non-Technical Losses (NTLs), including electricity theft, meter tampering, and incorrect readings, significantly contributed to distributed electricity losses, accounting for nearly half of global losses resulting in substantial financial impacts annually. To address this issue, the study proposed a robust anomaly detection framework that integrated smart meters and Advanced Power Metering Infrastructure (APMI) with machine learning models to identify fraudulent energy consumption. Preprocessing techniques, such as data interpolation, Z-score Analysis, data normalisation, and Principal Component Analysis (PCA), were employed to handle inconsistencies, missing values, and outliers, ensuring accurate feature extraction and classification. A supervised learning approach was implemented, utilising Deep Neural Networks (DNN), Random Forest (RF), Logistic Regression, and a custom Hybrid Random Forest-DNN model. The models were trained and evaluated on publicly available smart meter data, augmented with synthetic anomalies at 25%, 50%, and 75% levels to assess robustness. The Hybrid RF-DNN model outperformed others, achieving an average F1-score of 96%, a test accuracy of 96.6%, and a low root mean squared error (RMSE) of 0.2065. It also reduced execution time by 14.3% compared to the standard Random Forest model. The Random Forest model followed closely, with an F1-score of 95.0% and test accuracy of 95.1%. Independent DNN models achieved an average F1-score and test accuracy of 92.6%, while Logistic Regression performed the weakest, with an F1-score of 65% and accuracy of 64.2%. A Flask based web application was developed for real-time anomaly detection, integrating automated data preprocessing, model deployment, and interactive visualisation. Additionally, a microcontroller-based transducer system was designed in an attempt to mitigate physical theft. The system, featuring an ESP32 microcontroller, Global System for Mobile Communications (GSM) module, sound sensor, and ultrasonic sensor, was optimised for Zone 2 environments and generated Short Message Service (SMS) alerts with a response time of 3.9 seconds. Future work aimed to explore explainable Artificial Intelligence (AI) methods, such as SHapley Additive exPlanations (SHAP) and Local Interpretable Model agnostic Explanations (LIME), alongside unsupervised learning techniques like k-means and Density-Based Spatial Clustering of Applications with Noise (DBSCAN), to enhance anomaly detection and model interpretability.
Description
A Dissertation submitted in fulfillment of the requirements for the degree of Master of Science in Engineering, to the Faculty of Engineering and the Built Environment, School of Mechanical, Industrial and Aeronautical Engineering, University of the Witwatersrand, Johannesburg, 2025
Keywords
Electricity Theft Detection, Edge-Centric Hybrid Machine Learning, Internet of Thing (IoT), IoT Integration, Non-Technical Losses (NTLs), Advanced Power Metering Infrastructure (APMI), Principal Component Analysis (PCA), Hybrid Random Forest-DNN model, SHapley Additive exPlanations (SHAP), Deep Neural Networks (DNN), Random Forest (RF), Z-score Analysis, UCTD
Citation
Maboko, Malebo Legologela Gift. (2025). Revolutionising Electricity Theft Detection in Smart Grids: An Edge-Centric Hybrid Machine Learning Framework with IoT Integration. [Master's dissertation, University of the Witwatersrand, Johannesburg]. WIReDSpace. https://hdl.handle.net/10539/50112