Power grid extreme weather active defense and dynamic scheduling system based on reinforcement learning

The reinforcement learning-based active defense and dynamic dispatching system for power grids in extreme weather has solved the problems of unreliable state perception and insufficient adaptability of dispatching strategies in traditional power grids under extreme weather conditions. It has achieved accurate assessment of the failure probability of power grid equipment and generation of dynamic dispatching strategies, thereby improving the safety and economy of the power grid under extreme weather conditions.

CN122159215APending Publication Date: 2026-06-05BEIJING INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING INST OF TECH
Filing Date
2026-03-02
Publication Date
2026-06-05

Smart Images

  • Figure CN122159215A_ABST
    Figure CN122159215A_ABST
Patent Text Reader

Abstract

The application discloses a power grid extreme weather active defense and dynamic scheduling system based on reinforcement learning, which comprises a multi-source sensing layer, a physical correction layer, a digital twin layer, a reinforcement learning decision-making agent and a safety checking and executing layer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power grid technology, and more specifically to a power grid active defense and dynamic scheduling system for extreme weather based on reinforcement learning. Background Technology

[0002] The power system is the lifeline of modern society, and its safe and stable operation is crucial to the national economy and people's livelihood. However, traditional power grid defense models mainly rely on deterministic physical models and empirical rules, which is a passive response mode. When faced with meteorological changes that are highly nonlinear and random, model parameters often drift, leading to distorted predictions and ineffective dispatch decisions.

[0003] Existing meteorological monitoring systems struggle to capture drastic changes in local micro-meteorological environments in real time and accurately. Under extreme weather conditions, sensor terminals deployed in the field are highly susceptible to physical damage, signal interference, or environmental noise, leading to significant drift, missing data, and even logical paradoxes in the transmitted measurements. While multi-source heterogeneous data exists, including macro-forecast data from meteorological bureaus and micro-monitoring data from the power grid, current technologies lack effective dynamic fusion mechanisms to address the drastic fluctuations in data source confidence under extreme conditions. Directly analyzing this coarse data, which has not undergone deep cleaning and correction, can easily lead to misjudgments of the current power grid operating boundaries, seriously jeopardizing dispatch safety.

[0004] Secondly, traditional power grid analysis and forecasting heavily rely on deterministic physical models (such as numerical weather prediction models and conductor icing models). However, these models are typically calibrated under standard or common operating conditions. When faced with extreme weather changes that are highly nonlinear, highly random, and sudden, the model parameters often drift significantly, making it difficult to accurately describe the actual physical processes. For example, existing models struggle to accurately capture the enhancing effect of micro-topography on local wind fields, leading to significant discrepancies between predictions and actual conditions, and consequently, ineffective dispatching decisions based on these discrepancies.

[0005] Moreover, most current mainstream power grid weather warning systems employ a uniform fixed threshold mechanism. For example, when the predicted wind speed in a certain area exceeds 25 m / s, an alarm is triggered for all equipment in that area. This method ignores the significant differences in the disaster resistance capabilities of individual equipment under different voltage levels, design standards, years of operation, and micro-topographical conditions. This results in risk assessment results that are not only impossible to quantify but also prone to causing a large number of missed or false alarms, leading to a significant waste of dispatch resources.

[0006] Finally, in the event of extreme weather, dispatchers need to make decisions in a very short time to balance multiple, often conflicting, objectives such as ensuring grid security, maintaining power supply reliability, and balancing operational economics. Traditional mathematical programming methods are computationally inefficient when faced with massive state spaces and nonlinear constraints, making it difficult to meet real-time requirements. While purely data-driven methods are computationally fast, they cannot guarantee that the generated dispatch instructions strictly conform to the complex physical operating constraints of the power system, posing safety risks. Furthermore, existing systems lack effective mechanisms to integrate the valuable experience of frontline operation and maintenance experts for online self-correction. Summary of the Invention

[0007] In view of this, the present invention provides a power grid active defense and dynamic scheduling system for extreme weather based on reinforcement learning, which can solve the technical problems of existing power grid scheduling technology relying on single sensor data under extreme weather conditions, resulting in unreliable state perception, risk assessment mainly based on static thresholds which makes it difficult to characterize the probability of equipment failure, and scheduling strategies which are difficult to achieve adaptive optimization under complex physical constraints.

[0008] To solve the above-mentioned technical problems, the present invention is implemented as follows.

[0009] A power grid active defense and dynamic scheduling system for extreme weather based on reinforcement learning includes:

[0010] The multi-source sensing layer extracts the original state vector corresponding to the original data. The raw data includes meteorological data and power grid status data. Physical correction layer, from Extract observation data obtained from sensor observations and the estimated value calculated by the physical mechanism model corresponding to the sensor. ; calculate separately and The corresponding first inverse variance and second inverse variance are fused to obtain the corrected state estimate Z; the failure probability of the power grid equipment under the current weather conditions is determined based on Z; when the failure probability is greater than a preset threshold, the digital twin layer is triggered to perform simulation and deduction. The digital twin layer maps the static physical properties and operational boundary conditions of the power grid. Based on the scheduling candidate actions fed back by the reinforcement learning decision-making agent, it infers the power grid state at each time step in the subsequent time series, generates a state-action-feedback sequence, and outputs a set of candidate scheduling actions. The reinforcement learning decision-making agent generates scheduling candidate actions based on the candidate scheduling action set and feeds them back to the digital twin layer and the security verification and execution layer; The security verification and execution layer performs physical consistency checks on candidate scheduling actions. Once the checks are passed, the candidate scheduling actions are used as scheduling instructions to guide the actual operation and scheduling of the power grid.

[0011] Preferably, by fusing the first inverse variance and the second inverse variance, the formula for calculating the corrected state estimate Z is as follows:

[0012] in, The first inverse variance, This is the second inverse variance.

[0013] Preferably, the failure probability of power grid equipment under current weather conditions is determined based on Z; when the failure probability exceeds a preset threshold, a digital twin layer is triggered to perform simulation, including: Based on historical meteorological data obtained from Z, the design parameters and aging curves of power grid equipment are obtained; the failure probability of power grid equipment is determined. Based on the power grid topology, key nodes are identified, and the power grid equipment represented by the key nodes is designated as key power grid equipment. When the failure probability of the key power grid equipment exceeds a preset threshold, the digital twin layer is triggered to perform simulation and deduction.

[0014] Preferably, the digital twin layer maps the static physical properties and operational boundary conditions of the power grid; based on the scheduling candidate actions fed back by the reinforcement learning decision agent, it infers the power grid state at each time point in the subsequent time series, generates a state-action-feedback sequence, and outputs a set of candidate scheduling actions, wherein: The digital twin layer includes an asset twin module, a state twin module, and a logical twin module; The asset twin module is based on Z, which determines the topology of the power grid, the physical parameters of key power grid equipment, and the geospatial location information of the power grid. It encapsulates the topology of the power grid, the physical parameters of key power grid equipment, the geospatial location information of the power grid, and the calculated physical constraints and operating boundaries of the power grid into the first structure. The state twin module is based on Z to determine the timestamp, temperature, relative humidity, cumulative precipitation, and instantaneous wind speed of the current meteorological conditions, and encapsulates the timestamp, temperature, relative humidity, cumulative precipitation, and instantaneous wind speed as state vectors in the second structure; the second structure also encapsulates a sequence of historical data vectors, which are vectors containing historical meteorological and power grid operation data based on historical meteorological and power grid operation data. The logical twin module extrapolates the power grid state at each time step in the subsequent time series based on historical data vector sequences and scheduling candidate actions fed back by the reinforcement learning decision agent. That is, the observation data at time t+1 is regarded as the environmental feedback or state evolution result obtained by the reinforcement learning decision agent after performing an action at time t. It generates an immediate reward and a new state and sends them to the reinforcement learning decision agent, outputting a set of candidate scheduling actions.

[0015] Preferably, the reinforcement learning decision agent generates scheduling candidate actions based on the candidate scheduling action set and feeds them back to the digital twin layer and the security verification and execution layer. The reinforcement learning decision agent is obtained through training, and the reward function used during training is:

[0016] in, The immediate reward value obtained by the reinforcement learning agent after executing the scheduling candidate action at time t is used to measure the overall effect of the scheduling candidate action; The accuracy reward weighting coefficient; This is the prediction error term; This is the economic reward weighting coefficient; This is an operating cost indicator used to characterize the power grid operating cost under the current dispatch scheme; The stability reward weighting coefficient; This is the voltage offset. This refers to the weighting coefficient for safety penalties. This is a safety violation indicator variable. It takes the value 1 when a scheduling candidate action causes a violation of physical or safety constraints, and 0 otherwise.

[0017] Preferably, the security verification and execution layer performs physical consistency checks on candidate scheduling actions. If the check passes, the candidate scheduling action is used as a scheduling instruction to guide the actual operation and scheduling of the power grid. Wherein: The node injection power and grid topology change information are analyzed from the scheduling candidate actions to determine the active and reactive power injected into the grid nodes. The formula for physical consistency testing is:

[0018]

[0019] in, and Let i and j represent the voltage amplitudes at grid node i and grid node j, respectively. This represents the voltage phase angle difference between grid node i and grid node j. and These are the real and imaginary parts of the admittance matrix of a power grid node, respectively, where N is the total number of power grid nodes. and These are the active power and reactive power injected into grid node i, respectively.

[0020] Preferably, meteorological data includes temperature, wind speed, precipitation, and humidity, while power grid status data includes node load, power grid topology, and equipment operating status.

[0021] A reinforcement learning-based active defense and dynamic scheduling method for power grid extreme weather, based on the reinforcement learning-based active defense and dynamic scheduling system for power grid extreme weather described above, includes the following steps: Step S1: Obtain raw data including meteorological data and power grid status data, and input the raw data into the power grid extreme weather active defense and dynamic dispatching system based on reinforcement learning; Step S2: The reinforcement learning-based power grid extreme weather active defense and dynamic dispatching system obtains dispatching instructions to guide the actual operation and dispatching of the power grid based on the original data.

[0022] The present invention provides an electronic device, characterized in that the electronic device comprises: A processor is used to execute multiple instructions; Memory, used to store multiple instructions; The plurality of instructions are to be stored in the memory and loaded and executed by the processor as described above.

[0023] This invention utilizes the powerful nonlinear optimization capabilities of reinforcement learning algorithms, combined with a virtual simulation environment constructed using digital twin technology, to allow an intelligent agent to repeatedly simulate historical disaster scenarios in digital space. Through continuous trial and error and learning, it automatically explores the optimal scheduling instructions that balance power grid safety and economy.

[0024] This invention addresses the issues of heterogeneous and uncertain data sources through inverse variance weighted data fusion. It also introduces a stress-intensity interference model and incorporates reinforcement learning decision-making. Guided by a multi-objective reward function, it achieves dynamic optimization scheduling under complex constraints within a digital twin environment. Specifically, the system utilizes a "human-in-the-loop" feedback mechanism to achieve adaptive model evolution, enhances defense accuracy through differentiated device profiling, strengthens system robustness through data closed-loop optimization, and ensures decision security through knowledge-enhanced physical verification. This invention combines cutting-edge artificial intelligence technologies with the engineering realities of power systems, providing an effective technical path and engineering paradigm for improving the resilience and safety of new power systems under extreme climatic conditions.

[0025] The present invention has the following technical effects: This invention overcomes the bottleneck of poor adaptability of traditional numerical weather prediction to micro-grid areas. Addressing the pain points of limited physical sensor site distribution and the inability to accurately quantify the actual impact of local microclimates on grid equipment under extreme weather conditions, this system introduces a reinforcement learning algorithm to reconstruct the prediction logic. Historical meteorological feature vectors are defined as the state space, and local precipitation probabilities or wind speed correction values ​​are used as the action space. A loss function is calculated based on feedback bias to dynamically update the learning rate and weight parameters. Through this mechanism, the system can continuously correct the deviations of the physical model using the subjective experience data of maintenance personnel, achieving accurate prediction of the microclimate in specific substation or transmission line areas, thereby providing high-precision decision input for proactive grid defense.

[0026] To address the problem of data source contamination caused by meteorological sensor malfunctions or communication interruptions due to extreme weather, this invention designs an anomaly detection and closed-loop optimization architecture for multi-source heterogeneous data.

[0027] In the dynamic scheduling process, this invention can improve the dispatchers' understanding of complex meteorological situations based on the current extreme weather type (such as typhoon type or thunderstorm level). More importantly, it uses knowledge-guided methods to inversely constrain the exploration boundary of the reinforcement learning model, ensuring that the generated dynamic scheduling strategy not only conforms to the statistical laws of data, but also strictly adheres to the physical operation specifications of the power system, forming a positive iterative cycle of "data-knowledge-decision". Attached Figure Description

[0028] Figure 1 This is a schematic diagram of the power grid active defense and dynamic scheduling system architecture based on reinforcement learning, which is the subject of this invention. Detailed Implementation

[0029] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0030] like Figure 1 As shown, this invention proposes a power grid active defense and dynamic scheduling system for extreme weather based on reinforcement learning, comprising: The multi-source sensing layer extracts the original state vector corresponding to the original data. The raw data includes meteorological data and power grid status data. Physical correction layer, from Extract observation data obtained from sensor observations and the estimated value calculated by the physical mechanism model corresponding to the sensor. ; calculate separately and The corresponding first inverse variance and second inverse variance are fused to obtain the corrected state estimate Z; the failure probability of the power grid equipment under the current weather conditions is determined based on Z; when the failure probability is greater than a preset threshold, the digital twin layer is triggered to perform simulation and deduction. The digital twin layer maps the static physical properties and operational boundary conditions of the power grid. Based on the scheduling candidate actions fed back by the reinforcement learning decision-making agent, it infers the power grid state at each time step in the subsequent time series, generates a state-action-feedback sequence, and outputs a set of candidate scheduling actions. The reinforcement learning decision-making agent generates scheduling candidate actions based on the candidate scheduling action set and feeds them back to the digital twin layer and the security verification and execution layer; The security verification and execution layer performs physical consistency checks on candidate scheduling actions. Once the checks are passed, the candidate scheduling actions are used as scheduling instructions to guide the actual operation and scheduling of the power grid.

[0031] The meteorological data includes temperature, wind speed, precipitation, and humidity, while the power grid status data includes node load, power grid topology, and equipment operating status. The physical mechanism models are conventional deep learning models, such as conductor temperature rise models, wind load models, or equipment aging models.

[0032] In this invention, under extreme weather conditions, sensors are susceptible to environmental influences, leading to malfunctions or data drift and distortion of system input data. To ensure the reliability of scheduling decisions, this invention acquires the original state vector through a multi-source sensing layer and corrects it through a physical correction layer, thereby constructing a high-confidence system state space and providing a reliable input foundation for subsequent digital twin simulation and reinforcement learning decision-making.

[0033] Original state vector In order to integrate meteorological and environmental characteristics and power grid operation characteristics Holographic mapping.

[0034] Given the inherent noise and unreliability of raw data sources under extreme weather conditions, simply defining state vectors is insufficient to support accurate decision-making. Therefore, the system introduces an intelligent data fusion mechanism to ensure the quality of input data. The multi-source sensing layer also includes meteorological databases, power grid state databases, and a knowledge base.

[0035] Furthermore, by fusing the first and second inverse variances, the formula for calculating the corrected state estimate Z is as follows:

[0036] in, The first inverse variance, This is the second inverse variance.

[0037] In this invention, It is dynamically adjusted; when the risk of sensor failure increases, the sensor variance is increased. In actual operation, for the same physical quantity, the system typically acquires data from two sources: sensor observations and data from other sources. The first is direct readings from weather stations or sensors installed on-site. The second is calculated values ​​from physical models. The value is obtained by inversion calculation based on the relevant physical equations.

[0038] Ideally, the two should be consistent, but in extreme weather conditions, sensors may be damaged, leading to data anomalies, and physical models may also be biased due to inaccurate parameter settings. This invention introduces the concept of variance to measure data uncertainty. The larger the variance, the less reliable the data source. The weights in the formula are the reciprocals of the variance, meaning that data sources with larger variances have smaller weights in the final fusion result; conversely, data sources with smaller variances have larger weights.

[0039] This system innovates in anomaly detection and closed-loop optimization architecture for multi-source heterogeneous data. The variance of sensor data is not a fixed value but dynamically adjusted. The system is designed with an anomaly detection and closed-loop optimization architecture to collect unstructured anomaly reports from various nodes of the power grid in real time, such as subjective judgments of maintenance personnel or logical conflicts of other related sensors.

[0040] When a sensor in a certain area receives a large number of abnormal reports, the system will consider the risk of failure of that sensor to have increased, and will automatically increase its corresponding error variance. According to the formula above, the weight of the sensor data in the final fusion result will automatically decrease. This mechanism enables intelligent data cleaning and self-correction, ensuring high confidence of data in extreme environments, thereby obtaining high-confidence environmental and power grid data.

[0041] Furthermore, the failure probability of power grid equipment under current weather conditions is determined based on Z; when the failure probability exceeds a preset threshold, the digital twin layer is triggered to perform simulation, including: Based on historical meteorological data obtained from Z, the design parameters and aging curves of power grid equipment are obtained; the failure probability of power grid equipment is determined. Based on the power grid topology, key nodes are identified, and the power grid equipment represented by the key nodes is designated as key power grid equipment. When the failure probability of the key power grid equipment exceeds a preset threshold, the digital twin layer is triggered to perform simulation and deduction.

[0042] Furthermore, the digital twin layer maps the static physical properties and operational boundary conditions of the power grid; based on the scheduling candidate actions fed back by the reinforcement learning decision-making agent, it infers the power grid state at each time point in the subsequent time series, generates a state-action-feedback sequence, and outputs a set of candidate scheduling actions, where: The digital twin layer includes an asset twin module, a state twin module, and a logical twin module; The asset twin module is based on Z, which determines the topology of the power grid, the physical parameters of key power grid equipment, and the geospatial location information of the power grid. It encapsulates the topology of the power grid, the physical parameters of key power grid equipment, the geospatial location information of the power grid, and the calculated physical constraints and operating boundaries of the power grid into the first structure. The state twin module is based on Z to determine the timestamp, temperature, relative humidity, cumulative precipitation, and instantaneous wind speed of the current meteorological conditions, and encapsulates the timestamp, temperature, relative humidity, cumulative precipitation, and instantaneous wind speed as state vectors in the second structure; the second structure also encapsulates a sequence of historical data vectors, which are vectors containing historical meteorological and power grid operation data based on historical meteorological and power grid operation data. The logical twin module extrapolates the power grid state at each time step in the subsequent time series based on historical data vector sequences and scheduling candidate actions fed back by the reinforcement learning decision agent. That is, the observation data at time t+1 is regarded as the environmental feedback or state evolution result obtained by the reinforcement learning decision agent after performing an action at time t. It generates an immediate reward and a new state and sends them to the reinforcement learning decision agent, outputting a set of candidate scheduling actions.

[0043] In this invention, the asset twin layer accurately maps the static attributes and boundary conditions of the physical power grid. Both the first and second structures are WeatherParams structures, which structurally define the power grid's topology, the physical parameters of key equipment (such as rated capacity and impedance characteristics), and geospatial location information. These static attributes not only establish the physical laws of the virtual environment but also set insurmountable physical and operational constraint boundaries for reinforcement learning algorithms. The state twin layer is responsible for mapping the instantaneous operating state of the power grid and its external meteorological environment. The system uses the WeatherData structure as the basic data unit, capturing and encapsulating multi-dimensional state vectors in real time, including high-precision timestamps, ambient temperature, relative humidity, cumulative precipitation, and instantaneous wind speed. Furthermore, by maintaining historical data vector sequences, a complete time-series state space set is constructed, providing a solid data foundation for subsequent historical scene playback and analysis. The logical twin layer simulates and deduces the dynamic transition process of the power grid state. In the code implementation, this layer is embodied as a data-driven offline replay simulator. This simulator creatively employs a time-stepping mechanism by traversing the historical data sequence of `historicalData`: the historical observation data at time `t` is defined as the system state at the current time, while the data at time `t+1` is considered as the environmental feedback or state evolution result obtained by the agent after performing a certain action at time `t`. With this mechanism, the agent can repeatedly reenact various extreme weather disaster scenarios that have occurred historically in a virtual digital space, freely explore diverse combinations of scheduling strategies, and evaluate their consequences in real time. This process allows the agent to accumulate massive amounts of experience with zero trial-and-error costs, thereby efficiently learning and converging to the optimal scheduling strategy.

[0044] Furthermore, the reinforcement learning decision-making agent generates scheduling candidate actions based on the candidate scheduling action set and feeds them back to the digital twin layer and the security verification and execution layer. The reinforcement learning decision-making agent is obtained through training, and the reward function used during training is:

[0045] in, The immediate reward value obtained by the reinforcement learning agent after executing the scheduling candidate action at time t is used to measure the overall effect of the scheduling candidate action; This is the accuracy reward weighting coefficient, used to adjust the degree of influence of prediction accuracy in the reward function; The prediction error term represents the difference between the predicted result and the actual observation result. Its absolute value is used to characterize the magnitude of the prediction deviation. This is the economic reward weighting coefficient, used to adjust the degree of influence of operational economy on the reward function; This is an operating cost indicator used to characterize the power grid operating cost under the current dispatch scheme, including but not limited to generation cost, energy storage dispatch cost, or load adjustment cost. This is the stability reward weighting coefficient, used to adjust the degree of influence of power grid operation stability on the reward function; Voltage offset is used to indicate the degree of deviation of the voltage at a grid node from its rated value or allowable range; This is the safety penalty weighting coefficient, used to adjust the intensity of the penalty for violations of safety constraints in the reward function; This is a safety violation indicator variable. It takes the value 1 when a scheduling candidate action causes a violation of physical or safety constraints, and 0 otherwise.

[0046] In this invention, the reward function constitutes the core mechanism guiding the learning direction of the reinforcement learning agent. The ultimate goal of the reinforcement learning agent is to maximize the expected cumulative reward obtained during its interaction with the environment. To encourage the reinforcement learning agent to generate an optimal scheduling strategy that balances multiple objectives and constraints, this invention constructs a comprehensive reward function system that integrates four dimensions: accuracy, economy, stability, and security. At the code implementation level, this is specifically reflected in the negative feedback mechanism based on prediction error in the reinforcement learning method.

[0047] The reward function is composed of a weighted average of four key dimensions, designed to guide the reinforcement learning agent in finding the optimal solution among multiple objectives. The accuracy reward term ( The aim is to encourage reinforcement learning agents to improve prediction accuracy, where This represents the deviation between the predicted value and the actual observed value. The smaller the deviation, the smaller the negative penalty imposed, which is equivalent to obtaining a larger reward.

[0048] Secondly, economic incentives ( The aim is to enable reinforcement learning agents to reduce system operating costs, among which... This represents the costs associated with dispatch operations (such as generation costs, grid losses, etc.); the lower the cost, the larger the reward. Stability Reward Items ( Encourage reinforcement learning agents to maintain system stability. This represents the fluctuation range of key indicators (such as voltage); the smaller the fluctuation range, the greater the reward.

[0049] Safety penalty items ( ( ) is a key constraint mechanism to ensure the physical security of the power grid. This is an indicator function that the system calls the `isValidParameter` function to perform physical boundary validation on the actions generated by the reinforcement learning agent. If an action causes system parameters to exceed limits, it is determined to be a violation of safety constraints. =1, the system will give the agent a huge negative penalty. This mechanism forces the reinforcement learning agent to avoid unsafe action areas during policy exploration.

[0050] This invention maintains a Q-value table, where the Q-value represents the expected long-term cumulative reward that a reinforcement learning agent can obtain by taking a specific action in a given state during the training process, and is used to evaluate the merits of different scheduling actions.

[0051]

[0052] in, This represents the system state of the power grid at time t, and is used to comprehensively describe the operating state of the power grid and the meteorological environment at the current time. The candidate scheduling action selected by the reinforcement learning agent at time t represents the adjustment instruction for power grid operating parameters or scheduling strategy; The state-action value function is used to represent the state-action value. Next action The expected long-term cumulative rewards that can be obtained later; The learning rate is used to control the degree of influence of newly acquired reward information during the Q-value update process; To enhance the learning agent's ability to perform actions The instant reward value obtained in the next moment; This is a discount factor used to characterize the weight of future rewards in the current decision; In the state Next action Then, the system transitions to the next state. For any selectable action in the candidate action set; For the next state Next, execute the action. The corresponding state – action value.

[0053] This invention utilizes a digital twin environment as a training ground and guides an agent to autonomously learn and generate the optimal scheduling strategy under complex physical constraints through a multi-objective reward function.

[0054] Building upon this foundation, this invention further introduces a reinforcement learning adaptive correction model based on a "human-in-the-loop" feedback mechanism. In this model, the learning rate and weight parameters in the reward function are not fixed. During actual operation, grid dispatchers or front-line maintenance personnel evaluate and provide feedback on the system's prediction results or dispatching suggestions based on their professional experience. The system collects this feedback data in real time through the FeedbackDAO interface and quantifies it into additional reward signals in the reinforcement learning model. Based on these feedback biases, the system dynamically calculates the loss function and adjusts the learning rate and weight parameters accordingly.

[0055] This mechanism cleverly integrates the subjective experience of human experts into the artificial intelligence algorithm model, significantly improving the model's adaptability and prediction accuracy. Although reinforcement learning agents can generate optimized scheduling policies in the digital space, strict physical consistency checks must be performed before execution to ensure the absolute safety and feasibility of these policies in the physical world.

[0056] Furthermore, the security verification and execution layer performs physical consistency checks on candidate scheduling actions. Once the check passes, the candidate scheduling action is used as the scheduling instruction to guide the actual operation and scheduling of the power grid. Specifically: The node injection power and grid topology change information are analyzed from the scheduling candidate actions to determine the active and reactive power injected into the grid nodes. The formula for physical consistency testing is:

[0057]

[0058] in, and Let i and j represent the voltage amplitudes at grid node i and grid node j, respectively. This represents the voltage phase angle difference between grid node i and grid node j. and These are the real and imaginary parts of the admittance matrix of a power grid node, respectively, where N is the total number of power grid nodes. and These are the active power and reactive power injected into grid node i, respectively.

[0059] This invention introduces a rigorous physical verification logic. The design and execution of any scheduling action must strictly adhere to the fundamental physical laws of the power system, namely the AC power flow equations, to ensure that the power balance of each node is strictly maintained.

[0060] Alternating current power flow equations, as the foundation of power system analysis, include active power balance equations and reactive power balance equations. This verification process goes beyond mere mathematical calculations; it integrates a knowledge-enhanced, expert-driven system. The system is designed and integrates a knowledge management module, which stores a professional knowledge base covering meteorological and physical laws, power grid operation specifications, and emergency response plans.

[0061] While performing mathematical calculations for verification, a professional knowledge base covering meteorological and physical laws, power grid operation specifications, and historical disaster emergency plans is invoked. If the power flow simulation calculation results show that executing this action will cause the voltage amplitude of any node to exceed the safe operating range or cause line overload, the action is determined to be illegal, and relevant expert advice is retrieved from the knowledge base to alert the dispatcher to potential risk points. When a candidate action meets the AC optimal power flow constraints and the system parameters do not exceed the limits, the candidate action is returned to the physical power grid (or execution module) as the optimal scheduling strategy, and serves as the final execution instruction for power grid scheduling. Otherwise, based on the interception feedback of the failed physical consistency check, the reinforcement learning decision agent regenerates candidate actions based on the reward function that triggered the security penalty mechanism (i.e., the penalty item indicator function) until a candidate action that can pass the physical consistency check is generated. The candidate action that passes the physical consistency check is returned to the physical power grid (or execution module) as the optimal scheduling strategy and serves as the final execution instruction for power grid scheduling.

[0062] This invention also provides a reinforcement learning-based active defense and dynamic scheduling method for power grid extreme weather, based on the reinforcement learning-based active defense and dynamic scheduling system for power grid extreme weather described above. The method includes: Step S1: Obtain raw data including meteorological data and power grid status data, and input the raw data into the power grid extreme weather active defense and dynamic dispatching system based on reinforcement learning; Step S2: The reinforcement learning-based power grid extreme weather active defense and dynamic dispatching system obtains dispatching instructions to guide the actual operation and dispatching of the power grid based on the original data.

[0063] The specific embodiments described above only illustrate the design principles of the present invention. The shapes and names of the components in this description may differ and are not limited. Therefore, those skilled in the art can modify or make equivalent substitutions to the technical solutions described in the foregoing embodiments; and these modifications and substitutions do not depart from the inventive spirit and technical solutions of the present invention, and should all fall within the protection scope of the present invention.

Claims

1. A power grid active defense and dynamic scheduling system for extreme weather based on reinforcement learning, characterized in that, include: The multi-source sensing layer extracts the original state vector corresponding to the original data. The raw data includes meteorological data and power grid status data. Physical correction layer, from Extract observation data obtained from sensor observations and the estimated value calculated by the physical mechanism model corresponding to the sensor. ; calculate separately and The corresponding first inverse variance and second inverse variance are fused to obtain the corrected state estimate Z; based on Z, the failure probability of the power grid equipment under the current weather conditions is determined; When the failure probability exceeds a preset threshold, the digital twin layer is triggered to perform simulation and deduction. The digital twin layer maps the static physical properties and operational boundary conditions of the power grid; Based on the feedback from the reinforcement learning decision-making agent, the scheduling candidate actions are derived, the power grid state at each time step in the subsequent time series is deduced, a state-action-feedback sequence is generated, and a set of candidate scheduling actions is output. The reinforcement learning decision-making agent generates scheduling candidate actions based on the candidate scheduling action set and feeds them back to the digital twin layer and the security verification and execution layer; The security verification and execution layer performs physical consistency checks on candidate scheduling actions. Once the checks are passed, the candidate scheduling actions are used as scheduling instructions to guide the actual operation and scheduling of the power grid.

2. The system as described in claim 1, characterized in that, By combining the first and second inverse variances, the formula for calculating the corrected state estimate Z is as follows: in, The first inverse variance, This is the second inverse variance.

3. The system as described in claim 1, characterized in that, The failure probability of power grid equipment under current weather conditions is determined based on Z; When the failure probability exceeds a preset threshold, the digital twin layer is triggered to perform simulation and deduction, including: Based on historical meteorological data obtained from Z, the design parameters and aging curves of power grid equipment are obtained; the failure probability of power grid equipment is determined. Based on the power grid topology, key nodes are identified, and the power grid equipment represented by the key nodes is designated as key power grid equipment. When the failure probability of the key power grid equipment exceeds a preset threshold, the digital twin layer is triggered to perform simulation and deduction.

4. The system as described in claim 1, characterized in that, A digital twin layer maps the static physical properties and operational boundary conditions of the power grid. Based on the scheduling candidate actions fed back by the reinforcement learning decision-making agent, it infers the power grid state at each time step in the subsequent time series, generates a state-action-feedback sequence, and outputs a set of candidate scheduling actions, where: The digital twin layer includes an asset twin module, a state twin module, and a logical twin module; The asset twin module is based on Z, which determines the topology of the power grid, the physical parameters of key power grid equipment, and the geospatial location information of the power grid. It encapsulates the topology of the power grid, the physical parameters of key power grid equipment, the geospatial location information of the power grid, and the calculated physical constraints and operating boundaries of the power grid into the first structure. The state twin module is based on Z to determine the timestamp, temperature, relative humidity, cumulative precipitation, and instantaneous wind speed of the current meteorological conditions, and encapsulates the timestamp, temperature, relative humidity, cumulative precipitation, and instantaneous wind speed as state vectors in the second structure; the second structure also encapsulates a sequence of historical data vectors, which are vectors containing historical meteorological and power grid operation data based on historical meteorological and power grid operation data. The logical twin module extrapolates the power grid state at each time step in the subsequent time series based on historical data vector sequences and scheduling candidate actions fed back by the reinforcement learning decision agent. That is, the observation data at time t+1 is regarded as the environmental feedback or state evolution result obtained by the reinforcement learning decision agent after performing an action at time t. It generates an instant reward and a new state and sends them to the reinforcement learning decision agent, outputting a set of candidate scheduling actions.

5. The system as described in any one of claims 1-4, characterized in that, The reinforcement learning decision-making agent generates scheduling candidate actions based on the candidate scheduling action set and feeds them back to the digital twin layer and the security verification and execution layer. The reinforcement learning decision-making agent is obtained through training, and the reward function used during training is: in, The immediate reward value obtained by the reinforcement learning agent after executing the scheduling candidate action at time t is used to measure the overall effect of the scheduling candidate action; The accuracy reward weighting coefficient; This is the prediction error term; This is the economic reward weighting coefficient; This is an operating cost indicator used to characterize the power grid operating cost under the current dispatch scheme; The stability reward weighting coefficient; This is the voltage offset. This refers to the weighting coefficient for safety penalties. This is a safety violation indicator variable. It takes the value 1 when a scheduling candidate action causes a violation of physical or safety constraints, and 0 otherwise.

6. The system as described in claim 5, characterized in that, The security verification and execution layer performs physical consistency checks on candidate scheduling actions. Once the check passes, the candidate actions are used as scheduling instructions to guide the actual operation and scheduling of the power grid. Specifically: The node injection power and grid topology change information are analyzed from the scheduling candidate actions to determine the active and reactive power injected into the grid nodes. The formula for physical consistency testing is: in, and Let i and j represent the voltage amplitudes at grid node i and grid node j, respectively. This represents the voltage phase angle difference between grid node i and grid node j. and These are the real and imaginary parts of the admittance matrix of a power grid node, respectively, where N is the total number of power grid nodes. and These are the active power and reactive power injected into grid node i, respectively.

7. The system as described in claim 1, characterized in that, Meteorological data includes temperature, wind speed, precipitation, and humidity, while power grid status data includes node load, power grid topology, and equipment operating status.

8. A reinforcement learning-based active defense and dynamic scheduling method for power grid extreme weather, based on the reinforcement learning-based active defense and dynamic scheduling system for power grid extreme weather as described in any one of claims 1-7, characterized in that, The methods include: Step S1: Obtain raw data including meteorological data and power grid status data, and input the raw data into the power grid extreme weather active defense and dynamic dispatching system based on reinforcement learning; Step S2: The reinforcement learning-based power grid extreme weather active defense and dynamic dispatching system obtains dispatching instructions to guide the actual operation and dispatching of the power grid based on the original data.

9. A computer-readable storage medium, characterized in that, The storage medium stores multiple instructions; the multiple instructions are used by a processor to load and execute the method as described in claim 8.

10. An electronic device, characterized in that, The electronic device includes: A processor is used to execute multiple instructions; Memory, used to store multiple instructions; The plurality of instructions are to be stored in the memory and loaded by the processor and executed as described in claim 8.