Short-Term Load Forecasting Method for Multiple Electrical Appliances Based on Improved CGAN
By improving the parallel structure and multi-network model architecture of the CGAN network, combined with U-Net fully convolutional neural network and Markov discriminator, the problems of short-term prediction in non-invasive load monitoring and multi-electrical load prediction are solved, and efficient and accurate load prediction is achieved.
Patent Information
- Application Number
- CN202211561211.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-06
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-12-06
AI Technical Summary
In the prior art, non-invasive load monitoring cannot achieve accurate short-term load prediction, and the traditional CGAN model lacks correlation in capturing input data characteristics, making it difficult to accurately predict multiple electrical loads.
Using an improved CGAN network, the generation model group and discriminant model group of parallel structures are constructed, and the historical load data of household appliances is trained, combined with the U-Net fully convolutional neural network and Markov discriminator, short-term prediction of multiple electrical loads is performed.
It improves the accuracy and speed of load prediction, can effectively capture data mapping characteristics, realize fast and accurate prediction of multiple loads, and solves the problem of insufficient correlation of input data in traditional CGAN models.
Smart Images

Figure CN115936068B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a non-intrusive short-term load forecasting method for multiple electrical appliances based on an improved CGAN, and belongs to the technical field of load forecasting on the demand side of a power system. Background Art
[0002] Short-term load forecasting refers to forecasting the load values in the next few hours, one day or several days, which has important guiding significance for the dispatching operation and market trading of a power system. In recent years, with the large influx of various types of flexible loads on the user side, a variety of uncertainties and random factors have led to a significant increase in the volatility of the load side of the power system. The group effect of some household appliances induced by extreme weather is likely to cause load peaks, which not only brings huge challenges to short-term load forecasting, but also has a strong harm to the safe and stable operation of the power system. Short-term load forecasting needs to analyze the load energy consumption behavior by combining various external condition factors that affect load changes.
[0003] Currently, although the non-intrusive load monitoring technology can identify the types of household loads online and plays a certain role in analyzing the differentiated energy consumption characteristics of loads, the non-intrusive load monitoring does not have the function of short-term load forecasting. Since the number of household appliances is huge, the load capacity accounts for a relatively high proportion after being scaled up, and the energy consumption is relatively random. Therefore, if the short-term load of household loads can be accurately predicted in a targeted manner, it has very positive significance for tapping and improving the adjustable potential of a large number of household loads, saving energy and reducing load, and ensuring the safe and stable operation of the power system.
[0004] Considering that the essence of load forecasting is time series forecasting, the current mainstream approach is to carry out relevant research within the framework of regression and unsupervised learning. The energy consumption of household appliance loads has a large correlation with human behavior and is highly random. Using regression and unsupervised learning cannot capture the uncertainty of its load changes. The Generative Adversarial Network (GAN) has great potential in capturing the deep relationships hidden between high-dimensional and complex non-linear sequence data.
[0005] However, both the traditional Generative Adversarial Network (GAN) and the Conditional Generative Adversarial Network (CGAN) take random noise as the input, and use some load influencing factors as conditions and random noise input to the generation model. Although the generated load forecasting data can capture the distribution of load historical data to a certain extent, it has no association with the characteristics of the input data.
[0006] For example, the published literature: Short-term Load Forecasting Based on Conditional Generative Adversarial Networks, Lin Shan, Wang Hong, etc., Automation of Electric Power Systems, 2021, Issue 11, pp. 57-65. The solution in this literature also has the problems of lacking association with the characteristics of input data and relatively low accuracy of prediction results.
[0007] Meanwhile, the types of household appliance loads are numerous and complex, and it is quite difficult to conduct load forecasting for multiple appliances simultaneously. Currently, there is still a lack of a method that can identify the input electrical appliance load data to decompose the types of electrical appliances and accurately predict the loads of multiple electrical appliances.
[0008] The above problems should be considered and solved during the process of short-term load forecasting. Summary of the Invention
[0009] The object of the present invention is to provide a non-intrusive short-term load forecasting method for multiple electrical appliances based on improved CGAN to solve the problems existing in the prior art, such as lacking association with the characteristics of input data, the accuracy of prediction needs to be improved, and it is difficult to accurately predict the loads of multiple electrical appliances.
[0010] The technical solution of the present invention is as follows:
[0011] A non-intrusive short-term load forecasting method for multiple electrical appliances based on improved CGAN includes the following steps:
[0012] S1. Collect the historical load data sets of the energy consumption of k types of electrical appliances in N households for M days, and collect the external condition data sets that affect the historical loads of the electrical appliances. After preprocessing the collected historical load data sets and external condition data sets, use them as the training sample sets.
[0013] S2. Input the training sample sets obtained in step S1 into the non-intrusive load identification model to obtain the historical load data of k types of electrical appliances, which are used as the classified electrical appliance real sample data sets S i , where i = 1, 2..., k, and k ≥ 2;
[0014] S3. Construct a group of improved CGAN generation models. The group of generation models includes k groups of generation models G i corresponding to k types of electrical appliances, where i = 1, 2..., k. Concatenate the power of the i-th type of electrical appliance in the classified electrical appliance real sample data sets S i obtained in step S2 and the external condition data sets collected in step S1 into a matrix and input it into the group of generation models. The output data of the group of generation models is the i-th type of electrical appliance load data sets C i generated by each generation model G i , where i = 1, 2..., k;
[0015] S4. Construct a discriminant model group for the improved CGAN. The discriminant model group includes k groups of discriminant models D corresponding to k types of electrical appliances, where i = 1, 2,..., k. After concatenating the i-th type of electrical appliance load data set C output in step S3 and the i-th type of electrical appliance power data set in the classified electrical appliance real sample data set S obtained in step S2 into a matrix, input it into the discriminant model group, and the discriminant model group outputs a discriminant result for characterizing whether the discriminatively generated i-th type of electrical appliance load data C is real data; i , where i = 1, 2..., k, and the i-th type of electrical appliance load data set C i output in step S3 and the classified electrical appliance real sample data set S i obtained in step S2 are concatenated into a matrix and then input into the discriminant model group, and the discriminant model group outputs a discriminant result for characterizing whether the discriminatively generated i-th type of electrical appliance load data C i is real data;
[0016] S5. Jointly train the generation model group and the discriminant model group of the improved CGAN to obtain the trained improved CGAN;
[0017] S6. Input the real-time load data set and the external condition prediction data set collected at the current moment into the trained improved CGAN, and the k groups of generation model groups of the trained improved CGAN output the single-day load prediction data set C i ' of the corresponding electrical appliances.
[0018] Further, in step S1, after preprocessing the collected historical load data set and external condition data set, use it as the training sample set. Specifically,
[0019] S11. Perform data cleaning on the collected historical load data set and external condition data set, including deleting outliers and filling in missing values;
[0020] S12. Normalize the historical load data set and external condition data set after data cleaning;
[0021] S13. Use the historical load data set and external condition data set after data cleaning and normalization as the training sample set.
[0022] Further, in step S3, the generation model in the generation model group of the improved CGAN adopts a parallel structure, and each generation model uses a U-Net fully convolutional neural network. The U-Net fully convolutional neural network includes a downsampling layer and an upsampling layer, which are implemented through convolution and transposed convolution operations. Specifically,
[0023] S31. Concatenate the power of the i-th type of electrical appliance in the N household classified electrical appliance real sample data sets S i , where i = 1, 2,..., k, and the external condition data set into an operation data matrix as the input of the downsampling layer;
[0024] S32. The downsampling layer performs t times of downsampling on the operation data matrix to obtain the downsampled matrix;
[0025] S33. The upsampling layer performs t times of upsampling on the downsampled matrix to obtain the i-th type of electrical load dataset C i .
[0026] Further, in step S32, the downsampling layer performs t times of downsampling on the operation data matrix to obtain the downsampled matrix. Specifically,
[0027] S321. The operation data matrix undergoes a combination of 1 convolution - LeakyReLU. Specifically, it is convolved with a 3×3 convolution kernel, the stride is set to 2, and then the feature extraction matrix A is obtained through the LeakyReLU activation function;
[0028] S322. The feature extraction matrix A undergoes a combination of a convolution - Batch Normalization - LeakyReLU. Specifically, it is convolved with a 3×3 convolution kernel, the stride is set to 2, batch normalization BatchNormalization is used for each layer, and then the feature extraction matrix B is obtained through the LeakyReLU activation function;
[0029] S323. The feature extraction matrix B undergoes b times of convolution - ReLU. Specifically, it is convolved with a 3×3 convolution kernel, the stride is set to 2, and then the feature extraction matrix C` is obtained through the ReLU activation function as the downsampled matrix.
[0030] Further, in step S33, the upsampling layer performs t times of upsampling on the downsampled matrix to obtain the i-th type of electrical load dataset C i , specifically,
[0031] S331. The feature extraction matrix B obtained in step S322 is cropped into a matrix B` of the same size as the feature extraction matrix C` obtained in step S323, and after being concatenated with the feature extraction matrix C`, the feature matrix C is formed;
[0032] S332. The feature matrix C undergoes a combination of c transposed convolution - Batch Normalization - ReLU. Specifically, it is transposed convolved with a 3×3 convolution kernel, the stride is set to 2, batch normalization Batch Normalization is used for each layer, and then the feature matrix D` is obtained through the ReLU activation function;
[0033] S333. The feature extraction matrix A obtained in step S321 is cropped into a matrix A` of the same size as the feature matrix D`, and after being concatenated with the feature matrix D`, the prediction data matrix D is formed;
[0034] S334. The feature matrix D undergoes 1 deconvolution - Tanh activation. Specifically, it undergoes deconvolution with a 3×3 convolution kernel, with a stride of 2, and then passes through the Tanh activation function to obtain the predicted data matrix E.
[0035] S335. After t upsamplings via steps S331 - S334, the i-th type of electrical load dataset C of size 1445×M×1 is obtained. i 。
[0036] Furthermore, in step S4, the discriminant models in the improved CGAN's discriminant model group adopt a parallel structure, and each discriminant model uses a Markov discriminator. Specifically,
[0037] S41. The i-th type of electrical load data C output in step S3 i and the i-th type of electrical appliance power dataset in the classified electrical appliance real sample dataset S i are concatenated along the channel to form an operation data matrix as the input to the discriminant model group D i and enter step S42.
[0038] S42. Perform d convolutions - Batch Normalization - LeakyReLU combinations. Specifically, perform convolution with a 3×3 convolution kernel, with a stride of 2, use batch normalization Batch Normalization for each layer, and then pass through the LeakyReLU activation function to obtain the feature extraction matrix F.
[0039] S43. The feature extraction matrix F undergoes 1 convolution operation. Specifically, perform convolution with a 3×3 convolution kernel, with a stride of 2, and the output is an n×n matrix X. Each element X in the matrix X i,j represents the probability that the input operation data matrix is true or false.
[0040] Furthermore, in step S5, the improved CGAN's generator model group and discriminator model group are jointly trained to obtain the trained improved CGAN. Specifically,
[0041] S51. Train the discriminator model group of the improved CGAN, fixing the parameters of the generator model group Feed back the discriminant results of the discriminator model group to the discriminator model group, calculate the loss function of the discriminator model group Update the parameters of the discriminator model group
[0042] S52. Train the generator model group of the improved CGAN, fixing the parameters of the discriminator model group Feed back the discriminant results of the discriminator model group to the generator model group, calculate the loss function of the generator model group Update the parameters of the generator model group
[0043] S53. Perform maximum-minimum loss function optimization and calculate the combined loss function L GD , and alternately iterate between step S51 and step S52. Stop after reaching the set number of training times to obtain the trained improved CGAN; otherwise, return to step S51.
[0044] The beneficial effects of the present invention are as follows:
[0045] First, this non-intrusive short-term load forecasting method for multiple electrical appliances based on an improved CGAN can address the randomness, volatility, and uncertainty characteristics of electrical appliance loads under different conditions. By improving the CGAN network, a multi-network model architecture is established, a generation model group and a discriminant model group are constructed, and historical load data of multiple household electrical appliances are used for parallel training. The proposed multi-network model adopts a parallel structure, which can improve the correlation between input data and output data in the traditional CGAN network model, enabling the network model to better capture data mapping features, improve the accuracy of network model prediction, and increase the training speed of the network. At the same time, the trained network model can capture the energy consumption characteristics of multiple load data simultaneously, thus accurately and efficiently realizing the rapid prediction of multiple loads.
[0046] Second, in the present invention, by introducing a supervised training method and using historical load data of household electrical appliances instead of random noise as the initial sample input of the generation model group, the characteristic relationship between the generated load prediction results and load influencing factors can be effectively captured, and data mapping features can be better captured, solving the problem of weak correlation between the generated electrical appliance load prediction data and input data in the traditional CGAN network model.
[0047] Third, this non-intrusive short-term load forecasting method for multiple electrical appliances based on an improved CGAN can address the complexity of household electrical appliance load types. Through the parallel multi-network model group architecture, while improving the network training speed, it can also improve the real-time performance of multi-load model prediction, and ultimately achieve accurate and rapid prediction of multiple loads. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 is a flowchart of the non-intrusive short-term load forecasting method for multiple electrical appliances based on an improved CGAN according to an embodiment of the present invention;
[0049] Figure 2 is an explanatory diagram of the non-intrusive load identification model and the improved CGAN in the embodiment;
[0050] Figure 3 is an explanatory diagram of the generation model group and the discriminant model group of the improved CGAN in the embodiment;
[0051] Figure 4 It is a schematic illustration showing that the generative model of the generative model group in the embodiment adopts a U-Net fully convolutional neural network;
[0052] Figure 5 It is a schematic illustration showing that the discriminative model of the discriminative model group in the embodiment adopts a Markov discriminator;
[0053] Figure 6 It is a schematic illustration showing the discriminative model group for training the improved CGAN in the embodiment;
[0054] Figure 7 It is a schematic illustration showing the generative model group for training the improved CGAN in the embodiment;
[0055] Figure 8 It is a schematic illustration showing that the generative model group of the trained improved CGAN in the embodiment obtains load prediction data. Detailed implementation manners
[0056] The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0057] Embodiment
[0058] A non-intrusive short-term load prediction method for multiple electrical appliances based on an improved CGAN, as Figure 1 and Figure 2 , includes the following steps,
[0059] S1. Collect the historical load data sets of the energy consumption of the loads of k types of electrical appliances in N families for M days, and collect the external condition data sets affecting the historical loads of the electrical appliances. After preprocessing the collected historical load data sets and external condition data sets, use them as the training sample sets.
[0060] In step S1, the historical load data sets of the energy consumption of k types of electrical appliances such as air conditioners, refrigerators, microwave ovens, dishwashers, lamps, sockets, washing machines, etc., include collecting the voltage, current, and power at the household electricity meter entrance. M days can be taken: 7 days < M < 30 days; collect the external condition data sets affecting the historical loads of the electrical appliances, including collecting the climate type (sunny, cloudy, rainy), outdoor temperature, indoor temperature, indoor humidity, real-time electricity price, etc. The collection frequency of the historical load data sets and the external condition data sets can be 1 group per minute, and 60 groups are collected per hour.
[0061] In step S1, after preprocessing the collected historical load data sets and external condition data sets and using them as the training sample sets, specifically,
[0062] S11. Perform data cleaning on the collected historical load data sets and external condition data sets, including deleting outliers and filling in missing values;
[0063] S12. Normalize the historical load data set after data cleaning and the external condition data set as follows:
[0064]
[0065] Among them, x i is the data before normalization, and x' i is the data after normalization. i ∈ [1, 1445×M], and the 1445 data include 60 groups per hour, 24 hours a day of the load data set and 5 external condition factors;
[0066] S13. Use the historical load data set and the external condition data set after data cleaning and normalization as the training sample set.
[0067] S2. Input the training sample set obtained in step S1 into the non-intrusive load identification model to obtain the historical load data of k types of electrical appliances, which is used as the classified electrical appliance true sample data set S i , where i = 1, 2..., k, and k ≥ 2.
[0068] In step S2, the non-intrusive load identification model includes a preprocessing module, a feature extraction module, a feature fusion module, and a classifier identification module. Among them, the preprocessing module: for the collected historical load data set, obtain the V-I curve image and current envelope image of the load to be identified, and calculate the reactive current spectrum data, active power, and reactive power. The feature extraction module: used for feature extraction to obtain an image feature vector, an envelope feature vector, and a spectrum feature vector. The feature fusion module: fuse the image feature vector, envelope feature vector, spectrum feature vector, active power, and reactive power to obtain a fused feature vector; the classifier identification module is used to identify the type of the load to be identified by the classifier for the fused feature vector.
[0069] S3. Construct a group of improved CGAN generation models, such as Figure 3 The group of generation models includes k groups of generation models G i corresponding to k types of electrical appliances, where i = 1, 2..., k. Concatenate the power of the i-th type of electrical appliance in the classified electrical appliance true sample data set S i obtained in step S2 and the external condition data set collected in step S1 into a matrix and input it into the group of generation models. The output data of the group of generation models is the load data set C i generated by the i-th generation model G i , where i = 1, 2..., k.
[0070] In step S3, the generative models in the improved generative model group of CGAN adopt a parallel structure. Each generative model uses a U-Net fully convolutional neural network, which includes a downsampling layer and an upsampling layer and is implemented through convolution and transposed convolution operations. For example, Figure 4 , specifically,
[0071] S31. Concatenate the power and external condition datasets of the i-th type of electrical appliance in the collected real sample dataset S of N household classified electrical appliances i as the input of the downsampling layer to form an operation data matrix;
[0072] In step S31, downsample the power of the i-th type of electrical appliance in the collected real sample dataset S of N household classified electrical appliances i at equal intervals. The downsampling ratio can be 1 / 60 to obtain the dataset P i =[p1, p2,... p M 24×M and the external condition dataset and concatenate them into a matrix with a specification of 29×M×1 as the input of the downsampling layer.
[0073] S32. The downsampling layer performs t times of downsampling on the operation data matrix to obtain the downsampled matrix.
[0074] S321. The operation data matrix undergoes 1 convolution-LeakyReLU combination. Specifically, it is convolved with a 3×3 convolution kernel, the stride is set to 2, and then the feature extraction matrix A is obtained through the LeakyReLU activation function;
[0075] S322. The feature extraction matrix A undergoes a convolution-Batch Normalization-LeakyReLU combination a times. Specifically, it is convolved with a 3×3 convolution kernel, the stride is set to 2, batch normalization BatchNormalization is used for each layer, and then the feature extraction matrix B is obtained through the LeakyReLU activation function;
[0076] S323. The feature extraction matrix B undergoes b times of convolution-ReLU. Specifically, it is convolved with a 3×3 convolution kernel, the stride is set to 2, and then the feature extraction matrix C` is obtained through the ReLU activation function as the downsampled matrix.
[0077] S33. The upsampling layer performs t times of upsampling on the downsampled matrix to obtain the load dataset C of the i-th type of electrical appliance i ; For example, Figure 4 :
[0078] S331. Crop the feature extraction matrix B obtained in step S322 into a matrix B' of the same size as the feature extraction matrix C' obtained in step S323, and splice it with the feature extraction matrix C' to form a feature matrix C;
[0079] S332. The feature matrix C undergoes c times of deconvolution - Batch Normalization - ReLU combination. Specifically, it undergoes deconvolution with a 3×3 convolutional kernel, with a stride of 2. Batch Normalization is used for each layer, and then the feature matrix D' is obtained through the ReLU activation function;
[0080] S333. Crop the feature extraction matrix A obtained in step S321 into a matrix A' of the same size as the feature matrix D', and splice it with the feature matrix D' to form a prediction data matrix D;
[0081] S334. The feature matrix D undergoes 1 time of deconvolution - Tanh activation. Specifically, it undergoes deconvolution with a 3×3 convolutional kernel, with a stride of 2, and then the prediction data matrix E is obtained through the Tanh activation function;
[0082] S335. After t times of upsampling via steps S331 - S334, the i-th type of electrical appliance load dataset C of 1445×M×1 is obtained i .
[0083] In step S33, the U-Net fully convolutional neural network has a skip connection structure. During the upsampling process, after the network completes the first deconvolution, in subsequent deconvolution operations, the feature matrices obtained by deconvolution in sequence will be spliced with the feature extraction matrices in the corresponding steps of downsampling. At this time, the feature extraction matrices of downsampling need to be cropped into the same size as the feature matrices obtained by deconvolution for splicing.
[0084] S4. Construct an improved discriminant model group of CGAN, such as Figure 3 , the discriminant model group includes k groups of discriminant models D corresponding to k types of electrical appliances i , where i = 1, 2..., k. After splicing the i-th type of electrical appliance load dataset C output in step S3 i and the i-th type of electrical appliance power dataset in the classified electrical appliance real sample dataset S obtained in step S2 i into a matrix, input it into the discriminant model group, and the discriminant model group outputs a discriminant result for characterizing whether the discriminatively generated i-th type of electrical appliance load data C i is real data. In step S4, the discriminant model group D i outputs the result {0, 1} of a binary classifier, which is used to characterize whether the discriminatively generated i-th type of electrical appliance load data C i is real data. The discriminant model group Di An output of 1 indicates that the generated electrical load data C of the i-th category i is real; the discriminant model group D i An output of 0 indicates that the generated electrical load data C of the i-th category i is not real.
[0085] In step S4, the discriminant model of the improved CGAN's discriminant model group adopts a parallel structure, and each discriminant model uses a Markov discriminator, such as Figure 5 Specifically,
[0086] S41. Concatenate the electrical load data C of the i-th category output in step S3 i and the classified electrical appliance real sample data set S i The electrical power data set of the i-th category of electrical appliances is concatenated into an operation data matrix with a specification of 1445×M×2 as the input of the discriminant model group D i ;
[0087] S42. Perform d times of convolution - Batch Normalization - LeakyReLU combination. Specifically, perform convolution with a 3×3 convolution kernel, set the stride to 2, use batch normalization for each layer, and then obtain the feature extraction matrix F through the LeakyReLU activation function;
[0088] S43. Perform 1 convolution operation. Specifically, perform convolution with a 3×3 convolution kernel, set the stride to 2, and the output is an n×n matrix X. Each element X in the matrix X i,j represents the probability that the input operation data matrix is real or false.
[0089] S5. Jointly train the improved CGAN's generator model group and discriminant model group to obtain the trained improved CGAN;
[0090] S51. Train the discriminant model group of the improved CGAN, fix the parameters of the generator model group Feed back the discriminant results of the discriminant model group to the discriminant model group, calculate the loss function of the discriminant model group Update the parameters of the discriminant model group such as Figure 6 .
[0091] In step S51, calculate the loss function of the discriminant model group Specifically,
[0092]
[0093] Among them, represents the classified electrical appliance real sample data set S i and the external condition data set Y iExpected value of the joint distribution Denote the power P of the i-th type of electrical appliance i And the external condition data set Y i Expected value of the joint distribution, G(·) is the generative model G i The load data C of the i-th type of electrical appliance generated during training i , D(·) is the discriminative model D i The result of determining whether the load data C of the i-th type of electrical appliance obtained during training i Is real data
[0094] S52. Train the generative model group of the improved CGAN, fixing the parameters of the discriminative model group Feed the discrimination result of the discriminative model group back to the generative model group, and calculate the loss function of the generative model group Update the parameters of the generative model group Such as Figure 7 .
[0095] In step S52, calculate the loss function of the generative model group Specifically
[0096]
[0097] Among them Denote finding the power P of the i-th type of electrical appliance i And the external condition data set Y i Expected value of the joint distribution, G(·) is the generative model G i The load data C of the i-th type of electrical appliance generated during training i , D(·) is the discriminative model D i The result of determining whether the load data C of the i-th type of electrical appliance obtained during training i Is real data
[0098] S53. Alternately iterate steps S51 and S52 to perform max-min loss function optimization, and stop after reaching the set number of training times to obtain the trained improved CGAN
[0099] In step S53, perform max-min loss function optimization and calculate the joint loss function L GD Is
[0100]
[0101] Among them Denote the expected value of the joint distribution of the real sample data set of classified electrical appliances and the external condition data set Y i Expected value of the joint distribution Denote the power P of the i-th type of electrical appliance i And the external condition data set Y iThe expected value of the joint distribution, where \(G(\cdot)\) is the generative model \(G\). i The electrical appliance load data \(C\) of the \(i\)-th category generated during training i , where \(D(\cdot)\) is the discriminative model \(D\). i The result of determining whether the electrical appliance load data \(C\) of the \(i\)-th category is real data during training i .
[0102] In step S5, joint training of the generative model group and the discriminative model group of the improved CGAN is performed. The discriminative results of the discriminative model group \(D\) i are fed back to the generative model group \(G\) i and the discriminative model group \(D\) i , the loss function is calculated and its training parameters are updated to perform max-min loss function optimization. Stop after reaching the set number of training times to obtain the trained improved CGAN.
[0103] S6. Input the real-time load data set and the external condition prediction data set collected at the current moment into the trained improved CGAN. The \(k\) groups of generative model groups of the trained improved CGAN output the single-day load prediction data set \(C'\) of the corresponding electrical appliances i , such as Figure 8 .
[0104] In step S6, the real-time load data set collected at the current moment contains the real-time data of \(k'\) types of electrical appliances. The \(k\) groups of generative model groups of the trained improved CGAN output the single-day load prediction data set \(C'\) of \(k'\) electrical appliances i , where \(k'\leq k\).
[0105] This non-intrusive short-term load prediction method for multiple electrical appliances based on the improved CGAN can, in view of the randomness, volatility, and uncertainty characteristics of electrical appliance loads under different conditions, establish a multi-network model architecture by improving the CGAN network, construct a generative model group and a discriminative model group. The proposed multi-network model adopts a parallel structure and uses the historical load data of multiple household electrical appliances for parallel training, which can not only improve the training speed of the network, but also enable the trained network model to capture the energy consumption characteristics of multiple load data simultaneously, and can accurately and efficiently achieve the rapid prediction of multiple loads.
[0106] In the present invention, by introducing a supervised training method and using the historical load data of household electrical appliances instead of random noise as the initial sample input of the generative model group, the characteristic relationship between the generated load prediction results and the load influencing factors can be effectively captured, the data mapping characteristics can be better captured, and the problem of weak correlation between the generated electrical appliance load prediction data and the input data in the traditional CGAN network model is solved.
[0107] The short-term load forecasting method for multiple non-intrusive electrical appliances based on improved CGAN can, in view of the complex types of household electrical appliance loads, through the parallel multi-network model group architecture, improve the network training speed, enhance the real-time performance of the multi-load model prediction, and ultimately achieve accurate and rapid prediction of multiple loads.
[0108] The short-term load forecasting method for multiple non-intrusive electrical appliances based on improved CGAN relies on non-intrusive load monitoring technology and combines the effectiveness of CGAN in load time series prediction, can accurately achieve the rapid prediction of multiple load models, and efficiently achieve the short-term prediction of multiple household electrical loads with high precision.
[0109] The above is only the preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. Any equivalent modification or change made by those of ordinary skill in the art according to the disclosure of the present invention shall be included in the protection scope recorded in the claims.
Claims
1. A short-term load forecasting method for multiple electrical appliances based on improved CGAN, characterized in that: It includes the following steps: S1. Collect the historical load data sets of the energy consumption of k types of electrical appliances in N families for M days, and collect the external condition data sets that affect the historical loads of the electrical appliances. After preprocessing the collected historical load data sets and external condition data sets, use them as the training sample sets. S2. Input the training sample set obtained in step S1 into the non-intrusive load identification model to obtain the historical load data of k types of electrical appliances, which serves as the classified electrical appliance true sample data set S i , where i = 1, 2..., k, and k ≥ 2; S3. Construct a group of generation models for improving the CGAN. The group of generation models includes k groups of generation models G corresponding to k types of electrical appliances i , where i = 1, 2..., k. Concatenate the power of the i-th type of electrical appliance in the classified electrical appliance real sample data set S i obtained in step S2 and the external condition data set collected in step S1 into a matrix and input it into the group of generation models. The output data of the group of generation models is the load data set C i of the i-th type of electrical appliance generated by each generation model G i , where i = 1, 2..., k; In step S3, the generative models in the improved generative model group of the CGAN adopt a parallel structure. Each generative model uses a U-Net fully convolutional neural network. The U-Net fully convolutional neural network includes a downsampling layer and an upsampling layer, which are implemented through convolution and transposed convolution operations. Specifically, S31. Classify the collected real sample dataset S of N household classification appliances i , where i = 1, 2..., k, splice the power and external condition datasets of the i-th type of appliance in it into an operation data matrix as the input of the downsampling layer; S32. The downsampling layer performs t times of downsampling on the operation data matrix to obtain the downsampled matrix. S33. The upsampling layer performs t times of upsampling on the downsampled matrix to obtain the electrical load dataset C of the i-th category i ; S4. Construct a discriminant model group for improving the CGAN. The discriminant model group includes k groups of discriminant models D corresponding to k types of electrical appliances i , where i = 1, 2,..., k. Concatenate the i-th type of electrical appliance load data set C output in step S3 i and the i-th type of electrical appliance power data set in the classified electrical appliance real sample data set S obtained in step S2 i into a matrix and input it into the discriminant model group. The discriminant model group outputs a discriminant result indicating whether the discriminatively generated i-th type of electrical appliance load data C i is real data; In step S4, the discriminative models in the improved discriminative model group of the CGAN adopt a parallel structure. Each discriminative model uses a Markov discriminator. Specifically, S41. Concatenate the i-th type of electrical load data C output in step S3 i and the i-th type of electrical appliance power data set in the classified electrical appliance true sample data set S i into an operation data matrix by channel as the input of the discrimination model group D i and enter step S42; S42. Perform d times of convolution - BatchNormalization - LeakyReLU combinations. Specifically, perform convolution with a 3×3 convolution kernel, set the stride to 2, use batch normalization Batch Normalization for each layer, and then obtain the feature extraction matrix F through the LeakyReLU activation function. S43. The feature extraction matrix F performs one convolution operation. Specifically, it is convolved with a 3×3 convolution kernel, the stride is set to 2, and the output is an n×n matrix X. Each element X in the matrix X i,j represents the probability that the input operation data matrix is true or false; S5. Jointly train the improved generative model group and discriminative model group of the CGAN to obtain the trained improved CGAN. S6. Input the real-time load data set and the external condition prediction data set collected at the current moment into the trained improved CGAN, and output the single-day load prediction data set C of the corresponding electrical appliance by the k groups of generation model groups of the trained improved CGAN i '.
2. The short-term load forecasting method for multiple non-intrusive electrical appliances based on improved CGAN according to claim 1, wherein: In step S1, after preprocessing the collected historical load data sets and external condition data sets, use them as the training sample sets. Specifically, S11. Perform data cleaning on the collected historical load data sets and external condition data sets, including deleting outliers and filling in missing values. S12. Normalize the historical load data sets and external condition data sets after data cleaning. S13. Use the historical load data sets and external condition data sets after data cleaning and normalization as the training sample sets.
3. The short-term load forecasting method for multiple electrical appliances based on the improved CGAN according to claim 1, wherein: In step S32, the downsampling layer performs t times of downsampling on the operation data matrix to obtain the downsampled matrix. Specifically, S321. The operation data matrix undergoes 1 time of convolution - LeakyReLU combination. Specifically, perform convolution with a 3×3 convolution kernel, set the stride to 2, and then obtain the feature extraction matrix A through the LeakyReLU activation function. S322. The feature extraction matrix A undergoes a times of convolution - BatchNormalization - LeakyReLU combinations. Specifically, perform convolution with a 3×3 convolution kernel, set the stride to 2, use batch normalization BatchNormalization for each layer, and then obtain the feature extraction matrix B through the LeakyReLU activation function. S323. The feature extraction matrix B undergoes b times of convolution - ReLU. Specifically, perform convolution with a 3×3 convolution kernel, set the stride to 2, and then obtain the feature extraction matrix C as the downsampled matrix through the ReLU activation function.
4. The short-term load forecasting method for multiple electrical appliances based on the improved CGAN according to claim 3, characterized in that: In step S33, the upsampling layer performs t times of upsampling on the downsampled matrix to obtain the electrical load dataset C of the i-th category i , specifically S331. Crop the feature extraction matrix B obtained in step S322 into a matrix B' of the same size as the feature extraction matrix C' obtained in step S323, and splice it with the feature extraction matrix C' to form a feature matrix C; S332. The feature matrix C goes through c times of deconvolution - BatchNormalization - ReLU combination. Specifically, perform deconvolution with a 3×3 convolution kernel, set the stride to 2, use batch normalization BatchNormalization for each layer, and then obtain the feature matrix D' through the ReLU activation function; S333. Crop the feature extraction matrix A obtained in step S321 into a matrix A' of the same size as the feature matrix D', and splice it with the feature matrix D' to form a prediction data matrix D; S334. The feature matrix D goes through 1 time of deconvolution - Tanh activation. Specifically, perform deconvolution with a 3×3 convolution kernel, set the stride to 2, and then obtain the prediction data matrix E through the Tanh activation function; S335. After t times of upsampling through steps S331 - S334, the i-th type of electrical load dataset C of 1445×M×1 is obtained. i .
5. The short-term load forecasting method for multiple electrical appliances based on the improved CGAN according to any one of claims 1-4, characterized in that: In step S5, jointly train the generation model group and the discriminant model group of the improved CGAN to obtain the trained improved CGAN. Specifically, S51. Train the discriminant model group of the improved CGAN and fix the parameters of the generator model group Feed the discrimination results of the discriminant model group back to the discriminant model group and calculate the loss function of the discriminant model group Update the parameters of the discriminant model group S52. Train the generation model group of the improved CGAN and fix the parameters of the discriminant model group Feed the discrimination results of the discriminant model group back to the generation model group and calculate the loss function of the generation model group Update the parameters of the generation model group S53. Perform maximum-minimum loss function optimization and calculate the joint loss function L GD Alternately iterate between step S51 and step S52, stop after reaching the set number of training times, and obtain the trained improved CGAN; otherwise, return to step S51.
Citation Information
Patent Citations
Generative confrontation Transform-based power load data anomaly detection method
CN116738204A