A non-intrusive load identification method based on transfer learning

Through a transfer learning-based method, the ResNet50 network was pre-trained using ImageNet-1K and the U-Net network was fine-tuned to generate VI trajectories and Gram matrix feature images, which solved the problem of insufficient load data in newly built communities and improved the accuracy and generalization ability of non-intrusive load identification.

CN119131564BActive Publication Date: 2025-09-09HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The amount of power load data in newly built communities is relatively small, and the number of labeled samples is seriously insufficient, resulting in poor transfer learning results and low accuracy of non-invasive load identification.

Method used

A transfer learning-based method is adopted, using ImageNet-1K as the source domain for pre-training, and fine-tuning the intermediate domain data through the ResNet50 network to generate VI trajectories and Gram matrix feature images, which are then transferred to the U-Net network for load recognition in the target domain, and global fine-tuning is performed using a small amount of target domain data.

Benefits of technology

The accuracy and generalization ability of non-intrusive load identification are improved, the problem of large differences between the source domain and the target domain and the lack of labeled sample data in the target domain is solved, and the recognition effect of the model in the target domain is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131564B_ABST
    Figure CN119131564B_ABST
Patent Text Reader

Abstract

The present invention discloses a non-invasive 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, an image that fuses V-I trajectory and Gram matrix is ​​selected as the load feature. Since the image annotation quality of ImageNet-1K is high and covers a wide range of categories, 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 then all the weights of U-Net are trained using a small amount of target domain data. The trained network can be used for load identification. This method solves the problem of low recognition accuracy caused by the large difference between the source and target domains and the small number of load samples in newly built communities in transfer learning.
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-invasive load identification method, and in particular to a non-invasive load identification method based on transfer learning. Background Art

[0002] Non-Intrusive Load Monitoring (NILM) technology is a key component of the smart grid and plays a crucial role in the rational planning and utilization of electricity. Accurately understanding user electricity consumption can help the grid better dispatch power resources.

[0003] In recent years, deep learning algorithms have matured and been successfully applied in many fields. However, training deep neural networks requires large amounts of labeled data, and sample labeling is a time-consuming and labor-intensive task. Transfer learning techniques can alleviate this sample shortage problem by leveraging existing data in the source domain for network training and knowledge learning, and then transferring the learned knowledge to the target domain. Compared to traditional machine learning methods, transfer learning also relaxes the requirement for independent and identically distributed training data, and can achieve good transfer results with a small amount of target domain data. However, the performance of transfer learning is still affected by the similarity between the source and target domains and the amount of shared information. If the similarity is too low or the shared information is too little, it may lead to "negative transfer" in learning the target domain data.

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

[0005] In response to the shortcomings of the existing technology, the present invention proposes a non-invasive load identification method based on transfer learning. In order to better mine the time series information of load power and improve the differentiation of resistive loads, this method uses images that fuse VI trajectories and Gram matrices as load features. Since ImageNet-1K has high image annotation quality and covers a wide range of categories, it is used as the source domain. The loads of old and newly built residential communities are selected as the intermediate and target domains, 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. 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 and target domains and the small number of load sample data in newly built residential communities.

[0006] A non-intrusive load identification method based on transfer learning, the specific steps are as follows:

[0007] Step 1: Event Detection

[0008] 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, an event is detected.

[0009] Step 2: Obtain steady-state cycle data

[0010] Step 2.1: Select the last positive zero-crossing voltage value before the event occurs as the steady-state data end point, and take the current and voltage data 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 backward I after 、V after The cycle length is the time interval between two positive zero-crossing voltages.

[0011] 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, we can ensure that the discrete data points and the waveform fit as closely as possible. This constructs the interpolation function H(x) and forms continuous data that is close to the actual fluctuation shape:

[0012]

[0013] Among them, y k 、m k They are the functions at point x k The derivative and true value at α, n represents the number of sampling points in one cycle. k (x), β k (x) is the basis function used for Hermite interpolation:

[0014]

[0015] 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. The offset time △t is calculated, f represents the voltage frequency. The offset time △t is respectively compared with the steady-state voltage data V before and after the event. befor 、V afterAdd the time of the first positive zero-crossing voltage point in the sum to get the initial time, and then use the initial time as the starting point to interpolate the continuous data after step 2.2 for four cycles to get

[0016] 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 Then, the values ​​of the sampling points at the corresponding positions in each cycle are averaged, and the current and voltage data of 4 cycles are compressed into 1 cycle to obtain the steady-state cycle data.

[0017] Step 3: Generate VI trajectory binary graph

[0018] 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 onto a two-dimensional plane to form a VI trajectory.

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

[0020] Step 4: VI trajectory diagram of integrated active power

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

[0022] Step 5: Migrate from the source domain to the intermediate domain

[0023] Step 5.1: Use ImageNet-1K as the source dataset and construct a ResNet50 network to classify the images in the source dataset. Pre-train the ResNet50 network based on the image labels. The ResNet50 network consists of multiple stacked residual modules. Each residual module includes a main branch and a residual branch. The main branch includes two cascaded 3x3 convolutional layers, while the residual branch includes a 1x1 convolutional layer and a 3x3 convolutional layer. The output of the main branch and the output of the residual branch are added together to form the output of the residual block.

[0024] Step 5.2: Select the high-frequency load dataset as the intermediate domain dataset, generate the corresponding feature images using the methods of steps 1 to 4, and select a small number of intermediate domain feature images 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 closer to the VI trajectory features.

[0025] Step 6: Migrate from the intermediate domain to the target domain

[0026] 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. A small amount of load data to be identified in the target domain 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.

[0027] Step 7: Non-intrusive load identification

[0028] For unknown load data to be identified, a 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.

[0029] The present invention has the following beneficial effects:

[0030] 1. By fusing the weighted average pixel value features of the steady-state VI trajectory and the active power GAF graph, the time series information before and after the power data is mined, the image differentiation of the resistive load is improved, and the characteristics of the load are more comprehensively described. This solves the problems of insufficient differentiation of traditional VI trajectory binary images and easy confusion of some resistive loads, thereby improving the overall accuracy of non-intrusive load identification.

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

[0032] 3. Introducing electricity load data with known labels as the intermediate domain and fine-tuning the ResNet50 network. The weights of the convolutional layer of the trained ResNet50 network are assigned to the classification and recognition network U-Net. This can realize knowledge transfer when the similarity between the source domain and the target domain is low, solve the problems 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-invasive load identification, and can also improve the generalization ability of the recognition model. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1This is a schematic diagram of event detection for the CUSUM algorithm;

[0034] Figure 2 is a flow chart of steady-state data extraction in the embodiment;

[0035] Figure 3 The VI trajectory binary image generated in the embodiment;

[0036] Figure 4 To generate Gram matrix flow chart;

[0037] Figure 5 VI trajectory diagram of the fused active power generated in the embodiment;

[0038] Figure 6 Flowchart of transfer learning in the embodiment;

[0039] Figure 7 Graph showing the migration effects under different sample data amounts in the embodiment. DETAILED DESCRIPTION

[0040] The present invention is further explained below with reference to the accompanying drawings. In this embodiment, the WHITED dataset is used as the intermediate domain dataset to further train the pre-trained model. The PLAID_2018 dataset is used as the target domain dataset to simulate the power load data of a newly built cell. 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:

[0041] Step 1: Event Detection

[0042] like Figure 1 As shown in Figure 2, the CUSUM algorithm is used to detect bilateral events in the load time series from the intermediate domain dataset. If multiple switching events are detected within a short period of time, the interval between the switching events is compared with a set duration threshold. Multiple switching events that occur consecutively within the duration threshold are considered to be the same event.

[0043] Step 2: Obtain steady-state cycle data

[0044] 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, 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 backward Iafter 、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.

[0045] 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, we can ensure that the discrete data points and the waveform fit as closely as possible. This constructs the interpolation function H(x) and forms continuous data that is close to the actual fluctuation shape:

[0046]

[0047] Among them, y k 、m k They are the functions at point x k The derivative and true value at α, n represents the number of sampling points in one cycle. k (x), β k (x) is the basis function used for Hermite interpolation:

[0048]

[0049] 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. The offset time △t is calculated, f represents the voltage frequency. The offset time △t is respectively compared with the steady-state voltage data V before and after the event. befor 、V after Add the time of the first positive zero-crossing voltage point in the sum to get the initial time, and then use the initial time as the starting point to interpolate the continuous data after step 2.2 for four cycles to get The resampling frequency is consistent with the sampling frequency of the WHITED dataset.

[0050] 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 Then, the values ​​of the sampling points at the corresponding positions in each cycle are averaged, and the current and voltage data of 4 cycles are compressed into 1 cycle to obtain the steady-state cycle data.

[0051] Step 3: Generation of VI trajectory binary image

[0052] Step 3.1: Normalize the voltage and current data obtained in the steady-state period in step 2 so that their values ​​are in the range [0, 1], and then map them onto a two-dimensional plane to form a VI trajectory.

[0053] 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 Figure 2. Figure 3 shown.

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

[0055] Step 4: VI trajectory diagram of integrated active power

[0056] like Figure 4 As 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 each 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 into a three-channel image, and the weighted average of the pixel values ​​at the corresponding positions in the Gram matrix is ​​performed. 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, as shown in the figure. Figure 5 shown.

[0057] Step 5: Migrate from the source domain to the intermediate domain

[0058] Step 5.1: Use ImageNet-1K as the source dataset and construct a ResNet50 network to classify the images in the source dataset. The ResNet50 network consists of multiple stacked residual modules. Each residual module includes a main branch and a residual branch. The main branch includes two cascaded 3x3 convolutional layers, while the residual branch includes a 1x1 convolutional layer and a 3x3 convolutional layer. The output of the main branch and the output of the residual branch are added together to form the output of the residual block.

[0059] The convolutional layers in the ResNet50 model use local connections and weight sharing:

[0060]

[0061] in, is the output result of the j-th convolution kernel of the l-th convolution layer, represents the output feature map of the l-1th convolutional layer, is the convolution kernel matrix; M j represents the set of selected input feature maps, For bias.

[0062] 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 feature map. A fully connected layer with 1024 neurons is then added, along with a ReLu nonlinear activation function and a Softmax classifier. This layer calculates the probability that the input image belongs to different categories, with the number of nodes outputted being the number of categories in the intermediate domain dataset. The Softmax classifier's output is compared with the label corresponding to the input image to pre-train the ResNet50 model.

[0063] 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.

[0064] Step 6: Migrate from the intermediate domain to the target domain

[0065] A U-Net network was constructed, consisting of an encoder and a decoder. The encoder includes eight convolutional layers. As the network depth increases, the number of feature channels doubles with each layer, resulting in the number of convolution kernels in each convolution layer being 64, 64, 128, 128, 256, 256, 512, and 512, respectively. A 3x3 convolutional layer with a depth of 512 was added at the end of the encoder to maintain the spatial dimensions of the feature map, and a ReLU activation function was applied. The decoder has a symmetrical structure to the encoder. As the decoder depth increases, the number of feature channels is gradually halved, resulting in the number of convolution kernels in each convolution layer being 512, 512, 256, 256, 128, 128, 64, and 64, respectively.

[0066] Add a Flatten layer and a fully connected layer to 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, as shown in the following example: Figure 6 shown.

[0067] The VI trajectory diagram and the VI trajectory diagram integrated with active power are used as the load features of the kettle and coffee machine respectively 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:

[0068]

[0069] Table 1

[0070] The table shows that the similarity values ​​for the VI traces of the kettle and coffee machine are close to 1, indicating that their VI traces are very similar. Using the VI traces directly as load signature data would make it difficult to distinguish them during subsequent load identification. However, when the VI GAF traces are used as the load signature for both appliances, the similarity value is 0.64, which allows for better differentiation between resistive loads with similar steady-state current waveforms and VI traces.

[0071] 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 as follows: Figure 7 As shown in the figure, when the target domain has only about 10 samples, the model overfits. This is because the sample data is too small, and the model may only learn part of the data and fail to generalize to new or unseen data. However, when the target domain has 20 samples, the model converges quickly and reaches a stable state after about 15 iterations, achieving an accuracy of 98%. When the target domain has about 30 samples, it reaches a stable state after about 19 iterations.

[0072] 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:

[0073]

[0074]

[0075] Table 2

[0076] Among them, P re , R, and F1 represent the 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 by: Use the power load data of the old residential area as the intermediate domain data, extract the features of the intermediate domain data for further training of the model pre-trained with the source domain data. The specific steps are as follows: Step 1: Use the CUSUM algorithm to detect events on the power load data from the intermediate domain. The steady-state periodic data before and after the event is intercepted and normalized so that the voltage and current values ​​are distributed between [0, 1]. The data is then mapped onto a two-dimensional plane to form a VI trajectory. The plane containing the VI trajectory is divided into 2n × 2n grids. 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 binary graph of the VI trajectory. The power sequence corresponding to the steady-state period is converted into a Gram matrix. The VI trajectory binary image is copied into a three-channel image, and the weighted average of the pixel values ​​at the corresponding positions in the Gram matrix is ​​performed. The superimposed pixel values ​​are limited to between 0 and 255 to obtain the VI trajectory image fused with active power, which is used as the characteristic image of the load data. Step 2: Migrate from the source domain to the intermediate domain Image data is selected as the source domain data to pre-train the ResNet50 network; then a small number of feature images from the intermediate domain are selected 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 layers 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 the load identification network to output the load identification results. A small amount of load data to be identified is collected, manually annotated, and then 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, and the corresponding load identification result is obtained from the output end.

2. A non-intrusive load identification method based on transfer learning as claimed in claim 1, 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 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 backward 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 shape; Perform Fourier decomposition on the continuous voltage data obtained by interpolation to obtain the initial phase of the voltage fundamental wave Calculate offset time f represents the voltage frequency; the offset time △t is respectively compared with the steady-state voltage data V before and after the event. befor 、V after The time of the first positive zero-crossing voltage point in the sum 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 Then, the values ​​of the sampling points at the corresponding positions in each cycle are averaged, and the current and voltage data of 4 cycles are compressed into 1 cycle to obtain the steady-state cycle data.

3. The non-intrusive load identification method based on transfer learning according to claim 2, characterized in that: The interpolation function H(x) is: Among them, y k 、m k They are the functions at point x k The derivative and true value at , n represents the number of sampling points in one cycle; α k (x), β k (x) is the basis function used for Hermite interpolation:

4. The non-intrusive load identification method based on transfer learning according to claim 1, characterized in that: The ResNet50 network includes multiple stacked residual modules, each of which includes a main branch and a residual branch. The main branch includes two cascaded 3x3 convolutional layers, while the residual branch includes a 1x1 convolutional layer and a 3x3 convolutional layer. The output of the main branch and the output of the residual branch are added together as the output of the residual module. 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, along with the ReLu nonlinear activation function and the Softmax classifier 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.

5. The non-intrusive load identification method based on transfer learning according to 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 convolution layer is 64, 64, 128, 128, 256, 256, 512, and 512 respectively; a convolution 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 convolution 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

  • 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