Virtual Power Plant Optimization Management Method Based on Conditional Value at Risk
By using multimodal security pointer awareness and three-layer CVaR coupling optimization, millisecond-level closed-loop scheduling optimization of virtual power plants under extreme market conditions is achieved, solving the scheduling error problems caused by network latency and market data tampering, and improving grid stability as well as the security and profitability of virtual power plants.
Patent Information
- Application Number
- CN202511321039.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-16
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-09-16
AI Technical Summary
In the scenario of virtual power plants with high penetration of renewable energy, existing technologies cannot effectively cope with extreme conditions such as network latency and market data tampering, which leads to increased scheduling decision errors, failure to achieve adaptive model optimization, and affects grid stability and the reputation of virtual power plants.
A virtual power plant optimization management method based on conditional value of risk is adopted, which achieves millisecond-level closed-loop scheduling optimization through multimodal safety pointer perception, risk quantile scenario generation, three-layer CVaR coupling optimization, edge cloud dual-threshold instruction issuance, and real-time loss-driven model adaptive update.
It improves the safety and robust returns of virtual power plants in extreme market conditions, reduces plan execution deviations, and ensures grid stability and the overall reputation of virtual power plants.
Smart Images

Figure CN120806667B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of virtual power plant dispatching technology, specifically to a virtual power plant optimization management method based on conditional value of risk. Background Technology
[0002] Against the backdrop of the rapid evolution of new power systems, distributed photovoltaic, wind power, energy storage, and flexible loads are being connected to distribution networks in large numbers. The three markets of electricity spot, ancillary services, and carbon emission allowances are being matched at a rate of seconds. As the aggregator, virtual power plants need to complete multi-objective scheduling optimization in the cloud and issue power commands, load reduction amounts, and bidding curves to thousands of heterogeneous devices through edge controllers.
[0003] The general technique mainly adopts a "static scenario prediction + phased optimization" approach: first, an offline method is used to arrange a small number of typical scenarios in the current day; then, optimization is performed sequentially according to a predetermined risk preference; finally, a single instruction encompassing all power generation plans for the day is broadcast forward. However, given the presence of high-penetration renewable energy, highly digitized end-user devices, and increasingly sophisticated cybersecurity attack methods, significant drawbacks include: ① Offline scenarios cannot predict extreme market fluctuations or instantaneous network distortions across domains; ② They cannot account for the coupling losses at the three-dimensional tail end of scheduling, failing to calculate both safety risks and error / price gains; ③ The optimal solution in the cloud cannot be quickly reverted back to its previous state, and there is no timely feedback of closed-loop optimization correction information, thus lacking adaptive model tuning capabilities. If the on-site situation does not match the data requirements of the ground scenario, it will lead to errors in planning and execution, further widening the gap in the final settlement cycle.
[0004] In high-penetration renewable energy virtual power plant scenarios, it is crucial to detect tail-end risks at the security, physical, and financial layers caused by network latency injection or market price tampering within milliseconds. Based on these risks, a closed-loop input for scheduling decisions needs to be generated. This requires injecting these three tail-end risks into the scheduling decision chain in a quantifiable, controllable, and feedback-enabled manner. For example, if a hacker inserts tens of milliseconds of latency into the cloud-edge communication link or tampers with a batch of key quotes, the remote cloud dispatcher will misjudge the remaining power and price signals of the grid and incorrectly issue control commands for over-discharge and overload shedding. If executed during periods of power shortage, this will trigger a triple tail-end impact: a combination of power penalties, trading losses, and safety losses, resulting in a combination of bus voltage, spot settlement prices, and safety restart costs. Furthermore, since there is currently no real-time sampling of actual losses or automatic adjustment of model parameters, these triple impacts will not be reflected in the next cycle but will accumulate and amplify as the continuous scheduling window extends, ultimately leading to a decline in regional grid stability and the overall credibility of the virtual power plant.
[0005] Both the safe operation of virtual power plants and the safe operation of the power grid face enormous challenges. One major difficulty is how to complete the process from risk discovery to dispatch execution within a closed loop at the millisecond level. Therefore, establishing a complete chain encompassing detection, scenario generation, risk quantification, optimization decision-making, release verification, and online updates, ensuring that all links can complete a closed loop at a rate of one second, is a key challenge and one of the important issues restricting the commercialization of virtual power plants and the safe operation of the power grid. Summary of the Invention
[0006] (a) Technical problems to be solved
[0007] Given the current technological state, this paper proposes a virtual power plant optimization management method based on Conditional Value at Risk (CVA). This method sequentially implements multimodal safety pointer perception, risk quantile scenario generation, three-layer CVAR coupling optimization, edge cloud dual-threshold instruction issuance, and real-time loss-driven model adaptive updating. It unifies the CVAR target to obtain a mixed-integer second-order cone, generating virtual power plant energy storage, load, and bidding instructions. Before instruction issuance, it verifies the data in a power flow-market sandbox; after issuance, it samples the actual loss using a sliding window method, using natural gradients and Bayesian conjugates to synchronously update generator parameters and CVAR confidence radius. This iterative process enhances the virtual power plant's security and robust returns, ensuring greater profitability under regulated operation even in extreme market conditions, thus solving the technical problems existing in current technologies.
[0008] (II) Technical Solution
[0009] To achieve the above objectives, the present invention provides the following technical solution:
[0010] The virtual power plant optimization management method based on conditional risk value includes: synchronously collecting command stream, market data stream and power stream at the edge, generating a unified feature tensor through multi-view attention fusion and marking the distortion segment, and determining the anomaly intensity based on the historical steady-state distribution;
[0011] The distorted segment is input into an improved quantile generative adversarial network to generate a set of risk scenarios coupled with security, power and price, and attach synchronization deviation quantile labels for subsequent optimization and processing.
[0012] Using the aforementioned risk scenario set as input, a global objective with three-layer conditions of safety, power, and price is constructed. By combining the variables of energy storage, load, and bidding, a small-tail loss scheduling scheme is solved.
[0013] The scheduling scheme is subjected to a consistency check between the cloud and the edge. If the check is successful, the device instruction set is generated by unpacking the data and then the power and price deviation is predicted in the local power flow-market sandbox. If the deviation is lower than the release threshold, the instruction set is released.
[0014] The loss is sampled in real time and an observation matrix is formed. The parameters of the generated network are updated with natural gradients. The confidence radius is shrunk using a Bayesian method and the update packet is broadcast for use in the next cycle.
[0015] Furthermore, sliding index interpolation alignment is performed on the original timestamps of the instruction stream, market data stream, and power stream to obtain a unified millisecond-level common time axis;
[0016] The aligned feature matrix is learned by weighting using a multi-view attention mechanism, and then a weighted feature tensor is generated by linear mapping. The multi-view attention mechanism simultaneously calculates temporal self-attention weights and inter-modal interaction weights.
[0017] A variational Gaussian mixture steady-state model is established using weighted feature tensors to obtain steady-state probability density, anomaly score, and safety index. Continuous safety indexes are smoothed using bidirectional Bayesian filtering to generate segment-level anomaly labels, which serve as input indices for risk scenario generation.
[0018] Next, quantile labels are obtained by linear stretching and inverse cumulative distribution mapping using a secure pointer, and a scene index matrix is built based on the quantile labels. Then, the scene index and random noise vector are combined as the generator input to drive the quantile generative adversarial network to output multi-scene samples.
[0019] First, it further clarifies that the training objective of quantile generative adversarial networks is coupled with adversarial cross-entropy loss and quantile first-order Wasserstein distance, and a balancing coefficient is introduced to adjust the weights of the two. Second, it ensures that gradient optimization can still be achieved between the generated samples and the real samples when they are in the same quantile.
[0020] Furthermore, scalars for safety loss, power loss, and price loss are established separately;
[0021] All three types of losses are expressed using the shearing variable and the tail excess expectation as the conditional value at risk (VaR) formula; the three VaRs are weighted by weighting coefficients to form the overall objective function.
[0022] Furthermore, the overall objective function, together with the energy storage power vector, load adjustment vector, and bidding adjustment vector, constitutes a mixed integer second-order cone programming model. Energy storage boundary, bus power boundary, and market tiered application second-order cone constraints are set to solve for the scheduling vector that minimizes the overall tail-end loss.
[0023] Furthermore, the communication delay mapping matrix is used to perform channel correction on the cloud energy storage power plan, and the second norm error is calculated with the edge power feedback of the previous cycle.
[0024] The energy storage error, load error, and bidding error are linearly synthesized into a consistency index according to a preset weight, and compared with the consistency threshold to determine the unpacking and release of instructions.
[0025] Furthermore, the edge end performs coupled sandbox simulations of the unpacking command in the power flow Jacobi rapid iteration model and the local supply and demand price elasticity model to calculate the power-price comprehensive deviation and voltage offset; the two are combined into a comprehensive risk index by weighting coefficients, and compared with the release threshold to determine whether the command is released immediately or revised.
[0026] Furthermore, a power-weighted sampling mechanism is used to extract samples from each type of loss to form a loss subset;
[0027] The contents of different subsets are concatenated to obtain the loss observation matrix, which is then used to calculate the real-time empirical quantile and category entropy for subsequent incremental model updates.
[0028] While further using the loss observation matrix to update the natural gradient of the generator parameters, the gamma conjugate Bayes method is used to update the posterior shape and scale parameters of the confidence radius. This results in the generator parameters, confidence radius, and class entropy to be used in the final stage of model training, which are then broadcast to the risk scenario generation and scheduling optimization module for use in the next cycle.
[0029] (III) Beneficial Effects
[0030] This invention provides a virtual power plant optimization management method based on conditional value at risk, which has the following beneficial effects:
[0031] The multimodal safety indicator perception and anomaly labeling method constructs a unified flow field of instruction flow, market flow, and power flow. It establishes a mechanism that maps network distortion, market jumps, and power deviations to safety indicators at the same scale, enabling precise location of risk segments at the millisecond level. Based on this, subsequent stages can obtain high-confidence risk labels without manual thresholding, significantly improving the sensitivity to tail events.
[0032] An improved quantile generative adversarial network is used to map discretized risk label values to a risk scenario set composed of different risk scenarios including security, physical, and financial layers. Synchronization bias is used to quantify the degree of deviation between power and electricity prices, thereby forming a system with multidimensional scenarios, high tail accuracy, and strong risk controllability. This step provides subsequent scheduling optimization with more input samples of different resolutions and higher scenario diversity, breaking through the limitations of traditional scheduling, which can only make scheduling decisions based on a single pipeline-style prediction scenario.
[0033] By integrating safety loss, power loss, and price loss into a single optimizer, the minimum comprehensive tail loss is obtained using mixed-integer second-order cone programming. The decision vector includes energy storage power, load regulation, and bidding adjustment. The three types of losses coexist in a single metric space and engage in a game, minimizing risk while ensuring maximum returns.
[0034] A dual-threshold circuit breaker mechanism is constructed before the instruction is issued by using weighted consistency indicators and comprehensive risk indicators. A multi-resolution trend-market coupling sandbox is used for second-level prediction, evaluation and issuance. The mathematically optimal solution has been physically and market-tested before the instruction is issued, which prevents the occurrence of situations where the risk is highly measurable but the risk is high. The instruction is only allowed to enter the execution stage when the risk is predicted to be controllable. Once issued, it immediately begins to operate seamlessly in the model and reality, which greatly reduces the planning-execution deviation.
[0035] The generator parameters and CVaR confidence radius are continuously updated cyclically by combining three incremental learning methods: sliding window hierarchical sampling, natural gradient correction, and Bayesian shrinkage. Then, the latest model state is continuously pushed to the scenario generation, risk measurement, and release threshold using broadcast packets. This enables the system to adjust in real time to adapt to constantly evolving attack strategies and changing financial market environments, keeping the system in an effective state. Attached Figure Description
[0036] Figure 1 This is a schematic diagram of the process of the virtual power plant optimization management method based on conditional value at risk (VAT) of the present invention. Detailed Implementation
[0037] 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.
[0038] Please see Figure 1 This invention provides a virtual power plant optimization management method based on conditional value at risk, including:
[0039] As a cloud-based dispatch platform, in the operation scenario of a high-penetration renewable energy virtual power plant, it should comprehensively consider the spot market price of electricity, the carbon allocation pricing, and the ancillary service quotations within a second-level cycle, and issue dispatch instructions to hundreds or thousands of edge controllers. Simultaneously, it should receive power measurement reports from each distributed photovoltaic-wind power-energy storage unit at the same granularity, thus highly digitizing the entire business chain. However, due to the high degree of digitization in the business chain, traditional monitoring methods using only a single indicator threshold plus offline alarms are no longer sufficient to detect hackers adding minute delays or distortions to the data stream.
[0040] Although the initial value of this type of distortion is small, during periods of resource scarcity or sharp price fluctuations, it may still be misjudged as normal distortion by the cloud and sent to the edge, resulting in overcharging, over-discharging, or significant load adjustments. This can also further increase the power-price synchronization deviation.
[0041] Virtual power plants not only need to pay differentiated deviation fees for instantaneous power differences, but also bear the losses caused by extreme fluctuations in settlement prices, resulting in a decline in grid frequency, voltage, and other indicators. Therefore, identifying distorted business decisions that are incorrectly executed by the cloud at the front end of the dispatch link, and judging the specific decision risk level according to different business scales, is a necessary basic step in risk management strategy.
[0042] Step 1: First, a unified multimodal feature tensor is modeled using cross-domain temporal fine-grained alignment and multi-view attention fusion. Then, potential distortion intervals are automatically generated based on historical steady-state distributions, forming a highly reliable data foundation for subsequent risk scenario generation.
[0043] Although the three types of information in the virtual power plant dispatch link—instructions, market data, and power—belong to different systems, they are closely related in terms of time and business. If there is any deviation in the time, order, or semantics of the data in each stream, it may accumulate into tail-end risks.
[0044] Therefore, on the one hand, it is necessary to ensure millisecond-level synchronization, and on the other hand, it is necessary to capture cross-domain correlations, so a fusion mechanism is needed. It is difficult to reflect the dynamic resonance characteristics of the three streams by using static thresholds or simple sliding window averaging, let alone detect the subtle distortions that exist inside. Therefore, to overcome this problem, we start with multimodal safety pointers, introduce attention-based feature fusion and steady-state distribution self-supervised annotation, and improve the ability to detect anomalies while ensuring millisecond-level synchronization.
[0045] Step 101: Cross-domain time stream alignment and feature merging of different types of nodes:
[0046] Command vectors collected from the edge controller Price vector and power measurement vector Each data point has its own independent millisecond-level timestamp offset. Therefore, the access method involves concatenating all the data together, i.e., stitching them together according to the time dimension. This is achieved through a time-series alignment algorithm that uses sliding indexing, linear interpolation, and shape preservation to construct a common timeline. The tensor obtained by splicing in this way is the initial spliced tensor to be processed. :
[0047]
[0048] Where: instruction vector In time step The active / reactive power command sequence on the device has its value range normalized to the rated capacity of the equipment. , used to characterize the control intent on the planning side;
[0049] Price Vector In time step The three-part combination of spot price, carbon price, and standby service quotes, with values ranging from 0 to 0.5, is normalized to Min-Max. This is used to map financial incentives;
[0050] Power measurement vector In time step The instantaneous output, power factor, and bus voltage segments are taken within a range standardized according to the equipment specifications. , used to measure physical response;
[0051] Public Timeline A unified millisecond-level time index, after interpolation and alignment, is used to ensure synchronization of the three streams;
[0052] Preliminary splicing of tensors The feature matrix obtained by concatenating the three vectors of instruction, price, and power at the column level is used to provide the original perspective for subsequent attention calculation.
[0053] The time-series alignment algorithm is an algorithm that aligns multi-source time series with different attributes such as sampling rate, timestamp, and data omissions to the same reference time series according to certain specifications. It performs the following three steps: ① Projecting each original sequence onto the target reference time axis and constructing a sliding window for each time point to quickly locate the nearest valid sampling point to the current anchor point; ② When there are blank or shifted sample points in the valid data of the sequence, filling in the blank sample points is done using linear interpolation, zero-order preservation, or local polynomial fitting methods, while preserving the original waveform changes, so that the sequences meet the requirement of equal length completion; ③ After completing the three steps, all the completed sequences are numbered according to a unified millisecond-level index order and organized into corresponding matrices, and a new matrix with consistent length and time synchronization is output. Using the time-series alignment algorithm, the time series of the target station control subsystem, market subsystem, and field acquisition subsystem are cross-temporally and spatially synchronized in milliseconds. This synchronized multimodal data is then used as input for relevant feature fusion, anomaly detection, risk scenario generation, and scheduling optimization processes, completely eliminating the impact of time errors.
[0054] By establishing a unified time anchor point, the data from the three streams can be fully aligned at any millisecond level, and the impact of temporal drift on anomaly detection is eliminated, thus providing an unbiased baseline for subsequent high-order feature extraction.
[0055] After obtaining the alignment tensor Then, an interpretable attention mechanism is used to generate a weighted feature tensor. :
[0056]
[0057] Where: weighted feature tensor Attention fusion output is used to characterize the overall state after the interaction of the three streams;
[0058] weight matrix The learned linear mapping matrix has a size of The value range usually depends on the initialization strategy. , used for dimensionality reduction and feature rotation; The row number represents the output or projected feature dimension; The column number represents the dimension of the input feature.
[0059] Attention weight matrix The weights are calculated using self-attention, with rows and columns representing time steps and element ranges. This is used to measure the correlation strength across different time slices;
[0060] Activation function By employing GaussianErrorLinearUnit, the nonlinear representation capability of multimodal features can be improved.
[0061] Hadamard The element-wise multiplication operator couples linear projection and attention weights together.
[0062] The attention mechanism explicitly and learnably weights the importance of different time slices and modalities, so the platform can bring easily ignored distortion information into the model, and through statistical modeling, the fusion representation can achieve the goal of being dense yet interpretable.
[0063] Step 102: Establish a steady-state baseline and mark outlier intervals:
[0064] Using a variational Gaussian mixture model on the weighted feature tensor After unsupervised fitting of the historical steady-state window, the baseline density can be obtained. :
[0065]
[0066] Abnormal scores Defined as:
[0067]
[0068] Wherein: baseline density , which represents the probability density of the feature tensor values under steady state, and is used to distinguish between normal and abnormal;
[0069] Mixing coefficient , No. The weights of the Gaussian components satisfy... value range ;
[0070] Mean vector , No. The center position of each component is consistent with the dimension of the feature tensor and the unit is consistent with the input.
[0071] covariance matrix A matrix of the same dimension, representing the internal covariance of the components, which must maintain positive definiteness;
[0072] Abnormal scores The rarity index obtained using the right-tailed cumulative distribution has a range of The closer it is to 1, the rarer it is, and it can be directly used as a risk measure.
[0073] By performing mixed-density modeling on historical steady-state periods, the tail distance of the feature tensor at any given time can be quantified, providing a probabilistic benchmark for subsequent anomaly segment identification. This is based on anomaly scores. Constructing a safe pointer :
[0074]
[0075] A bidirectional Bayesian filter is used to perform prior-posterior smoothing on the discrete security pointers to obtain a segment-level anomaly label set. .
[0076] Among them: safety pointer Immediate safety alerts are issued when the abnormal score exceeds a threshold. Activated at time, range Used to transmit abnormal intensity to downstream steps; threshold The quantile threshold is automatically set based on the baseline density, typically the 95th percentile of the right tail, to ensure that the pointer is triggered only on high-risk segments; indicator function A logic switch; returns 1 if the condition is met, otherwise 0.
[0077] Section tag set The safety pointer is smoothed by bidirectional filtering, and the time points when the anomaly occurs and ends are represented by serial numbers for use in scene generation.
[0078] The safety pointer transforms real-time anomaly metrics into readable operational labels and removes occasional noise through filtering, making it both sensitive and stable. In quantile-GANs, it is used to represent the true state of labeled samples. It accurately maps raw multimodal data to segment-level anomaly labels and generates weighted feature tensors. With segment tag set Together, they ensured that the segment-level label input of the generator is highly reliable, fully covering risk scenarios and maintaining consistent probabilities.
[0079] As can be seen from the preceding process description, the multimodal security pointer perception method addresses the issues of heterogeneous data sources and asynchronous time. Furthermore, it achieves a chain-like enhancement of information filtering → probability weighting → anomaly measurement through a combination of attention fusion and hybrid density estimation. The continuous sequencing of these processes ensures high robustness to various weak distortions in the resulting real-time business flow, and symbolizes these weak distortions into searchable tags, meeting the requirements of high signal-to-noise ratio and high temporal alignment for subsequent attack risk quantile mapping, scenario construction, data training, and inference models.
[0080] As risk scenario generation and three-layer CVaR coupling optimization unfold layer by layer in steps two and three, the parameters mentioned above will form a horizontal thread, organically combining the time-series information of the security layer, physical layer and financial layer, and fully reflecting the overall process of the virtual power plant optimization scheduling method. This ensures that the final output scheduling strategy maximizes the benefits while minimizing tail losses in extreme cases.
[0081] The biggest source of uncertainty in the real-time scheduling of virtual power plants is not routine fluctuations, but cross-domain amplification after the safety layer triggers a small distortion, which in turn causes a chain reaction of tail-end impacts, enabling high-confidence location and labeling of potentially abnormal areas.
[0082] However, if these discrete labels cannot be transformed into probabilistic scenarios that span the three perspectives of security, physics, and finance, then decision-makers cannot use models to quantify tail risks.
[0083] Step 2: Construct cross-domain quantile priors based on the labels of abnormal segments. Based on the improved quantile-GAN, obtain a set of high-confidence risk scenarios with three-dimensional coupling of security, physical and financial aspects, which will serve as the quantitative tail input for subsequent three-layer CVaR optimization.
[0084] Step 201: Anomaly Label Embedding and Quantile Prior Construction:
[0085] The distorted segment has passed the segment label set. However, directly feeding these samples into the generative model will result in sparse samples and discrete tails, making it difficult to provide sufficient support for each quantile. Therefore, it is necessary to first obtain... By embedding a continuous quantile space, a differentiable and sampleable prior distribution is constructed, thereby stabilizing the training of the generator.
[0086] The distorted segments have been identified using the segment label set. However, directly inputting the data into the generative model can lead to problems such as sparse samples and discrete tails, which cannot provide sufficient support for each quantile. Therefore, it is necessary to first embed the data into a continuous quantile space to obtain a differentiable and sampleable prior distribution to stabilize the training of the generator.
[0087] To avoid static metric values, set an anomaly intensity mapping. :
[0088]
[0089] And based on this, quantile tags are constructed. :
[0090]
[0091] in: The inverse cumulative distribution function (also called the quantile function) is the inverse cumulative distribution function of anomaly strength. It is a mathematical tool in probability and statistics that maps probability values to the values of random variables, ensuring... .
[0092] Anomaly intensity mapping Put the safety pointer Linear mapping to , used to measure the degree of distortion; threshold The safety pointer trigger lower limit is derived from the quantile set in the previous step and remains unchanged; the quantile label... This is used to guide the generator network to generate continuous quantiles of the corresponding intensity samples at the end of the network.
[0093] Further employing a mapping-inverse distribution process, the discrete safety pointers are smoothly transformed into continuous quantiles, thus providing the GAN network with a more refined tail control signal; using quantile labels throughout the entire time window... Establish a scene index matrix :
[0094]
[0095] and scene index matrix with Gaussian noise vector The input vector is obtained by concatenation. :
[0096]
[0097] Where: noise vector A zero-mean, unit-variance Gaussian vector is used to provide randomness; concatenated vectors As the final input to the GAN generator, it combines randomness and quantile information.
[0098] Scene Index Matrix A sequence of quantile labels arranged in chronological order is used to drive the generator to output different risk intensities;
[0099] By concatenating quantile labels into the noise vector, the generator can simultaneously perceive random jitter and tail level in the sampling space, thus avoiding the shortcoming of traditional conditional GANs in being unable to characterize continuous tail intensity gradients.
[0100] Step 202, Improved Quantile-GAN Training and Risk Scenario Generation:
[0101] Traditional GANs only align the entire distribution and cannot guarantee the quality of the generated samples at the tail end. Therefore, we adopt a dual-objective training method of adversarial loss + quantile-Wasserstein constraint to ensure that the generated samples are uniformly distributed in the mainstream region while accurately aligning the quantiles at the tail end with increasing deviations. We also design a corresponding generator. With discriminator And optimize its objective function:
[0102]
[0103] In the formula: the first and second terms of the adversarial loss, the cross-entropy of a regular GAN, used for overall distribution alignment; the generator. Parameter set A deep network is used to generate third-rate scenes; discriminator Parameter set A deep network is used to distinguish between real and generated samples; the real distribution... The distribution of measured three-stream data from the labels of abnormal segments;
[0104] The first-order Wasserstein distance is used to measure the difference between conditional quantile distributions, and the balance coefficient is used to adjust the weights of the adversarial loss term and the quantile loss term, with values ranging from [value missing]. Control the tail fitting accuracy; conditional notation , indicating at a given quantile Calculate the distance under the given conditions.
[0105] The goal is not only to ensure a good fit to the mainstream distribution while aligning the quantiles, but also to achieve a high degree of fit to the tail quantiles without significantly compromising overall fidelity. After training converges, a set of quantile sequences is input. and random noise Generate a set of risk scenarios :
[0106]
[0107] Simultaneously record the synchronization deviation scalar for each scenario. :
[0108]
[0109] Where: Risk scenario set The output of the generator Three third-stream samples are used for subsequent optimization; number of scenarios The value is adaptively set based on the optimized solution complexity and takes a positive integer value.
[0110] Generate instruction vectors Generate price vectors Generate power vector ,scene The corresponding three-stream data;
[0111] Synchronization Deviation Scalar Through mapping function The L1 distance obtained by mapping the power vector to the price estimate and comparing it with the generated price is used to quantify the power-price mismatch; mapping function The price-power nonlinear mapping, derived from recent market experience modeling, is used to transform physical quantities into financial quantities.
[0112] The three-dimensional coupled scenario set simultaneously retains the physical constraint textures of commands and power, as well as the financial characteristics of market prices; deviation scalar It can directly provide comprehensive tail-end metrics in the subsequent three layers of CVaR optimization, breaking the quantitative constraints of the security-physical-financial triad.
[0113] The labels of the abnormal segments are mapped to quantile sequences. Using an improved quantile-GAN to generate a risk scenario set And introduce synchronization deviation Its output is a highly flexible input interface for the three-layer CVaR coupling optimization, which uses quantile-sample-bias as the three elements in the third step. Used for decision-making risk budget allocation, Provide random scene samples, You can directly enter the tail loss function.
[0114] By focusing on quantile embedding and improved quantile-GAN, discrete and sparse anomaly labels are transformed into a continuously sampled set of risk scenarios, achieving a three-dimensional coupled expression that organically combines security, physics, and finance.
[0115] In this process, anomaly intensity mapping Seamless integration of safety pointers and quantile labels was achieved; dual-objective adversarial training ensured high-precision fitting of tail quantiles; synchronization bias could be used to set up risk scenarios. This is directly incorporated into the subsequent objective function of CVaR. Compared with traditional single-layer risk simulation, by replacing the original tail class quantile fitting strategy with dual-objective adversarial training, this method can dynamically adjust the scenario distribution according to the risk budget. It also has a greater coverage of extreme scenarios than the results obtained by directly drawing scenario trees by third-party vendors, and can provide a flexible and programmable input granularity for three-layer CVaR optimization. When the risk scenario set is added to step three, the virtual power plant can truly achieve collaborative decision-making between the safety layer, physical layer, and financial layer based on a unified risk measure, ensuring excellent performance of both power and revenue indicators regardless of the adverse situation encountered.
[0116] Based on the detection-generation link obtained from the virtual power plant, a set of risk scenarios with quantile scales can be obtained. and the synchronization deviation scalars corresponding to different scenarios However, relying solely on intuition or static experience to adjust energy storage charging and discharging, controllable load, and bidding curves makes it difficult to simultaneously guarantee grid security, power balance, and price benefits in the worst-case scenario. Traditional methods optimize market revenue independently when solving for power tracking error, failing to consider external risks arising from future cyberattacks. In the face of attacks and severe market fluctuations, this can lead to triple losses in scheduling results within a single settlement cycle: power penalties, trading losses, and security recovery costs.
[0117] Step 3: Based on the risk scenario set, construct a CVaR-based coupled optimization model, and use iterative risk budgeting to obtain the linkage decision vector of energy storage-load-bidding to minimize the overall tail loss.
[0118] Step 301, 3D tail loss mapping and CVaR hierarchical representation:
[0119] To simultaneously measure the three types of tail risks—safety, power, and price—within the same optimization framework, it is necessary to first transform the original quantities in the risk scenario set into numerically consistent loss scalars, and then construct an easily solvable analytical expression for CVaR. This ensures a differentiable and coupled mapping relationship between decision variables and tail losses.
[0120] Wind-solar-storage coupling scenario The following three types of loss are defined as:
[0121]
[0122] Where: Safety loss scalar Due to the synchronization deviation amplification factor Synchronization Deviation The linear mapping is used to measure the safety reset cost caused by an anomaly;
[0123] Power loss scalar The power deviation norm is used to measure the dispatch instructions. With actual power The second norm distance, magnification factor This reflects the unit price of the fine; the quantity of price loss. The generated price is measured by a range of distances. Compared with the reference price Differences, magnification factor Reflecting the degree of profit or loss; referencing quoted prices. It is composed of the average transaction price of the segment published by the market recently, and is used to measure the deviation of the strategy price adjustment.
[0124] Therefore, by mapping the three-dimensional risk into a unified loss space in the form of a scalar of the same dimension, it is ensured that tail risks of different dimensions can be directly weighted and compared in subsequent CVaR calculations. A CVaR expression is constructed for each type of loss:
[0125]
[0126] In the formula: the tail level This represents the confidence interval retained in the tail distribution; a higher value indicates greater sensitivity to extreme scenarios. (Variable reduction) , Represents the real number field, an auxiliary variable introduced for optimization, used to locate the CVaR cutoff point;
[0127] Positive part operator Guarantee only for more than The tail portion is included in the expectation; expectation operator Indexing scenarios according to the probability distribution of the scenario set Expectation; Category Index This corresponds to three types of tail-end losses: safety (s), power (p), and price (c).
[0128] By introducing reduction variables This transforms the non-convex tail risk into a convex expectation, making it compatible with linear / second-order cone constraints and thus ensuring the solvability of optimization in large-scale scenarios.
[0129] Step 302, Mixed Integer Second-Order Cone Programming and Iterative Risk Budgeting:
[0130] After obtaining the three types of analytical expressions, it is necessary to incorporate decision variables and physical / market constraints into the solution, and design a risk budget feedback mechanism so that the CVaR weights can shrink in real time as the system runs. Only in this way can we ensure that the scheduling results achieve a dynamic optimal balance between revenue and safety.
[0131] Define decision vector :
[0132]
[0133] Objective function:
[0134]
[0135] The constraints include:
[0136]
[0137] Where: energy storage power vector The charging and discharging power during each period within the decision-making cycle, with values normalized to the equipment's rated power. Load adjustment vector , , Refers to the set of non-negative integers, representing the reduction amount of stopable and moveable loads in each time period, with values being non-negative integers; bidding adjustment vector. The increase / decrease orders submitted at different price levels are subject to the market mixed integer second-order cone constraint set. limit; The initial energy state vector at the start of the current scheduling cycle is derived from the real-time SoC measurement of the previous control cycle; the energy storage state matrix... The charge / discharge power integral is mapped to a lower triangular matrix representing the energy increment; the power coupling matrix... The mapping matrix that applies the instantaneous injection of energy storage power to the system power flow;
[0138] Energy Upper and Lower Boundaries , , respectively, represent the physical boundaries of the energy storage SoC; and the upper and lower power bounds. , This indicates the safety limits of the inverter and bus; weight. The priority coefficients set by the operations and maintenance party based on their risk tolerance.
[0139] Mixed Integer Second-Order Cone Set The bid volume must fall within the feasible zone defined by the minimum bid quantity, price ladder, and second-order cone relationship.
[0140] By unifying physics, market dynamics, integer decision-making, and the CVaR objective into a single MISOCP structure, the problem can be converged in feasible time by commercial solvers, while also providing weights. Allow for adjustments to allow for subsequent risk budget feedback.
[0141] Set the optimal value of the objective function to be :
[0142]
[0143] If the actual loss is measured After execution, the following conditions are met:
[0144]
[0145] Then update the weights:
[0146]
[0147] Where: the target optimal value The optimized solution yields the comprehensive tail loss; the measured loss... The tolerance coefficient is calculated based on real-time measurements and market conditions after execution. This indicates a threshold that allows the measured loss to exceed the model's prediction by a multiple; risk gain ratio. When the measured loss exceeds the threshold, the weight is increased proportionally; update operation. This means writing the new value back to the risk control dictionary for use in the next cycle.
[0148] Based on the closed-loop comparison of measured loss and theoretical CVaR, the proportion of excess class weights greater than 1 is dynamically increased to achieve adaptive shrinkage of the risk budget for the remaining capacity. This makes the model pay more attention to the poorly performing tail classes in the next cycle, accumulate risk exposure, and achieve a punitive learning effect. The asterisk (*) in the upper corner indicates the minimum tail expectation obtained by solving the problem after reducing variables during the optimization process.
[0149] Step 301 unifies the three types of tail losses into the analytical CVaR expression to achieve a three-dimensional mapping of risk-safety, power, and price, and compares them in the same metric space; Step 302 then couples the decision variables, physical / market constraints, and three-layer CVaR objectives into the MISOCP framework, and forms a closed-loop learning through risk budget adaptive contraction.
[0150] Based on the three-dimensional tail loss mapping and CVaR hierarchical expression in step three, combined with mixed-integer second-order cone programming and risk budget adaptive shrinkage, a mapping process from generating risk scenarios to forming execution instructions was established. Based on a mixed-integer second-order cone programming optimizer, the safety risk, power risk, and price risk in this step were simultaneously played in a single solution process, resulting in a globally optimal scheduling instruction optimized in one step. At the same time, the closed-loop risk budget in this step enabled the model to proactively warn when dealing with continuous attacks or black swan events, iteratively shrinking the tail loss without additional human intervention. Based on this, in step four, edge-cloud consistency verification was achieved and a rapid trial run was completed in a sandbox environment. After confirming mathematical optimality and engineering feasibility, the virtual power plant was truly realized to achieve the extreme values of safety, revenue, and steady state in the most uncontrollable edge of the scenario through cloud-edge collaboration.
[0151] After cloud-based CVaR three-layer coupling optimization, the optimal decision vector and the optimal energy storage power vector were generated. Load adjustment vector With bidding adjustment vector The results are pending. Because the network latency, device transients, and market matching assumptions in the cloud model may differ from actual conditions on a microsecond scale, directly sending entire instruction packets to gateways for execution can easily lead to incomplete instruction data or incomplete capture of local constraints due to communication jitter, resulting in errors in plan execution. Once this error occurs, it can trigger secondary events, potentially causing secondary safety incidents and creating a cumulative impact on the entire production safety layer, physical layer, and financial layer, rendering the previously obtained optimal solution ineffective. Therefore, a holistic process should be added between the cloud and edge: instruction collaborative verification → rapid sandbox simulation → threshold determination → instant deployment. This ensures consistency between the platform's mathematical model and the physical environment without compromising second-level scheduling speed.
[0152] Step 4: Establish a consistency verification and rapid sandbox dual-chain verification mechanism between cloud output and edge physical site, and ensure that the instruction set with acceptable risk can be released in real time by setting threshold strategies.
[0153] Step 401, Weighted Consistency Check and Instruction Unpacking:
[0154] Cloud-based decision vector output Including multidimensional continuous variables and discrete variables, when converting them into corresponding terminal-side micro-operation commands, it is necessary to further break them down and refine them according to the characteristics of each terminal device itself.
[0155] Considering the latency of the communication link and the accuracy of execution by each terminal device, a consistency error vector is calculated within the cloud-edge interaction window, and the various instructions output to the terminal are determined according to a certain weighting method.
[0156]
[0157] in:
[0158]
[0159] Where: Communication delay mapping matrix This maps the charging and discharging plans issued from the cloud to the arrival power of different delay channels, with an element range. Edge feedback power The actual energy storage power vector received in the previous cycle, range ;
[0160] Edge feedback load Actual load reduction, non-negative integer; edge return bidding. The bidding volume that has taken effect in the previous period is a floating point; the norm operation remains consistent with the previous steps to ensure dimensional uniformity.
[0161] Then the weighted consistency index was calculated. :
[0162] ,
[0163] The weights are set based on the three-dimensional tail risk sensitivity, and the values are... and satisfy .
[0164] Different types of errors are linearly combined into a single index. This allows subsequent decisions to be made based on threshold judgments, enabling a choice between release and revision, avoiding delays caused by manual item-by-item review. If the consistency index... satisfy:
[0165]
[0166] Then execute the command to unpack:
[0167]
[0168] Among them, the execution amplitude :
[0169]
[0170] Where: Consistency threshold The maintenance team can dynamically adjust the scope based on network quality. ;
[0171] Equipment Collection Includes a complete equipment index for energy storage, load, and bidding channels; time slice set. The same time scale as the optimization model; set of device types , , A subset distinguished by function;
[0172] Energy storage power decision quantity At the moment obtained by optimization solution Energy storage charging / discharging power (positive value for discharging, negative value for charging);
[0173] Load adjustment decision quantity The flexible load obtained in step three At the moment The amount of power reduction or displacement;
[0174] Bidding adjustment decision volume The bidding channel obtained in step three At the moment The increase or decrease in the reported volume represents the increase or decrease in the reported power at the corresponding price level;
[0175] Execution Amplitude The power, reduction amount, or declared price difference that the corresponding equipment needs to perform at the corresponding time.
[0176] Once the consistency index Qualified means that the cloud plan can be quickly split according to the equipment type without the need for iterative judgment; at the same time, the equipment number and time are kept synchronized to provide clear input for sandbox simulation.
[0177] Step 402, Rapid Sandbox Simulation and Threshold Deployment:
[0178] Edge physical nodes can simultaneously receive real-time measurement values and unpacking instructions from the cloud. Without affecting the decision-making pace, they can analyze the risks after the instructions are issued and executed, build a multi-resolution power flow-market coupling sandbox, perform millisecond-level power and price linkage predictions, and use comprehensive risk indicators to decide whether to issue the instructions immediately.
[0179] The core of the sandbox consists of two layers: the electrical layer, which uses a reduced-order power flow Jacobian. The voltage increment is obtained by the fast iterative method. :
[0180]
[0181] Market layer: Based on local supply and demand elasticity vectors Estimate instantaneous price:
[0182]
[0183] in:
[0184]
[0185] This yields the prediction-execution difference. :
[0186]
[0187] In the formula: Trend Jacobi The power injection vector is obtained by online linearization of the edge measurement in the previous step and is positive definite. Injection power calculated based on unpacking instructions and node positions; reference power. Real-time measurement of the corrected power;
[0188] Voltage increment Predicted voltage offset, unit Price elasticity vector Based on local supply and demand savings curves, floating-point and instantaneous price forecasts are performed. The predicted market price output from the sandbox; the benchmark price. The reference price broadcast in the market;
[0189] Predicted power The expected output after the command is executed; The energy storage charge-discharge power decision quantity obtained from the previous three-layer CVaR optimization is positive for discharging and negative for charging. The optimized flexible load reduction vector corresponds to the power reduction value of each adjustable load in that time slot; The price deviation amplification factor converts the monetary unit into a comprehensive weight on the same scale as the power deviation, and the value is set by the operator according to risk preference.
[0190] Real-time power It is the current power generation output detected at the edge; prediction-execution difference. This refers to the quantitative analysis of sandbox predictions and the current actual situation. The sandbox enables predictions linked to both power and price, and uses the prediction-execution difference as a probe of immediate risk for reference when issuing decisions. A comprehensive risk index has been defined. :
[0191]
[0192] If the following conditions are met:
[0193]
[0194] Immediately call the edge executor to publish. And will release a signature. Once uploaded to the cloud, the process continues to the next step; if a rework flow is triggered, the consistency metrics will be updated. Risk indicators Upload it to the cloud, and then use the cloud to call MISOCP again to solve it.
[0195] Where: Comprehensive risk index The maximum value obtained by linearly combining the power-price difference with the voltage offset; weighting coefficient. , The release threshold is set by the operations and maintenance team based on the security level. If the risk is below this threshold, it is considered manageable.
[0196] Release signature It is a hash generated by the blockchain trusted execution environment to enable backtracking.
[0197] The maximum time-slice risk is used as the release standard, and any time-slice risk exceeding the allowable value will be reverted; hash signatures are used to prevent instructions from being tampered with or repudulated.
[0198] It is based on the optimal decision in the cloud. Consistency index derived from edge reporting information at the previous moment in this cycle If it meets the requirements, it will be disassembled into an edge instruction set. Step 402 involves configuring the edge instruction set within the local sandbox. Complete the trend-market coupling forecast and provide comprehensive risk indicators. ,like Then issue instructions and generate signatures. Otherwise, it will be reworked, and a recalculation will be triggered in the cloud. This is done by setting a threshold. By controlling the model-reality discrepancy within a quantifiable range, high-confidence execution-prediction comparison data was obtained that can be used for real-time loss sampling and model parameter updates in the next step.
[0199] Step four involves transforming the optimized output obtained from high-level abstraction in the cloud into micro-instructions that can be directly executed at the edge, and predicting in advance the physical, financial, and security impacts (in milliseconds) of releasing this optimization scheme, thereby reducing the probability of failure. Simultaneously, a weighted consistency metric is used to address instruction drift issues caused by communication latency and historical execution deviations, and a comprehensive risk metric is employed to achieve a one-stop assessment of power-price discrepancies and voltage safety.
[0200] Using a dual threshold mechanism This approach achieves second-level scheduling and establishes a reliable, real-time circuit breaker entry point for extreme scenarios, ensuring that all instructions are executed only after undergoing a safety and reliability check, while any risky instructions are rejected. For extremely high-risk indicators, MISOCP recalculation and weighting are triggered after automatic cloud write-back. Adjustments were made, and the risk budget was reduced to achieve a closed loop. At this point, the virtual power plant completed the full-stack, closed-loop management of the end-end risk throughout the entire process of detection, generation, optimization, and verification. It also completed real-time loss sampling and model parameter updates, which were then fed back to the virtual power plant optimization scheme stage in step three of the next iteration cycle.
[0201] After the fourth step of releasing the dual thresholds, the edge-cloud has entered a healthy operating track with a second-level pace. However, the risk scenario set and the triple CVaR model are still based on pre-event and in-event assumptions.
[0202] In other words, if we combine our generator parameters and confidence radius... If time continues, it will always represent the tail risk of the system. However, the hacker's methods, the behavior of the load party, and the market mechanism are constantly changing. If we do not map the real losses of the three lines of execution-measurement-settlement into our model parameters in a timely manner, then our generator will have a situation where the tail cannot be covered, and the cut point of the three-layer CVaR will deviate from the tail distribution under the latest state.
[0203] Step 5: Update the generator parameters and CVaR confidence radius by driving the joint natural gradient update method through real-time loss observation, so that the risk model can adapt to the dynamic environment.
[0204] Step 501, Streaming Loss Sampling and Dynamic Statistical Aggregation:
[0205] When the edge actuator issues the instruction set And generate a release signature Subsequently, the three-stream data command-execution-market data updates begin in milliseconds. Without structured sampling of these high-frequency feedbacks, a situation of data flooding and model starvation arises: useful tail samples are overwhelmed, and the generator fails to learn the latest anomalies. Therefore, a loss sampling mechanism is needed to handle the three types of loss; a safety loss scalar... Power loss scalar Price loss scalar Perform sliding window accumulation and extract key statistics to provide low-latency, high-entropy input for subsequent incremental learning.
[0206] First define the sliding window index set :
[0207]
[0208] Constructing hierarchical sampling probability :
[0209]
[0210] And according to stratified sampling probability Random sampling A subset of samples is formed to represent the loss. :
[0211]
[0212] Where: sliding window index set :recent A collection of moments, , It is a set of positive natural numbers, set by the operations team; Label the loss category: Indicates safety loss, Indicates power loss. Indicates price loss, , This serves as the scene index within the sliding window, used to enumerate the loss values of each tail scene for probability calculation;
[0213] Stratified sampling probability : For samples within the sliding window, calculate the power of the loss Weighted, with larger weights for samples at the tail end; power factor Adjust the magnification at the tail end, with a range of values. Sample size The number of samples retained for each type of loss depends on computing power and real-time constraints.
[0214] Power-weighted sampling allows tail samples to achieve a higher retention rate with the same communication overhead, ensuring the generator's learning density for rare patterns. The three subsets are concatenated by time index to obtain the loss observation matrix. :
[0215]
[0216] in .
[0217] Security loss subset Extracted from the sliding window using a power-weighted method A row vector composed of safety loss samples; power loss subset Extracted from the sliding window A row vector composed of power loss samples; a subset of price losses Extracted from the sliding window A row vector consisting of price loss samples; 3 rows over the real number field Column matrix space;
[0218] Where: loss observation matrix Real-time observations stacked by loss category are used for online estimation of quantiles and gradients;
[0219] Total sample size The sum of the sample sizes of the three classes, and its value. .
[0220] The matrix form facilitates the one-time calculation of new quantile statistics, gradient estimates, and KL divergences, creating a data interface for subsequent natural gradient updates. (Regarding the loss observation matrix...) Calculate empirical quantiles column by column :
[0221]
[0222] And calculate category entropy :
[0223]
[0224] Where: empirical quantile Losses inside the sliding window - Quantile estimation; Category entropy : Measures sample diversity; a higher value indicates a more uniform distribution. Loss category index, value Indicates safety loss, Indicates power loss, Indicates price loss;
[0225] , No. Each sampled category Loss sample value, ,category The confidence level is equal to the probability quality that the conditional value of risk needs to retain, and it is usually close to 1.
[0226] Furthermore, experience quantiles Provides a real-time benchmark for CVaR shearing, category entropy As an entropy metric, it injects a diversity penalty into generator updates to prevent pattern collapse.
[0227] Step 502, Generator-CVaR Joint Natural Gradient Update:
[0228] Existing loss observation matrix Experience quantile And observation information must be injected into the generator parameters. and confidence radius In this study, considering that traditional stochastic gradient descent relies too heavily on tail samples and suffers from distribution skewness and difficulty in convergence, a more adaptive dual-path scheme of natural gradient-Bayesian mapping was chosen: updating with natural gradient. Update using conjugate Bayes Finally, the two results are merged into the cloud for unified communication and broadcasting.
[0229] Assume the generator output distribution Estimate the target distribution using the loss observation matrix Minimize the natural gradient of the KL divergence:
[0230]
[0231] in: For the Fisher information matrix, with the current parameters The calculated Fisher information matrix describes the local curvature of the parameter space. Step size. : Adjusts the convergence speed and learning rate; a scalar with a positive value less than 1, used to control the parameter update step size; Based on the current generator parameters Defined model output distribution;
[0232] Natural gradient The steepest descent direction in the geometric sense of information, at time [time]. For the generator parameter vector The natural gradient correction amount is used for the online update in this cycle. The target data distribution, estimated in real time from the loss observation matrix, reflects the statistical characteristics of the latest tail sample. For gradient operators;
[0233] Furthermore, the natural gradient inherently provides curvature correction, which can prevent oscillations caused by excessively large step sizes when the number of samples surges at the tail end. (Set the confidence radius vector.) The prior distribution is gamma:
[0234]
[0235] Post-update verification:
[0236] ,
[0237] Where: shape parameter : Cumulative sample size, integer Corresponding to the next moment;
[0238] Scale parameters Cumulative excess loss beyond the percentile Corresponding to the next moment;
[0239] Gamma distribution Conjugate priors ensure parse updates. Indicate category At the present moment The empirical quantile benchmark.
[0240] Furthermore, Bayesian updates allow the confidence radius to automatically shrink as the number of samples increases, while it expands in the opposite direction if the tail end frequently exceeds the limit, achieving adaptive risk budgeting. Synthetic joint updates:
[0241]
[0242] And generate broadcast packets :
[0243]
[0244] Steps two and three are pushed to the next round of scenario generation and used for CVaR solution.
[0245] In the formula: broadcast packet It carries updated generator parameters, confidence radius, and entropy metric.
[0246] Entropy measurement This can serve as a reference indicator for sample diversity, helping the generator avoid falling into pattern collapse again in the next round. The joint update formula makes both have the same effect, taking into account the development speed of both, so that neither can fall behind the other and both can move forward steadily. Single packet broadcast can avoid the problem of multi-channel synchronization delay, ensuring that all global nodes can directly use the latest risk scale in the next cycle.
[0247] The high-frequency loss stream is compressed into a statistical packet with optimal information density using a three-stage approach: sliding window hierarchical sampling, observation matrix convergence, and dual indices of quantile and entropy.
[0248] The algorithm employs a natural gradient-Bayes conjugate dual-path update mode. During the iteration process, the generator parameters and confidence radius in the model are changed, and a broadcast is performed. The first step drives the training of the new quantile-GAN; the second step drives the update of the CVaR shear point; the third step serves as the basis for dynamic adjustment of the issuance threshold; and the fourth step flows from feedback to the risk model, acting as a connecting thread in the closed-loop chain.
[0249] Step 5 maps the real-time loss stream into the driving force needed for model evolution, and establishes a 5-level adaptive link consisting of sampling, statistics, natural gradient, Bayesian contraction, and broadcasting, so that the virtual power plant risk model has the ability to evolve itself.
[0250] This invention refreshes optimized parameters based on the CVaR framework within minutes without degrading service, requiring offline retraining, or requiring batch historical data, minimizing operational costs and controlling operational risk exposure within the shortest possible time window. Combined with anomaly detection, it establishes a self-healing risk control loop for abnormal transaction frequency scenarios, ensuring the normal operation of the entire system in parallel even under high-frequency network attacks, large market fluctuations, equipment degradation, and the triple optimal goals of security, profit, and stability.
[0251] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0252] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0253] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0254] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0255] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A virtual power plant optimization management method based on conditional value at risk, characterized by: include, Simultaneously collect instruction stream, market data stream, and power stream at the edge, generate a unified feature tensor through multi-view attention fusion, label the distortion segment, and determine the anomaly intensity based on the historical steady-state distribution; The distorted segment is input into the improved quantile generative adversarial network to generate a set of risk scenarios coupled with security, power and price, and attach synchronization deviation quantile labels for subsequent optimization and processing. Using a set of risk scenarios as input, a global objective coupled with three-layer conditions of safety, power, and price is constructed. By combining variables of energy storage, load, and bidding, a small-tail loss scheduling scheme is solved. The scheduling scheme is subjected to consistency verification at the cloud-edge. After passing the verification, the device instruction set is generated by unpacking and predicting the power and price deviation in the local power flow-market sandbox. If the deviation is lower than the release threshold, the instruction is released. The loss is sampled in real time and the observation matrix is formed. The network parameters are updated using natural gradients. The confidence radius is shrunk using a Bayesian method and the update packet is broadcast for use in the next cycle.
2. The virtual power plant optimization management method based on conditional value of risk as described in claim 1, characterized in that: Sliding index interpolation alignment is performed on the original timestamps of the instruction stream, market data stream, and power stream to obtain a unified millisecond-level common time axis; A multi-view attention mechanism is used to learn the weights of the aligned feature matrix and generate a weighted feature tensor by linear mapping. The multi-view attention mechanism simultaneously calculates the temporal self-attention weights and the intermodal interaction weights.
3. The virtual power plant optimization management method based on conditional value at risk as described in claim 2, characterized in that: A variational Gaussian mixture steady-state model is established based on a weighted feature tensor to obtain the steady-state probability density; anomaly scores are calculated and safety pointers are generated; continuous safety pointers are smoothed by bidirectional Bayesian filtering to generate segment-level anomaly labels, which serve as input indices for risk scenario generation.
4. The virtual power plant optimization management method based on conditional value at risk as described in claim 3, characterized in that: The quantile labels are obtained by mapping the security pointers to linear stretching and inverse cumulative distribution, and a scene index matrix is constructed. The scene index is then concatenated with a random noise vector to form the generator input, which drives the quantile generative adversarial network to output multi-scene samples with quantile control capabilities.
5. The virtual power plant optimization management method based on conditional value at risk as described in claim 4, characterized in that: The training objective of the quantile generative adversarial network consists of adversarial cross-entropy loss coupled with the first-order Wasserstein distance of the quantile, and a balance coefficient is set to adjust the weights of the two types of losses; gradient optimization is performed on the distribution difference between generated samples and real samples under the same quantile condition.
6. The virtual power plant optimization management method based on conditional value at risk as described in claim 5, characterized in that: Establish scalars for safety loss, power loss, and price loss respectively; All three types of losses are expressed using the shearing variable and the tail excess expectation as the conditional value at risk (VaR) formula; the three VaRs are weighted by weighting coefficients to form the overall objective function.
7. The virtual power plant optimization management method based on conditional value at risk as described in claim 6, characterized in that: The overall objective function, together with the energy storage power vector, load adjustment vector, and bidding adjustment vector, constitutes a mixed integer second-order cone programming model. Energy storage boundary, bus power boundary, and market tiered application second-order cone constraints are set to solve for the scheduling vector that minimizes the overall tail-end loss.
8. The virtual power plant optimization management method based on conditional value at risk as described in claim 7, characterized in that: The communication delay mapping matrix is used to perform channel correction on the cloud energy storage power plan, and the second norm error is calculated with the edge power feedback of the previous cycle. The energy storage error, load error, and bidding error are linearly synthesized into a consistency index according to a preset weight, and compared with the consistency threshold to determine the unpacking and release of instructions.
9. The virtual power plant optimization management method based on conditional value at risk as described in claim 8, characterized in that: At the edge, the unpacking command is coupled with the power flow Jacobi fast iteration model and the local supply and demand price elasticity model in a sandbox simulation to calculate the power-price comprehensive deviation and voltage offset. The two are combined into a comprehensive risk index by weighting coefficients and compared with the release threshold to determine whether the command is released or revised in time.
10. The virtual power plant optimization management method based on conditional value at risk as described in claim 9, characterized in that: A power-weighted sampling mechanism using a sliding window is employed to extract samples from each type of loss, forming a subset of the loss. The three subsets are concatenated into a loss observation matrix, and real-time empirical quantiles and category entropy are calculated based on the matrix for subsequent incremental model updates.
11. The virtual power plant optimization management method based on conditional value at risk as described in claim 10, characterized in that: The generator parameters are updated using natural gradients based on the loss observation matrix, while the posterior shape and scale parameters of the confidence radius are updated using the gamma conjugate Bayesian method. Finally, the updated generator parameters, confidence radius, and class entropy are encapsulated into a broadcast packet and sent to the risk scenario generation and scheduling optimization module for use in the next cycle.
Citation Information
Patent Citations
Multi-risk management method based on conditional value-at-risk model in worst scene
CN119831341A
Intelligent scheduling method for comprehensive virtual power plant
CN120046958A