Document Type


Publication Date




Publication Title

IET Renewable Power Generation


Article in Press




Energy management and efficient asset utilization play an important role in the economic development of a country. The electricity produced at the power station faces two types of losses from the generation point to the end user. These losses are technical losses (TL) and non-technical losses (NTL). TLs occurs due to the use of inefficient equipment. While NTLs occur due to the anomalous consumption of electricity by the customers, which happens in many ways; energy theft being one of them. Energy theft majorly happens to cut down on the electricity bills. These losses in the smart grid (SG) are the main issue in maintaining grid stability and cause revenue loss to the utility. The automatic metering infrastructure (AMI) system has reduced grid instability but it has opened up new ways for NTLs in the form of different cyber-physical theft attacks (CPTA). Machine learning (ML) techniques can be used to detect and minimize CPTA. However, they have certain limitations and cannot capture the energy consumption patterns (ECPs) of all the users, which decreases the performance of ML techniques in detecting malicious users. In this paper, we propose a novel ML-based stacked generalization method for the cyber-physical theft issue in the smart grid. The original data obtained from the grid is preprocessed to improve model training and processing. This includes NaN-imputation, normalization, outliers' capping, support vector machine-synthetic minority oversampling technique (SVM-SMOTE) balancing, and principal component analysis (PCA) based data reduction techniques. The pre-processed dataset is provided to the ML models light gradient boosting (LGB), extra trees (ET), extreme gradient boosting (XGBoost), and random forest (RF), to accurately capture all consumers' overall ECP. The predictions from these base models are fed to a meta-classifier multi-layer perceptron (MLP). The MLP combines the learning capability of all the base models and gives an improved final prediction. The proposed structure is implemented and verified on the publicly available real-time large dataset of the State Grid Corporation of China (SGCC). The proposed model outperformed the individual base classifiers and the existing research in terms of CPTA detection with false positive rate (FPR), false negative rate (FNR), F1-score, and accuracy values of 0.72%, 2.05%, 97.6%, and 97.69%, respectively.


© 2023 The Authors.

This is an open access article under the terms of the Creative Commons Attribution 4.0 International (CC BY 4.0) License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited.

Data Availability

Article states: Not applicable.

Original Publication Citation

Ali, A., Khan, L., Javaid, N., Bouk, S. H., Aldegheishem, A., & Alrajeh, N. (2023). Mitigating anomalous electricity consumption in smart cities using an AI-based stacked-generalization technique. IET Renewable Power Generation. Advance online publication.


0000-0002-1764-7703 (Bouk)