Photovoltaic and load combined output scene generation method and device

Through the combination of generative models and discriminators, historical data is used to generate output scenarios that simulate photovoltaics and loads, and the error problem caused by relying on statistical assumptions in the existing technology is solved, achieving more efficient and accurate scenario generation and analysis.

CN119518989APending Publication Date: 2025-02-25YUHANG BRANCH OF HANGZHOU ELECTRIC POWER DESIGN INSTITUTE CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411756847.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

When simulating the output scenarios of photovoltaic and loads in the distribution network, the prior art relies on statistical assumptions, resulting in large errors in fitting situations with large output fluctuations, which in turn leads to incorrect grid scenario analysis results.

Method used

By obtaining the output power of the historical photovoltaic system, the consumption power of the historical load and the historical category information label, the generation model is used to generate and simulate the output power of the photovoltaic system and the consumption power of the load, and the reliability of the generation model is judged through the discriminator, and finally the distribution network is analyzed based on the category information label.

Benefits of technology

There is no need to use actual data, which improves the efficiency of scene generation. The generated simulated data is rich in scenarios and is more accurate after being judged by the discriminator, improving the accuracy of grid scenario analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119518989A_ABST
    Figure CN119518989A_ABST
Patent Text Reader

Abstract

The invention discloses a photovoltaic and load combined output scene generation method and device, and relates to the field of power distribution network distributed photovoltaic and load typical scene generation, and the method comprises the steps: determining that a generation model is reliable through a discriminator based on the output power of a historical photovoltaic system, the consumption power of a historical load, and a historical class information label; when a data generation instruction is received, the output power of the current simulation photovoltaic system and the consumption power of the current simulation load under the category information label in the data generation instruction generated by the generation model are obtained, and then the power distribution network is analyzed. The generation model is used for judging the output power of the photovoltaic system and the consumption power of the load in various scenes, actual data does not need to be used, and the scene generation efficiency is improved. And meanwhile, the category information label comprises various scenes preset according to seasons, so that the obtained simulation data scenes are rich and are more accurate after being discriminated by the discriminator.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of generation of typical scenarios of distributed photovoltaic and load in distribution network, and in particular to a method and device for generating a photovoltaic and load joint output scenario. Background Art

[0002] The high proportion of photovoltaic grid connection and the access of various new loads have greatly increased the uncertainty of the distribution network. Among them, the scenario analysis method is one of the commonly used methods to describe uncertainty analysis. This method is based on real photovoltaic and load output data, simulates and generates a large number of source-load output scenarios and clusters them into several representative scenarios. At present, the simulation method for source-load output scenarios usually makes assumptions about the probability distribution of source-load output, and then generates scenarios through repeated sampling. This method relies on statistical assumptions, and the error is large when fitting the situation with large output fluctuations, which leads to incorrect scenario analysis results for the power grid. Summary of the invention

[0003] The purpose of the present invention is to provide a method and device for generating a photovoltaic and load combined output scene, which does not require the use of actual data and improves the efficiency of scene generation. At the same time, the category information label includes a variety of scenes preset according to the season, and the obtained simulation data scenes are rich and more accurate after being judged by the discriminator.

[0004] In order to solve the above technical problems, the present invention provides a method for generating a photovoltaic and load combined output scenario, comprising:

[0005] Obtaining the output power of the historical photovoltaic system, the power consumption of the historical load, and the historical category information label, wherein each output power of the historical photovoltaic system corresponds to the power consumption of the historical load, and the category information label includes a plurality of scenarios preset according to the season;

[0006] When the discriminator determines that the output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulated category information label output by the generation model are correct based on the output power of the historical photovoltaic system, the power consumption of the historical load and the historical category information label, the generation model is determined to be reliable;

[0007] Upon receiving the data generation instruction, obtaining the output power of the current simulated photovoltaic system and the power consumption of the current simulated load under the category information tag in the data generation instruction generated by the reliable generation model;

[0008] The distribution network is analyzed based on the output power of the current simulated photovoltaic system and the power consumption of the current simulated load under the category information tag in the data generation instruction.

[0009] On the other hand, the output power of the historical photovoltaic system, the power consumption of the historical load and the historical category information label are obtained, including:

[0010] Obtain the historical output power of the photovoltaic system and the historical power consumption of the load;

[0011] Based on the actual scenario of the output power of the historical photovoltaic system and the power consumption of the historical load, adding a historical category information tag to the output power of the historical photovoltaic system and the power consumption of the historical load;

[0012] The historical category information labels include at least two of spring daytime, summer daytime, autumn daytime, winter daytime, spring night, summer night, autumn night and winter night.

[0013] On the other hand, when the discriminator determines that the output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulated category information label output by the generation model are correct based on the output power of the historical photovoltaic system, the power consumption of the historical load and the historical category information label, before determining that the generation model is reliable, it also includes:

[0014] Generate a random noise vector as input to the generative model;

[0015] The output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulation category information label output by the generation model are obtained.

[0016] On the other hand, when receiving the data generation instruction, obtaining the output power of the current simulated photovoltaic system and the power consumption of the current simulated load under the category information tag in the data generation instruction generated by the reliable generation model includes:

[0017] Upon receiving the data generation instruction, controlling the generation model to generate a plurality of currently simulated photovoltaic system output powers and a plurality of currently simulated load consumption powers;

[0018] Clustering all the output powers of the current simulated photovoltaic systems and the power consumption of the current simulated loads, and obtaining a cluster center of each cluster;

[0019] Determine the current simulation category information label corresponding to the output power of the current simulated photovoltaic system and the current simulation category information label corresponding to the power consumption of the current simulated load based on each cluster center and the simulation category information label corresponding to the cluster center;

[0020] The output power of the current simulated photovoltaic system and the power consumption of the current simulated load corresponding to the current simulated category information tag which is the same as the category information tag in the data generation instruction are obtained.

[0021] On the other hand, clustering the output power of the current simulated photovoltaic system and the power consumption of the current simulated load is performed, and the cluster center of each cluster is obtained, including:

[0022] Among all the output powers of the current simulated photovoltaic system and the power consumption of the current simulated load, n points are selected as initial center points, and the output power of the current simulated photovoltaic system and the corresponding power consumption of the current simulated load constitute a point;

[0023] Determine the distances of the remaining points except the initial center point to the initial center point, and assign the remaining points except the initial center point to the cluster with the shortest distance according to the principle of minimum distance to the center point;

[0024] For the remaining points of the i-th cluster except the center point, they are taken as new center points in turn, and the criterion function value is determined;

[0025] When the criterion function value takes a minimum value, determining the center point corresponding to the criterion function value as the cluster center of the cluster;

[0026] Among them, the expression of the criterion function value is , S is the criterion function value, C i is the i-th cluster, k is the maximum value of the cluster, p is the remaining points in the cluster except the center point, O i is the center point of the i-th cluster.

[0027] On the other hand, it is characterized in that when the discriminator determines that the output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulated category information label output by the generation model are correct based on the output power of the historical photovoltaic system, the power consumption of the historical load and the historical category information label, determining that the generation model is reliable includes:

[0028] Inputting the output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulated category information label output by the generation model and the output power of the historical photovoltaic system, the power consumption of the historical load and the historical category information label into the discriminator;

[0029] Obtaining the probability Ls that the output power of the simulated photovoltaic system and the power consumption of the simulated load output by the generation model output by the discriminator are correct and the probability Lc that the simulated category information label is correct;

[0030] Among them, Ls is positively correlated with the output power of the simulated photovoltaic system, the power consumption of the simulated load, the output power of the historical photovoltaic system and the power consumption of the historical load, and Lc is positively correlated with the similarity between the simulated category information label and the historical category information label;

[0031] Based on the probability Ls that the output power of the simulated photovoltaic system and the power consumption of the simulated load output by the generation model output by the discriminator are correct and the probability Lc that the simulation category information label is correct, when it is determined that the output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulation category information label output by the generation model are correct, the generation model is determined to be reliable.

[0032] On the other hand, based on the probability Ls that the output power of the simulated photovoltaic system and the power consumption of the simulated load output by the generation model output by the discriminator are correct and the probability Lc that the simulation category information label is correct, when it is determined that the output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulation category information label output by the generation model are correct, it is determined that the generation model is reliable, including:

[0033] Constructing a first objective function of the generative model, wherein the first objective function is Lc-Ls;

[0034] Constructing a second objective function of the discriminator, wherein the second objective function is Lc+Ls;

[0035] When the first objective function is maximized and the second objective function is minimized, the generation model is determined to be reliable.

[0036] On the other hand, the expression of the probability Ls that the output power of the simulated photovoltaic system and the power consumption of the simulated load output by the generation model based on the output of the discriminator are correct is:

[0037] ;

[0038] The expression of the probability Lc that the simulated category information label is correct is:

[0039] ;

[0040] Among them, x~P(x) is x that obeys the distribution of P(x), E x~P(x) is the expectation of P(x), D(x) is the probability that the input data x is judged to be correct, and E z~P(z) is the expectation of P(z), G(z) is the output of the generative model when the input is z, D(G(z)) is the output of the discriminator when the input is G(z), Gp is ​​the gradient penalty term, λ is the gradient penalty coefficient, E c~P(c) is the expectation of P(c), D(c) is the probability that the input data c is judged to be correct, G(c) is the output of the generative model when the input is c, D(G(c)) is the output of the discriminator when the input is G(c), x is the real historical data, z is the input data of the generative model, and c is the output data of the discriminator.

[0041] On the other hand, the expression of the gradient penalty term is:

[0042] ;

[0043] in, is the gradient penalty term of x, is the function D( )about gradient.

[0044] In order to solve the above technical problems, the present invention also provides a photovoltaic and load combined output scene generation device, comprising:

[0045] Memory for storing computer programs;

[0046] A processor is used to implement the steps of the above-mentioned photovoltaic and load combined output scenario generation method when executing the computer program.

[0047] The present invention discloses a method and device for generating a photovoltaic and load joint output scene, which relates to the field of generation of typical scenes of distributed photovoltaic and load in distribution networks, including: after a discriminator determines that a generation model is reliable based on the output power of historical photovoltaic systems, the power consumption of historical loads and historical category information labels, upon receiving a data generation instruction, the output power of the current simulated photovoltaic system and the power consumption of the current simulated load under the category information label in the data generation instruction generated by the generation model are obtained, and then the distribution network is analyzed. The generation model is used to determine the output power of the photovoltaic system and the power consumption of the load in various scenarios without using actual data, thereby improving the efficiency of scene generation. At the same time, the category information label includes a variety of scenarios preset according to the season, and the obtained simulation data scenarios are rich and more accurate after being judged by the discriminator. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the prior art and the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0049] Figure 1 A flow chart of a method for generating a photovoltaic and load combined output scenario provided by the present invention;

[0050] Figure 2a A schematic diagram of the output power in spring output by a generation model that has been trained 5 times provided by the present invention;

[0051] Figure 2bA schematic diagram of summer output power output by a generation model trained 5 times provided by the present invention;

[0052] Figure 2c A schematic diagram of the output power in autumn output by a generation model trained 5 times provided by the present invention;

[0053] Figure 2d A schematic diagram of winter output power output by a generation model trained 5 times provided by the present invention;

[0054] Figure 3a A schematic diagram of the output power in spring output by a generation model trained 50 times provided by the present invention;

[0055] Figure 3b A schematic diagram of summer output power output by a generation model trained 50 times provided by the present invention;

[0056] Figure 3c A schematic diagram of the output power in autumn output by a generation model trained 50 times provided by the present invention;

[0057] Figure 3d A schematic diagram of winter output power output by a generation model trained 50 times provided by the present invention;

[0058] Figure 4a A schematic diagram of the output power in spring output by a generation model trained 500 times provided by the present invention;

[0059] Figure 4b A schematic diagram of summer output power output by a generation model trained 500 times provided by the present invention;

[0060] Figure 4c A schematic diagram of the output power in autumn output by a generation model trained 500 times provided by the present invention;

[0061] Figure 4d A schematic diagram of winter output power output by a generation model trained 500 times provided by the present invention;

[0062] Figure 5a A schematic diagram of the output power in spring output by a generation model trained 5000 times provided by the present invention;

[0063] Figure 5b A schematic diagram of summer output power output by a generation model trained 5000 times provided by the present invention;

[0064] Figure 5c A schematic diagram of the output power in autumn output by a generation model trained 5000 times provided by the present invention;

[0065] Figure 5d A schematic diagram of winter output power output by a generation model trained 5000 times provided by the present invention;

[0066] Figure 6a A schematic diagram of the output power of a distributed photovoltaic system in spring after scene clustering provided by the present invention;

[0067] Figure 6b A schematic diagram of the output power of a distributed photovoltaic system in summer after scene clustering provided by the present invention;

[0068] Figure 6c A schematic diagram of the output power of a distributed photovoltaic system in autumn after scene clustering provided by the present invention;

[0069] Figure 6d A schematic diagram of the output power of a distributed photovoltaic system in winter after scene clustering provided by the present invention;

[0070] Figure 7a A schematic diagram of power consumption of loads in spring after scene clustering provided by the present invention;

[0071] Figure 7b A schematic diagram of power consumption of loads in summer after scene clustering provided by the present invention;

[0072] Figure 7c A schematic diagram of power consumption of loads in autumn after scene clustering provided by the present invention;

[0073] Figure 7d A schematic diagram of power consumption of loads in winter after scene clustering provided by the present invention;

[0074] Figure 8 A schematic structural diagram of a photovoltaic and load combined output scene generation device provided by the present invention. DETAILED DESCRIPTION

[0075] The core of the present invention is to provide a method and device for generating a photovoltaic and load combined output scene, which does not require the use of actual data and improves the efficiency of scene generation. At the same time, the category information label includes a variety of scenes preset according to the season, and the obtained simulation data scenes are rich and more accurate after being judged by the discriminator.

[0076] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0077] Figure 1 A flowchart of a photovoltaic and load combined output scenario generation method provided by the present invention, the photovoltaic and load combined output scenario generation method comprising:

[0078] S11: Obtain the output power of the historical photovoltaic system, the power consumption of the historical load, and the historical category information label. The output power of each historical photovoltaic system corresponds to the power consumption of a historical load. The category information label includes multiple scenarios preset according to the season.

[0079] S12: when the discriminator determines that the output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulated category information label output by the generated model are correct based on the output power of the historical photovoltaic system, the power consumption of the historical load and the historical category information label, the generated model is determined to be reliable;

[0080] S13: upon receiving the data generation instruction, obtaining the output power of the current simulated photovoltaic system and the power consumption of the current simulated load under the category information tag in the data generation instruction generated by the determined reliable generation model;

[0081] S14: Analyze the distribution network based on the output power of the current simulated photovoltaic system and the power consumption of the current simulated load under the category information tag in the data generation instruction.

[0082] The high proportion of photovoltaic grid connection and the access of various new loads have greatly increased the uncertainty of the distribution network. Among them, the scenario analysis method is one of the commonly used methods to describe uncertainty analysis. Based on real photovoltaic and load output data, this method simulates and generates a large number of source-load output scenarios and clusters them into several representative scenarios. At present, the simulation methods for source-load output scenarios can be mainly divided into parametric methods and non-parametric methods. The parametric method usually makes assumptions about the probability distribution of source-load output (for example, the 24-hour output of distributed photovoltaics conforms to the normal distribution of a certain parameter), and then generates scenarios through repeated sampling. This method relies on statistical assumptions and has large errors when fitting situations with large output fluctuations (based on historical data statistics, it is assumed that it conforms to the normal distribution of a certain parameter, but if the actual future output is significantly different from historical data: 1. It may not be this parameter; 2. It does not conform to the normal distribution). In contrast, the non-parametric method does not need to assume the probability distribution of random variables. Among them, the generative adversarial network in the non-parametric method has become increasingly mature and has been widely used, but its application in source-load scenario generation is still relatively small. In addition, one of the disadvantages of generative adversarial networks is that if there is any prior information, the training direction is easily lost, resulting in poor training results. Moreover, each sample of a certain category needs to be trained independently, which is a large workload and affects its promotion in power system engineering practice.

[0083] Therefore, this application uses a generative model to generate data to avoid using actual data to discriminate the operation of the distribution network. The generative model needs to be trained before using it, and the data for training the generative model needs to be trained using actual data. The actual data includes the output of the actual photovoltaic system, and the output can be understood as the output power. At the same time, the load output, that is, the power consumption, is also required. Using historical data to generate the generative model can avoid the inconvenience of data acquisition caused by using actual historical data. The data generated by the generative model also needs to be discriminated by the discriminator. The generative model is reliable only when the data generated by the generative model is confirmed to be correct through the discriminator's judgment.

[0084] Furthermore, the generation model not only generates the output power of the photovoltaic system and the power consumption of the load, but also generates category information labels corresponding to the scenarios of the output power of the photovoltaic system and the power consumption of the load. Since it is a photovoltaic system, it is related to light, so the scenario is affected by the season, and may also be affected by weather and time. This application does not make too many restrictions here.

[0085] The generative model is trained based on real historical data. The generative model can output the simulated photovoltaic system output power, simulated load power consumption and simulated category information labels. After the discriminator determines that it is correct, the generative model is reliable. The generative model determined to be reliable can generate data based on the user's data generation instructions, and the user can select the required scene.

[0086] The present invention discloses a method and device for generating a photovoltaic and load joint output scene, which relates to the field of generation of typical scenes of distributed photovoltaic and load in distribution networks, including: after a discriminator determines that a generation model is reliable based on the output power of historical photovoltaic systems, the power consumption of historical loads and historical category information labels, upon receiving a data generation instruction, the output power of the current simulated photovoltaic system and the power consumption of the current simulated load under the category information label in the data generation instruction generated by the generation model are obtained, and then the distribution network is analyzed. The generation model is used to determine the output power of the photovoltaic system and the power consumption of the load in various scenarios without using actual data, thereby improving the efficiency of scene generation. At the same time, the category information label includes a variety of scenarios preset according to the season, and the obtained simulation data scenarios are rich and more accurate after being judged by the discriminator.

[0087] Based on the above embodiments:

[0088] In some embodiments, obtaining the historical photovoltaic system output power, the historical load power consumption and the historical category information label includes:

[0089] Obtain the historical output power of the photovoltaic system and the historical power consumption of the load;

[0090] Based on the actual scenario of the output power of the historical photovoltaic system and the power consumption of the historical load, add historical category information tags to the output power of the historical photovoltaic system and the power consumption of the historical load;

[0091] The historical category information labels include at least two of spring daytime, summer daytime, autumn daytime, winter daytime, spring night, summer night, autumn night and winter night.

[0092] By adding the category information label t, the generator is guided to generate samples of the specified category. Specifically, the season is used as the category information label, and the output of distributed photovoltaics and loads is divided into eight categories according to spring daytime, summer daytime, autumn daytime, winter daytime, spring night, summer night, autumn night, and winter night, corresponding to t 0, 1, 2, 3, 4, 5, 6, and 7. By marking the eight categories of scenes with significant differences in features, on the one hand, the efficiency of the improved generative adversarial network is improved, and on the other hand, it helps to improve the representativeness of the generated scenes.

[0093] In some embodiments, when the discriminator determines that the output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulated category information label output by the generation model are correct based on the output power of the historical photovoltaic system, the power consumption of the historical load and the historical category information label, before determining that the generation model is reliable, it also includes:

[0094] Generate a random noise vector as input to the generative model;

[0095] Obtain the output power of the simulated photovoltaic system, the power consumption of the simulated load, and the simulation category information label output by the generated model.

[0096] The input of the generative model does not need to be limited, so a random noise vector can be used as the input of the generative model, and the required output of the generative model can be obtained through continuous iteration.

[0097] In some embodiments, when a data generation instruction is received, obtaining the output power of the current simulated photovoltaic system and the power consumption of the current simulated load under the category information tag in the data generation instruction generated by the reliable generation model includes:

[0098] Upon receiving the data generation instruction, the generation model is controlled to generate the output power of multiple current simulated photovoltaic systems and the power consumption of multiple current simulated loads;

[0099] Cluster all the current simulated photovoltaic system output power and the current simulated load consumption power, and obtain the cluster center of each cluster;

[0100] Determine the current simulation category information label corresponding to the output power of the current simulated photovoltaic system and the current simulation load consumption power based on each cluster center and the simulation category information label corresponding to the cluster center;

[0101] The output power of the current simulated photovoltaic system and the power consumption of the current simulated load corresponding to the current simulated category information tag which is the same as the category information tag in the data generation instruction are obtained.

[0102] When receiving the data generation instruction, the generation model will start to generate the output power of the current simulated photovoltaic system and the power consumption of the current simulated load, and perform a clustering algorithm on them to obtain the corresponding current category information label. Determine the category information label in the data generation instruction. For example, if summer daytime data is required, then find the summer daytime data from the category information label in the generation model.

[0103] In some embodiments, clustering is performed on the output power of the current simulated photovoltaic system and the power consumption of the current simulated load, and the cluster center of each cluster is obtained, including:

[0104] Among all the current simulated photovoltaic system output power and the current simulated load power consumption, n points are selected as initial center points. The current simulated photovoltaic system output power and the corresponding current simulated load power consumption constitute a point.

[0105] Determine the distance from the remaining points to the initial center point, and assign the remaining points to the cluster with the shortest distance to the center point according to the principle of minimum distance to the center point;

[0106] For the remaining points of the i-th cluster except the center point, they are taken as new center points in turn, and the criterion function value is determined;

[0107] When the criterion function value takes the minimum value, the center point corresponding to the criterion function value is determined as the cluster center of the cluster;

[0108] Among them, the expression of the criterion function value is , S is the criterion function value, C i is the i-th cluster, k is the maximum value of the cluster, p is the remaining points in the cluster except the center point, O i is the center point of the i-th cluster.

[0109] The final output source-load output data set is divided into 4 clusters using k-medoids, with the object at the center of the cluster as the representative object, which corresponds to the typical joint scenario of distributed photovoltaic and load. Based on the k-means clustering algorithm, the k-medoids clustering algorithm uses the actual sample that is most similar to other samples in each cluster as the cluster center, improving the defects of k-means clustering that is sensitive to noise points and outliers and is prone to falling into local optimality. The steps of the k-medoids clustering algorithm are as follows:

[0110] 1) Randomly select 4 points from the total sample points (n) as the initial center points (Oi);

[0111] 2) Calculate the distances from the remaining points (p) to various center points, and assign the remaining points to the cluster closest to the center point (Ci) according to the principle of being closest to the center point;

[0112] 3) For all other points in the i-th cluster (Ci) except the center point, calculate the value of the criterion function (S) when it is the new center point in order, traverse all possibilities, and select the point corresponding to the minimum criterion function as the new center point;

[0113] 4) Repeat the process from 2) to 3) until all center points no longer change or the maximum number of iterations has been reached.

[0114] In some embodiments, when the discriminator determines that the output power of the simulated photovoltaic system, the power consumption of the simulated load, and the simulated category information label output by the generation model are correct based on the output power of the historical photovoltaic system, the power consumption of the historical load, and the historical category information label, determining that the generation model is reliable includes:

[0115] The output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulated category information label output by the generation model and the output power of the historical photovoltaic system, the power consumption of the historical load and the historical category information label are input into the discriminator;

[0116] The probability Ls that the output power of the simulated photovoltaic system and the power consumption of the simulated load outputted by the generative model outputted by the discriminator are correct and the probability Lc that the simulated category information label is correct;

[0117] Among them, Ls is positively correlated with the output power of the simulated photovoltaic system, the power consumption of the simulated load, the output power of the historical photovoltaic system, and the power consumption of the historical load. Lc is the similarity between the simulated category information label and the historical category information label.

[0118] Based on the probability Ls that the output power of the simulated photovoltaic system and the power consumption of the simulated load output by the generation model output by the discriminator are correct, and the probability Lc that the simulated category information label is correct, when it is determined that the output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulated category information label output by the generation model are correct, the generation model is determined to be reliable.

[0119] In some embodiments, based on the probability Ls that the output power of the simulated photovoltaic system and the power consumption of the simulated load output by the generation model output by the discriminator are correct and the probability Lc that the simulated category information label is correct, when it is determined that the output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulated category information label output by the generation model are correct, determining that the generation model is reliable includes:

[0120] Construct the first objective function of the generative model, the first objective function is Lc-Ls;

[0121] Construct the second objective function of the discriminator, the second objective function is Lc+Ls;

[0122] When the first objective function is maximized and the second objective function is minimized, the generated model is determined to be reliable.

[0123] The "objective function" is set for the discriminator and the generator to achieve: the discriminator can distinguish between real data and generated data as much as possible and can effectively classify the data. For the generator, it is hoped that the generated data is considered as real data as much as possible and the data can be effectively classified. The corresponding objective function is constructed based on the probability (Ls) that the discriminator identifies the source load output data as correct and the probability (Lc) that the discriminator outputs the correct classification of the source load output data. The discriminator needs to maximize Ls +Lc, while the generator objective function is to maximize Lc - Ls.

[0124] In some embodiments, the probability Ls that the output power of the simulated photovoltaic system and the power consumption of the simulated load output by the generation model based on the discriminator output are correct is expressed as:

[0125] ;

[0126] The expression of the probability Lc that the simulated category information label is correct is:

[0127] ;

[0128] Among them, x~P(x) is x that obeys the distribution of P(x), E x~P(x) is the expectation of P(x), D(x) is the probability that the input data x is judged to be correct, and E z~P(z)is the expectation of P(z), G(z) is the output of the generative model when the input is z, D(G(z)) is the output of the discriminator when the input is G(z), Gp is ​​the gradient penalty term, λ is the gradient penalty coefficient, E c~P(c) is the expectation of P(c), D(c) is the probability that the input data c is judged to be correct, G(c) is the output of the generative model when the input is c, D(G(c)) is the output of the discriminator when the input is G(c), x is the real historical data, z is the input data of the generative model, and c is the output data of the discriminator.

[0129] In some embodiments, the expression of the gradient penalty term is:

[0130] ;

[0131] in, is the gradient penalty term of x, is the function D( )about gradient.

[0132] The implementation process of this application is illustrated by practical examples:

[0133] Step (1): Generate a random noise vector as the input of the generative model, and use the generative model to generate source-load scenario data;

[0134] Step (2): Label the real distributed photovoltaic and load data with category information labels.

[0135] The example uses the measured historical data of distributed photovoltaic and load output in a province in central my country for 2 years, with a data sampling interval of 5 minutes. The distributed photovoltaic and load output power is normalized. Then, the 2×288 data of photovoltaic and load output per day are reshaped (for convenience corresponding to 24 hours. The first row represents the first 5 minutes of each hour in a day, and so on. The first 12 rows are photovoltaic output data. Similarly, the other 12 rows are load data.) into a 24×24 matrix, which is used as the real sample data input in the improved generative adversarial network, and information labels t are added to photovoltaic and load output according to the season to which the day belongs (spring daytime, summer daytime, autumn daytime, winter daytime, spring night, summer night, autumn night, winter night are divided into eight categories, corresponding to t 0, 1, 2, 3, 4, 5, 6, 7).

[0136] Step (3): Take the labeled real distributed photovoltaic and load data and the new source-load output data output by the generation model as the input of the discriminant model, and construct the corresponding objective function based on the probability that the discriminator discriminates the source-load output data as correct and the probability that the discriminator outputs the source-load output data as correctly classified. The discriminator needs to maximize Ls + Lc, while the generator objective function is to maximize Lc - Ls. The gradient penalty coefficient is 0.03.

[0137] After multiple trainings, source-load joint output scenarios can be generated. After the improved generative adversarial network model has been trained for 5 times, Figure 2a , Figure 2b , Figure 2c and Figure 2d As shown in , at this time, since the generator has not yet captured the characteristics of the source-load output curve, the output data it generates is mainly composed of random noise; when training 50 times, as shown in Figure 3a , Figure 3b , Figure 3c and Figure 3d As shown in Figure 1, the generator has been able to capture some features of the source-load output. The photovoltaic output curve and the load output curve generated by the generator have shown a large difference. However, it can still be seen that the output curve is greatly disturbed by random noise. For example, the photovoltaic output curve still has a relatively obvious output in the early morning. When trained 500 times, Figure 4a , Figure 4b , Figure 4c and Figure 4d As shown in Figure 1, the generator gradually stabilizes the source-load output curve generated by learning from real sample data, and the fluctuation caused by random noise is small. The shapes of the generated photovoltaic and load output curves are also similar to the real data. When the training is performed for 5000 times, as shown in Figure 1 Figure 5a , Figure 5b , Figure 5c and Figure 5d As shown in the figure, the generator has fully tapped into the intrinsic characteristics of the real data, and is close to the Nash equilibrium with the discriminator (it is impossible to distinguish between real data and production data). Therefore, the generated load output curve is smoother overall, while photovoltaic itself is greatly affected by meteorological factors, and the uncertainty is more prominent than the load, so the volatility of the generated output curve is more prominent. Overall, the shape characteristics of the output curve generated at this time are closer to the real sample data. Among them, the generated photovoltaic output curve shows the characteristics of high output at noon and no output at night; the generated load output curve shows two peaks, which is consistent with the characteristics of the actual source-load data, indicating that the improved generative adversarial network model proposed in this paper can mine the implicit intrinsic relationship in the real data set.

[0138] Step (5): Use the k-medoids clustering algorithm to reduce the generated scenarios, and finally obtain the typical joint scenarios of distributed photovoltaics and loads corresponding to the four seasons of spring, summer, autumn and winter.

[0139] This example uses the k-medoids clustering algorithm to reduce the output curves of distributed photovoltaic power generation in four seasons. Figure 6a , Figure 6b , Figure 6c and Figure 6d As shown in Figure 2, the results of clustering and normalizing the load curves are shown in Figure 2. Figure 7a , Figure 7b , Figure 7c and Figure 7d The output curve in the figure is sampled every 1 hour to obtain 2×4 24-hour typical output curves for each of the four seasons.

[0140] Figure 8 A schematic diagram of the structure of a photovoltaic and load combined output scene generation device provided by the present invention, the photovoltaic and load combined output scene generation device comprising:

[0141] A memory 81, used for storing computer programs;

[0142] The processor 82 is used to implement the steps of the above-mentioned photovoltaic and load combined output scenario generation method when executing the computer program.

[0143] For an introduction to the photovoltaic and load combined output scenario generation device provided in this application, please refer to the above embodiments and will not be repeated here.

[0144] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0145] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0146] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for generating a photovoltaic and load combined output scenario, characterized in that: include: Obtaining the output power of the historical photovoltaic system, the power consumption of the historical load, and the historical category information label, wherein each output power of the historical photovoltaic system corresponds to the power consumption of the historical load, and the category information label includes a plurality of scenarios preset according to the season; When the discriminator determines that the output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulated category information label output by the generation model are correct based on the output power of the historical photovoltaic system, the power consumption of the historical load and the historical category information label, the generation model is determined to be reliable; Upon receiving the data generation instruction, obtaining the output power of the current simulated photovoltaic system and the power consumption of the current simulated load under the category information tag in the data generation instruction generated by the reliable generation model; The distribution network is analyzed based on the output power of the current simulated photovoltaic system and the power consumption of the current simulated load under the category information tag in the data generation instruction.

2. The method for generating a photovoltaic and load combined output scenario according to claim 1, characterized in that: Obtain historical PV system output power, historical load power consumption, and historical category information tags, including: Obtain the historical output power of the photovoltaic system and the historical power consumption of the load; Based on the actual scenario of the output power of the historical photovoltaic system and the power consumption of the historical load, adding a historical category information tag to the output power of the historical photovoltaic system and the power consumption of the historical load; The historical category information labels include at least two of spring daytime, summer daytime, autumn daytime, winter daytime, spring night, summer night, autumn night and winter night.

3. The method for generating a photovoltaic and load combined output scenario according to claim 1, characterized in that: When the discriminator determines that the output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulated category information label output by the generation model are correct based on the output power of the historical photovoltaic system, the power consumption of the historical load and the historical category information label, before determining that the generation model is reliable, the method further includes: Generate a random noise vector as input to the generative model; The output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulation category information label output by the generation model are obtained.

4. The method for generating a photovoltaic and load combined output scenario according to claim 1, characterized in that: When receiving the data generation instruction, obtaining the output power of the current simulated photovoltaic system and the power consumption of the current simulated load under the category information tag in the data generation instruction generated by the reliable generation model, including: Upon receiving the data generation instruction, controlling the generation model to generate a plurality of currently simulated photovoltaic system output powers and a plurality of currently simulated load consumption powers; Clustering all the output powers of the current simulated photovoltaic systems and the power consumption of the current simulated loads, and obtaining a cluster center of each cluster; Determine the current simulation category information label corresponding to the output power of the current simulated photovoltaic system and the current simulation category information label corresponding to the power consumption of the current simulated load based on each cluster center and the simulation category information label corresponding to the cluster center; The output power of the current simulated photovoltaic system and the power consumption of the current simulated load corresponding to the current simulated category information tag which is the same as the category information tag in the data generation instruction are obtained.

5. The method for generating a photovoltaic and load combined output scenario according to claim 1, characterized in that: Clustering the output power of the current simulated photovoltaic system and the power consumption of the current simulated load, and obtaining the cluster center of each cluster, including: Among all the output powers of the current simulated photovoltaic system and the power consumption of the current simulated load, n points are selected as initial center points, and the output power of the current simulated photovoltaic system and the corresponding power consumption of the current simulated load constitute a point; Determine the distances of the remaining points except the initial center point to the initial center point, and assign the remaining points except the initial center point to the cluster with the shortest distance according to the principle of minimum distance to the center point; For the remaining points of the i-th cluster except the center point, they are taken as new center points in turn, and the criterion function value is determined; When the criterion function value takes a minimum value, determining the center point corresponding to the criterion function value as the cluster center of the cluster; Among them, the expression of the criterion function value is , S is the criterion function value, C i is the i-th cluster, k is the maximum value of the cluster, p is the remaining points in the cluster except the center point, O i is the center point of the i-th cluster.

6. The method for generating a photovoltaic and load combined output scenario according to any one of claims 1 to 5, characterized in that: When the discriminator determines that the output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulated category information label output by the generation model are correct based on the output power of the historical photovoltaic system, the power consumption of the historical load and the historical category information label, determining that the generation model is reliable includes: Inputting the output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulated category information label output by the generation model and the output power of the historical photovoltaic system, the power consumption of the historical load and the historical category information label into the discriminator; Obtaining the probability Ls that the output power of the simulated photovoltaic system and the power consumption of the simulated load output by the generation model output by the discriminator are correct and the probability Lc that the simulated category information label is correct; Among them, Ls is positively correlated with the output power of the simulated photovoltaic system, the power consumption of the simulated load, the output power of the historical photovoltaic system and the power consumption of the historical load, and Lc is positively correlated with the similarity between the simulated category information label and the historical category information label; Based on the probability Ls that the output power of the simulated photovoltaic system and the power consumption of the simulated load output by the generation model output by the discriminator are correct and the probability Lc that the simulation category information label is correct, when it is determined that the output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulation category information label output by the generation model are correct, the generation model is determined to be reliable.

7. The method for generating a photovoltaic and load combined output scenario according to claim 6, characterized in that: Based on the probability Ls that the output power of the simulated photovoltaic system and the power consumption of the simulated load output by the generation model output by the discriminator are correct and the probability Lc that the simulation category information label is correct, when it is determined that the output power of the simulated photovoltaic system, the power consumption of the simulated load and the simulation category information label output by the generation model are correct, it is determined that the generation model is reliable, including: Constructing a first objective function of the generative model, wherein the first objective function is Lc-Ls; Constructing a second objective function of the discriminator, wherein the second objective function is Lc+Ls; When the first objective function is maximized and the second objective function is minimized, the generation model is determined to be reliable.

8. The method for generating a photovoltaic and load combined output scenario according to claim 7, characterized in that: The expression of the probability Ls that the output power of the simulated photovoltaic system and the power consumption of the simulated load output by the generation model based on the output of the discriminator are correct is: ; The expression of the probability Lc that the simulated category information label is correct is: ; Among them, x~P(x) is x that obeys the distribution of P(x), E x~P(x) is the expectation of P(x), D(x) is the probability that the input data x is judged to be correct, and E z~P(z) is the expectation of P(z), G(z) is the output of the generative model when the input is z, D(G(z)) is the output of the discriminator when the input is G(z), Gp is ​​the gradient penalty term, λ is the gradient penalty coefficient, E c~P(c) is the expectation of P(c), D(c) is the probability that the input data c is judged to be correct, G(c) is the output of the generative model when the input is c, D(G(c)) is the output of the discriminator when the input is G(c), x is the real historical data, z is the input data of the generative model, and c is the output data of the discriminator.

9. The method for generating a photovoltaic and load combined output scenario according to claim 8, characterized in that: The expression of the gradient penalty term is: ; in, is the gradient penalty term of x, is the function D( )about gradient.

10. A photovoltaic and load combined output scene generation device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for generating a photovoltaic and load combined output scenario as described in any one of claims 1 to 9 when executing the computer program.