| Non-Intrusive Load Monitoring(hereinafter collectively referred to as NILM)estimates device-level energy consumption based on the load data of the whole home,which has positive significance for rational electricity consumption,energy saving and power supply scheme upgrading.However,most of the current explorations of NILM systems are still on the analysis and identification of low-sampling-rate load data,and the identification of high-sampling-rate data is more difficult.On the other hand,the scarcity of datasets in the field of NILM,especially those with high sampling rate and long time span,is very scarce,which largely hinders the research of NILM systems.To cope with the problems elaborated above,it is necessary to conduct targeted NILM research on high sampling rate long time span load data.This thesis conducts a study on non-intrusive load monitoring based on Improved Transformer and introduces a complete flow from raw data set to load identification,which consists of three main steps,extracting feature data from raw data set and detecting equipment operation events,then pre-processing based on K-means clustering algorithm to obtain feature data and labels for load identification,and finally load identification based on Improved Transformer algorithm.Finally,load identification is performed based on the improved Transformer algorithm.The main work of this thesis is as follows:(1)A data pre-processing method based on K-means clustering algorithm is designed to generate high-quality labels for feature data.The contour coefficient and CH score are used as evaluation indexes,and the clustering analysis is performed after several experimental groups with different prime numbers,and the squared sum of Euclidean distances from samples to the prime to which they belong is used as the loss function to find the minimum intra-class Euclidean distance and the maximum inter-class Euclidean distance as the goal to generate the optimal clustering results.The scatter plot of feature data is also drawn,and the feature data labels are manually optimized by combining the clustering results to obtain the labeled data with the best accuracy.(2)Design load identification based on the improved Transformer algorithm.The improved Transformer algorithm contains two main modules,encoder and decoder,for long time series feature data with high sampling rate and long time span,the use of sparse probabilistic self-attention mechanism is proposed in the encoder to capture the internal correlation of the sample data.A self-attentive distillation structure is proposed to use one downsampling of each attention mechanism output to relieve the computational pressure and highlight the sample features.Also using a generative decoder,the category output is obtained after one decoding process,which reduces the computational effort while avoiding the accumulation of errors in the inference decoding process.In addition,the main and secondary branch structure of the encoder is used to input samples with different sampling rates to improve the model robustness.(3)This thesis completes the implementation of the above method,investigates and reproduces the excellent load recognition algorithms in the field of non-intrusive load monitoring in recent years,and compares the model of this thesis with it.The experimental results show that the model in this thesis can effectively identify household electricity event categories,and achieves excellent results in all indexes,including the accuracy rate of 93.7%,the precision rate of 90.3%,and the recall rate of 88.7%. |