AUTHOR=Zhang Junfeng , Zhang Hui , Ding Song , Zhang Xiaoxiong TITLE=Power Consumption Predicting and Anomaly Detection Based on Transformer and K-Means JOURNAL=Frontiers in Energy Research VOLUME=9 YEAR=2021 URL=https://www.frontiersin.org/journals/energy-research/articles/10.3389/fenrg.2021.779587 DOI=10.3389/fenrg.2021.779587 ISSN=2296-598X ABSTRACT=

With the advancement of technology and science, the power system is getting more intelligent and flexible, and the way people use electric energy in their daily lives is changing. Monitoring the condition of electrical energy loads, particularly in the early detection of aberrant loads and behaviors, is critical for power grid maintenance and power theft detection. In this paper, we combine the widely used deep learning model Transformer with the clustering approach K-means to estimate power consumption over time and detect anomalies. The Transformer model is used to forecast the following hour’s power usage, and the K-means clustering method is utilized to optimize the prediction results, finally, the anomalies is detected by comparing the predicted value and the test value. On real hourly electric energy consumption data, we test the proposed model, and the results show that our method outperforms the most commonly used LSTM time series model.