A non-intrusive load decomposition method based on threshold denoising network
By constructing a threshold denoising network based on Soft Thresholding and Transformer, the problems of low training efficiency and noise pollution in non-intrusive load decomposition are solved, achieving more efficient and accurate electrical load decomposition.
Patent Information
- Application Number
- CN202211572490.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-12-08
AI Technical Summary
In existing non-intrusive load decomposition methods, deep learning networks suffer from low training efficiency and noise pollution when processing electrical power signals. In particular, CNNs cannot extract time information, and RNNs cannot be parallelized, resulting in low decomposition accuracy.
A threshold denoising network based on Soft Thresholding and Transformer is adopted. Soft Thresholding removes noise, and the parallelization capability of Transformer is used to extract features. The load decomposition model is constructed by combining Soft Thresholding and Transformer layers to enhance the feature extraction capability.
It improves the accuracy of load decomposition, reduces training time, enables more precise decomposition of electrical loads, and enhances the decomposition effect of the model.
Smart Images

Figure CN115905814B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of deep learning and signal processing technology, and in particular relates to a non-intrusive load decomposition method based on a threshold denoising network. Background Technology
[0002] Commercial and residential electricity consumption is one of the main sources of energy consumption. Studies have shown that understanding the detailed electricity usage of residential and commercial buildings and optimizing electricity consumption behavior can save about 15-20% of electricity, making it particularly important. This step of obtaining detailed electricity usage information is called load monitoring. A popular method of load monitoring is non-intrusive load decomposition.
[0003] Non-intrusive load decomposition breaks down the total known power signal of a household into individual power signals of individual load devices. This allows for a clear observation of detailed household energy consumption, enabling individuals to optimize their electricity usage and achieve energy conservation. This problem has been widely known since Professor Hart proposed it in the 1990s, and scholars have conducted in-depth research on it. Early decomposition methods required manual feature extraction, which was labor-intensive, computationally complex, and generally lacked accuracy.
[0004] Since 2015, the successful application of neural networks in various industries has demonstrated their powerful ability to automatically extract features from complex data, and deep learning has also been transferred to the field of NILM (Non-Integrated Learning Model). During this period, most network structures designed were based on CNNs or RNNs. CNN convolutional kernels can only extract information from the current window and cannot remember the time information of the previous moment, but the time window is quite important in NILM. While RNNs can remember time information, they cannot process it in parallel, resulting in low training efficiency. Furthermore, many data acquisition processes currently suffer from noise pollution such as data loss or errors caused by transmission anomalies. Summary of the Invention
[0005] To address the problems described above, this invention proposes a non-intrusive load decomposition method based on a threshold denoising network, wherein the threshold denoising network includes a Soft Thresholding layer and a Transformer layer. The Transformer layer can be computed in parallel, and the Soft Thresholding layer is used to remove noise.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] A non-intrusive load decomposition method based on a threshold denoising network includes:
[0008] Step 1: Obtain the power data of each appliance, normalize the power data, and divide the normalized power data into a training set and a test set;
[0009] Step 2: Construct a threshold denoising network based on Soft Thresholding and Transformer, and use it as the load decomposition model. Input the preprocessed training set data into the constructed load decomposition model for training to obtain the trained load decomposition model.
[0010] Step 3: Test the trained load decomposition model using test set data and calculate the decomposed power of each electrical appliance.
[0011] Furthermore, in step 1, the power data includes the total power data of the target residence and the power data of all individual appliances in the residence.
[0012] Furthermore, the normalization process in step 1 includes: forward padding of missing data; and deletion of data that exceeds the power threshold.
[0013] Furthermore, the load decomposition model constructed in step 2 includes an input module, a feature processing module, and an output module;
[0014] The input module includes a convolutional layer, a pooling layer, and a position encoding layer; the convolutional layer and pooling layer are used to initially extract feature information, and the position encoding layer is used to extract position information contained in the input data;
[0015] The feature processing module includes a Transformer layer and a soft thresholding layer. The soft thresholding layer contains the SoftThresholding function. The Transformer layer is used to further extract the features obtained in the previous step. It uses the attention mechanism of the Transformer to focus on important information and ignore unimportant information. The soft thresholding layer is used to filter out noise contained in the feature information.
[0016] The output module is used to output the electrical load of each appliance in the house. The output module includes a convolutional layer and a fully connected layer.
[0017] Furthermore, the input module also includes a fusion layer, which is used to add the positional encoding information to the information obtained through convolution and pooling to obtain new features.
[0018] Furthermore, the feature processing module also includes a normalization layer and a forward propagation layer.
[0019] Furthermore, in the feature processing module, the data processing flow includes:
[0020] The Transformer layer further extracts the features obtained in the previous step, and uses the attention mechanism of the Transformer to focus on important information and ignore unimportant information.
[0021] After being processed by the Transformer, the resulting features are input into the soft thresholding layer for SoftThresholding processing.
[0022] The features obtained by the attention mechanism and soft thresholding are fused with the original features and fed into the normalization layer to obtain the feature matrix M;
[0023] After obtaining the feature matrix M after preliminary processing, M is fed into the forward propagation layer and the soft thresholding layer respectively, and feature fusion is performed to obtain the fusion matrix N.
[0024] After obtaining the fusion matrix N, repeat the above operation and input the final feature matrix into the output module.
[0025] Compared with the prior art, the present invention has the following advantages:
[0026] This invention discloses a non-intrusive load decomposition method based on a threshold denoising network. It proposes a load decomposition model combining SoftThresholding and Transformer. The Transformer leverages its excellent parallel data extraction capabilities to reduce training time and allows it to focus on important feature information, thereby enhancing feature extraction capabilities. Furthermore, by introducing Soft Thresholding—a method for processing noise in the signal domain—the model can remove noise contamination from the data, obtaining more accurate features and improving the accuracy of load decomposition. Attached Figure Description
[0027] Figure 1 This is a basic flowchart of a non-intrusive load decomposition method based on a threshold denoising network according to an embodiment of the present invention;
[0028] Figure 2 This is a detailed internal view of the input module in an embodiment of the present invention;
[0029] Figure 3 This is a detailed internal view of the feature processing module in an embodiment of the present invention;
[0030] Figure 4 This is a detailed diagram of the internal structure of the output module in an embodiment of the present invention. Detailed Implementation
[0031] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:
[0032] like Figure 1 As shown, a non-intrusive load decomposition method based on a threshold denoising network includes the following steps:
[0033] Step 1: Obtain the power data of each appliance, normalize the power data, and divide the normalized power data into training set and test set;
[0034] Step 2: Construct a threshold denoising network based on Soft Thresholding and Transformer, and use it as the load decomposition model. Input the preprocessed training set data into the constructed load decomposition model for training to obtain the trained load decomposition model.
[0035] Step 3: After training, test the trained load decomposition model using test set data and calculate the decomposed power of each electrical appliance.
[0036] Furthermore, in Step 1, data is primarily acquired through smart meters installed in the residence. The smart meters can collect initial data, including the total power data of a selected residence and the power data of all individual appliances in the residence. The collected data is then preprocessed and divided into training and test sets in a 7:3 ratio.
[0037] Furthermore, the normalization process described in Step 1 specifically refers to fore-padding missing data. That is, if data is lost at a certain moment, we assume the power signal at the next moment should be roughly the same as the previous moment, so we can fill in the missing data at the beginning. For abnormal data, if it exceeds its power threshold, we delete it. Then, the data can be divided into training and test sets in a 7:3 ratio.
[0038] Furthermore, the load decomposition model constructed in Step 2 mainly includes an input module, a feature processing module, and an output module; the input module mainly includes convolutional layers, pooling layers, and positional encoding layers; the feature processing module mainly includes Transformer layers and soft thresholding layers, with the soft thresholding layer containing the Soft Thresholding function; the output module mainly includes convolutional layers and fully connected layers.
[0039] Input module: Used to input the total power information of a residential building. Please refer to the following for the internal process details. Figure 2 The convolutional and pooling layers are used to initially extract feature information, while the positional encoding layer is used to extract positional information contained in the input data. The formula for positional encoding is:
[0040] L2=nn.embedding(power_len,d_model)
[0041] Where power_len is the length of the input matrix x, i.e., how many features there are, and each feature is represented by a d_model dimension vector.
[0042] Furthermore, the input module also includes a fusion layer. The fusion layer adds the positional encoding information to the information obtained through convolutional pooling to obtain new features, as shown in the following formula:
[0043] Y = PE + Pool(Conv(x))
[0044] Where Y represents the output information, PE represents the position encoding information, Pool represents the pooling operation, and Conv represents the convolution operation.
[0045] Feature processing module: For details on the internal workings of the feature processing module, please refer to [link / reference]. Figure 3 The Transformer layer is used to further extract the features obtained in the previous step. It uses the attention mechanism of the Transformer to focus on important information and ignore unimportant information. The soft thresholding layer is used to process and filter the noise contained in the feature information, further simplifying the feature information.
[0046] The formula for Transformer to process features is:
[0047]
[0048] Q, K, and V are obtained by multiplying the input using the coefficient matrix, Attention is the obtained attention value, and d K It is the dimension of the K matrix.
[0049] Furthermore, after processing by the Transformer, we apply Soft Thresholding to the resulting feature input soft thresholding layer, with the following formula:
[0050]
[0051] Where t is the threshold, which can be continuously updated through the attention mechanism, x is the input feature, and soft represents the soft thresholding layer.
[0052] Then, the features obtained by the attention mechanism and soft thresholding are fused with the original features and fed into the normalization layer to obtain the feature matrix M:
[0053] M=LayerNorm(Attention(Q,K,V)+Soft(X)+X)
[0054] LayerNorm is a normalization layer that can accelerate model convergence.
[0055] After obtaining the pre-processed feature matrix M, M is fed into the forward propagation layer and the soft thresholding layer respectively, and feature fusion is performed to obtain the fusion matrix N:
[0056] N=LayerNorm(FF(M)+Soft(M)+M)
[0057] Here, FF is the forward propagation layer, and its core is the GELU activation function, which can increase the robustness of the model. Its formula is as follows:
[0058] FF(M) = GELU(Q)W + b
[0059] Where W is the weight and b is the bias term, which can be automatically updated through the forward propagation mechanism.
[0060] After obtaining the fusion matrix N, we will repeat the above operations once, and then input the final feature matrix into the output module.
[0061] Output module: Outputs the electrical load of various appliances in the house. Please refer to the internal details. Figure 4 It includes convolutional layers and fully connected layers;
[0062] Fully connected layers mainly undergo identity mapping, the formula of which is:
[0063] H(x) = Wx + b
[0064] Where W is the weight, b is the bias term, which can be automatically updated through the backpropagation mechanism, and H(x) is the output.
[0065] Furthermore, the total power data in the training set is input into the constructed load decomposition model for training. The input data is processed sequentially through the input module, feature processing module, and output module. The trained load decomposition model is then saved, and load decomposition tests are performed based on the trained load decomposition model.
[0066] In summary, this invention discloses a non-intrusive load decomposition method based on a threshold denoising network. It proposes a load decomposition model combining SoftThresholding and Transformer, leveraging Transformer's excellent parallel data extraction capabilities to reduce training time and focus on important feature information, thereby enhancing feature extraction capabilities. Furthermore, by introducing Soft Thresholding—a method for handling noise in the signal domain—to process features, the model can remove noise contamination from the data, obtaining more accurate features and improving the accuracy of load decomposition.
[0067] The above description is only a preferred embodiment of the present invention. It should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A non-intrusive load decomposition method based on a threshold denoising network, characterized in that, include: Step 1: Obtain the power data of each appliance, normalize the power data, and divide the normalized power data into a training set and a test set; Step 2: Construct a threshold denoising network based on Soft Thresholding and Transformer, and use it as the load decomposition model. Input the preprocessed training set data into the constructed load decomposition model for training to obtain the trained load decomposition model. The load decomposition model constructed in step 2 includes an input module, a feature processing module, and an output module. The input module includes convolutional layers, pooling layers, and a position encoding layer. The convolutional and pooling layers are used to initially extract feature information, and the position encoding layer is used to extract the position information contained in the input data. The feature processing module includes a Transformer layer and a soft thresholding layer. The soft thresholding layer contains a soft thresholding function. The Transformer layer is used to further extract the features obtained in the previous step, using the attention mechanism of the Transformer to focus on important information and ignore unimportant information. The soft thresholding layer is used to filter out noise contained in the feature information. The feature processing module also includes a normalization layer and a forward propagation layer. The output module is used to output the electrical load of each appliance in the residence, and the output module includes convolutional layers and fully connected layers. The data processing flow in the feature processing module includes: The Transformer layer further extracts the features obtained in the previous step, using its attention mechanism to focus on important information and ignore unimportant information. After Transformer processing, the resulting features are input into a soft thresholding layer for soft thresholding. The features obtained through the attention mechanism and soft thresholding are then fused with the original features and fed into a normalization layer to obtain a feature matrix M. After obtaining the pre-processed feature matrix M, M is fed into the forward propagation layer and the soft thresholding layer respectively for further feature fusion to obtain a fusion matrix N. After obtaining the fusion matrix N, the above operations are repeated, and the final feature matrix is input into the output module. Step 3: Test the trained load decomposition model using test set data and calculate the decomposed power of each electrical appliance.
2. The non-intrusive load decomposition method based on a threshold denoising network according to claim 1, characterized in that, In step 1, the power data includes the total power data of the target residence and the power data of all individual appliances in the residence.
3. The non-intrusive load decomposition method based on a threshold denoising network according to claim 1, characterized in that, The normalization process in step 1 includes: forward padding of missing data; and deletion of data that exceeds the power threshold.
4. The non-intrusive load decomposition method based on a threshold denoising network according to claim 1, characterized in that, The input module also includes a fusion layer, which is used to add the positional encoding information to the information obtained through convolution and pooling to obtain new features.
Citation Information
Patent Citations
Transformer-based non-intrusive load decomposition method
CN113434493A