A credible simulation method for distribution network production and operation scenarios based on adversarial game
Through the adversarial game-generating adversarial network, the shortcomings of traditional statistical models in distribution network scenario simulation are solved, and the accurate simulation of distributed power supplies and loads is achieved to ensure the stable operation and economic scheduling of the distribution network.
Patent Information
- Application Number
- CN202011148752.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-23
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2040-10-23
AI Technical Summary
Traditional statistical models are difficult to accurately simulate the complex spatiotemporal distribution characteristics of distributed power supplies and loads in the distribution network, affecting the stable operation and economic scheduling of the distribution network.
A generative adversarial network based on adversarial game is adopted, through the extremely small and huge game between generators and discriminators, a distribution network power supply and load scenario that conforms to data distribution is generated. Multiple generators are used to learn different modes, and a trusted scenario simulation method is constructed in combination with gradient descent algorithms and optimization goals.
Effectively capture the complex spatiotemporal distribution characteristics of distributed power supplies and loads, generate trustworthy distribution network scenarios, avoid the cumbersome and complexity of traditional models, and improve the accuracy and credibility of scene simulation.
Smart Images

Figure CN114492149B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electrical engineering, and in particular to a credible simulation method for a distribution network production and operation scenario based on adversarial game. Background Art
[0002] With the comprehensive advancement of the national energy transformation revolution, renewable energy represented by wind power and photovoltaics has developed rapidly, and the penetration rate of renewable energy in the power system has continued to increase. Due to the intermittent and random nature of renewable energy, when it is connected on a large scale as a distributed power source, the volatility of power supply and load increases, which seriously affects the stable operation of the distribution network. Therefore, it is urgent to simulate and obtain reliable distribution network distributed power supply and load operation scenarios at this stage to ensure the stable operation and economic dispatch of the distribution network.
[0003] Traditional scenario simulation usually adopts the statistical modeling method, that is, the uncertainty of power supply or load is assumed as a statistical model, and then the model parameters are solved through historical data, and the specific simulation scenario is obtained by combining the sampling method. At present, the scenario simulation methods based on statistical models mainly include Markov chain method, time series method, etc. However, traditional statistical models have shortcomings in scenario simulation: first, it is difficult to find a model that is universal and easy to obtain parameters; second, it is difficult to establish a comprehensive and accurate model to describe the complex spatiotemporal distribution characteristics of distributed power supply and load. Summary of the invention
[0004] In view of the above technical problems, the purpose of the present invention is to provide a method for simulating the operation scenarios of distributed power sources and loads in a distribution network more accurately, so as to ensure the stable operation and economical dispatch of the distribution network.
[0005] The technical solution includes:
[0006] S1. Process the collected data to obtain sample category labels;
[0007] S2. Build the generator framework and the discriminator framework;
[0008] S3, the generator generates pseudo data;
[0009] S4, the discriminator determines the authenticity of the data produced by S3 and identifies the generator;
[0010] S5. Train the generative adversarial network.
[0011] S6, determining the scene simulation interval, and using a binary mask matrix to cover the to-be-simulated portion of the actual test data;
[0012] For multiple generators, we construct optimization objectives based on context constraints, authenticity constraints, and point prediction interval constraints, and update the noise vectors using the gradient descent algorithm.
[0013] S7. Repeat step S6 until the noise vector that minimizes the cost function corresponding to each generator is found, and input it into the generator to obtain a reliable distributed power source and load scenario for the distribution network.
[0014] Preferably, S1 obtains sample category labels, specifically, collects distributed power sources and load data such as distribution networks and wind power, uses K-means clustering algorithm, clusters all samples based on Euclidean distance, and obtains the category label corresponding to each sample.
[0015] Preferably, S2 builds a generator framework and a discriminator framework, specifically, the generation network includes a fully connected layer and three 2D-CNN layers, a batch normalization layer is introduced after each layer except the output layer, the activation function uses LeakyReLU, and all generators use the same structural parameters to share information;
[0016] The discriminant network consists of three 2D-CNN layers and one fully connected layer. A batch normalization layer is introduced after each layer except the output layer. The middle layer uses the LeakyReLU activation function, and the output layer uses a fully connected layer to reduce the output dimension to (1, k+1).
[0017] Preferably, the S3 generator generates pseudo data, specifically, using multiple generators to capture the spatiotemporal distribution characteristics of the data, all generators use the same structural parameters to share information; the noise vector and the randomly generated category label are horizontally spliced, input to the generator, and output as a generated sample.
[0018] Preferably, the S4 discriminator determines the authenticity of the data produced by S2 and identifies the generator. Specifically, the generated samples and real data in S3 are horizontally spliced with the corresponding category labels and input into the discriminator D, and k+1 softmax scores are output, indicating the probability that the input sample comes from one of the k generators or from the real distribution.
[0019] Preferably, the S5 trains a generative adversarial network, specifically, horizontally splicing the noise vector and the randomly generated category label and inputting them into the generator G i , the output is the generated sample;
[0020] The generated samples and real data are horizontally spliced with the corresponding category labels and then input into the discriminator D, which outputs k+1 softmax scores;
[0021] Feed the judgment value output by the discriminator back to the generator and the discriminator, construct their respective loss functions, use the gradient descent algorithm to update the network weight parameters, and repeat steps S3-S5 until the model reaches Nash equilibrium and the generator captures the potential distribution characteristics of the data, extracting a well-trained generator Gi Specifically, G and D are trained by an alternating iterative method of training the discriminator 5 times and the generator once, during which all generators are updated in parallel; during training, the optimizer selects RMSprop and the learning rate is set to 0.0001.
[0022] Preferably, the output of the discriminator represents the probability that its input sample comes from generated data or from real data in a specific implementation manner:
[0023] Based on the goal of the generator to identify and determine the authenticity, the discriminator outputs k+1 softmax scores in the following form:
[0024]
[0025] The above formula represents the probability that the input sample comes from one of the k generators or from the true distribution, where the i-th index (i∈{1,...,k}) represents the probability that the sample is generated by the i-th generator, and the k+1-th index represents the probability that the sample belongs to the true data distribution.
[0026] Preferably, in order to deceive the discriminator and make it think that the generated samples belong to real data, let the i-th generator G i The loss function is:
[0027]
[0028] In the above formula, E(·) represents the expected value; G i (·) represents the sample generated by the i-th generator; D k+1 (·) represents the k+1th index result output by the discriminator, which indicates the probability that the discriminator determines that the sample belongs to the real data distribution; z represents the input noise; c represents the sample category label;
[0029] Generator G i The training goal is to make the above loss function Minimum, that is, let the discriminator judge the probability of pseudo samples as real data as large as possible.
[0030] Preferably, the discriminator determines whether the sample generated by the generator is true or false, and identifies the generator that generates a given fake sample. The loss function of the discriminator is as follows:
[0031]
[0032] In the above formula, E(·) represents the expected value; G i (·) represents the sample generated by the i-th generator; D i (·) represents the i-th index result output by the discriminator, which indicates the probability that the discriminator determines that the sample is generated by the i-th generator; Dk+1 (·) represents the k+1th index result output by the discriminator, which indicates the probability that the discriminator determines that the sample belongs to the real data distribution; x represents the real sample;
[0033] The training goal of the discriminator D is to make the above loss function L D Minimum, that is, the probability of judging the true source of the pseudo data and real data generated by the generator is the largest. In other words, the probability of judging the pseudo sample generated by the i-th generator as being generated by the i-th generator is as large as possible, and the probability of judging the real sample as real data is as large as possible.
[0034] Preferably, S6 and S7 are specifically to cover the to-be-simulated part of the actual measured sample in the test set with a binary mask matrix M, and then construct a context constraint, that is, the similarity between the simulated scene and the actual measured data is maximized:
[0035] L c (z)=||G i (z|c)×Mx×M||2;
[0036] The authenticity constraint means that the simulated wind power scenario should conform to the actual situation. Since the discriminator can determine whether the input is real data after training, the output of the discriminator is used to construct the authenticity loss:
[0037] L r (z)=-D k+1 (G i (z|c)|c);
[0038] In order to further improve the credibility of scenario simulation, the point prediction interval constraints are constructed using the current prediction data so that the simulated distribution network scenario is within the point prediction interval to conform to the actual situation:
[0039]
[0040] In the formula, x pred Represents the current prediction sample, and the leftmost and rightmost parts of the inequality represent the upper and lower bounds of the point prediction interval respectively; since the context loss, authenticity loss and this constraint are all non-convex, in order to handle the inequality constraint, the above inequality is written as a loss function as follows:
[0041]
[0042] Taking into account the above three types of loss functions, the total cost function of the scene simulation is constructed as follows:
[0043] L complete (z) = L c (z)+βL r (z)+γL p (z);
[0044] For each generator, a noise vector is randomly input, the gradient of the total cost function to the noise vector is calculated, and then the Adam optimization algorithm is used to update the noise vector until the noise vector that minimizes the corresponding cost function is found and input to the generator G. i , that is, a credible operation scenario of the distribution network is obtained.
[0045] The technical solution provided by the embodiment of the present invention has the following beneficial effects:
[0046] (1) The present invention adopts deep learning technology, which is completely data-driven and can capture the complex spatiotemporal distribution characteristics of distributed power sources and loads such as wind power without any explicit modeling, and can effectively avoid the cumbersome and complex traditional statistical model to solve model parameters;
[0047] (2) The uncertainty of the fluctuation of distributed power sources and loads in the distribution network includes complex time-space and meteorological correlations, and there are certain unknown correlations. Therefore, it is difficult for traditional statistical models to make a more comprehensive modeling of the uncertainty of distributed power sources, and the quality of modeling directly affects the performance of scene simulation. The scene trust simulation method based on adversarial game in the present invention can effectively solve the above problems. Through the minimax game between the generator and the discriminator, the generator can learn the complex potential characteristics of historical data and generate new samples that conform to the data distribution to simulate the power and load scenes of the distribution network.
[0048] (3) The present invention adopts an improved generative adversarial network containing multiple generators and one discriminator to solve the pattern collapse problem during the training of the original generative adversarial network. Multiple generators are used to learn different patterns to ensure the diversity of generated samples. The discriminator can not only determine the authenticity, but also identify the generator that generates a given pseudo sample. In this way, the complexity of the network adversary is increased while the performance of the generator and the discriminator is also improved, so that a more reliable distribution network distributed power supply and load scenario can be obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 Schematic diagram of the improved generative adversarial network structure containing multiple generators and one discriminator according to an embodiment of the present invention.
[0050] Figure 2 This is a structural diagram of a generator according to an embodiment of the present invention.
[0051] Figure 3 4 is a structural diagram of a discriminator according to an embodiment of the present invention.
[0052] Figure 4 A framework is generated for the distributed power source and load scenario of the distribution network of the embodiment of the present invention.
[0053] Figure 5This is the first curve for simulating wind power scenarios in the distribution network according to an embodiment of the present invention.
[0054] Figure 6 This is the second curve for simulating wind power scenarios in the distribution network according to an embodiment of the present invention.
[0055] Figure 7 This is the third curve for simulating wind power scenarios in the distribution network according to an embodiment of the present invention. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described here are only used to explain the present invention and are not used to limit the present invention.
[0057] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0058] Example 1
[0059] The present invention provides a credible simulation method for distribution network production and operation scenarios based on adversarial game, comprising:
[0060] S1. Process the collected data to obtain sample category labels; collect distributed power sources and load data such as distribution networks and wind power, use the K-means clustering algorithm, cluster all samples based on the Euclidean distance, and obtain the category label corresponding to each sample.
[0061] S2. Build the generator framework and the discriminator framework. The generated network includes a fully connected layer and three 2D-CNN layers. A batch normalization layer is introduced after each layer except the output layer. The activation function uses LeakyReLU. All generators use the same structural parameters to share information.
[0062] The discriminant network consists of three 2D-CNN layers and one fully connected layer. A batch normalization layer is introduced after each layer except the output layer. The middle layer uses the LeakyReLU activation function, and the output layer uses a fully connected layer to reduce the output dimension to (1, k+1).
[0063] S3, the generator generates pseudo data;
[0064] S4, the discriminator determines the authenticity of the data produced by S3 and identifies the generator;
[0065] S5. Train the generative adversarial network.
[0066] S6, determining the scene simulation interval, and using a binary mask matrix to cover the to-be-simulated portion of the actual test data;
[0067] For multiple generators, we construct optimization objectives based on context constraints, authenticity constraints, and point prediction interval constraints, and update the noise vectors using the gradient descent algorithm.
[0068] S7. Repeat step S6 until the noise vector that minimizes the cost function corresponding to each generator is found, and input it into the generator to obtain a reliable distributed power source and load scenario for the distribution network.
[0069] Example 2
[0070] The present invention provides a credible simulation method for distribution network production and operation scenarios based on adversarial game, comprising:
[0071] S1. Process the collected data to obtain sample category labels; collect distributed power sources and load data such as distribution networks and wind power, use the K-means clustering algorithm, cluster all samples based on the Euclidean distance, and obtain the category label corresponding to each sample.
[0072] S2. Build the generator framework and the discriminator framework. The generated network includes a fully connected layer and three 2D-CNN layers. A batch normalization layer is introduced after each layer except the output layer. The activation function uses LeakyReLU. All generators use the same structural parameters to share information.
[0073] The discriminant network consists of three 2D-CNN layers and one fully connected layer. A batch normalization layer is introduced after each layer except the output layer. The middle layer uses the LeakyReLU activation function, and the output layer uses a fully connected layer to reduce the output dimension to (1, k+1).
[0074] S3, the generator generates pseudo data; multiple generators are used to capture the spatiotemporal distribution characteristics of the data, and all generators use the same structural parameters to share information; the noise vector and the randomly generated category label are horizontally spliced and input into the generator, and the output is the generated sample.
[0075] S4, the discriminator determines the authenticity of the data produced by S3 and identifies the generator; the generated samples and real data in S3 are horizontally spliced with the corresponding category labels and input into the discriminator D, and k+1 softmax scores are output, indicating the probability that its input sample comes from one of the k generators or from the real distribution.
[0076] S5. Train the generative adversarial network.
[0077] The noise vector and the randomly generated category label are horizontally spliced and input into the generator G i , the output is the generated sample;
[0078] The generated samples and real data are horizontally spliced with the corresponding category labels and then input into the discriminator D, which outputs k+1 softmax scores;
[0079] Feed the judgment value output by the discriminator back to the generator and discriminator, construct their respective loss functions, use the gradient descent algorithm to update the network weight parameters, and repeat steps S3-S5 until the model reaches Nash equilibrium and the generator captures the potential distribution characteristics of the data, extracting a well-trained generator G i Specifically, G and D are trained by an alternating iterative method of training the discriminator 5 times and the generator once, during which all generators are updated in parallel; during training, the optimizer selects RMSprop and the learning rate is set to 0.0001.
[0080] The output of the discriminator indicates the probability that its input sample comes from generated data or from real data. The specific implementation method is:
[0081] Based on the goal of the generator to identify and determine the authenticity, the discriminator outputs k+1 softmax scores in the following form:
[0082]
[0083] The above formula represents the probability that the input sample comes from one of the k generators or from the true distribution, where the i-th index (i∈{1,...,k}) represents the probability that the sample is generated by the i-th generator, and the k+1-th index represents the probability that the sample belongs to the true data distribution.
[0084] In order to deceive the discriminator and make it think that the generated samples belong to real data, let the i-th generator G i The loss function is:
[0085]
[0086] In the above formula, E(·) represents the expected value; G i (·) represents the sample generated by the i-th generator; D k+1 (·) represents the k+1th index result output by the discriminator, which indicates the probability that the discriminator determines that the sample belongs to the real data distribution; z represents the input noise; c represents the sample category label;
[0087] Generator G i The training goal is to make the above loss function Minimum, that is, let the discriminator judge the probability of pseudo samples as real data as large as possible.
[0088] The discriminator determines whether the samples generated by the generator are true or false, and identifies the generator that generates a given fake sample. The loss function of the discriminator is as follows:
[0089]
[0090] In the above formula, E(·) represents the expected value; G i (·) represents the sample generated by the i-th generator; D i (·) represents the i-th index result output by the discriminator, which indicates the probability that the discriminator determines that the sample is generated by the i-th generator; D k+1 (·) represents the k+1th index result output by the discriminator, which indicates the probability that the discriminator determines that the sample belongs to the real data distribution; x represents the real sample;
[0091] The training goal of the discriminator D is to make the above loss function L D Minimum, that is, the probability of judging the true source of the pseudo data and real data generated by the generator is the largest. In other words, the probability of judging the pseudo sample generated by the i-th generator as being generated by the i-th generator is as large as possible, and the probability of judging the real sample as real data is as large as possible.
[0092] S6, determining the scene simulation interval, and using a binary mask matrix to cover the to-be-simulated portion of the actual test data;
[0093] For multiple generators, we construct optimization objectives based on context constraints, authenticity constraints, and point prediction interval constraints, and update the noise vectors using the gradient descent algorithm.
[0094] S7. Repeat step S6 until the noise vector that minimizes the cost function corresponding to each generator is found, and input it into the generator to obtain a reliable distributed power source and load scenario for the distribution network.
[0095] S6 and S7 are as follows: use the binary mask matrix M to cover the part of the actual measured sample in the test set to be simulated, and then construct the context constraint, that is, the similarity between the simulated scene and the actual measured data is maximized:
[0096] L c (z)=||G i (z|c)×Mx×M||2;
[0097] The authenticity constraint means that the simulated wind power scenario should conform to the actual situation. Since the discriminator can determine whether the input is real data after training, the output of the discriminator is used to construct the authenticity loss:
[0098] L r (z)=-D k+1 (G i (z|c)|c);
[0099] In order to further improve the credibility of scenario simulation, the point prediction interval constraints are constructed using the current prediction data so that the simulated distribution network scenario is within the point prediction interval to conform to the actual situation:
[0100]
[0101] In the formula, x pred Represents the current prediction sample, and the leftmost and rightmost parts of the inequality represent the upper and lower bounds of the point prediction interval respectively; since the context loss, authenticity loss and this constraint are all non-convex, in order to handle the inequality constraint, the above inequality is written as a loss function as follows:
[0102]
[0103] Taking into account the above three types of loss functions, the total cost function of the scene simulation is constructed as follows:
[0104] L complete (z) = L c (z)+βL r (z)+γL p (z);
[0105] For each generator, a noise vector is randomly input, the gradient of the total cost function to the noise vector is calculated, and then the Adam optimization algorithm is used to update the noise vector until the noise vector that minimizes the corresponding cost function is found and input to the generator G. i , that is, a credible operation scenario of the distribution network is obtained.
[0106] Example 3
[0107] Figure 1 The schematic diagram of the improved generative adversarial network of the present invention containing multiple generators and a discriminator. The main idea of the adversarial game model is that the generator and the discriminator compete with each other. The generator tries to generate samples consistent with the real data distribution, and the discriminator tries to identify the authenticity of the data and the generator that generates the given pseudo sample. The two make progress together in the mutual competition, and all generators can be updated in parallel. Taking the simulation of wind power scene as an example, the distribution network power supply and load scene simulation method includes the following steps:
[0108] (1) Constructing a wind power data set: The historical power generation data and current forecast data of 10 adjacent wind turbines in a certain area for the past 6 years are summarized. The sampling interval of actual power measurement is 5 minutes. 288 continuous power measurement data per day are used as a daily sample, and then the training set and test set are divided into a ratio of 9:1. Similarly, the current forecast data are also constructed as daily samples. All actual power measurement and forecast data are normalized to [0, 1].
[0109] (2) Obtaining sample category labels: Using the K-means clustering algorithm, all actual measured samples are clustered based on the Euclidean distance to obtain the category label corresponding to each sample;
[0110] (3) Build the generator framework
[0111] The generator structure in this example is as follows Figure 2 As shown in the figure, the generated network includes a fully connected layer and three 2D-CNN layers. A batch normalization layer is introduced after each layer except the output layer. The activation function uses LeakyReLU, and all generators use the same structural parameters to share information.
[0112] (4) Build the discriminator framework
[0113] The discriminator structure in this example is as follows Figure 3 As shown in the figure, the discriminant network includes three 2D-CNN layers and one fully connected layer. A batch normalization layer is introduced after each layer except the output layer. The middle layer uses the LeakyReLU activation function. The output layer uses a fully connected layer to reduce the output dimension to (1, k+1) and convert it into a softmax score, which indicates the probability that the input sample comes from one of the k generators or from the real distribution.
[0114] (5) Training Generative Adversarial Networks
[0115] The noise vector and the randomly generated category label are horizontally spliced and input into the generator G i , the output is the generated sample; the generated sample and the real data are horizontally spliced with the corresponding category label and then input into the discriminator D, which outputs k+1 softmax scores, and the judgment value output by the discriminator is fed back to the generator and the discriminator to construct their respective loss functions. G and D are trained by alternating iterations of training the discriminator 5 times and training the generator once, during which all generators are updated in parallel. During training, the optimizer selects RMSprop, and the learning rate is set to 0.0001.
[0116] The discriminator is required to not only determine the authenticity, but also to identify the generator that generates a given pseudo sample. The loss function of the discriminator is as follows:
[0117]
[0118] In the above formula, E(·) represents the expected value; G i (·) represents the sample generated by the i-th generator; D i (·) represents the i-th index result output by the discriminator, which indicates the probability that the discriminator determines that the sample is generated by the i-th generator; D k+1(·) represents the k+1th index result output by the discriminator, which indicates the probability that the discriminator determines that the sample belongs to the real data distribution; x represents the real sample;
[0119] The training goal of the discriminator is to minimize the above loss function, that is, to make the probability of judging the pseudo sample generated by the i-th generator as generated by the i-th generator as large as possible, and to judge the probability of judging the real sample as real data as large as possible.
[0120] In order to deceive the discriminator and make it think that the generated samples belong to real data, let the i-th generator G i The loss function is:
[0121]
[0122] In the above formula, E(·) represents the expected value; G i (·) represents the sample generated by the i-th generator; D k+1 (·) represents the k+1th index result output by the discriminator, which indicates the probability that the discriminator determines that the sample belongs to the real data distribution; z represents the input noise; c represents the sample category label;
[0123] The training goal of the generator is to minimize the above loss function, that is, to make the probability that the discriminator judges the pseudo sample as real data as large as possible.
[0124] As the number of training iterations increases, through the game confrontation between multiple generators and discriminators, the generator tries to generate samples that are increasingly close to the real data in order to deceive the discriminator, while the discriminator enhances its ability to distinguish authenticity as much as possible. The two make progress together through mutual learning and eventually reach a Nash equilibrium. The generator learns the complex spatiotemporal distribution characteristics of historical wind power data and can generate new samples that conform to the data distribution.
[0125] (6) Distribution network wind power scenario simulation
[0126] First, the scene simulation interval is determined, and the binary mask matrix M is used to cover the part of the actual measured samples in the test set to be simulated. Then, the context constraint is constructed, that is, the similarity between the simulated scene and the actual measured data is maximized:
[0127] L c (z)=||G i (z|c)×Mx×M||2;
[0128] The authenticity constraint means that the simulated wind power scenario should conform to the actual situation. Since the discriminator can determine whether the input is real data after training, the output of the discriminator is used to construct the authenticity loss:
[0129] L r (z)=-Dk+1 (G i (z|c)|c);
[0130] In order to further improve the credibility of scenario simulation, the point prediction interval constraints are constructed using the current prediction data so that the simulated distribution network scenario is within the point prediction interval to conform to the actual situation:
[0131]
[0132] In the formula, x pred Represents the current prediction sample, and the leftmost and rightmost parts of the inequality represent the upper and lower bounds of the point prediction interval respectively; since the context loss, authenticity loss and this constraint are all non-convex, in order to handle the inequality constraint, the above inequality is written as a loss function as follows:
[0133]
[0134] like Figure 4 As shown, considering the above three types of loss functions, the total cost function of the scene simulation is constructed as follows:
[0135] L complete (z) = L c (z)+βL r (z)+γL p (z);
[0136] For each generator, a noise vector is randomly input, the gradient of the total cost function to the noise vector is calculated, and then the Adam optimization algorithm is used to update the noise vector until the noise vector that minimizes the corresponding cost function is found and input to the generator G. i , that is, a reliable wind power scenario for the distribution network is obtained.
[0137] Each generator learns a different pattern, and by merging the scenarios generated by multiple generators, a credible distribution network distributed power source and load scenario can be simulated. Figure 5 This is the simulation curve of the wind power scenario in the distribution network in this example. The three sub-graphs are simulated under different prediction ranges. It can be seen that the generated wind power scenario can effectively cover the actual power curve, which shows the feasibility and credibility of this method in the application of distribution network power supply and load scenario simulation.
[0138] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A credible simulation method for distribution network production and operation scenarios based on adversarial game, characterized in that: include, S1. Process the collected data to obtain sample category labels; S2. Build the generator framework and the discriminator framework; S3, the generator generates pseudo data; S4, the discriminator determines the authenticity of the data produced by S3 and identifies the generator; S5. Train the generative adversarial network. S6, determining the scene simulation interval, and using a binary mask matrix to cover the to-be-simulated portion of the actual test data; For multiple generators, we construct optimization objectives based on context constraints, authenticity constraints, and point prediction interval constraints, and update the noise vectors using the gradient descent algorithm. S7, repeat step S6 until the noise vector that minimizes the cost function corresponding to each generator is found, and input to the generator to obtain a reliable distributed power source and load scenario of the distribution network; Specifically, S6 and S7 are to use the binary mask matrix M to cover the to-be-simulated part of the actual measured sample in the test set, and then construct the context constraint: L c (z)=||G i (z|c)×M-x×M||2; Use the output of the discriminator to construct the authenticity loss: L r (z)=-D k+1 (G i (z|c)|c); Using the day-ahead forecast data to construct point forecast interval constraints, the loss function is as follows: The total cost function of the constructed scene simulation is: L complete (from)=L c (z)+βL r (z)+γL p (of); Among them, G i (·) represents the sample generated by the i-th generator; D k+1 (·) represents the k+1th index result output by the discriminator, which indicates the probability that the discriminator determines that the sample belongs to the real data distribution; x represents the real sample; z represents the input noise; c represents the sample category label; For each generator, a noise vector is randomly input, the gradient of the total cost function to the noise vector is calculated, and then the Adam optimization algorithm is used to update the noise vector until the noise vector that minimizes the corresponding cost function is found and input to the generator G. i , and obtain a reliable wind power scenario for the distribution network.
2. The credible simulation method for distribution network production and operation scenarios based on adversarial game according to claim 1 is characterized in that: The S1 obtains sample category labels, specifically, collects distributed power supply and load data, uses the K-means clustering algorithm, clusters all samples based on the Euclidean distance, and obtains the category label corresponding to each sample.
3. The credible simulation method for distribution network production and operation scenarios based on adversarial game according to claim 2 is characterized in that: The S2 constructs a generator framework and a discriminator framework. Specifically, the generating network includes a fully connected layer and three 2D-CNN layers. A batch normalization layer is introduced after each layer except the output layer. The activation function uses LeakyReLU. All generators use the same structural parameters to share information. The discriminant network consists of three 2D-CNN layers and one fully connected layer. A batch normalization layer is introduced after each layer except the output layer. The middle layer uses the LeakyReLU activation function, and the output layer uses a fully connected layer to reduce the output dimension to (1, k+1).
4. The credible simulation method for distribution network production and operation scenarios based on adversarial game according to claim 3 is characterized in that: The S3 generator generates pseudo data. Specifically, multiple generators are used to capture the spatiotemporal distribution characteristics of the data. All generators use the same structural parameters to share information. The noise vector and the randomly generated category label are horizontally spliced and input into the generator, and the output is the generated sample.
5. The credible simulation method for distribution network production and operation scenarios based on adversarial game according to claim 4 is characterized in that: The S4 discriminator determines the authenticity of the data produced by S3 and identifies the generator. Specifically, the generated samples and real data in S3 are horizontally spliced with the corresponding category labels and input into the discriminator D, and k+1 softmax scores are output, indicating the probability that the input sample comes from one of the k generators or from the real distribution.
6. The credible simulation method for distribution network production and operation scenarios based on adversarial game according to claim 5 is characterized in that: The S5 trains the generative adversarial network, specifically, horizontally splicing the noise vector and the randomly generated category label and inputting them into the generator G i , the output is the generated sample; The generated samples and real data are horizontally spliced with the corresponding category labels and then input into the discriminator D, which outputs k+1 softmax scores; Feed the judgment value output by the discriminator back to the generator and the discriminator, construct their respective loss functions, use the gradient descent algorithm to update the network weight parameters, and repeat steps S3-S5 until the model reaches Nash equilibrium and the generator captures the potential distribution characteristics of the data, extracting a well-trained generator G i .
7. The credible simulation method for distribution network production and operation scenarios based on adversarial game according to claim 6 is characterized in that: The specific implementation method of the output of the discriminator indicating the probability that its input sample comes from generated data or from real data is: Based on the goal of the generator to identify and determine the authenticity, the discriminator outputs k+1 softmax scores in the following form: The above formula represents the probability that the input sample comes from one of the k generators or from the true distribution, where the i-th index (i∈{1,...,k}) represents the probability that the sample is generated by the i-th generator, and the k+1-th index represents the probability that the sample belongs to the true data distribution.
8. The credible simulation method for distribution network production and operation scenarios based on adversarial game according to claim 7 is characterized in that: In order to deceive the discriminator and make it think that the generated samples belong to real data, let the i-th generator G i The loss function is: In the above formula, E(·) represents the computational expectation; the generator G i The training goal is to make the above loss function Minimum.
9. The credible simulation method for distribution network production and operation scenarios based on adversarial game according to claim 8 is characterized in that: The discriminator determines whether the samples generated by the generator are true or false, and identifies the generator that generates a given fake sample. The loss function of the discriminator is as follows: In the above formula, E(·) represents the expected value; G i (·) represents the sample generated by the i-th generator; D i (·) represents the i-th index result output by the discriminator, which indicates the probability that the discriminator determines that the sample is generated by the i-th generator; D k+1 (·) represents the k+1th index result output by the discriminator, which indicates the probability that the discriminator determines that the sample belongs to the real data distribution; The training goal of the discriminator D is to make the above loss function L D Minimum, that is, the probability of determining the true source of the pseudo data and real data generated by the generator is the largest.