Transient voltage control method and system based on graph attention deep learning

By constructing a topology graph and a multi-head graph attention network, and embedding a deep learning network, the problem of inaccurate transient voltage control in existing technologies is solved, and accurate transient voltage control of the power system is achieved, ensuring the stable operation of the power system.

CN121507803APending Publication Date: 2026-02-10CHINA SOUTHERN POWER GRID COMPANY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511541072.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

In existing technologies, deep learning-based transient voltage control methods cannot fully utilize the topology and cannot accurately and timely control the transient voltage of the power system, resulting in limited controller generalization ability.

Method used

By constructing a topology graph, extracting topological electrical fusion features using a multi-head graph attention network, and embedding them into a deep learning network, the accuracy of transient voltage control is improved.

Benefits of technology

It achieves accurate transient voltage control under complex power system topologies, ensuring stable operation of the power system under conditions of high penetration of new energy sources and reduced inertia.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121507803A_ABST
    Figure CN121507803A_ABST
Patent Text Reader

Abstract

The invention discloses a transient voltage control method and system based on graph attention deep learning, and belongs to the technical field of power control. According to the method, the node feature matrix and the graph adjacency matrix are constructed, so that the topological structure graph can accurately and comprehensively represent the topological structure of the power system; constructing an initial transient voltage control agent based on the node feature matrix and the graph adjacency matrix; then, through a multi-single-head map attention network, the electrical relation which is deeply influenced by the topological structure in the power system can be dynamically and accurately represented, and the accuracy of topological electrical fusion features is improved; and then the topological electrical fusion features are embedded into a deep learning network, so that the trained transient voltage control agent can output a more accurate transient voltage control strategy based on the complex topological structure of the power grid, thereby improving the accuracy of transient voltage control and ensuring the stable operation of the power system under the complex working condition.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of power control, and particularly relates to a transient voltage control method and system based on graph attention deep learning. BACKGROUND

[0002] With the continuous expansion of the power grid scale and the large-scale operation of high-proportion new energy, the current power system moment of inertia is greatly reduced, the disturbance resistance is weakened, and the integration of dynamic loads and the retirement of traditional generators make the current power grid more susceptible to interference, thereby causing power failure. When the power grid fails, voltage fluctuation is more severe and recovery is more difficult; in extreme cases, voltage collapse may occur. The power system transient voltage stability control can effectively suppress the risk of voltage instability after failure through real-time monitoring, rapid response and accurate regulation, and can ensure the sustained and stable operation of the power system under the form of high-penetration new energy and reduced inertia level of the power grid.

[0003] Currently, the transient voltage control of the power system is usually based on pre-defined operation rules or analysis-based methods to reduce the load of the power system, thereby achieving transient voltage control of the power system. However, due to the complexity of the power grid topology structure, when the topology structure changes, the operating characteristics of the power grid will change significantly, leading to complex calculation, and making it impossible to accurately and timely control the transient voltage based on operation rules or analysis. With the development of deep learning (Deep Reinforcement Learning, DRL) algorithms in the field of power control, they are gradually applied to transient voltage control. However, the current transient voltage control based on deep learning still fails to fully utilize the topology structure and cannot distinguish the importance difference of different topological connections in the topology transformation process, resulting in limited generalization ability of the trained controller and further limiting the accuracy of transient voltage control of the power system. Therefore, there is an urgent need for a transient voltage control method and system based on graph attention deep learning to solve the defects of the prior art. SUMMARY

[0004] The application aims to provide a transient voltage control method and system based on graph attention deep learning to solve the technical problem of inaccurate transient voltage control in the prior art, by constructing a topology structure graph, embedding a deep learning network after extracting topological electrical fusion features with a multi-single-head graph attention network, and improving the accuracy of transient voltage control.

[0005] To solve the above technical problems, the embodiment of the application provides a transient voltage control method based on graph attention deep learning, comprising: acquiring operation data of a power system, constructing a node feature matrix and a graph adjacency matrix of the power system based on the operation data, and constructing a topological structure graph of the power system based on the node feature matrix and the graph adjacency matrix; modeling transient voltage control of the power system based on the node feature matrix and the graph adjacency matrix, and determining an initial transient voltage control agent of the power system; extracting features of the topological structure graph based on a preset multi-head graph attention network, and determining topological electrical fusion features of the power system; embedding the topological electrical fusion features into a preset deep learning network to construct a graph attention deep learning network, and training the initial transient voltage control agent based on the graph attention deep learning network to obtain a transient voltage control agent of the power system; acquiring real-time operation data of the power system, inputting the real-time operation data into the transient voltage control agent to obtain a transient voltage control strategy of the power system, and performing transient voltage control on the power system based on the transient voltage control strategy.

[0006] It can be understood that, compared with the prior art, the application can convert the abstract complex grid connection relationship into explicit graph structure data by constructing the node feature matrix and the graph adjacency matrix based on the operation data of the power system, so that the topological structure graph can accurately and comprehensively represent the topological structure of the power system. Then, the initial transient voltage control agent can further accurately perceive the topological change of the power system based on the node feature matrix and the graph adjacency matrix. Then, the multi-head graph attention network can dynamically and accurately represent the electrical relationship in the power system that is deeply affected by the topological structure by combining the multi-head graph attention network and the single-head graph attention network, so that the topological electrical fusion features can fuse the topological structure and the electrical relationship, improving the accuracy of the topological electrical fusion features. Then, the graph attention deep learning network can make full use of the topological structure of the power system by embedding the topological electrical fusion features into the deep learning network, so as to further distinguish the importance difference of different topological connections in the topological transformation process, so that the trained transient voltage control agent can output more accurate transient voltage control strategy based on the complex topological structure of the power system, thereby improving the accuracy of the transient voltage control and ensuring the stable operation of the power system under complex working conditions.

[0007] As a preferred scheme, the acquiring operation data of a power system, constructing a node feature matrix and a graph adjacency matrix of the power system based on the operation data, and constructing a topological structure graph of the power system based on the node feature matrix and the graph adjacency matrix, comprises: acquiring operation data of a power system, constructing a simulation model of the power system based on the operation data of the power system; extracting, based on the simulation model, a number of bus nodes in the power system, voltage measurement data of each of the bus nodes, and a connection relationship between each two of the bus nodes; constructing, based on the voltage measurement data of each of the bus nodes, a voltage measurement value time sequence of each of the bus nodes; determining, based on the voltage measurement value time sequence of each of the bus nodes, an input feature vector of each of the bus nodes, and constructing, based on the input feature vector of each of the bus nodes and in combination with the number of bus nodes, a node feature matrix; constructing, based on the connection relationship between each two of the bus nodes, a graph adjacency matrix; constructing, based on the node feature matrix, a node description of a topology graph of the power system, and constructing, based on the graph adjacency matrix, an edge of the topology graph of the power system; constructing, based on the node description and the edge of the topology graph of the power system, the topology graph of the power system.

[0008] The preferred scheme constructs a simulation model through operation data of a power system, and extracts the number of bus nodes, voltage measurement data, and connection relationship based on the simulation model, so as to comprehensively reflect the complex topology structure change of the power system. Then, the voltage measurement value time sequence that can directly reflect the transient voltage condition is constructed, the input feature vector of each bus node is formed, the node feature matrix is constructed, and the graph adjacency matrix is constructed based on the connection relationship, so as to convert the complex and isolated topology structure data and electrical data in the power system into a structured data whole. The topology graph of the power system can be integrated with the electrical information and topology information of the power system completely and accurately, thereby improving the accuracy of subsequent multi-head graph attention network feature extraction and transient voltage control intelligent agent, and improving the accuracy of transient voltage control.

[0009] As a preferred scheme, the transient voltage control modeling of the power system based on the node feature matrix and the graph adjacency matrix, and the determination of the initial transient voltage control intelligent agent of the power system, include: extracting, based on the simulation model, a power fault clearing time point in the power system, load shedding judgment data of bus nodes, and voltage amplitudes of the bus nodes, and the number of controllable load bus nodes and the load shedding amount of controllable load bus nodes; constructing, based on the node feature matrix and the graph adjacency matrix, a state space of a Markov decision process; construct an action of a Markov decision process based on the load shedding judgment data of the bus node, and construct an action space based on the action and the number of controllable load bus nodes; based on the voltage amplitude of the bus node, in combination with the power fault clearing time, calculate the voltage amplitude variation of the bus node; based on the power fault clearing time, the load shedding amount and the voltage amplitude variation, in combination with a preset weight factor and an invalid action penalty, construct a reward function of the Markov decision process; based on the state space, the action space and the reward function of the Markov decision process, model the transient voltage control of the power system to form an initial transient voltage control agent of the power system.

[0010] The preferred scheme constructs the state space through the node feature matrix and the graph adjacency matrix, so that the initial transient voltage control agent can comprehensively perceive the topology structure and operating state of the power grid; the action is constructed through the load shedding judgment data, which can convert the key load shedding operation in the transient voltage control process into the action space, so that the control strategy output by the initial transient voltage control agent is more in line with the actual working conditions and operating requirements of the power system; by fusing the power fault clearing time, the load shedding amount and the voltage amplitude variation, and introducing the invalid action penalty and the weight factor, a clear training and learning goal can be set for the initial transient voltage control agent, so that the transient voltage control can be accurately performed after the power system fault, and the accuracy of subsequent transient voltage control is improved.

[0011] As a preferred scheme, the preset multi-head graph attention network is used to extract features from the topology structure graph to determine the topological electrical fusion features of the power system, including: The preset multi-head graph attention network includes a multi-head graph attention network and a first single-head graph attention network; the multi-head graph attention network includes a plurality of second single-head graph attention networks; based on each second single-head graph attention network, in combination with the graph adjacency matrix, feature extraction is performed on the node feature matrix corresponding to the topology structure graph to obtain first topological electrical fusion features; based on the first single-head graph attention network and the graph adjacency matrix, feature extraction is performed on the first topological electrical fusion features and the graph adjacency matrix to obtain second topological electrical fusion features; perform global average pooling on the second topological electrical fusion features to obtain the topological electrical fusion features of the power system.

[0012] The preferred scheme can capture the electrical association features and the topological connection features of the busbar nodes in a plurality of second single-head graph attention networks in the multi-head graph attention network in a parallel manner to form the first topological and electrical fusion features, avoid feature extraction deviation caused by a single perspective, and then focus on global features by the first single-head graph attention network to reduce calculation redundancy, thereby further improving the accuracy of the second topological and electrical fusion features and reducing the complexity of the second topological and electrical fusion features. Then, by performing global average pooling, a compact topological and electrical fusion feature can be further generated, thereby reducing the parameter amount and the calculation complexity and improving the generalization ability of the subsequent transient voltage control agent. The calculation efficiency of the subsequent agent training process and implementation process is effectively improved, thereby further improving the accuracy, real-time performance and timeliness of the transient voltage control.

[0013] As a preferred scheme, the feature extraction of the node feature matrix corresponding to the topological structure graph based on each second single-head graph attention network in combination with the graph adjacency matrix to obtain the first topological and electrical fusion feature includes: The feature extraction of the node feature matrix corresponding to the topological structure graph based on each second single-head graph attention network in combination with the graph adjacency matrix to obtain the third topological and electrical fusion feature output by each second single-head graph attention network; The third topological and electrical fusion features output by each second single-head graph attention network are spliced to obtain the first topological and electrical fusion feature.

[0014] The preferred scheme extracts features in parallel by the plurality of second single-head graph attention networks and splices the features, can comprehensively utilize the diversified feature information extracted by different second single-head graph attention networks, fully utilize the advantages of each second single-head graph attention network in feature extraction, make the first topological and electrical fusion feature contain more rich and comprehensive power system topological and electrical information, and enhance the expression ability of the first topological and electrical fusion feature to the complex characteristics of the power system. Therefore, the accuracy of the subsequent initial transient voltage control agent training is improved, and the accuracy of the transient voltage control is further improved.

[0015] As a preferred scheme, the feature extraction of the node feature matrix corresponding to the topological structure graph based on each second single-head graph attention network in combination with the graph adjacency matrix to obtain the third topological and electrical fusion feature output by each second single-head graph attention network includes: In each second single-head graph attention network, each input feature vector in a node feature matrix corresponding to the topological structure graph is subjected to feature mapping based on a weight matrix of the second single-head graph attention network, to obtain a first feature vector of each bus node; After vector splicing operation is performed on the first feature vectors of each two bus nodes, activation operation is performed based on a preset nonlinear activation function, and in combination with an attention vector of the second single-head graph attention network, a first attention coefficient between each two bus nodes is calculated; Based on the graph adjacency matrix, neighbor nodes of each bus node are determined; Based on the neighbor nodes of each bus node, in combination with a preset normalization function, normalization operation is performed on the first attention coefficient between each two bus nodes, to obtain a first attention weight between each two bus nodes; Based on the first attention weight between each two bus nodes, in combination with the neighbor nodes and the first feature vector of each bus node, a second feature vector of each bus node is determined; Based on the second feature vector of each bus node obtained by each second single-head graph attention network, a third topological electrical fusion feature output by each second single-head graph attention network is constructed.

[0016] In this preferred solution, the input feature vector is subjected to feature mapping by the weight matrix, and then after vector splicing operation is performed on the first feature vectors of each two bus nodes, activation operation is performed based on a preset nonlinear activation function, and in combination with an attention vector of the second single-head graph attention network, a first attention coefficient between each two bus nodes is calculated. The first feature vectors are spliced first, and then unified linear transformation and activation are performed, so that the attention mechanism can fully and nonlinearly fuse the information of the bus nodes in the calculation process, thereby avoiding the expression ability defects of the traditional graph attention network, improving the calculation accuracy and precision of the first attention coefficient, and further improving the accuracy of the third topological electrical fusion feature, making the subsequent initial transient voltage control intelligent agent training process more accurate and stable, and improving the accuracy of the transient voltage control.

[0017] As a preferred solution, the feature extraction is performed on the first topological electrical fusion feature and the graph adjacency matrix based on the first single-head graph attention network and the graph adjacency matrix to obtain a second topological electrical fusion feature, including: Each second feature vector in the first topological electrical fusion feature is subjected to feature mapping based on a weight matrix of the first single-head graph attention network, to obtain a third feature vector of each bus node; After performing vector concatenation on the third feature vectors of every two bus nodes, an activation operation is performed based on a preset nonlinear activation function, and the second attention coefficient between every two bus nodes is calculated in conjunction with the attention vector of the first single-head graph attention network. Based on the neighboring nodes of each bus node, and combined with a preset normalization function, the second attention coefficient between every two bus nodes is normalized to obtain the second attention weight between every two bus nodes. Based on the second attention weight between every two bus nodes, and combined with the neighbor nodes and the third feature vector of each bus node, the fourth feature vector of each bus node is determined. Based on the fourth feature vector of each bus node, a second topological electrical fusion feature is constructed.

[0018] This preferred scheme performs feature mapping on the second feature vector using a weight matrix, then concatenates the third feature vectors of every two bus nodes, performs activation based on a preset nonlinear activation function, and calculates the second attention coefficient between every two bus nodes by combining the attention vector of the first single-head graph attention network. By concatenating the third feature vector first and then performing a unified linear transformation and activation, the attention mechanism can fully and nonlinearly integrate the information of the bus nodes during the calculation process, avoiding the expressive limitations of traditional graph attention networks. This improves the accuracy and precision of the calculation of the second attention coefficient, thereby improving the accuracy of the second topological electrical fusion feature. This makes the subsequent initial transient voltage control agent training process more accurate and stable, and improves the accuracy of transient voltage control.

[0019] As a preferred embodiment, the step of embedding the topological electrical fusion features into a preset deep learning network to construct a graph attention deep learning network; and training the initial transient voltage control agent based on the graph attention deep learning network to obtain the transient voltage control agent of the power system, includes: Flattening the topological electrical fusion features yields a one-dimensional vector of topological electrical fusion. The Q-value function of the deep learning network is modified based on the topological electrical fusion one-dimensional vector, so as to embed the topological electrical fusion one-dimensional vector into the fully connected layer of the deep learning network to obtain a graph attention deep learning network. Based on the graph attention deep learning network and combined with the preset gradient descent method, the initial transient voltage control agent is trained to obtain the transient voltage control agent of the power system.

[0020] The preferred scheme converts the multi-dimensional topological electrical fusion features into a format suitable for processing of the full connection layer by flattening the topological electrical fusion features to obtain a topological electrical fusion one-dimensional vector, and then corrects the Q value function of the deep learning network through the topological electrical fusion one-dimensional vector, realizes embedding of the topological electrical fusion one-dimensional vector into the full connection layer of the deep learning network, so that the graph attention deep learning network can fully utilize the topological structure of the power system, thereby further distinguishing the importance difference of different topological connections in the topological transformation process, so that the trained transient voltage control agent can output more accurate transient voltage control strategies based on the complex topological structure of the power grid, thereby improving the accuracy of transient voltage control and ensuring stable operation of the power system under complex working conditions.

[0021] Correspondingly, the embodiment of the application provides a transient voltage control system based on a graph attention deep learning network, comprising a topological structure graph construction module, a transient voltage control modeling module, a multi-single-head graph attention network feature extraction module, a graph attention deep learning training module and a transient voltage control module. The topological structure graph construction module is configured to obtain operation data of a power system, construct a node feature matrix and a graph adjacency matrix of the power system based on the operation data, and construct a topological structure graph of the power system based on the node feature matrix and the graph adjacency matrix. The transient voltage control modeling module is configured to model transient voltage control of the power system based on the node feature matrix and the graph adjacency matrix, and determine an initial transient voltage control agent of the power system. The multi-single-head graph attention network feature extraction module is configured to extract features of the topological structure graph based on a preset multi-single-head graph attention network, and determine topological electrical fusion features of the power system. The graph attention deep learning training module is configured to embed the topological electrical fusion features into a preset deep learning network to construct a graph attention deep learning network, and train the initial transient voltage control agent based on the graph attention deep learning network to obtain a transient voltage control agent of the power system. The transient voltage control module is configured to obtain real-time operation data of the power system, input the real-time operation data into the transient voltage control agent to obtain a transient voltage control strategy of the power system, and perform transient voltage control on the power system based on the transient voltage control strategy.

[0022] As a preferred scheme, the topological structure graph construction module comprises a topological structure graph construction unit. The topological structure diagram construction unit is configured to acquire operation data of a power system, and construct a simulation model of the power system based on the operation data of the power system; Based on the simulation model, the number of bus nodes in the power system, voltage measurement data of each bus node, and connection relationship between each two bus nodes are extracted; Based on the voltage measurement data of each bus node, a voltage measurement value time sequence of each bus node is constructed; Based on the voltage measurement value time sequence of each bus node, an input feature vector of each bus node is determined, and a node feature matrix is constructed based on the input feature vector of each bus node and the number of bus nodes; Based on the connection relationship between each two bus nodes, a graph adjacency matrix is constructed; Based on the node feature matrix, a node description of a topological structure diagram of the power system is constructed, and based on the graph adjacency matrix, an edge of the topological structure diagram of the power system is constructed; Based on the node description and the edge of the topological structure diagram of the power system, the topological structure diagram of the power system is constructed.

[0023] It can be understood that, compared with the prior art, the system constructs a node feature matrix and a graph adjacency matrix based on operation data of a power system, and then can convert an abstract complex grid connection relationship into explicit graph structure data, so that the topological structure diagram can accurately and comprehensively represent the topological structure of the power system; then an initial transient voltage control agent is constructed based on the node feature matrix and the graph adjacency matrix, so that the initial transient voltage control agent can further accurately perceive the topological change of the power system; then, through a multi-head graph attention network, the combination of the multi-head graph attention network and the single-head graph attention network can dynamically and accurately represent the electrical relationship in the power system which is deeply affected by the topological structure, so that the topological electrical fusion feature can fuse the two factors of topological structure and electrical relationship, and the accuracy of the topological electrical fusion feature is improved; then, by embedding the topological electrical fusion feature into a deep learning network, the graph attention deep learning network can make full use of the topological structure of the power system, so as to further distinguish the importance difference of different topological connections in the topological transformation process, so that the trained transient voltage control agent can output more accurate transient voltage control strategy based on the complex topological structure of the power system, thereby improving the accuracy of transient voltage control and ensuring the stable operation of the power system under complex working conditions. BRIEF DESCRIPTION OF DRAWINGS

[0024] Figure 1 A step flowchart of a transient voltage control method based on graph attention deep learning provided for an embodiment of the present application; Figure 2 A structural schematic diagram of a transient voltage control system based on a graph attention deep learning is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0025] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0026] Embodiment one To solve the technical problem of inaccurate transient voltage control in the prior art, please refer to Figure 1 , Figure 1 A step flowchart of a transient voltage control method based on a graph attention deep learning is provided for an embodiment of the present application, comprising steps S101 to S105.

[0027] Step S101: obtaining operation data of a power system, constructing a node feature matrix and a graph adjacency matrix of the power system based on the operation data, and constructing a topological structure graph of the power system based on the node feature matrix and the graph adjacency matrix.

[0028] In the embodiment, the obtaining operation data of a power system, constructing a node feature matrix and a graph adjacency matrix of the power system based on the operation data, and constructing a topological structure graph of the power system based on the node feature matrix and the graph adjacency matrix comprises: obtaining operation data of a power system, and constructing a simulation model of the power system based on the operation data of the power system; extracting the number of bus nodes in the power system, voltage measurement data of each bus node, and connection relationship between each two bus nodes based on the simulation model; constructing a voltage measurement value time sequence of each bus node based on the voltage measurement data of each bus node; determining an input feature vector of each bus node based on the voltage measurement value time sequence of each bus node, and constructing a node feature matrix based on the input feature vector of each bus node and the number of bus nodes; constructing a graph adjacency matrix based on the connection relationship between each two bus nodes; constructing a node description of the topological structure graph of the power system based on the node feature matrix, and constructing an edge of the topological structure graph of the power system based on the graph adjacency matrix; Based on the node descriptions and edges of the power system's topology graph, the power system's topology graph is constructed.

[0029] In one optional embodiment, the operating data of the power system is acquired, and then the operating data is input into power system simulation software such as MATLAB, Simulink, PowerWorld, DSP, and BPA. The power system is simulated using the power system simulation software. In the power system simulation software, the connection relationships and parameters of the generators, transformers, transmission lines, and various nodes of the power system are set, such as setting the initial power angle of the generator, terminal voltage, and power flow initialization. Fault scenarios, such as three-phase short-circuit faults, are also set to simulate power fault conditions of the power system, and finally, a simulation model of the power system is obtained. After obtaining the simulation model, the busbars in the power system are defined as busbar nodes, and the number of busbar nodes in the power system is extracted from the simulation model. The voltage measurement data for each bus node and the connection relationship between every two bus nodes are obtained; then, the voltage measurement data of the bus nodes are arranged in chronological order to obtain a time series of voltage measurement values. ;in, Indicates the first Time series of voltage measurements at each bus node; Indicates the first Each bus node Voltage measurement data at any given time; Let be the dimension of the voltage measurement time series; then, use the voltage measurement time series of each bus node as the input feature vector for each bus node; then define the dimension of the node feature matrix as . The constructed node feature matrix is ​​as follows: The connection relationships between bus nodes are either connected or not connected; a graph adjacency matrix is ​​constructed based on the connection relationships between every two bus nodes. , dimension In the graph adjacency matrix In, its elements Indicates the first The first bus node and the first The connection relationships between the bus nodes satisfy the following: ; Then, the bus nodes are used as nodes in the topology graph; the input feature vector of each bus node in the node feature matrix is ​​used as the node description of the topology graph; then, the elements of the graph adjacency matrix are used to represent the connection relationships between nodes in the topology graph, i.e., the edges of the topology graph, which represent the transmission lines between bus nodes; thus, the topology graph of the power system is constructed. .

[0030] This embodiment constructs a simulation model using power system operation data and extracts the number of bus nodes, voltage measurement data, and connection relationships from the simulation model, thereby comprehensively reflecting the complex topological changes of the power system. Then, by constructing a voltage measurement time series that directly reflects transient voltage conditions, an input feature vector is formed for each bus node, and a node feature matrix is ​​constructed. Furthermore, a graph adjacency matrix is ​​constructed through connection relationships, thus transforming the complex and isolated topological and electrical data of the power system into a structured data whole. This allows the power system's topology graph to completely and accurately integrate the electrical and topological information of the power system, thereby improving the accuracy of subsequent multi-head graph attention network feature extraction and transient voltage control agents, and ultimately enhancing the accuracy of transient voltage control.

[0031] Step S102: Based on the node feature matrix and graph adjacency matrix, perform transient voltage control modeling on the power system and determine the initial transient voltage control agent of the power system.

[0032] In this embodiment, the step of modeling transient voltage control of the power system based on the node feature matrix and graph adjacency matrix, and determining the initial transient voltage control agent of the power system, includes: Based on the simulation model, the power fault clearing time, bus node load reduction judgment data and bus node voltage amplitude, as well as the number of controllable load bus nodes and the load reduction amount of controllable load bus nodes in the power system are extracted. Based on the node feature matrix and the graph adjacency matrix, the state space of the Markov decision process is constructed. Based on the load reduction judgment data of the bus nodes, the actions of the Markov decision process are constructed, and the action space is constructed based on the actions and the number of controllable load bus nodes. Based on the voltage amplitude of the bus node and the time of power fault clearance, the change in voltage amplitude of the bus node is calculated. Based on the power fault clearing time, load reduction amount, and voltage amplitude change, and combined with preset weighting factors and penalties for invalid actions, a reward function for the Markov decision process is constructed. Based on the state space, action space, and reward function of the Markov decision process, transient voltage control modeling is performed on the power system to form the initial transient voltage control agent of the power system.

[0033] It should be noted that Markov Decision Processes (MDPs) can be represented by quintuples. Description. Among them, This indicates that the agent is at time step Environmental observation information, i.e., state and action vectors. This indicates that the agent is at time step The executable control decisions, i.e., actions; state transition probabilities. It describes the probability distribution of the environment randomly jumping to the next state under the influence of actions; reward function Defined as the expected value of the immediate reward that the system can obtain under the current state and action, reflecting the average reward of the state-action pair; discount factor. This is used to weigh the importance of current rewards against future rewards.

[0034] In one alternative embodiment, the most critical aspects of the Markov decision-making process are setting the state space, action space, and reward function; while the discount factor can be adaptively adjusted by technical personnel according to actual needs. Furthermore, the power fault clearing time, bus node load reduction judgment data, and bus node voltage amplitude, as well as the number and load reduction of controllable load bus nodes, are extracted from the simulation model; then, based on the node feature matrix... And graph adjacency matrix The state space of the constructed Markov decision process is: ;in, Indicates at time step The state at that time; the data for determining the load reduction of a bus node includes: not reducing load at the bus node and reducing the load by 20% at the bus node; therefore, the actions of the constructed Markov decision process. Defined as: ; Then, taking into account the number of controllable load bus nodes... The constructed action space is as follows: ; The voltage amplitude at the bus node is then defined as follows. The power fault clearing time is defined as Therefore, the voltage amplitude change at the bus node Calculated using the following formula Indicates bus node At time step The change in voltage amplitude; ; The load reduction of the controllable load bus node is then defined as follows: It represents the controllable load bus node. At time step The load reduction (per unit); defining weighting factors including , and Invalid actions are penalized as follows: Therefore, the reward function of a Markov decision process for: ; Based on the state space, action space, and reward function of the Markov decision process, transient voltage control modeling is performed on the power system to form the initial transient voltage control agent of the power system.

[0035] This embodiment constructs a state space using node feature matrices and graph adjacency matrices, enabling the initial transient voltage control agent to fully perceive the topology and operating status of the power grid. By constructing actions using load shedding judgment data, key load shedding operations during transient voltage control can be converted into an action space, making the control strategy output by the initial transient voltage control agent more consistent with the actual operating conditions and needs of the power system. By integrating the power fault clearing time, load shedding amount, and voltage amplitude change, and introducing penalties for invalid actions and weighting factors, a clear training and learning objective can be set for the initial transient voltage control agent, thereby enabling accurate transient voltage control after a power system fault and improving the accuracy of subsequent transient voltage control.

[0036] It's important to note that Graph Attention Network (GAT) is a graph neural network architecture that uses attention mechanisms to aggregate information about neighboring nodes in a graph. GAT networks are divided into multi-head graph attention networks and single-head graph attention networks; single-head graph attention networks include only one attention mechanism, while multi-head graph attention networks include multiple attention mechanisms, essentially comprising multiple single-head graph attention networks.

[0037] Step S103: Based on a preset multi-head graph attention network, feature extraction is performed on the topology graph to determine the topological electrical fusion features of the power system.

[0038] In this embodiment, the step of extracting features from the topology graph based on a preset multi-head graph attention network to determine the topological electrical fusion features of the power system includes: The preset multi-header image attention network includes: a multi-header image attention network and a first single-header image attention network; the multi-header image attention network includes several second single-header image attention networks; Based on each of the second single-head graph attention networks, and in conjunction with the graph adjacency matrix, feature extraction is performed on the node feature matrix corresponding to the topology graph to obtain the first topological electrical fusion feature; Based on the first single-head graph attention network and the graph adjacency matrix, feature extraction is performed on the first topological electrical fusion feature and the graph adjacency matrix to obtain the second topological electrical fusion feature; The second topology electrical fusion feature is subjected to global average pooling to obtain the topology electrical fusion feature of the power system.

[0039] This embodiment defines a multi-head graph attention network, including a multi-head graph attention network and a first single-head graph attention network, and the multi-head graph attention network includes several second single-head graph attention networks. This allows multiple second single-head graph attention networks within the multi-head graph attention network to capture the electrical association features and topological connection features of bus nodes in parallel, forming a first topological electrical fusion feature, avoiding feature extraction bias caused by a single perspective. Subsequently, the first single-head graph attention network is used for global feature focusing to reduce computational redundancy, thereby further improving the accuracy and reducing the complexity of the second topological electrical fusion feature. Then, global average pooling is performed to further generate compact topological electrical fusion features, thereby reducing the number of parameters and computational complexity, and improving the generalization ability of the subsequent transient voltage control agent. This effectively improves the computational efficiency of the subsequent agent training and implementation processes, thereby further improving the accuracy, real-time performance, and timeliness of transient voltage control.

[0040] In this embodiment, the step of extracting features from the node feature matrix corresponding to the topology graph based on each of the second single-head graph attention networks and in conjunction with the graph adjacency matrix to obtain the first topology electrical fusion feature includes: Based on each of the second single-head graph attention networks, and in conjunction with the graph adjacency matrix, feature extraction is performed on the node feature matrix corresponding to the topology graph to obtain the third topology electrical fusion feature output by each of the second single-head graph attention networks; The third topological electrical fusion feature output by each of the second single-head graph attention networks is concatenated to obtain the first topological electrical fusion feature.

[0041] This embodiment uses multiple second single-head graph attention networks to extract features in parallel and then concatenates them. This integrates the diverse feature information extracted by different second single-head graph attention networks, fully utilizes the advantages of each second single-head graph attention network in feature extraction, and makes the first topological electrical fusion feature contain richer and more comprehensive power system topology and electrical information. This enhances the ability of the first topological electrical fusion feature to express the complex characteristics of the power system, thereby improving the accuracy of subsequent initial transient voltage control agent training and thus improving the accuracy of transient voltage control.

[0042] In this embodiment, the step of extracting features from the node feature matrix corresponding to the topology graph based on each of the second single-head graph attention networks and in conjunction with the graph adjacency matrix to obtain the third topology electrical fusion feature output by each of the second single-head graph attention networks includes: In each of the second single-head graph attention networks, based on the weight matrix of the second single-head graph attention network, feature mapping is performed on each input feature vector in the node feature matrix corresponding to the topology graph to obtain the first feature vector of each of the bus nodes; After performing vector concatenation on the first feature vectors of every two bus nodes, an activation operation is performed based on a preset nonlinear activation function, and the first attention coefficient between every two bus nodes is calculated in conjunction with the attention vector of the second single-head graph attention network. Based on the graph adjacency matrix, determine the neighboring nodes of each of the bus nodes; Based on the neighboring nodes of each bus node, and combined with a preset normalization function, the first attention coefficient between every two bus nodes is normalized to obtain the first attention weight between every two bus nodes. Based on the first attention weight between every two bus nodes, and combining the neighboring nodes and the first feature vector of each bus node, the second feature vector of each bus node is determined. Based on the second feature vector of each bus node obtained by each second single-head graph attention network, a third topological electrical fusion feature is constructed from the output of each second single-head graph attention network.

[0043] This embodiment performs feature mapping on the input feature vector using a weight matrix, then concatenates the first feature vectors of every two bus nodes, performs activation based on a preset nonlinear activation function, and calculates the first attention coefficient between every two bus nodes by combining the attention vector of the second single-head graph attention network. By concatenating the first feature vectors first and then performing a unified linear transformation and activation, the attention mechanism can fully and nonlinearly fuse the information of the bus nodes during the calculation process, avoiding the expressive limitations of traditional graph attention networks. This improves the accuracy and precision of calculating the first attention coefficient, thereby improving the accuracy of the third topological electrical fusion feature. This makes the subsequent initial transient voltage control agent training process more accurate and stable, and improves the accuracy of transient voltage control.

[0044] In this embodiment, the step of extracting features from the first topological electrical fusion feature and the graph adjacency matrix based on the first single-head graph attention network and the graph adjacency matrix to obtain the second topological electrical fusion feature includes: Based on the weight matrix of the first single-head graph attention network, feature mapping is performed on each second feature vector in the first topological electrical fusion feature to obtain the third feature vector of each bus node. After performing vector concatenation on the third feature vectors of every two bus nodes, an activation operation is performed based on a preset nonlinear activation function, and the second attention coefficient between every two bus nodes is calculated in conjunction with the attention vector of the first single-head graph attention network. Based on the neighboring nodes of each bus node, and combined with a preset normalization function, the second attention coefficient between every two bus nodes is normalized to obtain the second attention weight between every two bus nodes. Based on the second attention weight between every two bus nodes, and combined with the neighbor nodes and the third feature vector of each bus node, the fourth feature vector of each bus node is determined. Based on the fourth feature vector of each bus node, a second topological electrical fusion feature is constructed.

[0045] This embodiment performs feature mapping on the second feature vector using a weight matrix, then concatenates the third feature vectors of every two bus nodes, performs activation based on a preset nonlinear activation function, and calculates the second attention coefficient between every two bus nodes by combining the attention vector of the first single-head graph attention network. By concatenating the third feature vector first and then performing a unified linear transformation and activation, the attention mechanism can fully and nonlinearly fuse the information of the bus nodes during the calculation process, avoiding the expressive limitations of traditional graph attention networks. This improves the accuracy and precision of calculating the second attention coefficient, thereby improving the accuracy of the second topological electrical fusion feature. This makes the subsequent initial transient voltage control agent training process more accurate and stable, and improves the accuracy of transient voltage control.

[0046] In one optional embodiment, the multi-headed graph attention network has two layers of graph attention networks: the first layer is a multi-headed graph attention network, and the second layer is a first single-headed graph attention network. Within the first-layer multi-headed graph attention network, several second single-headed graph attention networks are configured. Specifically, the terms "first" and "second" in "first single-headed graph attention network and second single-headed graph attention network" are used for distinction; both are essentially single-headed graph attention networks. Therefore, the working principles of the first and second single-headed graph attention networks are the same, differing only in the input data. Further, this embodiment describes the working principles of the first and second single-headed graph attention networks here; definitions are provided. Indicates the first Layered graph attention network; First, the input features are mapped to a higher-dimensional feature space, as shown in formula (1): ; in, Indicates the first Layer weight matrix; Indicates the first The bus node at the ... The input features of the layer; Indicates the first The bus node at the _ The transformed feature vector of the layer; Then for every two bus nodes and Calculate the attention coefficient between them to represent the bus nodes. For bus nodes The importance of is calculated using the formula shown in formula (2): (2); in, Indicates bus node and bus node Between the first Attention coefficient of the layer; Indicates the first The trainable attention vectors of the layer; This represents a vector concatenation operation; Represents a non-linear activation function; Indicates the first The bus node at the ... The transformed feature vector of the layer; Indicates the first The bus node at the _ The transformed feature vector of the layer; This is the weight matrix; Then, the normalization function is set to the softmax function, and the softmax function is used for every two bus nodes. and The attention coefficients between the two are normalized to obtain the attention weights, and the calculation formula is shown in formula (3): (3); in, Indicates bus node and bus node Between the second Attention weights of layers Indicates bus node and bus node Between the second Attention coefficient of the layer; Represents the first node in the node feature matrix The neighbor nodes of each bus node are combined; Then through the bus node and bus node Between the second The attention weights of the layer for the bus node In the The transformed feature vectors of the layer are weighted and summed to obtain the bus nodes. In the The output features of the layer; its implementation process is shown in formula (4): ; After obtaining the bus node In the After analyzing the output characteristics of the first layer, by statistically analyzing the output characteristics of all bus nodes, we can obtain the output characteristics of the second layer. The output features of the layer; Specifically, for the first-layer graph attention network, i.e., the multi-head graph attention network, it is also necessary to concatenate the output features of each second single-head graph attention network in the multi-head graph attention network; as shown in formula (5): ;in, This indicates the number of second single-headed image attention networks in a multi-headed image attention network; Indicates the first A second single-head image attention network; For the second-layer graph attention network, i.e. the first single-head graph attention network, it is only necessary to integrate the output features of all the bus nodes; Furthermore, based on the above formulas (1) to (6), the working process of the multi-head graph attention network in this embodiment can be obtained; in the first layer graph attention network, i.e., the multi-head graph attention network, as shown in formula (1), through the weight matrix of the second single-head graph attention network of the first layer graph attention network, each input feature vector in the node feature matrix is ​​mapped to a higher-dimensional feature space to obtain the first feature vector of each of the bus nodes; then, based on formula (2), after performing vector concatenation operation on the first feature vectors of every two bus nodes, a nonlinear activation function is used for activation operation, and combined with the attention vector of the second single-head graph attention network, the calculation is performed. Calculate the first attention coefficient between every two bus nodes; then, based on formula (3), use the softmax function to normalize the first attention coefficient to obtain the first attention weight between every two bus nodes; then, based on formula (4), substitute the first attention weight and the first feature vector into formula (4) to obtain the second feature vector of each bus node; the second feature vector of all bus nodes is the third topological electrical fusion feature output by the second single-head graph attention network; then, as shown in formula (5), perform feature splicing operation on the third topological electrical fusion feature output by each second single-head graph attention network to obtain the first topological electrical fusion feature; The working process of the multi-head graph attention network can be further expressed as shown in formula (6): ; in, Indicates the electrical integration characteristics of the first topology; This represents the first [head] in a multi-head graph attention network. The weight matrix of the second single-head graph attention network; Representing the node feature matrix Middle busbar node The input feature vector; Represents the activation function of the exponential linear unit; Indicates bus node and bus node Between, in the multi-headed graph attention network The first attention weight of the second single-head graph attention network; After obtaining the first topological electrical fusion feature, the first topological electrical fusion feature is input into the first single-head graph attention network. As shown in formula (1), each second feature vector in the first topological electrical fusion feature is mapped to obtain the third feature vector of each bus node. Then, according to formula (2), the third feature vectors of each two bus nodes are concatenated, and an activation operation is performed based on a nonlinear activation function. Combined with the attention vector of the first single-head graph attention network, the second attention coefficient between each two bus nodes is calculated. Then, according to formula (3), the second attention coefficient is normalized using the softmax function to obtain the second attention weight between each two bus nodes. Then, according to formula (4), the second attention weight and the third feature vector are substituted into formula (4) to obtain the fourth feature vector of each bus node. The fourth feature vector of all bus nodes is the second topological electrical fusion feature output by the first single-head graph attention network.

[0047] The working process of a single-head graph attention network can be further expressed as shown in formula (7): (7); in, This is a second topological electrical integration feature; Indicates bus node and bus node Between the first single-head graph attention network and the second attention weights; This represents the weight matrix of the first single-head graph attention network; Indicating the bus node in the first topological electrical integration feature The second eigenvector; After the second topology electrical fusion feature is obtained, the second topology electrical fusion feature is subjected to global average pooling to obtain the topology electrical fusion feature of the power system. The implementation process is shown in formula (8): (8); in, This is a topological electrical integration feature.

[0048] Step S104: Embed the topological electrical fusion features into a preset deep learning network to construct a graph attention deep learning network; and train the initial transient voltage control agent based on the graph attention deep learning network to obtain the transient voltage control agent of the power system.

[0049] In this embodiment, embedding the topological electrical fusion features into a preset deep learning network to construct a graph attention deep learning network; and training the initial transient voltage control agent based on the graph attention deep learning network to obtain the transient voltage control agent of the power system, includes: Flattening the topological electrical fusion features yields a one-dimensional vector of topological electrical fusion. The Q-value function of the deep learning network is modified based on the topological electrical fusion one-dimensional vector, so as to embed the topological electrical fusion one-dimensional vector into the fully connected layer of the deep learning network to obtain a graph attention deep learning network. Based on the graph attention deep learning network and combined with the preset gradient descent method, the initial transient voltage control agent is trained to obtain the transient voltage control agent of the power system.

[0050] It should be noted that the deep learning network in this embodiment is set as a DDQN network (Double Deep Q-Network), also known as the DDQN algorithm; wherein, the DDQN network includes an estimation network and a target network to evaluate the network parameters. The network is continuously updated using gradient descent. It receives the current state. As input, the output is the Q-value of all possible actions in this state, and based on these Q-values, the action to be executed is selected using a greedy strategy; the parameters of the target network... Synchronize from the evaluation network via periodic soft updates. The network receives state-action pairs. As input, where The evaluation network selects the action and outputs its Q-value to calculate the TD target value. Through fixed parameters and a delayed update mechanism, the target network maintains a relatively stable target value distribution, ensuring the convergence of the gradient descent process of the evaluation network and providing an objective evaluation of the action selected by the evaluation network.

[0051] In an optional embodiment, the deep learning network is defined as a DDQN network; for topological electrical fusion features Flattening yields a one-dimensional vector of topological electrical fusion. Subsequently, based on the topological electrical fusion one-dimensional vector... The Q-value function of the DDQN network is modified to embed the topological electrical fusion one-dimensional vector into the fully connected layer of the deep learning network, resulting in a graph attention deep learning network; the modified Q-value function is expressed as: (9); in, and Both are weight matrices; and All are weighting coefficients. For activation functions; For network parameters; For time step The corresponding state space; For time step The action; Then, based on a graph attention deep learning network and combined with a preset gradient descent method, the initial transient voltage control agent is trained to obtain the transient voltage control agent of the power system. The specific training process of the initial transient voltage control agent is as follows: The target Q value is calculated using the following formula: (10); in For state The instant reward function below; As a discount factor, ; In the state The optimal action to choose from; The Q-value is used to evaluate the optimal action of the current network in the target network. The loss function is calculated using the mean squared error, as shown in formula (11): ; in, Estimate the current Q value; B is the target Q value; B is the batch size. The gradient update process of the gradient descent method is shown in equation (12): (12); in, The learning rate is usually set to a small value; For the loss function with respect to The gradient; The initial transient voltage control agent selects and executes load control actions based on a greedy strategy, and stores experience after obtaining rewards and states from environmental feedback. Data is sampled from the memory bank, and the target Q value is calculated using the DDQN algorithm (i.e., formula (9)). The network parameters of GAT-DDQN are jointly optimized by minimizing the mean square error loss (i.e., formulas (10) and (11)) and using gradient descent (i.e., formula (12)). The target network is updated once every time step, and the exploration rate is decayed after each time step cycle. This completes the round loop. The loop continues until the initial transient voltage control agent converges, resulting in a trained transient voltage control agent.

[0052] This embodiment flattens the topological electrical fusion features to obtain a one-dimensional topological electrical fusion vector, thereby transforming the multi-dimensional topological electrical fusion features into a format suitable for processing by fully connected layers. Then, the Q-value function of the deep learning network is corrected by the one-dimensional topological electrical fusion vector, realizing the embedding of the one-dimensional topological electrical fusion vector into the fully connected layer of the deep learning network. This allows the graph attention deep learning network to make full use of the power system's topology, further distinguishing the differences in the importance of different topological connections during topology transformation. As a result, the trained transient voltage control agent can output a more accurate transient voltage control strategy based on the complex topology of the power grid, thereby improving the accuracy of transient voltage control and ensuring the stable operation of the power system under complex operating conditions.

[0053] Step S105: Obtain the real-time operating data of the power system, input the real-time operating data into the transient voltage control agent to obtain the transient voltage control strategy of the power system, and perform transient voltage control on the power system based on the transient voltage control strategy.

[0054] This embodiment constructs a node feature matrix and a graph adjacency matrix using power system operational data, thereby transforming the abstract and complex power grid connection relationships into explicit graph structure data. This allows the topology graph to accurately and comprehensively represent the power system's topology. Then, based on the node feature matrix and graph adjacency matrix, an initial transient voltage control agent is constructed, enabling it to more accurately perceive topological changes in the power system. Next, a combination of multi-head and single-head graph attention networks is used to dynamically and accurately represent electrical relationships in the power system that are heavily influenced by the topology. This allows the topology-electrical fusion feature to integrate both topological structure and electrical relationships, improving its accuracy. Finally, by embedding the topology-electrical fusion feature into a deep learning network, the graph attention deep learning network can fully utilize the power system's topology, further distinguishing the differences in importance of different topological connections during topology transformation. This allows the trained transient voltage control agent to output more accurate transient voltage control strategies based on the complex topology of the power grid, thereby improving the accuracy of transient voltage control and ensuring the stable operation of the power system under complex conditions.

[0055] Example 2 Please refer to Figure 2 , Figure 2A schematic diagram of a transient voltage control system based on graph attention deep learning provided in an embodiment of the present invention includes: a topology graph construction module 201, a transient voltage control modeling module 202, a multi-single-head graph attention network feature extraction module 203, a graph attention deep learning training module 204, and a transient voltage control module 205; The topology graph construction module 201 is used to acquire the operating data of the power system, construct the node feature matrix and graph adjacency matrix of the power system based on the operating data, and construct the topology graph of the power system based on the node feature matrix and graph adjacency matrix. The transient voltage control modeling module 202 is used to perform transient voltage control modeling on the power system based on the node feature matrix and the graph adjacency matrix, and to determine the initial transient voltage control agent of the power system. The multi-head graph attention network feature extraction module 203 is used to extract features from the topology graph based on a preset multi-head graph attention network to determine the topological electrical fusion features of the power system. The graph attention deep learning training module 204 is used to embed the topological electrical fusion features into a preset deep learning network to construct a graph attention deep learning network; and to train the initial transient voltage control agent based on the graph attention deep learning network to obtain the transient voltage control agent of the power system. The transient voltage control module 205 is used to acquire real-time operating data of the power system, input the real-time operating data into the transient voltage control agent to obtain the transient voltage control strategy of the power system, and perform transient voltage control on the power system based on the transient voltage control strategy.

[0056] In this embodiment, the topology graph construction module 201 includes: a topology graph construction unit; The topology graph construction unit is used to acquire power system operation data, construct a simulation model of the power system based on the operation data, extract the number of bus nodes, voltage measurement data of each bus node, and connection relationships between any two bus nodes based on the simulation model, construct a time series of voltage measurement values ​​for each bus node based on the voltage measurement data of each bus node, determine the input feature vector of each bus node based on the time series of voltage measurement values ​​of each bus node, construct a node feature matrix based on the input feature vector of each bus node and the number of bus nodes, construct a graph adjacency matrix based on the connection relationships between any two bus nodes, construct a node description of the power system's topology graph based on the node feature matrix, construct the edges of the power system's topology graph based on the graph adjacency matrix, and construct the power system's topology graph based on the node descriptions and edges of the power system's topology graph.

[0057] In this embodiment, the transient voltage control modeling module 202 includes: a transient voltage control modeling unit; The transient voltage control modeling unit is used to extract, based on the simulation model, the power fault clearing time, bus node load reduction judgment data, and bus node voltage amplitude, as well as the number and load reduction of controllable load bus nodes in the power system; construct the state space of the Markov decision process based on the node feature matrix and graph adjacency matrix; construct the actions of the Markov decision process based on the bus node load reduction judgment data, and construct the action space based on the actions and the number of controllable load bus nodes; calculate the change in voltage amplitude of the bus node based on the voltage amplitude of the bus node and the power fault clearing time; construct the reward function of the Markov decision process based on the power fault clearing time, load reduction, and voltage amplitude change, combined with a preset weighting factor and invalid action penalty; and perform transient voltage control modeling on the power system based on the state space, action space, and reward function of the Markov decision process to form the initial transient voltage control agent of the power system.

[0058] In this embodiment, the multi-head image attention network feature extraction module 203 includes: a multi-head image attention network feature extraction unit; In the multi-head graph attention network feature extraction unit, the preset multi-head graph attention network includes: a multi-head graph attention network and a first single-head graph attention network; the multi-head graph attention network includes several second single-head graph attention networks; the multi-head graph attention network feature extraction unit is used to extract features from the node feature matrix corresponding to the topology graph based on each second single-head graph attention network and in combination with the graph adjacency matrix to obtain a first topology electrical fusion feature; based on the first single-head graph attention network and the graph adjacency matrix, to extract features from the first topology electrical fusion feature and the graph adjacency matrix to obtain a second topology electrical fusion feature; and to perform global average pooling on the second topology electrical fusion feature to obtain the topology electrical fusion feature of the power system.

[0059] In this embodiment, the multi-head graph attention network feature extraction unit includes a multi-head graph attention network feature extraction subunit. The multi-head graph attention network feature extraction subunit is used to extract features from the node feature matrix corresponding to the topology graph based on each second single-head graph attention network and in combination with the graph adjacency matrix, to obtain the third topology electrical fusion feature output by each second single-head graph attention network; and to concatenate the third topology electrical fusion features output by each second single-head graph attention network to obtain the first topology electrical fusion feature.

[0060] In this embodiment, the multi-head graph attention network feature extraction subunit includes: a third topology electrical fusion feature extraction component; the third topology electrical fusion feature extraction component is used to perform feature mapping on each input feature vector in the node feature matrix corresponding to the topology graph in each second single-head graph attention network based on the weight matrix of the second single-head graph attention network, to obtain a first feature vector for each bus node; after performing vector concatenation on the first feature vectors of every two bus nodes, an activation operation is performed based on a preset nonlinear activation function, and combined with the attention vector of the second single-head graph attention network, a first attention between every two bus nodes is calculated. Force coefficients; based on the graph adjacency matrix, determine the neighboring nodes of each bus node; based on the neighboring nodes of each bus node, and combined with a preset normalization function, normalize the first attention coefficient between every two bus nodes to obtain the first attention weight between every two bus nodes; based on the first attention weight between every two bus nodes, and combined with the neighboring nodes and the first feature vector of each bus node, determine the second feature vector of each bus node; based on the second feature vector of each bus node obtained by each second single-head graph attention network, construct the third topology electrical fusion feature output by each second single-head graph attention network.

[0061] In this embodiment, the multi-head graph attention network feature extraction unit includes: a single-head graph attention network feature extraction subunit; the single-head graph attention network feature extraction subunit is used to perform feature mapping on each second feature vector in the first topology electrical fusion feature based on the weight matrix of the first single-head graph attention network to obtain a third feature vector of each bus node; after performing vector concatenation on the third feature vectors of every two bus nodes, an activation operation is performed based on a preset nonlinear activation function, and combined with the attention vector of the first single-head graph attention network, a second attention coefficient between every two bus nodes is calculated; based on the neighbor nodes of each bus node, combined with a preset normalization function, a normalization operation is performed on the second attention coefficient between every two bus nodes to obtain a second attention weight between every two bus nodes; based on the second attention weight between every two bus nodes, combined with the neighbor nodes and the third feature vector of each bus node, a fourth feature vector of each bus node is determined; based on the fourth feature vector of each bus node, a second topology electrical fusion feature is constructed.

[0062] In this embodiment, the graph attention deep learning training module 204 includes: a graph attention deep learning training unit; the graph attention deep learning training unit is used to flatten the topological electrical fusion features to obtain a one-dimensional topological electrical fusion vector; based on the one-dimensional topological electrical fusion vector, the Q-value function of the deep learning network is modified to embed the one-dimensional topological electrical fusion vector into the fully connected layer of the deep learning network to obtain a graph attention deep learning network; based on the graph attention deep learning network, combined with a preset gradient descent method, the initial transient voltage control agent is trained to obtain the transient voltage control agent of the power system.

[0063] This embodiment constructs a node feature matrix and a graph adjacency matrix using power system operational data, thereby transforming the abstract and complex power grid connection relationships into explicit graph structure data. This allows the topology graph to accurately and comprehensively represent the power system's topology. Then, based on the node feature matrix and graph adjacency matrix, an initial transient voltage control agent is constructed, enabling it to more accurately perceive topological changes in the power system. Next, a combination of multi-head and single-head graph attention networks is used to dynamically and accurately represent electrical relationships in the power system that are heavily influenced by the topology. This allows the topology-electrical fusion feature to integrate both topological structure and electrical relationships, improving its accuracy. Finally, by embedding the topology-electrical fusion feature into a deep learning network, the graph attention deep learning network can fully utilize the power system's topology, further distinguishing the differences in importance of different topological connections during topology transformation. This allows the trained transient voltage control agent to output more accurate transient voltage control strategies based on the complex topology of the power grid, thereby improving the accuracy of transient voltage control and ensuring the stable operation of the power system under complex conditions.

[0064] In summary, this invention constructs a node feature matrix and a graph adjacency matrix using power system operational data, thereby transforming the abstract and complex power grid connection relationships into explicit graph structure data. This allows the topology graph to accurately and comprehensively represent the power system's topology. Subsequently, an initial transient voltage control agent is constructed based on the node feature matrix and graph adjacency matrix, enabling the agent to more accurately perceive topological changes in the power system. Then, a combination of multi-head and single-head graph attention networks dynamically and accurately represents electrical relationships in the power system that are heavily influenced by the topology. This allows the topology-electrical fusion feature to integrate both topological structure and electrical relationships, improving its accuracy. Finally, by embedding the topology-electrical fusion feature into a deep learning network, the graph attention deep learning network can fully utilize the power system's topology, further distinguishing the differences in importance of different topological connections during topology transformation. This allows the trained transient voltage control agent to output more accurate transient voltage control strategies based on the complex topology of the power grid, thereby improving the accuracy of transient voltage control and ensuring the stable operation of the power system under complex conditions.

[0065] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A transient voltage control method based on graph attention deep learning, characterized in that, include: Obtain the operation data of the power system, and construct the node feature matrix and graph adjacency matrix of the power system based on the operation data; The topology of the power system is constructed based on the node feature matrix and the graph adjacency matrix. Based on the node feature matrix and graph adjacency matrix, transient voltage control modeling is performed on the power system to determine the initial transient voltage control agent of the power system; Based on a preset multi-head graph attention network, feature extraction is performed on the topology graph to determine the topological electrical fusion features of the power system; The topological electrical fusion features are embedded into a preset deep learning network to construct a graph attention deep learning network; and the initial transient voltage control agent is trained based on the graph attention deep learning network to obtain the transient voltage control agent of the power system. The real-time operating data of the power system is acquired, and the real-time operating data is input into the transient voltage control agent to obtain the transient voltage control strategy of the power system. The transient voltage control of the power system is then performed based on the transient voltage control strategy.

2. The transient voltage control method based on graph attention deep learning as described in claim 1, characterized in that, The process involves acquiring the operational data of the power system and constructing a node feature matrix and a graph adjacency matrix of the power system based on the operational data. The topology diagram of the power system is constructed based on the node feature matrix and the graph adjacency matrix, including: Obtain the operating data of the power system, and construct a simulation model of the power system based on the operating data; Based on the simulation model, the number of bus nodes in the power system, the voltage measurement data of each bus node, and the connection relationship between every two bus nodes are extracted. Based on the voltage measurement data of each bus node, a time series of voltage measurement values ​​for each bus node is constructed; Based on the time series of voltage measurements for each bus node, an input feature vector for each bus node is determined; based on the input feature vector of each bus node and the number of bus nodes, a node feature matrix is ​​constructed. Based on the connection relationship between every two bus nodes, a graph adjacency matrix is ​​constructed. Based on the node feature matrix, a node description of the topology graph of the power system is constructed; based on the graph adjacency matrix, the edges of the topology graph of the power system are constructed. Based on the node descriptions and edges of the power system's topology graph, the power system's topology graph is constructed.

3. The transient voltage control method based on graph attention deep learning as described in claim 2, characterized in that, The process of modeling transient voltage control of the power system based on the node feature matrix and graph adjacency matrix, and determining the initial transient voltage control agent of the power system, includes: Based on the simulation model, the power fault clearing time, bus node load reduction judgment data and bus node voltage amplitude, as well as the number of controllable load bus nodes and the load reduction amount of controllable load bus nodes in the power system are extracted. Based on the node feature matrix and the graph adjacency matrix, the state space of the Markov decision process is constructed. Based on the load reduction judgment data of the bus nodes, the actions of the Markov decision process are constructed, and the action space is constructed based on the actions and the number of controllable load bus nodes. Based on the voltage amplitude of the bus node and the time of power fault clearance, the change in voltage amplitude of the bus node is calculated. Based on the power fault clearing time, load reduction amount, and voltage amplitude change, and combined with preset weighting factors and penalties for invalid actions, a reward function for the Markov decision process is constructed. Based on the state space, action space, and reward function of the Markov decision process, transient voltage control modeling is performed on the power system to form the initial transient voltage control agent of the power system.

4. The transient voltage control method based on graph attention deep learning as described in claim 2, characterized in that, The step of extracting features from the topology graph based on a preset multi-head graph attention network to determine the topological electrical fusion features of the power system includes: The preset multi-header image attention network includes: a multi-header image attention network and a first single-header image attention network; the multi-header image attention network includes several second single-header image attention networks; Based on each of the second single-head graph attention networks, and in conjunction with the graph adjacency matrix, feature extraction is performed on the node feature matrix corresponding to the topology graph to obtain the first topological electrical fusion feature; Based on the first single-head graph attention network and the graph adjacency matrix, feature extraction is performed on the first topological electrical fusion feature and the graph adjacency matrix to obtain the second topological electrical fusion feature; The second topology electrical fusion feature is subjected to global average pooling to obtain the topology electrical fusion feature of the power system.

5. The transient voltage control method based on graph attention deep learning as described in claim 4, characterized in that, The first topological electrical fusion feature is obtained by extracting features from the node feature matrix corresponding to the topological graph based on each of the second single-head graph attention networks and in conjunction with the graph adjacency matrix, including: Based on each of the second single-head graph attention networks, and in conjunction with the graph adjacency matrix, feature extraction is performed on the node feature matrix corresponding to the topology graph to obtain the third topology electrical fusion feature output by each of the second single-head graph attention networks; The third topological electrical fusion feature output by each of the second single-head graph attention networks is concatenated to obtain the first topological electrical fusion feature.

6. The transient voltage control method based on graph attention deep learning as described in claim 5, characterized in that, Based on each of the second single-head graph attention networks, and in conjunction with the graph adjacency matrix, feature extraction is performed on the node feature matrix corresponding to the topology graph to obtain the third topological electrical fusion feature output by each of the second single-head graph attention networks, including: In each of the second single-head graph attention networks, based on the weight matrix of the second single-head graph attention network, feature mapping is performed on each input feature vector in the node feature matrix corresponding to the topology graph to obtain the first feature vector of each of the bus nodes; After performing vector concatenation on the first feature vectors of every two bus nodes, an activation operation is performed based on a preset nonlinear activation function, and the first attention coefficient between every two bus nodes is calculated in conjunction with the attention vector of the second single-head graph attention network. Based on the graph adjacency matrix, determine the neighboring nodes of each of the bus nodes; Based on the neighboring nodes of each bus node, and combined with a preset normalization function, the first attention coefficient between every two bus nodes is normalized to obtain the first attention weight between every two bus nodes. Based on the first attention weight between every two bus nodes, and combining the neighboring nodes and the first feature vector of each bus node, the second feature vector of each bus node is determined. Based on the second feature vector of each bus node obtained by each second single-head graph attention network, a third topological electrical fusion feature is constructed from the output of each second single-head graph attention network.

7. The transient voltage control method based on graph attention deep learning as described in claim 6, characterized in that, The step of extracting features from the first topological electrical fusion feature and the graph adjacency matrix based on the first single-head graph attention network and the graph adjacency matrix to obtain the second topological electrical fusion feature includes: Based on the weight matrix of the first single-head graph attention network, feature mapping is performed on each second feature vector in the first topological electrical fusion feature to obtain the third feature vector of each bus node. After performing vector concatenation on the third feature vectors of every two bus nodes, an activation operation is performed based on a preset nonlinear activation function, and the second attention coefficient between every two bus nodes is calculated in conjunction with the attention vector of the first single-head graph attention network. Based on the neighboring nodes of each bus node, and combined with a preset normalization function, the second attention coefficient between every two bus nodes is normalized to obtain the second attention weight between every two bus nodes. Based on the second attention weight between every two bus nodes, and combined with the neighbor nodes and the third feature vector of each bus node, the fourth feature vector of each bus node is determined. Based on the fourth feature vector of each bus node, a second topological electrical fusion feature is constructed.

8. The transient voltage control method based on graph attention deep learning as described in claim 1, characterized in that, The step involves embedding the topological electrical fusion features into a preset deep learning network to construct a graph attention deep learning network; and training the initial transient voltage control agent based on the graph attention deep learning network to obtain the transient voltage control agent of the power system, including: Flattening the topological electrical fusion features yields a one-dimensional vector of topological electrical fusion. The Q-value function of the deep learning network is modified based on the topological electrical fusion one-dimensional vector, so as to embed the topological electrical fusion one-dimensional vector into the fully connected layer of the deep learning network to obtain a graph attention deep learning network. Based on the graph attention deep learning network and combined with the preset gradient descent method, the initial transient voltage control agent is trained to obtain the transient voltage control agent of the power system.

9. A transient voltage control system based on graph attention deep learning, characterized in that, include: The system includes a topology graph construction module, a transient voltage control modeling module, a multi-head graph attention network feature extraction module, a graph attention deep learning training module, and a transient voltage control module. The topology graph construction module is used to acquire the operating data of the power system, construct the node feature matrix and graph adjacency matrix of the power system based on the operating data, and construct the topology graph of the power system based on the node feature matrix and graph adjacency matrix. The transient voltage control modeling module is used to perform transient voltage control modeling on the power system based on the node feature matrix and the graph adjacency matrix, and to determine the initial transient voltage control agent of the power system. The multi-head graph attention network feature extraction module is used to extract features from the topology graph based on a preset multi-head graph attention network to determine the topological electrical fusion features of the power system. The graph attention deep learning training module is used to embed the topological electrical fusion features into a preset deep learning network to construct a graph attention deep learning network; and to train the initial transient voltage control agent based on the graph attention deep learning network to obtain the transient voltage control agent of the power system. The transient voltage control module is used to acquire real-time operating data of the power system, input the real-time operating data into the transient voltage control agent to obtain the transient voltage control strategy of the power system, and perform transient voltage control on the power system based on the transient voltage control strategy.

10. A transient voltage control system based on graph attention deep learning as described in claim 9, characterized in that, The topology graph construction module includes: a topology graph construction unit; The topology diagram construction unit is used to acquire the operating data of the power system and, based on the operating data, construct a simulation model of the power system. Based on the simulation model, the number of bus nodes in the power system, the voltage measurement data of each bus node, and the connection relationship between every two bus nodes are extracted. Based on the voltage measurement data of each bus node, a time series of voltage measurement values ​​for each bus node is constructed; Based on the time series of voltage measurements for each bus node, an input feature vector for each bus node is determined; based on the input feature vector of each bus node and the number of bus nodes, a node feature matrix is ​​constructed. Based on the connection relationship between every two bus nodes, a graph adjacency matrix is ​​constructed. Based on the node feature matrix, a node description of the topology graph of the power system is constructed; based on the graph adjacency matrix, the edges of the topology graph of the power system are constructed. Based on the node descriptions and edges of the power system's topology graph, the power system's topology graph is constructed.