Disclosure of Invention
The invention aims to provide a load identification method based on a support vector machine and V-I curve characteristics, thereby overcoming the defect that the result obtained by the existing non-invasive load identification only depending on single load characteristics is often unreliable.
In order to achieve the above object, the present invention provides a load identification method based on support vector machine and V-I curve characteristics, comprising the following steps:
s1, acquiring power utilization data, and preprocessing the power utilization data;
s2, judging whether an event occurs in the preprocessed data of S1; if the event occurs, the step enters S3, otherwise, the step enters S1;
s3, performing feature extraction and combination on the voltage and current signals after the event occurs by adopting a V-I curve extraction method and a harmonic feature extraction method to obtain load features;
and S4, taking the load mark obtained in S3 as a load characteristic, carrying out load identification based on an SVM on the event obtained in S2, and identifying to obtain the electric appliance in the working state in the family of the user.
Further, the electricity consumption data includes: current, voltage, and power.
Further, in S2, it is determined that an event occurs according to the change of the effective value of the power, and when the change of the effective value of the power is greater than a threshold, an event occurs, otherwise, no event occurs.
Further, the judging method includes:
setting the apparent power resulting from the preprocessing of S1: s1,…,St,St+1…; event start time tonT seconds, event end time toffT + TL seconds; the step length of each movement of the event detection window is L;
the total apparent power change Δ St=St+1-St,StTotal apparent power at t seconds;
when Δ St>Son1At that time, the event detection window starts to move and Δ S is calculatedt+1,ΔSt+2…, up to Δ St+TL<Son1,Son1Detecting a power change threshold for an event, Son2The minimum event power change value which can be detected;
if St+TL-St<Son2If the load is changed in the t-t + TL seconds, no event occurs.
Further, the method for extracting the characteristics of the voltage and current signals after the event occurs by using the V-I curve extraction method comprises the following steps:
firstly, smoothing and interpolating voltage and current waveforms within T seconds before and after an event;
then, within T seconds, taking a period of voltage and current waveform every second, carrying out Fourier transform on the voltage waveform, and then taking a point with a fundamental wave voltage phase angle of 0 as an initial sampling point of the voltage and current waveform;
averaging sampling points at the same positions of each period of the voltage and current waveform, and drawing a V-I curve by taking the voltage as an abscissa and the current as an ordinate;
finally, the characteristics of the V-I curve are used as load marks.
Further, the method for extracting the characteristics of the voltage and current signals after the occurrence of the event by using the harmonic characteristic extraction method comprises the following steps: converting the current signal in the time domain into a frequency spectrum signal in the frequency domain through fast Fourier transform, wherein the frequency spectrum signal is shown as a formula (1);
in the formula (1), i
0Is a direct current component, i
kIs the kth harmonic current amplitude, k ω is the kth harmonic component angular frequency,
is the initial phase angle of the kth harmonic component; and extracting harmonic components from the spectrum signal to obtain the characteristic information of the load equipment on the frequency domain, and taking the frequency domain characteristic as a load mark.
Further, the harmonic component includes: harmonic order and amplitude.
Further, the harmonic amplitude is the amplitude of the sixth harmonic in the third and fifth harmonic orders.
Further, the S4 includes the following steps:
s41, given the input data and the learning objective: x ═ X1,X2,…,X8},y={y1,y2,…,yNIn which yiIndicating that the identification result i is 1,2, …,8, and N is the number of the electrical appliances; if a hyperplane H serving as a decision boundary exists in a feature space where input data are located, the hyperplane H separates the input data according to a positive class and a negative class, and the distance from a point of any sample to the hyperplane H is greater than or equal to 1, then the classification problem is shown as a formula (2):
in the formula (2), omega and b are respectively a normal vector and an intercept of the hyperplane;
s42, optimally classifying the hyperplanes to obtain the hyperplane with the largest classification interval, and simplifying the classification problem into the following optimization problem:
solving the formula (3) by using a Lagrange multiplier method, and introducing a Lagrange multiplier α by using omega and b as variablesiNot less than 0, i-1, ·, l yields:
converting the problem described by formula (3) to a dual form:
yi(ω·xi+b)-1≥0,i=1,···,l (7)
αi≥0,i=1,···,l (8)
αi(yi(ω·xi+b)-1)=0,i=1,···,l (9)
in formulae (5) and (6), LpAn objective function that is a dual form of the above optimization problem;
the following formulas (5), (6), (7), (8) and (9) are simplified:
s43, the dual form has the same optimal point as the original optimization problem, so the original optimization problem is converted into:
s44, calculating according to the formula (11) to obtain the normal vector of the optimal classification hyperplane:
the final discriminant function is:
in formula (13), z is the distance from the sample point to the hyperplane; namely, obtaining the classification result of the SVM classifier through f (z).
Compared with the prior art, the invention has the following beneficial effects:
the load identification method based on the support vector machine and the V-I curve characteristics provided by the invention overcomes the defect of false identification possibly generated in non-invasive load identification by using the combination of the V-I curve and the harmonic wave as a load mark; the shape characteristics of the V-I curve track are used for forming a plurality of load marks, the accuracy of load identification is increased, and the harmonic characteristic identification obtained by Fourier transform of the electric quantity is used for identification, so that the defect that the V-I curve cannot identify the small load well is overcome; nonlinear classification problems are better handled through SVM-based load recognition, and dimension disasters are not caused; the method can process machine learning of small samples, and can not fall into the problems of local minimum, over-learning and under-learning, so that the result of load identification (the electrical appliance in a working state in a user family) has higher accuracy, and the identification degree is improved. In addition, the method of the invention takes non-invasive as a starting point and has the characteristics of economy, practicability and easy realization.
Detailed Description
The technical solutions in the present invention are clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, the load identification method based on support vector machine and V-I curve feature provided by the present invention includes the following steps:
s1, acquiring power utilization data, and preprocessing the power utilization data; the electricity consumption data includes: and the current, the voltage, the power and the like are obtained from the intelligent electric meter installed at the user terminal. Noise exists in raw data (electricity consumption data) acquired from a smart meter at a home terminal, which affects extraction of a load mark, so that denoising processing needs to be performed on the raw data.
S2, judging whether an event occurs in the preprocessed data of S1; if there is an event occurring, S3 is entered, otherwise S1 is entered. The invention judges the occurrence of the event by the change of the effective value of the power, compares the change of the effective value of the power with a set threshold value, and if the change of the effective value of the power is greater than the threshold value, the event occurs. The specific judgment method is as follows:
setting the pre-processed apparent power of S1 (S) with the change of the apparent power during the load state transition process1,…,St,St+1…); event start time tonT seconds, event end time toffT + TL seconds; the step length of each movement of the event detection window is L, and the method is set to be L-1 s;
the total apparent power change Δ St=St+1-St,StTotal apparent power at t seconds; when Δ St>Son1At that time, the event detection window starts to move and Δ S is calculatedt+1,ΔSt+2…, up to Δ St+TL<Son1,Son1Detecting a power change threshold for an event, Son2The minimum event power change value which can be detected; if S ist+TL-St<Son2If the load is changed in the time range from t to t + TL, then TL represents the duration of the event, i.e. no event occurs.
And S3, performing feature extraction and combination on the voltage and current signals after the event occurs by adopting a V-I curve extraction method and a harmonic feature extraction method to obtain load features. S3 specifically includes the following steps:
s31, performing feature extraction on the voltage and current signals after the event occurs by adopting a V-I curve extraction method; firstly, smoothing and interpolating voltage and current waveforms within T seconds before and after an event; then, within T seconds, taking a period of voltage and current waveform every second, carrying out Fourier transform on the voltage waveform, and then taking a point with a fundamental wave voltage phase angle of 0 as an initial sampling point of the voltage and current waveform; averaging sampling points at the same positions of each period of the voltage and current waveform, and drawing a V-I curve by taking the voltage as an abscissa and the current as an ordinate; finally, the characteristics of the V-I curve are used as load marks.
There are different methods for shape characterization and classification of V-I curves, one of which is to use shape features to describe the shape, each shape feature on the V-I curve being shown in Table 1.
TABLE 1 characteristics of the respective shapes on the V-I curves
S32, performing feature extraction on the voltage and current signals after the event occurs by adopting a harmonic feature extraction method; the current signal in the time domain is converted into a frequency spectrum signal in the frequency domain through Fast Fourier Transform (FFT), as shown in formula (1), so that the characteristic information of the load equipment in the frequency domain is obtained, that is, the harmonic component is extracted.
In the formula (1), i
0Is a direct current component, i
kIs the kth harmonic current amplitude, k ω is the kth harmonic component angular frequency,
is the initial phase angle of the k harmonic component. Regarding the harmonic order and amplitude of the harmonic component, the existing research indicates that the amplitude of even harmonic generated when most loads operate is small, and the amplitude of odd harmonic is large, and the typical harmonic components are 2 th harmonic, 3 rd harmonic and 5 th harmonic. The invention selects harmonic amplitude X
6Third harmonic X
7Fifth harmonic X
8As a load signature.
S33, because the characteristic of the V-I curve has the advantage of good differentiation, but the small loads cannot be well differentiated, and the harmonic characteristic has the advantages of simple measurement, anti-interference capability and capability of differentiating the small loads, the load marks obtained from S31 and S32 are used as load characteristics to identify the loads.
And S4, taking the load mark obtained in S3 as a load characteristic, carrying out SVM-based load recognition on the event obtained in S2, and recognizing the electric appliance in the working state in the family of the user.
The load characteristics can be classified through a linear classifier so as to obtain a recognition result. The invention selects the V-I curve and the harmonic wave characteristics as the input of a Support Vector Machine (SVM) classifier, and S4 comprises the following steps:
s41, given the input data and the learning objective: x ═ X1,X2,…,X8},y={y1,y2,…,yNIn which yiIndicating the identification result (i is 1,2, …,8), wherein N is the number of the electrical appliances; if the feature space where the input data is located has a hyperplane H, omega as a decision boundary (decision boundary)TX + b is 0, and if the hyperplane is the learning target, the sum is positiveThe negative class separates the hyperplane H, and the distance from the point of any sample to the hyperplane H is greater than or equal to 1, then the classification problem for given input data and learning target is said to have linear separability, as shown in equation (2):
in the formula (2), ω and b are the normal vector and intercept of the hyperplane H, respectively.
S42, optimally classifying the hyperplane, namely obtaining the hyperplane with the largest classification interval, wherein the classification problem can be the following optimization problem:
solving the formula (3) by using a Lagrange multiplier method, and introducing a Lagrange multiplier α by using omega and b as variablesiNot less than 0, i-1, ·, l yields:
because the function is convex and the points meeting the constraints also form a convex set, the quadratic programming problem is a convex quadratic programming problem and does not have a local minimum, so the idea of the optimal hyperplane of the SVM method can overcome the local minimum problem; converting the problem described by formula (3) to a dual form:
yi(ω·xi+b)-1≥0,i=1,···,l (7)
αi≥0,i=1,···,l (8)
αi(yi(ω·xi+b)-1)=0,i=1,···,l (9)
in formulae (5) and (6), LpAn objective function that is a dual form of the above optimization problem;
the following formulas (5), (6), (7), (8) and (9) are simplified:
s43, the dual form has the same optimal point as the original optimization problem, so the original optimization problem is converted into:
s44, only a small part of the solutions of the formula (11) are not 0, and x isj(i ∈ SV) is the support vector (SV for short), and each α is solved by equation (11)i *Corresponding to one sample, calculating to obtain the normal vector of the optimal classification hyperplane:
the final discriminant function is:
in formula (13), z is the distance from the sample point to the hyperplane; namely, obtaining the classification result of the SVM classifier through f (z).
The embodiment of the load identification method based on the support vector machine and the V-I curve characteristics of the invention is explained in detail so that the person skilled in the art can understand the invention more:
the invention records the electricity utilization condition of 4 families within three days. According to the load power change condition in the low-frequency apparent power data, Son1Taking 30VA, Son2Taking 100VA, 1553 events are detected in total.
According to the step S3, T is respectively 3 and 5, the initial sampling point of the voltage waveform and the current waveform in each period is determined by the point with the phase angle of the fundamental wave voltage closest to 0, a V-I curve graph is drawn by taking the voltage as the abscissa and the current as the ordinate, and harmonic features are extracted through Fourier transform to carry out combination of the two. As shown in fig. 2, a piece of data in a user's family is actually extracted and plotted as a V-I curve.
And extracting the V-I curve and the harmonic load mark of the acquired user data, then taking the extracted user data as the input of the SVM classifier, and outputting a recognition result. 1553 events are detected in the invention, 1000 samples are selected for training, and the rest samples are used for testing. Non-intrusive load identification is performed on 8 electrical appliances in each of the 4 monitored households, and the accuracy of the identification result is shown in table 2:
TABLE 2 accuracy of recognition results of non-intrusive load recognition System
As can be seen from the table 2, the accuracy of the obtained result is improved by training and identifying based on the SVM classifier by using the combination of the V-I curve and the harmonic load imprint, and particularly, the accuracy of the identification of high-power electrical appliances is high, the accuracy of the identification of certain power fluctuation electrical appliances is also high, and the objective engineering requirements can be met.
In summary, the load identification method based on the support vector machine and the V-I curve characteristics overcomes the defect of false identification possibly generated in non-invasive load identification by using the combination of the V-I curve and the harmonic wave as the load imprints, and increases the accuracy of load identification by forming a plurality of load imprints by using the shape characteristics of the V-I curve track. And the harmonic characteristic identification obtained by Fourier transform of the electrical quantity is used as an auxiliary factor, so that the defect that the V-I curve is not good in identifying the small-sized load is overcome. The invention uses the support vector machine as a classifier and has a plurality of advantages which are not available in the traditional method: such as non-linear classification problems that can be handled better than non-linear classifiers and that do not cause "dimension disasters"; the method can process machine learning of small samples, and can not fall into local minimum and over-learning and under-learning problems. In addition, the method takes non-invasive as a starting point, and has the characteristics of economy, practicability and easy implementation.
The above disclosure is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of changes or modifications within the technical scope of the present invention, and shall be covered by the scope of the present invention.