Microgrid group scenario division method and system based on copulagan
Patent Information
- Application Number
- CN202610874375.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-17
- Publication Date
- 2026-09-25
AI Technical Summary
[0004]现有微电网群典型场景构建方法通常采用历史典型日选取、时序聚类或随机采样等方式生成场景,该类方法主要基于已有历史样本进行筛选或聚合,因历史数据数量有限且仅反映已发生的运行状态,难以覆盖未来可能出现的多样化供用电组合;同时,传统聚类或典型日方法多侧重单变量或低维时序特征处理,难以准确刻画光伏出力、风电出力和负荷功率之间的高维非线性相关关系
本发明方法并非直接将有限的历史运行数据作为典型场景使用,而是首先对光伏出力、风电出力和负荷功率分别进行边缘概率分布建模,准确表征不同物理量各自的概率分布特性;再将不同边缘分布的数据映射至 Copula 空间中的标准均匀变量,消除量纲差异和分布形式差异对联合建模的影响;进一步采用 CopulaGAN对所述标准均匀变量中的高维相关结构进行学习,使生成器能够学习历史数据中隐含的光伏、风电、负荷之间的非线性相关关系、尾部相关关系以及多台区耦合关系,从而得到可表征微电网群真实运行规律的联合分布模型;基于训练完成的联合分布模型输入随机噪声生成新的供用电场景样本,而不是仅限于对历史样本进行筛选、复制或聚合,使生成场景既保持历史数据中的统计规律和相关结构,又能够扩展形成历史数据中未直接出现但符合运行规律的多样化供用电组合。提高场景集对未来不确定运行状态的覆盖能力和代表性,解决现有方法因历史数据不足、直接采样或聚类难以构建高维耦合场景的问题。本发明的优点以及附加方面的优点将在下面的具体实施例中进行详细说明。
Smart Images

Figure CN122823604A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of scene segmentation technology, specifically to a microgrid group scene segmentation method and system based on CopulaGAN. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] With the large-scale integration of distributed photovoltaic (PV) and wind power into distribution networks and microgrids, microgrid clusters are gradually exhibiting operational characteristics of multiple distribution areas, multiple energy types, and multiple spatiotemporal coupling. Because PV output, wind power output, and load power are affected by factors such as meteorological conditions, equipment characteristics, and user behavior, their operational data exhibit randomness, volatility, and different probability distribution characteristics; simultaneously, there are certain spatiotemporal correlations between different distribution areas and different energy variables.
[0004] Existing methods for constructing typical microgrid scenarios typically employ historical typical days selection, temporal clustering, or random sampling to generate scenarios. These methods primarily rely on filtering or aggregating existing historical samples. However, due to the limited amount of historical data and its focus on only reflecting past operational states, they struggle to cover diverse future power supply and consumption combinations. Furthermore, traditional clustering or typical day methods often emphasize single-variable or low-dimensional temporal feature processing, making it difficult to accurately characterize the high-dimensional nonlinear correlations between photovoltaic (PV) output, wind power output, and load power. Traditional Copula methods have limited ability to express complex nonlinear correlations, tail correlations, and multi-source coupling relationships. While generative adversarial networks (GANs) possess the ability to learn complex joint distributions, their direct application to different physical quantity data such as PV, wind power, and load data is susceptible to the influence of marginal distributions and dimensional differences among variables, resulting in insufficient physical consistency and structural preservation of the generated scenarios. Summary of the Invention
[0005] To address the aforementioned issues, this invention proposes a microgrid cluster scenario partitioning method and system based on CopulaGAN. This method combines CopulaGAN and Mini-Batch KMeans algorithms to partition the power supply and consumption scenario set of microgrid clusters, thereby improving the quality of scenario generation, clustering accuracy, and representativeness of typical scenarios.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: The first aspect of this invention provides a microgrid cluster scenario partitioning method based on CopulaGAN, comprising the following steps: We acquire time-series data of photovoltaic power output, wind power output, and load power of microgrid clusters to model marginal probability distributions; After completing the marginal probability distribution modeling, the photovoltaic, wind power and load observation data are mapped to standard uniform variables in Copula space through probability integral transformation; The CopulaGAN model is used to learn the high-dimensional correlation structure of standard uniform variables to obtain a joint distribution model for the power supply and consumption scenario of microgrid groups; Based on the joint distribution model, new scene samples are generated through random noise, and the photovoltaic power output, wind power output and load power data are restored through the inverse transformation of each marginal distribution. After clustering and dimensionality reduction, a typical power supply and consumption scene set of microgrid groups is formed based on the degree of separation between classes.
[0007] A further technical solution involves acquiring time-series data of photovoltaic power output, wind power output, and load power of the microgrid cluster to model the marginal probability distribution, including the following steps: The photovoltaic power output data, wind power output data, and load power data of the microgrid group are acquired, and then cleaned, normalized, and processed by time series. The obtained time series features are combined according to time series to form a multi-dimensional feature vector. The variables in the joint time series are identified by variable type, and the variables are divided into photovoltaic power output variables, wind power output variables and load power variables. The marginal probability distributions of photovoltaic power output, wind power output, and load power variables are modeled using Beta, Weibull, and GMM distributions, respectively.
[0008] A further technical solution involves substituting the photovoltaic power output observations, wind power output observations, and load power observations into the marginal cumulative distribution functions obtained from the corresponding distribution modeling, and performing probability integral transformation to obtain the corresponding standard uniform variables.
[0009] Further technical solutions include the CopulaGAN model, which consists of a real sample input, a random noise input, a generator G, a discriminator D, and a joint distribution output. The real sample input terminal is used to receive standard uniform variables; The random noise input terminal is used to input the random noise variable z into the generator G. t ; Generator G is used to generate joint samples of standard uniform variables based on random noise variable zt, and output them through the joint distribution output terminal; Discriminator D is used to receive real samples separately. and generate samples It outputs the probability that the input sample belongs to the real sample; A further technical solution employs the CopulaGAN model to learn the high-dimensional correlation structure of standard uniform variables, thereby obtaining a joint distribution model for the power supply and consumption scenarios of microgrid groups. The training process of the CopulaGAN model includes the following steps: Based on standard uniform variables, construct a real training sample set in Copula space: For real training sample set Correlation analysis was performed on the variables in each dimension to determine the correlation structure type between photovoltaic power output, wind power output and load power; A generator based on the CopulaGAN model generates samples in the Copula space based on random noise. A discriminator based on the CopulaGAN model determines the probability that an input sample is a real sample, and then assigns the probability to each real sample. and generate samples Perform the judgment; In the Copula space, the generator G and discriminator D are trained adversarially. By alternately optimizing the generator and discriminator D, the distribution of samples generated by the generator approximates the distribution of real samples. Finally, the CopulaGAN model reaches Nash equilibrium, and the trained CopulaGAN model is obtained. The generator of the CopulaGAN model is used as the joint distribution model.
[0010] A further technical solution involves reconstructing photovoltaic power output, wind power output, and load power data from the new scenario samples through inverse transformation of each edge distribution, followed by clustering. This process includes the following steps: Step 41: Combine the photovoltaic power output, wind power output and load power data obtained from the inverse transformation to form a scenario sample dataset to be clustered; Step 42: Initialize the cluster centers of the dataset X to be clustered by selecting cluster centers based on a distance-weighted probability distribution to obtain the initial cluster centers; Step 43: Randomly select a small batch of samples, assign the nearest cluster center to the small batch of samples, and then update the cluster center using the incremental update method based on the small batch of samples. Step 44: Determine if the clustering has converged: Calculate the movement of the cluster centers before and after the update, and determine whether the preset convergence condition is met; if the movement of the cluster centers is less than the preset threshold, stop the iteration; otherwise, execute step 43, continue to randomly select the next batch of Mini-Batch samples and update the cluster centers. Step 45: Once the convergence condition is met, output the final cluster centers. Update each cluster center based on the sum of squared errors within each cluster as the objective function to obtain the clustering results.
[0011] A further technical solution involves using principal component analysis to reduce the dimensionality of the clustered samples, projecting the high-dimensional operating data into a two-dimensional or three-dimensional low-dimensional space.
[0012] A second aspect of this invention provides a microgrid cluster scene partitioning system based on CopulaGAN, comprising: The distributed modeling module is configured to acquire time series data of photovoltaic power output, wind power output, and load power of microgrid clusters to perform marginal probability distribution modeling. The mapping module is configured to map the photovoltaic, wind power and load observation data after the marginal probability distribution modeling is completed to standard uniform variables in Copula space through probability integral transformation. The learning module is configured to use the CopulaGAN model to learn the high-dimensional correlation structure of standard uniform variables, thereby obtaining a joint distribution model of the power supply and consumption scenario of the microgrid group. The new scene generation module is configured to generate new scene samples based on a joint distribution model using random noise, and then restore them to photovoltaic power output, wind power output and load power data through the inverse transformation of each marginal distribution. After clustering and dimensionality reduction, the typical power supply and consumption scene set of microgrid groups is formed based on the degree of separation between classes.
[0013] An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor. When the processor executes the computer instructions, the computer instructions perform the steps in the CopulaGAN-based microgrid cluster scenario partitioning method described above.
[0014] A computer-readable storage medium for storing computer instructions, which, when executed by a processor, complete the steps in the CopulaGAN-based microgrid cluster scenario partitioning method described above.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention does not directly use limited historical operating data as typical scenarios. Instead, it first models the marginal probability distributions of photovoltaic (PV) power output, wind power output, and load power to accurately characterize the probability distribution characteristics of different physical quantities. Then, it maps data from different marginal distributions to standard uniform variables in a Copula space, eliminating the influence of dimensional and distribution differences on joint modeling. Furthermore, it employs CopulaGAN to learn the high-dimensional correlation structure in the standard uniform variables, enabling the generator to learn the nonlinear correlations, tail correlations, and multi-station coupling relationships implicit in historical data among PV, wind power, and load, thereby obtaining a joint distribution model that characterizes the true operating patterns of microgrid clusters. Based on the trained joint distribution model, it inputs random noise to generate new power supply and consumption scenario samples, rather than simply filtering, copying, or aggregating historical samples. This ensures that the generated scenarios retain the statistical regularities and correlation structures of historical data while also expanding to form diverse power supply and consumption combinations that do not directly appear in historical data but conform to operating patterns. This improves the coverage and representativeness of the scenario set for uncertain future operating states, solving the problem that existing methods struggle to construct high-dimensional coupled scenarios due to insufficient historical data, direct sampling, or clustering. The advantages of the present invention, as well as its additional advantages, will be described in detail in the following specific embodiments. Attached Figure Description
[0016] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute a limitation thereof.
[0017] Figure 1 This is a schematic diagram of the CopulaGAN model in Embodiment 1 of the present invention; Figure 2 This is a flowchart of the Mini-Batch KMeans clustering algorithm of Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of the PCA maximum projection variance-guided clustering process in Embodiment 1 of the present invention; Figure 4 This is a flowchart of the microgrid cluster scenario partitioning method based on CopulaGAN in Embodiment 1 of the present invention. Detailed Implementation
[0018] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0019] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0020] It should be noted that the terminology used herein is for describing particular embodiments only and is not intended to limit the exemplary embodiments of the present invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof. It should be noted that, without conflict, the various embodiments and features within those embodiments can be combined with each other. The embodiments will now be described in detail with reference to the accompanying drawings.
[0021] Example 1 In one or more of the technical solutions disclosed in the implementation methods, such as Figures 1 to 4 As shown, a microgrid cluster scenario partitioning method based on CopulaGAN includes the following steps: Step 1: Obtain time series data of photovoltaic power output, wind power output and load power of microgrid clusters to perform marginal probability distribution modeling; Step 2: Map the modeled data to standard uniform variables in Copula space using the Probability Integral Transform (PIT). Step 3: Use the CopulaGAN model to learn the high-dimensional correlation structure of the standard uniform variables to obtain the joint distribution model of the power supply and consumption scenario of the microgrid group; Step 4: Generate new scene samples based on the joint distribution model using random noise, and restore them to photovoltaic power output, wind power output and load power data through the inverse transformation of each marginal distribution. After clustering and dimensionality reduction, a typical power supply and consumption scenario set of microgrid groups is formed based on the degree of separation between classes. The method in this embodiment does not directly use limited historical operating data as typical scenarios. Instead, it first models the marginal probability distributions of photovoltaic power output, wind power output, and load power to accurately characterize the probability distribution characteristics of different physical quantities. Then, it maps the data of different marginal distributions to standard uniform variables in Copula space to eliminate the influence of differences in dimensions and distribution forms on joint modeling. Furthermore, it uses CopulaGAN to learn the high-dimensional correlation structure in the standard uniform variables, enabling the generator to learn the nonlinear correlation, tail correlation, and multi-station coupling relationships implicit in the historical data among photovoltaic, wind power, and load, thereby obtaining a joint distribution model that can characterize the real operating rules of the microgrid group. Based on the trained joint distribution model, it inputs random noise to generate new power supply and consumption scenario samples, rather than being limited to screening, copying, or aggregating historical samples. This ensures that the generated scenarios not only maintain the statistical regularity and correlation structure in the historical data but can also be extended to form diverse power supply and consumption combinations that do not appear directly in the historical data but conform to the operating rules. This improves the coverage and representativeness of scenario sets for uncertain future operating states, and addresses the problem that existing methods struggle to construct high-dimensional coupled scenarios due to insufficient historical data, direct sampling, or clustering.
[0022] In this embodiment, the CopulaGAN model represents a generative modeling model that combines the Copula function with the Generative Adversarial Network (GAN). The Copula space is a variable correlation expression space constructed based on the Copula function, used to describe the joint correlation structure between the marginal distributions of different random variables.
[0023] Step 1 involves acquiring time-series data of photovoltaic power output, wind power output, and load power of the microgrid cluster to model marginal probability distributions, including the following steps: Step 11: Obtain photovoltaic power output data, wind power output data, and load power data of the microgrid group, and perform cleaning, normalization, and time series processing. Combine the obtained time series features according to time sequence to form a multi-dimensional feature vector. Step 111: Clean and normalize the acquired photovoltaic power output data, wind power output data, and load power data of the microgrid group to obtain the preprocessed photovoltaic power output sequence, wind power output sequence, and load power sequence.
[0024] Step 112: Combine the preprocessed photovoltaic power output sequence, wind power output sequence, and load power sequence according to time series to obtain a joint time series; The photovoltaic output of each transformer area Wind power output Load power By combining time series data, a joint time series, i.e., a multidimensional feature vector containing M microgrid distribution areas, T time points, and a dimension of 3M×T, is formed, which can be represented as: ; in, , , Let be the photovoltaic power output, wind power output, and load power of the m-th transformer area at a certain time t.
[0025] Step 12: Identify the variable types of each dimension in the joint time series and classify them into photovoltaic power output variables, wind power output variables, and load power variables; Step 13: Model the marginal probability distributions of photovoltaic power output variables, wind power output variables, and load power variables using Beta, Weibull, and GMM distributions, respectively; Specifically, photovoltaic power output is modeled using a Beta distribution, wind power output using a Weibull distribution, and load using a GMM distribution. Step 131: Fit the photovoltaic output variable to a Beta distribution to obtain the marginal cumulative distribution function of the photovoltaic output variable; Assume the marginal distribution of each dimension Xi is When Xi corresponds to the photovoltaic output variable When the edge distribution is obtained by fitting the Beta distribution, its edge distribution is the photovoltaic output edge distribution.
[0026] Photovoltaic output modeling shows that photovoltaic power is mainly affected by irradiance, temperature, and module parameters. Photovoltaic output generally exhibits a cutoff distribution, with a large number of low values appearing at noon and in the afternoon, and the peak value concentrated at noon. Specifically, extract photovoltaic power output variables from the joint time series. And for each transformer area m, its photovoltaic output at T time points is used to form a sample sequence: ; Treating photovoltaic output as a random variable, we model it using a Beta distribution, with the following formula: ; Its probability density function is: ; in, ; The shape parameter of the Beta distribution; Output values are lower in the morning and evening. Large), with peak output at noon ( The characteristics of the Beta distribution (large) are as follows: The expected value and variance are: ; Based on the mean and variance of the photovoltaic power output sample sequence, and combined with the expectation and variance of the Beta distribution, the shape parameter of the Beta distribution is estimated. This yields the marginal probability distribution of the photovoltaic output variable. The next step in this invention is to map the heterogeneous data to a unified Copula space. According to the probability integral transformation theorem, the output value of the cumulative distribution function is strictly between [0,1] and monotonically increasing. By using the marginal cumulative distribution function, the differences in physical dimensions and the heterogeneity of distribution forms among photovoltaic, wind power, and load can be eliminated, while perfectly preserving the relative probability position of each sample point in the original distribution, providing standardized data for subsequent learning of high-dimensional correlation structures using CopulaGAN. Assuming the marginal cumulative distribution function for each dimension Xi is... The formula is expressed as follows: ; Step 132: Fit the wind power output variable to a Weibull distribution to obtain the marginal cumulative distribution function of the wind power output variable; Step 1321: Extract wind power output related variables from the joint time series to obtain the wind power output component sample series; ; Step 1322: Establish a Weibull distribution model for wind speed; Since wind power output is directly related to wind speed V, we first model the wind speed V using a Weibull distribution, which is expressed as: ; In the formula, k represents the shape. Representative scale.
[0027] Step 1323: Based on the relationship between wind speed V and wind power output, establish the wind turbine output power function. : ; in, To activate the wind speed, Rated wind speed, To cut off the wind speed.
[0028] Step 1324: Based on the Weibull distribution of wind speed V and the wind turbine output power function The marginal probability distribution of wind power output variables is obtained: For the i-th dimension of wind power output variable Xi in the joint time series, its marginal distribution is expressed as: Furthermore, combining the Weibull cumulative distribution function F established in step 1322...V (v) and the segmented output power function P of the wind turbine in step 1323 WT (V), due to the segmented physical characteristics of wind turbine output, including cut-in, cut-out, and rated power locking, the marginal cumulative distribution function F of the wind power output variable... i (x) is transformed into the following piecewise function form through probability integral mapping: ; In the formula, Let V be the Weibull cumulative distribution function of the wind speed. It is the inverse function of the wind turbine output power function in the asymptotically increasing segment (i.e., the range from the starting wind speed to the rated wind speed).
[0029] Step 133: Use a Gaussian mixture model (GMM) to describe the load power distribution and obtain the marginal cumulative distribution function of the load power variable; Specifically, load power variables are extracted from the joint time series. The load power of the m-th transformer area at time point T is used to form a sample sequence, i.e., the load power sample: ; Because the load power exhibits multi-peak characteristics, including morning peaks, evening peaks, and nighttime troughs, the GMM model is used for modeling, and the formula is: ; in, The number of Gaussian components. The weight of the k-th Gaussian component. Let be the mean of the k-th Gaussian component. Let be the variance of the k-th Gaussian component.
[0030] The GMM parameters are estimated based on the load power samples, and the following is obtained: Substituting the obtained GMM parameters into the GMM model, we obtain the probability density function of the load power variable: ; Further, the marginal cumulative distribution function of the load power variable is obtained: In the formula, Φ is the cumulative distribution function of the standard normal distribution.
[0031] Step 2: After completing the edge probability distribution modeling, perform probability integral transformation (PIT) on the photovoltaic, wind power and load observation data based on their respective edge cumulative distribution functions to map them into standard uniform variables in Copula space; Specifically, the photovoltaic output observation value of the m-th transformer area at time t is... Wind power output observation values and load power observations Substituting the values into the marginal cumulative distribution functions obtained from the corresponding distribution modeling, and performing probability integral transformations, yields the corresponding standard uniform variables. : ; ; ; in, Let i be the cumulative probability distribution of the edge of the m-th transformer area, where i is one of PV, WT, and Load.
[0032] By concatenating the standard uniform variables corresponding to all transformer areas at time t, we obtain the joint variable vector in Copula space: ; In this embodiment, by performing probability integral transformations on photovoltaic output, wind power output, and load power respectively, the heterogeneous power data that originally followed different marginal distributions are uniformly mapped to the [0,1] interval, resulting in standard uniform variables in the Copula space. This eliminates the differences in marginal distribution forms and numerical scales between different types of power data, enabling joint probability modeling within the same Copula space. Simultaneously, this transformation preserves the relative probability positions of each variable within its marginal distribution, which is beneficial for subsequent Copula models to accurately characterize the correlation and coupling relationships between photovoltaic, wind power, and load in the microgrid cluster, improving the accuracy of joint distribution modeling and uncertainty analysis.
[0033] like Figure 1 As shown, step 3, the CopulaGAN model includes a real sample input terminal, a random noise input terminal, a generator G, a discriminator D, and a joint distribution output terminal; The real sample input terminal is used to receive the standard uniform variable obtained in step 2; The random noise input terminal is used to input the random noise variable z into the generator G. t ; Generator G is used to generate joint samples of standard uniform variables based on random noise variable zt, and output them through the joint distribution output terminal; ; in, These are the generator network parameters; Discriminator D is used to receive real samples separately. and generate samples It outputs the probability that the input sample belongs to the real sample; Specifically, a sample set {U1, U2, ..., U...} is constructed using the true standard uniform variables obtained in step 2. T As the learning object of CopulaGAN, the generator and discriminator learn adversarially to generate samples. The distribution approximates the real sample The distribution of variables allows the generator to learn the high-dimensional correlation structure between variables in the sample set of real standard uniform variables. After training, the generator is used as a joint distribution model for the power supply and consumption scenarios of microgrid groups. It is used to characterize the high-dimensional correlation structure between photovoltaic power output, wind power output, and load power.
[0034] In step 3, the generator in the CopulaGAN model is used to establish a high-dimensional Copula structure, the discriminator is used to distinguish between real multidimensional running samples and generated samples, and the real joint distribution is obtained through a generative adversarial network. Specifically, the CopulaGAN model is used to learn the high-dimensional correlation structure of standard uniform variables to obtain the joint distribution model of the power supply and consumption scenario of the microgrid group. That is, the training process of the CopulaGAN model includes the following steps: Step 31: Based on the standard uniform variables obtained in Step 2, construct the real training sample set in the Copula space: ; in, This represents the standard uniform variable vector of the microgrid group's power supply and consumption data at time t after probability integral transformation: ; in, Let represent the standard uniform variables corresponding to the photovoltaic output, wind power output, and load power of the m-th transformer area at time t, respectively.
[0035] Step 32: For the real training sample set Correlation analysis was performed on the variables in each dimension to determine the correlation structure type between photovoltaic power output, wind power output and load power; In this embodiment, there is a negative correlation between photovoltaic output and load power. That is, when the photovoltaic output is high during the day, the external purchased load or net load is relatively reduced. Therefore, the negative correlation Copula function is used to characterize the correlation between photovoltaic output and load power. Wind power output exhibits certain tail-related characteristics; therefore, a symmetric tail-related tCopula function structure is used to characterize the correlation between wind power outputs. The relationship between photovoltaic power output and wind power output is usually weak and is affected by weather and climate factors. Therefore, the Frank Copula function is used to characterize the weak correlation between photovoltaic power output and wind power output. This step yields the correlation structure types between different variables, which guides the CopulaGAN model to focus on learning the negative correlation, tail correlation, and weak correlation features between photovoltaic, wind power, and load during the training process.
[0036] Step 33: The generator based on the CopulaGAN model generates samples in the Copula space based on random noise; Let the random noise variable be... The network weight parameters of the generator are Then the generated samples output by the generator are represented as: ; in, The standard uniform variable vector generated by the generator: ; In one specific implementation, the generator G is constructed using a long short-term memory neural network to learn the temporal correlations between different time points and the spatial correlations between different transformer areas and different power types at the same time point.
[0037] This step yields a generator G, which is used during training to generate samples similar to real samples. Generate samples with consistent dimensions .
[0038] Step 34: Based on the CopulaGAN model, the discriminator determines the probability that the input sample is a real sample, and then performs a discrimination test on the real sample. and generate samples Perform the judgment; Step 35: Perform adversarial training on the generator G and discriminator D in the Copula space. By alternately optimizing the generator and discriminator D, the distribution of samples generated by the generator is made to approximate the distribution of real samples. Finally, the CopulaGAN model reaches Nash equilibrium, and the trained CopulaGAN model is obtained. The generator of the CopulaGAN model is used as the joint distribution model. The objective function for adversarial training is: ; in: This represents the probability that the discriminator classifies a sample as true (from the true distribution). Distribution of real data This represents the probability distribution of samples generated by the generator.
[0039] Alternately optimize the generator G and discriminator D, specifically: Case 1: Given a fixed generator G, find the optimal discriminator D. The optimal discriminator is obtained by taking the partial derivative with respect to D for any generator G: ; Case 2: Substitute the optimal discriminator The optimization objective function of the generator is obtained as follows: ; When the GAN model converges, minimizing the above expression means... hour, The optimal solution is obtained, meaning the generator has successfully learned the distribution of the real data. At this point, the GAN network reaches Nash equilibrium. The specific training process stages are shown in Table 1. Table 1 shows the stages of the GAN network training data process; Step 4: Generate new scenario samples based on the joint distribution model, and restore them to photovoltaic power output, wind power output and load power data through the inverse transformation of each marginal distribution. After clustering and dimensionality reduction, select typical power supply and consumption scenario sets of microgrid groups based on the degree of separation between classes. In step 4, new scene samples are generated based on the joint distribution model. Specifically, random noise variables are obtained and input into the joint distribution model, i.e., the generator G in the CopulaGAN model of step 3, to generate different new scene samples. : ; in: ; Input multiple random noise variables to obtain a joint sample of multiple standard uniform variables: ; It should be noted that the result obtained in step 4 The samples are joint samples of standard uniform variables in Copula space, not actual power values. Subsequently, an inverse probability integral transformation is performed based on the marginal distribution functions corresponding to each variable to obtain new scenario samples of photovoltaic power output, wind power output, and load power.
[0040] In this embodiment, the photovoltaic power output, wind power output, and load power data are recovered through the inverse transformation of each edge distribution. The inverse transformation formula can be expressed as: ; in, The photovoltaic output, wind power output, and load are obtained through inverse transformation; yes The inverse CDF of the corresponding marginal distribution is to map a probability value back to the actual value of the physical quantity. These are the probability values corresponding to variables sampled from the Copula space.
[0041] Specifically, photovoltaic power output Its marginal distribution is fitted by the Beta distribution. The inverse transformation is: ; in, Let CDF be the inverse of the Beta distribution, representing the probability value. This is mapped to the actual output value of photovoltaic power generation.
[0042] Wind power output Its marginal distribution is fitted using the Weibull distribution. The inverse transformation is: ; in, Let CDF be the inverse of the Weibull distribution, representing the probability value. This is mapped to the actual output value of wind power.
[0043] load Fit its marginal distribution using the GMM distribution. The inverse transformation is: ; in, Let CDF be the inverse of the GMM distribution, representing the probability value. The value is mapped to the actual output value of the load.
[0044] A further technical solution, in step 4, involves recovering photovoltaic power output, wind power output, and load power data from the new scenario samples through inverse transformation of each edge distribution, and then performing clustering using an improved clustering algorithm, abbreviated as the Mini-BatchKMeans algorithm. This clustering method uses minimizing the within-cluster squared error (WCSS) as the objective function, and the sample distance metric is Euclidean distance. The clustering process includes the following steps: Step 41: Combine the photovoltaic power output, wind power output and load power data obtained from the inverse transformation to form a scenario sample dataset to be clustered; ; in, Let represent the i-th generated scene sample, N represent the number of generated scene samples, and p represent the feature dimension of each scene sample; Step 42: Initialize the cluster centers of the dataset X to be clustered by selecting cluster centers based on a distance-weighted probability distribution to obtain the initial cluster centers; Step 421: Randomly select a sample point from the dataset X to be clustered as the first cluster center; Specifically, let the dataset be... It needs to be divided into K classes, and a data point is uniformly and randomly selected as the first center. (i=1,2,…,N); Step 422: For each sample point Calculate its relationship with the existing set of centers. Shortest distance: ; Step 423: Select a new center based on the distance-weighted probability distribution, and then select the next center point. ; The next cluster center is selected based on distance-weighted probability, with the probability of being selected being: ; The selection is based on distance-weighted probability. Points that are farther away from the existing center are more likely to be selected as the next center, while points that are too close to the existing center have a lower probability of being selected. Repeat steps 422 and 423 until K center points are selected. These centers serve as the initial cluster centers for KMeans, and then proceed to the iterative steps of standard KMeans.
[0045] Step 43: Randomly select a mini-batch of samples, assign the nearest cluster center to the mini-batch of samples, and then update the cluster center using the mini-batch of samples in an incremental update manner. Specifically, a small batch of samples is randomly selected, represented as: ; in, The selected sample vector; For each sample Find the nearest cluster center: ; in, This represents the nearest cluster center for sample x; Using a small batch of samples, the cluster centers are updated incrementally using the following formula: ; Among them, learning rate ,in, For the first The number of times it has been updated; Step 44: Determine if the clustering has converged: Calculate the movement of the cluster centers before and after the update, and determine whether the preset convergence condition is met; if the movement of the cluster centers is less than the preset threshold, stop the iteration; otherwise, execute step 43, continue to randomly select the next batch of Mini-Batch samples and update the cluster centers. Step 45: Once the convergence condition is met, output the final cluster centers. Update each cluster center based on the sum of squared errors within each cluster as the objective function to obtain the clustering results. The final cluster centers are output as follows: ; Among them, c k This represents the cluster center of the k-th cluster, where k represents the number of clusters. The final cluster centers are used to characterize typical power supply and consumption scenarios in the generated scenario samples.
[0046] The Mini-Batch KMeans algorithm uses the sum of squared errors within the class as the objective function: ; in, Let n be the number of clusters, and n be the number of samples in each cluster. For the i-th sample in the j-th cluster, The cluster center for each cluster.
[0047] During the clustering process, the objective function J is gradually reduced by continuously updating the cluster centers, thereby making the power supply and consumption scenarios within the same cluster more similar and enabling the output cluster centers to better represent the typical scenarios of the corresponding categories.
[0048] One possible implementation is to use the Euclidean distance metric to measure the distance between samples during clustering, calculated as follows: ; Where A and B are n-dimensional column vectors. , Let A and B be the i-th components, respectively. The larger the Euclidean distance, the lower the similarity.
[0049] This embodiment employs the improved Mini-Batch KMeans clustering method described above. It initializes cluster centers using a distance-weighted approach, giving samples farther from existing cluster centers a higher probability of center selection. This mitigates the problem of unreasonable cluster center distribution caused by random initialization and improves the stability of the clustering results. Simultaneously, a Mini-Batch sample update method is used during cluster iteration, updating cluster centers only with randomly selected small batches of samples. This reduces the amount of data processed per iteration and lowers the computational complexity of large-scale scene clustering. Furthermore, an incremental cluster center update method and adaptive learning rate enable the cluster centers to converge gradually with sample iterations, improving the convergence speed and stability of the clustering process. Additionally, by minimizing the sum of squared errors within a cluster (WCSS), power supply and consumption scenarios within the same category exhibit higher similarity, thereby enhancing the representativeness of typical scenarios to the original generated scenario set. The resulting cluster centers can serve as typical power supply and consumption scenarios for microgrid clusters, used for subsequent optimization scheduling, risk assessment, and operational strategy formulation.
[0050] A further technical solution, the process of obtaining clustering labels that satisfy the scenario category based on clustering indicators and forming a typical power supply and consumption scenario set for microgrid groups, includes the following steps: Step 461, Adaptive Clustering Optimization Interval Setting and Iterative Loop: Within the set optimization interval, the clustering process is executed to obtain the cluster set under the number of clusters K and the preliminary attribution matrix of each scene sample; Specifically, the optimization interval for typical scenario categories of microgrid clusters is preset to [Kmin, Kmax], where Kmin=2 and Kmax is the maximum number of possible scenarios. Let the number of clusters K traverse from Kmin to Kmax. Under each given K value, execute the Mini-Batch KMeans clustering process of steps 42 to 45 independently to obtain the cluster set under the number of clusters K and the preliminary attribution matrix of each scene sample.
[0051] Step 462, Clustering Validity Dual-Indicator Cascade Calculation: For the clustering results under each number of clusters K, calculate the silhouette coefficient S and Davies-Bouldin index DB respectively.
[0052] Specifically, the silhouette coefficient S is used to evaluate the compactness of scene samples within their respective clusters and the separation between classes. The closer the joint mean is to 1, the more reasonable the clustering structure is. The Davies-Bouldin index (DB) is used to calculate the ratio of the sum of intra-cluster distances to the inter-cluster centroid distance between any two clusters. The smaller the overall mean, the higher the inter-cluster separation.
[0053] The formula for calculating the profile coefficient is: ; in, For the sample The average distance between it and all other samples in its cluster (intra-class average distance). For the sample With nearest neighbor cluster (and) The average distance (inter-class nearest distance) between different clusters.
[0054] The formula for calculating the Davies–Bouldin index is: ; Where K is the number of clusters, The average distance within the i-th class, The average distance within the j-th class, The distance between the cluster centers of cluster i and cluster j (inter-class separation); Step 463, Optimal number of scene categories K Pareto Joint Decision Making: Constructing an adaptive optimization objective function, which maximizes the mean of the silhouette coefficient and minimizes the mean of the DB exponent to determine the optimal number of scene categories K. Conduct joint optimization.
[0055] In this embodiment, the optimal number of scene categories K is defined. The following constraint decision equations must be satisfied: ; Find the K value that maximizes the objective function, or that makes the profile coefficient curve reach a global peak and the DB exponent curve reach a global trough, and confirm it as the optimal number of scene categories K for the current microgrid cluster cluster dataset. .
[0056] Step 464, Adaptive mapping and labeling of scene sample clustering labels: based on the obtained optimal number of scene categories K The convergent cluster centers are determined, and the clustering labels for each scene sample xi are determined based on similarity. Based on the optimal number of scene categories K Output the final convergent cluster centers c1, c2, ... c K .
[0057] Based on the Euclidean distance between each generated scene sample xi and each optimal cluster center, the final label mapping vector L=[l1,l2,...,lN] is constructed. Its corresponding clustering label Adaptive labeling generation is performed based on the following nearest neighbor principle: ; In the formula, This refers to the numerical clustering label assigned to the i-th scenario sample, used to quantitatively identify the typical power supply scenario category to which the sample belongs.
[0058] Step 465: Assigning physical labels and constructing typical scenario sets: Generate physical service labels based on the clustering labels of each scenario sample xi; encapsulate the digital labels, physical service labels, and corresponding cluster center time series curves to obtain a typical power supply and consumption scenario set for the microgrid group.
[0059] Specifically, after completing the digital labeling, a subset of samples with the same clustering label is extracted, and the physical characteristics of their corresponding cluster centers are calculated. Based on the time-series output coupling characteristics of photovoltaic, wind power, and load power exhibited by the cluster centers, specific physical business labels are assigned to the corresponding cluster labels, such as "typical scenario of high photovoltaic output - low load demand" and "typical scenario of high wind power output - bi-peak load". Finally, the set containing digital labels, physical business labels, and the time-series curves of the corresponding cluster centers is encapsulated to form the typical power supply and consumption scenario set of the microgrid group.
[0060] A further technical solution employs principal component analysis (PCA) to reduce the dimensionality of the clustered samples, projecting the high-dimensional data onto a two-dimensional or three-dimensional low-dimensional space. This involves the following steps: Step 471: Construct the sample matrix to be reduced in dimensionality, center the sample matrix, and calculate the sample covariance matrix based on the decentralized sample matrix; Specifically, the sample covariance matrix For a p-order square matrix: ; Where N is the total number of scenario samples to be dimensionality reduced; i is the index number of the sample, ranging from 1 to N; xi is the sample vector of the i-th microgrid power supply and consumption scenario, which contains the multi-dimensional operating characteristics of the scenario; X is the original high-dimensional sample matrix composed of all scenario samples. Let be the mathematical expectation of all N scene sample vectors; is an N-order identity matrix; 1N is an N-dimensional column vector with all elements equal to 1.
[0061] Let the symmetric central matrix Its physical meaning is that the sample mean is shifted to the origin, and the mathematical expectation is zero. The above central matrix Substituting into the above equation, we obtain the following p-order sample covariance matrix: ; Will Simplified to : ; Finally obtained Substituting into the above equation, the covariance matrix is further simplified to: .
[0062] Step 472: Perform eigenvalue decomposition on the sample covariance matrix, sort the eigenvalues from largest to smallest, select the eigenvectors corresponding to the first q largest eigenvalues as principal components, and project the high-dimensional data onto the principal component space. Figure 3 This diagram illustrates the maximum projection variance in PCA. The scattered points represent samples of the original microgrid power supply scenario in high-dimensional space. The direction of the long arrow indicates the projection direction with the widest data distribution and largest variance (i.e., the large variance region), corresponding to the first principal component indicated by the largest eigenvalue of the covariance matrix. This direction retains the most variability information of the original high-dimensional data. The short arrows, orthogonal to this direction, represent the dimension with the smallest variance (i.e., the small variance region), containing the least effective information and discarded during dimensionality reduction. This diagram intuitively reflects the core mathematical essence of principal component analysis: finding the optimal eigenvector that maximizes the vertical projection variance of the sample points to reconstruct high-dimensional operational scenario data into a low-dimensional space while preserving effective information features. PCA reconstructs the original high-dimensional feature space, including two basic points: maximum projection variance and minimum reconstruction distance. The objective function of PCA is to maximize the projection variance of the samples. ; In the formula, Let be the unit direction vector to be optimized, satisfying the following constraints: ; The objective function is simplified to: ; Constructing the Lagrange function ,right Taking the partial derivative of the formula, we get: ; Right now Covariance matrix eigenvalues, Covariance matrix The eigenvectors are the principal components, and the variance is maximized.
[0063] Sort the eigenvalues from largest to smallest, and select the eigenvectors corresponding to the q largest eigenvalues as principal components: ; Where q is a set value; Projecting the high-dimensional data onto the principal component space yields the dimensionality-reduced sample representation. : ; in, These are the samples after clustering and then decentering. While preserving as much of the main variance information of high-dimensional operational data as possible, the sample dimensionality is reduced, enabling the clustered photovoltaic power output, wind power output, and load power scenarios to be visualized and analyzed in two-dimensional or three-dimensional space. At the same time, by selecting the principal component direction corresponding to the largest eigenvalue, the impact of redundant and noisy features on the interpretation of clustering results can be reduced, improving the intuitiveness and analyzability of the identification results of typical power supply and consumption scenarios.
[0064] like Figure 3 The diagram shown illustrates the PCA maximum projection variance-guided clustering process. Figure 3 The scattered points represent samples of the original microgrid power supply and consumption scenario in high-dimensional space. The direction of the long arrow indicates the projection direction with the widest distribution and largest variance of the sample data (i.e., the large variance region), corresponding to the first principal component indicated by the largest eigenvalue of the covariance matrix. This direction can retain the differential information of the original high-dimensional data to the greatest extent. The short arrow orthogonal to it represents the dimension with the smallest variance (i.e., the small variance region), which contains the least effective information and is discarded during dimensionality reduction. This figure intuitively reflects the core mathematical essence of principal component analysis, which is to reconstruct high-dimensional operating scenario data into low-dimensional space and retain effective information features by finding the optimal eigenvector that maximizes the variance of the vertical projection of the sample points.
[0065] The final set of typical scenarios includes a power supply and consumption scenario set generated based on the CopulaGAN model, and a typical scenario set that retains inter-class structural characteristics after being filtered based on PCA dimensionality reduction constraints. This set of typical scenarios can be used for energy autonomy assessment, optimal scheduling, operational risk analysis, and high-reliability operation control of microgrid clusters.
[0066] This embodiment trains CopulaGAN using historical data, enabling the generator to learn the joint distribution relationship between photovoltaic power output, wind power output, and load power. In the application phase, new Copula space samples are generated by inputting random noise, and then restored to actual power scenarios through inverse probability integral transformation. This allows for the generation of a large number of new power supply and consumption scenarios while maintaining the statistical regularity and variable correlation structure of historical data. This improves the scenario set's coverage of uncertain future operating states and provides more comprehensive scenario support for microgrid group energy self-governance assessment, optimized scheduling, and reliable operation analysis.
[0067] Example 2 Based on Example 1, this example provides a microgrid cluster scenario partitioning system based on CopulaGAN, including: The distributed modeling module is configured to acquire time series data of photovoltaic power output, wind power output, and load power of microgrid clusters to perform marginal probability distribution modeling. The mapping module is configured to map the photovoltaic, wind power and load observation data after the marginal probability distribution modeling is completed to standard uniform variables in Copula space through probability integral transformation. The learning module is configured to use the CopulaGAN model to learn the high-dimensional correlation structure of standard uniform variables, thereby obtaining a joint distribution model of the power supply and consumption scenario of the microgrid group. The new scene generation module is configured to generate new scene samples based on a joint distribution model using random noise, and then restore them to photovoltaic power output, wind power output and load power data through the inverse transformation of each marginal distribution. After clustering and dimensionality reduction, the typical power supply and consumption scene set of microgrid groups is formed based on the degree of separation between classes.
[0068] The system of this invention does not directly use limited historical operating data as typical scenarios. The distribution modeling module first performs marginal probability distribution modeling for photovoltaic power output, wind power output, and load power respectively, accurately representing the probability distribution characteristics of different physical quantities. The mapping module maps data from different marginal distributions to standard uniform variables in Copula space, eliminating the influence of differences in dimensions and distribution forms on joint modeling. The learning module uses CopulaGAN to learn the high-dimensional correlation structure in the standard uniform variables, enabling the generator to learn the nonlinear correlation, tail correlation, and multi-station coupling relationships implicit in historical data between photovoltaic, wind power, and load, thereby obtaining a joint distribution model that can represent the real operating law of the microgrid group. Based on the trained joint distribution model, random noise is input to generate new power supply and consumption scenario samples, rather than being limited to filtering, copying, or aggregating historical samples. This ensures that the generated scenarios not only maintain the statistical regularity and correlation structure in historical data, but can also be extended to form diverse power supply and consumption combinations that do not appear directly in historical data but conform to the operating law. This improves the coverage and representativeness of scenario sets for uncertain future operating states, and addresses the problem that existing methods struggle to construct high-dimensional coupled scenarios due to insufficient historical data, direct sampling, or clustering.
[0069] A further technical solution involves acquiring time-series data of photovoltaic power output, wind power output, and load power of the microgrid cluster in the distributed modeling module to perform edge probability distribution modeling, including the following steps: The photovoltaic power output data, wind power output data, and load power data of the microgrid group are acquired, and then cleaned, normalized, and processed by time series. The obtained time series features are combined according to time series to form a multi-dimensional feature vector. The variables in the joint time series are identified by variable type, and the variables are divided into photovoltaic power output variables, wind power output variables and load power variables. The marginal probability distributions of photovoltaic power output, wind power output, and load power variables are modeled using Beta, Weibull, and GMM distributions, respectively.
[0070] A further technical solution involves substituting the photovoltaic power output observations, wind power output observations, and load power observations into the marginal cumulative distribution functions obtained from the corresponding distribution modeling, and performing probability integral transformation to obtain the corresponding standard uniform variables.
[0071] In the learning module, the CopulaGAN model includes a real sample input, a random noise input, a generator G, a discriminator D, and a joint distribution output. The real sample input terminal is used to receive standard uniform variables; The random noise input terminal is used to input the random noise variable z into the generator G. t ; Generator G is used to generate joint samples of standard uniform variables based on random noise variable zt, and output them through the joint distribution output terminal; Discriminator D is used to receive real samples separately. and generate samples It outputs the probability that the input sample belongs to the real sample; A further technical solution employs the CopulaGAN model to learn the high-dimensional correlation structure of standard uniform variables, thereby obtaining a joint distribution model for the power supply and consumption scenarios of microgrid groups. The training process of the CopulaGAN model includes the following steps: Based on standard uniform variables, construct a real training sample set in Copula space: For real training sample set Correlation analysis was performed on the variables in each dimension to determine the correlation structure type between photovoltaic power output, wind power output and load power; A generator based on the CopulaGAN model generates samples in the Copula space based on random noise. A discriminator based on the CopulaGAN model determines the probability that an input sample is a real sample, and then assigns the probability to each real sample. and generate samples Perform the judgment; In the Copula space, the generator G and discriminator D are trained adversarially. By alternately optimizing the generator and discriminator D, the distribution of samples generated by the generator approximates the distribution of real samples. Finally, the CopulaGAN model reaches Nash equilibrium, and the trained CopulaGAN model is obtained. The generator of the CopulaGAN model is used as the joint distribution model.
[0072] In the new scene generation module, the process of reconstructing photovoltaic power output, wind power output, and load power data from new scene samples through inverse transformation of each edge distribution, and then performing clustering, includes the following steps: Step 41: Combine the photovoltaic power output, wind power output and load power data obtained from the inverse transformation to form a scenario sample dataset to be clustered; Step 42: Initialize the cluster centers of the dataset X to be clustered by selecting cluster centers based on a distance-weighted probability distribution to obtain the initial cluster centers; Step 43: Randomly select a small batch of samples, assign the nearest cluster center to the small batch of samples, and then update the cluster center using the incremental update method based on the small batch of samples. Step 44: Determine if the clustering has converged: Calculate the movement of the cluster centers before and after the update, and determine whether the preset convergence condition is met; if the movement of the cluster centers is less than the preset threshold, stop the iteration; otherwise, execute step 43, continue to randomly select the next batch of Mini-Batch samples and update the cluster centers. Step 45: Once the convergence condition is met, output the final cluster centers. Update each cluster center based on the sum of squared errors within each cluster as the objective function to obtain the clustering results.
[0073] It should be noted that each module in this embodiment corresponds one-to-one with each step in embodiment 1, and their specific implementation process is the same, so it will not be repeated here.
[0074] Example 3 Based on Embodiment 1, this embodiment provides an electronic device, including a memory and a processor, as well as computer instructions stored in the memory and running on the processor. When the computer instructions are executed by the processor, they complete the steps in the microgrid cluster scenario partitioning method based on CopulaGAN described in Embodiment 1.
[0075] Example 4 Based on Embodiment 1, this embodiment provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, they complete the steps in the microgrid group scenario partitioning method based on CopulaGAN described in Embodiment 1.
[0076] The electronic devices proposed in this invention can be mobile terminals or non-mobile terminals. Non-mobile terminals include desktop computers, while mobile terminals include smartphones (such as Android phones, iOS phones, etc.), smart glasses, smartwatches, smart bracelets, tablet computers, laptops, personal digital assistants, and other mobile internet devices capable of wireless communication.
[0077] It should be understood that in this invention, the processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0078] The memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store information about the device type.
[0079] In implementation, each step of the above method can be completed by integrated logic circuits in the processor hardware or by instructions in software. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or by a combination of hardware and software modules in the processor. The software modules can reside in mature storage media in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, detailed descriptions are omitted here. Those skilled in the art will recognize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0080] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0081] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0082] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0083] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0084] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A microgrid cluster scenario partitioning method based on CopulaGAN, characterized in that, Includes the following steps: We acquire time-series data of photovoltaic power output, wind power output, and load power of microgrid clusters to model marginal probability distributions; After completing the marginal probability distribution modeling, the photovoltaic, wind power and load observation data are mapped to standard uniform variables in Copula space through probability integral transformation; The CopulaGAN model is used to learn the high-dimensional correlation structure of standard uniform variables to obtain a joint distribution model for the power supply and consumption scenario of microgrid groups; Based on the joint distribution model, new scene samples are generated through random noise, and the photovoltaic power output, wind power output and load power data are restored through the inverse transformation of each marginal distribution. After clustering and dimensionality reduction, a typical power supply and consumption scene set of microgrid groups is formed based on the degree of separation between classes.
2. The microgrid cluster scenario partitioning method based on CopulaGAN as described in claim 1, characterized in that, To obtain time-series data on photovoltaic power output, wind power output, and load power of a microgrid cluster for marginal probability distribution modeling, the following steps are included: The photovoltaic power output data, wind power output data, and load power data of the microgrid group are acquired, and then cleaned, normalized, and processed by time series. The obtained time series features are combined according to time series to form a multi-dimensional feature vector. The variables in the joint time series are identified by variable type, and the variables are divided into photovoltaic power output variables, wind power output variables and load power variables. The marginal probability distributions of photovoltaic power output, wind power output, and load power variables are modeled using Beta, Weibull, and GMM distributions, respectively.
3. The microgrid cluster scenario partitioning method based on CopulaGAN as described in claim 1, characterized in that, The observed values of photovoltaic power output, wind power output, and load power are substituted into the marginal cumulative distribution function obtained from the corresponding distribution model, and a probability integral transformation is performed to obtain the corresponding standard uniform variables.
4. The microgrid cluster scenario partitioning method based on CopulaGAN as described in claim 1, characterized in that, The CopulaGAN model includes a real sample input, a random noise input, a generator G, a discriminator D, and a joint distribution output. The real sample input terminal is used to receive standard uniform variables; The random noise input terminal is used to input the random noise variable z into the generator G. t ; Generator G is used to generate joint samples of standard uniform variables based on random noise variable zt, and output them through the joint distribution output terminal; Discriminator D is used to receive real samples separately. and generate samples It outputs the probability that the input sample belongs to the real sample.
5. The microgrid cluster scenario partitioning method based on CopulaGAN as described in claim 1, characterized in that, The CopulaGAN model is used to learn the high-dimensional correlation structure of standard uniform variables to obtain the joint distribution model of power supply and consumption scenarios in microgrid groups. The training process of the CopulaGAN model includes the following steps: Based on standard uniform variables, construct a real training sample set in Copula space: For real training sample set Correlation analysis was performed on the variables in each dimension to determine the correlation structure type between photovoltaic power output, wind power output and load power; A generator based on the CopulaGAN model generates samples in the Copula space based on random noise. A discriminator based on the CopulaGAN model determines the probability that an input sample is a real sample, and then assigns the probability to each real sample. and generate samples Perform the judgment; In the Copula space, the generator G and discriminator D are trained adversarially. By alternately optimizing the generator and discriminator D, the distribution of samples generated by the generator approximates the distribution of real samples. Finally, the CopulaGAN model reaches Nash equilibrium, and the trained CopulaGAN model is obtained. The generator of the CopulaGAN model is used as the joint distribution model.
6. The microgrid cluster scenario partitioning method based on CopulaGAN as described in claim 1, characterized in that, The process of clustering new scenario samples by inverse transforming each edge distribution to recover photovoltaic power output, wind power output, and load power data includes the following steps: Step 41: Combine the photovoltaic power output, wind power output and load power data obtained from the inverse transformation to form a scenario sample dataset to be clustered; Step 42: Initialize the cluster centers of the dataset X to be clustered by selecting cluster centers based on a distance-weighted probability distribution to obtain the initial cluster centers; Step 43: Randomly select a small batch of samples, assign the nearest cluster center to the small batch of samples, and then update the cluster center using the incremental update method based on the small batch of samples. Step 44: Determine if the clustering has converged: Calculate the movement of the cluster centers before and after the update, and determine whether the preset convergence condition is met; if the movement of the cluster centers is less than the preset threshold, stop the iteration; otherwise, execute step 43, continue to randomly select the next batch of Mini-Batch samples and update the cluster centers. Step 45: Once the convergence condition is met, output the final cluster centers. Update each cluster center based on the sum of squared errors within each cluster as the objective function to obtain the clustering results.
7. The microgrid cluster scenario partitioning method based on CopulaGAN as described in claim 1, characterized in that, Principal component analysis is used to reduce the dimensionality of clustered samples, projecting high-dimensional data into a two-dimensional or three-dimensional low-dimensional space.
8. A microgrid cluster scene partitioning system based on CopulaGAN, characterized in that, include: The distributed modeling module is configured to acquire time series data of photovoltaic power output, wind power output, and load power of microgrid clusters to perform marginal probability distribution modeling. The mapping module is configured to map the photovoltaic, wind power and load observation data after the marginal probability distribution modeling is completed to standard uniform variables in Copula space through probability integral transformation. The learning module is configured to use the CopulaGAN model to learn the high-dimensional correlation structure of standard uniform variables, thereby obtaining a joint distribution model of the power supply and consumption scenario of the microgrid group. The new scene generation module is configured to generate new scene samples based on a joint distribution model using random noise, and then restore them to photovoltaic power output, wind power output and load power data through the inverse transformation of each marginal distribution. After clustering and dimensionality reduction, the typical power supply and consumption scene set of microgrid groups is formed based on the degree of separation between classes.
9. An electronic device, characterized in that, It includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor. When the processor executes the computer instructions, they complete the steps in the microgrid cluster scene partitioning method based on any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, Used to store computer instructions, which, when executed by a processor, complete the steps in the CopulaGAN-based microgrid cluster scene partitioning method as described in any one of claims 1-7.