Electricity Behavior Modeling and Anomaly Detection Services Based on a Deep Variational Autoencoder Network
Abstract
:1. Introduction
- A power consumption behavior modeling and analysis algorithm based on an improved DVAE is proposed, including typical load pattern generation and anomaly probability analysis.
- The convolution layer is used to optimize the DVAE and reduce the parameter redundancy of the model so that the model can efficiently handle extensive load data.
- The sliding window is used to adapt to the periodic change in the load so that the model can automatically change the strategy of anomaly identification according to different seasons and avoid the identification error caused by the periodic change in power consumption behavior.
- Three anomaly identification criteria are proposed: reconstruction probability, Pearson similarity, and power consumption level. Experiments on public datasets in the United States and load data in Southeast China show that the proposed model can reconstruct the electricity consumption behavior well and accurately identify abnormal electricity consumption.
2. Related Work
3. Proposed Method
- (1)
- The proposed method of modeling electricity behavior involves the use of a deep variational autoencoder. The anomalous electricity behavior is detected through the reconstruction probability and other indicators, and the variational autoencoder generation model explores the typical load patterns.
- (2)
- The conversion of the electricity pattern is determined through the anomaly detection of timing development, and the restarting of the DVAE judgment model is completed via a sliding window adaptation.
4. Mining and Anomaly Detection of the Load Pattern for Industrial and Commercial Users
4.1. Problem Description
4.2. Improved Deep Variational Autoencoder (DVAE)
Algorithm 1: The anomalous power consumption behavior detection algorithm based on DVAE |
Input: Trained model Dataset to be tested Threshold Output: The result of the anomalous power consumption behavior detection. |
1: for to do 2: 3: if then 4: is identified as anomalous 5: else 6: Get the reconstruction result 7: Calculate the correlation coefficient and the mean load 8: if is too low or is anomalous then 9: is identified as anomalous 10: else 11: is identified as normal 12: end if 13: end if 14: end for |
Returns: The result of the anomalous power consumption behavior detection. |
4.3. Sliding Window Adaption
5. Experiment and Performance Evaluation
5.1. China Load Dataset Experiment
5.1.1. Dataset
5.1.2. Experiment Results
5.1.3. Comparison Experiment
5.2. US Load Dataset Experiment
5.2.1. Dataset
5.2.2. Experiment Results
5.3. Benefits to the Grid and Users
6. Conclusions and Future Work
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Sobhani, M.; Hong, T.; Martin, C. Temperature anomaly detection for electric load forecasting. Int. J. Forecast. 2020, 36, 324–333. [Google Scholar] [CrossRef]
- Sun, M.; Zhang, J. Data-driven anomaly detection in modern power systems. In Security of Cyber-Physical Systems; Springer: Berlin/Heidelberg, Germany, 2020; pp. 131–143. [Google Scholar]
- Fahim, M.; Sillitti, A. An anomaly detection model for enhancing energy management in smart buildings. In Proceedings of the 2018 IEEE International Conference on Communications, Control, and Computing Technologies for Smart Grids (SmartGridComm), Aalborg, Denmark, 29–31 October 2018; pp. 1–6. [Google Scholar]
- Nakayama, K.; Sharma, R. Energy management systems with intelligent anomaly detection and prediction. In Proceedings of the 2017 Resilience Week (RWS), Wilmington, DE, USA, 18–22 September 2017; pp. 24–29. [Google Scholar]
- Capozzoli, A.; Piscitelli, M.S.; Brandi, S.; Grassi, D.; Chicco, G. Automated load pattern learning and anomaly detection for enhancing energy management in smart buildings. Energy 2018, 157, 336–352. [Google Scholar] [CrossRef]
- Liu, X.; Ding, Y.; Tang, H.; Xiao, F. A data mining-based framework for the identification of daily electricity usage patterns and anomaly detection in building electricity consumption data. Energy Build. 2021, 231, 110601. [Google Scholar] [CrossRef]
- Hosseinzadehtaher, M.; Khan, A.; Shadmand, M.B.; Abu-Rub, H. Anomaly detection in distribution power system based on a condition monitoring vector and ultra-short demand forecasting. In Proceedings of the 2020 IEEE CyberPELS (CyberPELS), Miami, FL, USA, 13 October 2020; pp. 1–6. [Google Scholar]
- Shah, G.; Tiwari, A. Anomaly detection in iiot: A case study using machine learning. In Proceedings of the ACM India Joint International Conference on Data Science and Management of Data, Goa, India, 11–13 January 2018; pp. 295–300. [Google Scholar]
- Yue, M.; Hong, T.; Wang, J. Descriptive analytics-based anomaly detection for cybersecure load forecasting. IEEE Trans. Smart Grid 2019, 10, 5964–5974. [Google Scholar] [CrossRef]
- Saraswat, D.; Bhattacharya, P.; Zuhair, M.; Verma, A.; Kumar, A. AnSMart: A SVM-based anomaly detection scheme via system profiling in Smart Grids. In Proceedings of the 2021 2nd International Conference on Intelligent Engineering and Management (ICIEM), London, UK, 28–30 April 2021; pp. 417–422. [Google Scholar]
- Lin, J.; Fernández, J.A.; Rayhana, R.; Zaji, A.; Zhang, R.; Herrera, O.E.; Liu, Z.; Mérida, W. Predictive analytics for building power demand: Day-ahead forecasting and anomaly prediction. Energy Build. 2022, 255, 111670. [Google Scholar] [CrossRef]
- Fenza, G.; Gallo, M.; Loia, V. Drift-aware methodology for anomaly detection in smart grid. IEEE Access 2019, 7, 9645–9657. [Google Scholar] [CrossRef]
- Zheng, R.; Gu, J.; Jin, Z.; Peng, H.; Zhu, Y. Load forecasting under data corruption based on anomaly detection and combined robust regression. Int. Trans. Electr. Energy Syst. 2020, 30, e12103. [Google Scholar] [CrossRef]
- Wang, L.; Turowski, M.; Zhang, M.; Riedel, T.; Beigl, M.; Mikut, R.; Hagenmeyer, V. Point and contextual anomaly detection in building load profiles of a university campus. In Proceedings of the 2020 IEEE PES Innovative Smart Grid Technologies Europe (ISGT-Europe), Hague, The Netherlands, 26–28 October 2020; pp. 11–15. [Google Scholar]
- Yue, M. Evaluation of a data analytic based anomaly detection method for load forecasting data. In Proceedings of the 2018 IEEE Power & Energy Society General Meeting (PESGM), Portland, OR, USA, 5–10 August 2018; pp. 1–5. [Google Scholar]
- Krawiec, P.; Junge, M.; Hesselbach, J. Comparison and Adaptation of Two Strategies for Anomaly Detection in Load Profiles Based on Methods from the Fields of Machine Learning and Statistics. Open J. Energy Effic. 2021, 10, 37–49. [Google Scholar] [CrossRef]
- Wang, X.; Ahn, S.-H. Real-time prediction and anomaly detection of electrical load in a residential community. Appl. Energy 2020, 259, 114145. [Google Scholar] [CrossRef]
- Rajabi, A.; Eskandari, M.; Ghadi, M.J.; Li, L.; Zhang, J.; Siano, P. A comparative study of clustering techniques for electrical load pattern segmentation. Renew. Sustain. Energy Rev. 2020, 120, 109628. [Google Scholar] [CrossRef]
- Ryu, S.; Choi, H.; Lee, H.; Kim, H. Convolutional autoencoder based feature extraction and clustering for customer load analysis. IEEE Trans. Power Syst. 2019, 35, 1048–1060. [Google Scholar] [CrossRef]
- Wang, Y.; Gan, D.; Sun, M.; Zhang, N.; Lu, Z.; Kang, C. Probabilistic individual load forecasting using pinball loss guided LSTM. Appl. Energy 2019, 235, 10–20. [Google Scholar] [CrossRef]
- Piscitelli, M.S.; Brandi, S.; Capozzoli, A. Recognition and classification of typical load profiles in buildings with non-intrusive learning approach. Appl. Energy 2019, 255, 113727. [Google Scholar] [CrossRef]
- Huang, X.; Hu, T.; Ye, C.; Xu, G.; Wang, X.; Chen, L. Electric load data compression and classification based on deep stacked auto-encoders. Energies 2019, 12, 653. [Google Scholar] [CrossRef]
- Ullah, A.; Haydarov, K.; Haq, I.U.; Muhammad, K.; Rho, S.; Lee, M.; Baik, S.W. Deep learning assisted buildings energy consumption profiling using smart meter data. Sensors 2020, 20, 873. [Google Scholar] [CrossRef] [PubMed]
- Laib, O.; Khadir, M.T.; Mihaylova, L. Toward efficient energy systems based on natural gas consumption prediction with LSTM Recurrent Neural Networks. Energy 2019, 177, 530–542. [Google Scholar] [CrossRef]
- Wang, Y.; Chen, J.; Chen, X.; Zeng, X.; Kong, Y.; Sun, S.; Guo, Y.; Liu, Y. Short-term load forecasting for industrial customers based on TCN-LightGBM. IEEE Trans. Power Syst. 2020, 36, 1984–1997. [Google Scholar] [CrossRef]
- Kingma, D.P.; Welling, M. Auto-Encoding Variational Bayes. In Proceedings of the 2nd International Conference on Learning Representations, ICLR 2014, Banff, AB, Canada, 14–16 April 2014. [Google Scholar] [CrossRef]
- O’Shea, K.; Nash, R. An Introduction to Convolutional Neural Networks. arXiv 2015, arXiv:1511.08458. [Google Scholar] [CrossRef]
- Kingma, D.P.; Salimans, T.; Welling, M.J.A. Variational dropout and the local reparameterization trick. In Proceedings of the 28th International Conference on Neural Information Processing Systems, Montreal, QC, Canada, 7–12 December 2015; Volume 2, pp. 2575–2583. [Google Scholar]
Date | Users | Anomalous | |
---|---|---|---|
Industry #1 | 2014/1~2015/1 | 516 | 2330 |
Industry #2 | 2014/1~2015/1 | 387 | 104 |
Industry #3 | 2014/1~2015/1 | 476 | 2821 |
Test Sample | Reconstruction Probability | Pearson Correlation | Mean Load |
---|---|---|---|
#A | 0.6779 | 0.81665 | 9.98001 |
#B | 0.3688 | 0.56609 | 16.11646 |
#C | 0.6989 | 0.88754 | 21.09903 |
#D | 0.7306 | 0.91222 | 34.97619 |
#E | 0.2670 | 0.44971 | 32.66502 |
#F | 0.7545 | 0.87056 | 11.96069 |
#G | 0.3226 | 0.50632 | 12.17643 |
Algorithm | AUC | |
---|---|---|
DVAE | 0.848 | 0.644 |
VAE | 0.781 | 0.517 |
AE | 0.596 | 0.433 |
Type | Test Samples | Anomalous Samples | Anomalous Ratio (%) |
---|---|---|---|
Warehouse | 15,334 | 2794 | 18.22% |
Business district | 16,800 | 1613 | 9.60% |
Fast service restaurant | 16,295 | 554 | 3.39% |
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. |
© 2024 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Lin, R.; Chen, S.; He, Z.; Wu, B.; Zou, H.; Zhao, X.; Li, Q. Electricity Behavior Modeling and Anomaly Detection Services Based on a Deep Variational Autoencoder Network. Energies 2024, 17, 3904. https://doi.org/10.3390/en17163904
Lin R, Chen S, He Z, Wu B, Zou H, Zhao X, Li Q. Electricity Behavior Modeling and Anomaly Detection Services Based on a Deep Variational Autoencoder Network. Energies. 2024; 17(16):3904. https://doi.org/10.3390/en17163904
Chicago/Turabian StyleLin, Rongheng, Shuo Chen, Zheyu He, Budan Wu, Hua Zou, Xin Zhao, and Qiushuang Li. 2024. "Electricity Behavior Modeling and Anomaly Detection Services Based on a Deep Variational Autoencoder Network" Energies 17, no. 16: 3904. https://doi.org/10.3390/en17163904
APA StyleLin, R., Chen, S., He, Z., Wu, B., Zou, H., Zhao, X., & Li, Q. (2024). Electricity Behavior Modeling and Anomaly Detection Services Based on a Deep Variational Autoencoder Network. Energies, 17(16), 3904. https://doi.org/10.3390/en17163904