Virtual power plant operation risk assessment method and equipment based on adaptive important sampling

By optimizing the risk assessment of virtual power plants through an adaptive importance sampling method, the problems of high computational cost and low sample utilization efficiency in traditional methods are solved, achieving efficient and accurate risk assessment of virtual power plant operation and supporting real-time decision-making in virtual power plants.

CN121860410APending Publication Date: 2026-04-14CHONGQING HUIZHI ENERGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Traditional Monte Carlo simulation methods are computationally expensive, have low sample utilization efficiency, fail to finely distinguish risk levels, and fail to fully utilize sample information from the pre-simulation stage in risk assessment of high-dimensional, massive, continuous-discrete mixed state variables in virtual power plants, thus failing to meet the real-time risk assessment requirements of virtual power plants.

Method used

An adaptive importance sampling method is adopted. By constructing an adaptive importance sampling density function, introducing a relaxed probability distribution and relaxation coefficient, iteratively optimizing the parameter set, and combining it with a multi-stage fusion risk estimation function, the sample weights are optimized and all sample information from the pre-simulation and main simulation stages is utilized to achieve efficient and accurate risk assessment.

Benefits of technology

It enables real-time assessment of virtual power plant operation risks at the minute or even second level, improving assessment efficiency and accuracy, reducing computational resource waste, providing reliable risk scanning data support, and enhancing the intelligent decision-making level of virtual power plants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121860410A_ABST
    Figure CN121860410A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of energy system digitization and risk assessment, and particularly relates to a virtual power plant operation risk assessment method and equipment based on adaptive important sampling. According to the scheme, through introduction of the relaxation probability distribution sequence and parameter optimization of the adaptive important sampling density function considering the risk level, the improved important sampling method can more accurately and rapidly approach optimal sampling distribution of the virtual power plant operation risk, the evaluation efficiency is improved, and through construction of the multi-stage fusion risk estimation function, the risk estimation efficiency is improved. All sample information generated in a pre-simulation iteration process and a main simulation stage is comprehensively utilized, so that the accuracy and the stability of evaluation indexes are remarkably improved; therefore, the problem of'computational disaster 'faced by traditional Monte Carlo simulation is effectively solved, the defects that a traditional important sampling method is low in sample utilization efficiency and does not distinguish risk levels are overcome, and key risk scanning data support can be provided for real-time market decision and internal resource scheduling of the virtual power plant.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of energy system digitization and risk assessment technology, and in particular relates to a method and equipment for virtual power plant operation risk assessment based on adaptive importance sampling. Background Technology

[0002] Virtual power plants (VPPs) utilize advanced information and communication technologies and software systems to aggregate, coordinate, and optimize a large number of dispersed distributed energy resources (DERs), energy storage systems, and controllable loads. When participating in electricity market operations and providing grid ancillary services, VPPs face multiple risks, including uncertainty in internal resource output, market price volatility, and the randomness of grid dispatch instructions. These risk factors are interdependent, resulting in a high-dimensional and massive operational state space for VPPs. To maximize operational benefits while ensuring operational safety, rapid and accurate probabilistic assessments of the operational risks of VPPs are necessary.

[0003] Monte Carlo simulation (MCS) is a classic approach for risk assessment of such high-dimensional stochastic systems. It simulates a large number of possible system states through random sampling, thereby statistically analyzing risk indicators. However, the resources aggregated in a virtual power plant are vast and diverse, resulting in a combinatorial explosion in its state space. Traditional MCS methods require astronomical sample sizes to obtain statistically reliable risk indicators (such as the probability of exceeding limits, expected power shortage, and expected penalty cost), leading to exorbitant computational costs and excessive time consumption. This makes it unsuitable for the rapid decision-making needs of market clearing and real-time scheduling scenarios, which require time-sensitive decisions at the minute or even second level—a phenomenon known as the "curse of computation."

[0004] To improve the efficiency of MCS in virtual power plant applications, variance reduction techniques such as importance sampling have been introduced. Among them, Cross-Entropy Importance Sampling (CEIS) iteratively optimizes an importance sampling density function (IS-PDF) biased towards the "risk domain" (such as power deficit or cost exceedance), effectively improving sampling efficiency for rare risk events and achieving good results in long-term planning assessments. However, when faced with the massive, high-dimensional, and continuous-discrete mixed state variables of a virtual power plant, the traditional CEIS method reveals new bottlenecks in real-time risk assessment:

[0005] Inefficient sample utilization: In the "pre-simulation" phase of parameter iteration, traditional CEIS typically sets a fixed quantile threshold, using only the top 1% to 10% of samples (i.e., elite samples) to update the important sampling density function. A large number of intermediate state samples containing some risk information are discarded, resulting in a huge waste of computational resources and failing to fully utilize the information from each sampling.

[0006] Failure to finely differentiate risk levels: In parameter optimization, all selected "elite samples" were assigned the same weight, failing to reflect the differences in the severity of risk events represented by different samples (e.g., slight power deviation versus severe power deficit, low-cost overrun versus high-cost overrun). This "one-size-fits-all" approach resulted in imprecise optimization direction, limited convergence speed, and difficulty in accurately approximating the theoretically optimal sampling distribution.

[0007] Multi-stage samples were not integrated: In the final "master simulation" risk estimation, the large number of samples generated in the pre-simulation stage were completely discarded, and only the important sampling density function determined in the last iteration was used for the final estimation. This essentially wasted a large amount of computational investment in the early stages and failed to reduce the variance of the final risk assessment result as a whole.

[0008] Although existing research attempts to combine CEIS with other methods (such as the control variable method and deep learning) to further improve efficiency, it still faces challenges such as difficulty in selecting control variables, complexity in model training, and insufficient generalization ability when dealing with high-dimensional, nonlinear, and multi-type random variable coexistence problems like virtual power plants.

[0009] Therefore, there is an urgent need in this field for a method that can completely overcome the above-mentioned defects and is specifically designed for the processing of massive amounts of data and rapid risk assessment of virtual power plants, so as to provide key data support for real-time scanning of the operational risks of virtual power plants and intelligent decision-making. Summary of the Invention

[0010] To address the shortcomings of the existing technologies, this invention provides a method for assessing the operational risks of virtual power plants based on adaptive importance sampling. This method enables real-time, high-precision assessment of the operational risks of virtual power plants, providing crucial data support for real-time scanning and intelligent decision-making regarding these risks.

[0011] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0012] In a first aspect, the present invention provides a method for assessing the operational risk of a virtual power plant based on adaptive importance sampling, comprising the following steps:

[0013] S1. Based on the working state parameters of each component in the virtual power plant, construct the virtual power plant state vector z. Based on the real-time probability distribution parameter set ξ of each component in the virtual power plant, construct the probability density function f(z|ξ) of the virtual power plant. Define the performance measurement function H(z) and the operation risk indication function J(H(z)≥T) of the virtual power plant, where T is the preset risk threshold.

[0014] S2. Based on the probability density function f(z|ξ) and the operational risk indication function J(H(z)≥T), with the optimal zero-variance important sampling density function as the objective, the optimal parameter set λ of the important sampling density function is iteratively solved by introducing a relaxation coefficient based on the relaxation probability distribution. k ;

[0015] S3. The important sampling density function q(z|λ) is solved iteratively in step S2. k Then, another sampling is performed for the main simulation. Then, for all samples generated in the iterative solution stage and the main simulation stage in step S2, the risk index estimates and their variances for each stage are calculated respectively. Using the inverse of the variance as the weight, a multi-stage fusion risk estimation function is constructed that integrates the iterative solution stage and the main simulation stage. The operation risk assessment results of the virtual power plant are then calculated.

[0016] As a preferred embodiment, in step S1, the virtual power plant state vector z and the probability distribution parameter set ξ are respectively expressed as:

[0017] z=[z1,z2,···,z m ,···,z M ],ξ=[ξ1,ξ2,…,ξ m ,…,ξ M ];

[0018] The probability density function f(z|ξ) of the virtual power plant is expressed as:

[0019] ;

[0020] in, , Let represent the operating state parameters and probability distribution parameters of the m-th element in the virtual power plant, respectively; M is the number of elements contained in the virtual power plant.

[0021] As a preferred option, in step S1, the performance measurement function H(z) of the virtual power plant is defined as the penalty cost caused by the output performance deviation between the actual adjustable output and the actual demand output of the virtual power plant.

[0022] As a preferred embodiment, step S2 specifically includes:

[0023] S201, Parameter initialization, including:

[0024] Set the maximum number of iterations K, let the iteration counter k = 1, and initialize the importance sampling density function q(z|λ0) = f(z|ξ), that is, initialize the parameter set of the importance sampling density function q(z|λ0) to λ0 =ξ; based on the relaxation probability distribution, randomly select the initial value of the relaxation coefficient in the interval (0,1). Set the pre-simulation sample size N.k The target variance threshold Cov for relaxation coefficient optimization target The value;

[0025] S202, The parameter set for iterative optimization of important sampling density functions, including:

[0026] From the current important sampling density function q(z|λ) k-1 Extract N from ) k The state vectors of each power plant are used as samples to form the sample set S for the k-th iteration stage. k ={z1, z2, ..., z i , ..., z Nk For each sample, the performance measurement function of the virtual power plant is calculated to obtain the corresponding performance measurement value H(z). i );

[0027] Optimize relaxation coefficient : so that the important sampling weights W(z,ξ,λ) k-1 , The sample variance coefficient is close to the target variance threshold Cov. target To achieve the objective, we solve for the optimal relaxation coefficient in the current k-th iteration. ;

[0028] Update parameter set λ k Using the optimal relaxation coefficient obtained from the k-th iteration and sample set S k Iteratively update the parameter set λ of the important sampling density function. k ;

[0029] S203. Convergence judgment, including:

[0030] Check whether the iteration has reached the convergence condition, which is the change in the parameter set. Less than the preset threshold If the convergence condition is not met, the iteration counter k is incremented by 1, and the process returns to step S202. If the convergence condition is met, the current iteration count k is recorded, and the optimized important sampling density function q(z|λ) is obtained. k The optimal parameter set λ k .

[0031] As a preferred option, in step S202, the relaxation coefficient is optimized. The optimization objective function is:

[0032] ;

[0033] Wherein, the relaxation coefficient value in the k-th iteration stage In (0, (Values ​​within a range) represents the relaxation coefficient value in the (k-1)th iteration stage; CV(·) represents the coefficient of variation operation, which is either the standard deviation operation or the mean operation; For the i-th sample z in the k-th iteration stage i Its important sampling density function q(z|λ) k-1 The important sampling weights corresponding to the distribution are:

[0034] ;

[0035] Where Φ(·) is the cumulative distribution function of the standard normal distribution; Let z represent the i-th sample in the k-th iteration stage. i The corresponding probability density function.

[0036] As a preferred option, in step S202, the parameter set λ of the important sampling density function is iteratively updated. k The method is as follows:

[0037] ;

[0038] in, Let λ represent the parameter set of the important sampling density function updated in the k-th iteration. k The m-th component; Represents the parameter set λ k-1 The m-th component; Let z represent the i-th sample in the k-th iteration stage. i The m-th element in; The preset proportional coefficient parameter; For the i-th sample z in the k-th iteration stage i Its important sampling density function q(z|λ) k-1 The important sampling weights corresponding to the distribution.

[0039] As a preferred option, step S3 specifically includes:

[0040] S301. After completing the k-th iteration of the solution in step S2, perform the (k+1)th stage of the main simulation, and obtain the important sampling density function q(z|λ) from the final optimized solution. k N is then extracted from ) k+1 100 samples; thus, a total of k+1 sample sets for each stage have been obtained. ,1≤ ≤k+1;

[0041] S302, For each stage ,1≤ ≤k+1, using its sample set Calculate the risk estimation function for the corresponding stage. ;

[0042] S303. Based on the obtained risk estimation functions for k+1 stages, and using the reciprocal of the variance of the risk estimation function for each stage as the weight, construct a multi-stage fusion risk estimation function for the risk index. .

[0043] As a preferred option, in step S302, the first Stage risk estimation function The expression is:

[0044] , ;

[0045] in, Indicates the first The sample size of a stage, i.e., the sample set The number of samples included; Indicates the first The parameter set of the important sampling density function of the previous stage; Indicates in the sample The penalty cost function at that time.

[0046] As a preferred embodiment, in step S303, the multi-stage fusion risk estimation function The expression is:

[0047] ;

[0048] in, For the first Stage risk estimation function The corresponding weight, this weight With the risk estimation function The variance is inversely proportional to the variance, that is:

[0049] , And there are =1;

[0050] in, This indicates variance calculation.

[0051] Secondly, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the above-described method for assessing the operational risk of a virtual power plant based on adaptive importance sampling.

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

[0053] 1. The method of this invention introduces a relaxed probability distribution sequence and optimizes the parameters of an adaptive importance sampling density function that considers risk level. This improves the importance sampling method so that it can more accurately and quickly approximate the optimal sampling distribution of virtual power plant operation risk and improves assessment efficiency, making ultra-real-time risk assessment at the minute or even second level possible.

[0054] 2. The method of this invention creatively integrates all sample information generated in the pre-simulation iteration process and the main simulation stage by constructing a multi-stage fusion risk estimation function. This not only completely avoids the problem of a large amount of pre-simulation samples being wasted in traditional methods and achieves "zero waste" of computing resources, but also effectively reduces the estimation variance of the final risk assessment result through the optimal weighting method, significantly improving the accuracy and stability (i.e., robustness) of the assessment indicators, and can provide more reliable data basis for high-risk decision-making in virtual power plants.

[0055] 3. This invention effectively solves the "computational disaster" problem faced by traditional Monte Carlo simulation, as well as the shortcomings of traditional important sampling methods such as low sample utilization efficiency and failure to distinguish risk levels. It can provide key risk scanning data support for real-time market decision-making and internal resource scheduling of virtual power plants.

[0056] 4. The processing flow of the method of this invention is clear and easy to program, and it can be seamlessly integrated into existing Virtual Power Plant Energy Management Systems (VPP-EMS) or market decision support systems as a highly efficient risk assessment engine. This method provides strong technical support for real-time risk scanning, vulnerability identification, market pricing strategy optimization, and rapid decision-making regarding flexible resources such as internal energy storage in the "operational state" of a virtual power plant, helping to enhance the proactive defense capabilities and intelligent decision-making level of virtual power plant operations. Attached Figure Description

[0057] To make the objectives, technical solutions, and advantages of the invention clearer, the invention will now be described in further detail with reference to the accompanying drawings, wherein:

[0058] Figure 1 This is a flowchart illustrating the virtual power plant operation risk assessment method based on adaptive importance sampling of the present invention. Detailed Implementation

[0059] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but only to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0060] 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.

[0061] Firstly, this invention provides a method for assessing the operational risk of virtual power plants based on adaptive importance sampling. Specifically, this method is applicable to the "operational state" of a virtual power plant (i.e., the state in which massive distributed resources are aggregated to participate in real-time grid control and market transactions). It enables efficient and accurate probability assessment of operational risk exceeding limits caused by random fluctuations in distributed photovoltaic, wind power, energy storage, and flexible loads, providing a quantitative decision-making basis for real-time bidding, internal scheduling, and risk hedging in virtual power plants.

[0062] like Figure 1 As shown, the present invention provides a rapid assessment method for probabilistic risks in the operating state of a virtual power plant based on improved adaptive importance sampling, comprising the following steps:

[0063] S1. Based on the working state parameters of each component in the virtual power plant, construct the virtual power plant state vector z. Based on the real-time probability distribution parameter set ξ of each component in the virtual power plant, construct the probability density function f(z|ξ) of the virtual power plant. Define the performance measurement function H(z) and the operation risk indication function J(H(z)≥T) of the virtual power plant, where T is the preset risk threshold.

[0064] Specifically, let z = [z1, z2, ..., z m ,···,z MLet ξ = [ξ1, ξ2, ..., ξ] be the state vector representing the operating state of each component in the virtual power plant, such as the actual output deviation of distributed photovoltaic power, the actual output deviation of wind power, the prediction error of cluster load, the real-time available capacity of energy storage devices, and the real-time node marginal price (LMP). Also, let ξ = [ξ1, ξ2, ..., ξ] m ,…,ξ M ] represents the set of probability distribution parameters corresponding to the virtual power plant state vector z, such as the mean and variance of the normal distribution, the failure probability of the Bernoulli distribution, etc. , Let and represent the operating state parameters and probability distribution parameters of the m-th element in the virtual power plant, respectively; M is the number of elements in the virtual power plant. Then, the probability density function f(z|ξ) of the virtual power plant is expressed as:

[0065] .

[0066] A performance measurement function H(z) is defined to quantify the operational risk of a virtual power plant in state z. The specific form of this function can be flexibly defined according to the evaluation objective. In this invention, the objective is to evaluate the cost losses caused by the operational risk state of the virtual power plant. Therefore, the performance measurement function H(z) is defined as the penalty cost caused by the output performance deviation (e.g., power deviation, ancillary service assessment, etc.) between the actual adjustable output and the actual demand output (e.g., output required by market bidding or dispatch instructions) of the virtual power plant.

[0067] Define a risk event indicator function J(H(z)≥T), where T is a preset risk threshold. When H(z)≥T, it indicates that an unacceptable high-risk event has occurred, and J(·) = 1; otherwise, J(·) = 0.

[0068] Based on the above definition, the expected risk cost E cost It can be represented as:

[0069] ;

[0070] Where: N t Z represents the sample size; Ω represents the system state space; z represents the z-space. j =[z 1,j ,z 2,j ,···,z M,j [x] is the j-th system state sample extracted from the original sampling density function f(z|ξ); J (H(z)≥T) is the risk event indicator function, H(z) is the system performance measure function, and C(z) is the specific penalty cost function under state z. In a given virtual power plant system, the penalty cost function C(z) is a fixed function, which can be determined by the fast power flow calculation and cost calculation model within the virtual power plant.

[0071] S2. Based on the probability density function f(z|ξ) and the operational risk indication function J(H(z)≥T), with the optimal zero-variance important sampling density function as the objective, the optimal parameter set λ of the important sampling density function is iteratively solved by introducing a relaxation coefficient based on the relaxation probability distribution. k .

[0072] In this step, to consider the differences in importance of different samples in the cross-entropy parameter optimization model, i.e., to treat minor samples as general and major samples as important, and also to ensure that all pre-simulated samples can participate in parameter set optimization, the discrete indicator function J(H(z)≥T) can be expressed in the following limiting form:

[0073] ;

[0074] In the formula: ρ is called the relaxation coefficient, and Φ(·) is the standard normal distribution function. When the relaxation coefficient ρ is close to zero, for a fault event H(z)≥T, its Φ(-H(z)ρ) will approach 1, while for a normal system state H(z)≤T, its Φ(-H(z) / ρ) will approach 0. Therefore, the discrete indicator function J(H(z)≥T) can be replaced by Φ(-H(z) / ρ) with ρ→0.

[0075] For the theoretically optimal zero-variance important sampling density function q opt (z|Q opt =J(H(z)≥T)f(z|ξ) / P risk Direct estimation is very difficult because q opt (z|Q opt ) is only distributed in the risk region, and to directly estimate q opt (z|Q opt This requires extracting sufficient samples from the risk domain. However, when the system reliability level is high, the risk domain is very scarce, and the extraction of risk domain samples will be extremely time-consuming.

[0076] To solve this problem, this invention adopts an iterative estimation method, the core idea of ​​which is: to find the optimal q opt (z|Q opt Gradual relaxation is performed to guide the sampling distribution to gradually approach the risk region. To this end, a series of gradually decreasing relaxation coefficients {ρ1>ρ2>…ρ} are set. K >0}, and construct a series of corresponding relaxed probability distributions {π1(z), π2(z), ..., π}. K (z)}, where the relaxation probability distribution π k The expression for (z) is as follows:

[0077] ;

[0078] In the formula: Φ(·) is the cumulative distribution function of the standard normal distribution, used to smoothly approximate the discrete indicator function J(·). When the relaxation coefficient ρ K When the value of is close to zero, for a risk event H(z)≥T, its Φ(-H(z) / ρ k The value will approach 1, and for the safe state where H(z) < T, its Φ(-H(z) / ρ) k η will approach 0. k The relaxation probability, called the k-th stage, is a normalization constant that ensures π k (z) is a probability density function, and η k =∫ Ω Φ(-H(z) / ρ k ) f(z |ξ)dz.

[0079] Then, with the relaxed probability distribution π k With the objective of (z) (1≤k≤K), iterative cross-entropy optimization is performed on the parameterized important sampling density function q(z|λ) (usually chosen to belong to the same distribution family as f(z|ξ). A parameter optimization model is established with the objective of minimizing the cross-entropy between the two, and the optimal parameter set λ is obtained in the k-th iteration. k :

[0080]

[0081] Where D KL (·||·) represents the Kullback-Leibler divergence (cross-entropy).

[0082] This optimization problem is equivalent to:

[0083]

[0084] By using the current important sampling density function q(z |λ) k-1 The Monte Carlo estimation of the sample drawn from ) can be transformed into:

[0085]

[0086] Where: z i From q(z |λ) k-1 The i-th sample is randomly selected; N k W(z,ξ,λ) is the sample size for the k-th iteration. k-1 ,ρ k ) is the importance sampling weight, defined as W(z,ξ,λ) k-1 ,ρ k ) = Φ( (H(z) -T) / ρ k f(z |ξ) / q(z|λ)k-1 ).

[0087] For common distribution families (such as Gaussian distribution, Bernoulli distribution), the optimal solution λ of the formula is... k An analytical solution often exists. Taking the Bernoulli distribution as an example, if q(z|λ) is a multivariate Bernoulli distribution, then the parameter update formula for its j-th component is:

[0088] ;

[0089] The key to this new formula is that it utilizes all N. k The system uses a sample and employs the Φ function in the weight W(·) to "softly" distinguish the samples according to their risk severity H(z). The higher the risk of the sample, the greater the weight, thus achieving a fine distinction of risk levels.

[0090] In each iteration, the relaxation coefficient ρ k The objective of this optimization model is to dynamically determine the important sampling weights {W(z)} in the current iteration. i ,ξ,λ k-1 ,ρ k )}, i=1,..., N k The sample variance coefficient (coefficient of variation) is close to a preset target value Cov. target (Usually taken as 1.0~2.0).

[0091] ;

[0092] Where Cov(·) represents the coefficient of variation (standard deviation / mean) of the sample. By solving this problem, the stability and efficiency of the iterative process can be adaptively controlled, avoiding the weight variance explosion caused by the relaxation coefficient decreasing too quickly.

[0093] By introducing a relaxation function (such as the standard normal distribution function) to smooth the discrete indicator function and adopting a weight update mechanism that considers the importance of samples, it can naturally handle high-dimensional, mixed state-space problems in virtual power plants where continuous variables (such as wind and solar power output and electricity prices) and discrete variables (such as energy storage start-up and shutdown and load switching) coexist, thus overcoming the limitations of traditional methods in dealing with such complex systems.

[0094] Based on the above approach, the specific process of step S2 is as follows:

[0095] S201, Parameter initialization, including:

[0096] Set the maximum number of iterations K, let the iteration counter k = 1, and initialize the importance sampling density function q(z|λ0) = f(z|ξ), that is, initialize the parameter set of the importance sampling density function q(z|λ0) to λ0 =ξ; based on the relaxation probability distribution, randomly select the initial value of the relaxation coefficient in the interval (0,1). Set the pre-simulation sample size N. k The target variance threshold Cov for relaxation coefficient optimization target The value of .

[0097] Wherein, the initial value of the relaxation coefficient is randomly set based on the relaxation probability distribution. Typically, it represents a relatively large value within the (0,1) interval; the simulation sample size N k The value of is determined based on the actual sample situation; the target variance threshold Cov target It typically takes values ​​in the range of 1.0 to 2.0.

[0098] S202, The parameter set for iterative optimization of important sampling density functions, including:

[0099] From the current important sampling density function q(z|λ) k-1 Extract N from ) k The state vectors of each power plant are used as samples to form the sample set S for the k-th iteration stage. k ={z1, z2, ..., z i , ..., z Nk For each sample, the performance measurement function of the virtual power plant is calculated to obtain the corresponding performance measurement value H(z). i ).

[0100] Optimize relaxation coefficient : so that the important sampling weights W(z,ξ,λ) k-1 , The sample variance coefficient is close to the target variance threshold Cov. target To achieve the objective, we solve for the optimal relaxation coefficient in the current k-th iteration. In this step, the relaxation coefficient is optimized. The optimization objective function is:

[0101] ;

[0102] Wherein, the relaxation coefficient value in the k-th iteration stage In (0, (Values ​​within a range) represents the relaxation coefficient value in the (k-1)th iteration stage; CV(·) represents the coefficient of variation operation, which is either the standard deviation operation or the mean operation; For the i-th sample z in the k-th iteration stagei Its important sampling density function q(z|λ) k-1 The important sampling weights corresponding to the distribution are:

[0103] ;

[0104] Where Φ(·) is the cumulative distribution function of the standard normal distribution; Let z represent the i-th sample in the k-th iteration stage. i The corresponding probability density function.

[0105] Update parameter set λ k Using the optimal relaxation coefficient obtained from the k-th iteration and sample set S k Iteratively update the parameter set λ of the important sampling density function. k Iteratively update the parameter set λ of the important sampling density function. k The method is as follows:

[0106] ;

[0107] in, Let λ represent the parameter set of the important sampling density function updated in the k-th iteration. k The m-th component; Represents the parameter set λ k-1 The m-th component; Let z represent the i-th sample in the k-th iteration stage. i The m-th element in; The preset proportional coefficient parameter; For the i-th sample z in the k-th iteration stage i Its important sampling density function q(z|λ) k-1 The important sampling weights corresponding to the distribution.

[0108] This step is crucial; it uses the Φ function to "softly" distinguish samples according to their risk severity H(z) and updates parameters using all samples.

[0109] S203. Convergence judgment, including:

[0110] Check whether the iteration has reached the convergence condition, which is the change in the parameter set. Less than the preset threshold If the convergence condition is not met, the iteration counter k is incremented by 1, and the process returns to step S202. If the convergence condition is met, the current iteration count k is recorded, and the optimized important sampling density function q(z|λ) is obtained. k The optimal parameter set λk .

[0111] S3. The important sampling density function q(z|λ) is solved iteratively in step S2. k Then, another sampling is performed for the main simulation. Then, for all samples generated in the iterative solution stage and the main simulation stage in step S2, the risk index estimates and their variances for each stage are calculated respectively. Using the inverse of the variance as the weight, a multi-stage fusion risk estimation function is constructed that integrates the iterative solution stage and the main simulation stage. The operation risk assessment results of the virtual power plant are then calculated.

[0112] The specific procedure for this step is as follows:

[0113] S301. After completing the k-th iteration of the solution in step S2, perform the (k+1)th stage of the main simulation, and obtain the important sampling density function q(z|λ) from the final optimized solution. k N is then extracted from ) k+1 100 samples; thus, a total of k+1 sample sets for each stage have been obtained. ,1≤ ≤k+1.

[0114] S302, For each stage ,1≤ ≤k+1, using its sample set Calculate the risk estimation function for the corresponding stage. .

[0115] Among them, the Stage risk estimation function The expression is:

[0116] , ;

[0117] in, Indicates the first The sample size of a stage, i.e., the sample set The number of samples included; Indicates the first The parameter set of the important sampling density function of the previous stage; Indicates in the sample The penalty cost function at that time.

[0118] S303. Based on the obtained risk estimation functions for k+1 stages, and using the reciprocal of the variance of the risk estimation function for each stage as the weight, construct a multi-stage fusion risk estimation function for the risk index. .

[0119] Multi-stage fusion risk estimation function The expression is:

[0120] ;

[0121] in, For the first Stage risk estimation function The corresponding weight, this weight With the risk estimation function The variance is inversely proportional to the variance, that is:

[0122] , All weights The sum is 1, therefore we have =1;

[0123] in, This indicates variance calculation.

[0124] This achieves the optimal fusion estimate with minimum variance. The multi-stage fusion risk estimation function has the smallest variance among the linear unbiased estimates of all stages, thus allowing the calculation of the output multi-stage fusion risk estimation function value. This serves as the final, high-precision, low-variance virtual power plant operation risk assessment result. By constructing a multi-stage fusion risk estimation function, it creatively integrates all sample information generated during the pre-simulation iteration process and the main simulation stage. This not only completely avoids the problem of a large amount of pre-simulation samples being wasted in traditional methods, achieving "zero waste" of computing resources, but also effectively reduces the estimation variance of the final risk assessment result through optimal weighting, significantly improving the accuracy and stability (i.e., robustness) of the assessment indicators.

[0125] In this invention, since the objective is to assess the cost losses caused by the operational risks of a virtual power plant, the calculated multi-stage fusion risk estimation function value... This refers to the risk cost value of a virtual power plant under different operating conditions at each stage of the forecast period.

[0126] Secondly, the present invention provides a virtual power plant operation risk assessment method based on adaptive importance sampling. In specific implementation, this method can be implemented using a computer electronic device (such as a server in a virtual power plant control center) that includes a processor and a memory. The electronic device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the various steps of the virtual power plant operation risk assessment method based on adaptive importance sampling of the present invention.

[0127] The memory can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage device. The computer-readable storage device can include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical fiber, portable compact disk read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, the computer-readable storage device can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0128] The code for a computer program that performs the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer.

[0129] The method described in this invention has a clear flow and is easy to program, allowing for seamless integration into existing Virtual Power Plant Energy Management Systems (VPP-EMS) or market decision support systems as a highly efficient risk assessment engine. This method provides strong technical support for real-time risk scanning, vulnerability identification, market pricing strategy optimization, and rapid decision-making regarding flexible resources such as internal energy storage in the "operational state" of a virtual power plant, helping to enhance the proactive defense capabilities and intelligent decision-making level of virtual power plant operations.

[0130] The following detailed explanation of the present invention will be provided using a specific virtual power plant risk assessment scenario as an example, with reference to an embodiment.

[0131] Example:

[0132] This embodiment takes a demonstration project of a virtual power plant in a certain region as an example to assess the risk of a certain operating period in the next 24 hours.

[0133] Step S1: Construct a basic model for probabilistic risk assessment of a virtual power plant.

[0134] First, define the system state vector. Assume z = [z1, z2, ..., z...]. MLet M be the state vector of a virtual power plant containing M random variables, including random fluctuations in distributed photovoltaic output, random fluctuations in wind power output, prediction errors of flexible loads, and available capacity of energy storage systems, for a total of M=125 random variables. Among them, wind and solar power output and prediction errors are described by continuous normal distributions, energy storage and critical load states are described by discrete Bernoulli distributions, and electricity prices are described by continuous log-normal distributions.

[0135] Secondly, the probability density function is determined. Based on historical data and the prediction system, the probability distribution parameter set ξ of the above random variables is obtained from the data center. The probability density function f(z |ξ) of the virtual power plant is the product of the independent distributions of each variable.

[0136] Finally, the system performance measurement function H(z) and indicator function are defined. This example uses economic risk assessment as an example, defining H(z) as the penalty cost (in yuan) incurred by the virtual power plant due to the deviation between its actual total output and the day-ahead market bid. Each sampled state z is analyzed using the fast power flow calculation and cost calculation model within the virtual power plant. In this embodiment, the cost risk threshold T = 15,000 yuan is set. If the calculated H(z) ≥ T, then the indicator function J(·) = 1; otherwise, J(·) = 0.

[0137] Execution step S2: Construct an adaptive important sampling parameter optimization model that takes into account the risk level.

[0138] First, initialization is performed. The iteration counter k = 1 is set, and the initial importance sampling density function is q(z|λ0) = f(z|ξ), i.e., the parameter set λ0 = ξ. The pre-simulation sample size N is set. k = 30000, maximum number of iterations K = 10; based on the relaxation probability distribution, the initial value of the relaxation coefficient is randomly selected. =0.8; the target variance coefficient for relaxation coefficient optimization is close to a small target variance threshold Cov. target = 1.5.

[0139] Subsequent iterative optimization and convergence determination are performed according to the steps of this invention. In this embodiment, convergence is achieved after 3 iterations, yielding the optimal importance sampling density function q(z|λ3). During this process, all 30,000 samples from each iteration are effectively used for parameter optimization.

[0140] Step S3: Rapid risk assessment based on a multi-stage fusion risk estimation function.

[0141] The main simulation extracts another 20,000 samples from q(z|λ3). A multi-stage fusion is then performed on the 110,000 samples from the three stages of the iterative process in step S2 and the one stage of the main simulation. The multi-stage fusion risk estimation function is then used. The operational risk assessment results were obtained through calculation.

[0142] The results are shown in Table 1. The final operational risk assessment results obtained by the method of the present invention are as follows. The estimated expected risk cost is 4,520 yuan, with a variance coefficient of 2.1%. Compared with the traditional cross-entropy importance sampling method, the total computation time is reduced from 356 seconds to 285 seconds at the same accuracy, improving efficiency by approximately 20%. Furthermore, by analyzing the optimal parameter set λ3, the study successfully identified "wind power cluster output" and "a large industrial and commercial load unit" as the two factors contributing the greatest uncertainty, providing a clear optimization direction for the virtual power plant to optimize its forecasting system and sign bilateral contracts.

[0143] Table 1 Comparison of Risk Assessment Results for Virtual Power Plant Demonstration Projects

[0144]

[0145] The comparison shows that the method of this invention can efficiently capture "critical scenarios" that lead to high penalty costs or operational limitations with a very small sample size, thus overcoming the "curse of computation" problem. Compared with the traditional cross-entropy importance sampling method, while achieving the same evaluation accuracy, the computational efficiency can be improved by more than 20% due to the significantly reduced sample size; compared with the original Monte Carlo simulation, the computational efficiency is improved by several orders of magnitude, making ultra-real-time risk assessment at the minute or even second level possible. In summary, this invention, through improved adaptive importance sampling parameter optimization and multi-stage sample fusion, achieves efficient and accurate assessment of the probabilistic risk of the "operational state" of a virtual power plant, providing reliable key data support for the operational decisions of virtual power plants.

[0146] In summary, compared with the prior art, the present invention has the following beneficial effects:

[0147] 1. The method of this invention introduces a relaxed probability distribution sequence and optimizes the parameters of an adaptive importance sampling density function that considers risk level. This improves the importance sampling method so that it can more accurately and quickly approximate the optimal sampling distribution of virtual power plant operation risk and improves assessment efficiency, making ultra-real-time risk assessment at the minute or even second level possible.

[0148] 2. The method of this invention creatively integrates all sample information generated in the pre-simulation iteration process and the main simulation stage by constructing a multi-stage fusion risk estimation function. This not only completely avoids the problem of a large amount of pre-simulation samples being wasted in traditional methods and achieves "zero waste" of computing resources, but also effectively reduces the estimation variance of the final risk assessment result through the optimal weighting method, significantly improving the accuracy and stability (i.e., robustness) of the assessment indicators, and can provide more reliable data basis for high-risk decision-making in virtual power plants.

[0149] 3. This invention effectively solves the "computational disaster" problem faced by traditional Monte Carlo simulation, as well as the shortcomings of traditional important sampling methods such as low sample utilization efficiency and failure to distinguish risk levels. It can provide key risk scanning data support for real-time market decision-making and internal resource scheduling of virtual power plants.

[0150] 4. The processing flow of the method of this invention is clear and easy to program, and it can be seamlessly integrated into existing Virtual Power Plant Energy Management Systems (VPP-EMS) or market decision support systems as a highly efficient risk assessment engine. This method provides strong technical support for real-time risk scanning, vulnerability identification, market pricing strategy optimization, and rapid decision-making regarding flexible resources such as internal energy storage in the "operational state" of a virtual power plant, helping to enhance the proactive defense capabilities and intelligent decision-making level of virtual power plant operations.

[0151] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit the technical solutions. Those skilled in the art should understand that any modifications or equivalent substitutions to the technical solutions of the present invention without departing from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.

Claims

1. A virtual power plant operation risk assessment method based on adaptive importance sampling, characterized in that, Includes the following steps: S1. Based on the working state parameters of each component in the virtual power plant, construct the virtual power plant state vector z. Based on the real-time probability distribution parameter set ξ of each component in the virtual power plant, construct the probability density function f(z|ξ) of the virtual power plant. Define the performance measurement function H(z) and the operation risk indication function J(H(z)≥T) of the virtual power plant, where T is the preset risk threshold. S2. Based on the probability density function f(z|ξ) and the operational risk indication function J (H(z)≥T), with the optimal zero-variance important sampling density function as the objective, the optimal parameter set λ of the important sampling density function is iteratively solved by introducing a relaxation coefficient based on the relaxation probability distribution. k ; S3. The important sampling density function q(z|λ) is solved iteratively in step S2. k Then, another sampling is performed for the main simulation. Then, for all samples generated in the iterative solution stage and the main simulation stage in step S2, the risk index estimates and their variances for each stage are calculated respectively. Using the inverse of the variance as the weight, a multi-stage fusion risk estimation function is constructed that integrates the iterative solution stage and the main simulation stage. The operation risk assessment results of the virtual power plant are then calculated.

2. The virtual power plant operation risk assessment method based on adaptive importance sampling according to claim 1, characterized in that, In step S1, the virtual power plant state vector z and the probability distribution parameter set ξ are respectively expressed as: z=[z1,z2,···,z m ,···,z M ],ξ=[ξ1,ξ2,…,ξ m ,…,x M ]; The probability density function f(z|ξ) of the virtual power plant is expressed as: ; in, , Let represent the operating state parameters and probability distribution parameters of the m-th element in the virtual power plant, respectively; M is the number of elements contained in the virtual power plant.

3. The virtual power plant operation risk assessment method based on adaptive importance sampling according to claim 1, characterized in that, In step S1, the performance measurement function H(z) of the virtual power plant is defined as the penalty cost caused by the output performance deviation between the actual adjustable output and the actual demand output of the virtual power plant.

4. The virtual power plant operation risk assessment method based on adaptive importance sampling according to claim 1, characterized in that, Step S2 specifically includes: S201, Parameter initialization, including: Set the maximum number of iterations, let the iteration counter k = 1, initialize the importance sampling density function q(z|λ0) = f(z|ξ), that is, initialize the parameter set of the importance sampling density function q(z|λ0) to λ0 =ξ; based on the relaxation probability distribution, randomly select the initial value of the relaxation coefficient in the interval (0,1). Set the pre-simulation sample size N. k The target variance threshold Cov for relaxation coefficient optimization target The value; S202, The parameter set for iterative optimization of important sampling density functions, including: From the current important sampling density function q(z|λ) k-1 Extract N from ) k The state vectors of each power plant are used as samples to form the sample set S for the k-th iteration stage. k ={z1, z2, ..., z i , ..., z Nk For each sample, the performance measurement function of the virtual power plant is calculated to obtain the corresponding performance measurement value H(z). i ); Optimize relaxation coefficient : so that the important sampling weights W(z,ξ,λ) k-1 , The sample variance coefficient is close to the target variance threshold Cov. target To achieve the objective, we solve for the optimal relaxation coefficient in the current k-th iteration. ; Update parameter set λ k Using the optimal relaxation coefficient obtained from the k-th iteration and sample set S k Iteratively update the parameter set λ of the important sampling density function. k ; S203. Convergence judgment, including: Check whether the iteration has reached the convergence condition, which is the change in the parameter set. Less than the preset threshold If the convergence condition is not met, the iteration counter k is incremented by 1, and the process returns to step S202. If the convergence condition is met, the current iteration count k is recorded, and the optimized important sampling density function q(z|λ) is obtained. k The optimal parameter set λ k .

5. The virtual power plant operation risk assessment method based on adaptive importance sampling according to claim 4, characterized in that, In step S202, the relaxation coefficient is optimized. The optimization objective function is: ; Wherein, the relaxation coefficient value in the k-th iteration stage In (0, (Values ​​within a range) represents the relaxation coefficient value in the (k-1)th iteration stage; CV(·) represents the coefficient of variation operation, which is either the standard deviation operation or the mean operation; For the i-th sample z in the k-th iteration stage i Its important sampling density function q(z|λ) k-1 The important sampling weights corresponding to the distribution are: ; Where Φ(·) is the cumulative distribution function of the standard normal distribution; Let z represent the i-th sample in the k-th iteration stage. i The corresponding probability density function.

6. The virtual power plant operation risk assessment method based on adaptive importance sampling according to claim 5, characterized in that, In step S202, the parameter set λ of the important sampling density function is iteratively updated. k The method is as follows: ; in, Let λ represent the parameter set of the important sampling density function updated in the k-th iteration. k The m-th component; Represents the parameter set λ k-1 The m-th component; Let z represent the i-th sample in the k-th iteration stage. i The m-th element in; The preset proportional coefficient parameter; For the i-th sample z in the k-th iteration stage i Its important sampling density function q(z|λ) k-1 The important sampling weights corresponding to the distribution.

7. The virtual power plant operation risk assessment method based on adaptive importance sampling according to claim 1, characterized in that, Step S3 specifically includes: S301. After completing the k-th iteration of the solution in step S2, perform the (k+1)th stage of the main simulation, and obtain the important sampling density function q(z|λ) from the final optimized solution. k N is then extracted from ) k+1 100 samples; thus, a total of k+1 sample sets for each stage have been obtained. ,1≤ ≤k+1; S302, For each stage ,1≤ ≤k+1, using its sample set Calculate the risk estimation function for the corresponding stage. ; S303. Based on the obtained risk estimation functions for k+1 stages, and using the reciprocal of the variance of the risk estimation function for each stage as the weight, construct a multi-stage fusion risk estimation function for the risk index. .

8. The virtual power plant operation risk assessment method based on adaptive importance sampling according to claim 7, characterized in that, In step S302, the first Stage risk estimation function The expression is: , ; in, Indicates the first The sample size of a stage, i.e., the sample set The number of samples included; Indicates the first The parameter set of the important sampling density function of the previous stage; Indicates in the sample The penalty cost function at that time.

9. The virtual power plant operation risk assessment method based on adaptive importance sampling according to claim 8, characterized in that, In step S303, the multi-stage fusion risk estimation function The expression is: ; in, For the first Stage risk estimation function The corresponding weight, this weight With the risk estimation function The variance is inversely proportional to the variance, that is: , And there are =1; in, This indicates variance calculation.

10. An electronic device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, characterized in that, When the processor executes the computer program, it implements the virtual power plant operation risk assessment method based on adaptive importance sampling as described in any one of claims 1 to 9.