CN115964597A - Smote function based non-intrusive load identification data sample equalization method and system - Google Patents

Smote function based non-intrusive load identification data sample equalization method and system Download PDF

Info

Publication number
CN115964597A
CN115964597A CN202211596279.5A CN202211596279A CN115964597A CN 115964597 A CN115964597 A CN 115964597A CN 202211596279 A CN202211596279 A CN 202211596279A CN 115964597 A CN115964597 A CN 115964597A
Authority
CN
China
Prior art keywords
samples
sample
harmonic
load identification
smote
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
CN202211596279.5A
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.)
State Grid Jiangsu Electric Power Co ltd Marketing Service Center
Original Assignee
State Grid Jiangsu Electric Power Co ltd Marketing Service Center
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 State Grid Jiangsu Electric Power Co ltd Marketing Service Center filed Critical State Grid Jiangsu Electric Power Co ltd Marketing Service Center
Priority to CN202211596279.5A priority Critical patent/CN115964597A/en
Publication of CN115964597A publication Critical patent/CN115964597A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Supply And Distribution Of Alternating Current (AREA)

Abstract

A smote function-based non-intrusive load identification data sample equalization method and system comprises the following steps: taking a plurality of household devices as a plurality of samples, respectively sampling the load waveform of each sample, and extracting corresponding voltage and current signals; calculating the active power, the reactive power and the harmonic effective value of each sample based on the voltage and current signals, and obtaining the start-stop characteristics corresponding to each sample; the start-stop characteristics are used as characteristic vectors, and the number of samples of different types of home equipment is equalized on the basis of a smote function; and according to the equalized sample, carrying out load identification on the sample to be identified by using a support vector machine. The invention performs data equalization processing on the data samples, particularly the loads with low use frequency, can improve the low frequency of different load identification classifiers to ensure the sensitivity of the electric appliances, thereby improving the load identification accuracy.

Description

Smote function based non-intrusive load identification data sample equalization method and system
Technical Field
The invention belongs to the field of power distribution and utilization, and particularly relates to a smote function-based non-intrusive load identification data sample equalization method and system.
Background
With the development of smart power grids, the traditional power industry is developing towards high intensification, knowledge and technology, and besides paying attention to the quantity and quality of the power generation side, the management of the demand side should be paid attention to. Therefore, there is an increasing demand for intelligence in terms of power distribution and consumption. And the application demand side manages and optimizes the low-voltage user client, and effective load management is realized. The smart technology on the power consumption side is drawing more and more attention. The key of the power demand side management is to acquire detailed information of the household energy efficiency, analyze the household power consumption structure, better understand the influence of user behavior on the household energy efficiency, guide the user to consciously take energy-saving action, and load identification is the core technology of load management.
However, in an actual scene, the number of times of using different household electrical appliances is greatly different, the imbalance of data samples has a great influence on the classification result of the classifier, and often, among electrical appliances frequently used at high frequency, electrical appliances frequently used at low frequency are submerged.
Prior art document 1 (CN 113406433A) discloses a fuzzy clustering sensing method based on non-intrusive power load, which includes: s1, power grid data acquisition: load information data pushed by the metering chip in real time is transmitted to the embedded terminal through the SPI bus, and the embedded module transmits the data in a DMA mode, so that the CPU consumption of the MCU is reduced. In the project, the data acquisition is used as a task and is transmitted to the next task in the modes of semaphore and the like, and load event detection is carried out; s2, characteristic analysis: in the obtained real-time data, in order to reduce the latitude of the data, a harmonic statistical method is adopted, so that the data obtained by sampling each time is compressed to the range of 15 x 4 bytes, and the storage capacity of the data is reduced; meanwhile, in the aspect of characteristic analysis, harmonic characteristics are mainly used, and some potential load characteristics are combined; s3, fuzzy clustering perception: in the identification process, particularly when a load event is detected, the input of the fuzzy perception algorithm needs to be combined with three types of load characteristics for load identification, each type of load characteristic is used as a membership metric, membership evaluation of a plurality of characteristics is sequentially realized, and load matching under the condition of maximum probability density is obtained by integrating the membership, so that load identification is realized. In the prior art document 1, three steps of load identification are set forth, including data acquisition, feature analysis and fuzzy clustering, in the step of S2 feature analysis, feature extraction is performed based on data acquired by a metering chip in S1, simple data dimension reduction is performed due to storage quantity limitation, but no consideration is given to load equipment types, such as factors of frequency of use, high and low per capita occupancy, and secondary processing such as noise reduction and equalization on the data quality level is not performed on the data acquired by the metering chip, so that the features of an electrical appliance are submerged in the total load waveform of a household due to low frequency.
Disclosure of Invention
In order to overcome the defects in the prior art and improve the load identification accuracy, the invention provides a smote function-based non-intrusive load identification data sample equalization method and system.
The invention adopts the following technical scheme.
A smote function-based non-intrusive load identification data sample equalization method comprises the following steps:
step 1, taking a plurality of household devices as a plurality of samples, respectively sampling the load waveform of each sample, and extracting corresponding voltage and current signals;
step 2, calculating the active power, the reactive power and the harmonic effective value of each sample based on the voltage and current signals, and obtaining the start-stop characteristics corresponding to each sample;
and 3, balancing the sample quantity of different types of household equipment by taking the start-stop characteristics as characteristic vectors based on a smote function.
Preferably, the step 2 specifically includes:
2.1, converting the voltage and current signals from time sequence signals into frequency domain signals based on Fourier transform, thereby obtaining a harmonic effective value;
step 2.2, according to the harmonic effective value, calculating to obtain active power, reactive power, second harmonic and third harmonic;
step 2.3, forming and calculating the event characteristics of each household device according to the active power, the reactive power, the second harmonic and the third harmonic;
step 2.4, obtaining start-stop characteristics according to the event characteristics, including: active power on, reactive power on, third harmonic on, second harmonic on, active power shift, reactive power shift, third harmonic shift, second harmonic shift, number of shift, active power off, reactive power off, third harmonic off, second harmonic off, and electrical appliance operating duration.
Preferably, the step 2.1 specifically comprises:
effective value i of k-th harmonic of current (k) Comprises the following steps:
I(k)=a(k)+jb(k)
Figure BDA0003997425650000031
where N is the sampling period, N s The number of periodic sampling points, and I (k) is a frequency domain signal;
a (k) and b (k) are respectively a real part and an imaginary part of the k-order frequency domain signal, and j is an imaginary unit.
Preferably, the step 2.2 specifically comprises:
the active power p and the reactive power q are respectively:
Figure BDA0003997425650000032
in the formula (I), the compound is shown in the specification,
Figure BDA0003997425650000033
is a k-th harmonic phase angle->
Figure BDA0003997425650000034
Is the phase angle of the k current harmonic wave, u (k) Is the effective value of the current k harmonic, u (0) ,i (0) Fundamental effective values of voltage and current, u (k) ,i (k) Effective values of the k-th harmonic of the voltage and current, N k The highest harmonic order.
Preferably, the step 2.3 specifically includes:
the event characteristics are as follows:
P={p 1 ,…,p t ,…,p n }
the constraints of the event features are:
Figure BDA0003997425650000035
Figure BDA0003997425650000036
w=t e -t s
wherein TH is s To raise the event power threshold, TH e Lowering the power threshold for an event, t th For event scanning time threshold, t s Is window open time, t e Is the window end time, n s Is a threshold value of the time duration of the device on, n e Is the device turn-off duration threshold, and w is the window size.
Preferably, the step 3 specifically includes:
step 3.1, counting the number of samples of different types of home equipment, and judging whether the number of samples of each type is balanced with the number of samples of other types;
step 3.2, if the number of the samples of the type is not balanced, acquiring the feature vectors of all the samples of the type;
and 3.3, based on the feature vectors of all samples in the category, expanding the samples until the number of the samples meeting the category is balanced with the number of the samples in other categories.
Preferably, the step 3.1 specifically comprises:
sequencing the number of samples of different types of home equipment from small to large to obtain a sequence [ N 1 ,N 2 ,…,N c ,…,N C ];
Figure BDA0003997425650000041
Wherein C is the number of species, N c The number of samples of the family apparatus of the type c]Sigma and epsilon are fixed real numbers between 0 and 1 for integer sign;
if the above formula is satisfied, it is determined that the number of samples of the type c is not equal to the number of samples of the other types, otherwise, it is determined that the number of samples of the type c is equal to the number of samples of the other types.
Preferably, the sample expansion in step 3.3 specifically comprises:
selecting a feature vector x of one of the samples in the category;
calculating Euclidean distances between the feature vectors of all other samples under the category and the feature vector x, and sorting from small to large to select k neighbors of the feature vector x, which are x in sequence (1) ,x (2) ,…,x (k) K is a fixed value;
calculate a new feature vector x new
x new =x+rand(0,1)×(x (i) -x)
Wherein rand (0, 1) is a random number formula, i =1,2, \8230;, k;
new sample x new Are also included in the samples of the species.
Preferably, the method further comprises a step 4 of performing load identification on the sample to be identified by using a support vector machine according to the equalized sample.
Preferably, the step 4 specifically includes:
step 4.1, the equalized samples comprise samples to be identified and test samples, and the samples to be identified are divided into positive samples X 1 Dividing the test sample into negative samples X 2
Step 4.2, constructing a hyperplane to separate the positive sample and the negative sample according to the divided positive sample and the divided negative sample;
step 4.3, based on the hyperplane, each sample x to be identified r And identifying, if so:
w·x r +b≤0
then determine the sample x to be identified r Is X 1 Class; otherwise, is X 2 Class, thereby completing the load recognition.
Preferably, the step 4.2 specifically includes:
the hyperplane is:
H:w·x+b=0
wherein, the parameters w and b are shown as the following formula:
Figure BDA0003997425650000051
in the formula, epsilon i A penalty factor for the ith sample, [ xi ] is a penalty parameter, x i Is the feature vector of the ith sample, n 1 Is a positive sample X 1 Number of samples of (1), n 2 Is a positive sample X 2 The reciprocal of the distance from the sample characteristic vector to the hyperplane H is expressed by using an f function.
A smote function-based non-intrusive load identification data sample equalization system comprises: the device comprises a current and voltage acquisition module, a logic calculation module and a sample expansion module;
the current and voltage acquisition module is used for respectively sampling the load waveform of each sample and extracting a corresponding voltage and current signal;
the logic calculation module is used for calculating the active power, the reactive power and the harmonic effective value of each sample and obtaining the start-stop characteristic corresponding to each sample;
the sample expansion module is used for equalizing the number of samples of different kinds of home devices.
A terminal comprising a processor and a storage medium; the storage medium is to store instructions;
the processor is configured to operate in accordance with the instructions to perform the steps of the method.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method.
The invention has the beneficial effects that compared with the prior art, the invention adds a link of data equalization processing, taking a humidifier with relatively low annual use frequency in a resident family as an example, the resident family is used for 1-2 hours every day during heating in winter, and basically does not need to be used in three seasons of spring, summer and autumn, if no data equalization processing exists, the load characteristics of the humidifier can be submerged in high-frequency electric appliances such as an electric kettle, a water heater and the like during identification in spring, summer and autumn, and because the quality of the data sample is directly related to the load identification accuracy, the invention carries out data equalization processing on the data sample, especially the load with low use frequency, and can improve the low frequency of different load identification classifiers so as to improve the sensitivity of the electric appliances, thereby improving the load identification accuracy.
Drawings
FIG. 1 is a flow chart of a smote function based non-intrusive load identification data sample equalization method.
FIG. 2 is a waveform diagram of electrothermal turn-on, shift and turn-off according to an embodiment of the present disclosure.
Fig. 3 is a schematic diagram of an equalization process performed by the fixed-frequency refrigerator according to the embodiment of the disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. The embodiments described in this application are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments obtained by a person skilled in the art without any inventive step based on the spirit of the present invention are within the scope of the present invention.
A method for equalizing non-intrusive load identification data samples based on a smote function, as shown in fig. 1, includes the following steps:
step 1, taking a plurality of household devices as a plurality of samples, respectively sampling the load waveform of each sample, and extracting corresponding voltage and current signals;
wherein, can discern the load waveform that the terminal sampling household equipment was discerned to the load through the load, the load is discerned the terminal and is included: an intelligent terminal sampling module; the home device may be one of a plurality of devices of a plurality of users.
The method comprises the following steps that in the step 1, a load identification terminal samples the load waveform of the household equipment, extracts a voltage and current signal, and an intelligent terminal sampling module samples the power consumption data of a plurality of users at the frequency of 6.4K, so that basic data samples omega of different equipment are obtained.
Step 2, calculating the active power, the reactive power and the harmonic effective value of each sample based on the voltage and current signals, and obtaining the start-stop characteristics corresponding to each sample;
the step 2 specifically comprises the following steps:
step 2.1: converting the voltage and current signals from time sequence signals into frequency domain signals based on Fourier transform, thereby obtaining harmonic effective values;
taking current I as an example, the k-order frequency domain signal is I (k) = a (k) + jb (k), a (k) and b (k) are respectively the real part and the imaginary part of the k-order frequency domain signal, j is an imaginary unit, and then the k-th harmonic effective value of the current is:
Figure BDA0003997425650000071
wherein N is the sampling period, N s Number of periodic sampling points, i (k) The effective value of k harmonics of the current.
Step 2.2: and extracting active power p, reactive power q, second harmonic I2 and third harmonic I3 of equipment of the household user under different working conditions. The second harmonic and the third harmonic represent even harmonic and odd harmonic, and the even harmonic and the odd harmonic can be generated when the electric and electronic devices of the power electronic device are filtered, so that the harmonic filtering device is an important characteristic of equipment specificity.
The active power p and the reactive power q are respectively:
Figure BDA0003997425650000072
in the formula (I), the compound is shown in the specification,
Figure BDA0003997425650000073
in k times of voltage harmonic phase angle>
Figure BDA0003997425650000074
Is the phase angle of the current harmonic of the order k, u (k) Is the effective value of the current k subharmonic, u (0) ,i (0) Fundamental effective values of voltage and current, N k The number of the highest harmonic is determined according to the sampling frequency, the number of the highest harmonic is 64 as calculated according to the sampling frequency of 6.4K in the step 1, and the number of the harmonic measurement is generally 2-19 according to the national standard GB/T14549-93 electric energy quality-public power grid harmonic.
Step 2.3: the event characteristics of the computed sample are:
P={p 1 ,…,p t ,…,p n }
it should be noted that the formula is mainly for determining each t and p t And determining the value of n, thereby forming an event signature as shown in fig. 2. The constraints of the event features are shown as follows:
Figure BDA0003997425650000081
Figure BDA0003997425650000082
w=t e -t s
in the formula, TH s To raise the event power threshold, the household appliance is typically set to 100, for the same reason TH e The power threshold is set to-100,t for event drop th The time threshold for event scanning is set to 20s, taking into account the embedded memory capacity. n is s Setting the threshold value of the starting time length of the equipment to be 1s, namely starting of the equipment is completed within 1s, and n e And setting 0.1s for the equipment turn-off time threshold, namely completing the equipment turn-off within 0.1 s. t is t s Is the window opening time, t e W is the window end time and w is the window size.
Step 2.4, according to the event characteristics, the active power, the reactive power, the second harmonic and the third harmonic, calculating the start-stop characteristics corresponding to each sample, including: active power on, reactive power on, third harmonic on, second harmonic on, active power shift, reactive power shift, third harmonic shift, second harmonic shift, shift frequency, active power off, reactive power off, third harmonic off, second harmonic off, and electrical appliance running time.
Taking a certain electric heat in fig. 2 as an example, 5 events (3 events rising and 2 events falling) are detected in sequence, the power sum of the rising events is equal to the power sum of the falling events, and the on, off and gear shifting are judged based on the time law. The start-stop characteristics and calculations are shown in table 1.
TABLE 1
Serial number Start stop feature name (symbol) Description of the calculation
1 Active power on ΔP on ΔP on =P(t 2 )-P(t 1 )
2 Turning on reactive power ΔQ on ΔQ on =Q(t 2 )-Q(t 1 )
3 Turn on third harmonic ΔI3 on ΔI3 on =I3(t 2 )-I3(t 1 )
4 Turning on the second harmonic ΔI2 on ΔI2 on =I2(t 2 )–I2(t 1 )
5 Active power for gear shifting ΔP st ΔP st =P(t 3 )-P(t 4 )
6 Shift reactive power ΔQ st ΔQ st =Q(t 3 )-Q(t 4 )
7 Third harmonic of gear shift ΔI3 st ΔI3 st =I3(t 3 )-I3(t 4 )
8 Second harmonic of gear shift ΔI2 st ΔI2 st =I2(t 3 )–I2(t 4 )
9 Number of shifts N st Number of power changes, FIG. 2 is 3
9 Cutting off active power ΔP off ΔP off =P(t 5 )-P(t 4 )
10 Turn-off reactive power ΔQ off ΔQ off =Q(t 5 )-Q(t 4 )
11 Turn off the third harmonic ΔI3 off ΔI3 off =I3(t 5 )-I3(t 4 )
12 Turn off the second harmonic ΔI2 off ΔI2 off =I2(t 5 )–I2(t 4 )
13 Duration of operation of electrical appliance T T=t 5 –t 1
Step 3, balancing different types of samples based on a smote function in consideration of the difference of the use times of the equipment in practice;
it should be noted that the plurality of samples in step 1 refer to a plurality of samples of a plurality of different home devices. This means that: the number of samples for different kinds of home devices may vary greatly. For example: affected by its frequency of use: the more the devices are used, the more the number of samples that can be obtained by the family devices of the kind is naturally; the fewer devices used, the fewer samples that can be obtained with this type of home device.
The purpose of step 3 is therefore to equalize the number of samples for different kinds of home devices.
In step 3, the difference of the actual using times of the equipment is considered, so that the sample quantities of different equipment have larger difference, the start-stop characteristics are used as the characteristic vectors, and the sample quantities of different types of household equipment are equalized based on a smote function, and the method specifically comprises the following steps:
and 3.1, acquiring training sample data, labeling the sample data, counting the number of samples of different types of home equipment, and judging whether the number of samples of each type is balanced with the number of samples of other types.
In particular, the method comprises the following steps of,
firstly, the sample numbers of different kinds of household equipment are sequenced from small to large to obtain a sequence [ N 1 ,N 2 ,…,N c ,…,N C ]. Wherein C is the number of species, N c The number of samples of the home device of category c.
Figure BDA0003997425650000091
Wherein [ ] is integer symbol, σ, ε are fixed real numbers between 0 and 1, which can be 0.9 and 0.5 respectively.
If the above formula is satisfied, it is determined that the number of samples of the type c is not equal to the number of samples of the other home appliances, otherwise, it is determined that the number of samples of the type c is equal to the number of samples of the other home appliances.
Step 3.2, sequentially judging each type, assuming that the household equipment with the type c is unbalanced, and acquiring the feature vectors of all samples in the type c;
and 3.3, expanding the samples based on the feature vectors of all the samples in the class c until the number of the samples in the class c is balanced with the number of the samples in other classes.
Wherein, sample expansion specifically includes:
selecting a feature vector x of one of the samples under the category c;
calculating Euclidean distances between the feature vectors of all other samples under the category c and the feature vector x, and sorting the Euclidean distances from small to large to select k neighbors of the feature vector x, which are x in sequence (1) ,x (2) ,…,x (k) It can be understood that k neighbors are other k feature vectors with x euclidean distances to the feature vector, where k is a fixed value and is necessarily less than or equal to the number of samples of the home devices of the type c.
Calculate a new feature vector x new
x new =x+rand(0,1)×(x (i) -x)
Wherein rand (0, 1) is a random number formula, i =1,2, \8230;, k;
new sample x new Also included in the class c samples.
Fig. 3 shows the equalization process of the constant frequency refrigerator, and only two start-stop features are taken as an example for convenience of drawing.
Further preferably, the method of the present invention further includes a step 4 of performing load identification by using a Support Vector Machine (SVM) according to the equalized samples.
The load identification is carried out on the sample after smote equalization by using a support vector machine, and the method comprises the following steps:
step 4.1: after sample equalization, dividing a sample to be identified into positive samples X 1 To test a sample X 2 The division into negative examples. It should be noted that the samples in the steps 1 to 3 include a sample to be identified; and the remaining samples were used as test samples.
And 4.2: constructing a hyperplane H w.x + b =0 such that X 1 And X 2 Two types of data are separated, wherein w is a normal vector expressed as a hyperplane, and b is a classification threshold, and the method specifically comprises the following steps:
Figure BDA0003997425650000101
in the formula, epsilon i The penalty factor is the penalty factor of the ith sample, and each positive sample cannot be guaranteed to be a positive sample in practice during training; xi is a penalty parameter for penalizing the error classification, x i Is the feature vector of the ith sample. n is 1 Is a positive sample X 1 Number of samples of (1), n 2 Is a positive sample X 2 The reciprocal of the distance of the sample characteristic vector from the hyperplane H is expressed by using an f function.
Step 4.3, based on the hyperplane, each sample x to be identified r And identifying, if the following conditions are met:
w·x r +b≤0
then determine the sample x to be identified r Is X1 type; whether or notThen, the load is classified into X2, so that the load identification is completed, i.e., the load identification is to determine the load type.
Correspondingly, the invention also discloses a smote function-based non-intrusive load identification data sample equalization system, which comprises the following steps: the device comprises a current and voltage acquisition module, a logic calculation module and a sample expansion module;
the current and voltage acquisition module is used for respectively sampling the load waveform of each sample and extracting a corresponding voltage and current signal;
the logic calculation module is used for calculating the active power, the reactive power and the harmonic effective value of each sample and obtaining the corresponding start-stop characteristic of each sample;
the sample expansion module is used for equalizing the number of samples of different kinds of home devices.
The load identification module is used for carrying out load identification on the sample to be identified by utilizing the support vector machine.
A terminal comprising a processor and a storage medium; the storage medium is used for storing instructions;
the processor is configured to operate in accordance with the instructions to perform the steps of the method.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method.
The invention has the beneficial effects that compared with the prior art, the invention adds a link of data equalization processing, taking a humidifier with relatively low annual use frequency in a resident family as an example, the resident family is used for 1-2 hours every day during heating in winter, and basically does not need to be used in three seasons of spring, summer and autumn, if no data equalization processing exists, the load characteristics of the humidifier can be submerged in high-frequency electric appliances such as an electric kettle, a water heater and the like during identification in spring, summer and autumn, and because the quality of the data sample is directly related to the load identification accuracy, the invention carries out data equalization processing on the data sample, especially the load with low use frequency, and can improve the low frequency of different load identification classifiers so as to improve the sensitivity of the electric appliances, thereby improving the load identification accuracy.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be interpreted as a transitory signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or an electrical signal transmitted through an electrical wire.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present invention and not for limiting the same, and although the present invention is described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications and equivalents may be made to the embodiments of the invention without departing from the spirit and scope of the invention, which is to be covered by the claims.

Claims (14)

1. A smote function-based non-intrusive load identification data sample equalization method is characterized by comprising the following steps:
step 1, taking a plurality of household devices as a plurality of samples, respectively sampling the load waveform of each sample, and extracting corresponding voltage and current signals;
step 2, calculating active power, reactive power and harmonic effective values of all samples based on the voltage and current signals, and obtaining start-stop characteristics corresponding to all samples;
and 3, balancing the sample quantity of different types of household equipment by taking the start-stop characteristics as characteristic vectors based on a smote function.
2. The method for equalizing non-intrusive load identification data samples based on a smote function as defined in claim 1, wherein:
the step 2 specifically comprises:
2.1, converting the voltage and current signals from time sequence signals into frequency domain signals based on Fourier transform, thereby obtaining harmonic effective values;
step 2.2, according to the harmonic effective value, calculating to obtain active power, reactive power, second harmonic and third harmonic;
step 2.3, forming the event characteristics of each household device according to the active power, the reactive power, the second harmonic and the third harmonic;
step 2.4, obtaining start-stop characteristics according to the event characteristics, including: active power on, reactive power on, third harmonic on, second harmonic on, active power shift, reactive power shift, third harmonic shift, second harmonic shift, shift frequency, active power off, reactive power off, third harmonic off, second harmonic off, and electrical appliance running time.
3. The smote-function-based non-intrusive load identification data sample equalization method as defined in claim 2, wherein:
the step 2.1 specifically comprises:
effective value i of k-th harmonic of current (k) Comprises the following steps:
I(k)=a(k)+jb(k)
Figure FDA0003997425640000011
where N is the sampling period, N s The number of periodic sampling points, and I (k) is a frequency domain signal;
a (k) and b (k) are respectively a real part and an imaginary part of the k-order frequency domain signal, and j is an imaginary unit.
4. The smote-function-based non-intrusive load identification data sample equalization method as defined in claim 2, wherein:
the step 2.2 specifically comprises:
the active power p and the reactive power q are respectively:
Figure FDA0003997425640000021
in the formula (I), the compound is shown in the specification,
Figure FDA0003997425640000022
is a k-th harmonic phase angle->
Figure FDA0003997425640000023
Is the phase angle of the k current harmonic wave, u (k) Is the effective value of the current k harmonic, u (0) ,i (0) Fundamental effective values of voltage and current, u (k) ,i (k) Effective values of the k-th harmonic of the voltage and current, N k The highest harmonic order.
5. The smote function-based non-intrusive load identification data sample equalization method as defined in claim 2, wherein:
the step 2.3 specifically comprises:
the event characteristics are as follows:
P={p 1 ,…,p t ,…,p n }
wherein p is t Active power, reactive power, second harmonic or third harmonic of the equipment at the moment of t sampling, wherein n is the total sampling number;
the constraints of the event features are:
Figure FDA0003997425640000024
Figure FDA0003997425640000025
w=t e -t s
wherein, TH s To raise the event power threshold, TH e Lowering the power threshold for an event, t th Scanning time threshold for events, t s Is the window opening time, t e Is the window end time, n s Is a threshold value of the time duration of the device on, n e Is the device turn-off duration threshold, and w is the window size.
6. The smote function-based non-intrusive load identification data sample equalization method as defined in claim 1, wherein:
the step 3 specifically comprises:
step 3.1, counting the number of samples of different types of home equipment, and judging whether the number of samples of each type is balanced with the number of samples of other types;
step 3.2, if the number of the samples of the type is not balanced, acquiring the feature vectors of all the samples of the type;
and 3.3, expanding the samples based on the feature vectors of all the samples in the category until the number of the samples in the category is balanced with the number of the samples in other categories.
7. The method of claim 6, wherein the method comprises the following steps:
the step 3.1 specifically comprises:
sequencing the number of samples of different types of home equipment from small to large to obtain a sequence
[N 1 ,N 2 ,…,N c ,…,N C ];
Figure FDA0003997425640000031
Wherein C is the number of species, N c The number of samples of the family apparatus of the type c]Sigma and epsilon are fixed real numbers between 0 and 1 for integer sign;
if the above formula is satisfied, it is determined that the number of samples of the type c is not equal to the number of samples of the other types, otherwise, it is determined that the number of samples of the type c is equal to the number of samples of the other types.
8. The method of claim 6, wherein the method comprises the following steps:
the sample expansion in step 3.3 specifically comprises:
selecting a feature vector x of one of the samples in the category;
calculating Euclidean distances between the feature vectors of all other samples under the category and the feature vector x, and sorting from small to large to select k neighbors of the feature vector x, which are x in sequence (1) ,x (2) ,…,x (k) K is a fixed value;
calculate a new feature vector x new
x new =x+rand(0,1)×(x (i) -x)
Wherein rand (0, 1) is a random number formula, i =1,2, \8230;, k;
new sample x new Are also included in samples of the species.
9. The method for equalizing non-intrusive load identification data samples based on a smote function as defined in claim 1, wherein:
and 4, carrying out load identification on the sample to be identified by using a support vector machine according to the equalized sample.
10. The method of claim 9, wherein the method for equalizing the non-intrusive load identification data samples based on smote function comprises:
the step 4 specifically includes:
step 4.1, the equalized samples comprise samples to be identified and test samples, and the samples to be identified are divided into positive samples X 1 Dividing the test sample into negative samples X 2
Step 4.2, constructing a hyperplane according to the divided positive and negative samples to separate the positive and negative samples;
step 4.3, based on the hyperplane, each sample x to be identified r And identifying, if the following conditions are met:
w·x r +b≤0
then determine the sample x to be identified r Is X 1 Class; otherwise, is X 2 Class, thus completing the load identification.
11. The method of claim 10, wherein the method comprises the following steps:
the step 4.2 specifically comprises:
the hyperplane is:
H:w·x+b=0
wherein, the parameters w and b are shown as the following formula:
Figure FDA0003997425640000041
in the formula, epsilon i A penalty factor for the ith sample, [ xi ] is a penalty parameter, x i Is the feature vector of the ith sample, n 1 Is a positive sample X 1 Number of samples of (1), n 2 Is a positive sample X 2 The reciprocal of the distance of the sample characteristic vector from the hyperplane H is expressed by using an f function.
12. A smote function based non-intrusive load identification data sample equalization system for performing the method of any of claims 1-11, the system comprising: the device comprises a current and voltage acquisition module, a logic calculation module and a sample expansion module;
the current and voltage acquisition module is used for respectively sampling the load waveform of each sample and extracting a corresponding voltage and current signal;
the logic calculation module is used for calculating the active power, the reactive power and the harmonic effective value of each sample and obtaining the start-stop characteristic corresponding to each sample;
the sample expansion module is used for equalizing the number of samples of different kinds of home devices.
13. A terminal comprising a processor and a storage medium; the method is characterized in that:
the storage medium is to store instructions;
the processor is configured to operate in accordance with the instructions to perform the steps of the method according to any one of claims 1 to 11.
14. Computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 11.
CN202211596279.5A 2022-12-13 2022-12-13 Smote function based non-intrusive load identification data sample equalization method and system Pending CN115964597A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211596279.5A CN115964597A (en) 2022-12-13 2022-12-13 Smote function based non-intrusive load identification data sample equalization method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211596279.5A CN115964597A (en) 2022-12-13 2022-12-13 Smote function based non-intrusive load identification data sample equalization method and system

Publications (1)

Publication Number Publication Date
CN115964597A true CN115964597A (en) 2023-04-14

Family

ID=87362741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211596279.5A Pending CN115964597A (en) 2022-12-13 2022-12-13 Smote function based non-intrusive load identification data sample equalization method and system

Country Status (1)

Country Link
CN (1) CN115964597A (en)

Similar Documents

Publication Publication Date Title
Munshi et al. Unsupervised nonintrusive extraction of electrical vehicle charging load patterns
CN110514889A (en) A kind of method and system of non-intrusion type household electricity remained capacity
Egarter et al. Autonomous load disaggregation approach based on active power measurements
CN114646829A (en) Electrical topology identification method of low-voltage transformer area, system and terminal thereof
CN108345906B (en) Non-invasive electrical appliance identification method based on Boost model
CN110490760B (en) Non-invasive electrical appliance load identification method based on hidden Markov chain
Dinesh et al. Incorporating time-of-day usage patterns into non-intrusive load monitoring
CN111275069B (en) Non-invasive load monitoring method
CN111177216A (en) Association rule generation method and device for behavior characteristics of comprehensive energy consumer
CN111126780B (en) Non-invasive load monitoring method and storage medium
CN109377052B (en) Power load matching method, device, equipment and readable storage medium
Yin et al. Non-intrusive load monitoring by load trajectory and multi feature based on DCNN
CN113034305B (en) Non-invasive load monitoring event classification method and storage medium
Mostafavi et al. An unsupervised approach in learning load patterns for non-intrusive load monitoring
CN116861316A (en) Electrical appliance monitoring method and device
CN115964597A (en) Smote function based non-intrusive load identification data sample equalization method and system
Zhibin et al. Research on household appliances recognition method based on data screening of deep learning
CN115935267A (en) Load data identification method and device and storage medium
Li et al. A training-free non-intrusive load monitoring approach for high-frequency measurements based on graph signal processing
CN113269478B (en) Concentrator abnormal data reminding method and system based on multiple models
CN112730984B (en) Low-voltage distribution network phase identification method based on intelligent electric meter
CN115563583A (en) Non-invasive load monitoring method based on multi-physical quantity fusion
CN115759436A (en) User electric quantity and electricity charge prediction method and system under power grid big data
CN114239762A (en) Non-invasive load identification method and system based on structured load characteristic spectrum
Jazizadeh Building energy monitoring realization: Context-aware event detection algorithms for non-intrusive electricity disaggregation

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