A scene generation method and device based on a variational autoencoder

By combining variational autoencoders and Gaussian mixture models with DBSCAN clustering, the problem of insufficient data utilization in the generation of new energy power grid scenarios is solved, achieving efficient scenario fitting and accurate scenario generation.

CN114925767BActive Publication Date: 2025-12-05GUANGDONG POWER GRID CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210579747.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-25
Publication Date
2025-12-05
Estimated Expiration
2042-05-25

AI Technical Summary

Technical Problem

Existing scenario generation methods cannot effectively utilize data information in the uncertainty assessment of new energy power grid operation, and cannot identify the probability of scenario occurrence, resulting in wasted computing resources and insufficient scenario fitting accuracy.

Method used

A variational autoencoder is used to encode and reduce the dimensionality of high-dimensional historical time series data to a two-dimensional latent variable space. By combining Gaussian mixture model and DBSCAN density clustering, typical and extreme scenario sample points are identified, and corresponding time series data are generated through decoding.

Benefits of technology

It effectively identifies and generates new energy load scenarios that conform to the characteristics of historical data, improves the accuracy of scenario fitting, makes full use of the characteristics of historical data, and reduces the consumption of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114925767B_ABST
    Figure CN114925767B_ABST
Patent Text Reader

Abstract

The application provides a scene generation method and device based on a variational autoencoder, and the method comprises the following steps: obtaining high-dimensional historical time series data; reducing the dimension to a two-dimensional hidden variable space through a variational autoencoder to obtain a plurality of sets of scene sample point sets; modeling and classifying the probability distribution of each scene sample point to obtain a sub-distribution classification result; performing DBSCAN density clustering on the typical scene sample points and the extreme scene sample points; and decoding through a variational auto-decoder to obtain typical scene time series data and extreme scene time series data. Compared with the prior art, the historical time series data is fully utilized and the characteristics of the historical data are retained to generate new energy load scenes conforming to the distribution characteristics and time series characteristics of the historical data; the typical scene sample points and the extreme scene sample points are identified through the clustering idea, the possible operating conditions of the system are effectively reflected, and the fitting precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of new energy carrying capacity assessment, and in particular to a scene generation method and apparatus based on a variational autoencoder. Background Technology

[0002] In recent years, with the rapid growth of wind power and photovoltaic power generation capacity in the power grid, the penetration rate of new energy has increased significantly. The power generation capacity of new energy sources fluctuates due to changes in meteorological conditions. To account for the uncertainties in power grid operation caused by the large-scale integration of new energy into the grid, it is necessary to quantitatively calculate the grid's new energy carrying capacity for future years. This is of great significance for determining the medium- and long-term operation mode of the power grid and rationally planning the timing of various types of generating units.

[0003] Currently, the focus of power grid research is gradually shifting to the issue of renewable energy integration. A key evaluation method for renewable energy integration is time-series production simulation. To adapt to the innovation in renewable energy grid carrying capacity assessment methods, corresponding research is needed on renewable energy unit models and multi-time-scale scenario generation methods. Traditional scenario generation methods include Monte Carlo sampling and robust optimization. Monte Carlo sampling assumes that renewable energy output follows a certain distribution (generally a normal distribution). Based on typical scenarios, it generates a large number of operating scenarios through computer sampling and obtains operating modes that satisfy all scenarios through extensive calculations. However, this method requires significant computational resources. Robust optimization, on the other hand, obtains the most extreme mode of renewable energy output through a special method. The operating mode obtained under the most extreme scenario can be considered to satisfy all operating modes. However, these methods do not utilize minimal data and information to reflect the uncertainty of power grid operating scenarios, thus failing to construct time-series operating scenarios, nor do they identify the probability of scenario occurrence. Summary of the Invention

[0004] This invention provides a scene generation method and apparatus based on variational autoencoder, which compresses and reduces the dimensionality of historical data scene variables and identifies the occurrence probability of scene sample points after dimensionality reduction, and can reflect the possible operating conditions of the system from both typical and extreme levels.

[0005] To address the aforementioned technical problems, embodiments of the present invention provide a scene generation method based on a variational autoencoder, comprising:

[0006] Obtain high-dimensional historical time-series data;

[0007] Based on the acquired high-dimensional historical time series data, the data is encoded by a variational autoencoder to reduce the dimension to a two-dimensional latent variable space, thereby obtaining a set of several scene sample points.

[0008] Based on the Gaussian mixture model, the probability distribution of each scene sample point is modeled and classified to obtain the sub-distribution classification result corresponding to each scene sample point; wherein, the sub-distribution classification result includes the sub-distribution corresponding to each scene sample point, the sub-distribution parameter, and the probability of each scene sample point;

[0009] For all scene sample points within each sub-distribution, DBSCAN density clustering is used to determine the scene sample points at the initial cluster center in each sub-distribution as typical scene sample points. From each sub-distribution, scene sample points whose Euclidean distance from the initial cluster center meets the preset condition are selected as extreme scene sample points. Each sub-distribution contains at least one extreme scene sample point.

[0010] All typical scenario sample points and all extreme scenario sample points are decoded using a variational autodecoder to obtain typical scenario time-series data corresponding to all typical scenario sample points and extreme scenario time-series data corresponding to all extreme scenario sample points.

[0011] As a preferred embodiment, the method of modeling and classifying the probability distribution of each scene sample point based on a Gaussian mixture model to obtain the sub-distribution classification results corresponding to each scene sample point is as follows:

[0012] Initialize the normal distribution parameters of all preset sub-distributions; calculate the probability density corresponding to each scene sample point, and then determine the sub-distribution corresponding to each scene sample point; iteratively update the sub-distribution parameters of each sub-distribution by performing maximum likelihood estimation on each scene sample point until the sub-distribution parameters of all sub-distributions no longer change, and obtain the sub-distribution classification results.

[0013] As a preferred embodiment, the step of determining the scene sample points at the initial cluster center in each sub-distribution by performing DBSCAN density clustering on all scene sample points within each sub-distribution is as follows:

[0014] The scene sample point with the highest density within the sub-distribution is taken as the initial cluster center of the sub-distribution. The initial cluster center of each sub-distribution is determined, and then the scene sample points located at the initial cluster center are obtained. Scene sample points within the density radius circle in each sub-distribution are deleted.

[0015] The density of each scene sample point is calculated according to the following formula:

[0016] d en (x i )={q|d(x i ,x j ) <c mean α,j≤n,i≤n};

[0017] Where, x i Let x be the i-th scene sample pointi d en (x i (x) represents the scene sample point. i density, x j For the j-th scene sample point x j c mean denoted as the average distance between scene sample points, α as the density radius coefficient, q as the number of scene sample points in the sample set that are within the density radius, and n as the total number of scene sample points.

[0018] As a preferred embodiment, the step of selecting scene sample points from each sub-distribution whose Euclidean distance from the initial cluster center meets a preset condition as extreme scene sample points specifically involves:

[0019] From each sub-distribution, select the scene sample point that is farthest from the initial cluster center in Euclidean distance as the extreme scene sample point;

[0020] Alternatively, from each sub-distribution, select several scene sample points that satisfy the following conditions for Euclidean distance as extreme scene sample points:

[0021] E={e jr |d(e jr c j )=max d(p j c j ), e jr ∈R N′ j = 1, 2, ..., k, r =

[0022] 1,2,…,m-1};

[0023] Where k is the number of sub-distributions, j is the j-th sub-distribution, E is the set of extreme scene sample points in the r-th layer of the sub-distribution, and c j For the scene sample point of the j-th sub-distribution, e jr For the extreme scene sample point of the r-th layer corresponding to the j-th sub-distribution, p j Let d(p) be the j-th initial cluster center. j ,c j Let be the Euclidean distance between the scene sample points of the j-th sub-distribution and the initial cluster centers of the j-th sub-distribution, m be the number of layers of the extreme scene sample points, and R be the distance between them. N’ Let N' be the space of hidden variables.

[0024] As a preferred embodiment, the process involves encoding the acquired high-dimensional historical time-series data using a variational autoencoder to reduce the dimensionality to a two-dimensional latent variable space, thereby obtaining a set of several scene sample points. Specifically:

[0025] Based on high-dimensional historical time-series data, construct a variable sample set X:

[0026] X={x a |x a ∈R N};

[0027] Where a is the sample number, x a It is a vector containing N-dimensional feature variables;

[0028] Each set of variable samples is encoded using a variational autoencoder and then reduced to a two-dimensional latent variable space to obtain the set of scene sample points.

[0029]

[0030] in, It is a vector containing two-dimensional feature variables; the high-dimensional historical time series data includes raw wind power data, raw photovoltaic data and raw load data.

[0031] Accordingly, embodiments of the present invention also provide a scene generation device based on a variational autoencoder, including an acquisition module, an encoding module, a probabilistic modeling module, a clustering module, and a decoding module, wherein,

[0032] The acquisition module is used to acquire high-dimensional historical time-series data;

[0033] The encoding module is used to encode the acquired high-dimensional historical time series data using a variational autoencoder, reduce the dimension to a two-dimensional latent variable space, and obtain a set of several sets of scene sample points.

[0034] The probability modeling module is used to model and classify the probability distribution of each scene sample point based on a Gaussian mixture model, and obtain the sub-distribution classification results corresponding to each scene sample point; wherein, the sub-distribution classification results include the sub-distribution corresponding to each scene sample point, the sub-distribution parameters, and the probability of each scene sample point;

[0035] The clustering module is used to perform DBSCAN density clustering on all scene sample points within each sub-distribution to determine the scene sample points at the initial cluster center in each sub-distribution as typical scene sample points, and to select scene sample points from each sub-distribution whose Euclidean distance from the initial cluster center meets the preset conditions as extreme scene sample points; wherein, each sub-distribution contains no less than one extreme scene sample point.

[0036] The decoding module is used to decode all typical scenario sample points and all extreme scenario sample points through a variational autodecoder to obtain typical scenario time series data corresponding to all typical scenario sample points and extreme scenario time series data corresponding to all extreme scenario sample points.

[0037] As a preferred embodiment, the probability modeling module models and classifies the probability distribution of each scene sample point based on a Gaussian mixture model, obtaining the sub-distribution classification results corresponding to each scene sample point, specifically:

[0038] The probability modeling module initializes the normal distribution parameters of all preset sub-distributions; calculates the probability density corresponding to each scene sample point, and then determines the sub-distribution corresponding to each scene sample point; by performing maximum likelihood estimation on each scene sample point, iteratively updates the sub-distribution parameters of each sub-distribution until the sub-distribution parameters of all sub-distributions no longer change, and obtains the sub-distribution classification result.

[0039] As a preferred embodiment, the clustering module performs DBSCAN density clustering on all scene sample points within each sub-distribution to determine the scene sample points at the initial cluster centers in each sub-distribution, specifically as follows:

[0040] The clustering module takes the scene sample point with the highest density in the sub-distribution as the initial cluster center of the sub-distribution, determines the initial cluster center of each sub-distribution, obtains the scene sample points located at the initial cluster center, and deletes the scene sample points in each sub-distribution that are inside the density radius circle.

[0041] The density of each scene sample point is calculated according to the following formula:

[0042] d en (x i )={q|d(x i ,x j ) <c mean α,j≤n,i≤n};

[0043] Where, x i Let x be the i-th scene sample point i d en (x i (x) represents the scene sample point. i density, x j For the j-th scene sample point x j c mean denoted as the average distance between scene sample points, α as the density radius coefficient, q as the number of scene sample points in the sample set that are within the density radius, and n as the total number of scene sample points.

[0044] As a preferred embodiment, the clustering module selects scene sample points from each sub-distribution whose Euclidean distance from the initial cluster center meets a preset condition, as extreme scene sample points, specifically:

[0045] The clustering module selects the scene sample point that is farthest from the initial cluster center from each sub-distribution as the extreme scene sample point.

[0046] Alternatively, from each sub-distribution, select several scene sample points that satisfy the following conditions for Euclidean distance as extreme scene sample points:

[0047] E={e jr |d(e jr c j )=max d(p j c j ), e jr ∈R N′ j = 1, 2, ..., k, r =

[0048] 1,2,…,m-1};

[0049] Where k is the number of sub-distributions, j is the j-th sub-distribution, E is the set of extreme scene sample points in the r-th layer of the sub-distribution, and c j For the scene sample point of the j-th sub-distribution, e jr For the extreme scene sample point of the r-th layer corresponding to the j-th sub-distribution, p j Let d(p) be the j-th initial cluster center. j ,c j Let be the Euclidean distance between the scene sample points of the j-th sub-distribution and the initial cluster centers of the j-th sub-distribution, m be the number of layers of the extreme scene sample points, and R be the distance between them. N’ Let N' be the space of hidden variables.

[0050] As a preferred embodiment, the encoding module encodes the acquired high-dimensional historical time-series data using a variational autoencoder to reduce the dimensionality to a two-dimensional latent variable space, thereby obtaining a set of several sets of scene sample points, specifically:

[0051] The encoding module constructs a variable sample set X based on high-dimensional historical time-series data:

[0052] X={x a |x a ∈R N};

[0053] Where a is the sample number, x a It is a vector containing N-dimensional feature variables;

[0054] Each set of variable samples is encoded using a variational autoencoder and then reduced to a two-dimensional latent variable space to obtain the set of scene sample points.

[0055]

[0056] in, It is a vector containing two-dimensional feature variables; the high-dimensional historical time series data includes raw wind power data, raw photovoltaic data and raw load data.

[0057] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0058] This invention provides a scene generation method and apparatus based on a variational autoencoder. The method includes: acquiring high-dimensional historical time-series data; encoding the acquired high-dimensional historical time-series data using a variational autoencoder to reduce the dimensionality to a two-dimensional latent variable space, obtaining a set of several sets of scene sample points; modeling and classifying the probability distribution of each scene sample point based on a Gaussian mixture model to obtain the sub-distribution classification result corresponding to each scene sample point; wherein, the sub-distribution classification result includes the sub-distribution corresponding to each scene sample point, the sub-distribution parameters, and the probability of each scene sample point; performing DBSCAN density clustering on all scene sample points within each sub-distribution to determine the scene sample point at the initial cluster center in each sub-distribution as a typical scene sample point, and selecting scene sample points from each sub-distribution whose Euclidean distance from the initial cluster center meets a preset condition as extreme scene sample points; wherein, each sub-distribution contains at least one extreme scene sample point; decoding all typical scene sample points and all extreme scene sample points using a variational autodecoder to obtain typical scene time-series data corresponding to all typical scene sample points and extreme scene time-series data corresponding to all extreme scene sample points. Compared to existing technologies, this method fully utilizes historical time-series data and retains its characteristics to generate new energy load scenarios that conform to the distribution and time-series characteristics of historical data. By using clustering techniques, it identifies typical and extreme scenario sample points, effectively reflecting the possible operating conditions of the system and improving fitting accuracy. Attached Figure Description

[0059] Figure 1 : A flowchart illustrating an embodiment of a scene generation method based on a variational autoencoder provided by the present invention.

[0060] Figure 2 This is another flowchart illustrating an embodiment of a scene generation method based on a variational autoencoder provided by the present invention.

[0061] Figure 3 : A schematic diagram of a VAE architecture for a scene generation method based on a variational autoencoder provided by the present invention.

[0062] Figure 4 : A schematic diagram of a clustering method for a scene generation method based on a variational autoencoder provided by the present invention.

[0063] Figure 5 : A schematic diagram of an embodiment of a scene generation device based on a variational autoencoder provided by the present invention. Detailed Implementation

[0064] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0065] Example 1:

[0066] Please refer to Figure 1 and Figure 2 , Figure 1 and Figure 2 The present invention provides a flowchart of a scene generation method based on a variational autoencoder, including steps S1 to S5, wherein,

[0067] Step S1: Obtain high-dimensional historical time series data.

[0068] In this embodiment, 96-dimensional raw wind power time-series data, 96-dimensional raw photovoltaic time-series data, and 96-dimensional raw load time-series data are acquired and input into a variational autoencoder (VAE).

[0069] Step S2: Based on the acquired high-dimensional historical time series data, the data is encoded using a variational autoencoder to reduce the dimensionality to a two-dimensional latent variable space, thereby obtaining a set of several scene sample points.

[0070] In this embodiment, a Variational Autoencoder (VAE) is used. A VAE is a powerful deep generative model widely used to represent high-dimensional complex data through unsupervised learning of low-dimensional latent spaces. Its most significant feature is that it mimics the learning and prediction mechanism of an autoencoder, encoding or decoding between measurable functions. Encoding is achieved through the encoder in the VAE framework, a DNN-based inference model that approximates the posterior distribution of parameters, automatically discovering and mapping the input data to the latent variable space. The decoding step in step S5 is also implemented using a DNN-based generative model, restoring the data in the latent variable space back to the dimension of the input data.

[0071] Furthermore, the VAE method provided in this embodiment supports deep unsupervised representation learning, providing efficient inference and parameter estimation within a Bayesian framework. VAE is directly related to the concepts of latent variables and unsupervised representation learning: it assumes that the observed, potentially high-dimensional, random variables representing the data of interest are generated from low-dimensional latent variables that have never been observed through a probabilistic process. These latent variables are, to some extent, the core of the entire model: assuming that the observed data is "encoded" as a continuous function, new data can be generated from new values ​​of the latent variables. Moreover, this method can extract a solvable representation of the latent variables; that is, different latent variable representation parameters can characterize different attributes or different changing factors of the encoded original data, which will provide good interpretability for the data generation or transformation process.

[0072] A schematic diagram of the VAE architecture is shown below. Figure 3 The left trapezoid represents the encoder from high to low dimensions (denoted as e). z The right trapezoid represents the decoder from low dimension to high dimension (denoted as d). x From input x to computation of latent variable z, and output. The process is completely deterministic, as shown in the rhombus.

[0073] For VAE training, the encoder and decoder are cascaded, so the error mainly consists of two parts. One part is the information loss caused by the reconstruction of the latent variable space variables back to the high-dimensional original data in the decoder, i.e., the reconstruction loss between the probability distribution p1 of the latent variable space variables and the probability distribution p2 of the original high-dimensional data. The other part is the information loss caused by the mapping of the actual high-dimensional data in the encoder to the well-structured latent variable space. Since the ideal prior normal distribution is difficult to solve, the actual data can only be described by a distribution function that is as close to the normal distribution as possible. The difference between these two is actually the difference between the actual probability distribution p1 of the latent variable space variables and the ideal prior standard normal distribution, which is measured by the Kullback-Leibler (KL) divergence and is called KL loss.

[0074] To address the contradiction between the two sets of errors, the method used in this embodiment aims to make the spatial distribution of latent variables as close as possible to the distribution of high-dimensional data, thus preserving the characteristics of historical data. On the other hand, it also makes the spatial distribution of latent variables conform as closely as possible to a normal distribution with a good structure and easy fitting, achieving a good balance between preserving the actual characteristics of the actual data and its solvability.

[0075] For example, the step of encoding the acquired high-dimensional historical time-series data using a variational autoencoder to reduce the dimensionality to a two-dimensional latent variable space, thereby obtaining a set of several sets of scene sample points, specifically involves:

[0076] Based on high-dimensional (N-dimensional) historical time-series data of wind, solar, and load, sample variables are selected to construct a variable sample set X:

[0077] X={x a |x a ∈R N};

[0078] Where a is the sample number, x a R is a vector containing N-dimensional feature variables. N It is an N-dimensional hidden variable space;

[0079] Each set of variable samples is encoded using a variational autoencoder to reduce dimensionality. For subsequent probabilistic modeling, the dimension of the latent variable space obtained after dimensionality reduction is set to 2, resulting in a set of scene sample points.

[0080]

[0081] in, The vector contains two-dimensional feature variables; the high-dimensional historical time-series data includes raw wind power data, raw photovoltaic data, and raw load data, R 2 It is a two-dimensional implicit variable space.

[0082] Due to the mapping characteristics of VAEs, under ideal conditions, the time-series data x of any sample scenario... a It can be mapped to a standard normal distribution via VAE. That is and Therefore, scene sample points In fact, it can be mapped to a normal distribution that is infinitely close to the standard normal distribution, that is, we have

[0083] Step S3: Based on the Gaussian mixture model, model and classify the probability distribution of each scene sample point to obtain the sub-distribution classification result corresponding to each scene sample point; wherein, the sub-distribution classification result includes the sub-distribution corresponding to each scene sample point, the sub-distribution parameter, and the probability of each scene sample point.

[0084] In this embodiment, the encoder in step S2 maps high-dimensional historical time-series data, such as daily power output data or a daily power output curve, onto a Gaussian distribution in a two-dimensional space. Therefore, step S3 uses a Gaussian mixture model (GMM) to probabilistically model these scene sample points that conform to multiple Gaussian distributions.

[0085] For a single Gaussian model, it follows the probability density function (PDF):

[0086]

[0087] Where P is the probability density, x is the value of the variable on the x-axis (such as the output of new energy sources), μ is the standard deviation, and σ is the standard deviation. 2 Let θ be the variance, and θ be the scaling factor of the probability density function. This application uses a Gaussian Mixture Model (GMM) with better fitting accuracy, whose probability density function is a weighted sum of several Gaussian probability density functions.

[0088] Estimate the proportionality parameter coefficient θ of the probability density function using the maximum likelihood method:

[0089] θ = argmax θ L(θ);

[0090] Wherein, the j-th scene sample point x j The likelihood function L(θ) is given by the probability density function (pdf):

[0091]

[0092] Since the probability of each point occurring is very small, the product will also become very small, which is not conducive to calculation and observation. Therefore, it is calculated using the logarithm of the maximum likelihood function, logL(θ):

[0093]

[0094] Where, x j Let N be the number of x-axis input variables, L() be the Lagrange polynomial, k be the dimension of the latent space variables, and α be the number of scene sample points. k φ is the weighting coefficient, and φ is the density function.

[0095] To solve for the parameters of the Gaussian mixture model established in the latent variable space, the EM (Expectation-Maximization) algorithm is adopted. Its basic idea is as follows: First, estimate the model parameter values ​​based on the existing observation data; then, estimate the missing data values ​​based on the estimated parameter values ​​from the previous step; finally, estimate the parameter values ​​again based on the estimated missing data and the previously observed data, iterating repeatedly until convergence, obtaining the value of θ that maximizes the likelihood function, i.e., the maximum likelihood function estimate of θ. Therefore, based on this approach, the probability distribution model is performed on each scene sample point using the Gaussian mixture model, and the sub-distribution classification results corresponding to each scene sample point are obtained, specifically:

[0096] Initialize the normal distribution parameters of all preset sub-distributions; calculate the probability density corresponding to each scene sample point, and then determine the sub-distribution corresponding to each scene sample point; iteratively update the sub-distribution parameters of each sub-distribution by performing maximum likelihood estimation on each scene sample point until the sub-distribution parameters of all sub-distributions no longer change, and obtain the sub-distribution classification results.

[0097] By implementing the embodiments of this application, the idea of ​​grouping input data using the explicit formula of the probability distribution PDF model can be easily inserted into a more general Bayesian framework. This not only generates data but also models the data structure, such as denoising or data transformation. This satisfies the requirement of classifying scene sample points and establishing a probabilistic model after mapping a temporal scene to the latent variable space, so as to subsequently establish a scene generation model that is related to the real physical space, interpretable, and reproducible back to the temporal scene.

[0098] Step S4: For all scene sample points in each sub-distribution, use DBSCAN density clustering to determine the scene sample points in each sub-distribution that are at the initial cluster center as typical scene sample points. Also, select scene sample points from each sub-distribution whose Euclidean distance from the initial cluster center meets the preset conditions as extreme scene sample points. Each sub-distribution contains at least one extreme scene sample point.

[0099] In this embodiment, refer to Figure 4 For any scene sample point (x, y) in the two-dimensional latent variable space, the horizontal axis x represents the low-frequency fluctuations of the original 96-dimensional time series data, while the vertical axis y represents the high-frequency fluctuations of the original time series data. Therefore, each scene sample point within each sub-distribution reflects the fluctuation characteristics of the original time series data, and the density of each scene sample point at different locations in space within each sub-distribution reflects the proportion of curves with this fluctuation characteristic.

[0100] Suppose the dataset to be clustered has p-dimensional features and is X = {x1, x2, ..., x...} n}, the k initial cluster centers are C1, C2, ..., C k Using W1, W2, ..., W k Let W represent the set of samples contained in k classes, and the total set of samples is W.

[0101] Then the i-th scene sample point x i With the j-th scene sample point x j The Euclidean distance d(x) between them i x j )for:

[0102]

[0103] Then, the average distance c between scene sample points is calculated according to the following formula. mean :

[0104]

[0105] Where n is the total number of scene sample points.

[0106] Then the scene sample point x is obtained.i density d en (x i ):

[0107] d en (x i )={q|d(x j ,x i ) <c mean α,j≤n,i≤n};

[0108] Where, x i Let x be the i-th scene sample point i x j For the j-th scene sample point x j α is the density radius coefficient, q is the number of scene sample points in the sample set that are within the density radius, and n is the total number of scene sample points.

[0109] In this embodiment, the step of determining the scene sample points at the initial cluster center in each sub-distribution by performing DBSCAN density clustering on all scene sample points within each sub-distribution specifically involves:

[0110] The scene sample point with the highest density within a sub-distribution is used as the initial cluster center of the sub-distribution. The initial cluster center of each sub-distribution is determined, and the scene sample points located at the initial cluster centers are obtained. Then, scene sample points within the density radius circle of each sub-distribution are deleted.

[0111] Find the sample with the highest density in W. Use this as the initial cluster center for the c-th category, and remove scene sample points that are within the density radius circle. Specifically:

[0112]

[0113] Where n is the total number of scene sample points, and r is the clustering sequence.

[0114] Repeat the steps of finding the initial cluster center until the initial cluster center corresponding to each sub-distribution is found, and obtain k typical scenario sample points.

[0115] Based on the determination of typical wind power-solar power-load scenarios, in each sub-distribution, the scenario sample point with the farthest Euclidean distance from the initial cluster center is selected as the extreme scenario sample point;

[0116] E={e j |d(e j c j )=max d(p j c j ), e j ∈R N′ ,j=1,2,…,k};

[0117] Among them, e j For the j-th extreme scenario sample point, p j Let R be the initial cluster center of the j-th sub-distribution. N’ Let N' be the space of hidden variables.

[0118] Alternatively, from each sub-distribution, select several scene sample points that satisfy the following conditions for Euclidean distance as extreme scene sample points:

[0119] E={e jr |d(e jr c j )=max d(p j c j ), e jr ∈R N′ j = 1, 2, ..., k, r =

[0120] 1,2,…,m-1};

[0121] Where k is the number of sub-distributions, j is the j-th sub-distribution, E is the set of extreme scene sample points in the r-th layer of the sub-distribution, and c j For the scene sample point of the j-th sub-distribution, e jr For the extreme scene sample point of the r-th layer corresponding to the j-th sub-distribution, p j Let d(p) be the j-th initial cluster center. j ,c j Let be the Euclidean distance between the scene sample points of the j-th sub-distribution and the initial cluster centers of the j-th sub-distribution, m be the number of layers of the extreme scene sample points, and R be the distance between them. N’ Let N' be the space of hidden variables.

[0122] Step S5: Decode all typical scenario sample points and all extreme scenario sample points using a variational autodecoder to obtain typical scenario time-series data corresponding to all typical scenario sample points and extreme scenario time-series data corresponding to all extreme scenario sample points.

[0123] Since all typical scenario sample points and all extreme scenario sample points are compressed scenario sample points in the latent variable space, it is also necessary to put all typical scenario sample points and all extreme scenario sample points into the VAE decoder for restoration to high-dimensional historical data, and obtain the corresponding typical scenario time series data and extreme scenario time series data.

[0124] Reference Figure 5 Accordingly, this embodiment of the invention also provides a scene generation device based on a variational autoencoder, including an acquisition module 101, an encoding module 102, a probability modeling module 103, a clustering module 104, and a decoding module 105, wherein,

[0125] The acquisition module 101 is used to acquire high-dimensional historical time series data;

[0126] The encoding module 102 is used to encode the acquired high-dimensional historical time series data through a variational autoencoder to reduce the dimension to a two-dimensional latent variable space and obtain a set of several scene sample points.

[0127] The probability modeling module 103 is used to model and classify the probability distribution of each scene sample point based on the Gaussian mixture model, and obtain the sub-distribution classification result corresponding to each scene sample point; wherein, the sub-distribution classification result includes the sub-distribution corresponding to each scene sample point, the sub-distribution parameter, and the probability of each scene sample point;

[0128] The clustering module 104 is used to perform DBSCAN density clustering on all scene sample points in each sub-distribution to determine the scene sample points in each sub-distribution that are at the initial cluster center as typical scene sample points, and to select scene sample points from each sub-distribution whose Euclidean distance from the initial cluster center meets the preset conditions as extreme scene sample points; wherein, each sub-distribution contains no less than one extreme scene sample point.

[0129] The decoding module 105 is used to decode all typical scenario sample points and all extreme scenario sample points through a variational autodecoder to obtain typical scenario time series data corresponding to all typical scenario sample points and extreme scenario time series data corresponding to all extreme scenario sample points.

[0130] For example, the probability modeling module 103 models and classifies the probability distribution of each scene sample point based on a Gaussian mixture model, obtaining the sub-distribution classification results corresponding to each scene sample point, specifically:

[0131] The probability modeling module 103 initializes the normal distribution parameters of all preset sub-distributions; calculates the probability density corresponding to each scene sample point, and then determines the sub-distribution corresponding to each scene sample point; by performing maximum likelihood estimation on each scene sample point, iteratively updates the sub-distribution parameters of each sub-distribution until the sub-distribution parameters of all sub-distributions no longer change, and obtains the sub-distribution classification result.

[0132] Preferably, the clustering module 104 performs DBSCAN density clustering on all scene sample points within each sub-distribution to determine the scene sample points at the initial cluster center in each sub-distribution, specifically as follows:

[0133] The clustering module 104 takes the scene sample point with the highest density in the sub-distribution as the initial cluster center of the sub-distribution, determines the initial cluster center of each sub-distribution, obtains the scene sample points located at the initial cluster center, and deletes the scene sample points in each sub-distribution that are inside the density radius circle.

[0134] The density d of each scene sample point is calculated according to the following formula. en (x i ):

[0135] d en (x i )={q|d(x j ,x i ) <c mean α,j≤n,i≤n};

[0136] Where, x i Let x be the i-th scene sample point i x j For the j-th scene sample point x j c mean denoted as the average distance between scene sample points, α as the density radius coefficient, q as the number of scene sample points in the sample set that are within the density radius, and n as the total number of scene sample points.

[0137] Optionally, the clustering module 104 selects scene sample points from each sub-distribution whose Euclidean distance from the initial cluster center meets a preset condition, as extreme scene sample points, specifically:

[0138] The clustering module 104 selects the scene sample point that is farthest from the initial cluster center from each sub-distribution as the extreme scene sample point.

[0139] Alternatively, from each sub-distribution, select several scene sample points that satisfy the following conditions for Euclidean distance as extreme scene sample points:

[0140] E={e jr |d(e jr c j )=max d(p j c j ), e jr ∈R N ′, j=1,2,…,k, r=1,2,…,m-1};

[0141] Where k is the number of sub-distributions, j is the j-th sub-distribution, E is the set of extreme scene sample points in the r-th layer of the sub-distribution, and c j For the scene sample point of the j-th sub-distribution, e jr For the extreme scene sample point of the r-th layer corresponding to the j-th sub-distribution, pj Let d(p) be the j-th initial cluster center. j ,c j Let be the Euclidean distance between the scene sample points of the j-th sub-distribution and the initial cluster centers of the j-th sub-distribution, m be the number of layers of the extreme scene sample points, and R be the distance between them. N’ Let N' be the space of hidden variables.

[0142] In this embodiment, the encoding module 102 encodes the acquired high-dimensional historical time-series data using a variational autoencoder to reduce the dimensionality to a two-dimensional latent variable space, thereby obtaining a set of several sets of scene sample points. Specifically:

[0143] The encoding module 102 constructs a variable sample set X based on high-dimensional historical time-series data:

[0144] X={x a |x a ∈R N};

[0145] Where a is the sample number, x a It is a vector containing N-dimensional feature variables;

[0146] Each set of variable samples is encoded using a variational autoencoder and then reduced to a two-dimensional latent variable space to obtain the set of scene sample points.

[0147]

[0148] in, It is a vector containing two-dimensional feature variables; the high-dimensional historical time series data includes raw wind power data, raw photovoltaic data and raw load data.

[0149] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0150] This invention provides a scene generation method and apparatus based on a variational autoencoder. The method includes: acquiring high-dimensional historical time-series data; encoding the acquired high-dimensional historical time-series data using a variational autoencoder to reduce the dimensionality to a two-dimensional latent variable space, obtaining a set of several sets of scene sample points; modeling and classifying the probability distribution of each scene sample point based on a Gaussian mixture model to obtain the sub-distribution classification result corresponding to each scene sample point; wherein, the sub-distribution classification result includes the sub-distribution corresponding to each scene sample point, the sub-distribution parameters, and the probability of each scene sample point; performing DBSCAN density clustering on all scene sample points within each sub-distribution to determine the scene sample point at the initial cluster center in each sub-distribution as a typical scene sample point, and selecting scene sample points from each sub-distribution whose Euclidean distance from the initial cluster center meets a preset condition as extreme scene sample points; wherein, each sub-distribution contains at least one extreme scene sample point; decoding all typical scene sample points and all extreme scene sample points using a variational autodecoder to obtain typical scene time-series data corresponding to all typical scene sample points and extreme scene time-series data corresponding to all extreme scene sample points. Compared to existing technologies, this method fully utilizes historical time-series data and retains its characteristics to generate new energy load scenarios that conform to the distribution and time-series characteristics of historical data. By using clustering techniques, it identifies typical and extreme scenario sample points, effectively reflecting the possible operating conditions of the system and improving fitting accuracy.

[0151] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that 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 for those skilled in the art.

Claims

1. A scene generation method based on a variational autoencoder, characterized in that, include: Acquire high-dimensional historical time-series data; the high-dimensional historical time-series data includes raw wind power data, raw photovoltaic data, and raw load data; Based on the acquired high-dimensional historical time series data, the data is encoded by a variational autoencoder to reduce the dimension to a two-dimensional latent variable space, thereby obtaining a set of several scene sample points. Based on the Gaussian mixture model, the probability distribution of each scene sample point is modeled and classified to obtain the sub-distribution classification result corresponding to each scene sample point; wherein, the sub-distribution classification result includes the sub-distribution corresponding to each scene sample point, the sub-distribution parameter, and the probability of each scene sample point; For all scene sample points within each sub-distribution, DBSCAN density clustering is used to determine the scene sample points at the initial cluster center in each sub-distribution as typical scene sample points. From each sub-distribution, scene sample points whose Euclidean distance from the initial cluster center meets the preset condition are selected as extreme scene sample points. Each sub-distribution contains at least one extreme scene sample point. All typical scenario sample points and all extreme scenario sample points are decoded through a variational autodecoder to obtain typical scenario time series data corresponding to all typical scenario sample points and extreme scenario time series data corresponding to all extreme scenario sample points. The step of selecting scene sample points from each sub-distribution whose Euclidean distance from the initial cluster center meets a preset condition as extreme scene sample points is as follows: From each sub-distribution, select the scene sample point that is farthest from the initial cluster center in Euclidean distance as the extreme scene sample point; Alternatively, from each sub-distribution, select several scene sample points that satisfy the following conditions for Euclidean distance as extreme scene sample points: E={e jr |d(e jr ,c j )=max d(p j ,c j ),e jr ∈R N′ ,j=1,2,…,k,r= 1,2,…,m-1}; Where k is the number of sub-distributions, j is the j-th sub-distribution, E is the set of extreme scene sample points in the r-th layer of the sub-distribution, and c j For the scene sample point of the j-th sub-distribution, e jr For the extreme scene sample point of the r-th layer corresponding to the j-th sub-distribution, p j Let d(p) be the j-th initial cluster center. j ,c j Let be the Euclidean distance between the scene sample points of the j-th sub-distribution and the initial cluster centers of the j-th sub-distribution, m be the number of layers of the extreme scene sample points, and R be the distance between them. N’ It is an N'-dimensional hidden variable space; The process involves encoding the acquired high-dimensional historical time-series data using a variational autoencoder to reduce the dimensionality to a two-dimensional latent variable space, thereby obtaining a set of several scene sample points. Based on high-dimensional historical time-series data, construct a variable sample set X: X={x a |x a ∈R N }; Where a is the sample number, x a It is a vector containing N-dimensional feature variables; Each set of variable samples is encoded using a variational autoencoder and then reduced to a two-dimensional latent variable space to obtain the set of scene sample points. in, It is a vector containing two-dimensional feature variables.

2. The scene generation method based on variational autoencoder as described in claim 1, characterized in that, The method involves modeling and classifying the probability distribution of each scene sample point based on a Gaussian mixture model to obtain the sub-distribution classification results corresponding to each scene sample point. Initialize the normal distribution parameters of all preset sub-distributions; calculate the probability density corresponding to each scene sample point, and then determine the sub-distribution corresponding to each scene sample point; iteratively update the sub-distribution parameters of each sub-distribution by performing maximum likelihood estimation on each scene sample point until the sub-distribution parameters of all sub-distributions no longer change, and obtain the sub-distribution classification results.

3. The scene generation method based on variational autoencoder as described in claim 1, characterized in that, The process of determining the scene sample points at the initial cluster center in each sub-distribution by performing DBSCAN density clustering on all scene sample points within each sub-distribution is as follows: The scene sample point with the highest density within the sub-distribution is taken as the initial cluster center of the sub-distribution. The initial cluster center of each sub-distribution is determined, and then the scene sample points located at the initial cluster center are obtained. Scene sample points within the density radius circle in each sub-distribution are deleted. The density of each scene sample point is calculated according to the following formula: d en (x i )={q|d(x i ,x j )<c mean α,j≤n,i≤n}; Where, x i Let x be the i-th scene sample point i d en (x i (x) represents the scene sample point. i density, x j For the j-th scene sample point x j c mean denoted as the average distance between scene sample points, α as the density radius coefficient, q as the number of scene sample points in the sample set that are within the density radius, and n as the total number of scene sample points.

4. A scene generation device based on a variational autoencoder, characterized in that, It includes an acquisition module, an encoding module, a probability modeling module, a clustering module, and a decoding module, among which, The acquisition module is used to acquire high-dimensional historical time-series data; the high-dimensional historical time-series data includes raw wind power data, raw photovoltaic data, and raw load data. The encoding module is used to encode the acquired high-dimensional historical time series data using a variational autoencoder, reduce the dimension to a two-dimensional latent variable space, and obtain a set of several sets of scene sample points. The probability modeling module is used to model and classify the probability distribution of each scene sample point based on a Gaussian mixture model, and obtain the sub-distribution classification results corresponding to each scene sample point; wherein, the sub-distribution classification results include the sub-distribution corresponding to each scene sample point, the sub-distribution parameters, and the probability of each scene sample point; The clustering module is used to perform DBSCAN density clustering on all scene sample points within each sub-distribution to determine the scene sample points at the initial cluster center in each sub-distribution as typical scene sample points, and to select scene sample points from each sub-distribution whose Euclidean distance from the initial cluster center meets the preset conditions as extreme scene sample points; wherein, each sub-distribution contains no less than one extreme scene sample point. The decoding module is used to decode all typical scenario sample points and all extreme scenario sample points through a variational autodecoder to obtain typical scenario time series data corresponding to all typical scenario sample points and extreme scenario time series data corresponding to all extreme scenario sample points. The clustering module selects scene sample points from each sub-distribution whose Euclidean distance from the initial cluster center meets a preset condition, as extreme scene sample points. Specifically: The clustering module selects the scene sample point that is farthest from the initial cluster center from each sub-distribution as the extreme scene sample point. Alternatively, from each sub-distribution, select several scene sample points that satisfy the following conditions for Euclidean distance as extreme scene sample points: E={e jr |d(e jr ,c j )=max d(p j ,c j ),e jr ∈R N′ ,j=1,2,…,k,r= 1,2,…,m-1}; Where k is the number of sub-distributions, j is the j-th sub-distribution, E is the set of extreme scene sample points in the r-th layer of the sub-distribution, and c j For the scene sample point of the j-th sub-distribution, e jr For the extreme scene sample point of the r-th layer corresponding to the j-th sub-distribution, p j Let d(p) be the j-th initial cluster center. j ,c j Let be the Euclidean distance between the scene sample points of the j-th sub-distribution and the initial cluster centers of the j-th sub-distribution, m be the number of layers of the extreme scene sample points, and R be the distance between them. N’ It is an N'-dimensional hidden variable space; The encoding module encodes the acquired high-dimensional historical time-series data using a variational autoencoder, reducing the dimensionality to a two-dimensional latent variable space to obtain a set of several scene sample points, specifically: The encoding module constructs a variable sample set X based on high-dimensional historical time-series data: X={x a |x a ∈R N }; Where a is the sample number, x a It is a vector containing N-dimensional feature variables; Each set of variable samples is encoded using a variational autoencoder and then reduced to a two-dimensional latent variable space to obtain the set of scene sample points. in, It is a vector containing two-dimensional feature variables.

5. The scene generation device based on a variational autoencoder as described in claim 4, characterized in that, The probability modeling module models and classifies the probability distribution of each scene sample point based on a Gaussian mixture model, obtaining the sub-distribution classification results corresponding to each scene sample point, specifically: The probability modeling module initializes the normal distribution parameters of all preset sub-distributions; calculates the probability density corresponding to each scene sample point, and then determines the sub-distribution corresponding to each scene sample point; by performing maximum likelihood estimation on each scene sample point, iteratively updates the sub-distribution parameters of each sub-distribution until the sub-distribution parameters of all sub-distributions no longer change, and obtains the sub-distribution classification result.

6. The scene generation device based on a variational autoencoder as described in claim 4, characterized in that, The clustering module performs DBSCAN density clustering on all scene sample points within each sub-distribution to determine the scene sample points at the initial cluster centers in each sub-distribution. Specifically: The clustering module takes the scene sample point with the highest density in the sub-distribution as the initial cluster center of the sub-distribution, determines the initial cluster center of each sub-distribution, obtains the scene sample points located at the initial cluster center, and deletes the scene sample points in each sub-distribution that are inside the density radius circle. The density of each scene sample point is calculated according to the following formula: d en (x i )={q|d(x i ,x j )<c mean α,j≤n,i≤n}; Where, x i Let x be the i-th scene sample point i d en (x i (x) represents the scene sample point. i density, x j For the j-th scene sample point x j c mean denoted as the average distance between scene sample points, α as the density radius coefficient, q as the number of scene sample points in the sample set that are within the density radius, and n as the total number of scene sample points.

Citation Information

Patent Citations

  • Seismic data expansion method based on variational auto-encoder

    CN111258992A

  • Reliability evaluation method, device and equipment for new energy power system and storage medium

    CN112381137A