Household load data simulation and decomposition method and system based on small samples
By collecting and processing household power consumption data, a lightweight load decomposition model is constructed, which solves the problems of data requirements and hardware deployment in the existing technology, achieves high-precision household load simulation and decomposition, and is suitable for edge deployment.
Patent Information
- Application Number
- CN202410651266.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2024-09-13
AI Technical Summary
Existing household load simulation methods and non-intrusive load decomposition models have problems in data requirements, realistic simulation and hardware deployment. Training costs are high, edge deployment is difficult, and the generated simulation data does not conform to real power consumption scenarios.
By collecting low-frequency bus power data and electrical appliance single power data from home users on a long-term scale, we perform preprocessing, clustering, event detection and probability distribution statistics to build a lightweight load decomposition model, using the Transformer-CNN structure and non-linear Intrusive load identification forms a dual-branch structure to generate high-precision simulation data.
The cost of data collection is reduced, and the generated simulation data is more in line with real power consumption scenarios. The load decomposition model has fewer parameters, requires less computing resources, is easy to deploy at the edge, and achieves accurate decomposition of the power of household appliances.
Smart Images

Figure CN118643289A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of household load data simulation and non-intrusive load monitoring, and in particular to a household load data simulation and decomposition method and system based on a small sample. Background Art
[0002] In recent years, how to make household users more actively participate in demand response and reduce household load energy consumption has gradually become a research hotspot that has attracted widespread attention from the society. In this context, non-intrusive load decomposition plays an extremely important and positive role. It helps users understand the specific usage of household appliances in real time, encourages users to participate more actively in power system demand response, and improve energy efficiency. At present, scholars at home and abroad have conducted certain research on non-intrusive load decomposition. Most of the existing research is to build a machine learning model, and then train the model based on a large amount of electrical unit data and bus power data to achieve accurate load decomposition. The source of these power data is mainly collected in real household power consumption scenarios using intelligent measurement terminals, or using typical operating power curves of electrical appliances to generate user power consumption simulation data through random combination. However, the existing non-intrusive load decomposition methods have the problems of high training cost, difficult edge deployment, and poor practicality in real power consumption scenarios. The specific shortcomings are: a large amount of electrical unit power data is collected for a long time in actual household power consumption scenarios, the collection cost is high, and it is difficult to implement. However, most existing studies require a large amount of data for model training in order to obtain a high decomposition accuracy, which is not suitable for popularization and application. Most existing household load simulation methods adopt a method of randomly combining the typical power curves of each electrical appliance, ignoring the actual electricity usage habits of household users. The generated simulation data does not have characteristic information such as the operating rules of electrical appliances contained in the actual electricity usage data. The non-invasive load decomposition models proposed by most existing research institutes have complex structures, large model parameters, and large computing resources required, which is not conducive to edge hardware deployment. Summary of the invention
[0003] In view of the above-mentioned problems, the present invention is proposed.
[0004] Therefore, the technical problem solved by the present invention is: how to solve the problems of existing household load simulation methods and non-intrusive load decomposition models in terms of data requirements, realistic simulation and hardware deployment.
[0005] To solve the above technical problems, the present invention provides the following technical solution: a method for simulating and decomposing household load data based on a small sample, which comprises the following steps:
[0006] Collect low-frequency bus power data of household users over a long period of time and single-unit power data of all electrical appliances in power usage scenarios, and pre-process the data; cluster the operating power data of single appliances obtained after pre-processing to obtain typical power curves of each appliance in different working modes; based on the bus power data, use event detection algorithms to identify the start and end events of appliances and record the operating time periods of appliances; count the number of times appliances are used, and use statistical methods to generate probability distributions of the number of times each appliance is used per day and the usage time periods; based on typical power curves and probability distributions, combine simulation data of mixed usage scenarios of various electrical appliances of household users; build a lightweight load decomposition model and train it using simulation data.
[0007] As a preferred solution of the method for simulating and decomposing household load data based on a small sample according to the present invention, the power data of all electrical appliances are represented as {L1, L2, ..., L M}, where M represents all types of electrical equipment in the electricity usage scenario.
[0008] The preprocessing includes missing value processing and outlier detection.
[0009] The outlier detection adopts the criterion abn, which is expressed as:
[0010] abn=I(|x i+1 -x i |>T),i=1,2,...,w
[0011] Among them, x i+1 With x i denote the i+1th and ith power sampling points in a single data segment, respectively, T denotes the threshold of the absolute difference value of adjacent power sampling points, and I(·) denotes the indicator function. If |x i+1 -x i |>T, it returns 1, indicating that there is an outlier, and deletes the outlier fragment. i+1 -x i When |≤T, it returns 0, indicating that there is no outlier.
[0012] As a preferred solution of the method for simulating and decomposing household load data based on a small sample according to the present invention, the clustering adopts K-Means clustering, which is expressed as:
[0013]
[0014] in, is the total number of operating power data fragments collected for the i-th appliance, is the total number of different working modes of the i-th electrical appliance, that is, the number of clusters, x ivis the power data of the vth segment of the i-th electrical appliance, center ij is the jth cluster center of the i-th electrical appliance, that is, the typical power data of the i-th electrical appliance under the j-th operating mode.
[0015] The obtaining of the typical power curve of each electrical appliance under different working modes includes constructing a typical power wave library of M electrical appliances based on the obtained clusters. And a typical run time collection Among them, the waveform library of the i-th electrical appliance and runtime collection Store the i-th type of electrical appliances obtained through clustering Cluster centers.
[0016] As a preferred solution of the method for simulating and decomposing household load data based on a small sample according to the present invention, the event detection algorithm is a sliding window method based on a dynamic threshold, including setting the sliding window size to Γ, starting from the starting position of the bus power sequence, sliding the window to cover the continuous data segments in the data sequence in sequence, and setting the sliding step size to γ, calculating the statistical characteristics of the data points in each sliding window, including the moving average and the moving variance, and the calculation formulas of the moving average mean and the moving variance var are respectively expressed as,
[0017]
[0018]
[0019] Among them, x i Represents the data points in the νth sliding window.
[0020] Calculate the dynamic threshold thre, expressed as,
[0021] thre=mean+β×var
[0022] Here, β represents a constant.
[0023] As a preferred solution of the method for simulating and decomposing household load data based on a small sample according to the present invention, wherein: the probability distribution of the number of times each appliance is used per day and per hour is generated, including the set {T1, T2, ..., T M}, count the number of start events of all appliances every day, set W = {W1, W2, ..., W M}, where the number of times the i-th appliance is turned on every day is N all The number of days for which bus power data was collected.
[0024] The number of times each appliance is used every day includes a set of statistics of the number of times all appliances are used every hour in 24 hours a day U = {U1, U2, ..., U M}, where the number of times the i-th appliance is used per hour is set U i = {u i1 ,u i2 ,...,u i24},u i1 is the number of times the ith appliance is used in the 0th time period, and the hourly distribution set V of the ith appliance is obtained. i .
[0025] As a preferred solution of the household load data simulation and decomposition method based on a small sample according to the present invention, wherein: the generating probability distribution of the number of times each appliance is used per day and per hour also includes fitting the usage probability distribution of all appliances in each hour of the 24 hours of a day using a mixed Gaussian distribution to obtain a usage probability distribution set P = {P1, P2, ..., P M}, where the usage probability set P of the i-th appliance per hour i ={p i1 ,p i2 ,...,p i24}, p i1 is the probability of using the i-th appliance at time 0, p i2 is the probability of using the th appliance in the 1st hour period.
[0026] The mixed Gaussian distribution is expressed as,
[0027]
[0028]
[0029] Where x is the input vector of the mixed Gaussian distribution, x∈V i , d is the dimension of the input vector, μ k is the mean vector of the components, ∑ k is the covariance matrix of the components, |∑ k | is the determinant of the component covariance matrix, a k is the weight of the component in the entire mixed Gaussian distribution, satisfying And a k >0, K represents the number of Gaussian distribution components, and k represents each component.
[0030] As a preferred solution of the method for simulating and decomposing household load data based on a small sample according to the present invention, the construction of a lightweight load decomposition model includes replacing the feedforward neural network in the Transformer encoder with a one-dimensional convolutional neural network, recorded as a Transformer-CNN structure, and using multiple replaced Transformer encoders and fully connected layers as the main structure of the model. At the same time, non-intrusive load identification is introduced as an auxiliary task to form a dual-branch structure, and the final output result of the load decomposition model is the product of the results of the load decomposition task and the load identification task.
[0031] Another object of the present invention is to provide a household load data simulation and decomposition system based on a small sample, which can solve the problems of low accuracy in simulating complex electricity consumption behaviors and low load identification accuracy in the prior art through high-precision event detection and pattern recognition technology in complex electricity consumption scenarios.
[0032] To solve the above technical problems, the present invention provides the following technical solutions: a household load data simulation and decomposition system based on a small sample, comprising a data acquisition module, a data preprocessing module, an event detection module and a statistical analysis module.
[0033] The data acquisition module collects low-frequency bus power data of household users over a long period of time and single-unit power data of all electrical appliances in power usage scenarios.
[0034] The data preprocessing module is responsible for missing value processing and outlier detection.
[0035] The event detection module performs event detection based on a sliding window method of a dynamic threshold, identifies the start and end events of the electrical appliance, and records the operation time period of the electrical appliance.
[0036] The statistical analysis module is responsible for counting the number of times the electrical appliances are used, and generating a probability distribution of the number of times each electrical appliance is used per day and the period of use.
[0037] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the household load data simulation and decomposition method based on a small sample are implemented.
[0038] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the household load data simulation and decomposition method based on a small sample as described above.
[0039] Beneficial effects of the present invention: The present invention simulates based on a small sample of electrical unit power data and unlabeled bus power data at a long time scale, generates a large amount of bus power simulation data and corresponding electrical unit power data, and reduces a large amount of data collection costs. The present invention statistically analyzes the electricity usage habits of household users based on historical power data, and generates simulation data based on the users' electricity usage habits, which is more in line with the actual electricity usage scenario. The load decomposition model can extract richer and more real time series information from it. The present invention proposes a lightweight load decomposition model, which has fewer parameters and requires fewer computing resources than the existing research model, and is easier to deploy at the edge. Construct a lightweight load decomposition model that is easy to deploy at the edge, and train it based on simulation data to achieve accurate decomposition of household appliance power. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0041] Figure 1 This is an overall flow chart of the household load data simulation and decomposition method based on a small sample provided in the first embodiment of the present invention.
[0042] Figure 2 A schematic diagram of the load decomposition model structure in the household load data simulation and decomposition method based on a small sample provided in the first embodiment of the present invention.
[0043] Figure 3 A schematic diagram of the Transformer-CNN structure of a household load data simulation and decomposition method based on a small sample provided in the first embodiment of the present invention.
[0044] Figure 4 This is an overall framework diagram of a small sample-based household load data simulation and decomposition system provided in the second embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0046] Example 1
[0047] Reference Figure 1 to Figure 3 , which is an embodiment of the present invention, provides a method for simulating and decomposing household load data based on a small sample, characterized in that:
[0048] S1: Collect low-frequency bus power data of household users over a long period of time and single-unit power data of all electrical appliances in power usage scenarios, and pre-process the data.
[0049] The single power data of all electrical appliances are expressed as {L1, L2, ..., L M}, where M represents all types of electrical appliances in the electricity usage scenario, and the operating power data set L of the i-th electrical appliance i The low-frequency power data fragments of the i-th electrical appliance when it is running in different working modes are stored in it. In the present invention, the number of electrical appliances M is taken as 15. It is worth noting that in this patent, an independent database is rebuilt for some electrical appliances that run for a long time or are in standby state, such as monitors, smoke alarms, etc., assuming that their power values remain unchanged and are taken as the average power values when they are sampled.
[0050] Preprocessing includes missing value processing and outlier detection.
[0051] Missing values are processed by forward filling to ensure data continuity.
[0052] The outlier detection adopts the criterion abn, which is expressed as:
[0053] abn=I(|x i+1 -x i |>T),i=1,2,...,w
[0054] Among them, x i+1 With x i denote the i+1th and ith power sampling points in a single data segment, respectively, T denotes the threshold of the absolute difference value of adjacent power sampling points, and I(·) denotes the indicator function. If |x i+1 -x i |>T, it returns 1, indicating that there is an outlier, and deletes the outlier fragment. i+1 -x i When |≤T, 0 is returned, indicating that there is no abnormal value. In the present invention, T is set to 10000.
[0055] It is further supplemented that, in the present invention, the sampling frequency of low-frequency data is 1 / 60 Hz; the long time scale refers to the time span of data collection being not less than one year. In the present invention, the time span of collection is one year; the bus power data is the power data collected at the user bus meter, that is, the sum of the power of all electrical appliances in the household user.
[0056] S2: Clustering the operating power data of individual electrical appliances obtained after preprocessing to obtain typical power curves of each electrical appliance under different working modes.
[0057] K-Means clustering is used for clustering, expressed as,
[0058]
[0059] in, is the total number of operating power data fragments collected for the i-th appliance, is the total number of different working modes of the i-th electrical appliance, that is, the number of clusters, x iv is the power data of the vth segment of the i-th electrical appliance, center ij is the jth cluster center of the i-th electrical appliance, that is, the typical power data of the i-th electrical appliance under the j-th operating mode.
[0060] Obtaining the typical power curve of each electrical appliance under different working modes includes constructing a typical power wave library of M electrical appliances based on the obtained clusters. And a typical run time collection Among them, the waveform library of the i-th electrical appliance and runtime collection Store the i-th type of electrical appliances obtained through clustering Cluster centers.
[0061] S3: Based on the bus power data, the event detection algorithm is used to identify the start and end events of the electrical appliances and record the operating time of the electrical appliances.
[0062] The event detection algorithm is a sliding window method based on a dynamic threshold, including setting the sliding window size to Γ. In the present invention, the sliding window size Γ is taken as 30. Starting from the starting position of the bus power sequence, the sliding window is sequentially slid to cover the continuous data segments in the data sequence. The sliding step length is set to γ. In the present invention, the sliding step length γ is taken as 15. The statistical characteristics of the data points in each sliding window are calculated, including the moving average and the moving variance. The calculation formulas of the moving average mean and the moving variance var are respectively expressed as,
[0063]
[0064]
[0065] Among them, x i Represents the data points in the νth sliding window.
[0066] Calculate the dynamic threshold thre, expressed as,
[0067] thre=mean+β×var
[0068] Wherein, β represents a constant, and the selected value determines the strictness of the threshold. In the present invention, β is 1, 2 or 3.
[0069] It is further supplemented that for each data point in the sliding window, the difference between it and the previous data point is determined. If the power of the data point is greater than the previous data point and the difference is greater than the dynamic threshold, it is recorded as a candidate turn-on event. If the power of the data point is less than the previous data point and the difference is greater than the dynamic threshold, it is recorded as a candidate turn-off event, and the timestamp corresponding to the event is recorded. Candidate turn-on events and candidate turn-off events are collectively referred to as candidate events, and turn-on events and turn-off events constitute the use event of an electrical appliance. If it can be determined that a candidate turn-on event and a candidate turn-off event belong to the same use event of a certain electrical appliance, the candidate turn-on event and the candidate turn-off event are said to be in a corresponding state.
[0070] Traverse all sliding windows to obtain all candidate on and off events in the bus power sequence. Merge events with the same timestamp in the candidate events into the same on or off event. At the same time, if the occurrence time of the previous candidate off event differs from the occurrence time of the adjacent next candidate on event by less than a certain threshold thre1, and the electrical operation characteristics such as the power amplitude in the two usage events are basically the same, then delete the two candidate events and merge the two usage events into one usage event. In the present invention, the threshold thre1 is taken as 5. Then traverse all uncorrelated candidate events in chronological order, starting from the first candidate on event. There are the following two situations.
[0071] s1. If the next event of the candidate on event is a candidate off event, the power data between the two events is intercepted and compared with The typical power data of each appliance in the data are compared, and the Euclidean distance between the power data and the typical power data of each appliance is calculated. If the distance is less than a certain threshold, the power data is judged to belong to a certain appliance. If the power data can match a certain operation mode of an appliance, the two adjacent candidate opening and closing events are marked as corresponding states, and the opening time, closing time, and usage duration of the appliance are recorded.
[0072] s2. If the next event of the candidate on event is a candidate on event, first mark the two candidate events as pending events A and B, and continue traversing. If the next two events are candidate off events, mark them as C and D, respectively. At this point, there are two possibilities. One is that A and C, B and D are the same appliance use event, and the other is that A and D, B and C are the same appliance use event. For the above two possibilities, traverse All combinations of typical power data of each appliance in the bus are used to determine which two appliances are combined, and record them, and mark the above four candidate events as corresponding states according to the combination. The solution to the remaining situations where multiple appliances are running at the same time is similar to the above process, and will not be repeated here. The basic idea is to find the combination of typical power data of each appliance to achieve the correspondence between all candidate start events and shutdown events, and complete the matching of all appliance usage events in the bus power sequence with the known typical operation modes of the appliances. After completing the correspondence of a candidate start event, continue to traverse the remaining candidate events that are in an uncorresponding state until the correspondence of all candidate events is completed.
[0073] The information of appliance usage events includes the time when the i-th, i=1,2,...,M-th appliance is turned on and off, the duration of each appliance use, etc., and constructs a set of the time when all appliances are turned on and off {T1,T2,...,T M}, where the set of on and off times of the i-th appliance is N i represents the total number of events of the i-th appliance being turned on, Respectively represent the i-th appliance The start time, duration, and end time of the event.
[0074] S4: Count the number of times the electrical appliances are used, and use statistical methods to generate a probability distribution of the number of times each appliance is used per day and the period of use.
[0075] The number of times electrical appliances are used is counted, including the set of recorded on / off times of all electrical appliances {T1, T2, ..., T M}, count the number of start events of all appliances every day, set W = {W1, W2, ..., W M}, where the number of times the i-th appliance is turned on every day is N all The number of days for which bus power data was collected.
[0076] In the present invention, statistics refer to statistics in four seasons: spring, summer, autumn and winter. Assume that the number of start-up events of the i-th appliance per day is set W i There is α i Different frequency situations W i The elements in ′ are different from each other, represents the number of days that the ith appliance is used θ1 times in a day, and so on. The probability distribution of the number of times the ith appliance is turned on per day is fitted by a mixed Gaussian distribution. That is, every day The probability that the appliance is turned on is And so on.
[0077] Then, count the number of times all electrical appliances are used in each hour in 24 hours a day, and the set U = {U1, U2, ..., U M}, where the number of times the i-th appliance is used per hour is set U i = {u i1 ,u i2 ,...,u i24},u i1 is the number of times the ith appliance is used in the 0th time period, and so on; then we get the hourly distribution set V of the ith appliance used i , which contains u i1 0,u i2 1, and so on, until u i24 23. Use mixed Gaussian distribution to fit the usage probability distribution of all electrical appliances in each hour of the 24 hours in the four seasons, and get the usage probability distribution set P = {P1, P2, ..., P M}, where the usage probability set P of the i-th appliance per hour i ={p i1 ,p i2 ,...,p i24}, p i1 is the probability of using the i-th appliance at time 0, p i2 is the probability of using the i-th appliance in time period 1, and so on.
[0078] A mixed Gaussian distribution is a probability distribution model composed of multiple Gaussian distributions. Each Gaussian distribution is called a component, and each component has its own mean, covariance, and weight. A mixed Gaussian distribution can be expressed as the weighted sum of all components.
[0079] The mixed Gaussian distribution is expressed as,
[0080]
[0081]
[0082] Where x is the input vector of the mixed Gaussian distribution, x∈V i , d is the dimension of the input vector, μ k is the mean vector of the components, ∑ k is the covariance matrix of the components, |∑ k | is the determinant of the component covariance matrix, a k is the weight of the component in the entire mixed Gaussian distribution, satisfying And a k >0, K represents the number of Gaussian distribution components, and k represents each component.
[0083] S5: Based on typical power curves and probability distribution, simulated data of mixed usage of various electrical appliances of household users are combined.
[0084] Specifically, the simulation data to be generated include bus power data S all And the single power data set S of all electrical appliances = {S1, S2, ..., S M}, the simulation time resolution is equal to the collected low-frequency power data and is set to τ (τ < 1 hour), and the number of simulation samples is set to The number of simulation days is set to In the present invention, the time resolution of sampling is taken as 1 minute, the number of simulation samples is taken as 525600, and the number of simulation days is taken as 365.
[0085] First, traverse by simulation day, for each simulation day k , by generating a random number ζ in the range of 0 to 1 i , get the number of appliance start events of the i-th appliance on that day like but like but Judge in sequence until if but
[0086] Then, traverse the number of appliance on events of the i-th appliance on the day For each opening event, a random number ρ is generated between 0 and 1 i , get the i-th appliance on day k The time of the appliance opening event If 0<ρ i <p i1 ,but If p i1 <ρ i <p i1 +p i2 ,but And so on, until if p i1 +p i2 +...+p i23 <ρ i <p i1 +p i2 +...+p i24 ,but During the time period when the opening event occurs A simulation sampling point is randomly selected as the start time of the start event. Then, a typical power waveform library of the i-th electrical appliance is selected. A typical power waveform is randomly selected, deformed and noise is added to it, and used as the power waveform of the appliance usage event. This includes appliances that have been running for a long time or are in standby mode. In this patent, the average power of these appliances when sampled is taken, and then deformed and noise is added to it, and used as the power waveform of the appliance usage event. Deformation includes but is not limited to operations such as stretching, scaling, and local distortion. Noise includes but is not limited to Gaussian noise, uniform noise, and other noises.
[0087] According to the above steps, determine the time when the use event of all electrical appliances occurs every day within the simulation days and the corresponding operating power waveform. Set the power value to 0 watts for each appliance during the unused period. In this way, all the single power data of each appliance within the simulation days can be obtained, and the power data on the corresponding bus can be obtained by adding the single power data of all appliances. So far, through simulation, the bus power data that conforms to the user's electricity usage habits and the single power data of each appliance are obtained.
[0088] S6: Build a lightweight load decomposition model and train it using simulation data.
[0089] like Figure 2 The following is a schematic diagram of the load decomposition model structure. Figure 3 is a schematic diagram of the Transformer-CNN structure. The lightweight load decomposition model is a sequence-to-point load decomposition model with a dual-branch structure based on the Transformer encoder structure and a one-dimensional convolutional neural network. Specifically, the feedforward neural network in the Transformer encoder is replaced with a one-dimensional convolutional neural network, recorded as the Transformer-CNN structure, and multiple replaced Transformer encoders and fully connected layers are used as the main structure of the model. At the same time, non-intrusive load identification is introduced as an auxiliary task to form a dual-branch structure. The final output result of the model is the product of the results of the load decomposition task and the load identification task. Finally, the simulation data is used as training data for model training.
[0090] Example 2
[0091] Reference Figure 4 , which is an embodiment of the present invention, provides a system for simulating and decomposing household load data based on small samples. The system for simulating and decomposing household load data based on small samples includes a data acquisition module, a data preprocessing module, an event detection module and a statistical analysis module.
[0092] The data acquisition module collects low-frequency bus power data of household users over a long period of time and single-unit power data of all electrical appliances in the power usage scenario.
[0093] The data preprocessing module is responsible for missing value processing and outlier detection.
[0094] The event detection module performs event detection based on a sliding window method with a dynamic threshold, identifies the start and end events of the appliance, and records the operating time of the appliance.
[0095] The statistical analysis module is responsible for counting the number of times the electrical appliances are used and generating the probability distribution of the number of times each appliance is used per day and the period of use.
[0096] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0097] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0098] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0099] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0100] Example 3
[0101] In this embodiment, in order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments. In the field of household load data simulation and non-invasive load monitoring, load decomposition technology is an important method to improve energy efficiency and optimize electricity use. Traditional load decomposition technology mainly relies on large-scale data sets and complex models, but the effect is often not ideal when data is limited or computing resources are limited. This method proposes a novel and efficient solution through simulation and decomposition of household load data based on a small sample, and conducts comparative experiments with traditional methods to verify its effectiveness and superiority.
[0102] Traditional load decomposition methods mainly include decomposition techniques based on non-intrusive load monitoring (NILM), which rely on large-scale, high-frequency load data and usually use hidden Markov models (HMM), support vector machines (SVM), etc. for load identification and decomposition. These methods perform well when the data volume is large and the frequency is high, but they are not effective under the conditions of small samples and low-frequency data.
[0103] In order to verify the effectiveness and superiority of this method, we designed a variety of theoretical experiments and compared the performance of traditional methods and this method on different indicators. The experimental data is presented in a tabular form, including specific data and results of data collection, preprocessing, clustering, and event detection, as shown in Table 1, Table 2, and Table 3.
[0104] Table 1 Comparison of data collection and preprocessing effects
[0105] Data Item Traditional methods This method Data collection cycle 1 year 3 months Data collection frequency 1 second / time 1 minute / time Data missing rate 5% 5% Outlier detection accuracy 90% 95%
[0106] Table 2 Clustering effect comparison chart
[0107]
[0108] Table 3 Comparison of event detection effects
[0109]
[0110]
[0111] In summary, this method has a shorter data collection cycle and lower frequency, but improves data quality through a more efficient outlier detection method. Using the K-Means clustering algorithm, this method is superior to traditional methods in terms of accuracy and time efficiency. This method is based on a sliding window method with a dynamic threshold, which improves the accuracy of event detection and shortens the detection time.
[0112] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A household load data simulation and decomposition method based on a small sample, characterized in that: include: Collect low-frequency bus power data of household users over a long period of time and single-unit power data of all electrical appliances in power usage scenarios, and pre-process the data; Clustering the operating power data of individual electrical appliances obtained after preprocessing to obtain typical power curves of each electrical appliance in different working modes; Based on bus power data, an event detection algorithm is used to identify the start and end events of electrical appliances and record the operating time of the appliances; Count the number of times electrical appliances are used, and use statistical methods to generate probability distributions of the number of times each appliance is used per day and per hour; Based on typical power curves and probability distribution, simulated data of mixed usage of various electrical appliances of household users are combined; Build a lightweight load decomposition model and train it using simulation data.
2. The method for simulating and decomposing household load data based on a small sample according to claim 1, characterized in that: The single power data of all electrical appliances are represented by {L1, L2, ..., L M }, where M represents all types of electrical equipment in the electricity usage scenario; The preprocessing includes missing value processing and outlier detection; The outlier detection adopts the criterion abn, which is expressed as: abn=I(|x i+1 -x i |>T),i=1,2,...,w Among them, x i+1 With x i denote the i+1th and ith power sampling points in a single data segment, respectively, T denotes the threshold of the absolute difference value of adjacent power sampling points, and I(·) denotes the indicator function. If |x i+1 -x i |>T, it returns 1, indicating that there is an outlier, and deletes the outlier fragment. i+1 -x i When |≤T, it returns 0, indicating that there is no outlier.
3. The method for simulating and decomposing household load data based on a small sample according to claim 2, characterized in that: The clustering is performed using K-Means clustering, which is expressed as: in, is the total number of operating power data fragments collected for the i-th appliance, is the total number of different working modes of the i-th electrical appliance, that is, the number of clusters, x iv is the power data of the vth segment of the ith type of electrical appliance, center ij is the jth cluster center of the i-th electrical appliance, that is, the typical power data of the i-th electrical appliance under the j-th operating mode; The obtaining of the typical power curve of each electrical appliance under different working modes includes constructing a typical power wave library of M electrical appliances based on the obtained clusters. And a typical run time collection Among them, the waveform library of the i-th electrical appliance and runtime collection Store the i-th type of electrical appliances obtained through clustering Cluster centers.
4. The method for simulating and decomposing household load data based on a small sample according to claim 3, characterized in that: The event detection algorithm is a sliding window method based on dynamic thresholds, including setting the sliding window size to Γ, starting from the starting position of the bus power sequence, sliding the window to cover the continuous data segments in the data sequence in sequence, and setting the sliding step size to γ, calculating the statistical characteristics of each data point in the sliding window, including the moving average and the moving variance, and the calculation formulas of the moving average mean and the moving variance var are respectively expressed as: Among them, x i represents the data point in the νth sliding window; Calculate the dynamic threshold thre, expressed as, thre=mean+β×var Here, β represents a constant.
5. The method for simulating and decomposing household load data based on a small sample according to claim 4, characterized in that: The counting of the number of times the electrical appliances are used includes a set of {T1, T2, ..., T M }, count the number of start events of all appliances every day, set W = {W1, W2, ..., W M }, where the number of times the i-th appliance is turned on every day is N all The number of days for bus power data collection; The method of generating the probability distribution of the number of times each appliance is used every day and every hour includes counting the number of times all appliances are used every hour in 24 hours of a day, and the set U = {U1, U2, ..., U M }, where the number of times the i-th appliance is used per hour is set U i = {u i1 ,u i2 ,...,u i24 },u i1 is the number of times the ith appliance is used in the 0th time period, and the hourly distribution set V of the ith appliance is obtained. i .
6. The method for simulating and decomposing household load data based on a small sample according to claim 5, characterized in that: The method of generating the probability distribution of the number of times each appliance is used per day and per hour also includes fitting the probability distribution of the use of all appliances per hour in 24 hours a day using a mixed Gaussian distribution to obtain a use probability distribution set P = {P1, P2, ..., P M }, where the usage probability set P of the i-th appliance per hour i ={p i1 ,p i2 ,...,p i24 }, p i1 is the probability of using the i-th appliance at time 0, p i2 is the probability of using the th appliance in the 1st hour period; The mixed Gaussian distribution is expressed as, Where x is the input vector of the mixed Gaussian distribution, x∈V i , d is the dimension of the input vector, μ k is the mean vector of the components, ∑ k is the covariance matrix of the components, |∑ k | is the determinant of the component covariance matrix, a k is the weight of the component in the entire mixed Gaussian distribution, satisfying And a k >0, K represents the number of Gaussian distribution components, and k represents each component.
7. The method for simulating and decomposing household load data based on a small sample according to claim 6, characterized in that: The construction of the lightweight load decomposition model includes replacing the feedforward neural network in the Transformer encoder with a one-dimensional convolutional neural network, which is recorded as a Transformer-CNN structure, and using multiple replaced Transformer encoders and fully connected layers as the main structure of the model. At the same time, non-intrusive load identification is introduced as an auxiliary task to form a dual-branch structure. The final output result of the load decomposition model is the product of the results of the load decomposition task and the load identification task.
8. A system using the method for simulating and decomposing household load data based on a small sample as claimed in any one of claims 1 to 7, characterized in that: It includes data acquisition module, data preprocessing module, event detection module and statistical analysis module; The data acquisition module collects low-frequency bus power data of household users over a long time scale and single-unit power data of all electrical appliances in the power usage scenario; The data preprocessing module is responsible for missing value processing and outlier detection; The event detection module performs event detection based on a sliding window method with a dynamic threshold, identifies the start and end events of the electrical appliance, and records the operation time of the electrical appliance; The statistical analysis module is responsible for counting the number of times the electrical appliances are used, and generating a probability distribution of the number of times each electrical appliance is used per day and the period of use.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for simulating and decomposing household load data based on a small sample according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for simulating and decomposing household load data based on a small sample according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Load decomposition method based on electrical appliance physical characteristics and residential electricity consumption behaviors
CN111563827A
Simulation data generation method and system for power consumption behavior prediction
CN112560330A
Improved non-intrusive load decomposition model
CN113987913A
Data generation method based on data time sequence characteristics and state relevance between electric appliances
CN114091323A
Method and device for generating electrical load simulation data of household smart energy system
CN116702595A
Cited By
Non-intrusive load monitoring method, medium and electronic equipment
CN119646652A
