A non-intrusive load decomposition method based on clustering and CNN-BiGRU algorithm

By simplifying the load decomposition task into a classification task, and combining a deep learning model with clustering and CNN-BiGRU algorithms, the problem of low accuracy in non-intrusive load monitoring is solved, and more efficient power load decomposition is achieved.

CN115828126BActive Publication Date: 2025-11-14STATE GRID JIANGXI ELECTRIC POWER CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211553335.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-06
Publication Date
2025-11-14
Estimated Expiration
2042-12-06

AI Technical Summary

Technical Problem

Traditional invasive load monitoring is costly and complex to implement, while non-invasive load monitoring has low accuracy and is difficult to effectively decompose the components of electrical load.

Method used

The clustering algorithm simplifies the load decomposition task into a classification task, and the CNN-BiGRU algorithm is combined with a deep learning model to perform non-intrusive load monitoring, thereby improving the decomposition accuracy.

Benefits of technology

By combining clustering and the CNN-BiGRU algorithm, the difficulty of decomposition is reduced and the decomposition accuracy of non-invasive load monitoring is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115828126B_ABST
    Figure CN115828126B_ABST
Patent Text Reader

Abstract

A non-intrusive load decomposition method based on clustering and CNN-BiGRU algorithms includes the following steps: data preprocessing; data clustering; using time series data as input and one-hot codes as output to build a CNN-BiGRU algorithm model, and using a state count judgment module and a zero-padding module to optimize the CNN-BiGRU algorithm model to obtain a deep learning model; feeding the time series data and one-hot codes into the deep learning model for training and iteration, and adjusting the internal parameters of the deep learning model to obtain a trained model; feeding the total power sequence data at the current time into the trained model to obtain the state probability distribution matrix corresponding to each device at the current time, and comparing the state probability distribution matrix with the load clustering-coding table to obtain the power value corresponding to each device. By using a clustering algorithm to simplify the decomposition task into a classification task, the decomposition difficulty is reduced, and then using a deep learning model to perform NILM studies on the load, the decomposition accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of load monitoring technology, and in particular to a non-intrusive load decomposition method based on clustering and CNN-BiGRU algorithm. Background Technology

[0002] Load monitoring can generally be divided into two types: intrusive load monitoring (ILM) and non-intrusive load monitoring (NILM). Traditional ILM requires the installation of sensors on each device, resulting in poor practicality, high implementation costs, and low user acceptance. NILM, first proposed by Hart in the 1980s, only requires the installation of a monitoring device at the user's inlet to collect total load information and decompose the load components. Compared to ILM, NILM technology has advantages in cost and subsequent maintenance, but its decomposition accuracy is relatively lower. Summary of the Invention

[0003] Based on this, the purpose of this invention is to provide a non-intrusive load decomposition method based on clustering and CNN-BiGRU algorithms. By using clustering algorithms, the decomposition task is simplified into a classification task to reduce the difficulty of decomposition. Then, by using a deep learning model to perform NILM studies on the load, the decomposition accuracy is improved.

[0004] A non-intrusive load decomposition method based on clustering and CNN-BiGRU algorithm includes the following steps:

[0005] Step S11: The normalized raw collected dataset is sliced ​​into time windows to form time series data;

[0006] Step S12: The K-means++ algorithm is used to cluster each device to obtain the load clustering-coding table, and the clustering state power obtained in the load clustering-coding table is used to replace the fluctuation power to generate a one-hot code;

[0007] Step S13: Using the CNN-BiGRU algorithm, time series data is taken as input and one-hot codes are taken as output to build a CNN-BiGRU algorithm model. The CNN-BiGRU algorithm model is then optimized using a state count determination module and a zero-padding module to obtain a deep learning model. The CNN-BiGRU algorithm model is...

[0008]

[0009] in, Let x represent the unique hot code of the i-th device at time t, n represent the number of devices, g(·) represent the CNN-BiGRU algorithm, and x t Represents the total power sequence vector at time t;

[0010] Step S14: Input the time series data and one-hot code into the deep learning model for training and iteration, and adjust the internal parameters of the deep learning model to obtain the trained model.

[0011] Step S15: Input the total power sequence data at the current moment into the training model to obtain the state probability distribution matrix corresponding to each device at the current moment, and compare the state probability distribution matrix with the load clustering-encoding table to obtain the power value corresponding to each device.

[0012] Further, step S11 specifically includes:

[0013] Step S111: Fill in the missing metal values ​​in the original dataset to form a complete dataset;

[0014] Step S112: Normalize the complete dataset to form normalized data. The normalization formula is:

[0015]

[0016] Where x′ represents the obtained result, x represents the true value, and x min x max These represent the minimum and maximum values, respectively.

[0017] Step S113: Slice the normalized data into time series data using time windows. The slicing formula is as follows:

[0018] x t =[y t-L+1 ,y t-L+2 ,...,y t ];

[0019] Where, x t Let y represent the total power time series vector at time t, where L represents the sequence length. t This indicates the power value.

[0020] Further, step S12 specifically includes:

[0021] Step S121: Randomly select the first cluster center;

[0022] Step S122: Calculate the shortest distance D(x) between each sample point and the cluster center. i Specifically:

[0023]

[0024] Where, x i c represents the coordinates of the i-th sample point. j Let represent the coordinates of the j-th cluster center, k represent the number of determined cluster centers, and ||·|| represent the Euclidean distance;

[0025] Step S123, calculate the probability that each sample point will become the next cluster center, specifically:

[0026]

[0027] Where N represents the number of sample points;

[0028] Step S124: Repeat steps S122 and S123 until the number of selected initial cluster centers reaches the set value;

[0029] Step S125: Calculate and mark the distance between each sample point and the determined cluster center;

[0030] Step S126: Calculate the coordinates of the new cluster centers based on the category classification results;

[0031] Step S127: Repeat steps S125 and S126 until the algorithm converges;

[0032] Step S128: Based on the above steps, obtain the load clustering-coding table, and replace the fluctuation power with the clustering state power obtained in the load clustering-coding table to generate a one-hot code.

[0033] Furthermore, step S13 specifically includes:

[0034] Step S131: A CNN network is used to capture time series data to extract different features. The extraction method is as follows:

[0035]

[0036] in, This represents the j-th output of the current layer. This represents the output features of the previous layer. The symbol represents the corresponding convolution kernel, and * represents the convolution operation. This indicates traversing the input features. The bias parameter of the current layer is represented by f(·), and the activation function used by the CNN network is represented by f(·).

[0037] Step S132: Train the network using two parallel forward and backward standard GRU channels to obtain the hidden layer states corresponding to their respective current time steps, and then fuse them to obtain the hidden layer states of the BiGRU network at the current time step. The hidden layer states are as follows:

[0038]

[0039] in, These represent the hidden layer states of the forward and reverse GRU cells at time t, respectively; x t This represents the feature vector obtained from the CNN network; and These represent the hidden layer states of the forward and reverse GRU cells at the previous time step, respectively; h t Table t shows the hidden layer state of the BiGRU cell at time t;

[0040] Step S133: Extract the total load features using CNN and BiGRU networks to obtain a feature matrix T1, and adjust the output size of feature matrix T1 to transform it into a probability distribution vector. The adjustment method is as follows:

[0041]

[0042] Where w1 and w2 represent weight matrices; b1 and b2 represent biases; and f1(·) and f2(·) represent activation functions.

[0043] Step S134: Use the state count judgment module and the zero-filling module to optimize and adjust the probability parameters so that the probability of states that have never existed in each device is adjusted to 0. The optimization and adjustment method is as follows:

[0044]

[0045] Where, k max k represents the maximum number of states among all devices. iq p represents the number of states of the i-th device; iq Indicates the i-th device and the k-th device iq +1 probability of a state; p max Indicates the i-th device and the k-th device max The probability of the last state;

[0046] Step S135: Construct the state probability distribution matrix y for each device. t The state with the highest probability is selected as the decomposition state d of the device. t The decomposition state d t This refers to deep learning models, and the selection method is as follows:

[0047] d t =argmax(y t );

[0048] Here, argmax(·) is the maximum value index function.

[0049] Compared with existing technologies, this invention simplifies the decomposition task into a classification task by using a clustering algorithm to reduce the decomposition difficulty, and then improves the decomposition accuracy by using a deep learning model to conduct NILM studies on the load. Attached Figure Description

[0050] Figure 1 This is a flowchart of the non-intrusive load decomposition method based on clustering and CNN-BiGRU algorithm in this invention.

[0051] The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation

[0052] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.

[0053] Please see Figure 1 This invention proposes a non-intrusive load decomposition method based on clustering and CNN-BiGRU algorithm, comprising the following steps:

[0054] S1: Data Preprocessing. First, the raw data is normalized, and then the resulting data is sliced ​​into time series data. The data obtained in this step will be used as input for training the model.

[0055] S2: Data Clustering. This invention uses the K-means++ algorithm to cluster each device, obtaining a load clustering-coding table. The obtained cluster state power is used to replace the fluctuation power to reduce the impact of load fluctuations on decomposition. The generated one-hot code is then used as the output of the training model.

[0056] S3: Input-output mapping relationship. The input and output data obtained in steps S1 and S2 are mapped to form a mapping relationship.

[0057] S4: Building the Deep Learning Model. Based on the input and output data structures obtained in steps S1 and S2, build a specific CNN-BiGRU algorithm model, and optimize the model using the state count judgment module and the zero-padding module.

[0058] S5: Training the model. This invention feeds the input and output matrices into the model built in S4, and through continuous training and iteration, finds the mapping relationship between the input and output, and adjusts the parameters inside the algorithm model.

[0059] S6: Obtain the decomposition results. Input the total power sequence data at the current moment into the model trained in step S5 to obtain the state probability distribution matrix corresponding to each device at the current moment, and compare it with the load clustering-coding table obtained in step S2 to convert it into the corresponding power value.

[0060] It should be noted that the data preprocessing described in step S1 includes:

[0061] 1) First, impute missing values ​​in the dataset.

[0062] 2) Next, the dataset is normalized, as shown in formula (1).

[0063]

[0064] Where x′ represents the obtained result; x represents the true value; x min x max These represent the minimum and maximum values, respectively.

[0065] 3) Finally, the normalized result obtained in step (2) is sliced ​​into time window segments to make it into time series data, as shown in formula (2).

[0066] x t =[y t-L+1 ,y t-L+2 ,...,y t (2)

[0067] Where, x t The vector represents the total power time series at time t; L represents the series length; y t This indicates the power value.

[0068] Step S2, data clustering, uses the K-means++ algorithm to cluster each device and converts them into corresponding one-hot codes, including:

[0069] 1) Randomly select the first cluster center;

[0070] 2) Calculate the shortest distance D(x) between the sample point and the cluster center. i As shown in formula (3);

[0071]

[0072] Where, x i c represents the coordinates of the i-th sample point; j Let represent the coordinates of the j-th cluster center; k represents the number of identified cluster centers; ||·|| represents the Euclidean distance.

[0073] 3) Calculate the probability that each sample point will become the next cluster center, as shown in formula (4);

[0074]

[0075] Where N represents the number of sample points.

[0076] 4) Repeat steps (2) and (3) until the number of selected initial cluster centers reaches the set value;

[0077] 5) Calculate and mark the distance between each sample point and the determined cluster centers;

[0078] 6) Calculate the coordinates of the new cluster centers based on the classification results;

[0079] 7) Repeat steps (5) and (6) until the algorithm converges;

[0080] 8) Based on the above steps, obtain the load clustering-coding table and generate the corresponding one-hot codes as the output of the training model.

[0081] The input-output mapping relationship described in step S3 includes:

[0082] The results obtained in steps S1 and S2 are mapped to each other, as shown in formula (5).

[0083]

[0084] in, The unique hotkey of the i-th device at time t is represented by ; n represents the number of devices; g(·) represents the CNN-BiGRU algorithm proposed in this invention; x t This represents the total power sequence vector at time t.

[0085] Step S4, the construction of the deep learning model, includes:

[0086] By concatenating Convolutional Neural Networks (CNNs) and Bidirectional Gated Recurrent Units (BiGRUs), and combining them with the state count discrimination module and zero-padding module defined in this invention, the deep learning network model of this invention is constructed. The intrinsic relationships between the data provided in steps S2 and S3 are explored to improve the decomposition accuracy.

[0087] The CNN network mainly consists of convolutional layers, pooling layers, and fully connected layers. The convolutional layer is the core part of the CNN network. Each convolutional layer has several convolutional kernels. Different convolutional kernels can extract different features and are responsible for capturing features from the input data. The specific formula is shown in (6).

[0088]

[0089] in, This represents the j-th output of the current layer; This represents the output features of the previous layer; Indicates the corresponding convolution kernel; * indicates the convolution operation; This indicates traversing the input features; represents the bias parameters of the current layer; f(·) represents the activation function used by the network.

[0090] In CNN networks, padding is often used to keep the size of input and output data consistent, and it can also solve the problem of edge information loss, as shown in Equation (7).

[0091]

[0092] Where, n out Indicates the length of the output data; n in represents the length of the input data; p represents the zero-padding size; d represents the spacing between kernel elements; k represents the kernel size; s represents the stride.

[0093] Pooling layers typically follow convolutional layers to compress the features obtained from the convolutional layers. Their purpose is to reduce the network's parameters and computational cost, while also preventing overfitting. Fully connected layers are generally located at the end of a CNN network, used to connect the various feature channels and integrate all features for output.

[0094] The Gated Recurrent Unit (GRU) is a variant of the Long Short-Term Memory (LSTM) network. It simplifies the internal structure of LSTM by containing only two gates: an update gate and a reset gate. It can capture the temporal dependencies in the input information. The specific formula is shown in Equation (8).

[0095]

[0096] Where, x t , h t-1 h t r t z t These are the input vector, candidate state, previous hidden state, current hidden state, reset gate, and update gate, respectively; W rx W zx W hx They are respectively with x t The relevant weight matrix; W rh W zh W hh They are respectively with ht-1 The relevant weight matrix; b r b z b h σ is the bias vector; σ is the activation function sigmoid.

[0097] BiGRU trains the network using two parallel forward and backward standard GRU channels, fusing their features to make fuller use of the input time-series information. The specific formula for the hidden layer state d of the BiGRU network at the current time step is shown in equation (9-11).

[0098]

[0099]

[0100]

[0101] in, These represent the hidden layer states of the forward and reverse GRU cells at time t, respectively; x t This represents the feature vector obtained from the CNN network; and These represent the hidden layer states of the forward and reverse GRU cells at the previous time step, respectively; h t Table t shows the hidden layer state of the BiGRU cell at time t.

[0102] This invention extracts the total load features through CNN and BiLGRU networks to obtain a feature matrix T1, and adjusts the output size using formula (12) to transform it into a probability distribution vector, as shown in formula (12).

[0103]

[0104] Where w1 and w2 represent weight matrices; b1 and b2 represent biases; and f1(·) and f2(·) represent activation functions.

[0105] Finally, the probability parameters are adjusted using the "state count judgment module" and the "zero filling module" so that the probability of states that have never existed in each device is adjusted to 0, as shown in formula (13).

[0106]

[0107] Where, k max k represents the maximum number of states among all devices. iq p represents the number of states of the i-th device; iq Indicates the i-th device and the k-th device iq +1 probability of a state; p max Indicates the i-th device and the k-th device maxThe probability of the last state.

[0108] The above steps yield the device state probability distribution matrix y. t Using formula (14), the state with the highest probability is selected as the decomposition state d of the device. t .

[0109] d t =argmax(y t (14)

[0110] Here, argmax(·) is the maximum value index function.

[0111] The training model described in step S5 includes:

[0112] Based on the deep learning model built in step S4, the intrinsic relationships between the data provided in steps S1 and S2 are explored to improve the decomposition accuracy.

[0113] Step S6 describes obtaining the decomposition results, including:

[0114] The total power sequence data at the current moment is input into the model trained in step S5 to obtain the state probability distribution matrix corresponding to each device at the current moment, and compared with the load clustering-encoding table obtained in step S2 to convert it into the corresponding power value.

[0115] In this specification, the various embodiments are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. Furthermore, the above-described embodiments merely illustrate several implementation methods of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.

Claims

1. A non-intrusive load decomposition method based on clustering and CNN-BiGRU algorithm, characterized in that, Includes the following steps: Step S11: The normalized raw collected dataset is sliced ​​into time windows to form time series data; Step S12: The K-means++ algorithm is used to cluster each device to obtain the load clustering-coding table, and the clustering state power obtained in the load clustering-coding table is used to replace the fluctuation power to generate a one-hot code; Step S13: Using the CNN-BiGRU algorithm, time series data is taken as input and one-hot codes are taken as output to build a CNN-BiGRU algorithm model. The CNN-BiGRU algorithm model is then optimized using a state count determination module and a zero-padding module to obtain a deep learning model. The CNN-BiGRU algorithm model is... in, Let x represent the unique hot code of the i-th device at time t, n represent the number of devices, g(·) represent the CNN-BiGRU algorithm, and x t Represents the total power sequence vector at time t; Step S13 specifically includes: Step S131: Use a CNN network to capture time series data to extract different features; Step S132: Train the network with two parallel forward and reverse standard GRU channels to obtain the hidden layer state corresponding to each at the current time, and fuse them to obtain the hidden layer state of the BiGRU network at the current time. Step S133: Extract the total load features using CNN and BiGRU networks to obtain a feature matrix T1, and adjust the output size of feature matrix T1 to transform it into a probability distribution vector. The adjustment method is as follows: Where w1 and w2 represent weight matrices; b1 and b2 represent biases; and f1(·) and f2(·) represent activation functions. Step S134: Use the state count judgment module and the zero-filling module to optimize and adjust the probability parameters so that the probability of states that have never existed in each device is adjusted to 0. The optimization and adjustment method is as follows: Where, k max k represents the maximum number of states among all devices. iq p represents the number of states of the i-th device; iq Indicates the i-th device and the k-th device iq +1 probability of a state; p max Indicates the i-th device and the k-th device max The probability of the last state; Step S135: Construct the state probability distribution matrix y for each device. t The state with the highest probability is selected as the decomposition state d of the device. t The decomposition state d t This refers to deep learning models, and the selection method is as follows: d t =argmax(y t ); Where argmax(·) is the maximum value index function; Step S14: Input the time series data and one-hot code into the deep learning model for training and iteration, and adjust the internal parameters of the deep learning model to obtain the trained model. Step S15: Input the total power sequence data at the current moment into the training model to obtain the state probability distribution matrix corresponding to each device at the current moment, and compare the state probability distribution matrix with the load clustering-encoding table to obtain the power value corresponding to each device.

2. The non-intrusive load decomposition method based on clustering and CNN-BiGRU algorithm according to claim 1, characterized in that, Step S11 specifically includes: Step S111: Fill in the missing metal values ​​in the original dataset to form a complete dataset; Step S112: Normalize the complete dataset to form normalized data. The normalization formula is: Where x′ represents the obtained result, x represents the true value, and x min x max These represent the minimum and maximum values, respectively. Step S113: Slice the normalized data into time series data using time windows. The slicing formula is as follows: x t =[and t-L+1 ,and t-L+2 ,...,and t ]; Where, x t Let y represent the total power time series vector at time t, where L represents the sequence length. t This indicates the power value.

3. The non-intrusive load decomposition method based on clustering and CNN-BiGRU algorithm according to claim 1, characterized in that, Step S12 specifically includes: Step S121: Randomly select the first cluster center; Step S122: Calculate the shortest distance D(x) between each sample point and the cluster center. i Specifically: Where, x i c represents the coordinates of the i-th sample point. j Let represent the coordinates of the j-th cluster center, k represent the number of determined cluster centers, and ||·|| represent the Euclidean distance; Step S123, calculate the probability that each sample point will become the next cluster center, specifically: Where N represents the number of sample points; Step S124: Repeat steps S122 and S123 until the number of selected initial cluster centers reaches the set value; Step S125: Calculate and mark the distance between each sample point and the determined cluster center; Step S126: Calculate the coordinates of the new cluster centers based on the category classification results; Step S127: Repeat steps S125 and S126 until the algorithm converges; Step S128: Based on the above steps, obtain the load clustering-coding table, and replace the fluctuation power with the clustering state power obtained in the load clustering-coding table to generate a one-hot code.

4. The non-intrusive load decomposition method based on clustering and CNN-BiGRU algorithm according to claim 1, characterized in that, In step S131, the extraction method is as follows: in, This represents the j-th output of the current layer. This represents the output features of the previous layer. The symbol represents the corresponding convolution kernel, * represents the convolution operation, and ∑ represents traversing the input features. This represents the bias parameters of the current layer, and f(·) represents the activation function used by the CNN network. In step S132, the state of each hidden layer is as follows: in, These represent the hidden layer states of the forward and reverse GRU cells at time t, respectively; x t This represents the feature vector obtained from the CNN network; and These represent the hidden layer states of the forward and reverse GRU cells at the previous time step, respectively; h t Table t shows the hidden layer state of the BiGRU cell at time t.

Citation Information

Patent Citations

  • Improved non-intrusive load decomposition model

    CN113987913A

  • Residual error correction-based small hydropower station penetration regional network supply load prediction method

    CN114219126A