Multi-agent real-time optimal power flow optimization method of fusion graph neural network

By incorporating a multi-agent real-time optimal power flow optimization method that integrates graph neural networks, and utilizing a spatial feature extraction model and multi-agent parallel decision-making, the problem of low power system control efficiency in single-agent schemes is solved, and grid control with rapid response under high renewable energy penetration is realized.

CN121965562APending Publication Date: 2026-05-01EAST CHINA BRANCH OF STATE GRID CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511793136.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing single-agent deep reinforcement learning schemes have low control efficiency in power systems with high renewable energy penetration rates, and cannot respond quickly to second-level power fluctuations, resulting in extended control response cycles and failing to meet practical engineering needs.

Method used

A multi-agent real-time optimal power flow optimization method that integrates graph neural networks is adopted. The spatial feature extraction model accurately captures the topological relationships and features of power grid nodes, and multiple independent instruction generation models are used to realize parallel decision-making by multiple agents, replacing the centralized serial processing mode of single agents.

Benefits of technology

It significantly reduces the state space dimension and number of parameters of a single model, shortens the response cycle of instruction calculation and output, can quickly adapt to the dynamic scheduling needs under high renewable energy penetration, and improves grid control efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121965562A_ABST
    Figure CN121965562A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-agent real-time optimal power flow optimization method of a fusion graph neural network. The method comprises the steps that a power grid topological graph of a power system, equipment parameters of all power equipment, bus parameters of all buses and line parameters of all transmission lines are obtained, and each bus and the power equipment connected with the bus form a power grid node; inputting the data into a graph neural network model for spatial feature extraction, and generating a plurality of node embedding vectors representing node connection relationships and own features; dividing all the node embedding vectors into a plurality of node vector sets, wherein each vector set corresponds to a group of power equipment in the same area; and inputting each node vector set into different agents based on reinforcement learning training, and accurately outputting a control instruction of the corresponding power equipment by an instruction generation model in each agent, so as to realize power flow optimization control of the power system based on artificial intelligence, and significantly improve the control efficiency of the power system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system optimization control technology, and in particular to a multi-agent real-time optimal power flow optimization method that integrates graph neural networks. Background Technology

[0002] Currently, the core requirement for solving the Optimal Power Flow (OPF) problem in power systems is to achieve efficient power system control, especially in scenarios with high renewable energy penetration, where second-level power fluctuations place stringent demands on control response speed. Among existing mainstream solutions, single-agent deep reinforcement learning is one of the core technical approaches, but this type of solution has significant technical bottlenecks and is difficult to meet practical engineering needs.

[0003] This type of scheme treats the large-scale power system as a single controlled object. When making decisions, a single intelligent agent issues control commands to each power device in the system to perform control actions such as power adjustment. This results in the agent needing to process the entire network's state space, which can have thousands of dimensions, and the corresponding policy network needs to contain tens or even hundreds of thousands of parameters. The massive number of parameters causes the model's processing complexity to increase exponentially, severely impacting the control efficiency of the power system.

[0004] Meanwhile, in the single-agent centralized decision-making mode, the control commands for all power equipment must be generated through a single model in the agent. The serial processing of agent command calculation and output further prolongs the control response cycle of the power system, making it unable to cope with the dynamic scheduling needs under high renewable energy penetration, ultimately leading to low control efficiency of the power system. Summary of the Invention

[0005] In view of this, this application provides a multi-agent real-time optimal power flow optimization method that integrates graph neural networks, with the main purpose of solving the technical problem of low control efficiency of power systems.

[0006] According to a first aspect of the present invention, a multi-agent real-time optimal power flow optimization method incorporating graph neural networks is provided, the method comprising: Obtain the power grid topology diagram of the power system, the equipment parameters of each power device included in the power system, the bus parameters of each bus and the line parameters of each transmission line, wherein each bus and the power device connected to the bus constitute a power grid node; The power grid topology, equipment parameters, bus parameters, and line parameters are input into a pre-trained spatial feature extraction model to extract spatial features of the power system, resulting in multiple node embedding vectors. Each node embedding vector is used to characterize the connection relationship between a power grid node and other power grid nodes, as well as the node features of the power grid node. All the node embedding vectors are divided into multiple node vector sets, wherein each node vector set corresponds to the power equipment contained in a set of related power grid nodes; Each node vector set is input into a different pre-trained instruction generation model, and the instruction generation model outputs control instructions for each power device corresponding to the node vector set.

[0007] In an optional embodiment, the power grid topology is pre-divided into multiple power grid topology subgraphs; the step of dividing all the node embedding vectors into multiple node vector sets includes: for each power grid topology subgraph, dividing the node embedding vectors of all the power grid nodes contained in the power grid topology subgraph into node vector sets, thereby obtaining the node vector set corresponding to each power grid topology subgraph.

[0008] In an optional embodiment, the power equipment includes a power generation device; the method further includes: determining the power generation device included in the power grid topology subgraph corresponding to the instruction generation model, and sending a control instruction corresponding to the power generation device to the power generation device to control the power generation device to adjust the power generation power.

[0009] In an optional embodiment, the instruction generation model is an actor network-critic network architecture model; the instruction generation model includes a pre-trained actor network model and a critic network model; the training method of the instruction generation model includes: inputting the node embedding vectors corresponding to the power system into the actor network model, causing the actor network model to output control instructions for the power equipment in the power system, and determining the control score of the control instructions for the power system based on whether the control instructions can keep the power flow within a preset safety limit; the critic network model adjusts the model parameters of the actor network model based on the control score of the control instructions using a near-end policy optimization algorithm to improve the control effect of the control instructions output by the actor network model on the power system, thereby obtaining the trained actor network model; the step of inputting each node vector set into different pre-trained instruction generation models, and having the instruction generation models output control instructions for each power equipment corresponding to the node vector sets, includes: inputting the node vector sets of each power grid topology subgraph into the actor network models of different instruction generation models, and having the actor network models output control instructions for the power equipment in the power grid topology subgraph.

[0010] In an optional embodiment, determining the control score of the power system based on whether the control command can keep the power flow within a preset safety limit includes: determining the power flow state of the power system after the power equipment executes the control command based on a simulation environment; assigning a preset reward score to the control score when the power flow state is that all power flow parameters of the power system are within the preset safety limit; and assigning a preset penalty score to the control score when the power flow state is that the power system experiences a power flow out of bounds, wherein the penalty score is a negative value.

[0011] In an optional embodiment, the power equipment includes a wind turbine, a thermal power generator, and a photovoltaic power generation device; the grid node where the wind turbine is located, the grid node where the thermal power generator is located, and the grid node where the photovoltaic power generation device is located are divided into different grid topology subgraphs.

[0012] In an optional embodiment, the training method of the spatial feature extraction model includes: acquiring multiple training datasets, each training dataset including a power grid topology map of a power system sample, equipment parameters, bus parameters, line parameters of the power system sample, and node embedding vectors of each power grid node corresponding to the power system sample; using the power grid topology map, equipment parameters, bus parameters, and line parameters in each training dataset as model input data, and using the node embedding vectors in each training dataset as labels, iteratively training the graph neural network model to obtain the spatial feature extraction model.

[0013] In an optional embodiment, the number of the power grid topology subgraphs is the same as the number of the instruction generation models; the power grid topology subgraphs correspond one-to-one with the instruction generation models.

[0014] In an optional embodiment, each of the instruction generation models is configured in a different computer device acting as an intelligent agent.

[0015] In an optional embodiment, the equipment parameters include one or more of power generation, power generation unit operating cost, and output voltage amplitude; the bus parameters include one or more of bus voltage and bus load; and the line parameters include one or more of line admittance and capacity limit.

[0016] This invention provides a multi-agent real-time optimal power flow optimization method that integrates graph neural networks. It relies on a spatial feature extraction model to accurately capture the topological relationships and features of power grid nodes, and uses multiple independent instruction generation models to achieve parallel decision-making by multiple agents, replacing the centralized serial processing mode of a single agent. This method can significantly reduce the state space dimension and number of parameters of a single model, avoid computational redundancy caused by high-dimensional data across the entire network, and significantly shorten the overall response cycle of instruction calculation and output. It can quickly perform dynamic scheduling in scenarios with second-level power fluctuations in high renewable energy penetration, breaking through the bottleneck of existing technologies at the decision architecture level and effectively solving the problem of low power grid control efficiency.

[0017] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings: Figure 1 The diagram illustrates a flowchart of a multi-agent real-time optimal power flow optimization method that integrates graph neural networks, according to an embodiment of the present invention. Figure 2 A schematic diagram of a power grid topology provided by an embodiment of the present invention is shown; Figure 3 The diagram shows a schematic representation of a multi-agent real-time optimal power flow optimization system that incorporates graph neural networks, according to an embodiment of the present invention. Detailed Implementation

[0019] The present invention will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the present application can be combined with each other.

[0020] Currently, the core requirement for solving the optimal power flow problem in power systems is to achieve efficient real-time control, especially in scenarios with high renewable energy penetration, where second-level power fluctuations place stringent demands on control response speed. Among existing mainstream solutions, single-agent deep reinforcement learning is one of the core technical routes; however, this approach suffers from significant technical bottlenecks and struggles to meet practical engineering needs. This type of solution treats the entire power system as a single control object, requiring the agent to process the complete state space of the entire network, which can have thousands of dimensions, corresponding to policy networks containing tens or even hundreds of thousands of parameters. This massive parameter scale not only exponentially increases model processing complexity, severely impacting power system control efficiency, but also, in the single-agent centralized decision-making model, all control commands for power equipment must be generated through a single model. This serial processing of command calculation and output further prolongs the control response cycle, making it unsuitable for the dynamic scheduling demands of high renewable energy penetration, ultimately leading to low power system control efficiency.

[0021] In one embodiment, such as Figure 1 As shown, a multi-agent real-time optimal power flow optimization method integrating graph neural networks is provided. Taking the application of this method to power flow control in a power system using computer equipment as an example, the method includes the following steps: 101. Obtain the power grid topology diagram of the power system, the equipment parameters of each power device included in the power system, the bus parameters of each bus and the line parameters of each transmission line, wherein each bus and the power device connected to the bus constitute a power grid node.

[0022] Here, the power grid topology diagram uses graphical elements such as nodes and branches to visually represent the connection relationships and layout structure of elements such as buses, generators, and lines, reflecting a schematic diagram of the physical connection form of the power grid. This diagram can record all buses, transmission lines, and power equipment such as new energy power generation equipment and thermal power generators in the power system, fully displaying the topological structure and spatial characteristics of the power system. Each bus and the power equipment connected to it constitutes a grid node, and each node can be labeled with its or the bus's number. Furthermore, transmission lines are used to connect the various grid nodes to form a complete power grid topology diagram.

[0023] In practical operation, multiple sub-graphs of the power grid topology of the power system to be optimized and controlled can be obtained, along with the equipment parameters of each power device, the bus parameters of each bus, and the line parameters of each transmission line. Here, the equipment parameters of the power devices can include parameters such as power generation, operating cost of the power generation unit, and output voltage amplitude; the bus parameters can include parameters such as bus voltage and bus load; and the line parameters can include parameters such as line admittance and capacity limit, to reflect the actual operating conditions of the power devices, buses, and transmission lines.

[0024] 102. Input the power grid topology, the equipment parameters, the bus parameters, and the line parameters into a pre-trained spatial feature extraction model to extract spatial features of the power system and obtain multiple node embedding vectors. Each node embedding vector is used to characterize the connection relationship between a power grid node and other power grid nodes, as well as the node features of the power grid node.

[0025] Here, the spatial feature extraction model can be a pre-trained Graph Neural Network (GNN), a deep learning model adapted to graph-structured data that can mine the correlation features between nodes and edges. In power systems, it can transform the power grid topology into node embedding vectors, accurately representing node connectivity and operational characteristics, providing high-quality feature input for subsequent multi-agent parallel decision-making, and improving the accuracy and efficiency of control command generation. Here, equipment parameters and bus parameters can be used as node features, and line parameters can be used as edge features, to extract spatial features through the spatial feature extraction model.

[0026] Furthermore, the spatial feature extraction model can be based on the connection relationships of power grid nodes in the power grid topology graph. It treats the power grid nodes, consisting of buses and the power equipment connecting them, as nodes in the graph structure, and transmission lines as edges. By combining power equipment parameters, bus parameters, and transmission line parameters, and aggregating the neighbor node association information and its own parameter features, the model mines the spatial location association attributes of power grid nodes in the global topology, obtaining a node embedding vector for each power grid node. This ensures that each node embedding vector accurately represents the direct or indirect connection strength and topological association paths between the corresponding power grid node and other power grid nodes, while also fully preserving the node's own parameter characteristics and node features related to its operating state, providing effective feature support for the generation of subsequent control commands.

[0027] Specifically, the spatial feature extraction model can employ an improved GraphSAGE model. Based on the power grid topology, equipment parameters, bus parameters, and line parameters, a graph structure for power grid modeling is constructed. This graph structure is then used to aggregate neighborhood information through five hidden layers (64 neurons per layer) to generate a node embedding vector for each power grid node, thereby capturing the spatial relationships within the power grid topology. The graph structure... , among which, nodes For the busbar, the edge It is a power transmission line.

[0028] Furthermore, the training method for the spatial feature extraction model includes: first, acquiring multiple training datasets, each of which includes a power grid topology map of a power system sample, equipment parameters, bus parameters, line parameters of the power system sample, and node embedding vectors for each power grid node corresponding to the power system sample. The power system sample can be a historical power system.

[0029] Specifically, multiple training datasets can be constructed first. Each training dataset contains complete power system sample information, namely, the power grid topology map corresponding to the sample, the equipment parameters of various power equipment, the bus parameters of each bus, the line parameters of each transmission line, and the real node embedding vector corresponding to each power grid node in the sample. Here, the node embedding vector is used as the training label, which needs to accurately represent the connection relationship between the corresponding power grid node and other nodes, as well as its own node characteristics.

[0030] Then, the power grid topology, equipment parameters, bus parameters, and line parameters in each training dataset are used as model input data, and the node embedding vectors in each training dataset are used as labels to iteratively train the graph neural network model to obtain the spatial feature extraction model.

[0031] Specifically, during model training, the power grid topology, equipment parameters, bus parameters, and line parameters from each training dataset can be used as input data and synchronously fed into the initial graph neural network model. Simultaneously, the corresponding node embedding vectors are used as supervisory labels, and supervised learning is employed for iterative training. During training, a loss function is constructed based on the error between the predicted node embedding vectors output by the model and the true labels. The model's weight parameters are continuously updated using the backpropagation algorithm to optimize the model's feature extraction accuracy. This training process is repeated until the loss function converges below a preset threshold, and the model's feature extraction error on the validation set meets preset requirements. At this point, iterative training stops, resulting in a graph neural network model capable of accurately extracting the spatial correlation features and self-features of power grid nodes, serving as the spatial feature extraction model. Here, all node embedding vectors can represent the current state of the power system.

[0032] 103. Divide all the node embedding vectors into multiple node vector sets, wherein each node vector set corresponds to a set of power equipment contained in a group of interconnected power grid nodes.

[0033] Furthermore, the power grid topology diagram can be pre-divided into multiple power grid topology sub-diagrams, as an example. Figure 2 The power grid topology diagram is divided into three sub-graphs: the first sub-graph, the second sub-graph, and the third sub-graph. Buses in different sub-graphs can exchange power through tie lines. Furthermore, the number of sub-graphs can be determined based on actual conditions and is not limited here.

[0034] Specifically, for each power grid topology subgraph, the node embedding vectors of all the power grid nodes contained in the power grid topology subgraph can be divided into a node vector set, thereby obtaining the node vector set corresponding to each power grid topology subgraph.

[0035] Here, the power equipment in the power system can include power generation equipment such as wind turbines, thermal power generators, and photovoltaic power generation equipment. When dividing the power grid topology, the power grid node where the wind turbine is located can be divided into a power grid topology subgraph; the power grid node where the thermal power generator is located can be divided into a power grid topology subgraph; and the power grid node where the photovoltaic power generation equipment is located can be divided into a power grid topology subgraph, thus obtaining a power grid topology subgraph dominated by different energy forms.

[0036] 104. Input each of the node vector sets into different pre-trained instruction generation models, and have the instruction generation models output control instructions for each power device corresponding to the node vector set.

[0037] Specifically, for each node vector set obtained after partitioning, it is input into an independent pre-trained instruction generation model. This instruction generation model is trained using an improved hierarchical multi-agent reinforcement learning framework based on the classic reinforcement learning algorithm MAPPO (Multi-Agent PPO). It is deeply adapted to the needs of power system zonal control. Its core is to accurately identify the control requirements of each power device within the corresponding power grid sub-graph by learning the connection relationships between power grid nodes, the node's own characteristics, and the regional operating characteristics contained in the node vector set. Furthermore, the instruction generation model uses the node vector set as the core input, and through internal feature mapping and decision reasoning, directly outputs control instructions for each power device corresponding to that node vector set. This controls the power device to perform corresponding actions, ensuring the generation accuracy of control instructions for a single region while significantly improving the overall output efficiency of control instructions through multi-model parallel processing, thus providing support for efficient real-time control of the power system.

[0038] Here, the power grid topology subgraphs and instruction generation models can be mapped one-to-one. Each instruction generation model can be set up in an independent agent, and each agent can be an independent computer device, so that multiple agents can process the node embedding vectors corresponding to different power grid topology subgraphs. Based on this architecture, the action space of each agent only includes the power adjustment of the generating equipment in its area of ​​responsibility. As an example, a power system contains 160 generators. If a single agent is used for instruction output, its action dimension is as high as 160. In contrast, if the power system is divided into 8 power grid topology subgraphs, corresponding to 8 agents, the action dimension of a single agent is reduced to 20. Compared with the solution where a single agent needs to cover all 160 generators in the system and the action dimension reaches 160, the action space dimension of this solution can be reduced by 87%, which greatly simplifies the model decision complexity.

[0039] Furthermore, after obtaining the control command for each power device, the generating devices included in the power grid topology subgraph corresponding to the command generation model are determined, and the control command corresponding to each generating device is sent to that generating device to control the generating device to adjust its power generation, thereby realizing real-time power flow optimization of the power system.

[0040] The multi-agent real-time optimal power flow optimization method fused with graph neural networks provided in this embodiment relies on a spatial feature extraction model to accurately capture the topological relationships and features of power grid nodes. It uses multiple independent instruction generation models to achieve parallel decision-making by multiple agents, replacing the centralized serial processing mode of a single agent. This can significantly reduce the state space dimension and number of parameters of a single model, avoid computational redundancy caused by high-dimensional data at the whole network level, and significantly shorten the overall response cycle of instruction calculation and output. Thus, it effectively solves the problem of low power grid control efficiency and realizes real-time power flow optimization of the power system.

[0041] In an optional embodiment, the instruction generation model is an actor-critic network architecture model; the instruction generation model includes a pre-trained actor network model and a critic network model; here, the actor network model can be pre-trained first. Specifically, multiple model training datasets can be obtained, each model training dataset including multiple node embedding vectors and a set of control instructions for each power device in the power system; during the initial training of the model, the actor network model can be pre-trained based on multiple model training datasets so that the actor network model can generate corresponding control instructions based on the received node embedding vectors to achieve decision output for the power system.

[0042] Furthermore, the training methods for the instruction generation model include: First, the node embedding vectors corresponding to the power system are input into the actor network model, enabling the actor network model to output control commands for the power equipment in the power system. The control score of the control command is determined based on whether it keeps the power flow within preset safety limits. Then, the critic network model adjusts the model parameters of the actor network model based on the control score of the control command using a near-end policy optimization algorithm to improve the control effect of the output control commands on the power system, resulting in the trained actor network model.

[0043] Specifically, the operating state of the power system can be simulated based on a simulation environment. Here, the power system may be in an unstable state such as power flow overflow. Based on the simulated power system, its power grid topology, the equipment parameters of each power device, the bus parameters of each bus, and the line parameters of each transmission line can be obtained. Based on the above parameters, multiple node embedding vectors corresponding to the power system can be generated to represent the state of the power system.

[0044] Furthermore, all node feature vectors are input into the pre-trained actor network model to obtain the control commands output by the actor network model for each power device in the power system as control actions for the power system. Based on the control commands, each power device is controlled to change the state of the power system.

[0045] Furthermore, it is determined whether the power system can resume stable operation after the action is executed, so as to determine the control effect of the control command output by the actor network model, and based on the control effect, the control score of the control command on the power system is determined, that is, the current control score of the actor network model.

[0046] Specifically, based on a simulation environment, the power flow state of the power system after the power equipment executes the control command can be determined. When the power flow state is such that all power flow parameters of the power system are within preset safety limits, a preset reward score is assigned to the control score. At this time, if the control command output by the actor network model is executed by the power equipment and satisfies all grid constraints, i.e., the bus voltage amplitude is within the allowable range, the transmission line power is not overloaded, the power of each generating equipment is balanced, and the power flow of the power system converges, then the reward score is the preset benchmark reward value minus the normalized generation cost, where the normalized generation cost is the actual generation cost in the current power system mapped to the value in the interval [0, 100]. Furthermore, if the power flow of the power system converges after the control command output by the actor network model is executed by the power equipment, but some constraints are violated, such as a line power slightly exceeding the limit or the node voltage deviating from the allowable range, then the reward score is the preset penalty benchmark value minus the constraint violation quantification value, where the constraint violation quantification value can be calculated by weighting the importance of the violated constraints.

[0047] Conversely, when the power flow state is characterized by power flow exceeding limits, a preset penalty score is assigned to the control score, where the penalty score is negative. Here, if the control command output by the actor network model is executed by the power equipment, causing power flow divergence, severe power mismatch, and voltage collapse, preventing the power system from reaching a stable operating state, then the control score is a fixed penalty score. Based on this, by using differentiated reward and penalty signals, the H-MAPPO agent is guided to learn compliant and optimal control strategies, achieving the goal of balancing power system safety constraints and cost optimization.

[0048] Furthermore, after the simulated power system executes the above control commands, the current node embedding vector of the power system is generated, and the node embedding vector is input into the actor network model to obtain the control commands output by the actor network model again. Based on the above method, the control score of the control command is determined. At the same time, the control scores of all control commands output by the actor network model are accumulated sequentially to obtain the reward value of the actor network model.

[0049] Simultaneously, a series of control commands and their corresponding immediate control scores are input into the critic model, which estimates the long-term value of each control command. These long-term values ​​and the actual control scores are used to calculate an advantage estimate, which measures the merits of the actions selected by the actor network model. Based on this advantage estimate, the model parameters of the actor network model are slightly updated using a proximal policy optimization method to ensure stable and reliable policy improvement. Specifically, during the simulation, for each time step of the model, after the power system executes the control command output by the actor network model, the control score corresponding to the control command is recorded, resulting in a reward sequence. Subsequently, based on this time step and subsequent reward sequences, the actual cumulative reward corresponding to the state-action pair is constructed. Furthermore, this actual cumulative reward is compared with the long-term value of the corresponding power system state predicted by the critic network model; the difference between the two is the advantage estimate of the state-action pair. This advantage estimate intuitively reflects the merits of the current action relative to the average level of the current policy, providing precise guidance for the policy optimization of the actor model.

[0050] Here, the process of the actor network model generating control instructions and the process of the critic network model making minor updates to the model parameters of the actor network model are carried out simultaneously, so as to continuously generate control instructions based on the updated actor network model.

[0051] Furthermore, the above process is continued until the reward value of the actor network model reaches a preset upper limit. At this point, the instruction generation model training is complete, and actual instruction generation can be performed based on the actor network model to output control actions. The embodiments provided in this application, through the actor-critic network architecture and the near-end policy optimization algorithm, combined with pre-training and iterative fine-tuning mechanisms, enable the instruction generation model to accurately learn the control laws of the power system. At the same time, through differentiated reward / penalty rules, both reducing power generation costs and strictly constraining violations such as power flow overruns are incentivized, balancing optimization objectives and safety constraints. Furthermore, continuous interactive training is achieved through a simulation environment, ensuring the model's generalization ability and stability in complex scenarios, ultimately outputting accurate, compliant, and efficient control instructions, significantly improving the reliability and optimization effect of power system zonal control.

[0052] The multi-agent real-time optimal power flow optimization method fused with graph neural networks provided in this embodiment divides the power grid into multiple subgraphs through partitioned control. Each subgraph corresponds to an independent instruction generation model, and a single model only processes local node vectors, thereby significantly simplifying the decision-making complexity. Simultaneously, the parallel decision-making by multiple agents replaces serial instruction generation, enabling rapid adaptation to second-level power fluctuations in the power system and significantly shortening the control response cycle.

[0053] Furthermore, such as Figure 3As shown, embodiments of this application also provide a multi-agent real-time optimal power flow optimization system that integrates graph neural networks, which includes a spatial feature extraction model 200 and multiple agents. Here, the number of agents is described as three, including a first agent 410, a second agent 420, and a third agent 430. Each agent contains an instruction generation model that adopts an actor-critic architecture.

[0054] In practical applications, the power grid topology diagram 100 of the power system can be divided into a first power grid topology sub-diagram 110, a second power grid topology sub-diagram 120, and a third power grid topology sub-diagram 130, and these sub-diagrams can be input into the spatial feature extraction model 200 to generate multiple node embedding vectors 300. Furthermore, for each power grid topology sub-diagram, the node embedding vectors 300 of all power grid nodes contained in the sub-diagram are divided into a node vector set, resulting in the node vector set corresponding to each power grid topology sub-diagram, namely the first node vector set 310, the second node vector set 320, and the third node vector set 330.

[0055] Furthermore, the first node vector set 310 is input to the first intelligent agent 410 to obtain control commands output by the first intelligent agent 410 for the power equipment in the first power grid topology subgraph 110, and the power equipment in the first power grid topology subgraph 110 is controlled to perform corresponding actions based on the control commands. Similarly, the second node vector set 320 can be input to the second intelligent agent 420 to obtain control commands output by the second intelligent agent 420 for the power equipment in the second power grid topology subgraph 120, and the power equipment in the second power grid topology subgraph 120 is controlled to perform corresponding actions based on the control commands. The third node vector set 330 can be input to the third intelligent agent 430 to obtain control commands output by the third intelligent agent 420 for the power equipment in the third power grid topology subgraph 130, and the power equipment in the third power grid topology subgraph 130 is controlled to perform corresponding actions based on the control commands, so as to achieve power flow optimization and control of the entire power system.

[0056] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platform, or it can be implemented by hardware. By applying the technical solution of this application, firstly, the power grid topology diagram of the power system, the equipment parameters of each power device included in the power system, the bus parameters of each bus, and the line parameters of each transmission line are obtained, wherein each bus and the power device connected to the bus constitute a power grid node; then, the power grid topology diagram, the equipment parameters, the bus parameters, and the line parameters are input into a pre-trained spatial feature extraction model to extract spatial features of the power system and obtain multiple node embedding vectors, wherein each node embedding vector is used to characterize the connection relationship between a power grid node and other power grid nodes, as well as the node features of the power grid node; then, all the node embedding vectors are divided into multiple node vector sets, wherein each node vector set corresponds to a group of power devices included in a group of related power grid nodes; finally, each node vector set is input into different pre-trained instruction generation models, and the instruction generation models output control instructions for each power device corresponding to the node vector set. Compared with existing technologies, it can improve the control efficiency of power flow optimization control of power systems.

[0057] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.

Claims

1. A multi-agent real-time optimal power flow optimization method integrating graph neural networks, characterized in that, The method includes: Obtain the power grid topology diagram of the power system, the equipment parameters of each power device included in the power system, the bus parameters of each bus and the line parameters of each transmission line, wherein each bus and the power device connected to the bus constitute a power grid node; The power grid topology, equipment parameters, bus parameters, and line parameters are input into a pre-trained spatial feature extraction model to extract spatial features of the power system, resulting in multiple node embedding vectors. Each node embedding vector is used to characterize the connection relationship between a power grid node and other power grid nodes, as well as the node features of the power grid node. All the node embedding vectors are divided into multiple node vector sets, wherein each node vector set corresponds to the power equipment contained in a set of related power grid nodes; Each node vector set is input into a different pre-trained instruction generation model, and the instruction generation model outputs control instructions for each power device corresponding to the node vector set.

2. The method according to claim 1, characterized in that, The power grid topology graph is pre-divided into multiple power grid topology subgraphs; the step of dividing all the node embedding vectors into multiple node vector sets includes: For each of the power grid topology subgraphs, the node embedding vectors of all the power grid nodes contained in the power grid topology subgraph are divided into a node vector set to obtain the node vector set corresponding to each power grid topology subgraph.

3. The method according to claim 2, characterized in that, The power equipment includes power generation equipment; the method further includes: The generators included in the power grid topology subgraph corresponding to the instruction generation model are identified, and control instructions corresponding to the generators are sent to the generators to control the generators to adjust their power generation.

4. The method according to claim 2, characterized in that, The instruction generation model is an actor network-critic network architecture model; the instruction generation model includes a pre-trained actor network model and a critic network model; the training method of the instruction generation model includes: Input the node embedding vector corresponding to the power system into the actor network model, so that the actor network model outputs control instructions for the power equipment in the power system, and determine the control score of the control instructions on the power system based on whether the power flow of the power system can be kept within a preset safety limit. The model parameters of the actor network model are adjusted based on the control score of the control command by the critic network model and the near-end policy optimization algorithm to improve the control effect of the control command output by the actor network model on the power system, thereby obtaining the trained actor network model. The step of inputting each of the node vector sets into different pre-trained instruction generation models, and having the instruction generation models output control instructions for each power device corresponding to the node vector set, includes: The node vector set of each of the power grid topology subgraphs is input into the actor network model of different instruction generation models, and the actor network model outputs control instructions for the power equipment in the power grid topology subgraph.

5. The method according to claim 4, characterized in that, The determination of the control score of the control command on the power system based on whether the control command can keep the power flow within a preset safety limit includes: Based on a simulation environment, the power flow state of the power system is determined after the power equipment of the power system executes the control command. When the power flow state is such that all power flow parameters of the power system are within the preset safety limits, a preset bonus score is assigned to the control score. When the power flow state is that the power system experiences a power flow out of bounds, a preset penalty score is assigned to the control score, wherein the penalty score is a negative value.

6. The method according to claim 2, characterized in that, The power equipment includes wind turbines, thermal power generators, and photovoltaic power generation equipment; The power grid node where the wind turbine is located, the power grid node where the thermal power generator is located, and the power grid node where the photovoltaic power generation equipment is located are divided into different power grid topology subgraphs.

7. The method according to claim 1, characterized in that, The training methods for the spatial feature extraction model include: Multiple training datasets are obtained, each training dataset including a power grid topology diagram of a power system sample, equipment parameters, bus parameters, line parameters of the power system sample, and node embedding vector of each power grid node corresponding to the power system sample; The power grid topology, equipment parameters, bus parameters, and line parameters in each training dataset are used as model input data, and the node embedding vectors in each training dataset are used as labels. The graph neural network model is iteratively trained to obtain the spatial feature extraction model.

8. The method according to claim 2, characterized in that, The number of power grid topology subgraphs is the same as the number of instruction generation models; the power grid topology subgraphs correspond one-to-one with the instruction generation models.

9. The method according to claim 8, characterized in that, Each of the instruction generation models is set in a different computer device that acts as an intelligent agent.

10. The method according to claim 1, characterized in that, The equipment parameters include one or more of the following: power generation capacity, power generation unit operating cost, and output voltage amplitude; the bus parameters include one or more of the following: bus voltage and bus load; the line parameters include one or more of the following: line admittance and capacity limit.