Summary of the invention
Present invention is primarily aimed at provided a kind of non-intrusion type load identification method, dug based on Design of Wavelet and data
Digging coorinated training to improve identification accuracy reduces the computational complexity of remained capacity, while providing a kind of test macro to this
Recognition methods is tested.
The present invention is achieved through the following technical solutions:
A kind of non-intrusion type load recognition methods based on coorinated training, is used for electricity system, and the electricity system includes
Several loads, comprising:
It captures the electricity system and loads the transient current signal after switching every time, obtain transient current signal data collection;
Several Wavelet Clusters are obtained by Design of Wavelet and cluster;
To each transient current signal, the covariance of each small echo Yu the transient current signal is calculated, it will be with the wink
State current signal has small echo of the small echo of maximum covariance as the load;
The wavelet coefficient energy that the load is calculated by wavelet transform, the feature vector as the load;
According to the feature vector of each load, by algorithm more than a pair, in conjunction with decision-tree model and k nearest neighbor classifier to institute
It states data set and carries out coorinated training, to classify to each transient current signal in the data set, and predict accordingly each negative
The classification of load.
Further, the progress coorinated training includes:
Based on transient current signal one k nearest neighbor classifier of training;
Original load class is predicted based on the k nearest neighbor classifier;
The decision-tree model for predicting final load class is determined according to original loadtype, and passes through the decision tree
The final load class of model prediction.
Further, when predicting final load class by the decision-tree model, best point is determined using Gini coefficient
Cutpoint, and final load class is predicted accordingly.
Further, when obtaining several Wavelet Clusters by Design of Wavelet and cluster, based on standardization, two-track position orthogonality and
Low-pass filtering criterion carries out cluster operation by k-means clustering algorithm to design small echo.
Further, the length of the small echo is 6, and number is 91.
A kind of test macro, including electricity system, exchange power calibration, current transformer and load identifier, the use
Electric system includes several different types of loads, and the exchange power calibration is used to be each load supplying, the load identifier
Including data acquisition module and load identification module, the data acquisition module connects the current transformer, passes through the electricity
Current transformer captures the electricity system and loads the transient current signal after switching every time, and the load identification module is for executing
Step in load recognition methods as described above.
Further, the electricity system includes the load of incandescent lamp, four seed type of energy-saving lamp, computer and charger, respectively
Load is connect by electronic switch with the exchange power calibration.
Compared with prior art, non-intrusion type load recognition methods provided by the invention is dug based on Design of Wavelet and data
Dig coorinated training, by algorithm more than a pair, in conjunction with decision-tree model and k nearest neighbor classifier to transient current signal data collection into
Row coorinated training to classify to each transient current signal that data are concentrated, and predicts the classification of each load accordingly, thus real
Showed it is following the utility model has the advantages that
1. wavelet transformation can preferably position the wave character of signal to be identified, has the characteristics that multiresolution, in time domain
All there is the ability of characterization signal local feature with frequency domain, be conducive to extract the effective characteristic information of load.
2. the algorithm based on k nearest neighbor classifier and decision-tree model coorinated training not only reduces the complexity of calculating,
And improve precision of prediction.
3. the recognition methods has the calculating time short, the advantage of high reliablity with the increase of load number.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below with reference to embodiment and attached drawing, to this
Invention is described in further detail.
Non-intrusion type load recognition methods provided by the invention based on coorinated training is used for electricity system, electricity system
Including several loads.As shown in figure 4, recognition methods includes step S1, S2, S3, S4, S5.
Step S1: capture electricity system loads the transient current signal after switching every time, obtains transient current signal data
Collection.
A test macro can be designed to verify the recognition methods, as shown in Fig. 2, the test macro includes electricity consumption system
System, exchange power calibration 5, current transformer 6 and load identifier, electricity system include several different types of loads, exchange
Power calibration 5 is used to be each load supplying, and load identifier includes data acquisition module 7 and load identification module 8, data acquisition
Module 7 connects current transformer 6, captures the transient current signal after electricity system loads switching every time by current transformer 6,
Load identification module 8 is used to execute remaining step in above-mentioned load recognition methods.In the test macro, electricity system includes white
The load of vehement lamp 1,4 four seed type of energy-saving lamp 2, computer 3 and charger, each load by electronic switch with exchange power calibration 5
Connection.
It is tested by building PSCAD/EMTDC emulation platform.Simulation time is set as 10 seconds, is cut after being supported on 3 seconds
It changes.Current signal is sampled with 256 sampled points of each period, and the time in each period is 0.0167 second.It is cut using load
The difference in two periods after alternatively is classified.Data collection is carried out by simulation switching different loads, every kind of load can
To be opened in different combinations.8 kinds of switch states when the load switching of energy-saving lamp 2 are listed shown in following table (table 1), by cutting
Changing 4 loads can produce 32 kinds of different situations, and combination will be repeated 5 times every time.
Logical zero indicates that switch is in an off state in upper table, and logical one indicates closed state.Jumping symbol indicates negative
Load switches over.Setting voltage changes from 210V to 230V, the robustness using 2V as step-length testing algorithm under different voltages.Reason
In the case of thinking, experiment can generate 1760 different data records (× 11 voltage steps of 32 No. × 5 switches of combination).Record
Each transition of the handover event within two periods, is the pre-switch of preceding half period and a half period after switching respectively,
To ensure to capture the entire transient state period, the current temporary state signal of 4 loads is as shown in Fig. 3 a, Fig. 3 b, Fig. 3 c and Fig. 3 d.Use k-
Data set is divided into training set and test set by fo l d cross validation, wherein 90% is used to train, 10% for testing.
Step S2: several Wavelet Clusters are obtained by Design of Wavelet and cluster.To Design of Wavelet in step S2 and cluster difference
It is described as follows.
Design of Wavelet:
Wavelet transformation can preferably retain and extract the time-frequency details characteristic of signal as a kind of time-frequency analysis technology, wide
General to apply in power system failure diagnostic, on-line monitoring field, wavelet transformation can pass through a scaling function V and a small echo letter
Number W is analyzed, such as formula (1) and (2)
In order to select a specific small echo to each load, need to create the small echo list that can be used.Pass through
When Design of Wavelet and cluster obtain several Wavelet Clusters, according to the three of small echo features (standardization, two-track position orthogonality and low pass filtered
Wave), small echo is designed based on standardization, two-track position orthogonality and low-pass filtering criterion.
1) it standardizes:
2) two-track position orthogonality:
3) low-pass characteristic:
It is finite response according to three equation low-pass filters above, the length of filter can be indicated with n, and
And the quantity of freedom degree can be indicated with n/2-1.Since the filter that length is 6 can produce a large amount of small echo and echo signal
It is matched, so directly taking n=6, then can have six different equations, two freedom degrees.By the way that k=1 to 6 is substituted into
(3)-(5) formula solves six low-pass filter coefficients, obtains following (6) equation
For indicating two freedom degrees, c is indicated a and b with a and b in formula.In order to calculate wavelet coefficient, a and b can be from-π
It is changed to π according to step-length for 0.1 π.This is 21 different parameters of a and b assignment, can produce 441 small echos therewith
Echo signal matching afterwards.
Wave Cluster:
In order to reduce the computation burden during late design, cluster operation is carried out by k-means clustering algorithm, to production
441 raw small echos are grouped the small echo with same shape using clustering algorithm, the specific steps are as follows:
1) cluster of k-means: using k means clustering method, by calculating the Euclidean distance between each small echo pair
Δλ,vDetermined.Two wavelet function ψλ(l) and ψv(l) their Euclidean distance Δλ,vIt is calculated by formula (7):
Remember and share k cluster, cluster center is respectively u1, and u2, u3 ... ..uk, the number of samples of each cluster is N1, N2, N3 ...
..NK.Use square error formula (8) as objective function, reduces the square error.
In formulaIt is the mass center of j-th of cluster, ψiIndicate i-th of data object in j-th of cluster.By increasing number of clusters
Square error can be reduced, but number of clusters is more, the burden of subsequent calculating is heavier.In order to solve this contradiction, wheel is introduced
Wide coefficient (Silhouette Coefficient) assesses Clustering Effect, selects representative small echo, judges that k mean value is poly-
The cluster number of class, calculation formula such as formula (9).
Si=(bi-ai)/max(ai-bi) (9)
A in formulaiIt is the average distance of vector i every other object into cluster, and biIt is vector i to all non-where itself
The average distance of remaining point of cluster, it is seen that the value of silhouette coefficient is more to level off between [- 1,1] and 1 represent cohesion degree and separating degree
It is all relatively excellent.
By Design of Wavelet and cluster, the length of the small echo finally obtained is 6, and number is 91.Fig. 1 a and Fig. 1 b difference
Illustrate the square error summation and silhouette coefficient value of the small echo that the filter for the use of length being 6 generates.Show in figure when small
When the quantity of wave cluster is 91, maximum Silhouette coefficient is that 1, SSE is 4.825 × 10-29.
Step S3: to each transient current signal, calculating the covariance of each small echo Yu transient current signal, will be with transient state
Current signal has small echo of the small echo of maximum covariance as load.The analysis of covariance:
Herein, covariance will be used to judge, and will select the echo signal X generated with each loaddWith most
The small echo of big covariance, the transient signal that echo signal can be generated by switching load are collected.Then formula (10) are used
To calculate the covariance of each small echo and echo signal.There to be the small echo of maximum covariance as the small echo of the load.
L indicates the sampling instant (l=1,2,3 ... L) of signal in formula,WithIt is the mean value of echo signal Xd respectively
With representative small echo ψRMean value.
Each of the current transient waveform of capture and 91 small echos are compared, and calculate the association side of each small echo
Difference will have the small echo of maximum covariance as the small echo in the load matched, and it is small that 4 fictitious loads produce 4 representativenesses
Wave.Following table (table 2) shows the small echo serial number after each load matched.
Step S4: the feature vector by the wavelet coefficient energy of wavelet transform computational load, as load.The step
Feature identification is carried out using the energy of wavelet coefficient in rapid:
For NILM application in, need to extract load switching after echo signal X in include hiding feature, can by pair
Echo signal XdWavelet coefficient energy as extracting.Use echo signal XdVariation and scaling function V convolution fortune
It is cA that calculation, which obtains low frequency component coefficient,j(l), echo signal XdVariation and the convolution algorithm of wavelet function W obtain high fdrequency component system
Number cDj(l)。
cAj(l)=< Xd,Vj,l>,cDj(l)=< Xd,Wj,l> (11)
The energy of each wavelet coefficient can be calculated by formula (11), which can be used as between different loads
Characteristic quantity distinguishes.
Step S5: according to the feature vector of each load, by algorithm more than a pair, in conjunction with decision-tree model and k arest neighbors point
Class device carries out coorinated training to data set, to classify to each transient current signal that data are concentrated, and predicts accordingly each negative
The classification of load.The step is trained data set using the thought of decision-tree model and k nearest neighbor classifier coorinated training.It should
Process firstly generates two datasets: the data L of label and unlabelled data U;The data set of label is divided into two
A subset LAAnd LB, developing two disaggregated models by decision tree and NN training is respectively hAAnd hB;After data set generation,
Subset U' is obtained by randomly choosing u record from unlabelled data set U, is sent to hAAnd hBTwo disaggregated models are used
In Tag Estimation.If with tape label data train come model the result of no Tag Estimation is consistent, thus can
Trained model before is further trained with the data set of no label, until unlabelled data all in U are used,
Coorinated training is just completed at last.
The advantage of binary classifier is not only utilized in the classification method of coorinated training, while also increasing the multiple classifications of processing
The ability of label.It combines a k nearest neighbor classifier and decision-tree model to optimize by using OAR method, this will be obtained
The advantage of two kinds of sorting algorithms.
OAR method: by creating four individual decision-tree models, by algorithm more than a pair (One Against Rest,
OAR) classify.Method more than a pair is a series of two classification devices of construction, and a classification and remaining class are separated, and is created
Decision tree.For example a kind of label of energy-saving lamp 2 is positive, remaining load class, which is labeled, to be negative.Then using the method for DWT to all
Transient current signal carries out wavelet transformation, and the energy value of small echo is used as training set.Need to calculate the wavelet coefficient of four loads
Energy value, the energy of coefficient is sent in their own decision-tree model, then different loads classification is positive class and negative
Class.Ultimately form the vector comprising four classifiers.Classified using OAR method, using Monte Carlo method to classifier
It tests.It is recognised that being just enough to obtain consistent result by 1000 Monte Carlo iteration from experiment test.As a result
It see the table below (table 3):
Nicety of grading is calculated using formula (13):
TP indicates the positive class event correctly classified, and TN is the negative class event correctly classified, and P is total positive class event, and N is total
Negative class event.
The nicety of grading of energy-saving lamp 2 and charger 4 is significant lower in table 3 known to observation.In order to find out the decision for using OAR
Tree-model there are the shortcomings that, we introduce two indices and analyze, and are the success rate (TPR) to positive class event category respectively
With the success rate (TNR) to negative class event category, their own classification accuracy such as formula (14)-(15) are calculated:
Shown in recognition accuracy such as following table (table 4):
It can see from table 4, when obtaining precision using TPR, it can be seen that the precision of remained capacity is higher than OAR algorithm
The precision of itself illustrates that decision-tree model is higher to the correctness of positive class event category.But it can see pair from the accuracy of TNR
The accuracy of identification of energy-saving lamp 2 and charger 4 is all very low.This illustrates that decision-tree model is classified existing defects in negative class event.
In order to solve this problem, we introduce the method for coorinated training to mitigate decision-tree model to the pressure of negative class event handling
Power.
Unlike OAR method, coorinated training does not pass through the energy coefficient training decision-tree model of small echo, base
A k nearest neighbor classifier is first trained in transient current signal itself, k value is set as 5 neighbours by repetition test.It will train
K nearest neighbor classifier as original classification device, predict original load class.Then it is determined according to original loadtype for pre-
The decision-tree model of final load class is surveyed, and final load class is predicted by decision-tree model.It is pre- by decision-tree model
When surveying final load class, optimal partition point is determined using Gini coefficient, and predict final load class accordingly.
Classify by this way to new echo signal, k nearest neighbor classifier, primary discrete small is only utilized
Wave conversion (DWT) and a decision tree classifier carry out coorinated training and classify.With use four DWT and four decision tree classifications
The OAR method that device is classified compares.Coorinated training algorithm not only reduces the complexity of calculating and improves precision of prediction.
Accuracy computation formula in formula (13) is equally used for calculating the classification accuracy of the decision-tree model of collaboration test.
Due to classification method be changed into the method for coorinated training according to OAR method, so accuracy measurement mode keep identical, and
And the method for obtaining precision also remains unchanged.It compared classifying using coorinated training method and tri- kinds of TPR, TNR in following table (table 5)
Situation precise manner obtained:
From the point of view of the nicety of grading of table 5, compared with the OAR method in table 3, coorinated training method generates preferably classification knot
Fruit.TPR precision shown in table 5 shows that the precision of decision-tree model itself is not improved, this is because building decision-tree model
Method there is no changing, therefore the nicety of grading of positive class event is not improved.But it can be seen that from the TNR precision in table 5
The error rate of TN model has almost completely disappeared.The precision difference very little of two TPR results, shows that k is nearest in table 5 and table 4
The original tag classification of adjacent classifier directly affects the accuracy of cooperation detection classifier.However, since decision-tree model has
There is the advantage of precision 99%, the significant decline of mistake classification results causes the accuracy of whole classifier to improve.Fig. 5 is shown
Comparison in two methods entirety niceties of grading.
Compare the computational complexity of every kind of method.In OAR method, a unique small echo is selected for each load, it is small
The quantity of wave conversion is equal to the quantity loaded in system.Then classify to each load.It is surveyed in this simple four load
In examination, about 10-12 milliseconds is run in the single thread of PC.And in coorinated training method, each load selection one is unique
Small echo, it is only necessary to execute a wavelet transformation, the quantity no matter loaded all only needs to carry out double classification, therefore cooperates with
The trained method testing time has only used 6ms.It may seem very little in the example that this difference may be loaded at four, but such as
The quantity of fruit load increases more, and this method, which will have, calculates temporal advantage.It is calculated this paper presents a kind of using decision tree
Method and the non-intrusion type load of nearest neighbor algorithm coorinated training know method for distinguishing.Producing one group of length by Design of Wavelet first is
6 small echo, by cluster after can be by 91 different small wave components.Then circuit evolving 1760 are built using PSCAD emulation
The data set of transient signal composition selects the small of tight fit using the analysis of covariance to the transient signal of each load
Wave.The type of feature extraction load is carried out by calculating the energy of wavelet coefficient using the small echo matched.Finally, herein to mesh
(OAR) sorting algorithm and k nearest neighbor classifier and decision Tree algorithms coorinated training compare and obtain knot more than preceding common a pair
By.The result shows that by using coorinated training method, the classification error that occurs when can obviously eliminate using OAR classification method.
The accuracy integrally classified is dramatically increased, the defect to true negative class event category accuracy is overcome, OAR arithmetic accuracy is
74%, the accuracy of identification of coorinated training is 99.5%.This explanation, the method for coorinated training have bright in the precision integrally classified
Aobvious advantage.
Above-described embodiment is only preferred embodiment, the protection scope being not intended to limit the invention, in spirit of the invention
With any modifications, equivalent replacements, and improvements made within principle etc., should all be included in the protection scope of the present invention.