Power grid operation mode intelligent generation method and system based on graph deep learning
Patent Information
- Application Number
- CN202611141866.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-10-27
AI Technical Summary
然而,现有基于GNN的电网应用主要集中在单一电气量的拟合或分类,尚无文献提出将图深度学习模型作为电网运行的“标准参考模型”,在实验室或离线状态下训练获得能表征理想运行特性的基准模型,随后在线生成与当前拓扑和注入条件相匹配的参考运行方式,并通过与实际量测数据之间的误差分析实现分级预警与报警
[0036]利用图深度学习对电网拓扑和电气量进行统一建模,可直接处理拓扑变化,无需重新训练模型,实时性强;
Smart Images

Figure CN122992673A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of power system automation and artificial intelligence technology, specifically to a method and system for intelligent generation of power grid operation modes based on graph deep learning, which is particularly suitable for the rapid generation of power grid operation reference modes and the hierarchical early warning of abnormal states under high-proportion renewable energy access. Background Technology
[0002] The power grid operation mode refers to the overall distribution scheme of state variables such as node voltage, branch power flow, and generator output under specific load levels, generation output, and network topology. It is the foundation for ensuring the safe, high-quality, and economical operation of the power grid. With the large-scale grid connection of new energy sources and the advancement of power market reform, the uncertainty of power grid operation has increased significantly. The volatility and randomness of load and generation output pose challenges to traditional offline methods of compiling operation modes: on the one hand, the "offline calculation and online matching" mode relying on manual experience combined with power flow calculation software is difficult to meet the timeliness and accuracy requirements of massive and ever-changing operation scenarios; on the other hand, when the actual operating state deviates from the preset operation mode, existing monitoring systems usually only issue alarms based on static thresholds or simple over-limits, lacking an early warning mechanism that can combine real-time changes in power grid topology and injection volume to intelligently generate a reference operation mode adapted to the current operating conditions and dynamically compare and analyze it with actual operating data.
[0003] In recent years, graph deep learning technology has attracted attention due to its ability to naturally capture the relationships between nodes and edges in non-Euclidean graph structures like power grids. A power grid can be abstracted as a graph with buses as nodes and transmission lines and transformers as edges. Nodes contain features such as injected power and voltage amplitude, while edges contain attributes such as impedance, admittance, and capacity. Graph Neural Networks (GNNs) aggregate neighbor node information through message passing mechanisms, enabling them to automatically learn the influence of power grid topology on state variables. Existing research has applied GNNs to single-point tasks such as power flow approximation calculations, state estimation, and voltage stability assessment, demonstrating their effectiveness in characterizing the physical mapping relationships of the power grid. However, current GNN-based power grid applications mainly focus on fitting or classifying single electrical quantities. No literature has yet proposed using graph deep learning models as a "standard reference model" for power grid operation, training a baseline model that characterizes ideal operating characteristics in laboratory or offline conditions, subsequently generating a reference operating mode online that matches the current topology and injection conditions, and achieving tiered early warning and alarm through error analysis between the model and actual measurement data.
[0004] Specifically, the existing operation mode generation and status monitoring technologies have the following shortcomings: (1) Traditional physical model-based methods have large computational loads and convergence is affected by initial values, making it difficult to generate accurate reference operating points online in the case of rapid time-varying scenarios caused by high proportion of new energy access; (2) Existing data-driven auxiliary decision-making methods mostly use fully connected networks or convolutional networks, which cannot effectively handle the dynamic changes in the power grid topology. When line maintenance or faults cause changes in the network topology, the model needs to be retrained or its accuracy drops sharply; (3) The early warning in the current energy management system mainly relies on the absolute value of a single electrical quantity to determine if it exceeds the limit. There is a lack of an intelligent reference system that can integrate the entire network topology and injected information, generate an overall operation mode map, and evaluate the deviation with the measured values. Therefore, it is difficult to issue early warnings when the electrical quantity has not exceeded the limit but the operation mode has already deviated abnormally.
[0005] Therefore, there is an urgent need for an intelligent generation and early warning method for operating modes that deeply integrates graph deep learning with the physical characteristics of the power grid. This method should be able to construct a physically consistent graph neural network benchmark model using historical or simulation data in the offline stage; and intelligently generate reference operating modes based on real-time topology and injection conditions in the online stage. By comparing the distribution error between the generated values and the measured values across multiple nodes and branches in the entire network, a graded response mechanism based on error tolerance, namely "early warning-alarm", can be realized, thereby improving the power grid's intelligence level and security defense capabilities in dealing with complex and uncertain operating conditions. Summary of the Invention
[0006] The purpose of this invention is to overcome the above-mentioned shortcomings of the prior art and provide a method and system for intelligent generation of power grid operation modes based on graph deep learning. It can build a graph neural network benchmark model in a laboratory or offline state, generate a reference operation mode that takes into account physical constraints online, and realize differentiated responses for early warning and alarm through hierarchical comparison of comprehensive deviation values.
[0007] To achieve the above objectives, the present invention adopts the following technical solution:
[0008] A method for intelligently generating power grid operation modes based on graph deep learning includes the following steps:
[0009] In the offline phase, a graph structure data representation of the power grid is constructed, where nodes represent power grid buses and edges represent transmission lines or transformers. Node features include active power injection, reactive power injection, and voltage amplitude, while edge features include impedance, admittance, and transmission capacity.
[0010] A graph neural network model is trained using historical power grid operation data or simulation data to obtain a benchmark model for generating reference operation modes;
[0011] During the online phase, real-time topology information of the power grid and node injection measurement data or prediction data are acquired. The real-time topology information and node injection data are input into the benchmark model to generate a reference operating mode under the current operating condition. The reference operating mode includes at least the voltage amplitude, voltage phase angle and branch power flow of each node.
[0012] Collect actual measurement data of power grid synchronization, and calculate the comprehensive deviation value between the reference operating mode and the actual measurement data;
[0013] The overall deviation value is compared with a preset first threshold and a second threshold, wherein the second threshold is greater than the first threshold;
[0014] If the overall deviation value is greater than the second threshold, the operating status is determined to be abnormal and an alarm is triggered;
[0015] If the overall deviation value is greater than or equal to the first threshold and less than or equal to the second threshold, an early warning is issued;
[0016] Otherwise, the system is considered to be operating normally.
[0017] Furthermore, the comprehensive deviation value is obtained in the following manner:
[0018] Calculate one or more of the following deviations between the reference operating mode and the actual measured data: node voltage amplitude deviation, node voltage phase angle deviation, branch active power flow deviation, and branch reactive power flow deviation; and sum the weighted values of each deviation to form the comprehensive deviation value.
[0019] When only one type of deviation is used, the weight corresponding to that deviation is 1, and the weights of the other deviations are 0.
[0020] When two or more deviation quantities are used, the sum of the weights is 1. The weights are determined according to the sensitivity of each electrical quantity to the safe operation of the power grid—the weight of voltage amplitude deviation is 0.3-0.4, the weight of voltage phase angle deviation is 0.2-0.3, the weight of branch active power flow deviation is 0.2-0.3, and the weight of branch reactive power flow deviation is 0.1-0.2; equal weighting can be used for initial operation.
[0021] Furthermore, the graph neural network model is a graph convolutional network, a graph attention network, or a heterogeneous graph neural network; when a heterogeneous graph neural network is used, generator nodes, load nodes, and bus nodes are treated as different types of nodes, and multiple edge types are defined to construct a heterogeneous graph.
[0022] Furthermore, the loss function used when training the graph neural network model includes a data fitting loss term and a physical constraint loss term; the physical constraint loss term is constructed based on the residuals of the node power balance equations to constrain the reference operating mode generated by the baseline model to satisfy the power flow equations.
[0023] Furthermore, the first threshold and the second threshold are set according to the power grid safety operation procedures and the experience of experts in the field, or are adaptively determined by statistically analyzing the confidence interval of the deviation distribution under historical normal operation conditions.
[0024] Furthermore, the real-time topology information includes the switching status of lines and transformers; when the topology changes due to switching action or fault, the changed topology is directly input into the baseline model by updating the adjacency matrix of the graph structure data, without needing to retrain the baseline model.
[0025] The present invention also provides a system comprising:
[0026] The graph data construction module is used to convert power grid topology and equipment parameters into graph structure data, where nodes represent buses and edges represent transmission lines or transformers.
[0027] The offline training module is used to train a graph neural network using historical or simulation data to obtain a baseline operating mode generation model.
[0028] The data acquisition module is used to acquire real-time power grid topology information and node injection measurement or prediction data;
[0029] The reference mode generation module is used to input the real-time topology information and node injection data into the baseline operation mode generation model to generate a reference operation mode under the current operating conditions.
[0030] The deviation calculation module is used to calculate the comprehensive deviation value between the reference operating mode and the actual power grid measurement data;
[0031] The graded early warning alarm module is used to compare the comprehensive deviation value with a preset first threshold and a second threshold. When the comprehensive deviation value is greater than the second threshold, an alarm is triggered. When the comprehensive deviation value is greater than or equal to the first threshold and less than or equal to the second threshold, an early warning is issued. Otherwise, it is determined to be normal.
[0032] Furthermore, the deviation calculation module is specifically used to calculate the node voltage amplitude deviation, node voltage phase angle deviation, branch active power flow deviation, and branch reactive power flow deviation, and obtain the comprehensive deviation value by weighted summation.
[0033] Furthermore, when training the graph neural network, the offline training module adds a penalty term based on the power grid physical equation to the loss function, so that the operating mode generated by the baseline operating mode generation model conforms to Kirchhoff's laws.
[0034] A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, performs the above-described content.
[0035] Compared with the prior art, the present invention has the following beneficial effects:
[0036] Using graph deep learning to uniformly model power grid topology and electrical quantities can directly handle topology changes without retraining the model, and it has strong real-time performance.
[0037] By introducing a physical constraint loss function, the generated reference operation mode naturally satisfies Kirchhoff's laws, has strong physical interpretability, and can be used as a standard reference model under laboratory conditions.
[0038] By comparing the comprehensive deviation values at different levels, early warnings can be issued before electrical quantities exceed limits, giving dispatchers valuable time to respond and improving the power grid's safety and defense capabilities.
[0039] It can flexibly integrate heterogeneous graph neural networks, distinguish different types of nodes and edges, and improve the model's accuracy in representing complex power grids. Attached Figure Description
[0040] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0041] Figure 1 This is a schematic diagram of the system structure provided in an embodiment of the present invention.
[0042] Figure 2 This is a flowchart of a method provided in an embodiment of the present invention. Detailed Implementation
[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0044] Example 1
[0045] This embodiment provides a method for intelligently generating power grid operation modes based on graph deep learning. The overall process is as follows: Figure 2 As shown, the system implementation is as follows: Figure 1 As shown.
[0046] It includes two main phases: offline training and online application.
[0047] (a) Offline phase: Constructing graph data and training benchmark models
[0048] First, a graph structure data representation of the power grid is established. Taking a real-world regional power grid or an IEEE 39-bus system as an example, each bus is defined as a graph node. Node feature vectors This includes: the active power injected by the node. reactive power This includes power generation output (if connected to generators), load power (if connected to loads), and historical operating voltage amplitude. Transmission lines and transformers connecting the busbars are defined as edges of the graph. eigenvectors of the edges Includes line resistance Reactance susceptance Long-term carrying capacity Or parameters such as transformer turns ratio. This forms the diagram. Its adjacency matrix element This indicates that an edge exists. This indicates no direct electrical connection. When the power grid contains distributed generation sources or flexible loads, they can be further treated as special nodes to expand the feature space and construct a heterogeneous graph, which will be detailed in subsequent embodiments.
[0049] Next, a training set is formed using historical power grid operation section data (taken from the SCADA historical database or power flow samples generated by simulation).
[0050] To ensure the model fully learns the characteristics of power grid operation, the training set is constructed as follows: Historical operational data from at least 12 months of power grid operation are collected, with sampling intervals of 5-15 minutes, accumulating at least 35,000 valid cross-section samples. When historical data is insufficient, simulation samples can be generated based on typical operating modes through random load disturbances and generation redistribution as supplementary data. For each cross-section sample, bad data containing obvious measurement anomalies (such as voltage amplitude exceeding 0.8-1.2 pu, or branch power flow exceeding twice the equipment capacity) are first removed. Then, the injected power and voltage amplitude at each node are normalized—injected power divided by the system baseline capacity, and voltage amplitude divided by the bus voltage baseline value—making all input features dimensionless and ranging from 0 to 2. The processed dataset is then divided chronologically into a training set (first 80%) and a test set (last 20%), used for model training and generalization performance evaluation, respectively.
[0051] Each cross-sectional sample is transformed into the graph structure described above. The inputs are node injected power and topology, while the supervision labels are the accurate node voltage magnitude, phase angle, and branch power flow obtained through power flow calculation. This invention designs a graph neural network to learn the mapping from (topology, injected power) to operating state.
[0052] The preferred approach is to use a Graph Attention Network (GAT) as the core model architecture, with the following inter-layer update formula:
[0053]
[0054] Attention coefficient The voltage values are obtained from node features through linear transformation, concatenation, and softmax normalization. This allows the model to adaptively focus on neighbors with closer electrical distances or greater influence. The network consists of three stacked layers, with the hidden layer dimension set to 128 and the output layer dimension matching the number of node state variables. Finally, a linear layer outputs the voltage amplitude of each node. and phase angle Branch power flow can be calculated using physical formulas based on the output node voltage and known branch admittance, or it can be directly returned from a dedicated branch output head.
[0055] The training loss function consists of two items:
[0056]
[0057] Among them, the data fitting term Using smoothed L1 loss or mean square error, the deviations between the predicted and actual values of voltage magnitude and phase angle at all nodes are calculated, with the option to include branch power flow deviations.
[0058]
[0059] Physical constraints Based on Kirchhoff's current law, that is, for each node The injected power equals the sum of the outflowing power. The node injected power residual is calculated using the predicted voltage and the known admittance matrix:
[0060]
[0061]
[0062] make The coefficient λ is set between 0.1 and 0.5 to balance data accuracy and physical consistency. The system is trained using the Adam optimizer, whose hyperparameters are... =0.9、 =0.999、 Batch size 32, learning rate If the loss on the test set does not decrease for 20 consecutive rounds during training, early stopping is triggered, and the model parameters are restored to the optimal parameters. The maximum number of training rounds is no more than 200. The network weights are initialized using the Xavier method, and the bias term is initialized to zero. With the above settings, the model converges in about 100 rounds on typical examples. The resulting model is the baseline model under laboratory conditions. It fits the real operating data and incorporates the constraints of the power flow equations of the power system. The output operating mode can be used as a "standard reference" for ideal operation.
[0063] After training, the performance of the benchmark model is evaluated on the test set. Using the power flow calculation results as the truth, the evaluation metrics include: mean absolute error of node voltage magnitude, mean absolute error of node voltage phase angle, mean absolute error of branch active power flow, and mean absolute error of branch reactive power flow. In the IEEE 39-bus system test of this embodiment, after training convergence, the model's mean absolute error of node voltage magnitude on the test set is less than 0.005 pu, the mean absolute error of voltage phase angle is less than 0.5 degrees, the mean absolute error of branch active power flow is less than 2% of the system baseline capacity, and the mean absolute error of branch reactive power flow is less than 3% of the system baseline capacity, meeting the accuracy requirements for practical engineering applications. When the model is applied to other power grids, only fine-tuning the benchmark model using historical or simulation data of that power grid is needed to obtain comparable prediction accuracy.
[0064] (II) Online Phase: Generate Reference Methods and Tiered Early Warning
[0065] During online operation, the data acquisition module receives real-time switch status and measurement data from the SCADA / PMU system. Based on the switch status, the adjacency matrix of the graph is updated: if both switches at both ends of a line are closed, the corresponding edge is retained; if open, the edge is deleted from the adjacency matrix. Simultaneously, the injected power of each node is extracted; if measurements are incomplete, state estimates or short-term load forecasts can be used to supplement them. The graph at this moment is then updated. The data is fed into the trained baseline model, and a single forward propagation outputs the reference voltage amplitude for all nodes. Phase angle It can also calculate the reference power flow for each branch. This constitutes a complete reference operating mode. The calculation time for this process is in the millisecond range, which meets the requirements for online refresh.
[0066] Subsequently, actual telemetry data at the same time were acquired synchronously, and the comprehensive deviation between the reference method and the actual operation was calculated. To comprehensively reflect the degree of deviation in power grid operation, this embodiment adopts a weighted deviation model:
[0067]
[0068]
[0069] in, For the number of nodes, For the number of branches, This is the voltage reference value. This is a power baseline value used for normalization. Weights , , , The sum is 1. A recommended method for determining the weights is to assign values based on the sensitivity of each electrical quantity to the safe operation of the power grid—voltage amplitude directly reflects power quality and voltage stability margin, and the recommended weights are... A value of 0.3-0.4 is recommended; the voltage phase angle deviation reflects the stability trend of the power angle, and it is suggested that... Take 0.2-0.3; the branch active power flow deviation reflects the equipment load rate and N-1 safety margin, and is recommended. Take a value of 0.2-0.3; the branch reactive power flow deviation reflects the reactive power distribution and voltage support status, and it is recommended to... Set the weights to 0.1-0.2. For initial operation, an equal weight setting (0.25 for each weight) can be used, and subsequent adjustments can be made based on the actual operating characteristics of the power grid and the key points of dispatch.
[0070] It can be set according to the power grid's priorities; for example, it can be increased for areas sensitive to voltage quality. This comprehensive deviation value aggregates multi-dimensional electrical quantity deviations across the entire network, providing higher detection sensitivity for early abnormal patterns.
[0071] It should be noted that the calculation of the comprehensive deviation value can flexibly select the deviation type according to actual monitoring needs and measurement conditions. When only one deviation type is used, its corresponding weight is 1, and the remaining weights are 0. In this case, the "weighted summation" degenerates into a single deviation index. When two or more deviation types are used, the weights are allocated according to the above recommended method, and the sum is 1. This invention preferably uses all four deviation quantities simultaneously to obtain the most comprehensive characterization of the power grid operation status.
[0072] For the first threshold in the classification judgment Second threshold A recommended setting method is to select the comprehensive deviation value of a period of continuous normal operation of the power grid (such as the past 30 days). As a sample, the sampling interval is consistent with the online calculation frequency (e.g., once every 5 minutes), and at least 8000 normal state samples are obtained in total; assuming that the comprehensive deviation value under normal state approximately follows a normal distribution, its mean is calculated. and standard deviation ,set up , The thresholds can be updated daily at a set time, incorporating the latest normal data and removing data from abnormal periods using a rolling window approach, thus adapting the thresholds to seasonal changes in the power grid's operating characteristics. Alternatively, absolute thresholds can be directly specified based on power grid operating procedures and expert experience; for example, a comprehensive deviation exceeding 0.05 can be used as a warning threshold, and exceeding 0.10 as an alarm threshold.
[0073] The following criteria are used to select samples for "normal operation status": all node voltage amplitudes are within the range of 0.95~1.05 pu, all branch power flows do not exceed the rated capacity of the equipment, there are no protection action signals, and no manually marked abnormal event records. These criteria ensure that the sample set only includes data from the actual normal operation of the power grid. When the sample size is insufficient (e.g., in the initial stage of power grid commissioning), an absolute threshold set by expert experience (e.g., T1=0.05, T2=0.10) can be used as the initial threshold. After accumulating sufficient normal samples (no less than 8000), the adaptive threshold can be switched to. For cases where the normal distribution assumption is not met, the quantile method can be used to directly set T1 as the 95th percentile of the historical normal deviation value and T2 as the 99th percentile, without relying on the distribution assumption.
[0074] Then the current time comprehensive deviation value By comparing with two thresholds, the hierarchical response described above is achieved:
[0075] like > This indicates that the actual power grid state deviates significantly from the physically consistent reference operating mode, which may mean multiple faults, measurement avalanches, or precursors to system instability. Immediately, an audible and visual alarm signal is sent to the dispatcher through the alarm module, and the node or branch from which the maximum deviation originates is pushed.
[0076] like ≤ ≤ This indicates that there is a significant deviation in the operating mode. Although it has not exceeded the limit, it is in the early stage of anomaly. The system will issue an early warning, which can be done by lighting up the warning indicator or by sending an information push to remind the operators to pay attention to the specific area.
[0077] like < It is assumed that the power grid is operating in a normal state, and only the deviation value is recorded for subsequent threshold updates.
[0078] (III) Adaptive processing under topology changes
[0079] A major advantage of this invention is that it eliminates the need to retrain the model when the power grid topology changes. For example, if a transmission line is shut down for maintenance, the power flow relationship corresponding to that section changes in traditional methods, and the model will fail if it is not included in the training set. However, in this invention, only the edge corresponding to that line needs to be removed from the real-time graph data, i.e., the corresponding element in the adjacency matrix is set to 0. Simultaneously, the injected power in the node features is updated with generation redistribution or load transfer. Because the baseline model performs reasoning based on message passing on the graph structure, its learned physical mapping is a function of node features and local topology. Therefore, it automatically adapts to the new topology and directly outputs the reference voltage and power flow under maintenance conditions. This feature allows the model to flexibly handle various structural changes such as N-1 interruption and bus splitting, meeting the real-time requirements of online operation.
[0080] To verify the topology generalization ability, the following tests were conducted on the IEEE 39-bus system: Training included only the complete topology and a portion of the N-1 disconnection scenarios (30% of the total training samples); testing introduced N-1 disconnection and bus splitting scenarios not present in the training set. Results show that for unseen topologies, the model's output of the mean absolute error of node voltage amplitude is still less than 0.008 pu, and the mean absolute error of voltage phase angle is less than 0.8 degrees, showing only a slight decrease in accuracy compared to training with known topologies, fully meeting practical engineering requirements. This generalization ability stems from the fact that the message passing mechanism of graph neural networks essentially learns local electrical relationships rather than memorizing the global topology. When the local topology remains unchanged, the model can still provide accurate predictions for new global topologies.
[0081] (iv) Enhanced implementation using heterogeneous graphs
[0082] To further improve the modeling accuracy for complex power grids, in another preferred embodiment, the power grid is constructed as a heterogeneous graph. Three node types are defined: generator nodes (features include: active power output, reactive power output, and generator terminal voltage setpoint), load nodes (features include: active load, reactive load, and load type), and bus nodes (features include: voltage amplitude and phase angle). Edge types include: generator-bus edge (carrying step-up transformer parameters), load-bus edge (carrying power supply line parameters), and bus-bus edge (transmission line or interconnection transformer parameters). Relational Graph Convolutional Network (R-GCN) or Heterogeneous Graph Transformer (HGT) is used for training. During message aggregation, each edge type uses an independent parameter matrix. Perform feature transformations and weight or concatenate the aggregation results of different types of neighbors:
[0083]
[0084] in This represents a set of edge types. In distribution networks containing multiple types of power sources and large-scale complex loads, heterogeneous graph models can capture the differences in electrical characteristics of different components more precisely than homogeneous graph models, and the generated reference operating modes are closer to the actual physical responses.
[0085] In the specific implementation of heterogeneous graphs, the feature dimensions of the three types of nodes are uniformly processed as follows: generator nodes include 3-dimensional features: active power output, reactive power output, and generator terminal voltage setpoint; load nodes include 2-dimensional features: active load and reactive load; bus nodes include 2-dimensional features: voltage amplitude and voltage phase angle. Through their respective independent linear projection layers, the original node features of different dimensions are mapped to a unified 64-dimensional or 128-dimensional latent space before subsequent message aggregation. The parameter matrix W_r for each edge type is simultaneously optimized through backpropagation during training. During training, messages are calculated separately for different types of edges, and during the aggregation phase, messages from neighbors of different types are concatenated or summed, enabling the model to distinguish the contributions of different electrical relationships. The training process of heterogeneous graphs is similar to that of homogeneous graphs. Figure 1 To achieve this, only node type and edge type identifiers are added when constructing graph data.
[0086] (V) Experimental Verification
[0087] To verify the effectiveness of the technical solution of this invention, tests were conducted on the IEEE 39-node system and a real regional power grid (including 132 buses and 156 branches).
[0088] In the IEEE 39-node system, 45,000 simulated operational cross-section samples were used, with the first 80% used for training and the last 20% for testing. After training, the performance of the baseline model on the test set was as follows: the mean absolute error of node voltage amplitude was 0.004 pu, the mean absolute error of node voltage phase angle was 0.4 degrees, the mean absolute error of branch active power flow was 1.8% of the baseline capacity, and the mean absolute error of branch reactive power flow was 2.5% of the baseline capacity. In terms of inference speed, a single forward propagation took approximately 3 milliseconds, which meets the requirements for second-level online refresh.
[0089] In actual regional power grid testing, the model was trained and evaluated using 12 months of SCADA historical data (approximately 35,000 valid cross-sections). The mean absolute error of the node voltage amplitude on the test set was 0.006 pu, meeting the accuracy requirements for practical engineering applications. In the simulated N-1 line disconnection scenario, the model's prediction accuracy for the new topology decreased by only about 15% compared to the training topology, validating its topology generalization ability.
[0090] The statistical distribution of the comprehensive deviation values shows that the mean value of E during normal operation is about 0.015 and the standard deviation is about 0.008. After setting T1=0.031(μ+2σ) and T2=0.039(μ+3σ), the accuracy rates of early warning and alarm reached 92% and 96% respectively in the simulated abnormal working condition test, which verified the effectiveness of the graded early warning mechanism.
[0091] Example 2
[0092] This embodiment provides a system for implementing the above method:
[0093] The graph data construction module obtains equipment ledgers, network topology connections, and line and transformer parameters from the power grid energy management system. It generates node feature matrices, edge indices, and edge feature matrices according to a predefined format and monitors switch position changes in real time to dynamically update the graph topology. This module outputs a standardized graph data structure for training and inference.
[0094] Offline training module: Deployed on an offline server, it imports historical cross-sectional graph datasets, constructs the selected graph neural network (GCN / GAT / RGCN, etc.), performs loss function optimization with physical constraints, and outputs the trained model parameter file, i.e., the baseline model. During training, it supports early stopping, automatic hyperparameter tuning, and can record the weights λ of the physical constraint term as adjustable parameters.
[0095] Data acquisition module: responsible for interface communication with external systems such as SCADA and PMU, real-time acquisition of topology information of switch status, node injection measurement values or status estimates, simple identification and replacement of bad data, packaging the data into the format required for graph network inference, and passing it to the reference mode generation module.
[0096] Reference mode generation module: Loads the baseline model parameters, inputs the real-time graph data provided by the data acquisition module into the model to perform inference, generates the voltage amplitude, phase angle of all nodes and the active and reactive power flow of each branch, forming a reference operating mode file or memory object under the current section, and can push the results to the monitoring screen.
[0097] Deviation Calculation Module: This module receives reference data and actual measurements according to a set weighting formula, automatically calculates node voltage amplitude deviation, phase angle deviation, and branch power flow deviation, and then normalizes and weights them to obtain a comprehensive deviation value. The module supports the independent display of deviation components, facilitating source tracing and analysis.
[0098] Tiered early warning and alarm module: preset first threshold Second threshold Input the deviation calculation module The system compares the data with two threshold values in real time, outputting three status indicators: "Normal," "Warning," and "Alarm." This triggers corresponding visual and auditory alarms on the human-machine interface and records the event log. The threshold values can be adaptively updated or manually modified according to the above criteria.
[0099] The system can be deployed on a standalone workstation in the dispatch center or on a cloud platform. The modules interact with each other through message queues or databases, and it has scalability and fault tolerance.
[0100] Example 3
[0101] A computer-readable storage medium, such as a hard disk, solid-state drive, or optical disk, stores a computer program that, when executed by a processor, implements all or part of the steps in the above method embodiments. For example, after loading the program onto a general-purpose server, the server can sequentially execute logic such as graph data construction, graph neural network training, real-time data acquisition, reference mode generation, deviation calculation, and graded early warning alarm.
[0102] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for intelligently generating power grid operation modes based on graph deep learning, characterized in that, Includes the following steps: In the offline phase, a graph structure data representation of the power grid is constructed, where nodes represent power grid buses and edges represent transmission lines or transformers. Node features include active power injection, reactive power injection, and voltage amplitude, while edge features include impedance, admittance, and transmission capacity. A graph neural network model is trained using historical power grid operation data or simulation data to obtain a benchmark model for generating reference operation modes; During the online phase, real-time topology information of the power grid and node injection measurement data or prediction data are acquired. The real-time topology information and node injection data are input into the benchmark model to generate a reference operating mode under the current operating condition. The reference operating mode includes at least the voltage amplitude, voltage phase angle and branch power flow of each node. Collect actual measurement data of power grid synchronization, and calculate the comprehensive deviation value between the reference operating mode and the actual measurement data; The overall deviation value is compared with a preset first threshold and a second threshold, wherein the second threshold is greater than the first threshold; If the overall deviation value is greater than the second threshold, the operating status is determined to be abnormal and an alarm is triggered; If the overall deviation value is greater than or equal to the first threshold and less than or equal to the second threshold, an early warning is issued; Otherwise, the system is considered to be operating normally.
2. The method according to claim 1, characterized in that, The overall deviation value is obtained in the following way: The reference operating mode and the actual measured data are calculated in one or more of the following: node voltage amplitude deviation, node voltage phase angle deviation, branch active power flow deviation, and branch reactive power flow deviation. The weighted sum of each deviation is then used to form the comprehensive deviation value.
3. The method according to claim 1, characterized in that, The graph neural network model is a graph convolutional network, a graph attention network, or a heterogeneous graph neural network. When a heterogeneous graph neural network is used, generator nodes, load nodes, and bus nodes are treated as different types of nodes, and multiple edge types are defined to construct a heterogeneous graph.
4. The method according to claim 1, characterized in that, The loss function used when training the graph neural network model includes a data fitting loss term and a physical constraint loss term; the physical constraint loss term is constructed based on the residuals of the node power balance equations to constrain the reference operating mode generated by the baseline model to satisfy the power flow equations.
5. The method according to claim 1, characterized in that, The first threshold and the second threshold are set according to the power grid safety operation procedures and the experience of experts in the field, or are adaptively determined by statistically analyzing the confidence interval of the deviation distribution under historical normal operation conditions.
6. The method according to claim 1, characterized in that, The real-time topology information includes the switching status of lines and transformers; when the topology changes due to switching action or fault, the changed topology is directly input into the baseline model by updating the adjacency matrix of the graph structure data, without the need to retrain the baseline model.
7. A power grid operation mode intelligent generation system based on graph deep learning, applicable to the power grid operation mode intelligent generation method based on graph deep learning as described in claims 1-6, characterized in that, include: The graph data construction module is used to convert power grid topology and equipment parameters into graph structure data, where nodes represent buses and edges represent transmission lines or transformers. The offline training module is used to train a graph neural network using historical or simulation data to obtain a baseline operating mode generation model. The data acquisition module is used to acquire real-time power grid topology information and node injection measurement or prediction data; The reference mode generation module is used to input the real-time topology information and node injection data into the baseline operation mode generation model to generate a reference operation mode under the current operating conditions. The deviation calculation module is used to calculate the comprehensive deviation value between the reference operating mode and the actual power grid measurement data; The graded early warning alarm module is used to compare the comprehensive deviation value with a preset first threshold and a second threshold. When the comprehensive deviation value is greater than the second threshold, an alarm is triggered. When the comprehensive deviation value is greater than or equal to the first threshold and less than or equal to the second threshold, an early warning is issued. Otherwise, it is determined to be normal.
8. The system according to claim 7, characterized in that, The deviation calculation module is specifically used to calculate the node voltage amplitude deviation, node voltage phase angle deviation, branch active power flow deviation, and branch reactive power flow deviation, and obtain the comprehensive deviation value by weighted summation.
9. The system according to claim 7, characterized in that, When training the graph neural network, the offline training module adds a penalty term based on the power grid physical equation to the loss function, so that the operating mode generated by the baseline operating mode generation model conforms to Kirchhoff's laws.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1 to 6.