Power grid state prediction method based on graph neural network and time convolution network

By combining graph neural networks and temporal convolutional networks, the problem of integrating topological structure with temporal dynamic changes in power grid state prediction is solved, achieving high-precision and stable power grid state prediction, which is suitable for multi-scale prediction tasks at the node, regional, and system levels.

CN121706842BActive Publication Date: 2026-07-24HUBEI CENT CHINA TECH DEV OF ELECTRIC POWER +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUBEI CENT CHINA TECH DEV OF ELECTRIC POWER
Filing Date
2025-10-28
Publication Date
2026-07-24

Smart Images

  • Figure CN121706842B_ABST
    Figure CN121706842B_ABST
Patent Text Reader

Abstract

The application provides a power grid state prediction method based on a graph neural network and a time convolution network. Firstly, the power grid is modeled as a graph structure (nodes are power equipment, and edges are physical connections), and a space-time input tensor of continuous time window operation data is constructed. A dynamic adjacency matrix is generated to capture the dynamic changes in topology. The spatial topological dependence of nodes is learned through a multilayer GCN, and spatial features are output. The time evolution trend is extracted through a multilayer TCN (dilated convolution), and time features are output. Multiscale convolution and attention mechanism are used to fuse space-time features, weight key nodes and time steps, and finally predict future node-level state, regional-level load or system-level abnormal early warning. The application combines the spatial topology and time dynamic changes of the power grid, and can improve the prediction accuracy, stability and real-time performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence, power information technology, graph neural networks and time series modeling, specifically a power grid state prediction method based on graph neural networks and temporal convolutional networks. Background Technology

[0002] The power grid is a crucial infrastructure of the national energy system. It is a highly complex system composed of power equipment such as transformers, busbars, transmission lines, circuit breakers, and switches. Its primary function is to ensure the stable transmission and dispatch control of electrical energy between the generation and consumption sides. With the development of new power systems, especially the rapid integration of distributed energy resources, renewable energy sources (such as wind and solar power), and electric vehicles, the operating characteristics of the power grid have changed significantly. Equipment types have become more diverse, operating modes more complex, network structures denser, and dynamic behaviors more frequent. Simultaneously, the power system's reliance on real-time sensing, accurate forecasting, and intelligent decision-making continues to deepen.

[0003] In power grid operation, the connections between devices form a natural topology, with strong correlations between nodes, exhibiting typical graph structure characteristics. On the other hand, the operating states of the power grid (such as voltage, current, load, and phase angle) change continuously over time, exhibiting significant time-series characteristics and dynamic evolution patterns. This dual characteristic of "complex spatial connections" in structure and "significant temporal evolution" in state makes the power grid a typical spatiotemporally coupled system. The state of the power grid at each moment depends not only on the historical information of the nodes themselves but also on the interactive influence of the behavior of adjacent nodes in the topology.

[0004] In recent years, with the widespread application of artificial intelligence technology, deep learning methods based on graph structures and time series, such as Graph Neural Networks (GNNs) and Temporal Convolutional Networks (TCNs), have provided new ideas for constructing a spatiotemporal modeling system for power grid operation. By modeling the power grid as a dynamic graph and integrating spatial topology and temporal evolution characteristics, this approach has gradually become an important research direction in the field of smart grid prediction and analysis. Summary of the Invention

[0005] This invention provides a power grid state prediction method based on graph neural network (GNN) and temporal convolutional network (TCN), aiming to fully integrate the spatial topology of the power grid with the temporal dynamic changes of equipment status, thereby improving the accuracy, stability and real-time performance of power grid state prediction.

[0006] A power grid state prediction method based on graph neural networks and temporal convolutional networks includes the following steps:

[0007] (1) Power grid graph structure modeling and spatiotemporal input construction: The power grid is modeled as a graph structure, where nodes represent power equipment and edges represent physical connections; the operating status data of each node within a continuous time window are collected to construct a spatiotemporal input tensor;

[0008] (2) Dynamic adjacency matrix generation: Based on the spatiotemporal input tensor of step (1), the dynamic adjacency matrix is ​​calculated through node feature interaction to capture the dynamic changes in the power grid topology;

[0009] (3) Spatial feature extraction of graph convolutional network GCN: The spatiotemporal input tensor of step (1) and the dynamic adjacency matrix of step (2) are input into the multi-layer GCN to learn the spatial topological dependencies between nodes and output node-level spatial features.

[0010] (4) Temporal feature extraction of Temporal Convolutional Network (TCN): The spatial features output in step (3) are input into a multi-layer TCN, and the evolution trend of the temporal dimension is extracted by dilated convolution to output the temporal features;

[0011] (5) Spatiotemporal feature fusion and attention weighting: Multi-scale convolution and attention mechanism are applied to the temporal features in step (4) to generate fused spatiotemporal features; whereby the attention mechanism weights the features of key nodes and time steps.

[0012] (6) Power grid status prediction: Based on the fusion of spatiotemporal characteristics in step (5), predict the node-level status, regional load, or system-level anomaly warning results of the power grid at future moments.

[0013] Furthermore, in step (1), the spatiotemporal input tensor has a dimension of N×T×F, where N is the number of nodes, T is the length of the time window, and F is the feature dimension of each node. The feature dimension includes voltage, current, and load. The power equipment includes transformers, busbars, and switches, and the physical connection relationship includes transmission lines.

[0014] Furthermore, in step (2), the dynamic adjacency matrix The calculation formula is:

[0015] ;

[0016] in, This represents the feature matrix of all nodes at time step t. It is a learnable weight matrix used to generate query and key vectors. This represents the dimension of the attention head.

[0017] Furthermore, in step (3), the multi-layer GCN includes three graph convolutional layers, each with the following formula:

[0018] ;

[0019] in, Based on The degree matrix, The input dimension is F=8, the output dimension of each hidden layer is 64, each GCN layer uses 8 attention heads independently, and the input of the graph convolutional module (GCN) is... and The output is a high-order spatial feature. :

[0020] ;

[0021] Each row It is the spatial feature representation of the fused graph structure of the i-th node.

[0022] Furthermore, in step (4), the multilayer TCN includes three dilated convolutional layers, each with the following formula:

[0023] ;

[0024] Each layer has the same formula structure: first, dilated convolution is performed, then it is added to the input feature map, and finally, it is activated by the ReLU function. Represents the input sequence. and These represent the outputs of the first, second, and third layers, respectively; the input is the output of the GCN. The output is a time feature. Additionally, the kernel size k=3, and the expansion coefficients for each layer are 1, 2, and 4.

[0025] Furthermore, in step (5), the multi-scale convolution extracts short-term, medium-term, and long-term features using time steps Δt={2,4,8}, and concatenates them into N×T×192 multi-scale features by channel; the weights of the attention mechanism The calculation formula is:

[0026] ;

[0027] in, and Let represent the input feature vectors of the i-th and j-th nodes, respectively; W is the trainable attention weight matrix; d is the vector dimension used to scale the attention value; attention calculation based on bidirectional feature interaction is performed only on node i with an even number, and the attention value of the remaining nodes is fixed at 0.5.

[0028] Furthermore, in step (6), the prediction results include node-level voltage / current trends, regional-level total load, and system-level anomaly warnings; wherein the anomaly warnings are achieved through anomaly scoring, and the anomaly scoring... The calculation formula is:

[0029] ;

[0030] in, II[*] represents the direction penalty factor, used to intensify the anomaly score for embeddings opposite to the normal state; II[*] represents the indicator function, which takes a value of 1 when the embedding direction is opposite to the center vector; anomaly score The higher the value, the more likely the node is to be in an abnormal state.

[0031] Furthermore, the criteria for judging the abnormal scores are as follows:

[0032] .

[0033] Furthermore, the GCN in step (3) and the TCN in step (4) achieve feature transfer through residual connections, and each layer of the GCN independently uses an 8-head attention mechanism, while the TCN amplifies the response to low-frequency perturbations through dilated convolution.

[0034] Furthermore, the method is applicable to scenarios such as power grid dispatching, state estimation, accident early warning, or new energy access assessment, and supports multi-scale prediction tasks at the node level, regional level, and system level.

[0035] This invention models the power grid as a graph structure with spatial connectivity, where each node represents a power device (such as a transformer, switch, or busbar), and edges represent physical connections (such as transmission lines). Based on this, the operating states of each node within a continuous time window (such as voltage, current, and load) are collected to construct a spatiotemporal input tensor. A graph neural network is used to learn the topological dependencies between nodes, and a temporal convolutional network is combined to extract the evolutionary trend in the time dimension, thereby predicting the state of the power grid at future moments. Furthermore, this invention introduces an attention mechanism to weight the temporal features, highlighting the impact of key moments or key equipment, improving the interpretability and controllability of the prediction. This invention is particularly suitable for node-level state prediction (such as the voltage trend of a transformer), regional load prediction (such as predicting the total load of a region), and system-level anomaly early warning (such as identifying potential voltage overflow areas). This method can be widely applied to scenarios such as power grid dispatching, state estimation, accident early warning, and new energy access assessment. Attached Figure Description

[0036] Figure 1 This is a flowchart of the power grid state prediction method based on graph neural networks and temporal convolutional networks according to the present invention. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, 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.

[0038] like Figure 1 As shown, this embodiment of the invention provides a power grid state prediction method based on graph neural networks and temporal convolutional networks, including the following steps:

[0039] 1.1 Power Grid Diagram Structure Modeling and Spatiotemporal Input Construction

[0040] The power grid now consists of 100 nodes with a moderately complex topology. The time window function is set to 50, and the feature dimension of each node at each time step is set to 10. The power grid state can now be represented as a three-dimensional tensor:

[0041]

[0042] Here, the elements in the matrix can be abstracted as N refers to the number of nodes, which is the sum of the total number of transformers and line endpoints in the power grid; T refers to the length of the time window, indicating how many consecutive time intervals are used for modeling; F refers to the feature dimension of each node at each time interval, including a total of 8 features such as voltage, current, phase angle, and frequency. The elements in the matrix... This indicates the 8th feature value of the 1st node in the 50th time window.

[0043] This input requires no additional processing and can be directly input into the graph convolutional layer. The main points of this step are explained below:

[0044] (1) Model the 100-node standard IEEE power grid topology as an undirected graph G=(V,E), where V={transformers, buses, switches} and E={transmission lines}.

[0045] (2) Collect the operation data of a power grid in a certain region for 50 consecutive time windows (Δt=15min) in the summer of 2024, and construct the spatiotemporal input tensor X∈R^(100×50×8).

[0046] (3) The characteristic dimension F=8 includes: voltage amplitude, effective current value, active power, reactive power, frequency, phase angle, temperature, and power factor.

[0047] Implementation Case: The IEEE 33-node test system is used with a sampling frequency of 1Hz. Data from the morning peak period (8:00-10:00) is selected for verification. The original data is normalized to the [0,1] interval by Min-Max, and a three-dimensional tensor with a size of 100×1800×8 is constructed (simulating 50 hours of continuous monitoring).

[0048] 1.2 Dynamic Adjacency Matrix Generation

[0049] (1) Expanding the embedding dimension

[0050] Embedded Dimensions By extending the functionality, it can support more complex feature interactions:

[0051]

[0052] but The value is 32.

[0053] (2) Adjacency matrix representation

[0054] Adjacency Matrix Describe the connection relationships between nodes in a power grid.

[0055] formula:

[0056]

[0057] Initialize the static adjacency matrix The connection weight between nodes with a line impedance less than 1Ω is set to 1, and the weight of the rest is 0.

[0058] (3) Dynamic adjacency matrix

[0059] To capture dynamic changes in the topology, a dynamic adjacency matrix based on node features is introduced.

[0060] formula:

[0061]

[0062] This adjacency matrix requires no normalization and can be directly used as the input structure for graph convolutional layers, preserving the asymmetry and directionality of the graph structure. It is used to model the strength of state interactions between nodes, reflecting device linkage behaviors such as voltage fluctuations and power flow disturbances. This represents the feature matrix of all nodes at time step t, with dimensions 100×8.

[0063]

[0064] The dimension representing the attention head is calculated as follows:

[0065]

[0066] With the number of attention heads set to 8, we can obtain... The value is 4.

[0067] It is a learnable weight matrix used to generate query and key vectors. That is...

[0068]

[0069]

[0070] The elements in this dynamic adjacency matrix represent the "state correlation strength" between node i and node j at time t.

[0071]

[0072] Implementation example: At the 12th time step (t=12), an adjacency matrix was obtained:

[0073]

[0074] It can be seen that nodes 1 and 2 are strongly positively correlated (0.82), and their state changes are synchronized; nodes 1 and 4 are strongly negatively correlated (-0.45), and their trends are opposite; node 3 is weakly correlated with other nodes, indicating that its state is highly independent.

[0075] 1.3 Spatial Feature Extraction from Graph Convolutional Networks (GCNs)

[0076] Graph convolutional layers are used to extract spatial dependencies between power grid devices. This module uses a three-layer graph convolutional layer, with the following three-layer structure formula:

[0077]

[0078] in, Based on The degree matrix, The input dimension is F=8, the output dimension of each hidden layer is 64, and each GCN layer uses 8 attention heads independently. The input to this module is... and The output is a high-order spatial feature.

[0079]

[0080] Each row It is the spatial feature representation of the fused graph structure of the i-th node.

[0081] This module enables state linkage modeling of electrical adjacent devices in the power grid, such as voltage and current coupling structure modeling between transformer, busbar, and switch.

[0082] Implementation Case: Spatial Features of Node 7 after 3 Layers of GCN The high-dimensional features characterize the voltage coupling strength with bus 2 and the influence of impedance changes in line 3.

[0083] 1.4 Temporal Feature Extraction via Temporal Convolutional Network (TCN)

[0084] This module models the dynamic evolution of each node over time. It uses a three-layer temporal convolution. The formula for the three-layer structure is:

[0085]

[0086] Each layer has the same formula structure: first, a dilated convolution operation is performed, then it is added to the input feature map (residual connection), and finally, the ReLU activation function is applied. Represents the input sequence. and These represent the outputs of the first, second, and third layers, respectively. The input is the output of the GCN. The output is a time feature. Additionally, the kernel size k=3, and the expansion coefficients for each layer are 1, 2, and 4.

[0087] This module extracts the rising / falling / fluctuating patterns of the state over time. For example, if a node A has a "fluctuating upward" load trend over the last 50 time steps, the TCN output vector will show an enhanced "rising signal" dimension (e.g., several channel values ​​continuously increase after ReLU activation); an amplified response to low-frequency disturbances (due to dilated convolution); and weakened similarity between embeddings of adjacent time steps, reflecting an intensified trend change.

[0088] Implementation Case: Time-domain analysis of the load curve of node 15 shows that TCN captures the load mutation event in the 35-40 time window, generating a significant activation signal (amplitude > 0.9) in channel 32 of the feature map.

[0089] 1.5 Spatiotemporal Feature Fusion and Attention Weighting

[0090] (1) Multi-scale temporal convolution

[0091] To adapt to different prediction period requirements, the input time feature tensor The data is fed into three convolutional networks with three different time steps. The time step set is defined as follows: The corresponding time segments are extracted from the sequence and encoded using independent temporal convolutional networks to obtain feature outputs at three scales. The specific expression is as follows:

[0092]

[0093] in: This represents three different time scales: minute-level, ten-minute-level, and hour-level forecast windows. This represents the temporal convolutional network module at the s-th time scale; This is an adjustable weighting factor for the channel at this scale; the output feature dimension of each convolutional channel is... All channel outputs are concatenated along the feature dimension to form a fused multi-scale temporal feature tensor. .

[0094] Implementation example: For node 17, the multi-scale output at the 5th time step is:

[0095]

[0096] (2) Attention

[0097] To enhance the model's interpretability and its ability to dynamically select features for key nodes, a node-number-based attention mechanism is introduced. This mechanism controls the participation level of specific node pairs in the information fusion process by differentially calculating attention scores between node pairs. Attention weights The calculation method is as follows:

[0098]

[0099] in, and Let represent the input feature vectors of the i-th and j-th nodes, respectively; W is a trainable attention weight matrix; d is the vector dimension used to scale the attention value; attention calculation based on bidirectional feature interaction is performed only on node i with an even number, while the attention value of the remaining nodes is fixed at 0.5. This structure is used to enhance the weight contribution of the state of backbone nodes (such as main transformers and key feeders) in the prediction, which helps to identify fault precursors and key control points.

[0100] Implementation example: Node 17, the final fused feature vector at the 5th time step is

[0101]

[0102] 1.6 Power Grid State Prediction

[0103] The fused features are fed into the output layer for next-time state prediction, in the following form:

[0104]

[0105] in, It refers to the predicted voltage or current vector for the state at the next moment. The dimension of the prediction target. This refers to the weight matrix of the output layer. This refers to the bias vector of the output layer.

[0106] This module outputs: ,in This refers to the predicted time step, which is 1. This refers to the number of indicators predicted for each node. See below:

[0107]

[0108] Implementation Case: Predicting the voltage value of each node at the next time step, i.e. =1, then the output is The predicted voltage of the 23rd node at time t+1 is: The actual value is 231.4V, and the predicted voltage is:

[0109] With a prediction error of 0.13%, the total predicted load (MAE) for Region A (nodes 1-20) is 2.3MW.

[0110] 1.7 Anomaly Detection

[0111] In a 100-node power grid, the normal operation of each node is crucial. The identification of abnormal nodes is based on a score determined by the degree of deviation between the node's embedding vector and the embedding center of the normal state. Let... Let be the embedding representation of the j-th node. The mean of the embeddings for all normal state nodes. Anomaly scoring is performed to embed the standard deviation estimate. The calculation formula is as follows:

[0112]

[0113] in, II[*] represents the direction penalty factor, used to intensify the anomaly score for embeddings opposite to the normal state; II[*] represents the indicator function, which takes a value of 1 when the embedding direction is opposite to the center vector; anomaly score The higher the value, the more likely the node is to be in an abnormal state.

[0114] Criteria for judging abnormal scores at each node:

[0115]

[0116] Implementation example: The output of this step is It can be determined that node 3 is a serious anomaly and node 5 is an emergency alarm, and these nodes should be checked immediately.

[0117] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A power grid state prediction method based on graph neural networks and temporal convolutional networks, characterized in that, Includes the following steps: (1) Power grid graph structure modeling and spatiotemporal input construction: The power grid is modeled as a graph structure, where nodes represent power equipment and edges represent physical connection relationships; Collect the running status data of each node within a continuous time window and construct a spatiotemporal input tensor; (2) Dynamic adjacency matrix generation: Based on the spatiotemporal input tensor of step (1), the dynamic adjacency matrix is ​​calculated through node feature interaction to capture the dynamic changes in the power grid topology; (3) Spatial feature extraction of graph convolutional network GCN: The spatiotemporal input tensor of step (1) and the dynamic adjacency matrix of step (2) are input into the multi-layer GCN to learn the spatial topological dependencies between nodes and output node-level spatial features. (4) Temporal feature extraction of Temporal Convolutional Network (TCN): The spatial features output in step (3) are input into a multi-layer TCN, and the evolution trend of the temporal dimension is extracted by dilated convolution to output the temporal features; (5) Spatiotemporal feature fusion and attention weighting: Multi-scale convolution and attention mechanism are applied to the temporal features in step (4) to generate fused spatiotemporal features; whereby the attention mechanism weights the features of key nodes and time steps. (6) Power grid status prediction: Based on the fusion of spatiotemporal characteristics in step (5), predict the node-level status, regional load, or system-level anomaly warning results of the power grid at future moments; In step (2), the dynamic adjacency matrix The calculation formula is: ; in, This represents the feature matrix of all nodes at time step t. It is a learnable weight matrix used to generate query and key vectors. Dimensions representing the attention head; In step (5), the multi-scale convolution extracts short-term, medium-term, and long-term features using time steps Δt={2,4,8}, and concatenates them into N×T×192 multi-scale features by channel; the weights of the attention mechanism The calculation formula is: ; in, and Let represent the input feature vectors of the i-th and j-th nodes, respectively; W is the trainable attention weight matrix; d is the vector dimension used to scale the attention value; attention calculation based on bidirectional feature interaction is performed only on node i with an even number, and the attention value of the remaining nodes is fixed at 0.

5.

2. The method as described in claim 1, characterized in that, In step (1), the spatiotemporal input tensor has a dimension of N×T×F, where N is the number of nodes, T is the time window length, and F is the feature dimension of each node. The feature dimension includes voltage, current, and load. The power equipment includes transformers, busbars, and switches, and the physical connection relationship includes transmission lines.

3. The method as described in claim 1, characterized in that, In step (3), the multi-layer GCN includes three graph convolutional layers, each with the following formula: ; in, Based on The degree matrix, The input dimension is F=8, the output dimension of each hidden layer is 64, each GCN layer uses 8 attention heads independently, and the input of the graph convolutional module (GCN) is... and The output is a high-order spatial feature. : ; Each row It is the spatial feature representation of the fused graph structure of the i-th node.

4. The method as described in claim 1, characterized in that, In step (4), the multilayer TCN includes three dilated convolutional layers, each with the following formula: ; Each layer has the same formula structure: first, dilated convolution is performed, then it is added to the input feature map, and finally, it is activated by the ReLU function. Represents the input sequence. and These represent the outputs of the first, second, and third layers, respectively; the input is the output of the GCN. The output is a time feature. Additionally, the kernel size k=3, and the expansion coefficients for each layer are 1, 2, and 4.

5. The method as described in claim 1, characterized in that, In step (6), the prediction results include node-level voltage / current trends, regional-level total load, and system-level anomaly warnings; Anomaly warnings are implemented through anomaly scoring, and anomaly scoring... The calculation formula is: ; in, II[*] represents the direction penalty factor, used to intensify the anomaly score for embeddings opposite to the normal state; II[*] represents the indicator function, which takes a value of 1 when the embedding direction is opposite to the center vector; anomaly score The higher the value, the more likely the node is to be in an abnormal state.

6. The method as described in claim 5, characterized in that, The criteria for judging the abnormal scores are as follows: 。 7. The method as described in claim 1, characterized in that, The GCN in step (3) and the TCN in step (4) achieve feature transfer through residual connection. Each layer of the GCN uses an 8-head attention mechanism independently, and the TCN amplifies the response to low-frequency perturbations through dilated convolution.

8. The method as described in claim 1, characterized in that, The method is applicable to scenarios such as power grid dispatching, state estimation, accident early warning, or new energy access assessment, and supports multi-scale prediction tasks at the node, regional, and system levels.

Citation Information

Patent Citations

  • CN119580217A

  • CN120372189A