CN116166992A - Non-invasive load decomposition method and system based on multi-feature event classification - Google Patents

Non-invasive load decomposition method and system based on multi-feature event classification Download PDF

Info

Publication number
CN116166992A
CN116166992A CN202310208074.3A CN202310208074A CN116166992A CN 116166992 A CN116166992 A CN 116166992A CN 202310208074 A CN202310208074 A CN 202310208074A CN 116166992 A CN116166992 A CN 116166992A
Authority
CN
China
Prior art keywords
load
event
data
power
sequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310208074.3A
Other languages
Chinese (zh)
Inventor
王宏斌
宋海通
何艺玄
张帅
赵明康
徐桂芝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hebei University of Technology
Original Assignee
Hebei University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hebei University of Technology filed Critical Hebei University of Technology
Priority to CN202310208074.3A priority Critical patent/CN116166992A/en
Publication of CN116166992A publication Critical patent/CN116166992A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Supply And Distribution Of Alternating Current (AREA)

Abstract

The invention relates to a non-invasive load decomposition method and a system based on multi-feature event classification, wherein the decomposition method classifies events by utilizing time-frequency domain features, can determine the working time period of equipment according to event classification results, positions the working interval of the equipment, ignores data in the non-operating period of the equipment by utilizing a self-attention mechanism of a transducer, can concentrate attention to the working interval of target equipment according to the positioned working interval, and can better predict the operating power of the target equipment.

Description

Non-invasive load decomposition method and system based on multi-feature event classification
Technical Field
The invention belongs to the technical field of load monitoring in intelligent power utilization directions, and particularly relates to a non-invasive load decomposition method based on multi-feature event classification.
Background
With the development of society, the demand for energy is increasing, fossil energy represented by petroleum is consumed in an amount which is more than 40% of the specific gravity of energy consumption. In order to reduce the dependence on fossil energy, the development of low-carbon economy and clean energy is promoted, and the utilization efficiency of electric energy needs to be improved. Thus, a load monitoring concept is proposed.
Under the background of pushing the intelligent power grid, in order to realize the efficient utilization of electric energy, the service condition of the equipment inside the user needs to be acquired, the electricity consumption data is analyzed and fed back, and the user is guided to take economic and reasonable electricity consumption actions. In the past load monitoring, in order to ensure accuracy of device classification, high-frequency power data is often added to load characteristics, which undoubtedly increases the cost of load monitoring. With the increase of electrical equipment, similar working states can appear among the equipment, so that in a load decomposition task, a model can misjudge the working range of the equipment, and decomposition performance is greatly reduced. Thus, ensuring the mission accuracy of the NILM system is an important challenge to non-invasive load monitoring without increasing the complexity of the model.
Disclosure of Invention
The invention aims to provide a non-invasive load decomposition method based on multi-feature event classification, so as to solve the technical problems faced in the background. The decomposition method can accurately classify the events generated by the equipment by utilizing the low-frequency power characteristics, and meanwhile, the load decomposition model can pay more attention to the working state of the equipment and ignore the non-working state.
In order to achieve the above purpose, the invention is realized by adopting the following technical scheme:
in a first aspect, the present invention provides a method of non-invasive load decomposition based on multi-feature event classification, the method of load decomposition comprising:
step 1: acquiring total power data of load types to be researched from an existing load data set, and determining a power data true value of each load;
step 2: preprocessing the data of the loads to be researched to obtain processed total power data and power data true values of each load, and carrying out event detection on the processed total power data to obtain M state variable quantities of a plurality of loads;
the event detection process is as follows: setting the length of a sliding window, carrying out sliding window processing on the processed total power data, wherein one sliding window length corresponds to an original power sequence, adopting a sliding window method to respectively calculate the average value in the window, subtracting the average value sequence from the original power sequence to obtain a residual power sequence, mapping the event of the load to the vicinity of a zero point, comparing the extreme value and the slope of the residual power for the simple load with the step change of the power characteristic when the event occurs, and judging that the event occurs if the extreme value and the slope exceed the set corresponding thresholds; for complex loads with long transition time, judging whether an event occurs or not by comparing whether the number of zero crossing points of residual power in a window exceeds a zero crossing threshold value;
step 3: constructing a classification dataset
Selecting an original power sequence with an event and a corresponding residual power sequence, carrying out step processing on the original power sequence with the event, and obtaining an amplitude sequence and a phase sequence which have the same length as the original power sequence after FFT processing on the original power sequence after the step processing; the amplitude sequence, the phase sequence, the residual power sequence and the original power sequence form a multi-load characteristic, and finally the multi-load characteristic is spliced to be used as a sample, and each sample corresponds to the state variable quantity of the load; a classification data set is formed by a large number of samples of the data of the load to be researched and the state change quantity of the corresponding load;
step 4: training a CNN network model by using the classification data set, wherein the input of the CNN network model is a multi-load characteristic, and the number of output nodes of the CNN network model is the sum +1 of the quantity of all state variables of all kinds of loads; adding 1 to represent that the CNN network model judges no event;
the trained CNN network model is used for classifying the detected event sequences to obtain switching event results of each load;
step 5: the method comprises the steps of obtaining event classification results by using a trained CNN network model, positioning working intervals of target loads according to the event classification results, masking and shielding non-working intervals in processed total power data, and training a transducer network model by using the masked total power data and the power data true value of each load after corresponding processing;
and carrying out load decomposition on the input total load by using the trained transducer network model to obtain the power waveform of the target equipment.
Sensors are installed in the prior user and at the inlet, the use condition of the load in the user is monitored, the total power data of the user and the power data of each load are obtained, and the low-frequency power characteristics are selected from the total power data and the power data of each load; according to different internal loads of users, obtaining the transition time of an event, setting corresponding thresholds of a power difference value, a slope and an extremum before and after the event and a zero crossing threshold, preprocessing the monitored total power, then carrying out event detection to obtain an original power sequence of the occurrence event, and then completing the decomposition of the user load through steps 3-5.
The CNN network model comprises an input layer, a convolution layer, a pooling layer, a linear layer and an output layer, wherein the convolution kernel size is 3 multiplied by 1, the number of convolution kernels is 3, boundary filling is set to be same, the size of a feature sequence is unchanged after convolution operation is ensured, three convolution calculation results are added and then input into a ReLu activation function, a convolution layer result is obtained, and a maximum pooling method is used for extracting features;
two linear layers are used, the number of input nodes of the first linear layer and the data length after the result of the convolution pooling layer is stretched, the number of output nodes of the first linear layer is set to 128, the number of input nodes of the second linear layer is the number of output nodes of the first linear layer, and the number of output nodes of the second linear layer is 32;
the connection mode of the output layer and the upper layer is full connection, the number of output nodes of the output layer is set to 2N+1, wherein N is the training model which requires event classification for several loads, and 1 is added because the model needs to judge no event; using softmax as the activation function for the last layer;
in the training process, the labels corresponding to each event are converted into single thermal codes and used for calculating loss values, and a loss value gradient descent method is used for updating parameters of the CNN network model.
Masking off the non-working intervals using a infill masking pad operation, which is required at the input of the decoder of the Transformer network model; the transducer network model has 8 heads, the word vector dimension is 512, the encoder and decoder internally contain 6 layers, the linear layer inside the encoder and decoder sets the input node to 2048, the word vector dimension is set to 128, and the inside is set to dropout=0.1.
The existing payload data set is a REDD data set or a UK-DALE data set.
In a second aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the load splitting method.
In a third aspect, the present invention provides a non-invasive load decomposition system based on multi-feature event classification, the system comprising:
the data acquisition module is used for acquiring total power data and single load power data of the load type to be researched;
the data preprocessing module is used for preprocessing the power data obtained by the data acquisition module;
the working interval positioning module is used for completing event detection, selecting an original power sequence of an event by utilizing the event detection result, performing frequency domain transformation to form a feature vector consisting of time domain features and frequency domain features, constructing a CNN network model, and positioning the working interval of the target load according to the event classification result;
the load decomposition module is used for carrying out covering shielding on the non-working interval in the processed total power data, and training a transducer network model by utilizing the covered total power data and each corresponding single load power truth value; and carrying out load decomposition on the input total load by using the trained transducer network model to obtain the power waveform of the target equipment.
Compared with the prior art, the invention provides a non-invasive load decomposition method based on multi-feature event classification. The beneficial effects of the invention are as follows:
(1) The decomposition method of the invention classifies the events by utilizing the time-frequency domain characteristics, can determine the working time period of the equipment and locate the working interval of the equipment according to the event classification result, ignores the data in the non-operating period of the equipment by utilizing the self-attention mechanism of the transducer, can concentrate attention to the working interval of the target equipment according to the located working interval, and can better predict the operating power of the target equipment. As shown in fig. 3, at the end of the first working period of the refrigerator, since the dishwasher starts to operate, an operation state similar to that of the refrigerator is generated, and thus the decomposition model is mistakenly considered to start to operate, and thus the decomposition result is deviated.
(2) The invention uses time-frequency domain conversion for low-frequency power, selects the amplitude sequence, the phase sequence and the residual power sequence corresponding to the original power sequence of the occurrence event, takes the feature vector formed by a plurality of features as training data, and obviously improves the event classification precision of the subsequent event classification network model. The on-off events of the target equipment can be identified through the event classification network model, the function of locating the working interval can be realized, the working interval of the target equipment can be obtained, and the defects that in the existing load monitoring task, only which load is working is detected, but the accurate running interval of the load cannot be given are overcome.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings required for the embodiments are briefly described below. The following drawings illustrate only the embodiments of the invention and are therefore not to be considered limiting of its scope. Other researchers can obtain other relevant drawings without the need for inventive labor.
FIG. 1 is a schematic diagram of a framework of a multi-feature event classification based non-invasive load decomposition system according to the present invention.
Fig. 2 is a schematic diagram of event detection in embodiment 2.
Fig. 3 is an exploded view of the refrigerator in embodiment 1.
Fig. 4 is an exploded view of the refrigerator in embodiment 2.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings, and the present examples are implemented on the premise of the technical route of the present invention, and the scope of the present invention is not limited to the following examples.
The non-invasive load splitting method proposed in the present application, focusing on specific intervals, is structured as shown in figure 1,
step 1: and acquiring total power data of loads to be researched from the existing data set, determining power true values of the loads, or installing sensors at the ammeter and equipment of the user house, acquiring electricity consumption information of the user, and selecting low-frequency power characteristics in the user house. The embodiment uses a public data set without the need to collect data on site using an acquisition platform.
Step 2: and carrying out data preprocessing on the acquired data, including processing of missing data and abnormal data. Taking the REDD data set as an example, the data set contains single appliance power data with the sampling frequency of 1/3Hz and all appliance power data with the sampling frequency of 1 Hz.
Step 3: and (3) carrying out event detection on the power sequence (i.e. the processed total power data) with the selected sampling points continuously, judging when the electric appliance starts to work and stops working, and judging that the sequence of the electric appliance on event or off event needs to be recorded. The residual power detection event can be used for detecting step load and is also effective in detecting electrical appliance events with long transition states.
Step 4: a plurality of load characteristics, namely an original power sequence, a residual power sequence, an FFT amplitude sequence and an FFT phase sequence, are constructed, the sampling point of one characteristic sequence (namely one original power sequence) is 50, and the sampling points of four characteristic sequences are 200. The data input format and magnitude of each feature sequence are unified, and feature vectors are spliced to distinguish different events. And building a supervised classification network model, wherein the number of input nodes of the supervised classification network model is related to the length of a sample, and the number of output nodes is related to the number of the nodes to be classified. The supervised classification network model is used for classifying the detected event sequences to obtain switching event results of all loads.
Step 5: and determining the working state of the current load according to the result of the event classification, covering the interval where the target equipment does not work on the processed total power data, and marking the power value of the single load. And constructing a transducer network model for carrying out load decomposition on the input total load to obtain the power waveform of the target equipment.
In step 1, since the on-site collection of the electric power data is inefficient, and there are problems of large error, high cost, long period, inconvenient maintenance, etc., the use of the overseas published data sets, such as the REDD data set and the UK-DALE data set, etc., is an economical and effective method from the viewpoint of training the effective model. The power data acquisition mode is non-invasive, the circuit structure of the user is not required to be changed in the later stage, a plurality of sensors are not required to be installed, and the running condition of a single load can be estimated by only analyzing the total power data through intelligent equipment.
In step 2, the use of the public data set is subject to data loss or data anomalies, which are typically caused by equipment failure or the operational characteristics of the load itself. Missing data and data anomalies can interfere with subsequent event classification models (supervised classification network models) and decomposition models (Transformer network models), and thus both cases need to be handled.
An event detector of a single time scale may be used to detect events. And setting a certain window length, and filtering the original power sequence by adopting a rolling median filter. The average value in the window can not only eliminate noise with small amplitude, but also keep clear event edges when the direct current bias is removed. And subtracting the average value sequence from the original power sequence, wherein the obtained power sequence is called a residual sequence and is used as the basis of event judgment.
And step 3, in the invention, the characteristic sequence of the load is processed, and the residual power of the original power sequence is calculated, so that the event of the load in the data set is mapped to the vicinity of the zero point. When an event occurs, for a simple load with power characteristics generating step change, whether the extreme value and the slope of residual power exceed a threshold value or not can be compared to judge whether an event occurs or not; for complex loads with long transition time, whether an event occurs or not can be judged by comparing the number of zero crossing points of residual power in a window.
The original power sequence is processed to judge and modify the rationality of the input data, and in addition, the data is standardized to facilitate the model to smoothly complete the training process. A sequence of samples that have been annotated with event types is selected for use in constructing a training dataset for the classification model. However, when the samples are selected, in order to increase the degree of distinction between the events, the classification model is assisted to analyze the gap between the events on the new features, and new time-frequency domain features can be added on the basis of the original low-frequency power data.
After the data set is built, a network model of a one-dimensional convolutional neural network is built, and because the low-frequency data is used in the method, and the length of a load event sequence is shorter under the condition of low sampling rate, a classical convolutional neural network structure can be used.
In step 4: in terms of feature extraction, for low frequency power features, time-frequency domain conversion may be employed to construct other load features. The acquired frequency domain features need to be spliced with the original power sequence to form a feature vector that represents the unique tag of the event. In the aspect of event classification, a one-dimensional convolutional neural network is adopted as a classification model, the input of the network is a feature vector composed of a plurality of features, and the output is a load event type. In this embodiment, the event types of the load are divided into on events and off events, and for a sequence of events that are misidentified as events by event detection, the classification model should output a result that no event occurs, so the output node of the model should include the on events and off events of the load, and also no event, respectively.
And positioning an on event and an off event of the target equipment by using the event result of the last step, and masking the section by using a mask, wherein the masking method is detailed in the embodiment. Then, a load decomposition data set is built, wherein the input of the load decomposition data set is the total load, the output is the power data of a single device, and the masking operation is carried out in an input sample.
The training of the load decomposition model is then started, and a sequence-to-sequence network model is used in the present invention, consisting of two parts, an Encoder and a Decoder. During training, total load data is input from the encoder, single load data is input from the decoder, and the decomposition model output result and the real target device power loss value are calculated. And correcting the parameters by using an optimized gradient descent method. In the test phase, the total load data to be predicted is added to the encoder, and the model serially predicts the power data of a single load.
In terms of load decomposition, it is necessary to use a power sequence of a target load as an output with the power data of the total load as a model input as an input. Before training, to achieve the problem of masking similar load disturbances outside the working interval, these sequences need to be masked, and the network model will not notice this part of the sequence in the subsequent self-attention calculations.
The transition time of one state to the other steady state is regarded as the transition time, the transition time is more than 5 times of the sampling interval, the complex compound with the long transition time refers to the load with non-step change in the transition process, the data set in the embodiment is 1s sampling interval, and the simple load generally completes the event change for 1-2s when the event is generated. The invention can detect the event for the simple and responsible equipment, and the mean change is not affected by the window position. The residual power event detection mode is not only suitable for event detection of simple load under low frequency, but also suitable for complex load with long transition process and complex state.
The internal load of the user can correspond to the same type of equipment with different amounts of electric power, and can also be different types of equipment.
In the load-resolved transducer model, adam gradient descent optimization algorithm is employed. The Adam gradient descent optimization algorithm is a combination of a momentum method and an RMSprop algorithm, and momentum items are added in the training process to accelerate, and the constraint of learning rate is also considered.
In the application, the step 2 mainly works to preprocess data so that the data becomes regular and orderly, which is the basis of training a neural network, and if too much dirty data exists in a training set, the model has the problems of inaccurate prediction or incapability of convergence and the like. The specific implementation mode is as follows:
in step 2 of the present invention, if the time span of the continuously missing data is smaller, for example, less than one fifth of the span of the load working interval, the data is filled by adopting an interpolation mode. For sequences with a missing data time span that is large, exceeding a set threshold of one fifth, the sequence is discarded directly.
In step 2 of the present invention, the abnormal data in the collected data is generated by the load entering the overvoltage state, and is a real state of the load, but for the architecture characterized by the low-frequency power as the load power, the subsequent model is easy to be interfered. Taking a refrigerator device of a REDD data set as an example, overvoltage occurs when the refrigerator device starts to work, and when the acquisition device just acquires the overvoltage state of the refrigerator device, extremely high instantaneous power is generated, and abnormal data which are invalid in the invention are generated. For power data obtained at a low sampling rate, only one abnormal value usually occurs in a single working period, so that the data is processed by discarding the data first, calculating the average value of the front power value and the back power value, and filling the average value as new data.
In the step 2 of the invention, because the distribution among samples is different, the samples are required to be standardized, the data of the samples are limited in a certain range, and the event data can be prevented from losing the original characteristics in the subsequent network model training process. The normalization method adopted by the invention is min-max normalization, also called dispersion normalization, and the normalization result is shown as formula (1).
Figure BDA0004111583610000061
Wherein x is input sample power data, and min and max are respectively the minimum value and the maximum value of an input sequence; x is x * Is normalized data.
In step 3 of the present invention, the average value in the window is calculated for the total power sequence by adopting a sliding window method, the window length is set to be 5, the sliding window processing is performed for the processed total power data, one sliding window length corresponds to one original power sequence, and the average value sequence is subtracted from the original power sequence to obtain P R Referred to as the residual power. The residual power sequence calculation process is shown in formula (2).
P R =P-P M (2)
As shown in fig. 2 of the drawings of the present invention, the power step change otherwise generated by a refrigerator event is mapped to a triangle-like wave. The invention judges whether an event occurs or not by means of the slope and the extremum of the event generating place. The slope K and the extremum are shown in formula (3).
Figure BDA0004111583610000062
Figure BDA0004111583610000063
In the formula, width is the set window length, and in the event detection in step 2, the slope threshold is set to be 50 for the refrigerator in the REDD data set, the extremum threshold is set to be 180, and in order to increase the practicability, the redundancy is required to be set, and the invention is set to be +/-10%. If the extremum and slope characteristics of the refrigerator residual power are detected to be within 10% of the set corresponding threshold values, a refrigerator event is determined to occur. The other loads are the same.
When detecting the event of the complex load, the sliding window method can be adopted to detect the event, but the slope and the extremum of the triangular wave cannot be calculated because the transition process of the complex load is complex and the transition time is long. To this end, the number of zero crossings within a certain window may be detected, and if they are greater than a zero crossing threshold, an event is considered to occur.
In step 4 of the present invention, the problem to be solved is to classify the events of each device, so as to effectively solve the problem of classifying similar events.
Firstly, constructing a multi-feature aspect, in order to increase the degree of distinction between events, additional features need to be introduced for learning, and a fourier algorithm is used in step 4. Aiming at the frequency domain conversion problem of discrete data, the discrete Fourier transform is needed to be utilized, but subsequent researchers develop a Fast Fourier Transform (FFT) method by utilizing the characteristics of symmetry and the like of the discrete Fourier transform, and subsequent developers integrate the fast Fourier transform method into python. In order to avoid drastic changes in the phase sequence caused by window shifts and slight changes in the waveform, the original power sequence at which the event occurred needs to be stepped. For example, data between 80 and 84 is set to 80 and data between 85 and 89 is set to 85. After the original power data subjected to the step processing is subjected to FFT processing, an amplitude sequence and a phase sequence which have the same length as the original power sequence can be obtained. And finally, splicing the amplitude sequence, the phase sequence, the residual power and the original power sequence, and inputting the spliced amplitude sequence, the phase sequence, the residual power and the original power sequence into a CNN network model as a classification basis.
In the aspect of a network model, a classical one-dimensional convolutional neural network is selected as a learning model, and the CNN structure in the invention is respectively an input layer, a convolutional layer, a pooling layer, a linear layer and an output layer according to parameter setting.
Input layer: the input is a processed event sequence consisting of a plurality of load characteristics. If the time span of the input samples (the number of sample points) is N, the number of nodes of the input layer is set to 4N. In step 4, n=50 is set, which is suitable for a data set with a low sampling frequency, such as a REDD data set with a sampling frequency of 1Hz, and for a data set with a long sampling interval, such as UK-DALE, the power data can be interpolated and filled and then input into the network model.
Rolling and pooling layers: the convolution layer and the pooling layer can reserve information in the visual field, and the calculated amount is reduced. And 4, the size of the convolution kernel adopted in the step is 3 multiplied by 1, the number of the convolution kernels is 3, the boundary filling is set to be same, the size of the feature sequence is ensured to be unchanged after the convolution operation is carried out, and after a plurality of convolution results are added, a ReLu function is used as an activation function. The pooling layer is selected by a maximum pooling method, so that the maximum value in the visual field can be extracted, and the maximum characteristic of the original visual field is reserved.
Linear layer: in the CNN structure of step 4, two linear layers are used. The number of input nodes of the first linear layer and the data length after the result of the convolution pooling layer is stretched, and the number of output nodes of the first linear layer is set to 128. The number of input nodes of the second linear layer is the number of output nodes of the first linear layer, and the number of output nodes of the second linear layer is 32.
Output layer: in the CNN structure in step 4, the connection mode between the output layer and the previous layer is full connection, and the number of output nodes is 2n+1, where N is the number of events required by the training model to be classified for several loads, and 1 is added because the model needs to determine no event. In the training of multi-class models, softmax is typically used as the activation function for the last layer. In the training process, the labels corresponding to each event need to be converted into one-hot codes for calculating loss values, and a loss value gradient descent method is used for updating parameters of the model. When the trained model is applied to the classification scene, the node type corresponding to the maximum value of the output layer nodes is the classification result.
In step 5 of the invention, the help decomposition model shields the load information outside the working interval, shields the irrelevant information, and inserts the information into the data processing process of the load decomposition.
In the network model translator of the present invention, there are two places where the mask matrix can be embodied. One is called infill masks (paddingmask) at the input of the transducer, masking off the non-working regions. The actual procedure is to perform a stuffing operation to ensure that the lengths of all samples are uniform, and to set the stuffing data to an infinitesimal data (1×10 in the present invention) -9 ) This way, the weight of the padding data can be zeroed out when the attention weight is calculated later. Secondly, the input of the decoder also requires a masking mask operation, called sequence mask. The purpose of the mask is to facilitate the model to produce the same serial training effect as RNN and LSTM during training, but actually in parallel. The actual operation process is that assuming that the window length of the input sample is N, an N multiplied by N matrix is set to obtain a triangular matrix, the triangular matrix is multiplied by the input matrix, and the triangular matrix is input into a model to predict the power value of a single load.
Secondly, in terms of model construction, the set model parameters are the same as those of a classical transducer structure, namely 8 heads are set, the word vector dimension is 512, 6 layers are contained in the encoder and the decoder, the linear layer set input nodes in the encoder and the decoder are 2048, the word vector dimension is set to 128, dropout=0.1 is set in the encoder and the decoder, and the influence of model overfitting can be reduced by setting dropoout.
FIG. 1 is a non-intrusive, load-exploded frame diagram of the present invention, with arrows representing the flow direction of data. The frame is divided into a data acquisition module, a data preprocessing module, a working interval positioning module and a load decomposition module. First, the load data of the present invention is derived from the public data set, and unreasonable data in the data set is processed. Then, detecting an event generated by the load, performing time-frequency domain transformation on the event sequence to form a feature vector composed of time domain features and frequency domain features, and constructing a CNN network model for classifying the types of the event. And finally, locating the working interval, covering the non-working interval, and training the load decomposition model.
Example 1
The construction and training process of the transducer network model in this embodiment is as follows:
(1) A loadbreak training dataset is constructed. Setting 200 to be a fixed window length, acquiring sample data from the total load power data and the target equipment power data by adopting a sliding window method, inserting sample start-stop characters, and setting the window moving step length to be the same as the window length. The load decomposition training data set comprises total load power data after a non-working interval is covered and power truth values (single load power information) of each load, the training data set format of a transducer is encoder input, decoder input and decoder output, and the encoder needs to input and is used for self-attentive calculation and coding of the total load data needing to be predicted; the decoder also requires an input to calculate the internal self-attention of the individual device power sequences; the decoder also requires an output, which is also a power sequence of the individual devices, which participates in the parallel training during the training process, while also calculating the penalty value.
(2) And (5) building a network model. And constructing a mask matrix at the input end of the decoder, and constructing a transducer model by using a pytorch deep learning framework. The number of heads is set to 8, and the data in the samples is converted into word vectors with dimension of 512. The number of layers inside the decoder and encoder is set to 6, and the linear layer for the word vector to be converted into Q and V vectors is set to 512 x 128.
(3) Training and testing. In the training stage, the total load information is input into an encoder, the single load information is input into a decoder, the decoder inputs the multi-head attention layer after being covered, the multi-head attention mechanism operation is carried out with the output of the encoder, and then the characteristics are integrated and compressed through a forward neural network. And comparing the decoder calculation result with the real data, calculating a loss value, and updating parameters by using a back propagation optimization algorithm. In the test phase, the required decomposed data is input into the encoder and a start symbol is input into the decoder to start serial prediction.
Fig. 2 is a diagram showing an event detection method according to the present invention, wherein a solid line is an original power waveform of a refrigerator, and a dotted line is a residual power waveform of the refrigerator. As can be seen, the residual power maps the step change at the original power waveform event into a triangle-like wave.
Fig. 3 is a graph of the result of decomposing the refrigerator according to example 1, i.e., without event classification, wherein the solid line in the graph is the actual running waveform of the refrigerator, and the dotted line is the predicted waveform of the refrigerator obtained after decomposing the load decomposition model.
Fig. 4 is a graph of the result of decomposing the refrigerator according to example 2, wherein the solid line is the actual running waveform of the refrigerator, and the dotted line is the predicted waveform of the refrigerator obtained by decomposing the model.
As can be seen from a comparison of fig. 3 and fig. 4, by masking the data of the non-working section, the working section information of the target device is told to the model, so that the model can pay more attention to the running state of the working section. Meanwhile, the model also has the capability of distinguishing similar loads, and the power change of the similar loads is not recognized as the operation data of the target equipment, so that the decomposition capability of the model can be improved.
Example 2
The non-invasive load decomposition method based on multi-feature event classification in this embodiment specifically includes the following steps:
(1) Event detection and event classification. Event detection utilizes a sliding window method to detect the events of all loads (the on or off event of a dish washer, the on or off event of a microwave oven, the on or off event of a refrigerator, the on or off event of an oven and the on or off event of a lamp) in the total load, calculates residual power for an original power sequence by taking the refrigerator as target equipment, and utilizes extremum and slope as characteristics to detect the events. And constructing a feature vector consisting of original power, residual power, FFT amplitude feature and phase feature, and inputting the feature vector into a CNN network model, wherein parameters are detailed in a specific implementation mode.
Classified data set of CNN network model
(2) A loadbreak training dataset is constructed. The procedure is as in step (1) of example 1.
(3) And (5) building a network model. And (3) processing the padding mask matrix, setting the data of the non-working interval to zero according to the event classification result in the step (1), and replacing the data with a minimum value when the attention is calculated later. The network model is the same as step (2) of example 1.
(4) Training and testing. The procedure is as in step (3) of example 1.
In summary, the non-invasive load decomposition method based on multi-feature event classification of the present invention has the following advantages compared with other previous deep learning models:
1. the internal multi-feature event CNN network model can be independently used for event detection, frequency domain feature auxiliary classification is utilized, and a convolution layer and a pooling layer in the CNN network model are adopted for feature concentration, so that the accuracy of event classification is improved on the premise of not remarkably increasing the calculated amount.
2. The event information is added into the training process of the decomposition model, so that the model for shielding interference can be trained, the workload is not increased basically, the decomposition effect of the decomposition model is improved, and the method is particularly suitable for the decomposition of periodic load.
3. In the decomposition model, parallel training of data samples is allowed, and the training period of the model is shortened.
The above embodiments are part of the present invention and are merely for illustrating the technical solution of the present invention, but are not limited thereto. On the basis of the framework provided by the invention, the technical scheme obtained by modifying or replacing the technical scheme by researchers in the field belongs to the protection scope of the invention.
The embodiments described above are some, but not all embodiments of the invention. The detailed description of the embodiments of the invention is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.

Claims (7)

1. A non-invasive load decomposition method based on multi-feature event classification, the load decomposition method comprising:
step 1: acquiring total power data of load types to be researched from an existing load data set, and determining a power data true value of each load;
step 2: preprocessing the data of the loads to be researched to obtain processed total power data and power data true values of each load, and carrying out event detection on the processed total power data to obtain M state variable quantities of a plurality of loads;
the event detection process is as follows: setting the length of a sliding window, carrying out sliding window processing on the processed total power data, wherein one sliding window length corresponds to an original power sequence, adopting a sliding window method to respectively calculate the average value in the window, subtracting the average value sequence from the original power sequence to obtain a residual power sequence, mapping the event of the load to the vicinity of a zero point, comparing the extreme value and the slope of the residual power for the simple load with the step change of the power characteristic when the event occurs, and judging that the event occurs if the extreme value and the slope exceed the set corresponding thresholds; for complex loads with long transition time, judging whether an event occurs or not by comparing whether the number of zero crossing points of residual power in a window exceeds a zero crossing threshold value;
step 3: constructing a classification dataset
Selecting an original power sequence with an event and a corresponding residual power sequence, carrying out step processing on the original power sequence with the event, and obtaining an amplitude sequence and a phase sequence which have the same length as the original power sequence after FFT processing on the original power sequence after the step processing; the amplitude sequence, the phase sequence, the residual power sequence and the original power sequence form a multi-load characteristic, and finally the multi-load characteristic is spliced to be used as a sample, and each sample corresponds to the state variable quantity of the load; a classification data set is formed by a large number of samples of the data of the load to be researched and the state change quantity of the corresponding load;
step 4: training a CNN network model by using the classification data set, wherein the input of the CNN network model is a multi-load characteristic, and the number of output nodes of the CNN network model is the sum +1 of the quantity of all state variables of all kinds of loads; adding 1 to represent that the CNN network model judges no event;
the trained CNN network model is used for classifying the detected event sequences to obtain switching event results of each load;
step 5: the method comprises the steps of obtaining event classification results by using a trained CNN network model, positioning working intervals of target loads according to the event classification results, masking and shielding non-working intervals in processed total power data, and training a transducer network model by using the masked total power data and the power data true value of each load after corresponding processing;
and carrying out load decomposition on the input total load by using the trained transducer network model to obtain the power waveform of the target equipment.
2. The non-invasive load decomposition method based on multi-feature event classification according to claim 1, wherein sensors are installed in the existing user and the portal, the use condition of the load in the user is monitored, the total power data of the user and the power data of each load are obtained, and the low-frequency power features used in the method are selected; according to different internal loads of users, obtaining the transition time of an event, setting corresponding thresholds of a power difference value, a slope and an extremum before and after the event and a zero crossing threshold, preprocessing the monitored total power, then carrying out event detection to obtain an original power sequence of the occurrence event, and then completing the decomposition of the user load through steps 3-5.
3. The non-invasive load decomposition method based on multi-feature event classification according to claim 1, wherein the CNN network model comprises an input layer, a convolution layer, a pooling layer, a linear layer and an output layer, the convolution kernel size is 3×1, the number of convolution kernels is 3, the boundary filling is set to be the same, the feature sequence is ensured to be unchanged in size after undergoing convolution operation, the three convolution calculation results are added and then input into a ReLu activation function, a convolution layer result is obtained, and features are extracted by using a maximum pooling method;
two linear layers are used, the number of input nodes of the first linear layer and the data length after the result of the convolution pooling layer is stretched, the number of output nodes of the first linear layer is set to 128, the number of input nodes of the second linear layer is the number of output nodes of the first linear layer, and the number of output nodes of the second linear layer is 32;
the connection mode of the output layer and the upper layer is full connection, the number of output nodes of the output layer is set to 2N+1, wherein N is the training model which requires event classification for several loads, and 1 is added because the model needs to judge no event; using softmax as the activation function for the last layer;
in the training process, the labels corresponding to each event are converted into single thermal codes and used for calculating loss values, and a loss value gradient descent method is used for updating parameters of the CNN network model.
4. The multi-feature event classification based non-invasive load decomposition method according to claim 1, wherein non-working intervals are masked using a infill mask operation, which is required at the input of the decoder of the Transformer network model; the transducer network model has 8 heads, the word vector dimension is 512, the encoder and decoder internally contain 6 layers, the linear layer inside the encoder and decoder sets the input node to 2048, the word vector dimension is set to 128, and the inside is set to dropout=0.1.
5. The multi-feature event classification based non-invasive load decomposition method of claim 1, wherein the existing load dataset is a REDD dataset or a UK-DALE dataset.
6. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the load splitting method as claimed in claims 1-5.
7. A non-invasive load decomposition system based on multi-feature event classification, the system comprising:
the data acquisition module is used for acquiring total power data and single load power data of the load type to be researched;
the data preprocessing module is used for preprocessing the power data obtained by the data acquisition module;
the working interval positioning module is used for completing event detection, selecting an original power sequence of an event by utilizing the event detection result, performing frequency domain transformation to form a feature vector consisting of time domain features and frequency domain features, constructing a CNN network model, and positioning the working interval of the target load according to the event classification result;
the load decomposition module is used for carrying out covering shielding on the non-working interval in the processed total power data, and training a transducer network model by utilizing the covered total power data and each corresponding single load power truth value; and carrying out load decomposition on the input total load by using the trained transducer network model to obtain the power waveform of the target equipment.
CN202310208074.3A 2023-03-07 2023-03-07 Non-invasive load decomposition method and system based on multi-feature event classification Pending CN116166992A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310208074.3A CN116166992A (en) 2023-03-07 2023-03-07 Non-invasive load decomposition method and system based on multi-feature event classification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310208074.3A CN116166992A (en) 2023-03-07 2023-03-07 Non-invasive load decomposition method and system based on multi-feature event classification

Publications (1)

Publication Number Publication Date
CN116166992A true CN116166992A (en) 2023-05-26

Family

ID=86414693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310208074.3A Pending CN116166992A (en) 2023-03-07 2023-03-07 Non-invasive load decomposition method and system based on multi-feature event classification

Country Status (1)

Country Link
CN (1) CN116166992A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116559575A (en) * 2023-07-07 2023-08-08 国网江苏省电力有限公司常州供电分公司 Load event detection method and device
CN116861318A (en) * 2023-09-05 2023-10-10 国网浙江省电力有限公司余姚市供电公司 User electricity load classification method, device, equipment and storage medium
CN117458473A (en) * 2023-11-07 2024-01-26 国网江西省电力有限公司供电服务管理中心 Load event authenticity prediction method, device, equipment and medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116559575A (en) * 2023-07-07 2023-08-08 国网江苏省电力有限公司常州供电分公司 Load event detection method and device
CN116559575B (en) * 2023-07-07 2023-11-24 国网江苏省电力有限公司常州供电分公司 Load event detection method and device
CN116861318A (en) * 2023-09-05 2023-10-10 国网浙江省电力有限公司余姚市供电公司 User electricity load classification method, device, equipment and storage medium
CN116861318B (en) * 2023-09-05 2023-11-21 国网浙江省电力有限公司余姚市供电公司 User electricity load classification method, device, equipment and storage medium
CN117458473A (en) * 2023-11-07 2024-01-26 国网江西省电力有限公司供电服务管理中心 Load event authenticity prediction method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN116166992A (en) Non-invasive load decomposition method and system based on multi-feature event classification
CN112766342A (en) Abnormity detection method for electrical equipment
CN113011481B (en) Electric energy meter function abnormality assessment method and system based on decision tree algorithm
CN113987205A (en) Gas turbine fault diagnosis method and system
CN105044499A (en) Method for detecting transformer state of electric power system equipment
CN113902104A (en) Non-invasive load monitoring method combining unsupervised domain self-adaptive strategy and attention mechanism
CN113466597A (en) Intelligent detection method for equipment state of rail transit power supply system
CN118214168B (en) Real-time state monitoring method for power distribution circuit
Qiu et al. Anomaly detection for power consumption patterns in electricity early warning system
CN118157132A (en) Data mining method and device for voltage monitoring system based on neural network
CN113887912A (en) Non-invasive load identification method for deeply learning downward embedded equipment
CN110956281A (en) Power equipment abnormity detection alarm system based on Log analysis
CN106443164A (en) Transient state event and steady state event monitoring method during electric energy classification metering process
CN116720983A (en) Power supply equipment abnormality detection method and system based on big data analysis
CN116819382A (en) DC-DC converter state monitoring method based on digital twin
CN111506636A (en) System and method for analyzing residential electricity consumption behavior based on autoregressive and neighbor algorithm
Catterson et al. On-line transformer condition monitoring through diagnostics and anomaly detection
CN115343579B (en) Power grid fault analysis method and device and electronic equipment
CN115808563A (en) High-voltage user electricity stealing detection method based on electricity power abnormity analysis
Yang et al. Research on CNN-LSTM DC power system fault diagnosis and differential protection strategy based on reinforcement learning
CN114676783A (en) Load identification method based on single classification and fuzzy width learning
CN115293195A (en) Analysis and prediction method and device applied to coal-to-electricity load characteristics
TOKAM et al. Non-intrusive load monitoring (nilm), interests and applications
CN113033076A (en) Non-invasive load monitoring method and device based on multi-chain decomposition method
CN112418398A (en) Safety monitoring method for power information equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination