A bayesian deep learning-based overvoltage dynamic early warning method and system
Patent Information
- Application Number
- CN202610850858.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-12
- Publication Date
- 2026-10-23
AI Technical Summary
[0010]本发明的目的就是为了克服上述现有技术存在的缺陷而提供一种基于贝叶斯深度学习的过电压动态预警方法及系统,旨在解决高比例分布式新能源接入下因源-荷双侧强不确定性导致的电压越限风险精准预警难题
(1)本发明通过先计算基于电压概率分布的风险价值,即概率分布集合的第α分位数电压值,再计算条件风险价值,即所有超过风险价值电压值的条件期望,精确地刻画了概率分布尾部,即最坏情况下的平均风险水平;克服了传统基于固定阈值或均值预测的预警方法只关注平均情况或最大值,容易忽略极端事件的问题;
Smart Images

Figure CN122964751A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of smart grids and digital grids, and in particular to an overvoltage dynamic early warning method and system based on Bayesian deep learning. Background Technology
[0002] As the global energy structure accelerates its transition to a green and low-carbon model, the penetration rate of distributed renewable energy sources, represented by photovoltaics and wind power, in power distribution networks continues to rise. Driven by China's "dual carbon" goals, the installed capacity of distributed renewable energy has experienced explosive growth, and the power distribution network is undergoing a profound transformation from a traditional "passive network" with unidirectional power supply to an "active network" with bidirectional power flow. While this transformation improves the level of clean energy, it also brings unprecedented challenges to the safe and stable operation of the power distribution network. The high proportion of distributed power sources means that the operating status of distribution substations is jointly dominated by strong uncertainties on both the source and load sides. The inherent intermittency and volatility of renewable energy output, especially under extreme weather conditions such as short-term strong radiation, rapid cloud movement, and gusts causing drastic power fluctuations, coupled with random changes in load demand, leads to increased fluctuations in key electrical quantities in the substation, such as node voltage and line current. The risks of voltage exceeding limits (overvoltage / undervoltage) and line overload have significantly increased, becoming a core bottleneck restricting the efficient local consumption of renewable energy and threatening the safety of power distribution equipment and the reliability of power supply.
[0003] Against this backdrop, achieving accurate and proactive early warning of overvoltage risks in distribution substations is a key supporting technology for building a highly resilient and reliable new distribution network. Traditional passive alarm methods relying on human experience or fixed thresholds are no longer sufficient to cope with complex and ever-changing operating environments. Therefore, developing intelligent early warning systems based on data-driven and artificial intelligence, and realizing the transformation from "post-event handling" to "pre-event early warning," has significant engineering practical value and is an urgent practical need for ensuring grid security, improving operational efficiency, and supporting a high proportion of renewable energy integration.
[0004] Despite extensive research in distribution network condition awareness and risk warning by academia and industry, existing methods still face significant technical shortcomings and challenges in the face of the highly uncertain coupled environment brought about by the high proportion of renewable energy integration. These shortcomings are mainly reflected in the following aspects: The ability to quantify the propagation paths of multi-source uncertainties is insufficient. Existing early warning methods are mostly based on deterministic prediction models, such as LSTM, SVM, and gradient boosting trees, whose output is a single point prediction value. These methods cannot characterize the complex nonlinear coupling relationships between multiple uncertain factors such as renewable energy output, load fluctuations, and energy storage response lags, and their dynamic propagation effects in the "source-grid-load-storage" system. Due to the lack of measurement of the uncertainty of the prediction results themselves, when the predicted point value is within the safe range but the tail of the actual probability distribution has reached the risk area, false alarms are very likely to occur; conversely, the neglect of uncertainty may also lead to frequent false alarms. In essence, traditional methods have failed to achieve a paradigm shift from "point prediction" to "probabilistic prediction," and cannot provide a complete probability distribution basis for risk assessment, resulting in insufficient information basis and poor foresight for early warning decisions.
[0005] The generation of extreme scenarios lacks physical constraints, raising questions about their authenticity. To compensate for the lack of extreme event samples in historical data, deep generative models such as Generative Adversarial Networks (GANs) have been used for scenario generation. However, current mainstream methods are mostly data-driven, focusing on reproducing the statistical distribution characteristics of historical data while severely neglecting the physical constraints of power system operation. For example, the generated renewable energy output sequence may violate the physical ramp rate limits of inverters, wind turbines, and other equipment, resulting in faster-than-light power changes; it may also ignore the spatiotemporal correlation of output between adjacent renewable energy sites, generating statistically reasonable but physically unrealizable power distributions. Using such physically unrealistic scenarios for model training or testing will directly lead to the distortion of risk warning models, either exaggerating risks and causing over-warning and resource waste, or underestimating real risks and causing defense failures, severely weakening the reliability and credibility of the warning system.
[0006] Static and fixed warning thresholds are unsuitable for adapting to dynamic operating environments. Existing warning systems generally use fixed voltage or current thresholds as criteria. However, the operating environment of a distribution network is time-varying. The actual current-carrying capacity (thermal stability limit) of a line is not a constant but changes dynamically with external conditions such as ambient temperature, wind speed, and solar radiation intensity—a phenomenon known as dynamic thermal rating (DTR). Simultaneously, factors such as equipment aging and changes in network topology also affect the system's actual risk tolerance boundary. Fixed thresholds are too aggressive in harsh environments and when line capacity decreases, failing to provide timely warnings of potential overload and overheating risks; conversely, they are too conservative in favorable environments and with ample capacity, generating numerous unnecessary warnings, disrupting operations, and wasting maintenance resources. Currently, there is a lack of a dynamic threshold adjustment mechanism that can deeply integrate real-time physical state information and possess online self-learning and optimization capabilities. This is the main technical bottleneck for achieving intelligent and adaptive warnings.
[0007] Risk assessment indicators are disconnected from the physical operating status of the power grid. At the risk decision-making level, some studies have attempted to introduce risk metrics from the financial field, such as VaR (VaR), but their application often remains at the level of electrical quantities, such as the probability of voltage exceeding a certain value, failing to effectively correlate and scientifically map them with quantities reflecting the physical safety status of equipment, such as line temperature and dynamic current limits. This disconnect between risk assessment and physical operation results in early warning results that cannot directly and accurately guide operational control, significantly reducing their practicality.
[0008] The invention disclosed in CN114742283A presents a method for estimating and assessing the loop current of medium-voltage lines based on deep learning networks. This method involves collecting grid structure parameters, power generation and load level data, distributed generation output data, and historical data of relevant loop feeder currents. It then constructs neural network input and output data, trains the neural network model, and considers real-time load forecasts and distributed generation output forecasts to predict and assess the risk of loop current in medium-voltage lines under expected boundary conditions. This invention enhances adaptability to the complexity of modeling feeders in new distribution networks and the randomness and uncertainty of boundary conditions, improves estimation accuracy and efficiency, fills gaps in risk classification, and adds a function to recommend loop operation periods. However, the model designed in this scheme has poor early warning and risk assessment capabilities under extreme scenarios and exhibits poor robustness.
[0009] In summary, current research has significant shortcomings in four key areas: uncertainty quantification, extreme scenario generation, dynamic threshold adjustment, and risk-physical state fusion. These deficiencies collectively lead to existing early warning systems exhibiting insufficient foresight, low accuracy, weak adaptability, and poor practicality, making it difficult to meet the stringent safety early warning requirements of high-proportion renewable energy distribution networks. Summary of the Invention
[0010] The purpose of this invention is to overcome the shortcomings of existing technologies by providing a dynamic overvoltage early warning method and system based on Bayesian deep learning. This aims to solve the problem of accurate early warning of voltage over-limit risks caused by strong uncertainties on both the source and load sides under high-proportion distributed renewable energy access. The method first constructs a physically constrained Long Short-Term Memory (LSTM) generative adversarial network to generate extreme operating scenarios that conform to the equipment ramp-up rate limits and spatiotemporal correlations, enriching the training samples. Then, a Bayesian neural network based on Monte Carlo Dropout is used to quantify the propagation path of multi-source uncertainties to node voltages in a feedforward manner, directly outputting the probability distribution of future voltages. Based on this, a conditional value of risk (VoV) index is introduced and combined with dynamic current limits based on real-time environmental parameters through power flow mapping, achieving accurate assessment from electrical quantity risk to physical overload risk. Finally, an adaptive sliding window algorithm is designed to dynamically adjust the early warning confidence level, forming an intelligent early warning closed loop with online learning capabilities. Practical applications show that this invention significantly improves the accuracy and foresight of early warnings, with an average early warning time of over 17 minutes, effectively enhancing the robustness of the distribution network against random disturbances.
[0011] The objective of this invention can be achieved through the following technical solutions: A dynamic overvoltage early warning method based on Bayesian deep learning includes: Acquire multi-source spatiotemporal operational data, including ambient temperature and equipment parameters, and preprocess the data; input the preprocessed data into a pre-built Bayesian deep learning model to obtain a set of probability distributions of voltage values at multiple future moments; Calculate the risk value of the probability distribution set at a preset confidence level α; the risk value is the α-quantile voltage value of the probability distribution set; based on the risk value, calculate the voltage conditional risk value; the voltage conditional risk value is the conditional expectation of all voltage values exceeding the risk value; map the voltage conditional risk value to the current conditional risk value; Based on the ambient temperature, calculate the maximum allowable current of the line at the current moment; compare the maximum allowable current with the current condition risk value; if the current condition risk value is greater than or equal to the maximum allowable current, trigger an overload warning; if the current condition risk value is less than the maximum allowable current, output normal status information.
[0012] Furthermore, the multi-source spatiotemporal operation data includes new energy power, load data, energy storage status, line temperature, equipment parameters, ambient temperature and humidity; the equipment parameters include rated current, maximum allowable conductor temperature and reference temperature under rated current.
[0013] Furthermore, based on the aforementioned value of risk, the voltage condition value of risk is calculated using the following formula: in, Value at risk, Value at risk for voltage conditions. α For confidence level, For voltage value variables, Indicates voltage distribution. Indicates the preset confidence level α Under voltage Voltage value variable less than or equal to The probability is at least α .
[0014] Furthermore, the voltage condition risk value is mapped to the current condition risk value using a preset sensitivity matrix, and the corresponding mapping expression is: CVaRα(I) ≈ |J| ⋅ Where CVaRα(I) is the current-conditional risk value, and J is the sensitivity matrix.
[0015] Furthermore, the training process of a Bayesian deep learning model includes: Obtain a multi-source spatiotemporal augmentation dataset and input it into the Bayesian deep learning model; make predictions based on the multi-source spatiotemporal augmentation dataset to obtain the prediction mean and variance; calculate the loss function based on the prediction mean and variance; update the model parameters based on the loss function value until training converges to obtain a trained Bayesian deep learning model. The function expression of the loss function is: in, Let w be the functional expression for the loss function, where N represents the total number of samples and w represents all parameters of the model. The regularization intensity coefficient is . Let i be the true label value of the i-th sample. Let be the mean of the predictions for the i-th sample. This represents the variance of the prediction for the i-th sample.
[0016] Furthermore, the multi-source spatiotemporal augmentation dataset is generated using a pre-constructed Long Short-Term Memory (LSTM) generative adversarial network (GAN) model; the LSM GAN model includes a generator and a discriminator; the training process of the LSM GAN model includes: A random noise vector and conditional information are obtained and input into the Long Short-Term Memory Generative Adversarial Network (LSTMG) model to generate a new energy output time series. Based on the new energy output time series, a total loss function including ramp rate constraints and spatiotemporal correlation constraints is calculated. Based on the total loss function value, the model parameters of the LTMG model are optimized until training converges, resulting in a trained LTMG model.
[0017] Furthermore, the functional expression for the total loss function is: in, This is the functional expression for the total loss function. The basic objective function term, For the slope rate constraint term, For spatiotemporal correlation constraints, , To balance hyperparameters, Interpolation points between real data and generated data. λ The gradient penalty coefficient is... The covariance matrix of the real data. To generate the covariance matrix of the data, To penalize the rate of change of power, To the maximum permissible gradeability, Indicates the condition c The discriminator on real samples x The output critical score, where x is the real sample, z is the random noise vector, and c is the conditional information. It is the Frobenius norm. Indicates the condition c Below, due to noise z The generated samples, This indicates the discriminator's output at the interpolation point. This indicates that for interpolation points gradient, This represents the expectation of the actual data distribution. This represents the average score of the generated samples. Represents the true data distribution. Indicates noise distribution. This indicates the distribution of interpolation points.
[0018] Furthermore, based on the ambient temperature, the maximum allowable current of the line at the current moment is calculated using the following formula: in, This represents the maximum allowable current of the line at the current moment. The rated current of the line. This is the maximum allowable temperature of the conductor. For real-time ambient temperature, This is the reference temperature corresponding to the rated current.
[0019] Furthermore, the methods also include: Obtain early warning and alarm information within a preset time window; based on the early warning and alarm information, dynamically adjust the preset warning level, with the corresponding adjustment expression being: in, M represents the true risk exposure level, and M is the number of time steps. For at a certain point in time The actual overvoltage amplitude detected at the location, To be at confidence level The dynamic threshold of the overvoltage risk value. This is the adjusted confidence level. To preset the credit level, To adjust the step size, For time indexing.
[0020] The present invention also provides a system for a dynamic overvoltage warning method based on Bayesian deep learning, comprising a memory and a processor, wherein the memory stores a computer program, and the processor calls the computer program to execute the steps of the method described above.
[0021] Compared with the prior art, the present invention has the following advantages: (1) This invention first calculates the risk value based on the voltage probability distribution, that is, the α-quantile voltage value of the probability distribution set, and then calculates the conditional risk value, that is, the conditional expectation of all voltage values exceeding the risk value. This accurately characterizes the tail of the probability distribution, that is, the average risk level in the worst case. It overcomes the problem that traditional early warning methods based on fixed thresholds or mean predictions only focus on the average case or the maximum value and easily ignore extreme events. While extreme events have a low probability of occurrence, their consequences are extremely severe once they happen. For example, during the process of rapidly moving cloud cover and dissipation, the power output of multiple photovoltaic sites may simultaneously decrease or surge within tens of seconds, often being lost in statistical averaging by traditional methods. This invention, however, actively focuses on the worst-case scenario at the tail end of the probability distribution, ensuring that early warning decisions are based on the average risk level that would be reached under the worst-case scenario. This shift in perspective from average risk to tail-end risk fundamentally solves the problem of missed warnings under extreme conditions. When extreme scenarios such as sudden changes in renewable energy output or peak load disturbances occur, this invention can identify potential overload risks earlier and more reliably than traditional methods, providing a solid guarantee for the safe operation of the power grid.
[0022] (2) By designing a loss function that includes a power ramp-up rate constraint and a multi-site spatiotemporal correlation constraint, and training a long short-term memory network and a generative adversarial network, this invention can ensure that the generated new energy output fluctuation process is dynamically feasible. At the same time, by calculating the Frobenius norm error between the covariance matrix of the generated data and the real data as a penalty, the generator is forced to learn and reproduce the temporal and spatial correlation characteristics of the output of multiple distributed new energy sites. This makes the generated extreme operating scenarios have both high statistical realism and strict physical realizability, providing a high-quality, high-fidelity training sample library for subsequent probabilistic prediction models, and fundamentally solving the problem of the model's generalization ability being reduced due to the distortion of the generated scenarios.
[0023] (3) This invention designs a sliding window module that monitors the deviation between the predicted risk and the actual risk in real time. It can dynamically adjust the confidence level used in the calculation by statistically analyzing the difference between the actual risk exposure rate and the model's preset expected risk level. When the actual risk is too high, α is automatically increased to pay more attention to the tail and tighten the warning threshold. Conversely, α is reduced and the threshold is relaxed, so that the warning method has the ability to learn online and optimize itself. It intelligently balances the sensitivity and reliability of the warning and completely solves the core pain point of poor adaptability of fixed threshold warning. Attached Figure Description
[0024] Figure 1 This is a flowchart of an overvoltage dynamic early warning method based on Bayesian deep learning provided in an embodiment of the present invention; Figure 2 This is a system architecture diagram of a dynamic risk early warning system provided in an embodiment of the present invention; Figure 3 This is a flowchart illustrating the training process of an LSTM-GAN extreme scene generation model for a dynamic risk warning system provided in this embodiment of the invention. Figure 4This is a flowchart of the Bayesian neural network (BNN) solution process for a dynamic risk warning system provided in this embodiment of the invention. Figure 5 This is a flowchart of the dynamic risk assessment process of a dynamic risk early warning system provided in an embodiment of the present invention; Figure 6 This is a feature importance ranking diagram of a dynamic risk early warning system provided in an embodiment of the present invention; Figure 7 This is a feature cumulative importance curve of a dynamic risk early warning system provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of the Bayesian LSTM training loss of a dynamic risk warning system provided in an embodiment of the present invention; Figure 9 This is a schematic diagram illustrating the training accuracy of a Bayesian LSTM in a dynamic risk warning system provided in an embodiment of the present invention. Figure 10 This is a schematic diagram illustrating the training accuracy of a Bayesian LSTM in a dynamic risk warning system provided in an embodiment of the present invention. Figure 11 This is an AUC curve of a Bayesian LSTM training system provided in an embodiment of the present invention. Figure 12 This is a radar chart showing the model performance of a dynamic risk early warning system provided in an embodiment of the present invention. Figure 13 This is a bar chart comparing the performance of a baseline model of a dynamic risk warning system provided in this embodiment of the invention. Figure 14 This is a graph showing the predicted probability and uncertainty of a dynamic risk warning system provided in an embodiment of the present invention. Figure 15 This is an uncertainty decomposition diagram of a dynamic risk early warning system provided in an embodiment of the present invention; Figure 16 This is a histogram of the predicted probability distribution of a dynamic risk warning system provided in an embodiment of the present invention; Figure 17 This is a scatter plot of uncertainty and prediction error of a dynamic risk early warning system provided in an embodiment of the present invention; Figure 18 This is a verification diagram of the prediction interval coverage of a dynamic risk warning system provided in an embodiment of the present invention; Figure 19 This is a CVaR risk analysis diagram of a dynamic risk early warning system provided in an embodiment of the present invention; Figure 20 This is a pie chart showing the risk level distribution of a dynamic risk early warning system provided in this embodiment of the invention. Figure 21 This is a dynamic heat rating analysis diagram of a dynamic risk early warning system provided in an embodiment of the present invention; Figure 22 This is an early warning timeline diagram of a dynamic risk warning system provided in an embodiment of the present invention; Figure 23 This is a schematic diagram illustrating the adaptive adjustment history of the confidence level of a dynamic risk warning system provided in this embodiment of the invention. Figure 24 This is a risk exposure rate change curve of a dynamic risk early warning system provided in an embodiment of the present invention; Figure 25 This is a graph showing the change in early warning performance indicators of a dynamic risk early warning system provided in an embodiment of the present invention. Figure 26 This is a diagram showing the three-phase voltage changes during an overvoltage event in a dynamic risk warning system provided in this embodiment of the invention. Figure 27 This is a power variation curve of a dynamic risk early warning system provided in an embodiment of the present invention; Figure 28 This is a risk indicator change graph of a dynamic risk early warning system provided in an embodiment of the present invention; Figure 29 This is a time-series diagram of environmental factors for a dynamic risk warning system provided in an embodiment of the present invention. Detailed Implementation
[0025] 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 embodiments of the present invention, and not all embodiments. 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.
[0026] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0027] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0028] Example 1 like Figure 1As shown, this embodiment provides an overvoltage dynamic early warning method based on Bayesian deep learning, which includes the following steps: S1: Acquire multi-source spatiotemporal operational data of the distribution substation, including ambient temperature, and preprocess it; input the preprocessed data into a pre-built Bayesian deep learning model to obtain a set of probability distributions of voltage values at multiple future moments; Preferred, Multi-source spatiotemporal operation data includes new energy power, load data, energy storage status, line temperature, equipment parameters, ambient temperature and humidity; equipment parameters include rated current, maximum allowable conductor temperature, and reference temperature under rated current.
[0029] Preferred, The training process of a Bayesian deep learning model includes: Obtain a multi-source spatiotemporal augmentation dataset and input it into the Bayesian deep learning model; make predictions based on the multi-source spatiotemporal augmentation dataset to obtain the prediction mean and variance; calculate the loss function based on the prediction mean and variance; update the model parameters based on the loss function value until training converges to obtain the trained Bayesian deep learning model.
[0030] Preferred, A multi-source spatiotemporal augmentation dataset is generated using a pre-built Long Short-Term Memory (LSTM) Generative Adversarial Network (GAN) model. The LSM GAN model includes a generator and a discriminator. The training process of the LSM GAN model includes: Obtain random noise vectors and conditional information and input them into the Long Short-Term Memory Generative Adversarial Network (LSTMG) model to generate a new energy output time series. Based on the new energy output time series, calculate the total loss function, including ramp rate constraints and spatiotemporal correlation constraints. Based on the total loss function value, optimize the model parameters of the LTMG model until training converges, and obtain the trained LTMG model.
[0031] S2: Calculate the value at risk of the probability distribution set at a preset confidence level α; the value at risk is the voltage value at the α-quantile of the probability distribution set; based on the value at risk, calculate the voltage conditional value at risk; the voltage conditional value at risk is the conditional expectation of all voltage values exceeding the value at risk; map the voltage conditional value at risk to the current conditional value at risk. Preferred, Based on the value at risk, the voltage condition value at risk is calculated using the following formula: in, Value at risk, Value at risk for voltage conditions.α For confidence level, For voltage value variables, Indicates voltage distribution. Indicates the preset confidence level α Under voltage Voltage value variable less than or equal to The probability is at least α .
[0032] Specifically, Using a pre-defined sensitivity matrix, the voltage-condition value-at-risk (VAT) is mapped to the current-condition VAT; the corresponding mapping expression is: CVaRα(I) ≈ |J| ⋅ Where CVaRα(I) is the current-conditional risk value, and J is the sensitivity matrix.
[0033] S3: Based on the ambient temperature, calculate the maximum allowable current of the line at the current moment; compare the maximum allowable current with the current condition risk value. If the current condition risk value is greater than or equal to the maximum allowable current, trigger an overload warning; if the current condition risk value is less than the maximum allowable current, output normal status information.
[0034] Preferred, Based on the ambient temperature, the maximum allowable current of the line at the current moment is calculated using the following formula: in, This represents the maximum allowable current of the line at the current moment. The rated current of the line. This is the maximum allowable temperature of the conductor. For real-time ambient temperature, This is the reference temperature corresponding to the rated current.
[0035] Example 2 This embodiment provides a dynamic risk warning system that integrates offline training and online application. Its core framework is as follows: Figure 2 As shown, this system aims to achieve multi-scale, probabilistic, and adaptive early warning of overvoltage risks in distribution substations by deeply integrating data-driven methods with physical mechanisms. The overall framework consists of two main parts: offline training and online application. These two parts work together to support a complete closed loop from uncertainty modeling to risk decision-making.
[0036] 1. Overall system framework: Offline training layer: As the cornerstone of the entire dynamic early warning system, the offline training layer is dedicated to building accurate and robust probabilistic prediction models and scenario libraries, providing a pre-trained core engine for real-time decision-making in online applications. This layer generates a large number of physically realizable training samples covering extreme conditions through physically constrained LSTM-GANs to compensate for the lack of black swan events in historical data; and utilizes Bayesian neural networks to learn the complex mapping relationship from multi-source uncertainty to node voltages, outputting prediction results with probabilistic significance. The following sections will elaborate on the model structure, training strategies, and implementation mechanisms of these two core modules.
[0037] (1) Module A: Extreme scene generation based on physical constraints of LSTM-GAN This module aims to enrich the training sample set, particularly covering the power output behavior of renewable energy sources under extreme weather and operational conditions. Using historical SCADA data, meteorological data, and operational logs as input, it introduces spatiotemporal correlation constraints and power ramp-up rate limits to ensure that the generated renewable energy output sequences not only conform to statistical regularities but also possess physical feasibility. The numerous generated scenarios will serve as an important supplement to the training of the BNN probabilistic prediction model, enhancing the model's generalization ability to rare events and abrupt changes.
[0038] (2) Module B: Training of Bayesian Neural Network Probabilistic Prediction Model This module constructs an end-to-end probabilistic mapping model to predict the probability distribution of future node voltages using multi-source inputs, including renewable energy output, load power, energy storage SOC, and ambient temperature. It employs MC Dropout to approximate Bayesian inference and trains the network by minimizing the negative log-likelihood loss function, enabling it to simultaneously output the prediction mean and variance, thereby quantifying cognitive uncertainty and random uncertainty. The training data includes both historical real data and extreme scenarios generated by module A, comprehensively improving the model's ability to characterize complex uncertainty propagation paths.
[0039] Online application layer: The high-precision probabilistic prediction model and generated scenarios built by the offline training layer lay a solid foundation for online real-time early warning. The online application layer, acting as the intelligent brain of the entire framework, is responsible for transforming offline results into practical early warning decisions. Once activated, this layer continuously runs a closed-loop process that deeply integrates perception, prediction, evaluation, and decision-making: it collects and preprocesses multi-source heterogeneous data in real time, uses a BNN model to proactively quantify the uncertainty of future voltage, then dynamically assesses overload risk by combining CVaR risk indicators and physical operating status, and finally intelligently issues early warning commands through an adaptive mechanism. The following will elaborate on the six core steps in this efficient closed loop.
[0040] (1) Step 1: Multi-source real-time data acquisition and preprocessing. The system acquires multi-dimensional data such as new energy power, load data, energy storage status, line temperature, and ambient temperature and humidity in real time, and performs data cleaning, alignment and standardization to form a feature vector with a unified timestamp.
[0041] (2) Step 2: BNN probabilistic forward prediction. Input the real-time features into the trained BNN model, and obtain the probability distribution set of voltage values at multiple future times through multiple forward propagation Dropouts. This constitutes an empirical distribution, providing a probabilistic basis for subsequent risk assessment.
[0042] (3) Step 3: Conditional Value at Risk (CVaR) Calculation. Based on the voltage probability distribution output by the BNN, calculate the CVaR value at a given confidence level α, such as 95%, to capture the average risk level at the tail of the distribution. This system supports calculating CVaR above and below the upper and lower limits respectively, realizing bidirectional risk perception.
[0043] (4) Step 4: Integrate risk mapping of real-time physical state. Combine the real-time collected data such as line temperature rise and ambient temperature, dynamically calculate the maximum allowable current carrying capacity Imax of the current line, and convert the voltage CVaR into current CVaR through the power flow mapping relationship, and then determine whether the overload condition CVaRα(I) ≥ Imax is met, so as to realize the scientific conversion from electrical quantity to physical risk.
[0044] (5) Step 5: Adaptive sliding window threshold dynamic adjustment. An adaptive sliding window mechanism is introduced to dynamically adjust the CVaR confidence level α or the warning offset based on the comparison between recent predictions and actual results. This module can self-optimize according to the actual risk exposure of the system, thereby improving the warning sensitivity and robustness.
[0045] (6) Step 6: Risk warning generation and output. The final system generates risk warnings of different levels based on the dynamic assessment results, such as normal, attention, and warning, and issues them 12-15 minutes in advance to provide decision support for operators. At the same time, it can be connected to the power distribution automation system to trigger preventive control.
[0046] This framework systematically integrates generative modeling, probabilistic inference, risk quantification, and adaptive control theory, achieving a seamless connection across the entire chain from "data → scenario → probability → risk → early warning," and possesses strong engineering practicality and theoretical foresight.
[0047] 2. Physically Constrained LSTM-GAN Extreme Scene Generation Model: like Figure 3As shown, to accurately capture the power output mutation behavior of distributed renewable energy sources under extreme weather conditions, a Long Short-Term Memory Generative Adversarial Network (LSTM-GAN) model incorporating physical constraints was constructed to generate extreme operating scenarios that are temporally correlated and physically realizable. This model not only learns the statistical distribution of historical data but also ensures, by introducing physical constraints, that the generated scenarios conform to the actual power grid operation patterns in terms of power ramp-up rate and spatiotemporal correlation. This provides a rich and reasonable set of uncertainty samples for subsequent probabilistic prediction and risk assessment.
[0048] 2.1. Model Structure Design Generator G: Employs a multi-layer LSTM structure. Inputs are a random noise vector z and conditional information c (including weather type, season, and time period). Output is the generated time-series sequence of new energy power output. The introduction of conditional information enables the generator to generate corresponding power output mutation patterns for different types of extreme weather, such as rapid cloud movement and gusts of wind.
[0049] Discriminator D: Also built based on an LSTM network, it is used to distinguish between the real sequence X and the generated sequence X~. Its output is the probability that the input sequence is real data.
[0050] 2.2. Objective Function and Training Strategy To improve training stability, Wasserstein GAN with Gradient Penalty (WGAN-GP) is used as the basic objective function: In the formula: x ^ represents the interpolation point between the real data and the generated data. λ This represents the gradient penalty coefficient.
[0051] 2.3. Introduction of Physical Constraints To ensure the physical plausibility of the generated scene, the following constraints are introduced into the loss function: (1) Gradient constraint Scenarios where the penalty power change rate exceeds the device's maximum permissible ramp rate Rmax: (2) Spatiotemporal correlation constraints For the generated data from multiple adjacent renewable energy sites, the spatiotemporal correlation error is calculated using a historical correlation coefficient matrix to penalize scenarios that violate actual statistical characteristics: Where Σreal and Σgen are the covariance matrices of the real and generated data, respectively. It is the Frobenius norm.
[0052] The total loss function is: Wherein, β1 and β2 are trade-off hyperparameters, determined through cross-validation.
[0053] 2.4. Training and Assessment The model is trained using historical SCADA data, with β1 and β2 gradually adjusted during training to balance generation quality and physical plausibility. Generated scenarios must pass the following evaluations: statistical consistency (the scenario should be highly consistent with the real scenario in terms of probability distribution, autocorrelation function, etc.); physical feasibility (the ramp rate, power range, etc., must not exceed the physical limits of the equipment); and extreme scenario testing (the generated extreme scenarios should be able to cover rare, highly variable events in the past, such as sudden power drops / surges).
[0054] This module provides a large number of physically meaningful training samples for subsequent BNN probabilistic prediction models, especially enhancing the model's ability to model extreme events. The generated scenarios and real data together constitute the training set, improving the generalization ability and robustness of BNN in modeling uncertain propagation paths.
[0055] 3. Bayesian Neural Networks and Uncertainty Propagation Quantization like Figure 4 As shown, in order to accurately characterize the coupling propagation effect of multiple uncertainties in a distribution substation, this embodiment uses a Bayesian neural network (BNN) as the core tool for probability prediction, and realizes end-to-end uncertainty modeling and propagation path quantification of complex dynamic relationships in the "source-grid-load-storage" system of the substation.
[0056] 3.1. Model Structure and Bayesian Inference Implementation BNNs (Bayesian Neural Networks) treat network weights as random variables, rather than deterministic values as in traditional neural networks, thus achieving a natural expression of prediction uncertainty. This paper employs an approximate Bayesian inference method based on MC Dropout, applying Dropout operations to multi-layer LSTMs and fully connected layers during both the training and prediction phases, which is equivalent to performing a variational approximation of the Bayesian posterior distribution.
[0057] The model input is a multidimensional feature vector xt at time step t, including but not limited to: power output from new energy sources, such as photovoltaic and wind power; active and reactive power of the load; SOC and PCS status of the energy storage system; historical voltage and current measurements; and meteorological data such as ambient temperature and humidity.
[0058] The output is the predicted value of the node voltage at a future time Δt, such as 15 minutes. The BNN outputs not only the predicted mean μ, but also the predicted variance, which together constitute the probability prediction result.
[0059] 3.2. Training Strategy and Loss Function BNN training aims to maximize the log-likelihood, and regression tasks often assume the output follows a Gaussian distribution. The loss function is defined as: Where fω(xi) is the network output, which can be decomposed under the Gaussian assumption as follows: This loss function optimizes both prediction accuracy and uncertainty estimation, that is, it calculates the mean and variance simultaneously, and constrains the model complexity through L2 regularization to prevent overfitting.
[0060] 3.3. Quantification Mechanism of Uncertainty Propagation During the forward prediction process, perform the following steps for each new input x*: T After one MC Dropout sampling, such as T=100, a series of outputs are obtained. Furthermore, an empirical posterior distribution for voltage prediction is constructed. This distribution clearly reflects two types of uncertainty: cognitive uncertainty, i.e., model uncertainty, which stems from the uncertainty of the model's own parameters and increases with insufficient training data or increased model complexity; and random uncertainty, such as noise from the observed data itself and external random factors.
[0061] By analyzing the statistical characteristics of the output distribution, such as variance and quantiles, the propagation path and amplification effect from input-side renewable energy and load fluctuations to output-side voltage deviations can be clearly traced, providing a probabilistic basis for subsequent risk assessment. Compared with traditional point prediction models such as LSTM, the core advantages of BNN are: providing complete probabilistic outputs and constructing prediction intervals; clearly distinguishing sources of uncertainty and improving decision interpretability; and naturally adapting to scenarios with scarce or noisy training data, enhancing generalization ability. This method lays a solid foundation for subsequent dynamic risk assessment based on CVaR and is key to achieving the leap from point prediction to probabilistic prediction.
[0062] 4. Dynamic risk assessment of CVaR considering spatiotemporal correlation This section introduces Conditional Value at Risk (CVaR) as a dynamic risk assessment index based on the voltage probability distribution output by the BNN. It fully integrates the spatiotemporal correlation between the real-time operating status of the power grid and the propagation of uncertainty, achieving accurate and dynamic assessment of overvoltage risk in distribution substations. This method overcomes the static limitations of traditional fixed threshold methods, capturing tail risks caused by renewable energy fluctuations under extreme weather conditions, and providing a more scientific and dynamic basis for early warning decisions.
[0063] 4.1. Basic Concepts and Calculations of CVaR CVaR is a consistent risk metric that measures tail risk, reflecting the average loss under extremely adverse conditions. For the empirical distribution of voltage V at a future time predicted by BNN (obtained through T random forward propagations), given a confidence level... α For example, 0.95: Value at Risk (VaR) is defined as the voltage distribution. α -Quantities, i.e.: Indicates at confidence level α The maximum possible loss or highest voltage.
[0064] Conditional Value at Risk (CVaR) is defined as the conditional expectation of all voltage values exceeding VaR, i.e., the worst-case 1-α1- α Average voltage level under the following conditions: For overvoltage risk, we focus on the right-tail distribution, i.e., high voltage risk, and therefore calculate the right-tail CVaR; for undervoltage risk, we calculate the left-tail CVaR.
[0065] 4.2. Risk Mapping Incorporating Real-Time Physical States The core of early warning is determining whether a line is overloaded. Traditional methods use fixed current limits, ignoring the dynamic changes in the actual current carrying capacity of the line due to factors such as ambient temperature, wind speed, and solar radiation. This paper introduces the concept of Dynamic Thermal Capacity (DTR) to calculate the maximum allowable current Imax(t) in real time. In the formula: Irated is the rated current of the line, Tmax is the maximum allowable temperature of the conductor, Tenv(t) is the real-time ambient temperature, and Trated is the reference temperature corresponding to the rated current.
[0066] By using power flow calculations or linearization approximations, the CVaR of voltage V can be mapped to the CVaR of current I, thereby determining the overload risk. This condition takes into account forecasting uncertainty, extreme scenarios, and real-time physical conditions, achieving a close integration of risk assessment and dynamic power grid operation.
[0067] 4.3. Integration of Spatiotemporal Relationships The output of new energy sources exhibits significant spatiotemporal correlations, such as cloud movement affecting multiple photovoltaic sites. This paper implicitly incorporates spatiotemporal correlations into CVaR calculations, which is mainly achieved through the following two levels: (1) Spatiotemporal uncertainty coupling based on BNN probability prediction The input feature vector of a BNN explicitly includes multiple renewable energy sites, such as output data from photovoltaic inverters and wind turbines, power data from load points, and environmental meteorological data, such as solar irradiance and wind speed. Assuming there are S renewable energy sites and L load points, the input features at time t can be expressed as: Where Ptsi and Qtsi represent the active / reactive power of station i, Ptlj and Qtlj represent the active / reactive power of load jj, It represents the illuminance, and Tt represents the ambient temperature, etc. BNN, through its powerful nonlinear mapping capability and MC Dropout mechanism, automatically learns the complex spatiotemporal dependencies between these input variables during training. Its output future voltage probability distribution... Essentially, it has already coupled the uncertainties of multiple sites and multiple factors and their spatiotemporal propagation effects.
[0068] (2) Aggregate assessment of regional overvoltage risk To avoid the limitations of single-node assessment, this paper calculates the CVaR simultaneously for key nodes within the distribution transformer area, such as the feeder ends and main transformer outlets, and takes the maximum value as the overall measure of regional overvoltage risk, thus explicitly considering spatial correlation at the decision-making level. Assume there are N key nodes within the distribution transformer area, with their predicted voltage distribution as follows: The regional overvoltage risk index can then be defined as: This maximum value calculation ensures that the risk assessment results are dominated by the most vulnerable and highest-risk node, which aligns with the actual operating characteristics of the power grid's "weakest link" effect, providing operators with a more conservative and safer decision-making basis. This method eliminates the need to explicitly construct complex spatiotemporal correlation models; instead, it is naturally embedded into the risk assessment system through a data-driven approach, combining theoretical rigor with engineering practicality.
[0069] 4.4. Dynamic Risk Assessment Process like Figure 5 As shown, this dynamic risk assessment process is the core decision engine for the online application of this early warning model. It deeply integrates the probabilistic predictions provided by Bayesian neural networks with the real-time physical state of the power grid, quantifies risk through Conditional Value at Risk (CVaR), and ultimately achieves forward-looking overload early warning. Its technical process can be broken down into the following five steps: 1) Input. The input to the process is a multi-source, heterogeneous dataset, which forms the basis for all subsequent calculations: the future voltage probability distribution output by the BNN, which is the empirical distribution set of node voltages at a future time obtained by performing T random forward propagations (e.g., T=100) on the trained BNN using MC Dropout. This distribution quantifies all uncertainties originating from renewable energy sources, loads, and the model itself. The real-time acquired ambient temperature Tenv(t), from temperature and humidity sensors installed on poles or in the field, is a key real-time variable for calculating the dynamic capacity of the line. Equipment parameters Irated, Tmax, and Trated: inherent nameplate parameters of the line, including the rated current Irated, the maximum allowable conductor temperature Tmax (e.g., 70°C or 80°C), and the reference temperature Trated at the rated current (typically 20°C or 25°C). These parameters are relatively fixed and serve as basic configuration information.
[0070] 2) Calculate CVaR (CVaR Calculation). For overvoltage risk, we focus on the right tail of the voltage distribution (i.e., the high-voltage portion). Based on the empirical voltage distribution obtained in step 1: First, calculate the value of risk VaRα at a given confidence level α, such as 95%, which is the α-quantile of the distribution. VaRα represents the highest voltage value that may occur at confidence level α. Then, calculate the conditional value of risk CVaRα, which is the conditional expectation of all voltage values exceeding VaRα, i.e., the average value. CVaRα(V) = E[V | V ≥ VaRα(V)]. This index captures the average voltage level under the worst-case (1-α)*100% scenario and better reflects extreme risk.
[0071] 3) Current Mapping. The ultimate goal of early warning is to prevent line overload, and the direct criterion for overload is current rather than voltage. Therefore, the voltage risk index CVaRα(V) needs to be mapped to the current risk index CVaRα(I). The mapping relationship is based on a simplified physical formula: I ≈ f(V, P, Q). Where P and Q are the real-time active and reactive power of the line. A commonly used and effective approximation method is to use a linearized sensitivity relationship (or the inverse of the power flow Jacobian matrix). Near the local operating point, there exists an approximate relationship: ΔI ≈ J ⋅ ΔV, where J is the sensitivity matrix. Therefore, the voltage CVaR can be mapped to the current CVaR: CVaRα(I) ≈ |J| ⋅ CVaRα(V). This step transforms electrical quantity risk into physical quantity risk, serving as a bridge connecting the electrical system and the thermodynamic system.
[0072] 4) Dynamic Limit Calculation. The maximum safe current carrying capacity of a line is not a fixed value, but changes dynamically with ambient temperature, wind speed, and solar radiation intensity. This step uses a dynamic thermal rating model to calculate the maximum allowable current Imax(t) of the line at the current moment based on the real-time ambient temperature Tenv(t). When Tenv(t) increases, Imax(t) decreases, making the line more prone to overload, and the early warning system should be more sensitive.
[0073] 5) Risk Assessment. This is the final decision-making step in the process, comparing the predicted risk CVaRα(I) with the system's real-time withstand capability Imax(t). The assessment condition is: IF CVaRα(I) ≥ Imax(t) THEN Trigger overload warning. Logical explanation: This condition means that, in the worst-case scenario (1-α)*100%, the predicted average current value has exceeded the maximum current that the line can currently withstand. This is a very conservative and safe criterion, ensuring the foresight and reliability of the warning. If the condition is not met, the system determines that the current risk is controllable and no warning is needed.
[0074] This module is the core link connecting probabilistic prediction and early warning decision-making: it transforms the probabilistic information provided by BNN into actionable risk indicators; it integrates real-time physical conditions to make risk assessment more practically instructive; and it provides a quantitative basis for adaptive threshold adjustment. This method is not only applicable to overvoltage early warning but can also be extended to various risk scenarios such as undervoltage and line overload, demonstrating good versatility and engineering applicability.
[0075] 5. Adaptive sliding window warning threshold dynamic adjustment In a CVaR-based dynamic early warning system, the confidence level α directly determines the system's sensitivity to extreme risks. A fixed α value cannot adapt to the time-varying nature of distribution area operation, such as increased system vulnerability under severe weather conditions or sufficient operational margin during nighttime load low periods. Therefore, this paper proposes a dynamic adjustment mechanism for the early warning threshold based on an adaptive sliding window. This mechanism enables the early warning system to optimize its risk preference (i.e., the value of α) online based on recent forecast performance and measured risks, achieving intelligent and forward-looking risk decision-making balance.
[0076] 5.1 Sliding Window Design and Risk Exposure Assessment Define a sliding window W={t-M+1,tM,...,t} containing the most recent M time steps. Each time step within the window contains the voltage probability distribution predicted by BNN and its subsequent actual measurement value.
[0077] Risk exposure statistics within the window: For each moment within the window, calculate the voltage prediction distribution. αQuantiles, or VaRα(t). This involves counting the number of times the actual voltage value Vactual(t) exceeds VaRα(t) and calculating its proportion α^. Where I(⋅) is the indicator function. α^ quantifies the proportion of extreme situations that actually occurred over a past period, reflecting the system's true risk exposure level.
[0078] 5.2. Dynamic Adjustment Strategy for Confidence Level α The model's preset expected risk coverage level 1-α is compared with the measured risk exposure level. α ^Compare and use as a basis for adjustment: (1) If α^>(1-α), it indicates that the proportion of actual extreme events is higher than the model's expectation. The current model may have underestimated the risk, or the system may be in a more vulnerable state, such as encountering continuous sudden weather changes. To avoid underreporting, the system should adopt a more conservative strategy and automatically increase the confidence level, such as increasing α from 0.95 to 0.97, so that the CVaR calculation pays more attention to the distribution tail, thereby reducing the warning threshold.
[0079] (2) If α^<(1-α), it indicates that the actual risk is lower than expected and the system has sufficient operational margin. To avoid being overly conservative and generating unnecessary warnings, the system can appropriately reduce the confidence level, such as reducing α from 0.95 to 0.93, relaxing the warning threshold, and reducing false alarms.
[0080] The adjustment strategy can be achieved through smooth adaptation using the following formula: in, η The step size is used to control the amplitude and speed of the adjustment and prevent excessive oscillation.
[0081] 5.3. Working in conjunction with the overall framework This adaptive module does not operate in isolation, but forms a closed loop with BNN probability prediction and CVaR evaluation: Input: Based on real-time probability prediction results provided by BNN and measured data from the SCADA system.
[0082] Handling: A sliding window is used to continuously monitor and evaluate the model's predictive performance and risk bias.
[0083] Output: Dynamically adjusted α The new value will be directly used for the CVaR calculation at the next time step, thereby changing the warning criterion CVaR. α ( I The condition in Imax ≥ Imax enables dynamic optimization of the early warning threshold.
[0084] This mechanism enables the early warning system to learn and evolve online. When faced with persistent severe weather, it can become more alert and improve its warning sensitivity; when the system is operating smoothly, it can appropriately reduce sensitivity to minimize operational and maintenance interference, intelligently balancing safety and economy.
[0085] 6. Case Analysis 6.1. Experimental Setup and Data Sources To comprehensively verify the effectiveness and engineering applicability of the proposed model, this embodiment constructs a complete experimental verification system. The experimental hardware platform uses a high-performance computing workstation equipped with an Intel Core i9-12900K processor, 64GB of memory, and an NVIDIA GeForce RTX 4090 graphics card. The software environment is based on Python 3.10 and TensorFlow 2.16.1, and integrates Pandapower for power flow calculation. The experimental data comes from a 10kV distribution substation with a high proportion of photovoltaic (PV) grid connection in China. Actual operating data from June 2023 to June 2024 (one year) was selected as the baseline, with a data sampling interval of 1 minute. The data includes 58 types of features such as PV output, load power, energy storage status, key node voltage and current, line temperature, and ambient temperature and humidity. To compensate for the lack of extreme scenarios in the actual data, this embodiment uses the physically constrained LSTM-GAN model proposed in Section 3 to generate 8000 sets of enhanced scenarios covering typical extreme weather conditions such as sudden clearing, sudden overcasting, and gusts of wind. All generated data passed the ramp rate and spatiotemporal correlation tests to ensure physical rationality. The final dataset is divided into a training set (June 2023 - March 2024), a validation set (April 2024), and a test set (May - June 2024) in chronological order, with a ratio of approximately 7:1:2.
[0086] Table 1 Key Parameter Settings for Data Simulator 6.2. Data Generation and Feature Analysis After fusing the dataset generated using physically constrained LSTM-GAN with real data, it contains approximately 520,000 samples, of which overvoltage events account for about 2.8%, which is basically consistent with the occurrence rate of abnormal events in real power grids. The feature engineering phase constructed 126 features, including time-series statistical features, meteorological derivative features, network topology features, and operational status features.
[0087] Figure 6The feature importance ranking chart shows the importance of the top 30 features calculated based on a gradient boosting tree. The results show that "V_avg_mean_60" (average voltage over the past 60 minutes) still ranks first, with an importance score of 0.065; followed by "Net_power_ratio_30" (net power to load ratio over the past 30 minutes), 0.058, and "PV_curtailment_flag" (PV curtailment flag), 0.051. Compared with previous analyses, the newly added features, energy storage SOC change rate and line temperature rise rate, rank 12th and 18th respectively, indicating that the impact of energy storage dynamic response and line thermal state on voltage risk cannot be ignored. The time features hour_sin and hour_cos remain significant, confirming the daily cyclical fluctuation pattern.
[0088] Figure 7 The cumulative importance curve of features shows that the cumulative importance of the first 40 features has reached 92%. Therefore, the core feature set containing 42 features was finally selected, which reduces the dimensionality of the model input while ensuring the amount of information and improving computational efficiency.
[0089] 6.3. Model Training Process and Performance Analysis The Bayesian LSTM model employs a two-layer LSTM with 128 hidden layers followed by a fully connected layer structure. MC Dropout is used with a dropout rate of 0.15 to estimate uncertainty. An early stopping strategy with a patience of 10 is employed during training, and the negative log-likelihood loss on the validation set is used as the monitoring metric.
[0090] Figure 8 -Training loss curve, Figure 9 -Training accuracy curve, Figure 10 -Training accuracy curve, Figure 11 The training AUC curves illustrate the model's performance evolution over 70 training epochs. The loss curves smoothly decreased and converged, with the training loss and validation loss eventually stabilizing at 0.16 and 0.19, respectively, indicating no significant overfitting. The accuracy reached approximately 98.2% on both the training and validation sets, with precision and AUC improving in tandem. The validation AUC ultimately reached 0.991, demonstrating the model's strong classification ability and robustness.
[0091] Figure 12 The model performance radar chart compares the performance of Bayesian LSTM with XGBoost, LightGBM, Transformer, and traditional deterministic LSTM across five metrics. Bayesian LSTM significantly outperforms other models in recall (-0.882) and AUC (-0.991), particularly excelling in capturing minority classes such as overvoltage events.
[0092] Figure 13- The baseline model performance comparison histogram further quantifies the comparison. The Bayesian LSTM achieved an F1 score of 0.872, which is 6.5% higher than the second-best LightGBM and about 18% higher than the traditional LSTM. The results show that introducing the Bayesian framework not only provides uncertainty information but also improves classification and discrimination performance.
[0093] Figure 12 - The radar chart visually compares Bayesian LSTM with XGBoost, LightGBM, Transformer, and Deterministic LSTM across five key metrics. Bayesian LSTM has the widest coverage area in the radar chart, particularly in recall and AUC, indicating its comprehensive advantage in both minority class identification and overall classification. While slightly lower than the Transformer model in precision (0.02), it leads in recall (0.05), suggesting that Bayesian LSTM prioritizes capturing risky events, aligning with the "better to false positives than false negatives" design principle of early warning systems. The radar chart also visually demonstrates that introducing uncertainty modeling not only doesn't weaken the model's discriminative power but also improves generalization performance through probabilistic regularization.
[0094] Figure 13 The baseline model performance comparison histogram further quantifies the differences between the models from a numerical perspective. The Bayesian LSTM achieved an F1 score of 0.872, a 6.5% improvement over the second-best performing LightGBM (0.819) and approximately an 18% improvement over the traditional LSTM (0.738). Notably, its recall rate was as high as 0.882, significantly higher than other models (all below 0.82), indicating a stronger ability to capture overvoltage events, which is crucial for early warning systems. The histogram also shows that the Bayesian LSTM achieved an AUC of 0.991, approaching a perfect classifier, further validating the model's superior ability to extract risk patterns from high-dimensional time-series data.
[0095] Figure 14 The predicted probability and uncertainty curves not only demonstrate the effectiveness of probability-based early warning but also reveal the dynamic relationship between the uncertainty range and the actual occurrence of events. Approximately 15–20 minutes before an event occurs, the uncertainty range begins to widen significantly, preceding the substantial increase in probability values. This indicates a decline in the model's confidence in the current input pattern and can serve as a preliminary sensing signal for the early warning system. This phenomenon of uncertainty leading and probability following provides operators with the possibility of two levels of early warning: a first level based on rising uncertainty to raise awareness, and a second level based on probability exceeding a threshold to issue a formal warning.
[0096] Figure 15The uncertainty decomposition plot shows that during overvoltage events, cognitive uncertainty accounts for an average of over 70%, while during stable operating periods, random uncertainty dominates, accounting for approximately 60%. This decomposition provides a clear direction for model optimization and data collection: to improve prediction confidence for extreme events, it is necessary to reduce cognitive uncertainty through enhanced training, such as incorporating more physical simulation scenarios; while improvements in predictions during stable periods should focus on data acquisition quality and noise filtering.
[0097] Figure 16 - In the predicted probability distribution histogram, the overlap between the predicted probability distributions of normal samples and overvoltage samples accounts for only 4.3%, and the overlap is mainly concentrated in the ambiguous interval of probability 0.4–0.6. Further analysis shows that these ambiguous samples mostly correspond to transitional periods of sudden weather changes or load abrupt changes. The model exhibits reasonable hesitation in such complex transient processes, consistent with the characteristics of human expert decision-making. This distribution feature also supports refining the warning level into three levels: low, medium, and high, corresponding to different probability intervals, thereby improving the operability of the warning information.
[0098] Figure 17 - In the scatter plot of uncertainty and prediction error, the Pearson correlation coefficient reaches 0.71, and is >0.25 in the high uncertainty region, indicating a significant increase in the fluctuation range of prediction error. This relationship provides a dynamic reliability assessment basis for the early warning system: when the model outputs high uncertainty, the system can automatically reduce the priority of that early warning or prompt manual review. Furthermore, a few outliers in the plot, i.e., points with high certainty but high error, correspond to entirely new operating modes not covered in the training data, suggesting that the model needs continuous online learning and updates.
[0099] In addition, a new prediction interval coverage verification map was added. Figure 18 The results show that the 90%, 95%, and 99% prediction intervals output by the model have coverage frequencies of 89.7%, 94.8%, and 98.9% respectively in actual tests, which are highly consistent with the theoretical confidence level, proving that the probability prediction has good calibration.
[0100] Figure 19 In the CVaR risk analysis chart, the characteristic of the CVaR curve continuously rising before the event demonstrates its forward-looking nature as a tail risk metric. It is noteworthy that in a few periods where no actual overvoltage occurred, CVaR still showed three short-term spikes, corresponding to the risk of voltage drops due to sudden decreases in photovoltaic output accompanied by sudden increases in load. This indicates that the indicator is also applicable to undervoltage warnings, reflecting the model's two-way risk perception capability.
[0101] Figure 20- The updated pie chart of risk level distribution shows that the sample proportions of "no risk", "low risk", "medium risk" and "high risk" are 91.2%, 5.1%, 2.4% and 1.3% respectively, which is reasonable and consistent with the actual operation of the power grid.
[0102] Figure 21 - In the dynamic thermal rating analysis chart, the dynamic current limit Imax(t) drops to approximately 410A in the afternoon of a high-temperature day, a decrease of 8.9% from the fixed limit of 450A. During this period, photovoltaic output is high, and the current CVaR value obtained through power flow mapping remains close to Imax(t) from 14:10 to 14:30, prompting the system to issue continuous "Caution" level warnings. If only the fixed limit is used, no warnings would be triggered during this period, and the potential overheating risk would be ignored. This comparison highlights the necessity of integrating real-time physical conditions for risk mapping.
[0103] Figure 22 - The early warning timeline shows that the system's average warning lead time for 37 overvoltage events was 17.3 minutes, with 40% of the events receiving warnings more than 20 minutes in advance. The warning time distribution shows a trend of "the more severe the event, the earlier the warning," indicating that the model is more sensitive to high-risk events. Furthermore, the warning signals were triggered multiple times before the actual events occurred (an average of 2.3 warnings per event), forming continuous risk tracking, which is beneficial for operators to take phased control measures.
[0104] 6.6. Analysis of Adaptive Threshold Adjustment Mechanism Figure 23 - The historical data on adaptive adjustment of the confidence level shows that the α value underwent 7 significant adjustments during the simulation, with a change magnitude >0.005. Four of these adjustments were upwards, and three were downwards. The upward adjustments mostly occurred during periods of frequent afternoon light surges, while the downward adjustments were concentrated during periods of stable nighttime load. The adjustment process was smooth, without significant oscillations, indicating that the sliding window mechanism (M=180 minutes) effectively filters short-term fluctuations and achieves robust self-adaptation.
[0105] Figure 24 - In the risk exposure rate change curve, the actual exposure rate fluctuates around the 5% target line with a standard deviation of 0.8%. In the extreme weather simulation segment, the exposure rate rises to a maximum of 6.8% at steps 400–500, but remains below 7%, indicating that the system can tighten the threshold in a timely manner when the risk increases, preventing the exposure rate from getting out of control. This curve demonstrates that the adaptive mechanism not only optimizes early warning performance but also possesses closed-loop stability for risk management.
[0106] Figure 25The comparison of early warning performance metrics shows that the adaptive mechanism, while maintaining a high recall rate of approximately 90%, reduced the false alarm rate from 12.4% to 8.7%. Furthermore, the early warning precision improved from 0.82 to 0.86, indicating that the system gradually learned to distinguish between "real risks" and "false fluctuations" during the adjustment process. The continuous increase in the F1 score, from 0.845 to 0.869, demonstrates that the adaptive mechanism can systematically balance the contradiction between missed and false alarms, achieving long-term performance optimization.
[0107] A typical overvoltage event on the afternoon of May 15, 2024, was selected for in-depth analysis, such as... Figure 26 - Three-phase voltage changes during overvoltage events, Figure 27 -Power variation curve, Figure 28 -Changes in risk indicators, Figure 29 -The environmental factors are shown in the time series.
[0108] The incident occurred around 14:20, with the three-phase voltage surging from 10.35kV to 10.82kV within 5 minutes, lasting for approximately 8 minutes. The power curve shows that the total photovoltaic output remained above 1300kW after 14:00, while the load was at its midday low of approximately 350kW, resulting in a net reverse power supply exceeding 950kW, causing the voltage rise. The risk indicator, constructed based on the net power ratio and voltage fluctuation rate, began to rise continuously from 13:50, issuing a risk signal approximately 30 minutes before the voltage exceeded the limit. Environmentally, the day was sunny and hot, with persistently high solar radiation and an ambient temperature reaching 34℃, leading to a decrease in the line's dynamic capacity of approximately 9%. In this incident, the system first issued a high-risk warning at 13:58, 22 minutes in advance; subsequently, the risk was confirmed at 14:05 and 14:12, with the voltage finally exceeding the limit at 14:21. The entire process demonstrated the model's comprehensive capabilities in multi-source information fusion, time-series risk tracking, and proactive early warning.
[0109] The updated case studies demonstrate that the proposed model outperforms the original report in multiple metrics: test set accuracy reaches 98.2%, F1 score is 0.872, and AUC is 0.991; overvoltage event capture rate is 91.9%, and average warning lead time is 17.3 minutes, an improvement of approximately 35% compared to traditional methods; the adaptive mechanism reduces the false alarm rate by 30%. The model not only achieves high-precision probabilistic prediction and uncertainty quantification, but also constructs an intelligent early warning closed loop with online learning capabilities through CVaR dynamic evaluation and adaptive threshold adjustment, providing reliable technical support for the safe operation of high-proportion renewable energy distribution networks.
[0110] 7. Summary This embodiment constructs a dynamic early warning technology system for distribution substation overvoltage based on Bayesian deep learning and conditional value of risk, achieving a paradigm shift from "deterministic point prediction + static threshold" to "probabilistic distribution prediction + dynamic risk quantification." By introducing a physically constrained LSTM-GAN generation method, the physical realism and statistical completeness of extreme scenarios are ensured. A Bayesian neural network based on MC Dropout is used to achieve end-to-end probabilistic quantification of the propagation path of multi-source uncertainties. The system innovatively integrates CVaR risk indicators and a dynamic heat rating model, and designs an adaptive sliding window adjustment mechanism to construct an intelligent early warning closed loop with online learning capabilities. Actual case analysis shows that this technical solution significantly improves early warning accuracy, foresight, and adaptability, with an average early warning time exceeding 17 minutes, and its overall performance is superior to traditional methods. This achievement provides effective technical support for the safe and stable operation of distribution networks with high proportions of renewable energy access, and has significant engineering application value and promising prospects for widespread application.
[0111] The innovative aspects of this invention include: 1. A method for training and scene generation of sequence generative adversarial networks with embedded physical constraints is proposed.
[0112] This invention designs a training method that integrates Long Short-Term Memory (LSTM) networks and Generative Adversarial Networks (GANs), and for the first time systematically introduces differentiable physical constraint terms into its loss function. Specifically, these include: a) a power ramp-up rate constraint: by calculating the power change rate of the generated sequence in real time and penalizing the portion exceeding the maximum allowable ramp-up rate Rmax of the equipment, the dynamical feasibility of the generated renewable energy output fluctuation process is ensured. b) a multi-site spatiotemporal correlation constraint: by calculating the Frobenius norm error between the covariance matrix of the generated data and the real data as a penalty, the generator is forced to learn and reproduce the temporal and spatial correlation characteristics of the power output of multiple distributed renewable energy sites. The extreme operating scenarios generated by this method possess both high statistical realism and strict physical realizability, providing a high-quality, high-fidelity training sample library for subsequent probabilistic prediction models, fundamentally solving the problem of decreased model generalization ability caused by distorted generated scenarios.
[0113] 2. A Bayesian deep neural network probabilistic prediction model based on Monte Carlo Dropout and an uncertainty propagation quantification method are proposed.
[0114] This invention constructs an end-to-end Bayesian deep neural network (BNN) architecture, directly modeling the complex mapping relationship from multiple input sources such as "new energy / load / energy storage" to "node voltage" output using a feedforward approach. Its core innovation lies in employing Monte Carlo Dropout technology as an uncertainty estimator for the deterministic neural network during the inference phase. After model training, by performing multiple random forward propagations on the same input and randomly activating the Dropout layer, the empirical posterior distribution set of future voltage prediction values is directly obtained, rather than a single value. This technical solution can simultaneously quantify cognitive uncertainties, such as model parameter uncertainties, and accidental uncertainties, such as data noise; and clearly reveals the coupling, amplification, and propagation paths of multi-source uncertainties in the distribution network in a computable and interpretable manner. This probabilistic output lays a reliable technical foundation for achieving accurate dynamic risk assessment based on probability distributions.
[0115] 3. An adaptive dynamic early warning threshold determination method that integrates conditional value of risk and real-time physical state is proposed.
[0116] This invention is the first to deeply integrate the financial risk metric—Conditional Value at Risk (CVaR)—with the Dynamic Thermal Rating (DTR) model for distribution networks, constructing a closed-loop feedback adaptive early warning threshold decision method. This method includes two key technological innovations: a) Risk-Physical State Fusion Mapping Technology: First, CVaR is calculated based on the voltage probability distribution output by the BNN, characterizing the tail risk of electrical quantities; then, through the established power flow sensitivity linearization approximation relationship, the voltage CVaR is accurately mapped to the current CVaR; finally, this current CVaR is compared in real time with the maximum allowable current carrying capacity Imax(t) of the line dynamically calculated based on real-time environmental parameters, serving as a direct criterion for overload early warning, achieving a precise and scientific conversion from probabilistic risk to physical safety risk. b) Online Adaptive Adjustment Technology of Confidence Level Based on Sliding Window: A sliding window module is designed to monitor the deviation between recent predicted risk and measured risk in real time. This module dynamically adjusts the confidence level α used in CVaR calculation by statistically analyzing the difference between the actual risk exposure rate within the window and the model's preset expected risk level. When the measured risk is high, α is automatically increased to focus more on the tail end and tighten the warning threshold; conversely, α is decreased and the threshold is relaxed. This technology enables the warning method to learn and self-optimize online, intelligently balancing the sensitivity and reliability of the warning, and completely solving the core pain point of poor adaptability of fixed thresholds.
[0117] This invention, through the organic integration of the above three core technologies, achieves a fundamental technological upgrade from the traditional "point prediction + fixed threshold" mode to the modern "probability prediction + dynamic risk quantification + adaptive control" mode for overvoltage risk early warning in distribution substations, significantly improving the foresight, accuracy and overall robustness of the early warning system.
[0118] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A dynamic overvoltage early warning method based on Bayesian deep learning, characterized in that, include: Acquire multi-source spatiotemporal operational data of the distribution station area, including ambient temperature, and perform preprocessing; The preprocessed data is input into a pre-built Bayesian deep learning model to obtain a set of probability distributions of voltage values at multiple future time points; Calculate the value at risk of the set of probability distributions at a preset confidence level α; The risk value is the α-quantile voltage value of the probability distribution set; Calculate the voltage condition risk value based on the aforementioned risk value; The voltage condition risk value is the expected value of all voltage values exceeding the risk value. Map the voltage condition risk value to the current condition risk value; Based on the ambient temperature, calculate the maximum allowable current of the line at the current moment; The maximum permissible current and the current condition risk value are compared. If the current condition risk value is greater than or equal to the maximum permissible current, an overload warning is triggered. If the current condition risk value is less than the maximum allowable current, then normal status information is output.
2. The overvoltage dynamic early warning method based on Bayesian deep learning according to claim 1, characterized in that, The multi-source spatiotemporal operation data includes new energy power, load data, energy storage status, line temperature, equipment parameters, ambient temperature and humidity; the equipment parameters include rated current, maximum allowable conductor temperature and reference temperature under rated current.
3. The overvoltage dynamic early warning method based on Bayesian deep learning according to claim 1, characterized in that, Based on the aforementioned risk value, the voltage condition risk value is calculated using the following formula: in, Value at risk, Value at risk for voltage conditions. α To preset the credit level, For voltage value variables, Indicates voltage distribution. Indicates the preset credit level α Under voltage Voltage value variable less than or equal to The probability is at least α .
4. The overvoltage dynamic early warning method based on Bayesian deep learning according to claim 3, characterized in that, The voltage condition risk value is mapped to the current condition risk value using a preset sensitivity matrix. The corresponding mapping expression is: CVaRα(I) ≈ |J| ⋅ Where CVaRα(I) is the current-conditional risk value, and J is the sensitivity matrix.
5. The overvoltage dynamic early warning method based on Bayesian deep learning according to claim 1, characterized in that, The training process of the Bayesian deep learning model includes: Obtain a multi-source spatiotemporal augmentation dataset and input it into the Bayesian deep learning model; make predictions based on the multi-source spatiotemporal augmentation dataset to obtain the prediction mean and variance; calculate the loss function based on the prediction mean and variance; update the model parameters based on the loss function value until training converges to obtain a trained Bayesian deep learning model. The function expression of the loss function is: in, Let w be the functional expression for the loss function, where N represents the total number of samples and w represents all parameters of the model. The regularization intensity coefficient is . Let i be the true label value of the i-th sample. Let be the mean of the predictions for the i-th sample. This represents the variance of the prediction for the i-th sample.
6. The overvoltage dynamic early warning method based on Bayesian deep learning according to claim 5, characterized in that, The multi-source spatiotemporal augmentation dataset is generated using a pre-built long short-term memory generative adversarial network model. The Long Short-Term Memory Generative Adversarial Network model includes a generator and a discriminator; The training process of the Long Short-Term Memory Generative Adversarial Network model includes: A random noise vector and conditional information are obtained and input into the Long Short-Term Memory Generative Adversarial Network (LSTMG) model to generate a new energy output time series. Based on the new energy output time series, a total loss function including ramp rate constraints and spatiotemporal correlation constraints is calculated. Based on the total loss function value, the model parameters of the LTMG model are optimized until training converges, resulting in a trained LTMG model.
7. The overvoltage dynamic early warning method based on Bayesian deep learning according to claim 6, characterized in that, The expression for the total loss function is as follows: in, This is the functional expression for the total loss function. The basic objective function term, For the slope rate constraint term, For spatiotemporal correlation constraints, , To balance hyperparameters, Interpolation points between real data and generated data. λ The gradient penalty coefficient is... The covariance matrix of the real data. To generate the covariance matrix of the data, To penalize the rate of change of power, To the maximum permissible gradeability, Indicates the condition c The discriminator on real samples x The output critical score, where x is the real sample, z is the random noise vector, and c is the conditional information. It is the Frobenius norm. Indicates the condition c Below, due to noise z The generated samples, This indicates the discriminator's output at the interpolation point. This indicates that for interpolation points gradient, This represents the expectation of the actual data distribution. This represents the average score of the generated samples. Represents the true data distribution. Indicates noise distribution. This indicates the distribution of interpolation points.
8. The overvoltage dynamic early warning method based on Bayesian deep learning according to claim 1, characterized in that, Based on the ambient temperature, the maximum allowable current of the line at the current moment is calculated using the following formula: in, This represents the maximum allowable current of the line at the current moment. The rated current of the line. This is the maximum allowable temperature of the conductor. For real-time ambient temperature, This is the reference temperature corresponding to the rated current.
9. The overvoltage dynamic early warning method based on Bayesian deep learning according to claim 1, characterized in that, The method further includes: Obtain early warning and alarm information within a preset time window; based on the early warning and alarm information, dynamically adjust the preset warning level, with the corresponding adjustment expression being: in, M represents the true risk exposure level, and M is the number of time steps. For at a certain point in time The actual overvoltage amplitude detected at the location, To be at confidence level The dynamic threshold of the overvoltage risk value. This is the adjusted confidence level. To preset the credit level, To adjust the step size, For time indexing.
10. A system for a dynamic overvoltage early warning method based on Bayesian deep learning, characterized in that, It includes a memory and a processor, the memory storing a computer program, the processor invoking the computer program to perform the steps of the method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Medium-voltage line loop closing current estimation and risk assessment method based on deep learning network
CN114742283A