A power emergency plan dynamic optimization system based on PPO algorithm
By constructing a virtual power grid environment, assessing node vulnerability, and generating safe and executable action strategies through a dynamic optimization system for power grid emergency plans based on the PPO algorithm, the system solves the safety and efficiency problems of power grid emergency dispatch under extreme weather conditions and achieves safe and efficient power grid recovery under extreme conditions.
Patent Information
- Application Number
- CN202611352804.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-02
- Publication Date
- 2026-11-24
AI Technical Summary
Existing technologies struggle to balance the stringent physical safety constraints of power grid topology operations with multi-dimensional emergency objectives under extreme weather disasters. This can easily lead to ineffective or dangerous dispatch strategies that could trigger secondary accidents, and they cannot provide safe, efficient, and physically executable dynamic emergency plans for distribution networks.
A dynamic optimization system for power emergency response plans based on the PPO algorithm is adopted, including a training module and an online execution module. A virtual power grid environment is constructed through a simulation unit to assess the vulnerability of the unit's computing nodes. The decision-making unit generates action vectors, the inference unit performs power flow calculation and reward evaluation, and the updating unit updates the policy network parameters to ensure that the policy network is safe and executable under extreme conditions.
Under extreme weather conditions, it effectively reduces ineffective trial-and-error exploration, ensures power grid safety and efficiency, provides adaptive multi-dimensional reward feedback, optimizes power restoration and safety over-limit penalties, and improves the safety and efficiency of power grid emergency dispatch.
Smart Images

Figure CN123162811A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system emergency dispatch technology, and in particular to a dynamic optimization system for power emergency plans based on the PPO algorithm. Background Technology
[0002] Under extreme disaster conditions, power distribution networks are prone to line faults, equipment overloads, and even large-scale power outages. Therefore, developing efficient and scientific power emergency plans, through dynamic optimization of the power grid topology and, when necessary, partial load shedding, is of great practical significance and application value for quickly isolating faulty areas, restoring power supply to non-faulty areas, and ensuring the overall physical security of the power grid. Traditional power emergency plans mainly rely on human experience or preset static rules. When facing complex, ever-changing, and rapidly evolving disaster scenarios, they often have limitations such as delayed response, insufficient decision-making optimization capabilities, and difficulty in balancing multiple dimensions of objectives, including power restoration and power grid security. The invention patent application with publication number CN120127706A discloses a transient stability control method for power systems. This scheme mainly constructs a generative dynamic model and predicts the model based on the hidden state and actions at each time step. Then, the PPO algorithm is used to learn the strategy on the model, thereby generating and executing the control strategy.
[0003] The aforementioned existing technologies primarily target transient synchronous stability control of AC / DC systems containing high-proportion grid-connected photovoltaic power generation units. Their action space mainly focuses on the adjustment of continuous variables such as the generator main synchronization signal. When facing emergency dispatch and control tasks under extreme disasters in the distribution network, they fail to deeply consider the dynamic impact of extreme weather conditions on the risk of fault transmission between distribution network nodes, lack a quantitative assessment mechanism for the vulnerability of the grid topology, and are difficult to adapt to the dynamic evolution of operating conditions under disaster environments. Distribution network emergency plans involve a large number of discrete and mutually coupled topology decisions such as switching actions and load shedding. When exploring the vast action space, the standard reinforcement learning algorithms in the existing technologies are prone to generating dangerous topology actions that do not have the physical equipment execution conditions, are repeatedly invalid, or may cause serious secondary over-limit short circuits. This not only leads to a large number of invalid explorations and difficulty in convergence during the trial and error process, but also makes it easy for the generated strategies to break through the physical safety constraints of the power grid. Summary of the Invention
[0004] The technical problem solved by this invention is that existing technologies are difficult to balance the strict physical safety constraints of power grid topology operation with multi-dimensional emergency objectives under extreme weather disaster conditions. They are prone to generating ineffective or dangerous dispatch strategies that may cause secondary accidents, thus failing to provide safe, efficient and physically executable dynamic emergency plans for the distribution network.
[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a dynamic optimization system for power emergency response plans based on the PPO algorithm, comprising a training module and an online execution module;
[0006] The training module includes a simulation unit, an evaluation unit, a decision-making unit, an inference unit, and an update unit;
[0007] The simulation unit is used to construct a virtual power grid simulation environment, collect operating condition data, preprocess and extract features from the operating condition data, and generate a node feature matrix and attribute graph.
[0008] The evaluation unit is used to calculate the vulnerability coefficient between adjacent nodes based on the attribute graph and the node feature matrix, obtain the risk level based on the vulnerability coefficient, and perform weighted aggregation of node features to generate an aggregation matrix.
[0009] The decision unit is used to input the aggregation matrix into the policy network to obtain the original action matrix, generate an action mask matrix based on the vulnerability matrix, and determine the action vector according to the original action matrix and the action mask matrix.
[0010] The inference unit is used to perform trend calculation based on the action vector and calculate multi-dimensional rewards based on the trend calculation results.
[0011] The update unit is used to calculate the multi-dimensional value loss and multi-dimensional policy loss based on the multi-dimensional reward, update the parameters of the policy network through a multi-gradient descent algorithm, and output the trained policy network.
[0012] The online execution module is used to receive measured data from the real power distribution network, call the trained strategy network, and output emergency plans.
[0013] Preferably, in the simulation unit, the operating condition data includes: power grid operation data, equipment parameters, power grid topology data, and external environment data;
[0014] The power grid operation data includes voltage amplitude vector, node injected active power vector, node injected reactive power vector, and switch on / off state vector.
[0015] The equipment parameters include the series admittance of each branch, the thermal stability limit current of each branch, and the rated active power output limit of each power node.
[0016] The power grid topology data includes branch node association tables, node switch association tables, power supply node sets, and tie switch association matrices.
[0017] Derivative topology data is generated based on power grid topology data. The derived topology data includes a physical connectivity adjacency matrix, an operational connectivity adjacency matrix, a node action capability matrix, a node switch branch mapping table, and a node admittance matrix.
[0018] The external environmental data includes the shortest road distance from the repair team to each node and the meteorological warning text corresponding to each administrative region.
[0019] Preferably, the simulation unit is specifically used for:
[0020] The voltage amplitude vector, node injected active power vector, and node injected reactive power vector are normalized, and the shortest road distance is normalized to obtain the voltage per-unit vector, active power per-unit vector, reactive power per-unit vector, and normalized road distance.
[0021] The meteorological warning texts of each administrative region are input into a pre-trained meteorological text encoding network, and the output is an environmental disaster feature vector containing components of wind disaster intensity, rain disaster intensity, lightning intensity and icing intensity. The environmental disaster feature vectors of all nodes constitute an environmental disaster feature matrix.
[0022] The voltage per-unit vector, active power per-unit vector, reactive power per-unit vector, normalized road distance, and environmental disaster feature vector of the same node are concatenated to form the node feature vector of the node. The node feature vectors of all nodes constitute the node feature matrix.
[0023] Based on the physical connectivity adjacency matrix, physical edges are established between nodes that are physically connected. The attribute graph is constructed with all nodes as vertices and all physical edges as the edge set.
[0024] Preferably, the evaluation unit is specifically used for:
[0025] For each ordered node pair consisting of two nodes connected by a physical line, the node feature vectors of the two nodes in the ordered node pair are processed by a vulnerability assessment network to output the vulnerability coefficient of the ordered node pair.
[0026] For any ordered pair of nodes consisting of two nodes that are not physically connected, their vulnerability coefficient is directly assigned to zero.
[0027] The vulnerability matrix is composed of all vulnerability coefficients and is asymmetric, with the main diagonal elements of the vulnerability matrix being 1.
[0028] The risk level is the maximum value among all off-diagonal elements in the vulnerability matrix;
[0029] For each node, the node feature vectors of the node itself and each of its neighboring nodes are linearly transformed by the state weight matrix. The node is then weighted and summed using the vulnerability coefficients between the node and its corresponding nodes in the vulnerability matrix. The summation is then performed using a nonlinear activation function to obtain the node's aggregate vector. The aggregate matrix is formed by the aggregate vectors of all nodes.
[0030] Preferably, the decision-making unit is specifically used for:
[0031] The aggregation matrix is input into the policy network to obtain the original action log odds for each node for each action category, thus forming the original action matrix;
[0032] Based on the node action capability matrix, the action categories for which the node does not have the conditions to execute the device are set to mask values at the corresponding positions in the action mask matrix;
[0033] For the action category of disconnecting the segment switch, when the segment switch branch associated with the node is represented as disconnected in the running connectivity adjacency matrix, the corresponding position of the node in the action mask matrix is set to the mask value.
[0034] For the action category of closing the contact switch, the corresponding position in the action mask matrix is set to a mask value when any of the following situations occur: the contact switch branch associated with the node is represented as closed in the running connectivity adjacency matrix; or the contact switch branch associated with the node is represented as open in the running connectivity adjacency matrix, and the vulnerability coefficient in any direction between the two nodes of the contact switch branch exceeds the preset safety critical threshold, the corresponding position in the action mask matrix is set to a mask value.
[0035] The original action matrix and the action mask matrix are added element by element and then normalized exponentially transformed to obtain the action probability matrix. For each node, random sampling is performed according to the action probability matrix to obtain the action vector.
[0036] Preferably, the deduction unit is specifically used for:
[0037] The action vector is subjected to consistency verification and conflict elimination to obtain a corrected action vector. The specific process includes:
[0038] When two nodes on both ends of the same branch output the same topology action, the topology action shall be executed. When one end outputs a topology change action for the branch and the other end outputs a load shedding action for the node, the two control objects are different and do not interfere with each other, so they are executed in parallel. When one end outputs an action to shed overload and register emergency repair task and shed load and the other end outputs an action to maintain the status quo, the action to shed overload and register emergency repair task and shed load shall prevail.
[0039] For the node in the corrected action vector that outputs the action of disconnecting the segmented switch, the mutual admittance between the nodes at both ends of the segmented switch branch associated with that node is set to zero and the self-admittance is subtracted in the node admittance matrix.
[0040] For the node in the modified action vector that outputs the closed contact switch action, the mutual admittance between the nodes at both ends of the contact switch branch associated with that node is set to the negative value of the series admittance of that branch and the self admittance is added in the node admittance matrix to obtain the modified admittance matrix.
[0041] For nodes that output overload cutoff, register emergency repair tasks, and cut off load actions, set their active and reactive power inputs to zero.
[0042] Based on the modified admittance matrix, graph connectivity analysis is performed, and the entire network is divided into several independent connected subnets. For power-depleted island subnets that do not contain power nodes, the voltage amplitude of their internal nodes is set to zero and they are not included in the power flow calculation. For powered connected subnets that contain at least one power node, one power node is selected from the subnet as the slack node, and the power flow equations are solved independently.
[0043] When there is no electrically connected subnet, the power flow calculation does not meet the convergence condition, the total active power imbalance exceeds the preset threshold, or the active power injection of the power node exceeds the rated upper limit, the correction action vector is determined to be an invalid action.
[0044] Otherwise, the correction action vector is deemed valid, and the node voltage magnitude vector and node voltage phasor vector after power flow calculation are output.
[0045] Preferably, the process by which the deduction unit calculates multi-dimensional rewards and updates the state includes:
[0046] If the corrected action vector is an invalid action, the multi-dimensional reward is a preset value;
[0047] The multi-dimensional rewards include a first reward, a second reward, and a third reward;
[0048] If the modified action vector is a valid action, then a multi-dimensional reward is calculated. The calculation process includes:
[0049] For nodes with negative injected active power, voltage amplitude within acceptable range after power flow calculation, and non-zero admittance path with the power supply node, the absolute value of the injected active power is summed to obtain the power supply recovery reward. The power supply recovery reward is then linearly scaled to obtain the first reward.
[0050] The current amplitude of each branch is calculated based on the node voltage and series admittance of each branch after the power flow calculation. The current amplitude of the branch in the open state is set to zero. The deviation of the current amplitude of each branch from the thermal stability limit current is calculated and summed and the opposite number is taken to obtain the safety limit penalty reward. The safety limit penalty reward is then trimmed by interval to obtain the second reward.
[0051] For nodes that output the action of cutting off overload and registering emergency repair tasks and cutting off load, the emergency repair time is calculated based on the shortest road distance and preset driving speed. The emergency repair time of all nodes that output this action is summed and the negative number is taken to obtain the operation efficiency cost reward. The operation efficiency cost reward is linearly scaled to obtain the third reward.
[0052] The node voltage amplitude after power flow calculation is used as the voltage amplitude when collecting operating condition data in the next decision cycle. The injected power of nodes that output overload shedding, register emergency repair tasks and shedding load actions is kept at zero in subsequent decision cycles and set as having no equipment conditions in the node action capability matrix. For nodes that output valid topology change actions, the elements between the nodes at both ends of the corresponding branch are updated in the running connectivity adjacency matrix in the next decision cycle, and the node admittance matrix for the next decision cycle is recalculated.
[0053] Preferably, the update unit is specifically used for:
[0054] A value network is constructed, which shares the parameters of the first fully connected layer and the second fully connected layer with the policy network. The value network also includes a value network output layer, the input of which is the output of the shared second fully connected layer, and the output of which is a multi-dimensional value prediction.
[0055] When collecting trajectories, the update unit continuously executes decision loops for no more than a preset maximum number of cycles. In each decision cycle, it saves the node feature matrix, action vector, action mask matrix, multi-dimensional normalized reward, node feature matrix of the next decision cycle, and old strategy action probability matrix of the current decision cycle to the trajectory until the preset maximum number of cycles is reached or the action vector is determined to be an invalid action.
[0056] When calculating the loss, the aggregation matrix of each decision cycle is recalculated based on the current state weight matrix. The global value prediction of each dimension is obtained through forward propagation of the value network. The current action probability matrix is obtained by combining the action mask matrix with the forward propagation of the policy network.
[0057] For each dimension, the normalized rewards of each decision cycle are weighted and summed according to the discount factor to obtain the cumulative discount return. The mean square error between the global value prediction and the cumulative discount return for that dimension is calculated as the value loss.
[0058] For each dimension, the advantage function is calculated using generalized advantage estimation based on normalized reward and global value prediction. For each node, the probability ratio of the current action probability matrix to the probability matrix of the old strategy action corresponding to the selected action category is calculated. The probability ratio is restricted to a preset cutoff interval. The probability ratios before and after the restriction are multiplied by the advantage function and the smaller value is taken. The average value is then taken over all nodes and all decision cycles, and the negative value is obtained to obtain the strategy loss for that dimension.
[0059] Preferably, the process of updating parameters by the updating unit includes:
[0060] The policy gradients of the policy loss with respect to the network parameters in three dimensions are calculated respectively to obtain the policy gradients in three dimensions; the network parameters include policy network parameters, value network parameters, and state weight matrix.
[0061] With the optimization objective of minimizing the magnitude of the convex combination of multi-dimensional policy gradients, the Frank-Wolfe algorithm is used to solve for the weights of the convex combination in each dimension under constraints.
[0062] The total policy gradient is obtained by weighting and summing the multi-dimensional policy gradients according to their respective convex combination weights. The total value gradient is obtained by calculating the gradients of the multi-dimensional value losses relative to the network parameters and summing them. The total policy gradient is added to the total value gradient to obtain the total update gradient. The network parameters are updated according to the total update gradient.
[0063] Verification scenarios are randomly selected from historical extreme weather disaster samples. Verification scenarios do not participate in parameter updates. After each training round, the decision-making process is executed on the verification scenario with the current network parameters without updating the parameters. The normalized rewards of the three dimensions under the verification scenario are accumulated on the complete trajectory, and then summed with equal weights and averaged to obtain the verification score. When the verification score is higher than the historical best verification score, the current network parameters are saved. When the verification score no longer increases for a preset number of consecutive rounds or the number of training rounds reaches a preset maximum number of rounds, training is stopped and the saved network parameters are output as the trained policy network.
[0064] Preferably, the online execution module is specifically used for:
[0065] Obtain real and measured power grid operation data, power grid topology data, equipment parameters, and external environment data from the distribution automation system, geographic information system, meteorological early warning platform, and emergency repair dispatch system of the actual power distribution network;
[0066] The training completed policy network output by the training module is invoked, along with the fixed meteorological text encoding network, vulnerability assessment network, and state weight matrix in the training module.
[0067] The real measured data is preprocessed and feature extracted in the same way as the training module to generate a real node feature matrix and attribute map, and the vulnerability matrix, risk degree and aggregation matrix are calculated.
[0068] The real aggregation matrix is input into the trained policy network, and an action mask matrix is generated by combining the vulnerability matrix and the node action capability. After obtaining the action probability matrix through normalized exponential transformation, the action category with the highest probability in the action probability matrix is selected for each node to form an emergency dispatch action vector output.
[0069] The beneficial effects of this invention are as follows: This invention introduces an action masking mechanism based on physical safety constraints, which specifically masks repetitive instructions that lack equipment operation conditions and physical meaning, as well as dangerous loop-based power transfer actions with dual-end vulnerability exceeding the safety threshold, during the policy generation stage. Combined with the action validity verification based on connectivity analysis and rigorous power flow calculation in the inference unit, this reduces the ineffective trial-and-error exploration of reinforcement learning algorithms in the discrete action space. This invention constructs an adaptive multi-dimensional reward feedback and multi-gradient descent optimization architecture, decoupling power supply recovery degree, safety over-limit penalty, and operational efficiency cost into three independently optimized dimensions. It uses the Frank-Wolfe algorithm to dynamically solve the optimal convex combination weights of the multi-dimensional policy gradient under hard physical safety constraints, and introduces a response scaling factor that adaptively adjusts with the global risk level. This can automatically increase the gradient weight of the safety over-limit penalty to protect the main power grid structure when extreme risks surge, and automatically allocate more weight to load recovery when the disaster is mitigated and the risk level decreases. Attached Figure Description
[0070] Figure 1 This is a basic flowchart of a dynamic optimization system for power emergency response plans based on the PPO algorithm, provided as an embodiment of the present invention. Detailed Implementation
[0071] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0072] Example, refer to Figure 1 This paper presents a dynamic optimization system for power emergency response plans based on the PPO algorithm, including a training module and an online execution module.
[0073] The training module includes a simulation unit, an evaluation unit, a decision-making unit, an inference unit, and an update unit;
[0074] The simulation unit is used to build a virtual power grid simulation environment, collect operating condition data, preprocess and extract features from the operating condition data, and generate node feature matrices and attribute graphs.
[0075] The evaluation unit is used to calculate the vulnerability coefficient between adjacent nodes based on the attribute graph and the node feature matrix, obtain the risk level based on the vulnerability coefficient, and perform weighted aggregation of node features to generate an aggregation matrix.
[0076] The decision unit is used to input the aggregation matrix into the policy network to obtain the original action matrix, generate the action mask matrix based on the vulnerability matrix, and determine the action vector based on the original action matrix and the action mask matrix.
[0077] The deduction unit is used to perform trend calculations based on action vectors and to calculate multi-dimensional rewards based on the trend calculation results.
[0078] The update unit is used to calculate the multi-dimensional value loss and multi-dimensional policy loss based on the multi-dimensional reward, update the parameters of the policy network through the multi-gradient descent algorithm, and output the trained policy network.
[0079] The online execution module is used to receive measured data from the real power distribution network, call the trained policy network, and output emergency plans.
[0080] This invention, by constructing a training module that includes simulation, evaluation, decision-making, deduction, and update units, combined with an online execution module, deeply integrates reinforcement learning policy networks with virtual power grid simulation. Under the premise of ensuring safe trial and error, it can output comprehensive contingency plans based on dynamically calculated vulnerability and action mask, thus solving the problems of poor adaptability and delayed response of traditional static emergency measures to complex disasters.
[0081] In the simulation unit, the operating data includes: power grid operation data, equipment parameters, power grid topology data, and external environment data;
[0082] This embodiment uses power simulation software such as... A power distribution network model was built to simulate the operating conditions of the power distribution network under various extreme weather disasters. The simulation software performed power flow calculations to obtain the operating data of the power distribution network under extreme weather disasters, including typhoons, rainstorms, lightning, and icing.
[0083] The simulation unit uses a preset duration as the decision cycle and collects operating condition data once at the end of each decision cycle. In this embodiment, the preset duration is 15 minutes.
[0084] In this embodiment, electrical connection nodes of the distribution network are used as nodes, including substation outgoing connection points, load access points, distributed power grid connection points, and connection points at both ends of line sectionalizing switches.
[0085] This embodiment assumes that each node is associated with at most one sectionalizing switch and one tie switch. For nodes in the actual power grid that are associated with multiple switches of the same type, they are pre-split into multiple virtual nodes to ensure that each node is associated with at most one sectionalizing switch and one tie switch. In this embodiment, it is assumed that each node has only a single electrical attribute, which includes power supply node, load node, and intermediate node. For actual nodes that contain a mixture of distributed power sources and loads, they are pre-split into two virtual nodes: power supply node and load node.
[0086] Load nodes are nodes that satisfy the condition that the injected active power is less than 0, and power supply nodes are sets of power supply nodes. In the set of power supply nodes, if the injected active power of a node is equal to 0 and it does not belong to the set of power supply nodes, then it is an intermediate node.
[0087] The data output by power simulation software includes power grid operation data, power grid topology data, equipment parameters, and external environment data;
[0088] Power grid operation data includes voltage amplitude vector, node injected active power vector, node injected reactive power vector, and switch opening and closing status vector;
[0089] Voltage amplitude vector Node-injected active power vector Node-injected reactive power vector It consists of the voltage amplitude of each node, the active power injected into the node, and the reactive power injected into the node, respectively.
[0090] The active power and reactive power injected at nodes follow the generator convention, with positive injection at power source nodes and negative injection at load nodes.
[0091] The switch open / closed state vector is composed of the open / closed state of each switch, with each element having a value of 0 or 1, where 1 indicates the switch is closed and 0 indicates the switch is open.
[0092] The equipment parameters include the series admittance of each branch, the thermal stability limit current of each branch, and the rated active power output limit of each power node.
[0093] Series admittance of each branch for A complex vector with 1 row and 1 column, in units of per unit, representing the series admittance of each branch in the normal closed state;
[0094] Thermal stability limiting current of each branch for A real vector with 1 row and 1 column. Total number of distribution network branches, in units of , Each element is determined based on the conductor type, current carrying capacity, and operating procedures of each branch of the distribution network.
[0095] for A vector of real numbers in 1 row and 1 column, in per-unit values, for a power node. The corresponding element is the upper limit of the rated active power output of the power supply; for non-power supply nodes, this element is set to 0.
[0096] Power grid topology data includes branch node association tables, node switch association tables, power source node sets, and tie switch association matrices;
[0097] The branch node association table is as follows A 2x2 integer matrix, where The total number of distribution network branches, the branch node association table The two elements in the row are branches. The two nodes connected at both ends are numbered, for example, the first node. Behavior , indicating a branch Connecting nodes and nodes ;
[0098] The node switch association table is as follows The node-switch association table has multiple rows and columns. Since each node in this embodiment is associated with at most one sectionalizing switch and one connecting switch, the node-switch association table is as follows: A 2x2 integer matrix, where The total number of nodes in the distribution network; the node switch association table. The record node is located in row 0 and column 0. The global switch number of the associated segment switch; the first The first row and first column record node The global switch number of the associated contact switch;
[0099] Power Node Set This is a set of power node numbers, including substation outgoing nodes and distributed power grid-connected nodes;
[0100] Interconnection switch correlation matrix for OK A matrix of real numbers, with all elements on the main diagonal being 0. The Line number Column elements The value can be: when the node With nodes When there is a connecting switch branch, ;otherwise ;
[0101] Derivative topology data is generated based on power grid topology data. The derived topology data includes physical connectivity adjacency matrix, operational connectivity adjacency matrix, node action capability matrix, node switch branch mapping table, and node admittance matrix.
[0102] Physically connected adjacency matrix Constructed based on the branch node association table. for OK A matrix of real numbers, with all elements on the main diagonal being 0. The Line number Column elements The value can be: when the node With nodes There are physical lines connecting them. ;otherwise ;
[0103] Running the connected adjacency matrix Constructed based on the physical connectivity adjacency matrix and the switch opening and closing state vector. for OK A matrix of real numbers, with all elements on the main diagonal being 0. The Line number Column elements The value can be: when the node With nodes When there is a physical line connection between them and that line is currently in a closed operating state. ;otherwise ;
[0104] Node Action Capability Matrix Constructed based on node switch association table for A 0 / 1 matrix with 4 rows and 4 columns. The Line number A column element of 1 indicates a node. Capable of executing the The device condition for an action is 0, indicating a node. Not capable of executing the first Equipment requirements for each action;
[0105] When node When associated with a sectionalizing switch, No. The value in row 0 is 1, otherwise it is 0; when the node When connecting the handshake switch, No. The first column of the row is 1, otherwise it is 0; when the node When the load node can be removed, No. The second column of the row is 1, otherwise it is 0; for all nodes, No. Setting all values in the third column of row to 1 indicates that no operation is required and the operation can always be executed.
[0106] This is the action index, where action index 0 represents the disconnected node. The sectionalizing switch at the location is used to isolate faults; action index 1 represents a closed node. The connection switch at the location is used for loop-closing transfer; action index 2 represents the connection to the node. Issue an emergency repair work order and disconnect the node load; Action Index 3 represents the action on the node. No action is taken; the status quo is maintained. A load-cutting node refers to a node that is electrically a load node and has a remotely or locally operable tripping device, allowing the load on that node to be cut off remotely or manually.
[0107] Action 2 is the action category of issuing emergency repair work orders and cutting off node load. It means that the corresponding emergency repair work order has been generated and the remote load cutting operation has been executed. The third reward is calculated and fed back to the strategy network. This contingency plan simulation process only evaluates the cost of the plan and does not change the physical initial position of the emergency repair team in the virtual environment in real time.
[0108] Node switch branch mapping table Built based on the node switch association table. for An integer matrix with 2 rows and 2 columns. The The element in row 0 and column 0 records the node. The global branch number corresponding to the associated sectionalizing switch If not associated with a segment switch, it is set to -1; The element in the first column of the row records the node. The global branch number corresponding to the associated handshake switch If there is no associated contact switch, the value is set to -1.
[0109] Nodal admittance matrix for OK The complex matrix of columns is in per-unit form. The node admittance matrix is calculated based on the series admittance of each branch, the line-to-ground admittance, and the switch open / closed state vector. For branches with switches in the open state, the branch is not included in the node admittance matrix. For branches with switches in the closed state, the series admittance and the line-to-ground admittance of the branch are accumulated into the corresponding elements of the node admittance matrix according to the node numbers at both ends of the branch.
[0110] The first node admittance matrix on the main diagonal Line number Column elements are nodes The self-admittance is equal to that of the node. The sum of the admittances of all connected branches and their ground admittances; the non-diagonal branch... Line number Column elements are nodes With nodes The negative value of the mutual admittance between branches, if the node With nodes There are no direct branch connections between them, the corresponding elements are zero, and the value of the node admittance matrix strictly follows the actual opening and closing state of the switches in the running connected adjacency matrix;
[0111] External environmental data includes the shortest road distance from the repair teams to each node and the corresponding meteorological warning text for each administrative region.
[0112] Shortest road distance for A vector of real numbers in rows and columns, with units of km. If there are multiple repair teams... The Each element retrieves the current location of all emergency repair teams down to the node. The minimum value among the road distances;
[0113] The distribution network coverage area is divided according to administrative regions. In the training module, a historical meteorological warning text library is built using meteorological warning texts that have actually occurred in the past 5 years. During training, a virtual simulation environment simulates a disaster scenario. Meteorological warning texts that match this scenario are extracted from the text library by region and used as meteorological input for this scenario.
[0114] The content of the meteorological warning text includes a description of the disaster type, affected area and severity, such as the typhoon orange warning: Affected by the typhoon, it is expected that within the next 12 hours, the central and eastern parts of the city will experience winds of level 10 or above, accompanied by short-term heavy rainfall;
[0115] This embodiment assumes that there is at most one physical branch between any two adjacent physical nodes in the distribution network; for parallel double-circuit lines in the actual power grid, virtual intermediate nodes are pre-inserted to split them into single-circuit branches.
[0116] This invention incorporates external meteorological data, including typhoons and rainstorms, and extracts the associated attributes of electrical nodes and switches to ensure that the virtual simulation environment can accurately map the disaster boundary of the real power distribution network under extreme weather conditions.
[0117] The simulation unit is specifically used for:
[0118] The voltage amplitude vector, node injected active power vector, and node injected reactive power vector are normalized, and the shortest road distance is normalized to obtain the voltage per-unit vector, active power per-unit vector, reactive power per-unit vector, and normalized road distance.
[0119] In this embodiment, the reference values used for per-unit processing include: reference capacity is The baseline capacity is selected based on the historical maximum load level of the distribution network. In this embodiment, the historical maximum load is... Take 1.2 times and then round down to the nearest integer. The baseline active power is The reference voltage is the rated line voltage of the distribution network. If there are multiple voltage levels in the distribution network, the rated voltage of the corresponding voltage level shall be taken as the reference.
[0120] Voltage per unit vector The active power per-unit vector is obtained by dividing the voltage amplitude at each node by the reference voltage. and reactive power per unit vector It is obtained by dividing the node-injected active power and node-injected reactive power vectors of each node by the base capacity, respectively.
[0121] The meteorological warning texts of each administrative region are input into a pre-trained meteorological text encoding network, and the output is an environmental disaster feature vector containing components of wind disaster intensity, rain disaster intensity, lightning intensity and icing intensity. The environmental disaster feature vectors of all nodes constitute an environmental disaster feature matrix.
[0122] The meteorological warning natural language text set is input into a pre-trained meteorological text encoding network, which outputs an environmental disaster feature vector. This feature vector has four dimensions and includes wind intensity, rainfall intensity, lightning intensity, and icing intensity. The value range of each component of the environmental disaster feature vector is as follows: The larger the value, the stronger the destructive power of the corresponding disaster.
[0123] Meteorological text coding network by Bidirectional Long Short-Term Memory Network It is composed of linear projection layers connected in sequence. 12 layers The encoder structure has a hidden dimension of 768 and 12 attention heads. The forward and backward hidden state dimensions are both 128; the linear projection layer has an input dimension of 256 and an output dimension of 4.
[0124] The pre-training process of the meteorological text coding network includes:
[0125] We obtained meteorological warning text samples from the past 5 years for this region. Each sample was manually labeled with four tags: wind intensity, rain intensity, lightning intensity, and icing intensity. The labeling was based on historical meteorological warning levels, measured wind speed, rainfall, lightning duration, and icing rate. Each physical quantity was mapped to the range of 0 to 1 to obtain the label value.
[0126] During training, the text samples are segmented and then input. , Output a 768-dimensional vector for each word; The output is a sequence of word vectors. , Output a concatenated vector of the last hidden states in both the forward and backward directions, with a dimension of 256; input this 256-dimensional vector into a linear projection layer, and then... After activation, a 4D predicted value is output, using the mean squared error loss function. The optimizer was trained for 50 epochs with a learning rate of 0.001 to obtain the solidified meteorological text coding network;
[0127] For each node in the power grid, its administrative region is determined based on its latitude and longitude. The corresponding meteorological warning natural language text is extracted and input into the trained meteorological text encoding network, which outputs a 4D environmental disaster feature vector specific to that node. For all nodes within the same administrative region, the meteorological warning text of the same region is used for encoding to obtain the same environmental disaster feature vector, which is then assigned to the corresponding nodes. The four elements represent wind intensity, rain intensity, lightning intensity, and icing intensity, respectively, with each element ranging from 0 to 1. The environmental disaster feature vectors of all nodes are arranged in rows to form... Environmental disaster characteristic matrix with 4 rows and 4 columns , Each element is a dimensionless numerical value, ranging from 0 to 1. The larger the value, the stronger the destructive power of the corresponding meteorological disaster in the region where the node is located.
[0128] The voltage per unit vector, active power per unit vector, reactive power per unit vector, normalized road distance, and environmental disaster feature vector of the same node are concatenated to form the node feature vector of the node. The node feature vectors of all nodes constitute the node feature matrix.
[0129] Node feature matrix for A real matrix with 8 rows and 8 columns, its first... Rows represent nodes Node feature vectors Node feature vectors Including nodes in sequence The per-unit values of node voltage amplitude, per-unit values of node injected active power, per-unit values of node injected reactive power, normalized emergency repair distance, wind disaster intensity, rain disaster intensity, lightning intensity, and icing intensity.
[0130] Based on the physical connectivity adjacency matrix, physical edges are established between nodes that are physically connected. An attribute graph is constructed with all nodes as vertices and all physical edges as the edge set.
[0131] Let the attribute graph be denoted as ,in For a set of nodes, the node feature matrix is... The line number corresponds to It consists of nodes. Let be the set of physical edges. By physical connectivity adjacency matrix It is determined that the nodes consist of pairs of nodes corresponding to all elements with a value of 1 in the physically connected adjacency matrix. At that time, node With nodes There is a physical edge between them.
[0132] This invention utilizes a pre-trained meteorological text encoding network to transform natural language early warnings into structured disaster feature vectors, breaking down the semantic barrier between unstructured meteorological information and quantified electrical parameters, and endowing graph neural networks with the ability to deeply understand the sensitivity of different spatial nodes to specific meteorological disasters.
[0133] The evaluation unit is specifically used for:
[0134] For each ordered node pair consisting of two nodes connected by a physical line, the node feature vectors of the two nodes in the ordered node pair are processed by the vulnerability assessment network to output the vulnerability coefficient of the ordered node pair.
[0135] This embodiment is used to extract the fault propagation probability between adjacent nodes and construct it into a vulnerability matrix, while also... The algorithm generates state input;
[0136] Attribute Map and node feature matrix Input the trained vulnerability assessment network, for ordered node pairs Output vulnerability coefficient For the reverse Also calculated separately;
[0137] The vulnerability assessment network contains a linear transformation weight matrix. and an attention weight vector It is a 32-row, 8-column real matrix. It is a real number vector with 64 rows and 1 column;
[0138] The specific calculation process of the vulnerability assessment network is as follows: The node features of the input nodes are reduced in dimensionality and mapped using a linear transformation weight matrix to obtain the mapped feature vector. For physically connected adjacent node pairs, their mapped features are concatenated and multiplied by the attention weight vector. This is then processed by the LeakyReLU activation function and normalized using the Softmax function to calculate the attention weight coefficients between nodes. Based on these attention weight coefficients, the mapped features of adjacent nodes are weighted and summed, and then passed through a non-linear activation function to obtain the output representation of each node. Finally, the vulnerability coefficient is output through a fully connected layer with an input dimension of 64 and an output dimension of 1, followed by Sigmoid activation to output the vulnerability coefficient. ;
[0139] The pre-training process of the vulnerability assessment network includes:
[0140] Historical samples of equipment overload or fault tripping in this power distribution network over the past 5 years during typhoons, rainstorms, lightning, and icing disasters were obtained. Each sample contains a node feature matrix and a physical connectivity adjacency matrix of an attribute graph, as well as labels. ;
[0141] When nodes in the sample Because of adjacent nodes When a fault occurs and is transmitted, resulting in a thermally stable overload, ,otherwise ,Label The determination is based on identifying the causal relationship between adjacent node failures and node overloads through historical fault recordings and fault tree analysis. For adjacent node pairs where the causal relationship cannot be confirmed, ;
[0142] Among them, subscript The subscript indicates the node affected by the transmission, i.e., the receiver. This indicates that the fault-initiating node is the source node, therefore and These represent fault propagation relationships in two different directions and need to be labeled and trained independently.
[0143] Pre-training uses either binary cross-entropy loss or mean squared error loss. Optimizer, learning rate 0.001, trained for 50 epochs;
[0144] For any ordered pair of nodes consisting of two nodes that are not physically connected, their vulnerability coefficient is directly assigned to zero.
[0145] That is, for satisfying The node pair, directly let ;
[0146] The vulnerability matrix is composed of all vulnerability coefficients and is asymmetric, with the main diagonal elements of the vulnerability matrix being 1.
[0147] Let the vulnerability matrix main diagonal element Used only for subsequent aggregation matrices Calculate the weights of each component, and then... Arranged by node number, forming OK Vulnerability matrix of columns ;
[0148] The risk level is the maximum value among all off-diagonal elements in the vulnerability matrix;
[0149] Risk level These are dimensionless numerical values, ranging from 0 to 1. The larger the value, the stronger the risk of fault propagation in the power grid under the current disaster conditions;
[0150] For each node, the node feature vectors of the node itself and each of its neighboring nodes are linearly transformed by the state weight matrix. The node is then weighted and summed using the vulnerability coefficients between the node and its corresponding nodes in the vulnerability matrix. Finally, the summation vector of the node is obtained by passing the summation vectors through a nonlinear activation function. The aggregation matrix is formed by the aggregation vectors of all nodes.
[0151] Initialize the state weight matrix , Given a 32x8 real matrix, for each node... Using vulnerability coefficient The neighbor node and its own features are weighted and aggregated, and a nonlinear transformation is performed to obtain the aggregated vector. The state weight matrix is randomly initialized together with the parameters of the policy network and the value network. The initialization method is Xavier initialization, and they are jointly updated.
[0152] The mathematical expression for an aggregate vector is:
[0153] ;
[0154] in, For nodes The aggregate vector has dimensions of 32 rows and 1 column. It is a linear rectified function. For nodes The set of first-order neighbor nodes and itself in the physical topology graph, i.e. ; The first in the vulnerability matrix Line number Column elements, The state weight matrix is... The node feature matrix is the first The node feature vector corresponding to the row;
[0155] Aggregate the vector of each node Transpose the vector to obtain a row vector, then convert all the rows to row vectors. The row vectors of each node are concatenated vertically to obtain... A 32-row aggregate matrix , As downstream The state inputs to the algorithm policy network and value network;
[0156] This invention dynamically quantifies the probability of fault propagation between adjacent nodes and constructs a risk degree and aggregation matrix accordingly. The feature weighting dominated by the vulnerability coefficient prompts the decision network to adaptively focus on topological weak links and high-risk propagation paths, effectively capturing the cascading fault evolution trend of the distribution network under extreme conditions.
[0157] The decision-making unit is specifically used for:
[0158] Input the aggregation matrix into the policy network to obtain the original action log odds for each node for each action category, thus forming the original action matrix;
[0159] This step is used to mathematically exclude three types of actions before the PPO policy network outputs the action probability. The first type is actions that cannot be executed because the node does not actually have the equipment conditions. The second type is repetitive operations that have no physical meaning after execution because the equipment is already in the target state. The third type is dangerous loop-closing actions that may cause a secondary short circuit in the power grid after execution. After the exclusion is completed, the policy network generates an action probability distribution based on the remaining legal actions and then samples to obtain the action instructions for each node.
[0160] The policy network is a PPO policy network, which adopts a node-by-node shared multilayer perceptron structure, which includes a first fully connected layer, a second fully connected layer and an output layer in sequence.
[0161] The first fully connected layer has an input dimension of 32 and an output dimension of 256; the second fully connected layer has an input dimension of 256 and an output dimension of 256; the output layer has an input dimension of 256 and an output dimension of 4.
[0162] Both the first and second fully connected layers are followed by... Activation function, but the output layer does not connect to an activation function;
[0163] The input to the PPO policy network is the aggregation matrix. ,right Each row, i.e., each node's 32-dimensional aggregate vector The node's original 4-dimensional log-probability of actions is obtained by sequentially passing through the shared first fully connected layer, second fully connected layer, and output layer.
[0164] For all After parallel processing by multiple nodes, the obtained A series of 4-dimensional vectors are arranged in rows to form The original action matrix with 4 rows and 4 columns , The Line number Column elements Indicates the first The node is selected. The original logarithmic odds of each action;
[0165] Based on the node action capability matrix, the action categories that the node does not have the conditions to execute are set to the mask value at the corresponding position in the action mask matrix;
[0166] Original Action Matrix It is the raw output of the policy network, based on the node action capability matrix. Apply the first layer of masking to the original output;
[0167] Specifically, constructing an action mask matrix , for A 4x4 real matrix, and the original action matrix Consistent dimensions The assignment process includes:
[0168] Read the node action capability matrix , No. Line number A column element of 1 indicates a node. Capable of performing actions The equipment conditions are for Indicates that it does not possess; if No. Line number Listed as Then No. Line number The column is assigned a value of negative infinity. Actions that do not meet the device conditions will have their probability set to zero in the subsequent Softmax transformation. The purpose of this step is to ensure that the output action is executable at the physical device level.
[0169] For the action category of disconnecting the sectionalizing switch, when the sectionalizing switch branch associated with the node is represented as disconnected in the running connectivity adjacency matrix, the corresponding position of the node in the action mask matrix is set to the mask value.
[0170] For the The node and the first This action, if No. Line number Column is 1, and If it is not equal to 1, then its current running status is further determined, and a second layer of shielding is performed based on the current running status to prevent duplicate operations;
[0171] For nodes that have the necessary equipment, it is also necessary to determine whether the target device is currently in the target state required by the action. That is, when the sectionalizing switch is disconnected, the node-switch branch mapping table is read. Middle node Corresponding sectionalizing switch branch number Then read the first branch node association table. The number of the nodes at both ends of the branch is obtained. and If running the connected adjacency matrix The Middle Line number Column elements are This indicates that the branch is already disconnected, and attempting to disconnect it again will have no effect; it's a redundant operation. Therefore, [the branch will be disconnected]. No. Line number The column is set to negative infinity; if it is This indicates that the branch is currently in a closed state, and it would be meaningful to disconnect it. No. Line number Column as ;
[0172] When action or At this time, the overload is cut off and the emergency repair task is registered, or there is no operation, which does not involve a change in the topology state. No. Line number The column is set directly to ;
[0173] The purpose of this step is to eliminate invalid exploration. If the policy network is allowed to repeatedly issue the disconnect command to a switch that has already been disconnected, a large number of physical meaningless experience samples will be generated during the training process, which will not only waste training resources, but may also mislead the policy network to learn the wrong behavior patterns.
[0174] For the action category of closing the contact switch, the corresponding position in the action mask matrix is set to a mask value when any of the following situations occur: the contact switch branch associated with the node is represented as closed in the running connected adjacency matrix; or the contact switch branch associated with the node is represented as open in the running connected adjacency matrix, and the vulnerability coefficient in any direction between the two ends of the contact switch branch exceeds the preset safety critical threshold, the corresponding position in the action mask matrix is set to a mask value.
[0175] A third layer of shielding is applied to the loop-connection operation to prevent safety accidents. The loop-connection operation is the most dangerous operation in the emergency plan. Closing a tie switch means connecting a line that was originally disconnected to the power grid. If the area around the line is already on the verge of severe overload due to extreme weather disasters, forcibly closing the loop will cause a secondary short circuit.
[0176] To implement the third layer of shielding, we first need to determine the repetition rate, that is, to determine the nodes. To determine whether the associated tie switch branch is currently in a closed state, specifically, read the node from the node switch branch mapping table. The corresponding tie switch branch number is used to obtain the node numbers at both ends of the branch based on the branch node association table. and If the connected adjacency matrix is run... Line number A column element being 1 indicates that the tie switch branch is already in a closed state; performing another closure would be a redundant operation, therefore... No. Line number Setting the column to negative infinity eliminates redundant closures;
[0177] Next, assess safety, i.e., if adjacent nodes exist. satisfy ,and , The fact that the connection between the two nodes of the disconnected tie switch has exceeded the preset safety threshold indicates that the vulnerability of the connection has exceeded the safety threshold. Forcibly closing the loop would very likely cause an overload exceeding the limit. No. Line number The column is also set to negative infinity;
[0178] If neither of the above two situations exists, then No. Line number Column as The loop closing action is only allowed to be executed if it is topologically feasible and the vulnerability assessment determines that it is safe.
[0179] Safety threshold The value of is determined experimentally. This embodiment uses a digital simulation environment for a distribution network containing 124 nodes and 53 control switches. Under 1000 random typhoon damage scenarios, the value of is determined for each... Candidate values are obtained by connecting the system of this embodiment to the distribution network environment, statistically analyzing the over-limit short-circuit action issuance rate, the erroneous blocking compliance action rate, and the number of iterations required for the strategy network to converge during the training process, and calculating the comprehensive optimization efficiency score.
[0180] The rate of triggering actions that exceed limits or cause short circuits is calculated by dividing the number of actions that cause power flow exceedance or short circuit risks during loop-closing and power transfer actions by the total number of loop-closing and power transfer actions. The rate of falsely masked compliant actions is calculated by performing a virtual simulation with the action mask released independently for each candidate safety critical threshold during offline parameter tuning. The number of actions that are verified as safe (not exceeding limits) after being released in all loop-closing actions that are masked is counted and divided by the total number of all safe loop-closing actions after the mask is released. All of these are mapped to a score of 0 to 100.
[0181] The out-of-limit short-circuit action issuance rate is set at 0.0% as 100 points and 28.5% as 0 points; the false blocking compliance action rate is set at 0.0% as 100 points and 32.3% as 0 points; the convergence rounds are set at 710 rounds as 100 points and 1850 rounds as 0 points; intermediate linear interpolation is used; failure to converge results in 0 points. The comprehensive optimization efficiency score is the weighted sum of the out-of-limit short-circuit action issuance rate, the false blocking compliance action rate, and the convergence rounds, with weights of 0.5, 0.2, and 0.3, respectively, and a full score of 100. The experimental results are shown in Table 1. In the no-mask control group, there is no mask blocking, so the false blocking compliance action rate is set at 0%, which is mapped to 100 points.
[0182] Table 1. Security Thresholds for Dynamic Action Masks Analysis table of the impact of optimization efficiency
[0183]
[0184] As can be seen from Table 1, The rate of short-circuit actions exceeding the time limit dropped to 0.0% for the first time, the rate of falsely blocking compliant actions was only 2.5%, the number of convergence rounds was the fewest, and the overall optimization efficiency score was the highest. Therefore, this embodiment takes... ; A value of 0.80 indicates that the node in the vulnerability matrix... With nodes When the transmission probability in any direction exceeds 0.80, the line is considered to be on the verge of severe overload. If loop transfer is performed at this time, an unacceptable risk of secondary short circuit will be generated.
[0185] The original action matrix and the action mask matrix are added element by element and then normalized exponentially transformed to obtain the action probability matrix. Then, for each node, random sampling is performed according to the action probability matrix to obtain the action vector.
[0186] The original action matrix With action mask matrix Perform element-wise addition to obtain the masked logarithmic probability matrix. The action probability matrix is obtained by performing a softmax transformation on each row of the masked log-probability matrix. Action probability matrix The Line number The column elements are:
[0187] ;
[0188] in, and They are respectively and The Line number Since a real number plus negative infinity is still negative infinity, and the exponent of negative infinity is 0, the probability corresponding to the masked action index is set to 0.
[0189] For the elements in the action mask matrix that are set to negative infinity, in actual implementation, a preset negative constant with a sufficiently large absolute value can be used instead. This negative constant satisfies that the probability of the action obtained after normalization exponential transformation after adding it to the log probability of the original action is zero or approximately zero. The position of the allowed action is set to zero in the action mask matrix, and its probability after normalization exponential transformation is determined by the log probability of the original action.
[0190] During the training phase, the policy network is based on the action probability matrix. Each node is independently sampled for a category to encourage exploration. During the online operation phase, the policy network performs action probability matrix analysis. For each node, the action index with the highest probability is selected, and random sampling is no longer performed;
[0191] The sampled action vector Length is , The Each element is 0, 1, 2, or 3, representing a pair of nodes. Each node can perform actions such as disconnecting the sectionalizing switch, closing the connecting switch, cutting off the overload and registering the emergency repair task, or do nothing. Each node outputs only one action index in each decision cycle.
[0192] The action probability matrix obtained from this sampling Save as the old strategy action probability matrix This provides a benchmark for subsequent parameter updates, limiting the magnitude of policy updates and preventing large policy changes from causing training instability.
[0193] This invention greatly accelerates the optimization convergence of reinforcement learning by removing the invalid action space, prohibits dangerous loop-closing actions that may lead to secondary over-limit short circuits from the physical rule level, and ensures the safety of output commands in the physical and electrical dimensions.
[0194] The deduction unit is specifically used for:
[0195] The action vectors are subjected to consistency verification and conflict elimination to obtain corrected action vectors. The specific process includes:
[0196] When two nodes on both ends of the same branch output the same topology action, the topology action shall be executed. When one end outputs a topology change action for the branch and the other end outputs a load shedding action for the node, the two control objects are different and do not interfere with each other, so they are executed in parallel. When one end outputs an action to shed overload and register emergency repair task and shed load and the other end outputs an action to maintain the status quo, the action to shed overload and register emergency repair task and shed load shall prevail.
[0197] The PPO algorithm needs reward signals from environmental feedback during the training phase to judge the quality of actions and update the strategy. However, it is unacceptable to directly apply untested actions to the real power grid for trial and error. This could lead to equipment overload or even power grid collapse. Therefore, this step executes actions, calculates power flow, and quantifies the consequences of actions in a virtual simulation environment, enabling the algorithm to complete trial and error learning in a safe simulation environment. At the same time, this step directly judges actions that do not meet Kirchhoff's laws, power output constraints, or power balance conditions as invalid through power flow calculation and validity judgment, preventing illegal actions from contaminating the training samples.
[0198] Specifically, for action vectors Perform physical topology-based consistency verification and conflict elimination to obtain correction action vectors. It should be noted that the trajectory cache pool strictly stores the original sampled action vectors of the policy network. The old action probability distribution corresponding to the sampling time; the above-mentioned corrected action vector This is only used for power flow simulation and reward calculation in a virtual simulation environment; in subsequent updates, the probability ratio of the policy loss function will be used. Always based on the original sampling action calculate;
[0199] When performing consistency checks on the action vector, all elements in the action vector that involve topology operations are traversed, i.e., elements with a value of 0 that open the sectionalizing switch or 1 that close the tie switch. For each such element, the target branch number of the node operation is determined according to the node switch branch mapping table, and then the node numbers at both ends of the branch are determined according to the branch node association table. All topology operations are grouped according to the branch number.
[0200] If a branch corresponds to only one topology operation record, that is, if only one node at the two ends of the branch requests a change to the branch switch status, and the other node does not request a change to the branch switch status, then it is determined that there is no conflict in the branch, and the topology operation is executed directly. The load shedding action or no operation action output by the other node is still executed independently according to the node's own instructions, without affecting the determination of the branch switch status.
[0201] If the same branch corresponds to two actions, it is determined that the adjacent nodes at both ends of the branch have generated redundant or contradictory instructions for that branch, and the conflict resolution process is initiated. The conflict resolution process includes:
[0202] If both nodes output action 0, it means that the two nodes have repeatedly issued disconnect commands to the same sectional switch branch, which is a redundant command. The action index corresponding to the larger number of the two nodes at both ends of the branch is changed from 0 to 3, while the smaller number remains unchanged at 0, so that the disconnect action is executed as a single action.
[0203] If both nodes output action 1, it means that the two nodes have repeatedly issued a closing command to the same tie switch branch, which is a redundant command. The action index corresponding to the larger number of the two nodes at both ends of the branch is changed from 1 to 3, while the smaller number remains unchanged at 1, so as to execute the closing action as a single action.
[0204] The two nodes output action 0 and action 1 respectively. Since the same branch can only belong to either a sectionalizing switch branch or a tie switch branch in physical terms, there is no situation where the same branch corresponds to two different types of switches at the same time. Therefore, this situation will not occur.
[0205] After the above elimination process, the corrected action vector is obtained, which is used as the input for subsequent conversion into the distribution network admittance matrix modification parameters.
[0206] For the node that outputs the action of disconnecting the segmented switch in the corrected action vector, the mutual admittance between the nodes at both ends of the segmented switch branch associated with that node is set to zero and the self-admittance is subtracted in the node admittance matrix.
[0207] For the node that outputs the closed contact switch action in the modified action vector, the mutual admittance between the nodes at both ends of the contact switch branch associated with that node is set to the negative value of the series admittance of that branch and the self admittance is added in the node admittance matrix to obtain the modified admittance matrix.
[0208] For nodes that output overload cut-off and register emergency repair tasks and cut off load actions, set their active power and reactive power injection to zero;
[0209] In this embodiment, the impedance of medium and low voltage distribution lines is treated as a pure series impedance model, ignoring the line-to-ground admittance, and the admittance matrix of the current distribution network node is read. For correcting action vectors The Middle Each element, using the node switch branch mapping table Make modifications and obtain the modified admittance matrix. ;
[0210] Specifically, if the If the element is 0, read... No. The branch number of the sectionalizing switch in row 0 and column 0 ,like The value is -1, indicating that the node If not associated with a sectionalizing switch, this action does not produce any topology or power modification and the element is skipped directly.
[0211] like If the value is not -1, then according to Retrieve the node numbers at both ends of the branch from the branch node association table. and Extracting branch Series admittance ,Will off-diagonal elements and Set to 0, and set the diagonal elements to 0. and Subtract this ;
[0212] If the first If the element is 1, read... No. The tie switch branch number corresponding to the first column of the row ,like A value of -1 indicates a node If no interconnection switch is associated, this action does not produce any topology or power modification, and the element is skipped directly.
[0213] like The value is not -1, according to Retrieve the node numbers at both ends of the branch from the branch node association table. and Extracting branch Series admittance Off-diagonal elements and Assigned value and in the diagonal elements and China plus ;
[0214] If the first If each element is 2, then in the active power per unit vector Reactive power per unit vector Lieutenant General Node Set the corresponding element to 0, and simultaneously inject the node into the active power vector. and node-injected reactive power vector Set the corresponding element of the node to 0; obtain the corrected active power per unit vector. Correcting the per-unit vector of reactive power Correcting the active power vector injected at the nodes and correcting the node-injected reactive power vector ;
[0215] If the first If the number of elements is 3, then no modification is made;
[0216] Based on the modified admittance matrix, graph connectivity analysis is performed, and the entire network is divided into several independent connected subnets. For power-depleted island subnets that do not contain power nodes, the voltage amplitude of their internal nodes is set to zero and they are not included in the power flow calculation. For charged connected subnets that contain at least one power node, one power node is selected from the subnet as the slack node, and the power flow equations are solved independently.
[0217] Based on modified admittance matrix The graph connectivity analysis is performed as follows: each node in the distribution network is taken as a vertex of the graph, and the nodes with non-zero off-diagonal elements in the node admittance matrix are considered to have an edge, thus forming a graph structure corresponding to the current topology.
[0218] Starting from any unmarked node, traverse all reachable nodes along the edges in the graph, marking each traversed node as belonging to the same connected subnet. Repeat this process until all nodes are marked, resulting in several unconnected connected subnets. Nodes belonging to the same connected subnet have at least one connected path consisting of closed branches, while nodes belonging to different connected subnets do not have any connected paths consisting of closed branches. For nodes that do not contain any power source nodes, i.e., the set... In the power outage island subnet of the nodes, the nodes in the power outage island subnet are marked as nodes that do not participate in the power flow calculation, and their voltage amplitude is directly set to 0;
[0219] For each charged connected subnet containing at least one power node, the rows and columns corresponding to the nodes in the subnet are extracted from the modified admittance matrix to form a submatrix. The node with the smallest number among the power nodes in the subnet is selected as the balancing node of the subnet, and its voltage phase angle is fixed at 0.
[0220] Sub-admittance matrix and corrected active power per unit vector Correcting the per-unit vector of injected reactive power at nodes. The voltage per-unit vector is used as input to perform power flow calculations, and the initial value of the voltage phase angle is uniformly set to 0.
[0221] The Newton-Raphson iterative algorithm is used independently to solve each charged connected subnet. The convergence accuracy of the power flow equations of each subnet is set to 0.0001, and the maximum number of iterations is set to 30.
[0222] When there is no electrically connected subnet, the power flow calculation does not meet the convergence condition, the total active power imbalance exceeds the preset threshold, or the active power injection of the power node exceeds the rated upper limit, the correction action vector is determined to be an invalid action.
[0223] If all connected subnets do not contain power nodes, meaning there are no energized connected subnets after elimination, for energized connected subnets, either any subnet fails to converge after 30 iterations, or the per-unit value of the total active power imbalance exceeds a preset convergence tolerance threshold (in this embodiment, the preset convergence tolerance threshold is 0.01, i.e., 1% of the baseline capacity), or the active power injection of any power node exceeds its per-unit value in the baseline capacity. If the corresponding rated active power output upper limit is used, then the correction action vector is determined. This is an invalid action;
[0224] The total active power imbalance is defined as the sum of the absolute values of the differences between the net injected active power at each node and the active power calculated based on the current node voltage and admittance matrix after the power flow iteration is completed, i.e., the sum of the absolute values of the node active power mismatch.
[0225] Otherwise, the correction action vector is deemed valid, and the node voltage magnitude vector and node voltage phasor vector after power flow calculation are output.
[0226] If none of the connected subnets contain power nodes, or if the iteration of any energized connected subnet fails to converge, or if the total active power imbalance of the system exceeds the preset limit, then the correction action vector is determined to be an invalid action.
[0227] Extract the active power injection of all power nodes in each energized connected subnet. For the active power injection of balanced nodes, take the power flow calculation value. For the active power injection of power nodes treated as constant power nodes, take the corresponding element in the corrected per-unit value of node injection active power. If the active power injection of any power node exceeds its corresponding element in the upper limit vector of rated active power output, the correction action vector is determined to be an invalid action.
[0228] If all the above criteria are met, the corrected action vector is deemed valid, and the node voltage magnitude vector and node voltage phasor vector after power flow calculation are output.
[0229] If the iteration converges, output the nodal voltage magnitude vector after power flow calculation. and node voltage phasor vector , for A vector of real numbers in 1 row and 1 column, in per-unit values; for A complex vector with 1 row and 1 column, in per-unit values;
[0230] This invention establishes conflict resolution and power flow verification based on the Newton-Raphson method in a virtual environment. This effectively eliminates illegal solutions that violate Kirchhoff's laws or cause system imbalance in network topology changes, and prevents invalid action samples from polluting the policy network parameters.
[0231] The process by which the deduction unit calculates multi-dimensional rewards and updates the state includes:
[0232] If the corrected action vector is an invalid action, the multi-dimensional reward will be the preset value;
[0233] The multi-dimensional rewards include a first reward, a second reward, and a third reward;
[0234] If the modified action vector is determined to be an invalid action, then the first reward... Second reward Third reward , The value is determined based on: normal safety over-limit penalty The absolute value of the value after clipping does not exceed 10. The penalty for invalid movements is taken from this upper bound to ensure that the negative feedback of invalid movements is significantly stronger than that of general over-limit movements, while also being consistent with... , The order of magnitude maintains an optimizable relationship;
[0235] Simultaneously, the interaction in the current virtual environment is forcibly terminated, and the node feature matrix under this decision cycle is... The action vector, action probability matrix, and the aforementioned reward are saved as the last set of data for this trajectory, which will be used for subsequent parameter updates.
[0236] If the corrected action vector is a valid action, then a multi-dimensional reward is calculated. The calculation process includes:
[0237] For nodes with negative injected active power, voltage amplitude within acceptable range after power flow calculation, and non-zero admittance path with the power supply node, the absolute value of the injected active power is summed to obtain the power supply recovery reward. The power supply recovery reward is then linearly scaled to obtain the first reward.
[0238] Read the node voltage magnitude vector after power flow calculation The statistical voltage amplitude is within the range of 0.95 to 1.05 per unit, is in a connected state, and currently meets the following conditions. The set of nodes;
[0239] Extract each node from the node set. The corresponding active power element in the middle, its absolute value The sum is the power restoration bonus, in units of ;
[0240] Being in a connected state means that the voltage magnitude of the load node is non-zero after power flow calculation, and is determined by modifying the admittance matrix. The reachability determination is that the load node is connected to at least one power node. There exists a non-zero admittance path; because the action category of action 2, which cuts off the overload load, registers the emergency repair task, and cuts off the load, has already changed the corresponding node. Set to 0, therefore the removed nodes do not satisfy the current condition. This will not be included in the power restoration bonus; the first bonus is linearly scaled to... interval;
[0241] The current amplitude of each branch is calculated based on the node voltage and series admittance of each branch after the power flow calculation. The current amplitude of the branch in the open state is set to zero. The deviation of the current amplitude of each branch from the thermal stability limit current is calculated and summed and the opposite number is taken to obtain the safety limit penalty reward. The safety limit penalty reward is then trimmed by interval to obtain the second reward.
[0242] For each branch road Read the node numbers at both ends and According to the modified admittance matrix Corresponding non-diagonal elements Determine if the branch is non-zero. Is the current connection closed?
[0243] like off-diagonal elements The corresponding branch current Set directly to 0;
[0244] like If it is non-zero, then extract the branch. Corresponding equivalent series admittance To calculate the per-unit value of complex branch currents, the mathematical expression for the per-unit value of complex branch currents is:
[0245] ;
[0246] in, For the per-unit value of the complex branch current, branch road One end node The per-unit value of the voltage phasor. branch road One end node The per-unit value of the voltage phasor.
[0247] right Take the modulus value to obtain the per-unit value of the branch current amplitude. Arrange the per-unit values of the branch current amplitude of all branches by row to obtain the per-unit value vector of branch current amplitude. , for A dimensionless vector of real numbers in one row and one column.
[0248] Read the thermal stability limit current of each branch ,Will Divide by the reference current The per-unit value of the thermal stability limiting current for each branch was obtained. The reference current is based on the reference voltage. Calculations show that ,in ;
[0249] For each branch road Calculate branches per-unit value of current amplitude and branch roads Thermal stability limiting current per unit value The deviation amount, the deviation amount is Sum the deviations of all branches to obtain the total per-unit deviation of the branch limit, then take the negative number as the safe limit violation penalty reward, and trim the safe limit violation penalty reward to... Within the specified range, the second reward is obtained;
[0250] For nodes that output overload shedding, register emergency repair tasks, and shedding load actions, the emergency repair time is calculated based on the shortest road distance and preset driving speed. The sum of the emergency repair times of all nodes that output this action is then taken as the negative number to obtain the operation efficiency cost reward. The operation efficiency cost reward is then linearly scaled to obtain the third reward.
[0251] Read the original emergency repair distance vector Given that the average speed of the repair vehicle is 30 km / h, calculate the shortest pathfinding time for each node with an element of 2 in the correction action vector. The unit is hours, of which For the first The original repair distance for each node is in km. To avoid the unreasonable situation where the repair time is zero when the repair distance is zero, a zero-prevention constant of 0.1 km is added. The shortest pathfinding time for all nodes marked as being under repair is calculated and summed. The negative of this sum is used to obtain the operation efficiency cost reward. The operation efficiency cost reward is then linearly scaled to obtain the third reward. The third reward is then linearly scaled to... interval;
[0252] The node voltage amplitude after power flow calculation is used as the voltage amplitude when collecting operating condition data in the next decision cycle. The injected power of nodes that have cut off overload and registered emergency repair tasks and cut off load actions are kept at zero in subsequent decision cycles and set to "no equipment conditions" in the node action capability matrix. For nodes that have output effective topology change actions, the elements between the nodes at both ends of the corresponding branch are updated in the running connectivity adjacency matrix in the next decision cycle, and the node admittance matrix for the next decision cycle is recalculated.
[0253] After outputting the reward for the current decision cycle, the environment enters a state update phase to generate data for the next decision cycle: the node voltage magnitude vector after power flow calculation is... Assign the initial node voltage magnitude per unit value vector for the next decision cycle. ;
[0254] Based on the modified action vector, for nodes with a value of 2, their next decision cycle is... and The corresponding element remains permanently 0, and is displayed in the node action capability matrix. The second column of this node is permanently set to 0 to prevent repeated removal of overload loads and registration of emergency repair tasks in subsequent decision cycles.
[0255] For correcting action vectors Read the node whose value is 0 or 1 and is considered valid. Extract the corresponding branch number, and then obtain the node numbers at both ends of the branch. and Connect the adjacency matrix to the next decision cycle. The first in Line number List and No. Line number The corresponding column element is set to 0 (if the action value is 0) or 1 (if the action value is 1);
[0256] Finally, the updated connectivity adjacency matrix is used to recalculate and overwrite the distribution network node reference admittance matrix for the next decision cycle. ;
[0257] In this embodiment, the location of the repair team remains unchanged within a single training or verification scenario. Action 2, which involves cutting off the overload and registering the repair task, only indicates cutting off the load and marking the node as awaiting repair; it does not change the current location of the repair team. In subsequent decision cycles, the repair distance corresponding to this node remains at its initial value, but due to the node action capability matrix... The second column of this node is already set to 0, so this node will not be disconnected from overload and registered for emergency repair again.
[0258] This invention decouples the feedback signal into the absolute value of power supply recovery, the penalty for exceeding safety limits, and the operational efficiency cost determined by the pathfinding time. This multi-dimensional feedback mechanism forces the reinforcement learning agent to simultaneously consider loss reduction, network protection, and efficiency improvement when making decisions, thus avoiding the short-sighted strategy of sacrificing backbone network security for local recovery.
[0259] The update unit is specifically used for:
[0260] A value network is constructed, which shares the parameters of the first and second fully connected layers with the policy network. The value network also includes a value network output layer, whose input is the output of the shared second fully connected layer, and whose output is a multi-dimensional value prediction.
[0261] This step is used to complete the parameter update in the offline training phase. First, the simulation unit, evaluation unit, decision unit and inference unit steps are repeated in the virtual environment to collect a trajectory containing data from multiple decision cycles.
[0262] Then, based on the trajectory, the value loss in three dimensions and the policy loss in three dimensions are calculated respectively. The optimal convex combination weight of the three policy gradients is obtained under the physical security constraint using the multi-gradient descent algorithm, and the total policy gradient is obtained.
[0263] The three dimensions are: the first dimension, the second dimension, and the third dimension. The first dimension corresponds to the power restoration reward dimension, the second dimension corresponds to the safety limit violation penalty reward dimension, and the third dimension corresponds to the operation efficiency reward dimension.
[0264] Then, it is merged with the total value gradient obtained by unweighted summation to form the total update gradient; finally, the parameters of the PPO policy network and value network are updated using the Adam optimizer. After training, the optimal parameters are saved according to the comprehensive score on the validation set as the final model for deployment.
[0265] The PPO algorithm is a policy gradient method in deep reinforcement learning. It must rely on complete trajectories for offline policy updates. Single-cycle data cannot be used to calculate the advantage function, and therefore cannot determine the superiority or inferiority of actions. Therefore, it is necessary to first perform multi-cycle interactions in a virtual simulation environment to accumulate state, action, and reward sequences. Single-cycle data includes the node feature matrix, action vector, action mask matrix, action probability matrix, multi-dimensional reward, and node feature matrix of the next decision cycle after the action is executed.
[0266] A trajectory consists of all single-cycle data arranged in chronological order and the reason for trajectory termination, such as reaching the maximum number of decision cycles normally or terminating prematurely due to invalid actions.
[0267] The update unit strings together single-period data into a complete time series, calculates the cumulative discounted return and advantage function for each period, and then calculates the loss and updates the parameters in a unified manner.
[0268] The value network and the policy network share the parameters of the first and second fully connected layers, meaning they use the same feature extraction components and differ only in the output layer.
[0269] Value network to aggregation matrix Each row, i.e., each node's 32-dimensional aggregate vector The input layers pass through a shared first and second fully connected layer, followed by a value network output layer, outputting three scalars. The value network output layer has an input dimension of 256 and an output dimension of 3, and does not use an activation function. After parallel processing by each node, the result is... A 3x3 value prediction matrix is generated, and the average of each column is taken to obtain three scalars, denoted as the first value prediction. Second value prediction and third value prediction The value network averages the values across all nodes and outputs a global value prediction across three reward dimensions.
[0270] When collecting trajectories, the update unit continuously executes decision loops for no more than a preset maximum number of cycles. In each decision cycle, the node feature matrix, action vector, action mask matrix, multi-dimensional normalized reward, node feature matrix of the next decision cycle, and old strategy action probability matrix of the current decision cycle are saved to the trajectory until the preset maximum number of cycles is reached or the action vector is judged as an invalid action.
[0271] The maximum number of consecutive decision cycles executed in the virtual environment is [preset maximum number]. The decision-making loop repeatedly executes the steps of simulation unit, evaluation unit, decision unit, and inference unit. In each cycle, the generated node feature matrix is... Actions, action probabilities, action mask matrix, multi-dimensional rewards, and vulnerability matrix are saved to the trajectory, and the number of decision cycles is equal to the trajectory length.
[0272] When the trajectory length reaches If the virtual scene terminates prematurely due to an invalid action, the trajectory ends, and the actual length of the trajectory is recorded as . , When the trajectory terminates prematurely due to an invalid action, For the sequence number of the last executed decision cycle, the following formulas for value loss, strategy loss, and cumulative discount return are used. Replace all with Rewards for decisions not executed in the trajectory are not saved or included in the summation;
[0273] When calculating the loss, the aggregation matrix of each decision cycle is recalculated based on the current state weight matrix. The global value prediction of each dimension is obtained through forward propagation of the value network. The current action probability matrix is obtained by forward propagation of the policy network and combined with the action mask matrix.
[0274] All trainable parameters of the policy network and the value network are collectively referred to as parameters. ,parameter This includes the weights of the first fully connected layer, the weights of the second fully connected layer, the weights of the policy network output layer, the weights of the value network output layer, the biases of each layer, and the state weight matrix. , It is a real number vector, the length of which depends on the network dimension setting;
[0275] Use the current parameters before calculating the loss. The state weight matrix Vulnerability matrix corresponding to each decision cycle in the trajectory For the node feature matrix of each decision cycle in the trajectory Recalculate the current aggregation matrix ;
[0276] For each dimension, the normalized rewards of each decision cycle are weighted and summed according to the discount factor to obtain the cumulative discount return. The mean square error between the global value prediction and the cumulative discount return for that dimension is calculated as the value loss.
[0277] Use current parameters For the recalculated aggregation matrix By performing forward propagation of the value network, the value network is obtained during the decision-making cycle. The predicted output, i.e., the value prediction for this decision-making cycle. ,in, These are the value predictions for the first, second, and third dimensions, respectively. The predicted values under these current parameters are used to calculate the value loss and the advantage function.
[0278] Traverse the collected trajectories in this round and calculate each decision cycle. Cumulative discount returns across the three corresponding dimensions , and Taking the first dimension as an example, the mathematical expression for the cumulative discount return in the first dimension is:
[0279] ;
[0280] in, For the first Each decision cycle corresponds to the cumulative discount return in the first dimension. The actual length of the current trajectory. The discount factor is 0.99 in this embodiment. For the first The first reward in each decision-making cycle; This is an index variable used to accumulate data from the current period to subsequent periods. The value prediction output by the value network;
[0281] for This term is used to estimate the cumulative reward in the future, starting from the end state of the trajectory.
[0282] If the trajectory terminates normally due to reaching the preset maximum number of decision cycles, then Take the next state after the terminal state of the value network, which is theoretically the [nth state]. The value prediction of each cycle state is used to estimate the potential benefits that will continue to exist in the future.
[0283] If the trajectory is terminated prematurely because the corrected motion vector is deemed an invalid motion, then a forced order is issued. Because the power grid environment has entered an irreversible state of failure, there are no further rewards to be obtained.
[0284] By replacing the first reward in the mathematical expression of the cumulative discount return in the first dimension with the second or third reward, we can obtain the cumulative discount return in the second dimension or the cumulative discount return in the third dimension, respectively.
[0285] The learning objective of the value network is to fit the cumulative discounted return. Three value loss functions are defined as all values on the current trajectory. The mean squared error over each decision cycle, taking the first dimension as an example, is expressed mathematically as follows:
[0286] ;
[0287] in, The actual length of the current trajectory. For the first dimension of cumulative discount returns, Value prediction for the first dimension;
[0288] The cumulative discount reward in the first dimension, Replace the cumulative discount returns of the second and third dimensions respectively, and change the value prediction of the first dimension. By replacing the value predictions with the second and third dimensions respectively, we obtain the value loss function for the second dimension. and the third-dimensional value loss function ;
[0289] For each dimension, the advantage function is calculated through generalized advantage estimation based on normalized reward and global value prediction. For each node, the probability ratio of the current action probability matrix to the corresponding selected action category in the old strategy action probability matrix is calculated. The probability ratio is restricted to a preset cutoff interval. The probability ratios before and after the restriction are multiplied by the advantage function and the smaller value is taken. The average is taken over all nodes and all decision cycles and the negative number is taken to obtain the strategy loss for that dimension.
[0290] respectively For single-cycle rewards, combined with value prediction under current parameters. The advantage functions in three dimensions are calculated using generalized advantage estimation. , and ;
[0291] The mathematical expression for the dominance function in the first dimension is:
[0292] ;
[0293] ;
[0294] in, For the first dimension in the th The temporal difference error of each decision cycle For the first The first reward of each decision-making cycle As a discount factor, For the first dimension in the th Value prediction for each decision-making cycle For the first dimension in the th Value prediction for each decision-making cycle; For the first dimension in the th The advantage function value for each decision cycle For parameters to estimate the generalized dominance, For the first dimension in the th The temporal difference error of each decision cycle; where the discount factor is... Generalized dominance estimation parameters ;
[0295] For the cumulative index variable, the value is taken from... arrive Integers; Corresponding to the current decision-making cycle , Corresponding decision cycle And so on;
[0296] The first dimension is in The mathematical expression for the time-series difference error of each decision cycle is:
[0297] ;
[0298] For each dimension, when If the trajectory ends normally due to reaching the maximum number of cycles during its last cycle, then... The value network is recalculated from the feature matrix of the nodes in the next decision cycle stored in the trajectory. The predicted value; if the trajectory enters the termination state prematurely due to invalid actions, then a forced order is issued. Second and third dimension advantage functions The same calculation applies;
[0299] The purpose of this is to provide each objective with an independent importance-weighted signal for the policy gradient, and PPO uses the advantage function to determine how good or bad an action is relative to the average level.
[0300] Use the current parameters before calculating the policy loss. The above recalculated aggregation matrix Re-execute the forward propagation of the policy network to obtain the original action matrix, and then compare it with the action mask matrix already saved in this decision cycle. After summing element by element and performing row-wise softmax, the probability matrix of the current action is obtained. ;
[0301] make Represents action vector The first in Each element, for each node and their corresponding discrete actions From the current action probability matrix The Extract the probability corresponding to the action index from the row, and calculate the single-node probability ratio. Since the actions of each node are independent, the numerical underflow caused by probability multiplication is avoided by averaging the single-point losses of all nodes.
[0302] Calculate the multi-dimensional policy loss function and The mathematical expression for the multi-dimensional strategy loss function is:
[0303] ;
[0304] in, For the first dimension of strategy loss, The actual length of the current trajectory. The total number of distribution network nodes. This represents the probability ratio for a single node. For the first dimension in the th The advantage function value for each decision cycle The cutoff factor is used in this embodiment. ;
[0305] Indicates will Limited to Within the range;
[0306] Second strategy loss function and third strategy loss function Similarly, calculate and use respectively .
[0307] When calculating the gradient of the policy loss function with respect to the network parameters through backpropagation, the advantage function is treated as a constant tensor without gradient (by performing a Detach operation), thus preventing it from passing additional gradients to the shared feature layer and the value output layer.
[0308] This invention reduces parameter redundancy and maintains uniformity in environmental state representation by sharing a fully connected bottom layer and using generalized advantage estimation. Combined with a truncation operation on probability ratios, it effectively controls step size fluctuations in the multi-dimensional update process, ensuring that the policy optimization of each objective can continuously improve on a stable and monotonically increasing trajectory.
[0309] The process of updating unit parameters includes:
[0310] Calculate the policy gradients of the policy loss with respect to the network parameters in three dimensions to obtain the policy gradients in three dimensions; the network parameters include the policy network parameters, the value network parameters, and the state weight matrix.
[0311] Using the backpropagation algorithm and leveraging the automatic differentiation mechanism of deep learning frameworks, the partial derivatives of the three policy loss functions constructed based on the advantage function and probability ratio are calculated with respect to the weights and bias parameters of each layer of the policy network, thus obtaining the first policy gradient. Second policy gradient and the third policy gradient ;
[0312] With the optimization objective of minimizing the magnitude of the convex combination of multi-dimensional policy gradients, the Frank-Wolfe algorithm is used to solve for the weights of the convex combination in each dimension under constraints.
[0313] The optimization objective is to find a set of convex combination weights. To minimize the convex combination magnitude of the policy gradient, the mathematical expression for the optimization objective is:
[0314] ;
[0315] in, To optimize the objective, For convex combination weights, The policy gradient has three dimensions;
[0316] The constraints on the optimization objective include:
[0317] ;
[0318] ;
[0319] ;
[0320] ;
[0321] in, These are the weights corresponding to the gradients of the first, second, and third objective policies, respectively. The risk level used for this joint parameter update is determined by taking the maximum value of the risk level for each period of the entire trajectory.
[0322] In this embodiment, the preset response scaling factor is used. Take 0.5;
[0323] Among the above constraints, As a hard constraint for physical safety, when extreme weather disasters increase the risk of power grid transmission, the risk level increases, and this constraint forces the gradient weights of the second objective strategy. The increase forces the public policy gradient to shift towards reducing safety limits; when the disaster situation eases and the overall risk level rises... When the load decreases, the constraint is automatically relaxed, and the optimizer can allocate more weight to the gradient of the power restoration strategy, so that the strategy is updated in the direction of restoring more load. This realizes the mechanism of adaptive adjustment of multi-objective weights according to the disaster situation.
[0324] The Frank-Wolver algorithm is used to solve the above optimization objective. The input of the Frank-Wolver algorithm is the gradient of the first policy. Second policy gradient Third policy gradient The algorithm sets the risk level, convergence precision to 0.001, maximum number of iterations to 50, and outputs the optimal weights. ;
[0325] The total policy gradient is obtained by weighting and summing the multi-dimensional policy gradients according to their respective convex combination weights. The total value gradient is obtained by calculating the gradients of the multi-dimensional value loss relative to the network parameters and summing them. The total policy gradient and the total value gradient are added together to obtain the total update gradient. The network parameters are updated according to the total update gradient.
[0326] The mathematical expression for the total policy gradient is:
[0327] ;
[0328] in, For convex combination weights, The policy gradient has three dimensions;
[0329] Meanwhile, for multi-dimensional value loss functions Three value gradients were obtained by performing backpropagation separately. The goal of the value network update is to objectively and independently fit the expected returns of each dimension, without participating in the game of policy direction. Therefore, the unweighted total value gradient is calculated as follows: The sum of;
[0330] Add the total policy gradient to the total value gradient to obtain the total update gradient. Input the Adam optimizer with a preset learning rate of 0.0003, first moment decay of 0.9, and second moment decay of 0.999. Calculate the dynamic parameter update step size and adjust the parameters accordingly. Perform iterative updates, parameters After the update, the current trajectory is cleared, and the initial disaster scenario of the power grid is reset in the virtual environment, starting the next scenario. Training rounds for each decision cycle.
[0331] Validation scenarios are randomly selected from historical extreme weather disaster samples. Validation scenarios do not participate in parameter updates. After each training round, the decision-making process is executed on the validation scenario with the current network parameters without updating the parameters. The normalized rewards of the three dimensions under the validation scenario are accumulated on the complete trajectory, weighted equally, and averaged to obtain the validation score. When the validation score is higher than the historical best validation score, the current network parameters are saved. When the validation score no longer increases for a preset number of consecutive rounds or the number of training rounds reaches the preset maximum number of rounds, training is stopped and the saved network parameters are output as the trained policy network.
[0332] Training termination conditions include:
[0333] The validation set consists of 20% of the scenarios randomly selected from historical extreme weather disaster samples. These scenarios are not included in parameter updates. After each training round, a validation score is calculated on the validation set. ;
[0334] For each validation set scenario, execute the steps of the simulation unit, evaluation unit, decision unit, and inference unit, but do not execute the update unit step, until the maximum number of cycles is reached or an invalid action occurs; then execute the steps of all decision cycles of the trajectory. The sum of these values is calculated separately to represent the total benefit throughout the entire lifecycle of the emergency response plan in this scenario. ;
[0335] If the trajectory terminates prematurely due to an invalid action, the reward for the unexecuted decision cycle is counted as 0 and added to the cumulative total. The mathematical expression for the verification score is:
[0336] ;
[0337] in, To verify the number of scene sets, The first The cumulative sum of the trajectories of the three rewards in a validation set scenario;
[0338] when Training stops when there is no further improvement after 200 consecutive training rounds, or when the maximum number of training rounds (2000) is reached. During training, if the current round's... Higher than the historical best Then save the current parameters. The optimal parameters are used as the final fixed parameters after training stops.
[0339] After training, the strategy network corresponding to the optimal parameters will be deployed as the dynamic optimization strategy network for the power emergency plan.
[0340] This invention introduces a physical safety hard constraint that is adjusted in real time by the global risk level. This adaptive weighting mechanism enables it to automatically shift the optimization focus to avoiding exceeding the limit when the risk of fault propagation is high, and to flexibly shift to power restoration when the risk drops, thus achieving a dynamic optimal compromise of the objective.
[0341] The online execution module is specifically used for:
[0342] Obtain real and measured power grid operation data, power grid topology data, equipment parameters, and external environment data from the distribution automation system, geographic information system, meteorological early warning platform, and emergency repair dispatch system of the actual power distribution network;
[0343] Call the completed policy network output by the training module, as well as the meteorological text encoding network, vulnerability assessment network, and state weight matrix fixed in the training module;
[0344] The real test data is preprocessed and feature extracted in the same way as the training module to generate real node feature matrices and attribute graphs, and the vulnerability matrix, risk degree and aggregation matrix are calculated.
[0345] The real aggregation matrix is input into the trained policy network, and an action mask matrix is generated by combining the vulnerability matrix and the node action capability. After obtaining the action probability matrix through normalized exponential transformation, the action category with the highest probability in the action probability matrix is selected for each node to form the emergency dispatch action vector output.
[0346] Collect real power grid operating condition data and perform the same preprocessing. Meteorological text encoding to generate node feature matrix Physical connectivity adjacency matrix During the online phase, no sample labeling or network pre-training is performed. The parameters of the meteorological text encoding network and the vulnerability assessment network are the same as the fixed weights obtained after the offline phase training.
[0347] Fixed using offline training Calculate the vulnerability matrix Risk level Using a fixed state weight matrix Calculate the aggregation matrix ;
[0348] Invoke the policy network and input the aggregation matrix. Calculate the original action matrix Using the same mask generation rules, Constructing an action mask matrix ; after masking Obtain the action probability matrix The action category with the highest probability of action for each node is taken as the emergency dispatch instruction for that node, forming the emergency dispatch action vector output.
[0349] This invention deeply integrates multi-source heterogeneous data with graph neural network technology. By constructing an attribute graph that includes environmental disaster characteristics and distribution network operating conditions, and by using a vulnerability assessment network to extract the probability of fault propagation between adjacent nodes, it achieves dynamic quantification and perception of the topological vulnerability of the distribution network under extreme weather disasters. This feature representation method based on weighted aggregation of physical connectivity and real-time vulnerability coefficients effectively overcomes the problem that traditional static contingency plans cannot cope with the dynamic evolution of disaster conditions, and provides a high-quality environmental state observation foundation for subsequent strategy networks.
[0350] This invention introduces an action masking mechanism based on physical safety constraints. During the strategy generation stage, it specifically masks repetitive instructions that lack equipment operation conditions and have no physical meaning, as well as dangerous loop transfer actions with double-end vulnerability exceeding the safety threshold. Combined with the action validity verification based on connectivity analysis and strict power flow calculation in the simulation unit, it reduces the invalid trial and error exploration of reinforcement learning algorithms in the discrete action space, significantly improves the convergence speed and optimization efficiency of the strategy network, and ensures the physical executability and safety of the generated emergency plan in the real distribution network.
[0351] This invention constructs an adaptive multi-dimensional reward feedback and multi-gradient descent optimization architecture, decoupling power restoration degree, safety over-limit penalty, and operational efficiency cost into three independently optimized dimensions. It uses the Frank-Wolfe algorithm to dynamically solve the optimal convex combination weights of the multi-dimensional policy gradient under hard physical safety constraints, and introduces a response scaling factor that adaptively adjusts with the global risk level. This allows it to automatically increase the gradient weight of the safety over-limit penalty to protect the main power grid structure when extreme risks surge, and automatically allocate more weight to load restoration when the disaster is mitigated and the risk level decreases. Thus, it intelligently weighs multiple demands based on real-time dynamic operating conditions and outputs a comprehensive optimal emergency plan that balances high safety, rapid power restoration, and low repair costs.
[0352] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0353] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the protection scope of the present invention.
Claims
1. A power emergency plan dynamic optimization system based on a PPO algorithm, characterized in that, Includes a training module and an online execution module; The training module includes a simulation unit, an evaluation unit, a decision-making unit, an inference unit, and an update unit; The simulation unit is used to construct a virtual power grid simulation environment, collect operating condition data, preprocess and extract features from the operating condition data, and generate a node feature matrix and attribute graph. The evaluation unit is used to calculate the vulnerability coefficient between adjacent nodes based on the attribute graph and the node feature matrix, obtain the risk level based on the vulnerability coefficient, and perform weighted aggregation of node features to generate an aggregation matrix. The decision unit is used to input the aggregation matrix into the policy network to obtain the original action matrix, generate an action mask matrix based on the vulnerability matrix, and determine the action vector according to the original action matrix and the action mask matrix. The inference unit is used to perform trend calculation based on the action vector and calculate multi-dimensional rewards based on the trend calculation results. The update unit is used to calculate the multi-dimensional value loss and multi-dimensional policy loss based on the multi-dimensional reward, update the parameters of the policy network through a multi-gradient descent algorithm, and output the trained policy network. The online execution module is used to receive measured data from the real power distribution network, call the trained strategy network, and output emergency plans.
2. The power emergency plan dynamic optimization system based on PPO algorithm of claim 1, wherein, In the simulation unit, the operating data includes: power grid operation data, equipment parameters, power grid topology data, and external environment data; The power grid operation data includes voltage amplitude vector, node injected active power vector, node injected reactive power vector, and switch on / off state vector. The equipment parameters include the series admittance of each branch, the thermal stability limit current of each branch, and the rated active power output limit of each power node. The power grid topology data includes branch node association tables, node switch association tables, power supply node sets, and tie switch association matrices. Derivative topology data is generated based on power grid topology data. The derived topology data includes a physical connectivity adjacency matrix, an operational connectivity adjacency matrix, a node action capability matrix, a node switch branch mapping table, and a node admittance matrix. The external environmental data includes the shortest road distance from the repair team to each node and the meteorological warning text corresponding to each administrative region.
3. The dynamic optimization system for power emergency response plans based on the PPO algorithm as described in claim 2, characterized in that, The simulation unit is specifically used for: The voltage amplitude vector, node injected active power vector, and node injected reactive power vector are normalized, and the shortest road distance is normalized to obtain the voltage per-unit vector, active power per-unit vector, reactive power per-unit vector, and normalized road distance. The meteorological warning texts of each administrative region are input into a pre-trained meteorological text encoding network, and the output is an environmental disaster feature vector containing components of wind disaster intensity, rain disaster intensity, lightning intensity and icing intensity. The environmental disaster feature vectors of all nodes constitute an environmental disaster feature matrix. The voltage per-unit vector, active power per-unit vector, reactive power per-unit vector, normalized road distance, and environmental disaster feature vector of the same node are concatenated to form the node feature vector of the node. The node feature vectors of all nodes constitute the node feature matrix. Based on the physical connectivity adjacency matrix, physical edges are established between nodes that are physically connected. The attribute graph is constructed with all nodes as vertices and all physical edges as the edge set.
4. The dynamic optimization system for power emergency response plans based on the PPO algorithm as described in claim 3, characterized in that, The evaluation unit is specifically used for: For each ordered node pair consisting of two nodes connected by a physical line, the node feature vectors of the two nodes in the ordered node pair are processed by a vulnerability assessment network to output the vulnerability coefficient of the ordered node pair. For any ordered pair of nodes consisting of two nodes that are not physically connected, their vulnerability coefficient is directly assigned to zero. The vulnerability matrix is composed of all vulnerability coefficients and is asymmetric, with the main diagonal elements of the vulnerability matrix being 1. The risk level is the maximum value among all off-diagonal elements in the vulnerability matrix; For each node, the node feature vectors of the node itself and each of its neighboring nodes are linearly transformed by the state weight matrix. The node is then weighted and summed using the vulnerability coefficients between the node and its corresponding nodes in the vulnerability matrix. The summation is then performed using a nonlinear activation function to obtain the node's aggregate vector. The aggregate matrix is formed by the aggregate vectors of all nodes.
5. The dynamic optimization system for power emergency response plans based on the PPO algorithm as described in claim 4, characterized in that, The decision-making unit is specifically used for: The aggregation matrix is input into the policy network to obtain the original action log odds for each node for each action category, thus forming the original action matrix; Based on the node action capability matrix, the action categories for which the node does not have the conditions to execute the device are set to mask values at the corresponding positions in the action mask matrix; For the action category of disconnecting the segment switch, when the segment switch branch associated with the node is represented as disconnected in the running connectivity adjacency matrix, the corresponding position of the node in the action mask matrix is set to the mask value. For the action category of closing the contact switch, the corresponding position in the action mask matrix is set to a mask value when any of the following situations occur: the contact switch branch associated with the node is represented as closed in the running connectivity adjacency matrix; or the contact switch branch associated with the node is represented as open in the running connectivity adjacency matrix, and the vulnerability coefficient in any direction between the two nodes of the contact switch branch exceeds the preset safety critical threshold, the corresponding position in the action mask matrix is set to a mask value. The original action matrix and the action mask matrix are added element by element and then normalized exponentially transformed to obtain the action probability matrix. For each node, random sampling is performed according to the action probability matrix to obtain the action vector.
6. The dynamic optimization system for power emergency response plans based on the PPO algorithm as described in claim 5, characterized in that, The deduction unit is specifically used for: The action vector is subjected to consistency verification and conflict elimination to obtain a corrected action vector. The specific process includes: When two nodes on both ends of the same branch output the same topology action, the topology action shall be executed. When one end outputs a topology change action for the branch and the other end outputs a load shedding action for the node, the two control objects are different and do not interfere with each other, so they are executed in parallel. When one end outputs an action to shed overload and register emergency repair task and shed load and the other end outputs an action to maintain the status quo, the action to shed overload and register emergency repair task and shed load shall prevail. For the node in the corrected action vector that outputs the action of disconnecting the segmented switch, the mutual admittance between the nodes at both ends of the segmented switch branch associated with that node is set to zero and the self-admittance is subtracted in the node admittance matrix. For the node in the modified action vector that outputs the closed contact switch action, the mutual admittance between the nodes at both ends of the contact switch branch associated with that node is set to the negative value of the series admittance of that branch and the self admittance is added in the node admittance matrix to obtain the modified admittance matrix. For nodes that output overload cut-off and register emergency repair tasks and cut off load actions, set their active power and reactive power injection to zero; Based on the modified admittance matrix, graph connectivity analysis is performed, and the entire network is divided into several independent connected subnets. For power-depleted island subnets that do not contain power nodes, the voltage amplitude of their internal nodes is set to zero and they are not included in the power flow calculation. For powered connected subnets that contain at least one power node, one power node is selected from the subnet as the slack node, and the power flow equations are solved independently. When there is no electrically connected subnet, the power flow calculation does not meet the convergence condition, the total active power imbalance exceeds the preset threshold, or the active power injection of the power node exceeds the rated upper limit, the correction action vector is determined to be an invalid action. Otherwise, the correction action vector is deemed valid, and the node voltage magnitude vector and node voltage phasor vector after power flow calculation are output.
7. The dynamic optimization system for power emergency response plans based on the PPO algorithm as described in claim 6, characterized in that, The process by which the deduction unit calculates multi-dimensional rewards and updates the state includes: If the corrected action vector is an invalid action, the multi-dimensional reward is a preset value; The multi-dimensional rewards include a first reward, a second reward, and a third reward; If the modified action vector is a valid action, then a multi-dimensional reward is calculated. The calculation process includes: For nodes with negative injected active power, voltage amplitude within acceptable range after power flow calculation, and non-zero admittance path with the power supply node, the absolute value of the injected active power is summed to obtain the power supply recovery reward. The power supply recovery reward is then linearly scaled to obtain the first reward. The current amplitude of each branch is calculated based on the node voltage and series admittance of each branch after the power flow calculation. The current amplitude of the branch in the open state is set to zero. The deviation of the current amplitude of each branch from the thermal stability limit current is calculated and summed and the opposite number is taken to obtain the safety limit penalty reward. The safety limit penalty reward is then trimmed by interval to obtain the second reward. For nodes that output the action of cutting off overload and registering emergency repair tasks and cutting off load, the emergency repair time is calculated based on the shortest road distance and preset driving speed. The emergency repair time of all nodes that output this action is summed and the negative number is taken to obtain the operation efficiency cost reward. The operation efficiency cost reward is linearly scaled to obtain the third reward. The node voltage amplitude after power flow calculation is used as the voltage amplitude when collecting operating condition data in the next decision cycle. The injected power of nodes that output overload shedding, register emergency repair tasks and shedding load actions is kept at zero in subsequent decision cycles and set as having no equipment conditions in the node action capability matrix. For nodes that output valid topology change actions, the elements between the nodes at both ends of the corresponding branch are updated in the running connectivity adjacency matrix in the next decision cycle, and the node admittance matrix for the next decision cycle is recalculated.
8. The dynamic optimization system for power emergency response plans based on the PPO algorithm as described in claim 7, characterized in that, The update unit is specifically used for: A value network is constructed, which shares the parameters of the first fully connected layer and the second fully connected layer with the policy network. The value network also includes a value network output layer, the input of which is the output of the shared second fully connected layer, and the output of which is a multi-dimensional value prediction. When collecting trajectories, the update unit continuously executes decision loops for no more than a preset maximum number of cycles. In each decision cycle, it saves the node feature matrix, action vector, action mask matrix, multi-dimensional normalized reward, node feature matrix of the next decision cycle, and old strategy action probability matrix of the current decision cycle to the trajectory until the preset maximum number of cycles is reached or the action vector is determined to be an invalid action. When calculating the loss, the aggregation matrix of each decision cycle is recalculated based on the current state weight matrix. The global value prediction of each dimension is obtained through forward propagation of the value network. The current action probability matrix is obtained by combining the action mask matrix with the forward propagation of the policy network. For each dimension, the normalized rewards of each decision cycle are weighted and summed according to the discount factor to obtain the cumulative discount return. The mean square error between the global value prediction and the cumulative discount return for that dimension is calculated as the value loss. For each dimension, the advantage function is calculated using generalized advantage estimation based on normalized reward and global value prediction. For each node, the probability ratio of the current action probability matrix to the probability matrix of the old strategy action corresponding to the selected action category is calculated. The probability ratio is restricted to a preset cutoff interval. The probability ratios before and after the restriction are multiplied by the advantage function and the smaller value is taken. The average value is then taken over all nodes and all decision cycles, and the negative value is obtained to obtain the strategy loss for that dimension.
9. The dynamic optimization system for power emergency response plans based on the PPO algorithm as described in claim 8, characterized in that, The process of updating parameters by the update unit includes: The policy gradients of the policy loss with respect to the network parameters in three dimensions are calculated respectively to obtain the policy gradients in three dimensions; the network parameters include policy network parameters, value network parameters, and state weight matrix. With the optimization objective of minimizing the magnitude of the convex combination of multi-dimensional policy gradients, the Frank-Wolfe algorithm is used to solve for the weights of the convex combination in each dimension under constraints. The total policy gradient is obtained by weighting and summing the multi-dimensional policy gradients according to their respective convex combination weights. The total value gradient is obtained by calculating the gradients of the multi-dimensional value losses relative to the network parameters and summing them. The total policy gradient is added to the total value gradient to obtain the total update gradient. The network parameters are updated according to the total update gradient. Verification scenarios are randomly selected from historical extreme weather disaster samples. Verification scenarios do not participate in parameter updates. After each training round, the decision-making process is executed on the verification scenario with the current network parameters without updating the parameters. The normalized rewards of the three dimensions under the verification scenario are accumulated on the complete trajectory, and then summed with equal weights and averaged to obtain the verification score. When the verification score is higher than the historical best verification score, the current network parameters are saved. When the verification score no longer increases for a preset number of consecutive rounds or the number of training rounds reaches a preset maximum number of rounds, training is stopped and the saved network parameters are output as the trained policy network.
10. The dynamic optimization system for power emergency response plans based on the PPO algorithm as described in claim 9, characterized in that, The online execution module is specifically used for: Obtain real and measured power grid operation data, power grid topology data, equipment parameters, and external environment data from the distribution automation system, geographic information system, meteorological early warning platform, and emergency repair dispatch system of the actual power distribution network; The training completed policy network output by the training module is invoked, along with the fixed meteorological text encoding network, vulnerability assessment network, and state weight matrix in the training module. The real measured data is preprocessed and feature extracted in the same way as the training module to generate a real node feature matrix and attribute map, and the vulnerability matrix, risk degree and aggregation matrix are calculated. The real aggregation matrix is input into the trained policy network, and an action mask matrix is generated by combining the vulnerability matrix and the node action capability. After obtaining the action probability matrix through normalized exponential transformation, the action category with the highest probability in the action probability matrix is selected for each node to form an emergency dispatch action vector output.
Citation Information
Patent Citations
Power system transient stability control method
CN120127706A
