Multi-state electrical appliance load decomposition method based on improved Unit + +

Through the improved Unet++ network, the dual encoder and bidirectional LSTM layer are used to solve the problem of difficulty in extracting power features and insufficient model generalization capabilities of multi-state appliances in low-power states, and the load decomposition effect with high precision and good generalization is achieved.

CN119807708APending Publication Date: 2025-04-11DONGHUA UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411883447.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

When existing deep learning methods deal with multi-state electrical appliances, it is difficult to effectively extract power characteristics in low-power states, and the generalization ability of the model is poor.

Method used

The improved Unet++ network is adopted, a dual encoder structure is adopted, and a bidirectional LSTM layer is used instead of the traditional convolutional layer on the last layer of the dual encoder, for time series feature extraction.

Benefits of technology

The decomposition accuracy of multi-state electrical load decomposition and the generalization ability of the model are improved, and more accurate and efficient load monitoring is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807708A_ABST
    Figure CN119807708A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-state electrical appliance load decomposition method based on improved Unit + +. The method comprises the following steps: preprocessing input data; constructing a non-intrusive load decomposition network of the improved Unet + +; and constructing a load decomposition network loss function. According to the non-intrusive load decomposition network, on the basis of a Unet + + network, a double-encoder structure is adopted, and a bidirectional LSTM layer is used for replacing a traditional convolutional layer on the last layer of double encoders to carry out time sequence feature extraction. And finally, evaluating an output result through an average absolute error, an accuracy rate, a precision rate, a recall rate and an F1-score index. Compared with the prior art, the method has the advantages of high decomposition precision, good model generalization ability and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of load decomposition, and in particular to a multi-state electrical appliance load decomposition method based on improved Unet++. Background Art

[0002] With the acceleration of digital transformation in the energy and power industry, non-intrusive load monitoring (NILM) has become one of the key drivers for energy conservation, emission reduction and smart grid construction. Non-intrusive load monitoring is a technology that identifies and monitors the energy consumption of individual appliances or equipment by analyzing the overall power signal. It is a method that does not require additional sensors or equipment, and infers the energy consumption of each appliance by analyzing the changes and characteristics of the power signal.

[0003] In recent years, the advancement of deep learning technology has greatly promoted the development of NILM. The application of deep learning in the field of non-intrusive load monitoring has shown many potential advantages. Deep learning can achieve non-intrusive monitoring by extracting features from raw current or voltage data, greatly simplifying the deployment and maintenance of monitoring systems. By leveraging the nonlinear modeling capabilities, advanced feature extraction and generalization capabilities of deep learning models, more accurate, efficient and automated load monitoring can be achieved, providing important support for fields such as energy management and smart grids.

[0004] At present, deep learning methods mainly use various network layers such as convolutional neural networks and recurrent neural networks to extract features, and these network models have shown good decomposition accuracy on specific data sets. However, many deep learning methods are not very effective in dealing with multi-state electrical appliances. This is because as the network depth increases, its ability to learn subtle power fluctuation characteristics in low-power states decreases, thus affecting the decomposition effect. At the same time, there is also the problem of poor generalization ability of the model. Summary of the invention

[0005] In order to at least partially solve the problem that it is difficult to effectively extract the power characteristics of multi-state electrical appliances in low power states and the generalization ability of the decomposition model is insufficient, the present invention proposes a multi-state electrical appliance load decomposition method based on improved Unet++.

[0006] A multi-state electrical load decomposition method based on improved Unet++ comprises the following steps:

[0007] Step 1: Obtain the total aggregate power of the household and the low-frequency power data of each electrical device based on the smart meter;

[0008] Step 2: Preprocess the low-frequency power data and divide the corresponding training set, validation set and test set according to the target electrical equipment;

[0009] Step 3: Construct a non-intrusive load decomposition network based on the improved Unet++;

[0010] Step 4: Calculate the L2 reconstruction loss (L2 Reconstruction Loss) by the mean square error (MSE) method, and then calculate the binary cross entropy loss by the BCE (Binary Cross Entropy, BCE) method, add the two loss functions to obtain the final loss function of the present invention, and use the Adam optimizer to optimize the model parameters;

[0011] Step 5: Use the divided training set data to train the improved Unet++ non-intrusive load decomposition network, and use the divided validation set data to check the performance of the model during the training process;

[0012] Step 6: Input the divided test set data into the trained non-intrusive load decomposition model to obtain the active power decomposition value of each electrical equipment and compare it with the true value. Finally, the model is evaluated by the mean absolute error, accuracy, precision, recall rate and F1 score indicators.

[0013] The present invention discloses a multi-state electrical load decomposition method based on improved Unet++, the method comprising preprocessing input data; constructing a non-intrusive load decomposition network of improved Unet++; and constructing a load decomposition network loss function. The non-intrusive load decomposition network is based on the Unet++ network, adopts a dual encoder structure, and uses a bidirectional LSTM layer in the last layer of the dual encoder instead of a traditional convolutional layer to extract time series features. Finally, the output result is evaluated by the mean absolute error, accuracy, precision, recall rate and F1-score indicators. Compared with the prior art, the present invention has the advantages of high decomposition accuracy and good model generalization ability. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 It is a flow chart of the multi-state electrical load decomposition method based on improved Unet++ of the present invention;

[0015] Figure 2 It is a multi-state electrical load decomposition network structure diagram of the improved Unet++ of the present invention;

[0016] Figure 3 This is a comparison chart of the actual active power and the decomposed active power of the dishwasher in the UK-DALE dataset;

[0017] Figure 4This is a comparison chart of the actual active power and the decomposed active power of the washing machine in the UK-DALE dataset. DETAILED DESCRIPTION

[0018] In order to better understand the present invention, the content of the present invention is further described below in conjunction with the accompanying drawings and embodiments of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0019] like Figure 1 As shown, a multi-state electrical load decomposition method based on improved Unet++ includes the following steps:

[0020] Step 1: Obtain the total aggregate power of the household and the low-frequency power data of each electrical device based on the smart meter;

[0021] Step 2: Preprocess the low-frequency power data and divide the corresponding training set, validation set and test set according to the target electrical equipment;

[0022] Step 3: Construct a non-intrusive load decomposition network based on the improved Unet++;

[0023] Step 4: Calculate the L2 reconstruction loss (L2 Reconstruction Loss) by the mean square error (MSE) method, and then calculate the binary cross entropy loss by the BCE (Binary Cross Entropy, BCE) method, add the two loss functions to obtain the final loss function of the present invention, and use the Adam optimizer to optimize the model parameters;

[0024] Step 5: Use the divided training set data to train the improved Unet++ non-intrusive load decomposition network, and use the divided validation set data to check the performance of the model during the training process;

[0025] Step 6: Input the divided test set data into the trained non-intrusive load decomposition model to obtain the active power decomposition value of each electrical equipment and compare it with the true value. Finally, the model is evaluated by the mean absolute error, accuracy, precision, recall rate and F1 score indicators.

[0026] Furthermore, step 3 adopts a dual encoder structure based on the Unet++ network, and uses a bidirectional LSTM layer instead of a traditional convolutional layer in the last layer of the dual encoder to extract sequence features. The dual encoder structure enables the model to extract features from two different perspectives, thereby improving the expressive power of the model. The bidirectional LSTM layer can capture long-term dependencies in time series data, thereby improving the performance of non-intrusive load decomposition tasks. Among them, the Unet++ network is an encoder-decoder architecture, so the network of the present invention as a whole is also an encoder-decoder architecture.

[0027] Furthermore, the encoder in the encoder-decoder architecture of the present invention is a dual encoder structure, each encoder is composed of four custom convolution blocks and four maximum pooling layers, and finally connected to a bidirectional LSTM layer. Among them, the first custom convolution block is composed of 64 convolution kernels with a dimension of 3; the second custom convolution block is composed of 128 convolution kernels with a dimension of 3; the third custom convolution block is composed of 256 convolution kernels with a dimension of 3; the fourth custom convolution block is composed of 512 convolution kernels with a dimension of 3; the step size of these convolution blocks is 1 and all use ReLU activation function; the pooling size of the maximum pooling layer is 2; the hidden layer size of the bidirectional LSTM layer is 256 and bidirectional processing is used

[0028] The decoder in the encoder-decoder architecture gradually restores the time series features through multi-level upsampling and skip connection mechanisms, and fuses information from different levels. Specifically, the upsampling layer includes four stages: the first stage reduces 512 channels to 256 channels; the second stage reduces 256 channels to 128 channels; the third stage reduces 128 channels to 64 channels; the fourth stage reduces 64 channels to 1 channel. Each upsampling layer is followed by a convolution layer with a convolution kernel size of 3, a stride of 1, and a padding of 1. The final output is finally generated through the last one-dimensional convolution layer.

[0029] Furthermore, the custom convolutional block of the present invention defines a module containing three identical convolutional layers, each of which contains a one-dimensional convolution, batch normalization, and an activation function (ReLU). These layers are constructed according to the parameters during initialization, and an instance normalization layer can be optionally added.

[0030] Furthermore, the formula for calculating the L2 reconstruction loss by the mean square error (MSE) method is:

[0031]

[0032] The formula for calculating the binary cross entropy loss using the BCE (Binary Cross Entropy, BCE) method is:

[0033]

[0034] The final loss function formula of the present invention is:

[0035]

[0036] In the formula, N represents the total number of training samples, y i and They represent the true value and predicted result of the output power of the electrical equipment i corresponding to the training sample, represents the loss function.

[0037] like Figure 2 As shown, the embodiment of the present invention introduces the Unet++ network into the field of non-intrusive load decomposition, and builds the model of this article on the basis of this network. The model is generally based on the encoder-decoder architecture. The convolution block in the figure defines a module containing three identical convolutional layers, each of which contains a one-dimensional convolution, batch normalization, and an activation function (ReLU). These layers are constructed according to the parameters during initialization, and an instance normalization layer can be optionally added.

[0038] In order to more effectively extract features from the input total power data, the encoder part of the embodiment of the present invention adopts a dual encoder, and the two encoders are in parallel. The main encoder and the state encoder are the same in structure, and both use convolutional layers and pooling layers to gradually extract features and reduce spatial dimensions. The main function of the state encoder is to fuse its final output with the output of the main encoder in the decoder part, and jointly participate in the final prediction. The main function of the main encoder is to extract features and participate in the subsequent decoder part. Both work together on the input data to improve the performance of the overall model. Figure 2 Medium X A i,j and X B i,j (i=0,1,2,3;j=0) shows the dual encoder structure, where X A i,j is the state encoder, X B i,j The dual encoders are both composed of 4 convolution blocks and a maximum pooling layer, which gradually increase the number of feature channels of the input data through downsampling. At the end of the dual encoders, a bidirectional LSTM layer is used to further process the features to capture the temporal dependencies in the sequence, such as Figure 2 Middle Y A and Y B shown.

[0039] The decoder part of the embodiment of the present invention is also composed of 4 layers of convolution blocks, such as Figure 2 Medium X i,j and X i,jAs shown in (i=0,1,2,3;j=0,1,2,3,4), the output of the state encoder is concatenated with the output of the main encoder, and then the spatial dimension of the feature is restored through upsampling and skip connections, while the feature information of encoders at different layers is fused. Finally, the output of the last decoding path of the model is taken and passed through a one-dimensional convolutional layer as the final prediction.

[0040] In the embodiment of the present invention, the parameters of the Adam optimizer use the default values, and the learning rate lr is set to 0.0001. The target electrical appliance parameters specify the maximum power, the start threshold, and the minimum start and stop duration of each target electrical appliance.

[0041] The embodiment of the present invention uses the UK-DALE dataset for training, verification and validation. The dataset records the total power and power of multiple electrical appliances of 5 British households, and records the total power consumption and electrical appliance power consumption once every 6 seconds. The embodiment of the present invention selects three on / off appliances: refrigerator, kettle and microwave oven, and two multi-state appliances (such appliances have multiple operating states): washing machine and dishwasher for experiment. The experiment was conducted in households 1, 2, and 5, of which households 1 and 5 were used for training (the first 20% of the validation set was taken), and household 2 was used for testing.

[0042] Table 1 Electrical parameter settings under UK-DALE dataset

[0043] Appliance Name Maximum operating power / W Start threshold / W Minimum opening time / s Minimum closing time / s Total Power 6000 \ \ \ refrigerator 300 50 10 2 Kettle 3100 2000 2 0 Micro-wave oven 1500 200 2 5 dishwasher 2500 50 300 300 washing machine 2500 20 300 26

[0044] The embodiment of the present invention uses five evaluation indicators to comprehensively evaluate the decomposition performance of the method, including mean absolute error (MAE), accuracy, precision, recall and F1 score.

[0045] Table 2 Non-invasive load decomposition evaluation indicators

[0046]

[0047] in and t are the predicted value and true value of the target appliance at time t, respectively. T is the total number of sample points. TP (True Positive) refers to the number of samples whose actual state is on and correctly predicted to be on. FN (False Negative) refers to the number of samples whose actual state is on but incorrectly predicted to be off. FP (False Positive) refers to the number of samples whose actual state is off but predicted to be on. TN (True Negative) refers to the number of samples whose actual state and predicted value are both off. The F1 value is the weighted average of precision and recall.

[0048] The embodiment of the present invention adopts five evaluation indicators to comprehensively evaluate the decomposition performance of the method, including mean absolute error (MAE), accuracy, precision, recall and F1 score, where the F1 score is the weighted average of precision and recall.

[0049] The experiment of the present invention adopts NVIDIARTX 2080Ti GPU 11.7GB video memory cloud server, and the software platform is Python 3.7 and pytorch deep learning framework.

[0050] The experimental results are as follows:

[0051] To verify the excellent performance of the present invention, a multi-index comparison is performed with S2P, BERT, VAE, Unet and DeepLab models, wherein S2P (Sequence to Point) is a sequence to point method; BERT model (Bidirectional Encoder Representations from Transformers) is a bidirectional Transformer method; VAE model (Variational Autoencoders) is a variational autoencoder method; Unet model is simple and easy to implement, suitable for small data sets; DeepLab uses atrous convolution, which can increase the receptive field without reducing the resolution of feature maps, so as to better capture multi-scale context information; wherein BERT, VAE, Unet and DeepLab models are all encoder-decoder structures. In the experiment, the data sets and experimental setting parameters used by all methods are the same, and the random settings are also the same to ensure the fairness of the comparative experiment. Because the regression network used by the present invention method is for regression tasks, the present invention is mainly described in terms of improving the effect on MAE. The results show that in the decomposition tasks for five kinds of household appliances, the average results of the present invention in mean absolute error (MAE), accuracy (Accuracy) and F1 score are the best. Compared with the five methods, the method of the present invention has improved by about 29% in the average value of MAE, and it has also improved by about 5% compared with the best method VAE among the five methods. The average value of F1 score of the method of the present invention has improved by about 12%. At the same time, for multi-state appliances dishwasher and washing machine, the average values ​​of MAE of the method of the present invention have improved by about 46% and 30% respectively compared with the five methods, and the overall average improvement is about 38%. The above shows that the overall performance of the present invention is better than other methods. The experimental results are shown in Table 3, where the best results are bolded, and the average results of each appliance on the test indicators are given in the last column of Table 3.

[0052] Table 3 Comparison of load decomposition results of different models under UK-DALE dataset

[0053]

[0054]

[0055] Figure 3 It is a comparison diagram of the actual active power of the dishwasher and the active power after decomposition of the model of the present invention. The horizontal axis is the time step, the vertical axis is the active power, the solid line is the actual active power curve of the dishwasher, and the dotted line is the active power curve obtained by algorithm decomposition.

[0056] Figure 4 It is a comparison diagram of the actual active power of the washing machine and the active power after decomposition of the model of the present invention. The horizontal axis is the time step, the vertical axis is the active power, the solid line is the actual active power curve of the washing machine, and the dotted line is the active power curve obtained by algorithm decomposition.

[0057] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.

Claims

1. A multi-state electrical load decomposition method based on improved Unet++, characterized in that: The following steps are involved: Step 1: Obtain the total aggregate power of the household and the low-frequency power data of each electrical device based on the smart meter; Step 2: Preprocess the low-frequency power data and divide the data into corresponding training sets, validation sets, and test sets according to the target electrical appliances; Step 3: Build a non-intrusive load decomposition network based on the improved Unet++; Step 4: Calculate the L2 reconstruction loss by the mean square error method, and then calculate the binary cross entropy loss by the BCE method, add the two loss functions to obtain the final loss function of the present invention, and use the Adam optimizer to optimize the model parameters; Step 5: Use the divided training set data to train the improved Unet++ non-intrusive load decomposition network, and use the divided validation set data to check the performance of the model during the training process; Step 6: Input the divided test set data into the trained non-intrusive load decomposition model to obtain the active power decomposition value of each electrical equipment and compare it with the true value. Finally, the model is evaluated by the mean absolute error, accuracy, precision, recall rate and F1 score indicators.

2. A multi-state electrical load decomposition method based on improved Unet++ according to claim 1, characterized in that: The step 3 adopts a dual encoder structure based on the Unet++ network, and uses a bidirectional LSTM layer in the last layer of the dual encoder instead of a traditional convolutional layer to extract sequence features.

3. The multi-state electrical load decomposition method based on improved Unet++ according to claim 2 is characterized in that: Each encoder consists of four custom convolution blocks and four maximum pooling layers, followed by a bidirectional LSTM layer. The first custom convolution block consists of 64 convolution kernels of dimension 3. The second custom convolution block consists of 128 convolution kernels of dimension 3. The third custom convolution block consists of 256 convolution kernels of dimension 3. The fourth custom convolution block consists of 512 convolution kernels of dimension 3. The stride of these convolution blocks is 1 and ReLU activation function is used. The pooling size of the maximum pooling layer is 2. The hidden layer size of the bidirectional LSTM layer is 256 and bidirectional processing is used. It also includes a decoder, which gradually restores time series features through multi-level upsampling and skip connection mechanisms, and fuses information from different levels; specifically, the upsampling layer includes four stages: the first stage reduces 512 channels to 256 channels; the second stage reduces 256 channels to 128 channels; the third stage reduces 128 channels to 64 channels; the fourth stage reduces 64 channels to 1 channel. Each upsampling layer is followed by a convolutional layer with a convolution kernel size of 3, a stride of 1, and a padding of 1; and finally the final output is generated through the last convolutional layer.

4. The multi-state electrical load decomposition method based on improved Unet++ according to claim 3 is characterized in that: The custom convolution block defines a module containing three identical convolutional layers, each of which contains a one-dimensional convolution, batch normalization, and a ReLU activation function; these layers are constructed according to the parameters during initialization, and an instance normalization layer is optionally added.

5. The multi-state electrical load decomposition method based on improved Unet++ according to claim 1 is characterized in that: The formula for calculating the L2 reconstruction loss by the mean square error method is: The formula for calculating the binary cross entropy loss using the BCE method is: The final loss function formula is: In the formula, N represents the total number of training samples, y i and They represent the true value and predicted result of the output power of the electrical equipment i corresponding to the training sample, represents the loss function.