Non-intrusive load identification method based on transfer transfer learning

Through the method based on transfer transfer learning, combined with V-I trajectory and Gramma matrix image features, the problem of insufficient load data in new cells is solved, the accuracy of non-invasive load recognition and model generalization capabilities are improved, and the source domain and Effective identification in the case of large differences in the target domain.

CN119131564AActive Publication Date: 2024-12-13HANGZHOU DIANZI UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411042518.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-12-13
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

In non-invasive load recognition, the amount of power load data in the newly built cell is small, and the labeling samples are seriously insufficient, resulting in poor transfer learning effect and low recognition accuracy, especially when the source and target domains are too large.

Method used

Using a method based on transfer transfer learning, ImageNet-1K is used as the source domain, and the ResNet50 network is pre-trained and fine-tuned to adapt to the intermediate domain data, and then the weights are migrated to the U-Net network, combining the V-I trajectory and the Gramma matrix Image features, non-invasive load recognition. Specific steps include event detection, steady-state periodic data extraction, Hermite interpolation, Fourier decomposition, V-I trajectory binary map generation, fused active power feature image generation, and transfer learning from source domain to intermediate domain and intermediate domain to target domain.

Benefits of technology

Improve the accuracy of non-invasive load recognition and model generalization ability, solve the problem of too large differences between source and target domains and too few sample data for target domains, enhance the differential description of resistive loads, and reduce the Reliance on target domain annotation data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131564A_ABST
    Figure CN119131564A_ABST
Patent Text Reader

Abstract

The invention discloses a non-intrusive load identification method based on transfer transfer learning. In order to better mine time sequence information of load power and improve the difference of resistive loads, an image fusing a V-I track and a Gramer matrix is selected as a load feature. The ImageNet-1K is high in image labeling quality and wide in coverage category, so that the ImageNet-1K is used as a source domain. And respectively selecting loads of the old cell and the new cell as a middle domain and a target domain. The method comprises the following steps: firstly, pre-training ResNet50 by using a source domain, and finely adjusting the weight of a convolutional layer of a pre-training model through a small amount of intermediate domain data; and assigning the obtained weight to an encoder part composed of ResNet50 in the target domain U-Net network, and training all weights of the U-Net by using a small amount of target domain data. And load identification can be carried out on the trained network. According to the method, the problem of low identification precision caused by too large difference between the source domain and the target domain and few load samples of the newly built cell in transfer learning is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of smart grids and relates to a non-intrusive load identification method, and in particular to a non-intrusive load identification method based on transfer learning. Background Art

[0002] Non-Intrusive Load Monitoring (NILM) technology is an important component of smart grids and is of great significance for the rational planning and utilization of electric energy. Accurately understanding the user's electric energy consumption can help the power grid better dispatch power resources.

[0003] In recent years, deep learning algorithms have gradually matured and have been successfully applied in many fields. However, training deep neural networks requires a large amount of labeled data, and sample labeling is a time-consuming and laborious task. Transfer learning technology can alleviate the problem of insufficient samples, use existing data in the source domain to train the network and learn knowledge, and transfer the learned knowledge to the target domain. Compared with traditional machine learning methods, transfer learning also relaxes the requirement for independent and identically distributed training data, and can achieve better transfer effects with a small amount of target domain data. However, the performance of transfer learning is still affected by the similarity between the source domain and the target domain and the amount of shared information. If the similarity is too low and the shared information is too little, it may cause "negative transfer" phenomenon in the learning of target domain data.

[0004] In addition, in the actual application of non-intrusive load identification, due to the small amount of power load data in newly built communities and the serious shortage of labeled samples, the transfer learning effect cannot meet the requirements and is difficult to use, resulting in poor recognition effect. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention proposes a non-intrusive load identification method based on transfer learning. In order to better mine the time series information of load power and improve the difference of resistive load, this method uses the image of fusion VI trajectory and Gram matrix as the load feature. Since the image annotation quality of ImageNet-1K is high and the coverage category is wide, it is used as the source domain. The loads of old and newly built communities are selected as the intermediate domain and target domain respectively. First, ResNet50 is pre-trained using the source domain, and the convolutional layer weights of the pre-trained model are fine-tuned using a small amount of intermediate domain data. The obtained weights are assigned to the encoder part composed of ResNet50 in the target domain U-Net network, and finally all the weights of the U-Net network are trained using a small amount of target domain data. This solves the problem of low recognition accuracy caused by the large difference between the source domain and the target domain and the small number of load sample data in the newly built residential area.

[0006] A non-intrusive load identification method based on transfer learning, the specific steps are as follows: Step 1: Event Detection The CUSUM algorithm is used to perform bilateral event detection on the load time series from the intermediate domain data. Continuous electrical signal information or errors are accumulated to amplify the change signal. When the accumulated value exceeds the set threshold, it is detected as an event.

[0007] Step 2: Obtain steady-state cycle data Step 2.1: Select the last positive zero-crossing voltage value before the event occurs as the steady-state data termination point, and take the current and voltage data I of six cycles forward. before 、V before ; Select the first positive zero-crossing voltage value after the event occurs as the starting point of the steady-state data, and take the current and voltage data of six cycles backwards I after 、V after The cycle length is the time interval between two positive zero-crossing voltages.

[0008] Step 2.2: Use the Hermite interpolation method to connect these discrete data points. By calculating the slope at each data point and using this slope as part of the interpolation information, the interpolation function H(x) is constructed to ensure that the discrete data points and the waveform fit as closely as possible, forming continuous data that is close to the actual fluctuation shape: in, , The functions at points The derivative and true value at , n represents the number of sampling points in one cycle. , is the basis function used for Hermite interpolation:

[0009] Step 2.3: Perform Fourier decomposition on the continuous voltage data obtained after interpolation in step 2.2 to obtain the initial phase of the voltage fundamental wave. , calculate the offset time , , f represents the voltage frequency. The steady-state voltage data V before and after the event respectively befor 、V after The time of the first positive zero-crossing voltage point in is added to obtain the initial time, and then the initial time is used as the starting point to interpolate the continuous data after step 2.2 for four cycles to obtain .

[0010] Step 2.4: In order to obtain the current and voltage data that generate the event action, the resampled data Process the sampling points in sequence and calculate and , and then average the values ​​of the sampling points at the corresponding positions in each cycle, compress the current and voltage data of 4 cycles into 1 cycle, and obtain the steady-state cycle data.

[0011] Step 3: Generate VI trajectory binary graph Step 3.1: Normalize the steady-state periodic data obtained in step 2 so that the voltage and current values ​​are distributed between [0, 1], and then map them to a two-dimensional plane to form a VI trajectory.

[0012] Step 3.2: Divide the plane where the VI trajectory is located into two n ×2 n The current and voltage values ​​in each grid are judged. When the current and voltage values ​​in the grid are both positive, the pixel value of the grid is set to 1, otherwise it is set to 0, forming a VI trajectory binary graph.

[0013] Step 4: VI trajectory diagram of active power integration The power sequence corresponding to the steady-state period is converted into a Gram matrix. The VI trajectory binary image obtained in step 3 is copied as a three-channel image, and the pixel values ​​at the corresponding positions in the Gram matrix are weighted averaged, and the superimposed pixel value size is limited to between 0 and 255, and the VI trajectory image fused with active power is obtained as the characteristic image of the load data.

[0014] Step 5: Migrate from the source domain to the intermediate domain Step 5.1, select ImageNet-1K as the source domain data set, build a ResNet50 network to classify the images in the source domain data set, and complete the pre-training of the ResNet50 network according to the image labels. The ResNet50 network includes multiple stacked residual modules, each residual module includes a main branch and a residual branch, wherein the main branch includes two cascaded 3x3 convolutional layers, and the residual branch includes a 1x1 convolutional layer and a 3x3 convolutional layer, and the output of the main branch and the output of the residual branch are added as the output of the residual block.

[0015] Step 5.2: Select the high-frequency load dataset as the intermediate domain dataset, generate the corresponding feature images through the methods of steps 1 to 4, select a small number of feature images of the intermediate domain to fine-tune the convolutional layer of the ResNet50 network pre-trained in step 5.1, so that it can continuously learn rich underlying features and bring high-level features close to the VI trajectory features.

[0016] Step 6: Migrate from the intermediate domain to the target domain The weights of the convolutional layer of the ResNet50 network trained in step 5 are transferred to the encoder of the U-Net network. The U-Net network is used as a load identification network to collect a small amount of load data to be identified in the target domain. After manual labeling, all layers of the U-Net network are trained using global fine-tuning to complete the migration from the intermediate domain to the target domain.

[0017] Step 7: Non-intrusive load identification For unknown load data to be identified, the feature image is generated according to the method of steps 1 to 4, and then input into the U-Net network trained in step 6 to obtain the corresponding load identification result from the output end.

[0018] The present invention has the following beneficial effects: 1. By fusing the pixel value weighted average feature of the steady-state VI trajectory and the active power GAF graph, the timing information before and after the power data is mined, the image difference of the resistive load is improved, and the characteristics of the load are described more comprehensively. The problem of insufficient distinction of the traditional VI trajectory binary image and easy confusion of some resistive loads is solved, thereby improving the overall accuracy of non-invasive load identification.

[0019] 2. ImageNet-1K, which has high image annotation quality and wide coverage, is selected as the source domain. The network model pre-trained on it can obtain rich underlying features through a large amount of image data information, ensuring that the pre-trained model can learn accurate and useful feature representations.

[0020] 3. Introducing electricity load data with known labels as the intermediate domain and fine-tuning the ResNet50 network, assigning the weights of the trained convolutional layer of the ResNet50 network to the classification recognition network U-Net, which can realize the transfer of knowledge when the similarity between the source domain and the target domain is low, solve the problem of large differences between the source domain and the target domain and too few labeled sample data in the target domain, improve the performance of the model in the target domain, play a significant role in improving the accuracy of non-intrusive load identification, and can also improve the generalization ability of the recognition model. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is a schematic diagram of event detection of the CUSUM algorithm; Figure 2 is a steady-state data extraction flow chart in the embodiment; Figure 3 It is a binary image of the VI trajectory generated in the embodiment; Figure 4 To generate the Gram matrix flow chart; Figure 5It is a VI trajectory diagram of the fused active power generated in the embodiment; Figure 6 It is a flow chart of transfer learning in the embodiment; Figure 7 It is a diagram of the migration effect under different sample data amounts in the embodiment. DETAILED DESCRIPTION

[0022] The present invention is further explained below in conjunction with the accompanying drawings; in this embodiment, the WHITED dataset is used as the intermediate domain dataset to further train the pre-trained model, and the PLAID_2018 dataset is used as the target domain dataset to simulate the power load data of the newly built community. On this basis, an experiment is conducted to test the effectiveness of a non-intrusive load identification method based on transfer learning. The specific steps are as follows: Step 1: Event Detection like Figure 1 As shown in Figure 1, the CUSUM algorithm is used to detect bilateral events in the load time series from the intermediate domain data set. If multiple switching events are detected in a short period of time, the interval between the switching events is compared with the set duration threshold, and multiple switching events that occur continuously within the duration threshold are identified as the same event.

[0023] Step 2: Obtain steady-state cycle data Step 2.1: The steady-state data is the voltage and current data of the load in a stable operating state before and after the event occurs. Figure 2 As shown in the figure, the time interval between two positive zero-crossing voltages is taken as the length of a cycle, the last positive zero-crossing voltage value before the event occurs is selected as the end point of the steady-state data, and the current and voltage data I of the six cycles forward are taken. before 、V before ; Select the first positive zero-crossing voltage value after the event occurs as the starting point of the steady-state data, and take the current and voltage data of six cycles backwards I after 、V after This ensures that the intercepted data can cover the characteristics before and after the event, while avoiding the acquisition of transient data during the event.

[0024] Step 2.2: Use the Hermite interpolation method to connect these discrete data points. By calculating the slope at each data point and using this slope as part of the interpolation information, the interpolation function H(x) is constructed to ensure that the discrete data points and the waveform fit as closely as possible, forming continuous data that is close to the actual fluctuation shape: in, , The functions at points The derivative and true value at , n represents the number of sampling points in one cycle. , is the basis function used for Hermite interpolation:

[0025] Step 2.3: Perform Fourier decomposition on the continuous voltage data obtained after interpolation in step 2.2 to obtain the initial phase of the voltage fundamental wave. , calculate the offset time , , f represents the voltage frequency. The steady-state voltage data V before and after the event respectively befor 、V after The time of the first positive zero-crossing voltage point in is added to obtain the initial time, and then the initial time is used as the starting point to interpolate the continuous data after step 2.2 for four cycles to obtain , the resampling frequency is consistent with the sampling frequency of the WHITED dataset.

[0026] Step 2.4: In order to obtain the current and voltage data that generate the event action, the resampled data Process the sampling points in sequence and calculate and , and then average the values ​​of the sampling points at the corresponding positions in each cycle, compress the current and voltage data of 4 cycles into 1 cycle, and obtain the steady-state cycle data.

[0027] Step 3: Generation of VI trajectory binary image Step 3.1: Normalize the voltage and current data in the steady-state period obtained in step 2 so that their value range is between [0, 1], and then map them to a two-dimensional plane to form a VI trajectory.

[0028] Step 3.2, divide the plane where the VI trajectory is located into 32×32 grids, and each grid is used as a pixel point in the image. The current value and voltage value in each grid are judged. When the current value and voltage value in the grid are both positive, the pixel value of the grid is set to 1, otherwise it is set to 0, forming a VI trajectory binary image. The VI trajectory binary images of different electrical appliances extracted in this embodiment are shown in FIG. Figure 3 shown.

[0029] As an embodiment, the plane where the VI track is located is divided into 30×30 grids or 64×64 grids.

[0030] Step 4: VI trajectory diagram of active power integration like Figure 4As shown in the figure, the power sequence corresponding to the steady-state period is normalized, and then the sequence in the Cartesian coordinate system is converted into a sequence in the polar coordinate system. Finally, the trigonometric cosine sum between every two points is used to identify the time correlation of different time intervals to generate a Gram matrix. The VI trajectory binary image obtained in step 3 is copied as a three-channel image, and the pixel values ​​at the corresponding positions in the Gram matrix are weighted averaged, and the superimposed pixel values ​​are limited to between 0 and 255. The VI trajectory image fused with active power is obtained as the characteristic image of the load data, as shown in Figure 5 shown.

[0031] Step 5: Migrate from the source domain to the intermediate domain Step 5.1, select ImageNet-1K as the source domain dataset, and build a ResNet50 network to classify the images in the source domain dataset. The ResNet50 network includes multiple stacked residual modules, each residual module includes a main branch and a residual branch, wherein the main branch includes two cascaded 3x3 convolutional layers, and the residual branch includes a 1x1 convolutional layer and a 3x3 convolutional layer, and the output of the main branch and the output of the residual branch are added as the output of the residual block.

[0032] The convolutional layers in the ResNet50 model use local connections and weight sharing: in, is the output result of the jth convolution kernel of the lth convolution layer, represents the output feature map of the l-1th convolutional layer, is the convolution kernel matrix; represents the set of selected input feature maps, For bias.

[0033] Add a global average pooling layer after the ResNet50 model to convert the high-dimensional feature map into a one-dimensional vector by averaging all pixels in the entire feature map. Then add a fully connected layer with 1024 neurons, and add the ReLu nonlinear activation function and Softmax classifier to calculate the probability that the input image belongs to different categories. The number of nodes output is the number of categories in the intermediate domain data set. Compare the output of the Softmax classifier with the label corresponding to the input image to pre-train the ResNet50 model.

[0034] Step 5.2: Select a small amount of data from the WHITED dataset to fine-tune the weights of the convolutional layer of the ResNet50 model pre-trained in step 5.1.

[0035] Step 6: Migrate from the intermediate domain to the target domain Construct a U-Net network, including an encoder and a decoder. The encoder includes 8 convolutional layers. As the network depth increases, the number of feature channels doubles in each layer, so the number of convolution kernels in each convolution layer is 64, 64, 128, 128, 256, 256, 512, 512. Add a convolution layer of size 3x3 and depth 512 at the end of the encoder to keep the spatial dimension of the feature map unchanged, and apply the ReLU activation function. The structure of the decoder is symmetrical with that of the encoder. As the depth of the decoder increases, the number of feature channels is gradually halved, and the number of convolution kernels in each convolution layer is 512, 512, 256, 256, 128, 128, 64, 64.

[0036] Add a Flatten layer and a fully connected layer at the end of the U-Net network, where the number of neurons in the fully connected layer is 128. Use the ReLu activation function for nonlinear transformation, and output the load category through the Softmax classifier. Transfer the weights of the convolutional layer of the ResNet50 network trained in step 5 to the encoder of the U-Net network. Select part of the target domain dataset from the PLAID_2018 dataset for training, and use the U-Net network as a classification recognition network, such as Figure 6 shown.

[0037] The VI trajectory diagram and the VI trajectory diagram integrated with active power are used as the load characteristics of the kettle and the coffee machine for comparison and verification. The similarity measurement index obtained by the Gaussian similarity function is used to evaluate the feature selection results. The results are shown in Table 1: Table 1 From the table data, we can see that the similarity values ​​of the VI traces of the kettle and the coffee machine are close to 1, indicating that the VI traces of the two are very similar. If the VI trace is directly used as the load characteristic data, it will be difficult to distinguish them in the subsequent load identification process. When the VI GAF trace is selected as the load characteristic of the two appliances, the similarity value is 0.64, which can better distinguish the resistive load with similar characteristics of the steady-state current waveform and VI trace.

[0038] The loss function value and accuracy are used to verify the dependence of this method on the number of target domain training data. The migration effect is compared for the same pre-trained model when the number of training data from the intermediate domain dataset is 30 and the number of target domain data is 10, 20, and 30. The results are shown in Figure 2. Figure 7As shown in the figure, when the number of samples in the target domain is only about 10, the model is overfitting. This is because the sample data is too small and the model may only learn part of the data information and cannot generalize to new or unseen data. However, when the target domain data has 20 samples, the model can converge quickly and enter a stable state after about 15 iterations, reaching an accuracy of 98%; when the number of samples in the target domain is about 30, it enters a stable state after about 19 iterations.

[0039] In order to verify the effectiveness of this method, the recognition results of the load data in the target domain dataset using different migration schemes are compared when 30 samples are selected in the intermediate domain dataset and 20 samples are selected in the target domain dataset: Table 2 Among them, Pre, R, and F1 represent PR curve, recall rate, and F1 score respectively. It can be seen that the recognition accuracy of this method is greatly improved compared with the traditional algorithm, reducing the dependence on the labeled data of the target domain.

Claims

1. A non-intrusive load identification method based on transfer learning, characterized in that: The power load data of the old community is used as the intermediate domain data, and the features of the intermediate domain data are extracted for further training of the model pre-trained with the source domain data. The specific steps are as follows: Step 1: Generate a binary VI trajectory graph and a Gram matrix of the switching event for the power load data from the intermediate domain, and obtain a VI trajectory graph fused with active power by pixel superposition as a feature image of the power load data; Step 2: Migrate from the source domain to the intermediate domain Select image data as source domain data to pre-train the ResNet50 network; then select a small number of feature images from the intermediate domain to fine-tune the convolutional layer of the pre-trained ResNet50 network; Step 3: Migrate from the intermediate domain to the target domain The weights of the convolutional layer of the ResNet50 network trained in step 2 are transferred to the encoder of the U-Net network. The U-Net network is used as a load identification network to output the load identification results. A small amount of load data to be identified is collected. After manual labeling, all layers of the U-Net network are trained using global fine-tuning to complete the migration from the intermediate domain to the target domain. Step 4: Non-intrusive load identification For unknown load data to be identified, its feature image is generated and then input into the U-Net network trained in step six to obtain the corresponding load identification result from the output end.

2. A non-intrusive load identification method based on transfer learning as claimed in claim 1, characterized in that: The CUSUM algorithm is used to detect events in power load data, and the steady-state periodic data before and after the event is intercepted to generate the VI trajectory binary graph and Gram matrix.

3. A non-intrusive load identification method based on transfer learning as claimed in claim 2, characterized in that: Select the last positive zero-crossing voltage value before the event occurs as the steady-state data termination point, and take the current and voltage data I of six cycles forward. before 、V before ; Select the first positive zero-crossing voltage value after the event occurs as the starting point of the steady-state data, and take the current and voltage data of six cycles backwards I after 、V after ; The cycle length is the time interval between two positive zero-crossing voltages; The interpolation function H(x) is constructed using the Hermite interpolation method to connect discrete data points to form continuous data that is close to the actual fluctuation pattern. Perform Fourier decomposition on the continuous voltage data obtained by interpolation to obtain the initial phase of the voltage fundamental wave , calculate the offset time , f represents the voltage frequency; the offset time The steady-state voltage data V before and after the event respectively befor 、V after The time of the first positive zero-crossing voltage point in is added to obtain the initial time, and then the initial time is used as the starting point to resample the interpolated continuous data for four cycles to obtain , process the sampling points in sequence and calculate and , and then average the values ​​of the sampling points at the corresponding positions in each cycle, compress the current and voltage data of 4 cycles into 1 cycle, and obtain the steady-state cycle data.

4. The non-intrusive load identification method based on transfer learning as claimed in claim 1, characterized in that: The interpolation function H(x) is: in, , The functions at points The derivative and true value at , n represents the number of sampling points in one cycle; , is the basis function used for Hermite interpolation: 。 5. The non-intrusive load identification method based on transfer learning as claimed in claim 1, characterized in that: The steady-state periodic data is normalized so that the voltage and current values ​​are distributed between [0,1], and then mapped to a two-dimensional plane to form a VI trajectory; the plane where the VI trajectory is located is divided into 2n×2n grids; the current value and voltage value in each grid are judged, and when the current value and voltage value in the grid are both positive, the pixel value of the grid is set to 1, otherwise it is set to 0, forming a VI trajectory binary image; Convert the power sequence corresponding to the steady-state period into a Gram matrix; The VI trajectory binary image is copied into a three-channel image, and the pixel values ​​at the corresponding positions in the Gram matrix are weighted averaged. The superimposed pixel value is limited to between 0 and 255, and the VI trajectory image fused with active power is obtained as the characteristic image of the load data.

6. A non-intrusive load identification method based on transfer learning as claimed in claim 1, characterized in that: The ResNet50 network includes multiple stacked residual modules, each residual module includes a main branch and a residual branch, wherein the main branch includes two cascaded 3x3 convolutional layers, and the residual branch includes a 1x1 convolutional layer and a 3x3 convolutional layer, and the output of the main branch and the output of the residual branch are added as the output of the residual block; A global average pooling layer is added after the ResNet50 model to convert the high-dimensional feature map into a one-dimensional vector by averaging all pixels in the entire feature map. A fully connected layer with 1024 neurons is then added, and the ReLu nonlinear activation function and Softmax classifier are added to calculate the probability that the input image belongs to different categories. The number of output nodes is the number of categories in the intermediate domain dataset.

7. The non-intrusive load identification method based on transfer learning as claimed in claim 1, characterized in that: The U-Net network includes an encoder and a decoder; the encoder includes 8 convolutional layers, and the number of convolution kernels in each convolutional layer is 64, 64, 128, 128, 256, 256, 512, and 512 respectively; a convolutional layer with a size of 3x3 and a depth of 512 is added at the end of the encoder to keep the spatial dimension of the feature map unchanged, and a ReLU activation function is applied; the structure of the decoder is symmetrical with that of the encoder, and the number of convolution kernels in each convolutional layer is 512, 512, 256, 256, 128, 128, 64, and 64 respectively; A Flatten layer and a fully connected layer are added to the end of the U-Net network. The number of neurons in the fully connected layer is 128. The ReLu activation function is used for nonlinear transformation, and the load category is output through the Softmax classifier.

Citation Information

Patent Citations

  • Power consumer load identification method and device and computer readable medium

    CN113076985A

  • Non-intrusive load identification method based on Grubrum angle difference field feature fusion

    CN116127409A

  • Non-intrusive load identification method based on time sequence imaging and deep learning

    CN117315434A

  • Non-intrusive load identification method based on multi-dimensional feature fusion image

    CN117726909A

  • Non-Intrusive Load Decomposition Method Based on Informer Model Coding Structure

    US20220397874A1