New energy capacity confidence evaluation method based on conditional denoising diffusion model

By adopting the conditional denoising diffusion model in the assessment of new energy capacity confidence, the problem of insufficient accuracy in the processing of complex new energy data is solved, and more efficient new energy capacity confidence assessment and power system reliability are achieved. analyze.

CN119397385AActive Publication Date: 2025-02-07ZHEJIANG UNIV

Patent Information

Application Number
CN202411239100.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2025-02-07
Estimated Expiration
2044-09-05

AI Technical Summary

Technical Problem

The prior art relies on historical data integrity in the assessment of new energy capacity confidence, making it difficult to process complex and variable new energy data, especially in the absence of data and noise interference.

Method used

Using the new energy capacity confidence evaluation method based on the conditional denoising diffusion model, the new energy power generation data is preprocessed and modeled by constructing and training the conditional denoising diffusion model to generate a trusted new energy random field landscape set, and based on the Capacity confidence assessment is performed for the power supply structure, failure rate parameters and historical load curve of the power system.

Benefits of technology

该方法能够更准确地捕获新能源输出功率时序数据的复杂特征,提高新能源容量置信度的分析和评估能力,增强电力系统的可靠性分析与电源规划的理论依据。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397385A_ABST
    Figure CN119397385A_ABST
Patent Text Reader

Abstract

The invention discloses a new energy capacity confidence evaluation method based on a conditional denoising diffusion model, and belongs to the field of reliability analysis and power supply planning of a power system. According to the technical scheme, wind power data and photovoltaic power data serve as input samples, firstly, a noise prediction network is trained, a conditional denoising diffusion model is constructed based on the noise prediction network, then the samples are preprocessed and modeled, and effective information in the samples is reserved; then, according to a label vector of a given scene and pure noise data, a scene set of a new energy power curve with specific characteristics is generated through a condition denoising diffusion model which is trained through reasoning; and finally, based on the scene set of the power supply installed capacity, the fault rate parameter, the historical load curve and the new energy power curve of the power grid system, evaluating the capacity confidence after the new energy accesses the power grid system through a power generation side COPT convolution method. The power supply guarantee capability of the new energy system is accurately quantified, so that guarantee is provided for safe operation of a power system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of power system reliability analysis and power supply planning, and in particular relates to a new energy capacity confidence assessment method based on a conditional denoising diffusion model. Background Art

[0002] In the new power system, new energy (such as wind power and solar energy) is developing rapidly and gradually replacing traditional fossil energy due to its renewable and environmentally friendly characteristics. However, new energy is intermittent and uncertain, and its power generation is affected by many factors such as weather and seasons. As a result, the reliability of the power grid faces severe challenges after the access of new energy to the power grid. In order to ensure the safe and reliable operation of the power system, it is crucial to scientifically and rationally evaluate the equivalent conventional unit capacity of new energy in terms of reliability (i.e., capacity confidence).

[0003] Traditional confidence assessment methods for new energy capacity mainly rely on historical data and statistical analysis, such as time series analysis, probability statistical models, etc. Although these methods can reflect the volatility characteristics of new energy to a certain extent, they are often inaccurate and lack robustness when dealing with complex and changeable new energy data. Especially when faced with practical problems such as missing data and noise interference, the performance of traditional methods is significantly reduced, making it difficult to provide reliable assessment results.

[0004] In recent years, with the rapid development of artificial intelligence technology, especially deep learning technology has achieved remarkable results in the fields of image processing and natural language processing, researchers have begun to try to apply it to the field of new energy. Deep generative models such as generative adversarial networks (GAN) and variational autoencoders (VAE) perform well in processing complex data distributions. However, these methods usually require a large amount of labeled data and have high computational costs when processing high-dimensional data, making them difficult to directly apply to actual power systems.

[0005] As an emerging deep generative model, the Denoising Diffusion Probabilistic Models (DDPM) can generate high-quality data samples through a gradual denoising process. Unlike traditional generative models, DDPM has better generation effects and higher robustness, especially when dealing with noisy high-dimensional data. Therefore, it is an urgent problem to realize the modeling generation of renewable energy power generation scenarios and accurate assessment of capacity confidence through the conditional denoising diffusion model, and provide a theoretical basis for reliability analysis and power supply planning of new power systems. Summary of the invention

[0006] The purpose of the present invention is to solve the defect of the existing new energy capacity confidence assessment technology that relies on the integrity of historical data, and to provide a new energy capacity confidence assessment method based on a conditional denoising diffusion model. The present invention uses a new energy output power time series scenario as input. The method first pre-processes and models the new energy power generation data by constructing and training a conditional denoising diffusion model to retain the effective information of the data; then, according to the given new energy scenario label vector, a credible new energy random scenario set is generated by inferring the trained conditional denoising diffusion model; finally, based on the power structure, failure rate parameters and historical load curve of the power system, the capacity confidence assessment of new energy is realized to provide guarantee for the safe operation of the power system.

[0007] In order to achieve the above-mentioned invention object, the present invention specifically adopts the following technical solutions:

[0008] A new energy capacity confidence assessment method based on a conditional denoising diffusion model comprises the following steps:

[0009] S1: Obtain historical wind power data and historical photovoltaic power data within a preset time period, wherein the wind power data includes daily wind power data, and the photovoltaic power data includes daily photovoltaic power data, and use both wind power data and photovoltaic power data as samples, calculate the mean and peak-to-valley difference of each sample, and convert the mean and peak-to-valley difference of each sample into a normalized metric value, and use the metric value of the mean and peak-to-valley difference as a label vector of each sample; construct a training set from each sample and the label vector of each sample;

[0010] S2: training a noise prediction network on the training set, and implementing a reverse denoising process with the trained noise prediction network to construct a conditional denoising diffusion model for generating new energy scenarios; wherein the noise prediction network is constructed based on an LSTM layer, a first embedding layer, a second embedding layer, an Attention layer, and a one-dimensional convolutional layer, wherein the first embedding layer is used to process label vectors, and the second embedding layer is used to process diffusion time steps;

[0011] S3: sampling pure noise data from a multivariate Gaussian distribution, inputting the label vector of a given scene and the pure noise data into the conditional denoising diffusion model for inference, and generating a scene set of a new energy power curve through step-by-step denoising;

[0012] S4: Based on the scenario set of power installed capacity, failure rate parameters, historical load curves and new energy power curves of the power grid system, the capacity confidence of new energy after connecting to the power grid system is evaluated through the COPT convolution method on the power generation side, thereby realizing the capacity confidence assessment of new energy.

[0013] Based on the above scheme, each step can be implemented in the following preferred specific manner.

[0014] Preferably, in step S2, the input of the noise prediction network is the noisy sample, the label vector of the sample and the diffusion time step corresponding to the sample, and the output is the predicted value of the noise vector contained in the noisy sample.

[0015] Preferably, in step S2, when the noise prediction network is trained, the following parameters are preset: sample batch size, length of each sample, dimension of sample label vector, training set samples as initial values, and maximum diffusion time step;

[0016] At any diffusion time step n, the noisy training set sample x n It can be expressed as:

[0017]

[0018] α i =1-β i

[0019] Where: ε n is the Gaussian noise vector added to the training set sample x0 as the initial value in the nth diffusion step; are known parameters that do not require training; x n-1 is the noisy training set sample under the diffusion time step n-1; α i represents the intermediate variable of the i-th diffusion step; β i is the diffusion rate of the ith diffusion step.

[0020] Preferably, in step S2, the loss function of the noise prediction network is the mean square error between the Gaussian noise vector added to all training set samples at all diffusion time steps and the noise vector output by the noise prediction network.

[0021] Preferably, in step S2, the specific processing flow of the noise prediction network is as follows:

[0022] S21. Inputting the noisy sample into the LSTM layer to obtain the noisy sample extended to the hidden state;

[0023] S22. Input the label vector to the first embedding layer to obtain a first output embedding; input the diffusion time step to the second embedding layer to obtain a second output embedding; add the first output embedding and the second output embedding to obtain the total output of the embedding layer:

[0024] S23. The noisy samples extended to the hidden state and the total output of the embedding layer are added as the input of the Attention layer. After being processed by the multi-head self-attention mechanism, a tensor containing the dependency information between data at different positions is obtained.

[0025] S24. Input the tensor containing the dependency information between data at different positions into the one-dimensional convolutional layer, and output the predicted value of the noise vector contained in the noise sample.

[0026] Preferably, the specific processing flow of the first embedding layer is as follows:

[0027] z c =tanh(Wc+b)

[0028] Where: W and b represent the weight and bias matrix to be trained of the linear transformation layer respectively; c represents the label vector; tanh represents the tanh activation function; z c represents the first output embedding.

[0029] Preferably, the second embedding layer is implemented by position encoding, and the second output embedding z n Specifically expressed as:

[0030]

[0031] Where: z n (:,:,2i),z n (:,:,2i+1) represent the values ​​of the second output embedding at the even index (:,:,2i) and the odd index (:,:,2i+1) respectively; H is the hidden state dimension consistent with the LSTM layer; n represents the diffusion time step.

[0032] Preferably, the number of input channels of the one-dimensional convolutional layer is the hidden state dimension H, the number of output channels is 1, and the convolution kernel size is 1×1.

[0033] Preferably, in step S3, the process of generating a scenario set of new energy power curves is as follows:

[0034] First, a vector obeying a multivariate Gaussian distribution is generated as pure noise data, and then the label vector of a given scene and the pure noise data are input into the conditional denoising diffusion model for inference. Starting from the pure noise data, the method recursively goes to the first denoising step to obtain the result of the first denoising step, and the denoising is continued until the result of the Nth denoising step is obtained after N denoising steps. The result of the Nth denoising step is used as the generated new energy power curve, and the new energy power curve constitutes a scenario set of the new energy power curve.

[0035] Preferably, the specific process of step S4 is as follows:

[0036] S41. First, the installed capacity and failure rate parameters of the power grid system are obtained from the power generation side of the power grid system, and the outage capacity probability table of all units of the power grid system is calculated by the convolution method;

[0037] S42. The difference between the historical load curve and the new energy power curve is taken as the net load curve, and the outage capacity probability table is searched for the load in each time period in the net load curve to obtain the power outage probability and the power outage amount, and the expected unpowered power supply of the power grid system under the net load curve is calculated from the power outage probability and the power outage amount, and the expected unpowered power supply is used as a reliability quantitative indicator of the power grid system;

[0038] S43. Each time a fully reliable unit with installed capacity is added to the power grid system to form a new power grid system, the outage capacity probability table is searched for the load in each time period in the historical load curve to obtain a new power outage probability and power outage amount, and the new expected unpowered power of the new power grid system under the historical load curve is calculated based on the new power outage probability and power outage amount;

[0039] S44. Installed capacity P m As the horizontal axis, the new expected unpowered energy E m As the vertical coordinate, generate a scattered point (P m ,E m ), a polynomial curve is formed by fitting all scattered points with a polynomial function, and the horizontal coordinate P of the intersection of the polynomial curve and y = E0 is calculated CC , and calculate the capacity confidence:

[0040] CC=P CC / P VRE

[0041] Where: P VRE It is the installed capacity of new energy.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] The present invention can capture the complex characteristics of renewable energy output power time series data, and can generate renewable energy power scenarios based on given label vectors, which can be used for analysis, evaluation and improvement of renewable energy capacity confidence. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 is a flow chart of the steps of the method of the present invention;

[0045] Figure 2 It is a structural diagram of the noise prediction network in the conditional denoising diffusion model of the present invention;

[0046] Figure 3 This is a flow chart of the confidence assessment of new energy capacity based on the convolution method of the present invention;

[0047] Figure 4 Schematic diagram of the change of loss function when the conditional denoising diffusion model of the present invention is trained in different scenarios; wherein, Figure 4 (a) is the wind power scenario; Figure 4 (b) is the photovoltaic scene;

[0048] Figure 5 It is a schematic diagram of the directional generation result of the wind power scenario in an embodiment of the present invention; wherein, Figure 5 (a) is the low wind power output scenario; Figure 5 (b) is the scenario of high wind power output; Figure 5 (c) is the peak-valley difference scenario of wind power;

[0049] Figure 6 It is a schematic diagram of the directional generation result of the photovoltaic scene according to an embodiment of the present invention; wherein, Figure 6 (a) is the low photovoltaic output scenario; Figure 6 (b) is the photovoltaic high output scenario. DETAILED DESCRIPTION

[0050] In order to make the above-mentioned purpose, features and advantages of the present invention more obvious and easy to understand, the specific implementation mode of the present invention is described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below. The technical features in each embodiment of the present invention can be combined accordingly without conflicting with each other.

[0051] In the description of the present invention, it should be understood that the terms "first" and "second" are only used for the purpose of distinguishing descriptions, and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features.

[0052] like Figure 1 As shown, in a preferred implementation of the present invention, the above-mentioned new energy capacity confidence assessment method based on the conditional denoising diffusion model includes the following steps S1 to S4. The specific implementation process is described in detail below.

[0053] S1: Obtain historical wind power data and photovoltaic power data within a preset time period, wherein the wind power historical data includes daily wind power data, and the photovoltaic power historical data includes daily photovoltaic power data. Take both wind power data and photovoltaic power data as samples, calculate the mean and peak-to-valley difference of each sample, convert the mean and peak-to-valley difference of each sample into normalized metric values, and use the metric values ​​of the mean and peak-to-valley difference as the label vector of each sample; construct a training set from each sample and the label vector of each sample.

[0054] S2: Training a noise prediction network on the training set, and implementing a reverse denoising process by the trained noise prediction network to construct a conditional denoising diffusion model for new energy scenario generation; wherein the noise prediction network is constructed based on an LSTM layer, a first embedding layer (first Embedding layer), a second embedding layer (second Embedding layer), an Attention layer, and a one-dimensional convolutional layer, the first embedding layer is used to process label vectors, and the second embedding layer is used to process diffusion time steps.

[0055] It should be noted that in step S2, the input of the noise prediction network is the noise sample x, the label vector c of the sample and the diffusion time step n corresponding to the sample, and the output of the noise prediction network is the noise vector prediction value contained in the noise sample x

[0056] In this embodiment, the label vector c of each sample has been obtained by step S1; the noisy sample x at each diffusion time step n can be obtained by adding noise to the sample in S1, which can be derived by a simple mathematical formula in the forward diffusion process. The forward diffusion process is common knowledge in the art and will not be described in detail.

[0057] It should be noted that in step S2, when training the noise prediction network, the following parameters can be preset first: sample batch size B, length S of each sample, dimension C of the sample label vector, training set sample x0 as the initial value, and maximum diffusion time step N.

[0058] At any diffusion time step n, the noisy training set sample x n It can be expressed as:

[0059]

[0060] α i =1-β i

[0061] In the formula, is the Gaussian noise vector added to the training set sample x0 as the initial value in the nth diffusion step, which can be obtained from the multivariate Gaussian distribution The mean of the multivariate Gaussian distribution is 0 and the variance is the unit matrix I; are known parameters that do not require training; x n-1 is the noisy training set sample under the diffusion time step n-1; α i represents the intermediate variable of the i-th diffusion step; β i is the diffusion rate of the ith diffusion step, which is determined by the noise scheduling scheme.

[0062] It should be noted that in step S2, the loss function of the noise prediction network is the Gaussian noise vector ε added to all training set samples at all diffusion time steps. n The noise vector output by the noise prediction network (i.e. the noise vector prediction value contained in the noise sample) The mean square error between them is:

[0063]

[0064] It should be noted that in step S2, the specific processing flow of the noise prediction network is as follows:

[0065] S21. Input the noisy sample x into the LSTM layer to obtain the noisy sample y expanded to the hidden state.

[0066] S22. Input the label vector c into the first embedding layer to obtain the first output embedding z c ; Input the diffusion time step n into the second embedding layer to obtain the second output embedding z n ; embed the first output into z c and the second output embedding z n Add together to get the total output of the embedding layer:

[0067] z=z c +z n

[0068] S23. The noisy sample y expanded to the hidden state and the total output z of the embedding layer are added (i.e., q=y+z) as the input of the Attention layer. After being processed by the multi-head self-attention mechanism, a tensor a containing the dependency information between data at different positions is obtained, which has the same dimension as q.

[0069] S24. Input the tensor a containing the dependency information between data at different positions into the one-dimensional convolution layer, and output the noise vector prediction value contained in the noise sample

[0070] It should be noted that, in step S2, Figure 2 As shown in the figure, the noise prediction network consists of an LSTM layer, an Embedding layer, an Attention layer, and a one-dimensional convolutional layer. The specific processing flow of each part of the noise prediction network is described below.

[0071] (1) LSTM layer

[0072] The input of the LSTM layer is a noisy sample The output is a noisy sample extended to the hidden state Here, H is the hidden state dimension.

[0073] In this embodiment, consider the sample x at the s-1th position s-1 The output result y s-1 and the long-term memory vector l s-1 Under known conditions, the output result y at the sth position s The calculation method is as follows:

[0074] y s =LSTM(x s ,y s-1 ,l s-1 ),s=2,...,S

[0075] Among them, the calculation process of LSTM() is as follows:

[0076] i s =σ(W i,s x s +b i,s +U i,s y s-1 +d i,s )

[0077] f s =σ(W f,s x s +b f,s +U f,s y s-1 +d f,s )

[0078] o s =σ(W o,s x s +b o,s +U o,s y s-1 +d o,s )

[0079] m s =tanh(W m,s x s +b m,s +U m,s y s-1 +d m,s )

[0080] l s = l s-1 ⊙f s +m s ⊙i s

[0081] y s =tanh(l s )⊙o s

[0082] Where: Wi,s , U i,s , W f,s , U f,s , W o,s , U o,s , W m,s , U m,s are the weight matrices to be trained at the sth position; b i,s d i,s 、b f,s d f,s 、b o,s d o,s 、b m,s d m,s are the bias matrices to be trained at the sth position; σ() is the sigmoid activation function; tanh() is the tanh activation function; i s 、f s , o s 、m s , l s ,y s They are the input gate vector, forget gate vector, output gate vector, input memory, long-term memory and output at the s-th position respectively; ⊙ represents element-wise multiplication.

[0083] (2) Embedding layer

[0084] The above embedding layer specifically includes an embedding layer of the label vector c (ie, the first embedding layer) and an embedding layer of the diffusion time step n (ie, the second embedding layer).

[0085] The embedding layer of the label vector c consists of a linear transformation layer and an activation function, and its output z c It can be expressed as:

[0086] z c =tanh(Wc+b)

[0087] Where W and b represent the weight and bias matrix to be trained of the linear transformation layer, respectively; c represents the label vector; and tanh represents the tanh activation function.

[0088] The embedding layer at diffusion time step n is implemented by positional encoding, and its output z n It can be expressed as:

[0089]

[0090] In the formula, z n (:,:,2i),z n (:,:,2i+1) represent the values ​​of the second output embedding at the even index (:,:,2i) and the odd index (:,:,2i+1), respectively; H is the hidden state dimension consistent with the LSTM layer.

[0091] In this embodiment, the tensor z n The first dimension is the sample batch B, and the second dimension is the length S of each sample. In the second dimension, the diffusion time steps n are the same. In the first dimension, the diffusion time steps n are different and are randomly generated.

[0092] (3) Attention layer

[0093] The Attention layer is built based on the multi-head self-attention mechanism, and its calculation process is as follows:

[0094] d k =H / head

[0095]

[0096] a=concat(h1,...,h head )W O

[0097] Where head represents the number of splits of the multi-head self-attention mechanism; H is the hidden state dimension consistent with the LSTM layer; d k represents the hidden state dimension after segmentation; h j represents the output of the jth attention head; softmax represents the softmax activation function; the superscript T represents the transpose of the matrix; h1,...,h head represents the output of the 1st,...,head attention heads; W Q , W K , W V and W O are weight matrices to be trained, W Q , W K and W V The function is to split q in the H dimension, W O The role of h1,...,h head Concatenate in the H dimension; concat represents the concatenation of matrices or tensors.

[0098] (4) One-dimensional convolutional layer (Conv 1D)

[0099] The input of the one-dimensional convolutional layer is the tensor a output by the Attention layer, which contains the dependency information between data at different positions, and the output is the noise vector prediction value contained in the noisy sample with the same dimension as tensor a. and will As the final output result of the noise prediction network.

[0100] In this embodiment, the number of input channels of the one-dimensional convolutional layer is the hidden state dimension H, the number of output channels is 1, and the convolution kernel size is 1×1.

[0101] In summary, the noise prediction network can be expressed as That is, the output of the noise prediction network is a function of the noisy sample x, the label vector c, and the diffusion time step n.

[0102] It should also be noted that after the noise prediction network is constructed and its hyperparameters such as initial learning rate, batch size, maximum diffusion steps, and maximum training generations are set, the noise prediction network can be trained on the training set and the .ckpt file with the smallest loss function can be saved.

[0103] S3: Pure noise data is sampled from a multivariate Gaussian distribution, and the label vector of a given scene and the pure noise data are input into the conditional denoising diffusion model for inference. After step-by-step denoising, a scene set of a new energy power curve is generated.

[0104] It should be noted that in step S3, the process of generating a scenario set of new energy power curves by using the trained conditional denoising diffusion model is as follows:

[0105] First generate a vector that follows a multivariate Gaussian distribution As pure noise data, the label vector of the given scene and the pure noise data are then input into the conditional denoising diffusion model for inference. N Start by recursively going to the first denoising step and get the result x′ of the first denoising step N-1 , denoising is continued until after N denoising steps, the result x0′ of the Nth denoising step is obtained, and the result of the Nth denoising step is used as the generated new energy power curve, and the new energy power curve constitutes a scenario set of the new energy power curve.

[0106] Among them, the result x′ of the Nnth denoising step n Recursively carry out the result x′ of the N-n+1th denoising step n-1 The specific process is as follows:

[0107]

[0108] Where: represents a random vector sampled from a multivariate Gaussian distribution.

[0109] S4: Based on the scenario set of power installed capacity, failure rate parameters, historical load curves and new energy power curves of the power grid system, the capacity confidence of new energy after connecting to the power grid system is evaluated through the COPT (Capacity Outage Probability Table) convolution method on the power generation side, thereby realizing the capacity confidence assessment of new energy.

[0110] It should be noted that if Figure 3 As shown, the specific process of step S4 is as follows:

[0111] S41. First, the installed capacity of power supply and the failure rate parameters of the power grid system are obtained from the power generation side of the power grid system, and the outage capacity probability table of all units of the power grid system is calculated by the convolution method.

[0112] In this embodiment, the value range and probability distribution of the total available power generation capacity can be queried from the outage capacity probability table.

[0113] S42. The difference between the historical load curve and the new energy power curve is taken as the net load curve. The outage capacity probability table is searched for the load in each time period in the net load curve to obtain the power outage probability and the power outage amount. The expected energy not supplied (EENS) E0 of the power grid system under the net load curve is calculated based on the power outage probability and the power outage amount, and the expected energy not supplied E0 is used as a quantitative indicator of the reliability of the power grid system.

[0114] S43. Each time an installed capacity P is added to the power grid system m The fully reliable units form a new power grid system, and the outage capacity probability table is searched for the load in each time period in the historical load curve to obtain the new power outage probability and power outage amount. The new expected unpowered power E of the new power grid system under the historical load curve is calculated based on the new power outage probability and power outage amount. m ; where m=1,...,M.

[0115] S44. Installed capacity P m As the horizontal axis, the new expected unpowered energy E m As the vertical coordinate, generate a scattered point (P m ,E m ), a polynomial curve is formed by fitting all scattered points with a polynomial function, and the horizontal coordinate P of the intersection of the polynomial curve and y = E0 is calculated CC , and calculate the capacity confidence:

[0116] CC=P CC / P VRE

[0117] Where: P VRE It is the installed capacity of new energy.

[0118] In order to better demonstrate the specific implementation and technical effect of the present invention, the new energy capacity confidence assessment method based on the conditional denoising diffusion model shown in steps S1 to S4 in the above preferred implementation is applied to a specific example.

[0119] Example

[0120] The specific implementation process of the new energy capacity confidence assessment method based on the conditional denoising diffusion model used in this embodiment is as described above. This embodiment uses Python programming language, Pytorch machine learning framework and GPU computing architecture CUDA to write the above S1 to S4 steps of the present invention, which will not be repeated here. The following mainly shows its specific technical effects based on case data.

[0121] Operating environment:

[0122] 12th Gen Intel(R)Core(TM)i7-12700H 2.30GHz CPU, 16GB RAM,

[0123] Microsoft Windows 11x64

[0124] NVIDIA GeForce RTX 3060Laptop GPU

[0125] Python 3.11.5

[0126] Pytorch 2.2.1

[0127] CUDA 12.1

[0128] Implementation results:

[0129] This embodiment is based on the IEEE RTS-GMLC standard test system and includes three regional power grids. The power structure and capacity parameters of the system are shown in Table 1. The peak load of the system is 8191.8MW, and the historical time series data resolution of wind power and photovoltaic power is 1h and the duration is 1 year. Some parameters for conditional denoising diffusion model training are set as follows: the initial learning rate is 1×10-4, the batch size is 4, the hidden layer dimension is 48, the number of divisions of the multi-head attention network is 4, the maximum number of diffusion steps is 50, the initial diffusion rate is 1×10-4, and the final diffusion rate is 0.5. The Adam optimization algorithm is used for a total of 200 epochs. The conditional denoising diffusion model weights of the epoch with the smallest loss function are used for subsequent reasoning.

[0130] Table 1. System power structure and installed capacity parameters

[0131]

[0132] Figure 4 The change of the loss function during the training of the conditional denoising diffusion model of the present invention is shown. The loss function type here is the mean square error, that is, MSE (Mean Square Error).

[0133] Figure 5 The directional generation results of wind power scenarios, (a) is a low-output scenario, (b) is a high-output scenario, and (c) is a peak-valley difference scenario, each containing 50 generated scenario curves. The format of the scenario label vector is set to [low-output metric, high-output metric, peak-valley difference metric]. The value of each metric is between [0,1]. The closer to 1, the closer the scenario feature is to the corresponding description. When generating wind power scenarios, the low-output scenario label is specified as [0.1, 0.9, 0.5], the high-output scenario label is specified as [0.9, 0.1, 0.5], and the peak-valley difference scenario label is specified as [0.5, 0.5, 0.9].

[0134] Figure 6 The directional generation results of the photovoltaic scene, (a) is the photovoltaic low output scene, (b) is the photovoltaic high output scene, each containing 50 generated scene curves. The format of the scene label vector here is the same as that of wind power, specifying the photovoltaic low output scene label as [0.1, 0.9, 0.5], and the photovoltaic high output scene label as [0.9, 0.1, 0.5].

[0135] Table 2 shows the capacity confidence results under various new energy scenarios. Figure 5 and Figure 6 The five scenarios generated, namely, low wind power output scenario, high wind power output scenario, wind power peak-valley difference scenario, low photovoltaic output scenario and high photovoltaic output scenario, respectively evaluate the mean, lower limit and upper limit of the confidence level of new energy capacity.

[0136] Table 2. Capacity confidence results under various new energy scenarios

[0137]

[0138]

[0139] First, based on the labeled wind power and photovoltaic historical scene samples, the respective conditional denoising diffusion models are trained. The loss function decreases rapidly in the first few epochs, and then the gradient decreases slowly because it is close to the optimal point. The loss function decreases slowly and fluctuates. After analysis, the conditional denoising diffusion model loss function of the wind power scene is the lowest in the 164th epoch, and the conditional denoising diffusion model loss function of the photovoltaic scene is the lowest in the 157th epoch. After saving the weight files of these two models to the path, they can be used for subsequent wind power and photovoltaic scene generation.

[0140] Then, in order to verify the effectiveness of the conditional denoising diffusion model, three labels of low output, high output and peak-to-valley difference are selected for wind power, and two labels of low output and high output are selected for photovoltaics (because the daily minimum power of photovoltaics is zero, and the peak-to-valley difference is basically equivalent to high output) to carry out the targeted generation of new energy scenarios. Low output and high output are judged based on the average value of wind power / photovoltaic power during the day, and the peak-to-valley difference is judged based on the difference between the maximum and minimum values ​​of wind power / photovoltaic power during the day. The measurement values ​​of these three dimensions are normalized based on historical scenarios. For example, the label of the low-output scene of wind power is [0.1, 0.9, 0.5], that is, the measurement value of 0.1 in the low-output dimension represents the lowest level of wind power that is relatively closer to the average power of historical scenarios, and the same is true for other dimensions. From Figure 5 It can be seen that the three types of wind power scenarios basically retain the characteristic of higher output at night compared to during the day, which is consistent with the characteristic of high wind speed at night and low wind speed during the day. The wind power of the low-output scenario is generally low (all lower than 0.4pu), and the wind power of the high-output scenario is generally high (basically higher than 0.4pu), and the peak-to-valley difference of the two is not large; while the ups and downs of the peak-to-valley difference scenario are very large (the highest value can reach 1.0pu, and the lowest value can reach 0.0pu). These characteristics illustrate the correctness of the wind power condition denoising diffusion model in the scene directional generation.

[0141] Similarly, the low and high output scenarios of photovoltaic can be Figure 6 Intuitively speaking, the maximum photovoltaic power during the day in the low-output scenario is around 0.6pu, and the maximum photovoltaic power during the day in the high-output scenario is around 0.8pu, which illustrates the correctness of the photovoltaic conditional denoising diffusion model in scene-oriented generation.

[0142] Finally, based on the various scenarios obtained above, the capacity confidence of new energy (that is, the capacity of conventional units that is equivalent in the reliability dimension) is evaluated, and the results are shown in Table 2. In the low-output wind power scenario, the average capacity confidence is only 2.55%, and the lower limit is as low as 0%, that is, it does not contribute to reliability. This is because wind power has no output power during the peak load during the day, and there is no risk of load loss at night although wind power has output power. The average capacity confidence of the high-output wind power scenario can reach 39.24%. The average capacity confidence of the peak-valley difference scenario of wind power is 22.97%, which is between the two, but the difference between the upper and lower limits is 61.96%, which is higher than the corresponding values ​​of the low-output and high-output scenarios of wind power, reflecting its large peak-valley difference. For photovoltaics, because its regularity is stronger than that of wind power, the lower limits of the capacity confidence of high-output and low-output scenarios are both around 12%, while the mean and upper limits of the capacity confidence of the high-output scenario are much higher than those of the low-output scenario.

[0143] The above-described embodiment is only a preferred solution of the present invention, but it is not intended to limit the present invention. A person skilled in the relevant technical field may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, any technical solution obtained by equivalent replacement or equivalent transformation falls within the protection scope of the present invention.

Claims

1. A new energy capacity confidence assessment method based on a conditional denoising diffusion model, characterized in that: The following steps are involved: S1: Obtain historical wind power data and historical photovoltaic power data within a preset time period, wherein the wind power data includes daily wind power data, and the photovoltaic power data includes daily photovoltaic power data, and use both wind power data and photovoltaic power data as samples, calculate the mean and peak-to-valley difference of each sample, and convert the mean and peak-to-valley difference of each sample into a normalized metric value, and use the metric value of the mean and peak-to-valley difference as a label vector of each sample; construct a training set from each sample and the label vector of each sample; S2: training a noise prediction network on the training set, and implementing a reverse denoising process with the trained noise prediction network to construct a conditional denoising diffusion model for generating new energy scenarios; wherein the noise prediction network is constructed based on an LSTM layer, a first embedding layer, a second embedding layer, an Attention layer, and a one-dimensional convolutional layer, wherein the first embedding layer is used to process label vectors, and the second embedding layer is used to process diffusion time steps; S3: sampling pure noise data from a multivariate Gaussian distribution, inputting the label vector of a given scene and the pure noise data into the conditional denoising diffusion model for inference, and generating a scene set of a new energy power curve through step-by-step denoising; S4: Based on the scenario set of power installed capacity, failure rate parameters, historical load curves and new energy power curves of the power grid system, the capacity confidence of new energy after connecting to the power grid system is evaluated through the COPT convolution method on the power generation side, thereby realizing the capacity confidence assessment of new energy.

2. The new energy capacity confidence assessment method based on the conditional denoising diffusion model according to claim 1, characterized in that: In step S2, the input of the noise prediction network is the noisy sample, the label vector of the sample and the diffusion time step corresponding to the sample, and the output is the predicted value of the noise vector contained in the noisy sample.

3. The new energy capacity confidence assessment method based on the conditional denoising diffusion model according to claim 1, characterized in that: In step S2, when the noise prediction network is trained, the following parameters are preset: sample batch size, length of each sample, dimension of sample label vector, training set samples as initial values, and maximum diffusion time step; At any diffusion time step n, the noisy training set sample x n It can be expressed as: α i =1-β i Where: ε n is the Gaussian noise vector added to the training set sample x0 as the initial value in the nth diffusion step; are known parameters that do not require training; x n-1 is the noisy training set sample under the diffusion time step n-1; α i represents the intermediate variable of the i-th diffusion step; β i is the diffusion rate of the ith diffusion step.

4. The new energy capacity confidence assessment method based on the conditional denoising diffusion model as claimed in claim 3 is characterized in that: In step S2, the loss function of the noise prediction network is the mean square error between the Gaussian noise vector added to all training set samples at all diffusion time steps and the noise vector output by the noise prediction network.

5. The new energy capacity confidence assessment method based on the conditional denoising diffusion model as claimed in claim 2, characterized in that: In step S2, the specific processing flow of the noise prediction network is as follows: S21. Inputting the noisy sample into the LSTM layer to obtain the noisy sample extended to the hidden state; S22. Input the label vector to the first embedding layer to obtain a first output embedding; input the diffusion time step to the second embedding layer to obtain a second output embedding; add the first output embedding and the second output embedding to obtain the total output of the embedding layer: S23. The noisy samples extended to the hidden state and the total output of the embedding layer are added as the input of the Attention layer. After being processed by the multi-head self-attention mechanism, a tensor containing the dependency information between data at different positions is obtained. S24. Input the tensor containing the dependency information between data at different positions into the one-dimensional convolutional layer, and output the predicted value of the noise vector contained in the noise sample.

6. A new energy capacity confidence assessment method based on a conditional denoising diffusion model as claimed in claim 5, characterized in that: The specific processing flow of the first embedding layer is as follows: z c =tanh(Wc+b) Where: W and b represent the weight and bias matrix to be trained of the linear transformation layer respectively; c represents the label vector; tanh represents the tanh activation function; z c represents the first output embedding.

7. The new energy capacity confidence assessment method based on the conditional denoising diffusion model as claimed in claim 5, characterized in that: The second embedding layer is implemented by position encoding, and the second output embedding z n Specifically expressed as: Where: z n (:,:,2i),z n (:,:,2i+1) represent the values ​​of the second output embedding at the even index (:,:,2i) and the odd index (:,:,2i+1) respectively; H is the hidden state dimension consistent with the LSTM layer; n represents the diffusion time step.

8. The new energy capacity confidence assessment method based on the conditional denoising diffusion model as claimed in claim 5, characterized in that: The number of input channels of the one-dimensional convolutional layer is the hidden state dimension H, the number of output channels is 1, and the convolution kernel size is 1×1.

9. The new energy capacity confidence assessment method based on the conditional denoising diffusion model according to claim 1, characterized in that: In step S3, the process of generating a scenario set of new energy power curves is as follows: First, a vector obeying a multivariate Gaussian distribution is generated as pure noise data, and then the label vector of a given scene and the pure noise data are input into the conditional denoising diffusion model for inference. Starting from the pure noise data, the method recursively goes to the first denoising step to obtain the result of the first denoising step, and the denoising is continued until the result of the Nth denoising step is obtained after N denoising steps. The result of the Nth denoising step is used as the generated new energy power curve, and the new energy power curve constitutes a scenario set of the new energy power curve.

10. The new energy capacity confidence assessment method based on conditional denoising diffusion model according to claim 1, characterized in that: The specific process of step S4 is as follows: S41. First, the installed capacity and failure rate parameters of the power grid system are obtained from the power generation side of the power grid system, and the outage capacity probability table of all units of the power grid system is calculated by the convolution method; S42. The difference between the historical load curve and the new energy power curve is taken as the net load curve, and the outage capacity probability table is searched for the load in each time period in the net load curve to obtain the power outage probability and the power outage amount, and the expected unpowered power supply of the power grid system under the net load curve is calculated from the power outage probability and the power outage amount, and the expected unpowered power supply is used as a reliability quantitative indicator of the power grid system; S43. Each time a fully reliable unit with installed capacity is added to the power grid system to form a new power grid system, the outage capacity probability table is searched for the load in each time period in the historical load curve to obtain a new power outage probability and power outage amount, and the new expected unpowered power of the new power grid system under the historical load curve is calculated based on the new power outage probability and power outage amount; S44. Installed capacity P m As the horizontal axis, the new expected unpowered energy E m As the vertical coordinate, generate a scattered point (P m ,E m ), a polynomial curve is formed by fitting all scattered points with a polynomial function, and the horizontal coordinate P of the intersection of the polynomial curve and y = E0 is calculated CC , and calculate the capacity confidence: CC=P CC / P VRE Where: P VRE It is the installed capacity of new energy.

Citation Information

Patent Citations

  • Quantitative optimal configuration method of wind-solar hybrid power system based on discrete probability model

    CN105207573A

  • New energy-energy storage system capacity confidence evaluation method considering multiple time scales

    CN116544907A

  • New energy prediction output scene generation method and system

    CN117220266A

  • Diffusion model wind power prediction method based on prior knowledge

    CN117239730A

  • Power distribution network flexibility resource scheduling method based on de-noising probability diffusion model

    CN118199161A

Cited By

  • Comprehensive energy operation scene generation and prediction method based on diffusion model

    CN120373617A

  • Non-intrusive load monitoring method and system based on double attention mechanism

    CN120525205A