Submitted:
13 June 2025
Posted:
17 June 2025
You are already at the latest version
Abstract
Keywords:
I. Introduction
II. LSTM-Based Model Design for Abnormal Power Usage Detection
A. Data Preprocessing Methods
B. LSTM Model Structure Design
C. Anomaly Detection Threshold Determination
D. Model Optimization Strategy
III. Algorithm Implementation and System Design
A. System Architecture Design
B. Data Acquisition and Storage Module
C. Anomaly Detection Module Implementation
D. Results Visualization Design
IV. Experimental Results and Analysis
A. Experimental Environment and Data Set
B. Design of Evaluation Indicators
C. Comparative Analysis of Model Performance
V. Conclusions
References
- Takiddin A, Ismail M, Zafar U, et al. Deep autoencoder-based anomaly detection of electricity theft cyberattacks in smart grids[J]. IEEE Systems Journal, 2022, 16(3): 4106-4117. [CrossRef]
- Śmiałkowski T, Czyżewski A. Detection of anomalies in the operation of a road lighting system based on data from smart electricity meters[J]. Energies, 2022, 15(24): 9438.
- Munawar S, Asif M, Kabir B, et al. Electricity theft detection in smart meters using a hybrid Bi-directional GRU Bi-directional LSTM model[C]//Complex, Intelligent and Software Intensive Systems: Proceedings of the 15th International Conference on Complex, Intelligent and Software Intensive Systems (CISIS-2021). Springer International Publishing, 2021: 297-308.
- Ahir R K, Chakraborty B. Pattern-based and context-aware electricity theft detection in smart grid[J]. Sustainable Energy, Grids and Networks, 2022, 32: 100833.
- Otuoze A O, Mustafa M W, Sultana U, et al. Detection and confirmation of electricity thefts in Advanced Metering Infrastructure by Long Short-Term Memory and fuzzy inference system models[J]. Nigerian Journal of Technological Development, 2024, 21(1): 112-130. [CrossRef]
- Zhou M, Musilek P. Real-time anomaly detection in distribution grids using long short term memory network[C]//2021 IEEE Electrical Power and Energy Conference (EPEC). IEEE, 2021: 208-213.
- Lee S, Jin H, Nengroo S H, et al. Smart metering system capable of anomaly detection by bi-directional LSTM autoencoder[C]//2022 IEEE International Conference on Consumer Electronics (ICCE). IEEE, 2022: 1-6.
- Eddin M E, Albaseer A, Abdallah M, et al. Fine-tuned RNN-based detector for electricity theft attacks in smart grid generation domain[J]. IEEE Open Journal of the Industrial Electronics Society, 2022, 3: 733-750.
- Pamir, Javaid N, Javaid S, et al. Synthetic theft attacks and long short term memory-based preprocessing for electricity theft detection using gated recurrent unit[J]. Energies, 2022, 15(8): 2778. [CrossRef]
- Zihan W, Enze S, Can W, et al. LSTM-Based Method for Electric Consumption Outlier Detection[C]//2021 IEEE Sustainable Power and Energy Conference (iSPEC). IEEE, 2021: 3955-3959.






| Sensitivity factor k | Threshold setting interval (μ±kσ) | Theoretical coverage (normal distribution) | Description of the criteria for determination |
| 2.0 | [μ-2σ,μ+2σ] | 95.45% | Balancing misses and false alarms |
| 2.5 | [μ-2.5σ,μ+2.5σ] | 98.76% | Slightly loose, suitable for regular business |
| 3.0 | [μ-3σ,μ+3σ] | 99.73% | On the conservative side for sensitive scenarios |
| Optimization methods | parameterization | mechanism of action |
| Early Stopping | patience=5 | Preventing training overfitting |
| L2 regularization | λ=0.001 | Suppressing parameter oversizing and enhancing generalization |
| Dropout | lstm1: 0.2, lstm2: 0.3 | Reduce feature dependency and improve robustness |
| Learning rate decay | Initial 0.001, attenuation factor 0.1 | Stabilize convergence and avoid localized shocks |
| Field name | Data Type | Unit (of measure) | Acquisition Frequency |
| timestamp | datetime | - | Every 15 minutes |
| voltage | float | V | Every 15 minutes |
| current | float | A | Every 15 minutes |
| active_power | float | kW | Every 15 minutes |
| reactive_power | float | kvar | Every 15 minutes |
| Model Type | MSE | MAE | Precision | Recall | F1-score |
| ARIMA | 0.0241 | 0.102 | 0.783 | 0.864 | 0.821 |
| SVR | 0.0176 | 0.091 | 0.812 | 0.841 | 0.852 |
| GRU | 0.0092 | 0.069 | 0.901 | 0.918 | 0.894 |
| LSTM | 0.0084 | 0.065 | 0.923 | 0.949 | 0.931 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).