Data generation method based on data timing characteristics and state correlation between electrical appliances

By using an improved Generative Adversarial Network (GAN) that combines the correlation of operating states between appliances and the temporal characteristics of data, power load data that closely approximates real data is generated. This solves the problem of unreasonable data generation in non-intrusive load monitoring and improves data quality and computational efficiency.

CN114091323BActive Publication Date: 2025-12-16HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111215373.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-19
Publication Date
2025-12-16
Estimated Expiration
2041-10-19

AI Technical Summary

Technical Problem

Existing non-intrusive load monitoring algorithms face challenges in domestic applications, including difficulties in model transfer, high data acquisition costs, and a lack of consideration for the temporal characteristics of power load data and the correlation between the operating states of electrical appliances, resulting in unreasonable data generation methods.

Method used

An improved Generative Adversarial Network (GAN) is adopted, which combines the correlation of working states among electrical appliances and the temporal characteristics of data. The generator hyperparameters are optimized through dimensionality reduction network and restoration network to generate power load data that approximates real data.

Benefits of technology

The generated power load data more closely matches the actual data distribution, reduces computing costs, improves the quality and efficiency of data generation, and is suitable for non-intrusive load monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FDA0005611143190000011
    Figure FDA0005611143190000011
  • Figure FDA0005611143190000012
    Figure FDA0005611143190000012
  • Figure FDA0005611143190000013
    Figure FDA0005611143190000013
Patent Text Reader

Abstract

The application discloses a data generation method based on data time sequence characteristics and state correlation between electrical appliances. In order to reduce the noise problem existing in the data acquisition process, the mean of the load data and the Grubbs detection method are combined to clean the noise data according to the characteristics of the power load data. The improved generative adversarial network is improved from the following two aspects: 1. increasing the learning task of the generator; and 2. creating a dimension reduction and restoration network to assist the improved generative adversarial network. Secondly, the format of the network input data is modified, so that the generative adversarial network learns the associated working states of the electrical appliances in the longitudinal direction. Finally, the hyperparameters in the generator are optimized, so that the performance of the generator is further improved, and the quality of the generated data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of non-intrusive load monitoring, and particularly relates to a power data generation method based on data time sequence characteristics and inter-appliance working state correlation. BACKGROUND

[0002] The existing non-intrusive load monitoring algorithm mainly selects a supervised learning algorithm with relatively higher precision. However, the supervised learning algorithm needs a large amount of labeled data to support the algorithm. It is a great challenge in terms of manpower and financial resources to collect a large amount of labeled data. Therefore, domestic scholars often use foreign public data sets or build platforms for data collection in the research process of non-intrusive load monitoring. However, there are problems in the two: (1) Due to the differences in region and living habits, the model trained by the foreign public data set is difficult to migrate to domestic household users. (2) It often takes a lot of manpower and financial resources to build a data collection platform. Sometimes the amount of data collected still cannot meet the data amount required by the deep learning model. Therefore, a general-purpose scalable low-cost user load data generation method needs to be researched. In addition, the existing research data set of non-intrusive load monitoring algorithm is mainly based on power load data (such as active power, current, voltage, etc.). The data representation of power load depends on the working state of the appliance, and the time sequence characteristics of the data are hidden behind the working state. For example, the probability of a microwave oven being in a working state during breakfast, lunch and dinner is much higher than that during other time periods. The probability of a television being in a working state at night is much lower than that during other time periods. The working state of a washing machine generally follows the three steps of water storage, washing, and spin-drying. At the same time, there are countless connections between the working states of various appliances, such as: the rice cooker is likely to work with the microwave oven; the dishwasher is likely to work after the toaster is turned off, etc. Therefore, it is obviously unreasonable to study these data sets only from the perspective of data. The time sequence characteristics of power load data and the correlation between the working states of appliances need to be fully considered, and a more reasonable and effective power load data generation method suitable for non-intrusive load detection technology needs to be researched. SUMMARY

[0003] The present application aims at the difficulty of obtaining non-intrusive power load data and the lack of consideration of the time sequence characteristics of power load data and the correlation between the working states of appliances in other data generation methods. A power data generation method based on data time sequence characteristics and inter-appliance working state correlation is proposed.

[0004] The generative adversarial networks (GAN) has good performance in the field of data and image generation. After providing a small amount of sample data, the GAN can continuously generate data with the same distribution as the sample data. But the GAN itself does not have the ability to capture the timing characteristics, so the GAN model needs to be improved. The improved GAN not only learns the real data distribution, but also learns the conditional distribution of the real data at the next moment when the real data at the last moment is known. In addition, the real data of each electrical load is spliced into a matrix as the input data of the GAN, so that the GAN can mine the correlation information of the working state of each electrical load, and finally make the generated data more approximate to the real data. At the same time, due to the increase of new learning tasks and the increase of input data dimension, the problem of GAN difficulty to converge will be more serious. To solve this problem, a new hidden space is created for data calculation, and all data will be reduced in dimension in this space to reduce the amount of calculation, so as to improve the convergence speed of the model and to a certain extent avoid the problem of difficulty of model convergence. After all the calculation process is completed, the restoration process is realized in the hidden space, and the reduced data is restored to the same dimension as the sample data, so as to be used for subsequent non-intrusive load monitoring model.

[0005] The technical scheme of the method is as follows:

[0006] Step one: first build a platform to sample electrical appliances at low frequency, obtain active power data and total active power data, and pretreat the active power data;

[0007] Specifically: the sampling interval time is 3s to obtain a small amount of active power data and total active power data of each electrical appliance; the collected time series data, i.e. active power data, is pretreated; the pretreatment process includes missing data supplement and outlier processing; for missing data, the average active power of the two time points before and after the missing point is directly used to fill the active power data of the missing point; for outliers, Grubbs detection method is used for detection.

[0008] Step two: establish an electrical appliance model;

[0009] The pretreated power data is normalized to scale its value to [0, 1]. Therefore, in order to fully capture the hidden correlation between electrical appliances, a rolling window is created. The active power sequence of electrical appliance i with a given time length T is P (i) , i∈[1, m], where m is the number of electrical appliances. P (i) of all electrical appliances is spliced into an m×T matrix P, which is shown as follows:

[0010]

[0011] Step three: constructing the generative adversarial network model;

[0012] Considering the learning of the time series characteristics, unlike the past GAN, the GAN in the present application contains two final optimization targets. One is to minimize the difference between the probability distribution of the real data and the generated data; the second is to minimize the difference between the following two conditional probability distributions: 1) the conditional probability distribution of the real data at the current moment under the condition that the real data before the current moment is known; 2) the conditional probability distribution of the generated data at the current moment under the condition that the generated data before the current moment is known. Therefore, the following two expressions are defined:

[0013]

[0014]

[0015] where x data is the probability distribution of the real data, is the probability distribution of the generated data generated by the generator, P 1:T represents the active power sequence of the electrical appliance within 1-T time, and J(·) is the calculation of J-S divergence, which is used to measure the similarity of two probability distributions. The entire GAN is composed of four sub-networks, which are as follows:

[0016] Dimension reduction network e(·): the input is the high-dimensional real data sequence P 1:T =[P1, P2, …, P T ], wherein P ~ x data (P). The network sample batch is set to 128; the output is the reduced data h 1:T =[h1, h2, …, h T ]. The dimension reduction network outputs the original high-dimensional data to the hidden space (i.e. the reduced data space) for subsequent operation, wherein h 1:T =e(P 1:T ), and in the case of considering the time series characteristics, h t =e(h t-1 , P t ). The dimension reduction network contains one input layer, one output layer and three hidden layers. Considering the excellent performance of RNN in processing time series data, each hidden layer is replaced by 24 GRU units, the activation function is leaky-Relu, and the optimizer is Adam.

[0017] Recovery network r(·): the input is h 1:T =[h1, h2, …, h T ], and the output is wherein The operation is performed in the hidden space, and after the operation is completed, h The output is returned to the original high-dimensional data space. The structure, activation function, and optimizer selection of the restoration network are the same as those of the dimensionality reduction network, and they share the same loss function, namely the reconstruction loss function L. R .

[0018]

[0019] in Represents the distribution function x data (P) expectation. L R Used to calculate the loss after dimensionality reduction and restoration of real data, the objective is to make L... R Close to 0.

[0020] Generator g(·): Input is random noise z~x noise (z), where the noise distribution in this invention uses a Gaussian distribution. The generator directly performs operations in the latent space, outputting low-dimensional generated data. in The generator's structure, activation function, and optimizer are the same as those of dimensionality reduction networks. The improved generator differs from a general generator in that, considering temporal characteristics, it not only learns the probability distribution of the real data, i.e., x... data (P), and when the true data before the current time step is known, the true data at the current time step follows a conditional distribution x. data (P t |P 1:t-1 Therefore, at each moment Since the generator incorporates the learning of temporal characteristics, the 0-1 feedback in the adversarial unit alone is insufficient to motivate the generator to capture this conditional distribution. Therefore, a separate temporal information loss function L is established for the generator. T Through L T Numerical feedback is used to monitor the generator's learning of the temporal characteristics of the data.

[0021]

[0022] Where L T Used to calculate the conditional probability distribution x that the real data follows. data (P t |P 1:t-1 Conditional probability distributions learned by the generator The differences between them.

[0023] Adversarial device d(·): The essence of the adversarial device is a 0-1 discriminator, which converts the output of the above generator into a 0-1 discriminator. (Probability distribution information corresponding to the generated data) and the output h of the dimensionality reduction network 1:T (Probability distribution information corresponding to real data) is simultaneously input into the adversarial device to perform a 0-1 game; the output of the adversarial device is... in When the adversary determines that the data read this time is real data The value should be close to 1, otherwise close to 0. The structure, activation function, and optimizer selection of the adversarial device are the same as those of the dimensionality reduction network. However, during the data generation process, the generator aims to make the generated data distribution as close as possible to the real data distribution, while the adversarial device aims to distinguish whether the input data originates from the real dataset or the generated dataset. Since they are adversarial, a generative adversarial loss function L needs to be jointly established for both the generator and the adversarial device. V .

[0024]

[0025] Adversarial loss function L V The performance of both the adversary and the generator needs to be measured simultaneously; therefore, the optimal result is when the generator produces generated data indistinguishable from real data. At this point, L... V It gradually converges to 0.5.

[0026] Step 4: Optimize generator hyperparameters

[0027] In the four sub-network models constructed in step three, the generator is the most important in the entire GAN because it is the source of the final generated data. Therefore, the adaptation of the hyperparameters of the generator's internal model is extremely important compared to the other three sub-networks. However, optimizing the hyperparameters of all four sub-networks simultaneously would be computationally intensive and impractical. Therefore, this invention chooses to optimize the hyperparameters of the already trained generator; the hyperparameters of the other three sub-networks can be manually adjusted.

[0028] The generator contains various hyperparameters such as the learning rate I. r The values ​​of hyperparameters such as the number of hidden layer neurons (R) and the dropout rate can affect network performance to varying degrees. Studies have shown that I... r The parameters I and R have the greatest impact on network performance, i.e., the model loss value, and even determine whether the network can converge. Therefore, this invention uses the tree-structured Parzen algorithm to optimize the hyperparameter I. r Optimize with R. Other hyperparameters are manually tuned based on changes in the model loss value.

[0029] Construct a vector v = (R, I) of hyperparameters. r And the objective function for hyperparameter optimization is:

[0030]

[0031] Where f(v) = y is the objective to be minimized, and v is the normalized root mean square error between the generated data and the real data output by the generator network; *For the optimal hyperparameter combination, χ represents the search space of hyperparameters; the tree-structured Parzen algorithm does not directly solve equation (6), but rather maximizes the expected improvement index, i.e., the EI index is defined as:

[0032]

[0033] In the formula y * It is based on D={(v1,y1),(v2,y2),…,(v Q ,y Q The value is determined by the median of y in the equation )}, where v Q Let y represent the Q-th hyperparameter group. Q f(v) Q F(y|v) is unknown, but

[0034]

[0035] Where F(v|y) is the probability of v given a normalized root mean square error. l(v) and g(v) are the probability density functions of a Gaussian mixture model.

[0036] Let γ = F(y) <y * From equation (7) and Bayes' formula F(v) = F(v|y)F(y), we can obtain:

[0037] F(v)=γl(v)+(1-γ)g(v) (9)

[0038] Substituting equations (8) and (9) into equation (7), we get:

[0039]

[0040] Equation (10) shows that the larger l(v) / g(v) is... The larger it is, the greater it becomes. Therefore, in each iteration, we search for the one with the largest... v * v * Add the corresponding y to D and refit l(v) and g(v), continuously updating max[l(v) / g(v)] and v. * This continues until the maximum number of iterations is reached.

[0041] Step 5: Generation of power data based on data time series characteristics and appliance correlation

[0042] After the four sub-networks are trained and the generator hyperparameters are optimized, only the generator and restoration network are needed to complete the data generation process. Therefore, to reduce the model's complexity, the dimensionality reduction network and adversarial module are removed from the existing model, and the final GAN ​​contains only the generator and restoration network. Random noise distribution z ~ x noise(z) Input generator, generator outputs intermediate variables And The input is a restoration network, and the final output is generated data. At this point, the power load data generation algorithm, which combines time-series characteristics and appliance correlation, terminates; the final result is a matrix composed of the generated data.

[0043]

[0044] The advantages and beneficial results of this invention are as follows:

[0045] 1) This invention addresses the unavoidable noise problem in historical power data acquisition. Based on the fact that power data follows a Gaussian distribution under different conditions, the mean is used to fill in missing values ​​in the power data. After filling in the missing values, the Grubbs Detection method is used to remove outliers from the acquired data.

[0046] 2) Considering the superior performance of GANs in image generation, we utilize GANs for data generation. Taking into account the temporal characteristics of power data hiding, we add new learning content to the generator: learning the conditional distribution of the real data in the next time step when the real data from the previous time step is known. We also add a new loss function L. T For monitoring purposes. In addition, considering the correlation between the operating states of electrical appliances, the power data of all electrical appliances are concatenated, so that GAN can not only learn the hidden temporal characteristics behind the power data laterally, but also learn the hidden correlation information between the operating states of different electrical appliances vertically, thereby improving the quality of the generated data.

[0047] 3) Dimensionality reduction and restoration networks are added to the original GAN ​​model. Because data patching results in high-dimensionality generated data, directly generating this dataset using GAN would be extremely time-consuming. Therefore, a dimensionality reduction network is added to reduce the dimensionality of the high-dimensional data and create a latent space for computation on the dimensionality-reduced data. In this invention, the generator's two main learning tasks and the adversarial discrimination task are all completed in the latent space, significantly reducing computational costs and improving computational speed. The restoration network then restores the dimensionality-reduced data to the data required for subsequent load decomposition processes.

[0048] 4) Considering that the generator's performance directly correlates with the quality of the final generated data, the hyperparameters in the generator are optimized. A tree-structured Parzen algorithm is used to optimize the generator's hyperparameters. The hyperparameters are adjusted with the goal of minimizing the normalized mean square error between the generated and real data. This further improves the generator's performance and the quality of the final generated data. Detailed Implementation

[0049] The present invention will now be described in detail with reference to specific embodiments.

[0050] The power data generation method based on data time-series characteristics and electrical appliance correlation proposed in this invention is implemented according to the following steps:

[0051] Step 1: First, collect the active power data of each appliance for one week according to the sampling frequency of 3 seconds interval, and preprocess the collected data using the mean and Grubbs detection method. The appliances specifically collected in this invention are: 1. Refrigerator; 2. Washing machine; 3. Dishwasher; 4. Microwave oven; 5. Air conditioner; 6. Light bulb; 7. Garbage disposer; 8. Water heater.

[0052] (1) Divide the collected data into 20 points. Sort each group of data in ascending order of its internal size. Consider the suspicious points as the maximum and minimum values.

[0053] (2) Calculate the mean μ and standard deviation σ for each set of data. Calculate the difference between the deviation value of the suspicious point and the mean. The point with the largest difference is considered the final suspicious point P. i Calculate threshold Where i is the number of the final suspicious point. Determine the detection level α, set the detection precision to α = 0.05, and the confidence probability is p = 1 - α = 0.95.

[0054] (3) G i G obtained from the critical value table of the Zagrubbs test method p (n) (in this invention, n = 20) are compared. If G i <G p If (n), then the final suspicious point P is considered. i If it is not an outlier, then it is an outlier. Remove it and repeat the above steps to find all outliers in this dataset.

[0055] Step 2: Establishing the Electrical Model

[0056] To avoid the network failing to converge, the cleaned power data is normalized to scale its values ​​to [0,1].

[0057] Considering residents' electricity consumption habits, it's necessary to consider not only the hidden temporal characteristics within the power sequences of individual appliances, but also the hidden correlations between the operating states of each appliance. For example, a rice cooker is likely to operate simultaneously with a microwave oven; a dishwasher is likely to operate after a bread maker is turned off. Therefore, to fully capture the hidden correlations between appliances, a scrolling window is created. Let appliance i have an active power sequence P of given time length T. (i) Let i ∈ [1, m], where m is the number of electrical appliances. P represents the total number of electrical appliances. (i) Construct an m×T matrix P, as shown in the following equation:

[0058]

[0059] Step 3: Construction of the Generative Adversarial Network Model

[0060] In this invention, the entire GAN consists of four sub-networks: a dimensionality reduction network, a restoration network, a generator, and an adversarial network.

[0061] Dimensionality reduction network e(·): The input is a high-dimensional real data sequence P 1:T =[P1,P2,…,P T ], where P ~ x data (P). The network sample batch size is set to 128. The output is the dimensionality-reduced data h. 1:T = [h1, h2, ..., h T The data is then output to the hidden space (i.e., the reduced-dimensional data space) for further computation. The dimensionality reduction network consists of one input layer, one output layer, and three hidden layers. Each hidden layer consists of 24 GRU units, with the leaky-ReLU activation function and the Adam optimizer.

[0062] Restoration network r(·): Input is h 1:T = [h1, h2, ..., h T The output is in This operation is performed in the implicit space, and after the operation is complete... The output is returned to the original high-dimensional data space. The structure, activation function, and optimizer selection of the restoration network are the same as those of the dimensionality reduction network. It also shares a loss function with the dimensionality reduction network, namely the reconstruction loss function L. R .

[0063]

[0064] in Represents the distribution function x data (P) expectation. L R Used to calculate the loss after dimensionality reduction and restoration of real data, the objective is to make L... R Close to 0.

[0065] Generator g(·): Input is random noise z~x noise (z), where the noise distribution in this invention uses a Gaussian distribution. The generator directly performs operations in the latent space, outputting low-dimensional generated data. The generator's structure, activation function, and optimizer are similar to those of dimensionality reduction networks. However, the generator in this invention differs from a typical generator. Considering temporal characteristics, the generator not only learns the probability distribution of the real data, i.e., x... data (P), and learns the conditional probability distribution x that the real data follows in the next time step, given that the real data in the previous time step is known. data (P t |P1:t-1 Since the generator incorporates the learning of temporal characteristics, the 0-1 feedback in the adversarial unit alone is insufficient to motivate the generator to capture this conditional distribution. Therefore, a separate temporal information loss function L is established for the generator. T Through L T Numerical feedback is used to monitor the generator's learning of the temporal characteristics of the data.

[0066]

[0067] Where L T Used to calculate the conditional probability distribution x that the real data follows. data (P t |P 1:t-1 Conditional probability distributions learned by the generator The differences between them.

[0068] Adversarial d(·): The adversarial unit converts the output of the generator described above into a single unit. and the output h of the dimensionality reduction network 1:T Simultaneously input the adversarial device to perform a 0-1 game. The output of the adversarial device is... When the adversary determines that the data read this time is real data The value should be close to 1, otherwise close to 0. The structure, activation function, and optimizer of the adversarial processor are the same as those of the dimensionality reduction network. However, during data generation, the generator aims to make the generated data distribution as close as possible to the real data distribution, while the adversarial processor aims to distinguish whether the input data originates from the real dataset or the generated dataset. Since they are adversarial, a generative adversarial loss function L needs to be jointly established for both the generator and the adversarial processor. V .

[0069]

[0070] Adversarial loss function L V The performance of both the adversarial processor and the generator needs to be measured simultaneously. Therefore, the optimal result is that the generator produces a dataset that is indistinguishable from the real data, while the adversarial processor cannot distinguish between real and fake data. At this point, L... V It gradually converges to 0.5.

[0071] Step 4: Automatic optimization of generator hyperparameters

[0072] Construct a vector v = (R, I) of hyperparameters. r And the objective function for hyperparameter optimization is:

[0073]

[0074] Where f(v) = y is the objective to be minimized, and in this invention, it is the normalized root mean square error between the generated data and the real data output by the generator network; v* χ represents the search space for the optimal hyperparameter combination. The tree-structured Parzen algorithm does not directly solve equation (4), but rather maximizes the expected improvement (EI) index. The EI index is defined as:

[0075]

[0076] In the formula y * It is based on D={(v1,y1),(v2,y2),…,(v Q ,y Q The median of y in the equation is used to determine F(y|v). F(y|v) is unknown, but...

[0077]

[0078] Where F(v|y) is the probability of v given a normalized root mean square error. l(v) and g(v) are the probability density functions of a Gaussian mixture model.

[0079] Let γ = F(y) <y * From equation (6) and Bayes' formula F(v) = F(v|y)F(y), we can obtain:

[0080] F(v)=γl(v)+(1-γ)g(v) (7)

[0081] Substituting equations (6) and (7) into equation (5), we get:

[0082]

[0083] Equation (8) shows that the larger l(v) / g(v) is... The larger it is, the greater it becomes. Therefore, in each iteration, we search for the one with the largest... v * v * Add the corresponding y to D and refit l(v) and g(v), continuously updating max[l(v) / g(v)] and v. * This continues until the maximum number of iterations is reached.

[0084] Step 5: Generation of power data based on data time series characteristics and appliance correlation

[0085] After the four sub-networks are trained and the generator hyperparameters are optimized, only the generator and the restoration network are needed to complete the data generation process. Therefore, to reduce the complexity of the model, the dimensionality reduction network and the adversarial network are removed. The final GAN ​​contains only the generator and the restoration network. The random noise distribution z ~ x noise (z) Input generator, generator outputs intermediate variables And The input is a restoration network, and the final output is generated data. At this point, the power load data generation algorithm, which combines time-series characteristics and appliance correlation, terminates. The final result is a matrix composed of the generated data.

[0086]

Claims

1. A data generation method based on data time-series characteristics and inter-device state correlation, characterized in that, Includes the following steps: Step 1: First, build a platform to perform low-frequency sampling of electrical appliances to obtain active power data, and then preprocess the active power data; Step 2: Create an electrical appliance model; The preprocessed power data is normalized to scale its values ​​to [0,1]. Therefore, to fully capture the hidden correlations between appliances, a rolling window is created; the active power sequence of appliance i for a given time length T is P. (i) , i∈[1,m], where m is the number of electrical appliances; P of all electrical appliances (i) Construct an m×T matrix P, as shown in the following equation: Step 3: Construct an adversarial generative network model; Minimize the difference between the probability distributions of real data and generated data; Minimize the difference between the following two conditional probability distributions: 1) the conditional probability distribution of the real data at the current moment, given that the real data before the current moment is known; 2) the conditional probability distribution of the generated data at the current moment, given that the generated data before the current moment is known; therefore, define the following two expressions: Where x data For the true data probability distribution, The probability distribution of the data generated by the generator, P 1:T Let J(·) represent the active power sequence of electrical appliances within the time interval 1-T. JS divergence is used to measure the similarity between two probability distributions. The entire GAN consists of four sub-networks, as follows: Dimensionality reduction network e(·): The input is a high-dimensional real data sequence P 1:T =[P1,P2,…,P T ], where P t ~x data (P 1:T The output is the dimensionality-reduced data h. 1:T = [h1, h2, ..., h T ]; Dimensionality reduction networks output the original high-dimensional data to the latent space for subsequent computation, where h 1:T =e(P 1:T Considering timing characteristics, h t =e(h t-1 ,P t The dimensionality reduction network consists of one input layer, one output layer, and three hidden layers. Considering the excellent performance of RNNs in processing time series data, and differentiating it from the multilayer perceptron model used in general GAN ​​networks, each hidden layer is replaced with 24 GRU units, the activation function is leaky-ReLU, and the optimizer is Adam. Restoration network r(·): Input is h 1:T = [h1, h2, ..., h T The output is in This operation is performed in the implicit space, and after the operation is complete... The output is returned to the original high-dimensional data space; the structure, activation function, and optimizer selection of the restoration network are the same as those of the dimensionality reduction network, and they share a common loss function, namely the reconstruction loss function L. R ; in Represents the distribution function x data (P) expectation; L R Used to calculate the loss after dimensionality reduction and restoration of real data, the objective is to make L... R Close to 0; Generator g(·): Input is random noise z t ~x noise (z 1:T The generator operates directly in the latent space, outputting low-dimensional generated data. in The generator's structure, activation function, and optimizer are the same as those of the dimensionality reduction network; however, the improved generator differs from the general generator in that, considering temporal characteristics, it not only learns the probability distribution of the real data, i.e., x... data (P), and when the true data before the current time step is known, the true data at the current time step follows a conditional distribution x. data (P t |P 1:t-1 Therefore, at each moment Establish a separate time-series information loss function L for the generator. T Through L T Numerical feedback is used to monitor the generator's learning of the temporal characteristics of the data; Where L T Used to calculate the conditional probability distribution x that the real data follows. data (P t |P 1:t-1 Conditional probability distributions learned by the generator The differences between them; Adversarial device d(·): The essence of the adversarial device is a 0-1 discriminator, which converts the output of the above generator into a 0-1 discriminator. and the output h of the dimensionality reduction network 1:T Simultaneously input into the adversary device to perform a 0-1 game; the output of the adversary device is... in When the adversary determines that the data read this time is real data The value should be close to 1, otherwise close to 0; the structure, activation function, and optimizer selection of the adversary are the same as those of the dimensionality reduction network; a generative adversarial loss function L is jointly established for the generator and the adversary. V ; Adversarial loss function L V The performance of both the adversary and the generator needs to be measured simultaneously; therefore, the optimal result is when the generator produces generated data indistinguishable from real data; at this point, L... V It gradually converges to 0.5; Step 4: Optimize generator hyperparameters Optimize the hyperparameters of the already trained generator; manually adjust the hyperparameters of the other three sub-networks. Construct a vector v = (R, I) of hyperparameters. r And the objective function for hyperparameter optimization is: Where f(v) = y is the objective to be minimized, and v is the normalized root mean square error between the generated data and the real data output by the generator network; * To find the optimal combination of hyperparameters, χ represents the search space for hyperparameters; the tree-structured Parzen algorithm is used to search for hyperparameter I. r The model is optimized using R; other hyperparameters are manually tuned based on changes in the model loss value; the tree-structured Parzen algorithm does not directly solve equation (6), but rather maximizes the expected improvement index, i.e., the EI index is defined as: In the formula y * It is based on D={(v1,y1),(v2,y2),…,(v Q ,y Q The value is determined by the median of y in the equation )}, where v Q Let y represent the Q-th hyperparameter group. Q f(v) Q F(y|v) is unknown, but Where F(v|y) is the probability of v given a normalized root mean square error; l(v) and g(v) are probability density functions that follow a Gaussian mixture model. Let γ = F(y) <y * From equation (7) and Bayes' formula F(v) = F(v|y)F(y), we can obtain: F(v)=γl(v)+(1-γ)g(v) (9) Substituting equations (8) and (9) into equation (7), we get: Equation (10) shows that the larger l(v) / g(v) is... The larger it is, the greater it becomes; therefore, in each iteration, we search for the one with the largest... v * ; will v * Add the corresponding y to D and refit l(v) and g(v), continuously updating max[l(v) / g(v)] and v. * This continues until the maximum number of iterations is reached; Step 5: Generation of power data based on data time series characteristics and appliance correlation After the four sub-networks are trained and the generator hyperparameters are optimized, only the generator and the restoration network are needed to complete the data generation process. Therefore, to reduce the complexity of the model, the dimensionality reduction network and adversarial module are removed from the existing model, and the final GAN ​​only contains the generator and the restoration network; random noise distribution z ~ x noise (z) Input generator, generator outputs intermediate variables And The input is a restoration network, and the final output is generated data; at this point, the power load data generation algorithm, which combines time-series characteristics and appliance correlation, terminates; finally, a matrix composed of the generated data is obtained.

2. The data generation method based on data timing characteristics and inter-applied state correlation as described in claim 1, characterized in that: Step one: First, a platform is built to perform low-frequency sampling of electrical appliances to obtain active power data, and then the active power data is preprocessed; specifically: The sampling interval is 3 seconds to obtain a small amount of active power data for each appliance and the total active power data. The collected time-series data, i.e., active power data, is preprocessed. The preprocessing process includes missing data filling and outlier handling. For missing data, the average active power of the two time points before and after the missing point is used to fill in the missing active power data. Outliers are detected using the Grubbs Detection Method.

3. The data generation method based on data timing characteristics and inter-applied state correlation as described in claim 1, characterized in that: The input random noise uses a Gaussian distribution.

Citation Information

Patent Citations

  • Integrated energy system load scene generation method based on generative adversarial network

    CN111950868A

  • Adjustable time delay GAN gate voltage control circuit

    CN213426128U