Non-intrusive load identification method
Through the CNN-BiLSTM-Attention network combined with multi-dimensional feature fusion and attention mechanism, the problems of redundancy and harsh identification conditions in existing non-invasive load identification are solved, high-precision load classification and power reflection are achieved, and the identification accuracy and efficiency of the model are improved.
Patent Information
- Application Number
- CN202510786013.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-12-07
- Filing Date
- 2025-06-12
- Publication Date
- 2025-07-11
AI Technical Summary
In the existing non-invasive load identification methods, there is a problem of large redundancy in load mark combinations and harsh identification conditions. The V-I characteristic curve cannot reflect the power magnitude, resulting in poor identification accuracy.
The load identification model based on the CNN-BiLSTM-Attention network is adopted to obtain electrical characteristic data to perform multi-dimensional feature fusion, including V-I characteristic curve, instantaneous active power waveform and current harmonic amplitude, and the feature sequence encoding is extracted using the VGG16 network, and load classification is performed by combining BiLSTM capture timing characteristics and attention mechanism.
It improves the accuracy and accuracy of load identification, and can accurately predict and identify power loads while taking into account multiple variables, reflecting the operating state and power magnitude of the load, reducing training time and parameter amount.
Smart Images

Figure CN120300795A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of non-intrusive load monitoring, and particularly to a non-intrusive load identification method. Background Art
[0002] In the existing smart grid, load monitoring systems are classified into two categories according to the technical form: intrusive load monitoring (ILM) and non-intrusive load monitoring (NILM). NILM was first proposed by Professor Hart in the 1980s of the last century. NILM is classified as a combinatorial optimization problem, and the time series data of active power and reactive power obtained at a sampling frequency of 1 Hz is used, and a clustering algorithm is used for load decomposition. NILM technology monitors and decomposes the total energy consumption data generated by users, such as current, voltage, and power data, and obtains the usage conditions of individual loads from them, such as the type and quantity of loads, and the working state.
[0003] In existing research, a method based on transfer learning of voltage-current trajectories is proposed for load identification. The method using color-coded voltage-current trajectories has significantly improved identification accuracy compared with current cycle waveforms. However, there is a problem of excessive number of parameters when using a pre-trained AlexNet network for load identification, and the required number of training rounds is relatively large. The V-I trajectory has a better recognition effect than other load characteristics, but it is not sufficient to classify electrical appliances belonging to the same category. Since a normalization process is required when obtaining the V-I trajectory, the power characteristics cannot be reflected. Therefore, for loads with the same V-I trajectory but different powers, the recognition effect is not ideal.
[0004] In existing research, it is also proposed to introduce current harmonic information on the basis of voltage-current trajectories for auxiliary identification. However, there is a problem of whether the weight setting reaches the optimal value when calculating the similarity using the TOPSIS algorithm, so the identification conditions are harsh. Summary of the Invention
[0005] The present invention provides a non-intrusive load identification method, which solves the technical problems in the existing load identification methods, such as large redundancy caused by various load imprints combinations, poor identification accuracy due to harsh identification conditions, and the fact that the V-I characteristic curve can only reflect the load operation state and cannot reflect the power magnitude of the load operation.
[0006] To solve the above technical problems, the present invention provides a non-intrusive load identification method, including: Establishing a load identification model based on a CNN-BiLSTM-Attention network; Obtain non-intrusive monitoring data of the load, and perform data preprocessing to generate a multi-dimensional feature fusion map; Input the multi-dimensional feature fusion map into the load identification model for training, perform feature extraction to obtain a feature sequence encoding; and capture temporal features based on the feature sequence encoding to obtain a state information sequence; furthermore, perform weighting on the state information sequence to highlight important features to obtain a vector to be classified; then perform load classification and identification according to the vector to be classified.
[0007] This basic solution establishes a load identification model based on the CNN-BiLSTM-Attention network, which can extract the internal features between continuous data, requires fewer neurons, reduces the training time while improving the overall performance of the model; effectively extracts multi-scale features in the load data and captures long-term dependencies in the time series data; at the same time, the introduction of the attention mechanism makes the model pay more attention to important features or time periods, thereby further improving the prediction accuracy; and generates a multi-dimensional feature fusion map based on the non-intrusive monitoring data of the load. Furthermore, the load identification method through multi-feature sequence fusion can accurately predict and identify the electrical load considering multiple variables; the present invention can efficiently obtain user electricity consumption information and load details.
[0008] In a further implementation, obtaining non-intrusive monitoring data of the load includes: Obtain electrical characteristic data, where the electrical characteristic data includes voltage data and current data; Select a steady-state waveform of one cycle from the voltage data and the current data respectively, perform normalization processing and plot to obtain a V-I characteristic curve; Calculate the instantaneous active power at each moment based on the voltage data and the current data, and plot the instantaneous active power waveform; Perform harmonic calculation on the current data according to the fast Fourier transform analysis, and extract the current harmonic amplitude from the current data; The non-intrusive monitoring data includes the V-I characteristic curve, the instantaneous active power waveform and the current harmonic amplitude.
[0009] This solution adds the V-I characteristic curve, the instantaneous active power waveform and the corresponding current harmonic amplitude to the non-intrusive monitoring data, which can directly reflect the power characteristics, and then realizes the classification of electrical appliances of the same type, that is, fuses and processes multi-dimensional load characteristics. When there is a similarity in the load imprints between different loads, the identification network algorithm can distinguish them through the differences in the remaining load imprints.
[0010] In a further embodiment, the extraction of the current harmonic amplitude includes: decomposing the current data into a fundamental current Ih and 2nd to 16th order current harmonics Ih2-16, and normalizing the current harmonics with the amplitude of the fundamental current Ih of all loads as a reference quantity to obtain the current harmonic amplitude.
[0011] Based on the characteristics that different electrical appliances generate different multiple harmonics under different environments and different working conditions, unique characteristics corresponding to the electrical appliances are formed. Therefore, there are significant differences in the current waveforms of different electrical appliances. This solution uses non-active current harmonics as identification features, which can effectively improve the identification accuracy for different loads.
[0012] In a further embodiment, the generation of the multi-dimensional feature fusion map through data preprocessing includes: Taking the voltage data as the abscissa and the current data as the ordinate, plotting the V-I characteristic curve as a grayscale image to obtain the first characteristic grayscale image; Taking the sampling points in one cycle as the abscissa and the instantaneous active power as the ordinate, plotting the instantaneous active power waveform as a grayscale image to obtain the second characteristic grayscale image; Taking the harmonic order as the abscissa and the harmonic amplitude as the ordinate, plotting a grayscale image according to the current harmonic amplitude to obtain the third characteristic grayscale image; Obtaining the first characteristic grayscale image, the second characteristic grayscale image, and the third characteristic grayscale image and performing image fusion to generate a multi-dimensional feature fusion map.
[0013] In a further embodiment, the image fusion of the multi-dimensional feature fusion map is specifically: performing image format unification processing on the first characteristic grayscale image, the second characteristic grayscale image, and the third characteristic grayscale image to generate the first characteristic grayscale image, the second characteristic grayscale image, and the third characteristic grayscale image with the same image pixel size, and splicing and fusing them in sequence from top to bottom to obtain the multi-dimensional feature fusion map.
[0014] This solution selects the V-I characteristic curve as a load feature imprint. On this basis, the single-cycle instantaneous active power waveform and the 2nd to 16th harmonic amplitudes are added as the other two load feature imprints. The grayscale images corresponding to the V-I characteristic curve, the instantaneous active power waveform, and the current harmonic amplitude are fused to obtain a multi-dimensional feature fusion map, using the time sequence relationship of the multi-dimensional acquisition data to enhance the features, thereby improving the load decomposition accuracy; the V-I characteristic curve can intuitively reflect the impedance characteristics of the load, but since it cannot reflect the magnitude of the current when household appliances are running, the instantaneous active power waveform and harmonic amplitudes are added as load imprints, so that not only the operating state of the load can be reflected but also the magnitude of the load current and power during operation can be fed back, thereby improving the accuracy of load identification.
[0015] In a further embodiment, the feature extraction to obtain the feature sequence encoding is specifically as follows: Create and optimize the network structure of the VGG16 network model, and input the multi-dimensional feature fusion graph into the optimized VGG16 network model for feature extraction to obtain the feature sequence encoding; Among them, the optimized VGG16 network model includes 13 convolutional layers, 5 pooling layers, 1 fully connected layer, and 1 classification layer; all convolutional layers use a 3×3 convolutional kernel, and the activation function is the ReLU function, which is used to learn and extract the fusion features of the multi-dimensional feature fusion graph through the convolutional kernel; the max pooling layer uses a 2×2 pooling kernel, which is used to compress the fusion features to reduce the number of parameters; the fully connected layer is set with 1000 neurons, which is used to perform feature combination on the fusion features to obtain the feature sequence encoding for load identification.
[0016] In this solution, the 3 fully connected layers in the VGG16 network model are optimized into a fully connected layer with 1000 neurons. Thus, the fully connected layer directly outputs and extracts the output of this layer as the feature sequence of the load feature combination graph for subsequent neural networks to identify the load feature sequence, which can not only reduce the number of parameters but also ensure that the extracted sequence feature information is retained completely.
[0017] In a further embodiment, capturing the temporal features based on the feature sequence encoding to obtain the state information sequence is specifically as follows: Input the feature sequence encoding into the BiLSTM model to perform temporal feature capture to obtain the state information sequence; Among them, the BiLSTM model includes recurrent neural networks in two directions, forward and backward, to comprehensively consider the temporal relationship in the state information sequence. Among them, the forward propagation layer starts from the beginning of the sequence for input iteration, and the backward propagation layer starts from the end of the sequence for input iteration. Finally, the output results of the two layers are fitted to obtain the identification result.
[0018] In a further embodiment, the expression of the output result of the BiLSTM model is:
[0019]
[0020]
[0021] In the formula, represents the input at time t; and respectively represent the output of the forward propagation layer and the backward propagation layer at time t; represents the output of the output layer at time t; f represents the activation function of the forward propagation layer and the backward propagation layer; g represents the activation function of the output layer; and is the weight matrix that maps the input layer to the forward propagation layer and the backpropagation layer; and is the weight matrix that maps the output of the previous calculation moment of the forward propagation layer and the backpropagation layer to the current calculation moment; and is the weight matrix that maps the output of the forward propagation layer and the backpropagation layer to the output layer.
[0022] This solution uses BiLSTM, so that long-term dependencies can be learned from time series data. By learning the time series features and periodic patterns in historical load data, BiLSTM can more accurately predict future load changes and improve the accuracy of load identification.
[0023] In a further implementation, the obtaining of the vector to be classified by weighting and highlighting important features from the state information sequence includes: Determine the hidden layer state output by the BiLSTM model at each time step from the state information sequence, use the hidden layer state as the request Query, and calculate the similarity between the request Query and the corresponding keys; Use the SoftMax function to normalize the similarity obtained in the previous stage, convert the similarity into a similarity with the sum of all similarity weights being 1, and highlight the weights of important elements; For Perform weighted summation according to the weight coefficients to obtain the attention value corresponding to each request Query; Multiply the hidden layer state by the attention value to obtain the vector to be classified.
[0024] This solution performs a weighted transformation on the state information sequence (hidden layer weights) extracted by BiLSTM through the attention mechanism, automatically assigns different weights according to the importance of information, thereby increasing the weight of key information in the data input to the neural network and decreasing the weight of interference information, further improving the accuracy of model feature extraction and identification, and thus further improving the accuracy of model feature extraction.
[0025] In a further implementation, it further includes: model evaluation, calculating the evaluation index of the load identification model using a confusion matrix, and the evaluation index includes at least one of accuracy, precision, recall, and F value.
[0026] This solution calculates the evaluation index of the load identification model using a confusion matrix. According to the information obtained from the confusion matrix, the model can be optimized targeted, reducing errors in specific classifications of the model and improving the overall classification accuracy. Description of the Drawings
[0027] Figure 1It is the network architecture diagram of a non-intrusive load identification method provided by an embodiment of the present invention; Figure 2 It is the multi-dimensional feature fusion diagram of the main household appliances provided by an embodiment of the present invention; Figure 3 It is the structural diagram of a conventional convolutional neural network provided by an embodiment of the present invention; Figure 4 It is the structural diagram of the VGG16 network model provided by an embodiment of the present invention; Figure 5 It is the basic structural diagram of the LSTM model provided by an embodiment of the present invention; Figure 6 It is the basic structural diagram of the BiLSTM model provided by an embodiment of the present invention; Figure 7 It is the basic structural diagram of the Attention mechanism provided by an embodiment of the present invention; Figure 8 It is the calculation flow chart of the attention value provided by an embodiment of the present invention; Figure 9 It is the comparison diagram of the accuracy curve and loss curve of the training set and test set provided by an embodiment of the present invention; Figure 10 It is the simulation verification result of different electrical appliances provided by an embodiment of the present invention; Figure 11 It is the parameter structure diagram of the CNN-BiLSTM-Attention network provided by an embodiment of the present invention; Figure 12 It is the summary result of the identification accuracy of different models provided by an embodiment of the present invention. Detailed implementation manners
[0028] The following specifically illustrates the implementation manners of the present invention in conjunction with the accompanying drawings. The presentation of the embodiments is only for illustrative purposes and should not be construed as a limitation of the present invention. The accompanying drawings are only for reference and illustration, and do not constitute a limitation on the scope of patent protection of the present invention, because many changes can be made to the present invention without departing from the spirit and scope of the present invention.
[0029] A non-intrusive load identification method provided by an embodiment of the present invention, as Figures 1 to 12 shown. In this embodiment, it includes: S1. Establish a load identification model based on the CNN-BiLSTM-Attention network; Among them, construct the CNN-BiLSTM-Attention network, and its parameter structure is as Figure 11As shown, when training using CNN-BiLSTM-Attention, the gradient threshold is set to 1, the number of training rounds is 400, and the Adaptive Moment Estimation (Adam) optimization algorithm is used during the training process. It has a higher operation efficiency compared to the traditional Stochastic Gradient Descent method. The accuracy curves and loss curves of the training set and test set are as Figure 9 shown.
[0030] As Figure 9 shown in the left figure, Training acc refers to the accuracy of the model on the training set; Validation acc refers to the accuracy of the model on the validation set. Following the increase in the number of training samples, the accuracy curve of the algorithm of the present invention is significantly higher than 0.9 and tends to 1, and remains stable.
[0031] As Figure 9 shown in the right figure, Training loss, the training loss is the loss calculated on the training set and is used to measure the performance of the model on the training data. By continuously adjusting the model parameters, the training loss usually gradually decreases until it reaches a stable value. Validation loss, the validation loss is the loss calculated on the validation set and is used to evaluate the generalization ability of the model on unseen data. The change in the validation loss can help us determine whether the model is overfitting or underfitting. Following the increase in the number of training samples, the loss curve of the algorithm of the present invention is significantly higher than 0.25 and tends to 0, and remains stable (around 0.1).
[0032] S2. Obtain non-intrusive monitoring data of the load, and perform data preprocessing to generate a multi-dimensional feature fusion map; In this embodiment, obtaining non-intrusive monitoring data of the load includes: A1. Obtain electrical feature data, where the electrical feature data includes voltage data and current data; A2. Select one cycle of steady-state waveforms from the voltage data and current data respectively, perform normalization processing and plot to obtain a V-I characteristic curve; Specifically, starting from the same time point, take one cycle of steady-state waveforms of current and voltage. Assume that one cycle has k data points, and through normalization, convert the current and voltage data to a unified size of 0 to l. As shown in the following formula:
[0033] Where: and represent the i-th sampling point data of the normalized current and voltage; and The data of the i-th sampling point representing the original current and original voltage; minI and maxI respectively represent the minimum and maximum values of the original current within one cycle; minU and maxU respectively represent the minimum and maximum values of the original voltage within one cycle; [] represents the rounding symbol.
[0034] A3. Calculate the instantaneous active power at each moment based on the voltage data and current data, and plot the instantaneous active power waveform; The instantaneous power waveform is defined as the product of voltage and current, as shown in the following formula:
[0035] A4. Perform harmonic calculation on the current data according to fast Fourier transform analysis, and extract the current harmonic amplitudes from the current data; In this embodiment, the extraction of the current harmonic amplitudes includes: decomposing the current data into the current fundamental wave Ih and the 2 - 16th current harmonics Ih2 - 16, and normalizing the current harmonics with the amplitude of the current fundamental wave Ih of all loads as the reference quantity to obtain the current harmonic amplitudes. Among them, the normalization formula is as follows:
[0036] Where: I p represents the amplitude of the electrical appliance current waveform; i(k) represents the current value at the k-th sampling point during the normalization process; N represents the total number of sampling points in each cycle.
[0037] Based on the characteristics that different electrical appliances generate different multiple harmonics under different environments and different working states in this embodiment, unique characteristics corresponding to the electrical appliances are formed. Therefore, there are significant differences in the current waveforms of different electrical appliances. Using non-active current harmonics as the identification feature in this embodiment can effectively improve the identification accuracy for different loads.
[0038] The non-intrusive monitoring data includes the V-I characteristic curve, the instantaneous active power waveform, and the current harmonic amplitudes.
[0039] In this embodiment, adding the V-I characteristic curve, the instantaneous active power waveform, and the corresponding current harmonic amplitudes to the non-intrusive monitoring data can directly reflect the power characteristics, and thus realize the classification of electrical appliances of the same type, that is, perform fusion processing on multi-dimensional load characteristics. When there is a similarity in the load imprints among different loads, the identification network algorithm can distinguish them through the differences in the remaining load imprints.
[0040] In this embodiment, the generation of the multi-dimensional feature fusion map by performing data preprocessing includes: B1. Taking the voltage data as the abscissa and the current data as the ordinate, plot the V-I characteristic curve as a grayscale image to obtain the first characteristic grayscale image; B2. Taking the sampling points in one cycle as the abscissa and the instantaneous active power as the ordinate, plot the instantaneous active power waveform as a grayscale image to obtain the second characteristic grayscale image; B3. Taking the harmonic order as the abscissa and the harmonic amplitude magnitude as the ordinate, plot a grayscale image according to the current harmonic amplitudes to obtain the third characteristic grayscale image (i.e., obtain the current harmonic amplitude curves from the 2nd to the 16th harmonic); B4. Obtain the first characteristic grayscale image, the second characteristic grayscale image, and the third characteristic grayscale image and perform image fusion to generate a multi-dimensional feature fusion image.
[0041] In this embodiment, the image fusion of the multi-dimensional feature fusion image is specifically as follows: perform image format unification processing on the first characteristic grayscale image, the second characteristic grayscale image, and the third characteristic grayscale image to generate the first characteristic grayscale image, the second characteristic grayscale image, and the third characteristic grayscale image with the same image pixel size, and splice and fuse them in sequence from top to bottom to obtain the multi-dimensional feature fusion image.
[0042] For example, uniformly set the image sizes of the first characteristic grayscale image, the second characteristic grayscale image, and the third characteristic grayscale image to 188×188 pixels, and splice them in sequence from top to bottom to draw a load combination imprint grayscale image (i.e., the multi-dimensional feature fusion image). The image size of the combined grayscale image is 188×564 pixels. The multi-dimensional feature fusion images of major household appliances are as Figure 2 shown.
[0043] In this embodiment, the V-I characteristic curve is selected as a kind of load characteristic imprint. On this basis, the single-cycle instantaneous active power waveform and the 2-16th harmonic amplitudes are added as the other two load characteristic imprints. The grayscale images corresponding to the V-I characteristic curve, the instantaneous active power waveform, and the current harmonic amplitudes are fused to obtain the multi-dimensional feature fusion image. The characteristics are enhanced by using the timing relationship of the multi-dimensional acquisition data, thereby improving the load decomposition accuracy; the V-I characteristic curve can intuitively reflect the impedance characteristics of the load, but since it cannot reflect the magnitude of the current when household appliances are running, the instantaneous active power waveform and harmonic amplitudes are added as load imprints, so that not only the running state of the load can be reflected but also the load current and power magnitude during operation can be fed back, thereby improving the accuracy of load identification.
[0044] S3. Input the multi-dimensional feature fusion image into the load identification model for training, perform feature extraction to obtain the feature sequence encoding; and capture the timing features based on the feature sequence encoding to obtain the state information sequence; then perform weighting on the state information sequence to highlight the important features to obtain the vector to be classified; and then perform load classification and identification according to the vector to be classified.
[0045] Convolutional neural networks are one of the most mature networks in the field of deep learning and play an important role in tasks such as image and text recognition. This network is mainly composed of a convolutional layer and a pooling layer. The convolutional layer uses a convolutional kernel to effectively extract non-linear local features of the input data, and the pooling layer is used to compress the extracted features and generate more important feature information to improve the generalization ability.
[0046] The VGG16 network model is commonly used in tasks such as image classification, segmentation, and image feature extraction.
[0047] In this embodiment, the specific process of obtaining the feature sequence encoding by feature extraction is as follows: create and optimize the network structure of the VGG16 network model, and input the multi-dimensional feature fusion map into the optimized VGG16 network model for feature extraction to obtain the feature sequence encoding; Among them, referring to Figure 4 , the optimized VGG16 network model includes 13 convolutional layers, 5 pooling layers, 1 fully connected layer, and 1 classification layer.
[0048] The convolutional layer is used to learn and extract the fusion features of the multi-dimensional feature fusion map through the convolutional kernel; all convolutional layers use a 3×3 convolutional kernel, which reduces the number of parameters and speeds up the training speed of the model. The activation function is the ReLU function, which is used to perform non-linear mapping on the convolutional output matrix to enhance the representation ability of the model.
[0049] The max pooling layer uses a 2×2 pooling kernel to compress the fusion features to reduce the number of parameters without changing the number of feature maps; The fully connected layer is set with 1000 neurons to perform feature combination on the fusion features to obtain the feature sequence encoding for load identification.
[0050] In this embodiment, the three fully connected layers in the VGG16 network model are optimized into a fully connected layer with 1000 neurons. Thus, the fully connected layer directly outputs and extracts the output of this layer as the feature sequence of the load feature combination map for subsequent neural networks to perform load feature sequence identification, which can not only reduce the number of parameters but also ensure that the extracted sequence feature information is retained completely.
[0051] In this embodiment, the specific process of obtaining the state information sequence by capturing the temporal features based on the feature sequence encoding is as follows: input the feature sequence encoding into the BiLSTM model to perform temporal feature capture to obtain the state information sequence; Long short-term memory neural network (LSTM) is a type of recurrent neural network, and its basic structure is as Figure 5As shown, compared with ordinary recurrent neural networks, long short-term memory neural networks solve the problem of gradient disappearance during training and have good performance in processing long time series. LSTM has a chained form of repeated neural network modules. The repeated modules in LSTM contain four interacting layers, three Sigmoid layers and one tanh layer, and interact in a very special way to form the forget gate, input gate, and output gate. Its structure is as Figure 5 shown. In the figure, represents the cell state information at time t, represents the cell output information at time t, represents the cell input information at time t. represents the output of the forget gate at time t, and its operation can be represented by Equation (4):
[0052] where σ is the sigmoid activation function, and respectively represent the weights and biases of the forget gate, represents the combination of the input at time t and the output at the previous time.
[0053] it and together represent the output of the input gate, and its operation can be represented by Equation (5) and Equation (6):
[0054]
[0055] where σ and tanh are activation functions, and represent weights, and represent biases.
[0056] The operation of cell state update can be represented by Equation (7):
[0057] Finally, the operation of the output gate can be represented by Equation (8) and Equation (9):
[0058]
[0059] where represents the intermediate information of the output gate, σ and tanh are activation functions, represents the weight, represents the bias.
[0060] Among them, see Figure 6, The BiLSTM model includes recurrent neural networks in both forward and backward directions to comprehensively consider the temporal relationships in the state information sequence. Among them, the forward propagation layer starts the input iteration from the starting point of the sequence, and the backward propagation layer starts the input iteration from the end of the sequence. Finally, the output results of the two layers are fitted to obtain the identification result.
[0061] In this embodiment, the expression of the output result of the BiLSTM model is:
[0062]
[0063]
[0064] In the formula, represents the input quantity at time t; and respectively represent the output quantities of the forward propagation layer and the backward propagation layer at time t; represents the output of the output layer at time t; f represents the activation function of the forward propagation layer and the backward propagation layer; g represents the activation function of the output layer; and are the weight matrices mapping the input layer to the forward propagation layer and the backward propagation layer; and are the weight matrices mapping the output of the previous calculation moment of the forward propagation layer and the backward propagation layer to the current calculation moment; and are the weight matrices mapping the output of the forward propagation layer and the backward propagation layer to the output layer.
[0065] In this embodiment, BiLSTM is adopted, so that long-term dependence relationships can be learned from time-series data. By learning the temporal features and periodic patterns in historical load data, BiLSTM can more accurately predict future load changes and improve the accuracy of load identification.
[0066] The attention mechanism originated from the research on human vision. When the human vision processes information, the acceptance of information is usually selective. The attention mechanism mimics the part of the human vision that processes information. In the process of information processing, it selectively collects important information and discards unimportant information. The attention mechanism can enable the neural network to have the ability to focus on certain features through the means of probability distribution, and at the same time solve the problem of information loss caused by too long sequences in LSTM.
[0067] In this embodiment, referring to Figure 7 , the weighting of the state information sequence to highlight important features to obtain the vector to be classified includes C1~C4: C1. Determine the hidden layer states output by the BiLSTM model at each time step from the state information sequence, use the hidden layer states as the request Query, and calculate the similarity between the request Query and the corresponding keys; The calculation methods of similarity usually include dot product, cosine, multi-layer perceptron network, etc. The calculation formula (13) of dot product similarity is:
[0068] C2. Use the SoftMax function to normalize the similarity obtained in the previous stage, convert the similarity into a similarity with the sum of all similarity weights being 1, and highlight the weights of important elements. The calculation result is the corresponding weight coefficient. The SoftMax normalization calculation formula is as shown in Equation (14):
[0069] C3. Perform weighted summation on according to the weight coefficient to obtain the attention value corresponding to each request Query, as shown in the following formula;
[0070] Among them, the attention mechanism includes three stages of the above steps C1 to C3, and is used to obtain the Attention value for the Query.
[0071] C4. Multiply the hidden layer state and the attention value in matrix form to obtain the vector to be classified.
[0072] In the present invention, all the hidden layer state vectors (H) obtained through BiLSTM are used as requests, and the hidden layer states (hi) output by the BiLSTM model at each time step are used as keys and values. The specific calculation steps are as Figure 8 shown.
[0073] After obtaining the post-attention value, in the next stage, perform weighted summation on the attention value according to the weight coefficient, that is, multiply the request and the obtained attention value vector in matrix form to obtain the final vector to be classified. Finally, pass the vector to be classified through the fully connected layer and output it to the Softmax classifier to complete the load classification and identification.
[0074] In this embodiment, the attention mechanism is used to perform weighted transformation on the state information sequence (hidden layer weights) extracted by BiLSTM, automatically assign different weights according to the importance of information, so as to increase the weight of the key information of the data input into the neural network and reduce the weight of the interference information, further improving the accuracy of model feature extraction and identification, and thus further improving the accuracy of model feature extraction.
[0075] S4. Model evaluation: Calculate the evaluation metrics of the load identification model using a confusion matrix. The evaluation metrics include at least one of accuracy, precision, recall, and F-value.
[0076] See Figure 10 , to verify the generalization of the algorithm for different brands of the same type of electrical appliance, 11 types of electrical appliances including air conditioners, energy-saving lamps, fans, refrigerators, hair dryers, heaters, incandescent lamps, laptops, microwave ovens, vacuum cleaners, and washing machines are selected for simulation verification. This embodiment uses a combined scheme of "2 - 16 times current harmonic extraction + VGG16 network model + CNN - BiLSTM - Attention network", which has a significant improvement compared to the identification result (91.5%) of the traditional CNN - BiLSTM algorithm. The identification accuracy of this embodiment reaches 94.7%. And the identification accuracy for a single electrical appliance has an average improvement of about 5%.
[0077] The PLAID dataset is an electric power dataset for energy monitoring, mainly used for load decomposition and equipment identification research. This dataset provides multiple versions of electric power data, suitable for research and applications in related fields. Through simulation verification using the PLAID dataset, it is proved that the extracted load feature sequence coding has good identification performance, and the proposed identification algorithm has higher confidence and accuracy compared to existing algorithms, and the identification precision of this load imprint has an improvement compared to previous load imprint combinations.
[0078] This embodiment uses a confusion matrix to calculate the evaluation metrics of the load identification model. According to the information obtained from the confusion matrix, the model can be optimized targeted, reducing the errors of the model in specific classifications and improving the overall classification accuracy.
[0079] Accuracy: Represents the proportion of the number of samples correctly predicted by the model to the total number of samples. Accuracy is an important indicator to measure the overall classification ability of the model, and the calculation formula is:
[0080] Precision: Represents the proportion of samples actually being positive among the samples predicted as positive by the model. The higher the precision, the more correct the model is in the results predicted as positive. The calculation formula is:
[0081] Recall: Represents the proportion of samples actually being positive that are correctly predicted as positive by the model. The higher the recall, the more positive samples the model can identify. The calculation formula is:
[0082] F1 Score: The harmonic mean of precision and recall, used to balance precision and recall. The higher the F1 score, the better the performance of the model. The calculation formula is as follows:
[0083] In the formula, N represents the total number of actual electrical appliance samples; represents the number of samples where the electrical appliance labels obtained after neural network identification are consistent with the actual sample labels; represents the number of samples where the identified labels are inconsistent with the actual labels; represents the number of samples where the neural network does not identify a certain electrical appliance label and the actual label is also not that electrical appliance; represents the number of samples where the identified label is not a certain electrical appliance but the actual label is that electrical appliance.
[0084] The present invention proposes to introduce an Attention mechanism based on the CNN - BiLSTM neural network to screen important information of the feature sequence.
[0085] Figure 12 It is a summary table of the identification accuracy when different load imprints are used under the same CNN - BiLSTM - Attention training model. Experiments show that when only the grayscale image of the V - I characteristic curve is used as the load imprint, the algorithm identification accuracy is higher than that of the load imprints other than the present invention (the grayscale image of a single instantaneous active power waveform or current harmonic amplitude and the feature sequence code as the load imprint).
[0086] If the grayscale image of a single V - I characteristic curve is used to extract features through the VGG16 network of this application and then input into the identification network for training and identification, the accuracy rate reaches 94.6%, which is higher than directly using the grayscale image of the V - I characteristic curve. It shows that the feature vector after conversion by the VGG16 network not only reduces the dimension of the training data, reduces the training complexity, but also improves the overall load identification accuracy.
[0087] Comparing the present invention, which fuses the grayscale image of the V - I characteristic curve, the current harmonic amplitudes from the 2nd to 16th order, and the instantaneous active power waveform as feature imprints, and then extracts features through the VGG16 network of this application and inputs them into the identification network for training and identification, the identification accuracy is further improved to 96.6%.
[0088] In the embodiment of the present invention, a load identification model based on a CNN-BiLSTM-Attention network is established, which can extract the inherent features between continuous data, requires fewer neurons, reduces the training time while improving the overall performance of the model; effectively extracts multi-scale features in load data and captures long-term dependencies in time series data; at the same time, the introduction of the attention mechanism makes the model pay more attention to important features or time periods, thereby further improving the prediction accuracy; and generates a multi-dimensional feature fusion map based on non-intrusive monitoring data of the load, and then through a load identification method of multi-feature sequence fusion, accurate prediction and identification of the electrical load can be carried out considering multiple variables; the present invention can efficiently obtain user electricity consumption information and load details.
[0089] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited by the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications made without departing from the spirit and principle of the present invention shall be equivalent replacement methods and are all included in the protection scope of the present invention.
Claims
1. A non-intrusive load identification method, characterized in that Including: Establish a load identification model based on the CNN-BiLSTM-Attention network; Obtain non-intrusive monitoring data of the load, and perform data preprocessing to generate a multi-dimensional feature fusion map; Input the multi-dimensional feature fusion map into the load identification model for training, and perform feature extraction to obtain a feature sequence encoding; And capture time-series features based on the feature sequence encoding to obtain a state information sequence; furthermore, perform weighting on the state information sequence to highlight important features to obtain a vector to be classified; then perform load classification and identification according to the vector to be classified.
2. The non-intrusive load identification method according to claim 1, characterized in that Obtain non-intrusive monitoring data of the load, including: Obtain electrical feature data, where the electrical feature data includes voltage data and current data; Select a steady-state waveform of one cycle from the voltage data and the current data respectively, perform normalization processing and plot to obtain a V-I characteristic curve; Calculate the instantaneous active power at each moment based on the voltage data and the current data, and plot the instantaneous active power waveform; Perform harmonic calculation on the current data according to fast Fourier transform analysis, and extract the current harmonic amplitude from the current data; The non-intrusive monitoring data includes the V-I characteristic curve, the instantaneous active power waveform and the current harmonic amplitude.
3. The non-intrusive load identification method according to claim 2, wherein The extraction of the current harmonic amplitude includes: decomposing the current data into a current fundamental wave Ih and 2-16th order current harmonics Ih2-16, and normalizing the current harmonics with the amplitude of the current fundamental wave Ih of all loads as a reference quantity to obtain the current harmonic amplitude.
4. The non-invasive load identification method according to claim 2, characterized in that The performing data preprocessing to generate a multi-dimensional feature fusion map includes: Taking the voltage data as the abscissa and the current data as the ordinate, plot the V-I characteristic curve as a grayscale image to obtain a first feature grayscale image; Taking the sampling points of one cycle as the abscissa and the instantaneous active power as the ordinate, plot the instantaneous active power waveform as a grayscale image to obtain a second feature grayscale image; Taking the harmonic order as the abscissa and the harmonic amplitude as the ordinate, plot a grayscale image according to the current harmonic amplitude to obtain a third feature grayscale image; Obtain the first feature grayscale image, the second feature grayscale image and the third feature grayscale image and perform image fusion to generate a multi-dimensional feature fusion map.
5. The non-intrusive load identification method according to claim 4, wherein The image fusion of the multi-dimensional feature fusion map is specifically: perform image format unification processing on the first feature grayscale image, the second feature grayscale image and the third feature grayscale image to generate first, second and third feature grayscale images with the same image pixel size, and splice and fuse them in sequence from top to bottom to obtain a multi-dimensional feature fusion map.
6. A non-intrusive load identification method according to claim 1, characterized in that: The performing feature extraction to obtain a feature sequence encoding is specifically to create and optimize the network structure of the VGG16 network model, and input the multi-dimensional feature fusion map into the optimized VGG16 network model for feature extraction to obtain a feature sequence encoding; Among them, the optimized VGG16 network model includes 13 convolutional layers, 5 pooling layers, 1 fully connected layer, and 1 classification layer; the convolutional layers all use 3×3 convolutional kernels, and the activation function is the ReLU function, which is used to learn and extract the fusion features of the multi-dimensional feature fusion map through the convolutional kernels; the max pooling layer uses 2×2 pooling kernels to compress the fusion features to reduce the number of parameters; the fully connected layer is set with 1000 neurons to perform feature combination on the fusion features to obtain a feature sequence encoding for load identification.
7. A non-intrusive load identification method according to claim 1, wherein: Specifically, capturing the temporal features based on the feature sequence encoding to obtain the state information sequence means inputting the feature sequence encoding into the BiLSTM model to perform temporal feature capture to obtain the state information sequence; Among them, the BiLSTM model includes recurrent neural networks in two directions, forward and backward, to comprehensively consider the temporal relationship in the state information sequence. The forward propagation layer starts input iteration from the starting point of the sequence, and the backward propagation layer starts input iteration from the end of the sequence. Finally, the output results of the two layers are fitted to obtain the identification result.
8. The non-intrusive load identification method according to claim 7, characterized in that The expression of the output result of the BiLSTM model is: Wherein, represents the input at time t; and respectively represent the outputs of the forward propagation layer and the backward propagation layer at time t; represents the output of the output layer at time t; f represents the activation function of the forward propagation layer and the backward propagation layer; g represents the activation function of the output layer; and are the weight matrices for mapping the input layer to the forward propagation layer and the backward propagation layer; and are the weight matrices for mapping the outputs of the forward propagation layer and the backward propagation layer at the previous calculation time to the current calculation time; and are the weight matrices for mapping the outputs of the forward propagation layer and the backward propagation layer to the output layer.
9. The non-intrusive load identification method according to claim 8, wherein, The method of obtaining the vector to be classified by weighting and highlighting important features from the state information sequence includes: Determining the hidden layer state output by the BiLSTM model at each time step from the state information sequence, using the hidden layer state as the request Query, and calculating the similarity between the request Query and the corresponding keys; Normalize the similarity obtained in the previous stage using the SoftMax function, convert the similarity into a similarity with the sum of all similarity weights equal to 1, and highlight the weights of important elements. The calculation result is the corresponding weight coefficient; For weighted summation is performed according to the weight coefficient, so as to obtain the attention value corresponding to each request Query; Multiplying the hidden layer state by the attention value matrix to obtain the vector to be classified.
10. The non-intrusive load identification method according to claim 1, characterized in that, It also includes: model evaluation, calculating the evaluation index of the load identification model using a confusion matrix, and the evaluation index includes at least one of accuracy, precision, recall rate, and F value; the F value includes the F1 score, which represents the harmonic mean of the precision rate and the recall rate.
Citation Information
Patent Citations
A PCA and LSTM neural network-based non-intrusive load identification method
CN109598451A
Residential load identification method and device for coupling neural network and dynamic time planning
CN113987910A
Non-intrusive load identification method based on time sequence imaging and deep learning
CN117315434A
Non-intrusive load identification method based on load high-frequency feature imaging
CN117935020A