Power grid transient power angle stability evaluation method based on space-time dynamic graph model
Through the dynamic graph model of space-time combined with the time-sequence multi-head attention mechanism and graph isomorphic network, it dynamically adapts to the grid topology structure, solving the shortcomings of the static graph model in utilizing timing characteristics and reflecting topological changes, and significantly improving the stability evaluation of the grid's transient power angle accuracy and robustness.
Patent Information
- Application Number
- CN202411524580.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-10-30
AI Technical Summary
The existing grid transient power angle stability evaluation method based on static graph model is insufficient in utilizing timing feature information, and cannot dynamically reflect the changes in the grid topology structure, resulting in low sensitivity to the extraction of information transmission feature between high-dimensional sub-regions.
Using an evaluation method based on space-time dynamic graph model, combining the time-sequence multi-head attention mechanism and graph isomorphic network, a dynamic graph neural network model is constructed to dynamically adapt to the changes in the power grid topology, and improve the accuracy and robustness of the stability evaluation of transient power angles .
It significantly improves the accuracy and robustness of the grid's transient power angle stability assessment, can effectively capture the information transmission characteristics between different regions during the transient process of the grid, and improves the transient stability assessment performance in complex grid environments.
Smart Images

Figure CN119129157A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of smart grids, and relates to an artificial intelligence technology for evaluating transient stability of power grids, and in particular to a method for evaluating transient power angle stability of power grids based on a spatiotemporal dynamic graph model. Background Art
[0002] With the rapid development of power systems, large-scale renewable energy and AC / DC hybrid networks are continuously connected to the grid, and the demand for safe and stable operation of power grids has increased significantly. The transient process of power systems, especially the process from fault occurrence to fault removal, is usually short and of variable duration. For complex high-dimensional tightly coupled power grids, when faced with sudden system failures and operational risks, it is crucial to have a fast and accurate transient stability assessment (TSA).
[0003] In recent years, with the rapid progress of artificial intelligence technology and the popularization of vector measurement units (PMUs) in wide-area measurement systems, the research field of data-driven TSA has developed rapidly. By directly establishing an end-to-end mapping relationship between the system characteristic quantities and transient stability states of the power system, the shortcomings of TSA based on the mechanism model in terms of accuracy and effectiveness in the face of increasingly complex power grid environments can be effectively compensated. At present, machine learning algorithms have been widely used in the field of transient stability assessment. For example, the literature [Dai Yuanhang, Chen Lei, Zhang Weiling, Min Yong, Li Wenfeng. Transient stability assessment of power systems based on multi-support vector machine synthesis [J]. Proceedings of the CSEE, 2016, 36(05): 1173-1180. DOI: 10.13334 / j.0258-8013.pcsee.2016.05.001.] studied the transient stability assessment effect of support vector machine (SVM), and the literature [Sun Hongbin, Wang Kang, Zhang Boming, Zhao Feng. Cai Transient stability rule extraction using linear decision tree [J]. Proceedings of the CSEE, 2011, 31(34): 61-67+8. DOI: 10.13334 / j.0258-8013.pcsee.2011.34.004.] The extracting of transient stability rules is realized by using the interpretability of decision tree (DT) model. However, the machine learning input for TSA mostly relies on expert experience. The use of feature extraction or feature selection methods often affects the final stability judgment effect. There are also certain deficiencies in the information extraction of high-dimensional data.
[0004] At the same time, deep learning algorithms have become the mainstream research method of data-driven TSA because they can use the original measurement data of the power system as direct input in TSA and autonomously extract high-dimensional features of the power grid. For example, in the literature [Gao Kunlun, Yang Shuai, Liu Siyan, Li Xiangwei. Power system transient stability assessment based on one-dimensional convolutional neural network [J]. Automation of Electric Power Systems, 2019, 43 (12): 18-26.], the sampling data of the grid node voltage amplitude, phase angle, branch active and reactive power are spliced, and the sample time series features are extracted using a one-dimensional convolution neural network (1D-CNN). The literature [Shi Z, Yao W, Zeng L, et al. Convolutional neural network-based power system transient stability assessment and instability mode prediction [J]. Applied Energy, 2020, 263: 114586.] outputs the observation data of the disturbed system in a form similar to a two-dimensional image, and uses CNN to extract transient stability features. Reference [Sun Lixia, Bai Jingtao, Zhou Zhaoyu, Zhao Chenyun. Transient stability assessment of power system based on bidirectional long short-term memory network [J]. Automation of Electric Power Systems, 2020, 44(13): 64-72.] The TSA model is constructed based on the long short-term memory (LSTM) network, which further enhances the feature extraction capability of the time-varying characteristics of power parameters.
[0005] Early deep learning-based grid transient power angle stability assessment mainly used convolutional neural network or recurrent neural network structure to extract time series feature information in the grid transient process for stability judgment. Although the time dimension features can be effectively extracted, for power systems with obvious non-Euclidean topology, these models are difficult to characterize the spatial feature relationship between different components or physical parameters. In this context, some scholars began to study grid transient stability assessment based on graph deep learning to enhance the prediction ability of grid transient stability. Reference [Wang Zhengcheng, Zhou Yanzhen, Guo Qinglai, Sun Hongbin. Message passing graph neural network transient stability assessment considering power system topology changes [J]. Proceedings of the CSEE, 2021, 41(07): 2341-2350. DOI: 10.13334 / j.0258-8013.pcsee.202139.] The TSA model is constructed based on the message passing graph neural network (MPNN) framework, and can effectively capture the impact of grid topology changes on prediction results. Reference [Zhong Zhi, Guan Lin, Su Yinsheng, Yao Haicheng, Huang Jiyu, Guo Mengxuan. Transient stability assessment of power system based on graph attention deep network [J]. Power System Technology, 2021, 45(06): 2122-2130. DOI: 10.13335 / j.1000-3673.pst.2020.0897.] The graph attention network (GAT) is used to enhance the TSA model's ability to extract local features of the power grid. Reference [Zhang Liang, An Jun, Zhou Yibo. Transient stability assessment of power system based on temporal convolution and graph attention network [J / OL]. Automation of Electric Power Systems: 1-12 [2023-02-16]. http: / / kns.cnki.net / kcms / detail / 32.1180.tp.20221116.1730.010.html] The temporal convolutional neural network (TCN) and GAT were used to simultaneously extract the spatiotemporal characteristics of the power grid.
[0006] Existing power system transient stability assessment methods based on graph deep learning have been deeply studied in extracting grid topology information, but the sensitivity of feature extraction for information transmission between high-dimensional sub-regions of power systems is low. In actual power system operation, the flow shows a regional transmission trend. For example, the flow of power generation areas divided by key sections of the power grid will generally propagate toward the load area, and the grid characteristics of certain specific areas are often closely related to the transient stability of the overall system. Therefore, it is crucial to fully explore the high-dimensional sub-graph features of the power grid and the information transmission between regions to improve the performance of transient stability assessment of the power grid.
[0007] Existing technologies mostly use static graph models to evaluate transient power angle stability. The main problems include: 1) the input form of graph node features is fixed, resulting in insufficient utilization of grid timing feature information; 2) the graph input is generated based on the grid steady state or the topological structure at a certain moment, which fails to dynamically reflect grid topology changes. Summary of the invention
[0008] In view of the above problems, the present invention relates to a method for evaluating the stability of transient power angle of power grid based on spatiotemporal dynamic graph model, in particular, an evaluation method based on spatiotemporal dynamic graph model. The model proposed in the present invention combines the temporal multi-head attention mechanism (Multi-head Attention, MHA) and the graph isomorphism network (Graph Isomorphism Network, GIN), and constructs a dynamic graph neural network model (AndyGIN), which can significantly improve the accuracy and robustness of the evaluation of the stability of transient power angle of power grid, and enhance the accuracy and robustness of the evaluation of the stability of transient power angle of power grid after different faults in actual large-scale power grids.
[0009] In order to achieve the above object, the technical solution adopted by the present invention is:
[0010] A method for evaluating the transient power angle stability of a power grid based on a spatiotemporal dynamic graph model comprises the following steps:
[0011] Step 1: The multivariate time series of the power grid are trimmed and integrated into the input tensor X, where the mth multivariate time series x m =[x m1 ,x m2 ,...,x md ], m = 1, 2, ..., M, M is the number of multivariate time series, d is the length of a single time series data, x md is the dth data in the mth multivariate time series; along the time dimension, X is divided into S time series slices of equal length X1, X2, …, X S , each time slice corresponds to a time slot, and the time slice X corresponding to time slot t t The length is d / S, t=1,2,…,S;
[0012] Step 2: Construct the initial dynamic graph G = {G1, G2, ..., G S}, where G t =(V t ,A t ), then V={V1,V2,...,V S} represents a node set, A={A1,A2,...,A S} represents the adjacency matrix set; for each time slot t, two learnable embedding vectors α and β of length M are generated, and the elements in the vectors are completely learnable parameters. The first generation is obtained by random initialization. The vector α is calculated T The product of and β is used as the adjacency matrix A corresponding to time slot t t The initial value of
[0013] Step 3: For time slot t, slice the corresponding time series X t and the adjacency matrix A corresponding to the time slot t Input into the dynamic graph isomorphic network, the feature tensor composed of all nodes output by the dynamic graph isomorphic network at the lth layer
[0014] Step 4: For time slot t, the feature tensor obtained by the l-th layer dynamic graph isomorphism network is Input the time series graph to collapse the pooling layer, by adjusting the pooling ratio hyperparameter r pooled Perform graph collapse processing on the current dynamic graph structure to obtain the corresponding pooled feature tensor and the adjacency matrix
[0015] Step 5, feature extraction iteration: When When the number of nodes in the corresponding dynamic graph is greater than 1, repeat steps 3 to 4; otherwise, go to step 6;
[0016] Step 6: The feature vector obtained for each time slot The data are concatenated into a vector and input into the fully connected layer for binary classification to obtain the transient power angle stability assessment result.
[0017] In one embodiment, in step 1, the dth data x in the mth multivariate time series md It includes the bus voltage U, bus angle θ, bus active load P and reactive load Q corresponding to the bus nodes of the main grid structure of the power grid. The types of power grid faults include: failure of safety and control device to operate, N-1, N-2, N-3, DC bipolar lockout, single-phase failure to operate due to three-phase short circuit and transient instability of power angle caused by DC restart; the transient process of the power system caused by the fault will cause the power grid topology connection mode to change, but will not affect the total number of bus nodes in the power grid, but will only cause the characteristic representation of the bus node itself to change over time.
[0018] In one embodiment, step 2 uses a self-learning graph generation module to construct an initial adjacency matrix set, where the matrix dimension is determined by d, and the adjustable hyperparameters are topk and the total number of time slots n. Then, the association between adjacent time slot graphs is constructed through a graph conversion module to obtain an initial adjacency matrix set.
[0019] In one embodiment, in step 2, the self-learning graph generation module encodes the adjacency matrix using embedding based on a multi-layer perceptron (MLP), and assigns two parameters to each graph node, respectively representing all the starting nodes and target nodes of the node.
[0020] In one embodiment, in step 2, the two learnable embedding vectors α and β are respectively expressed as α=[α t,1 ,α t,2 ,...,α t,M ] and β[β t,1 ,β t,2 ,...,β t,M ], adjacency matrix A t The initial value of The implementation process is as follows:
[0021]
[0022] Among them, argtopk() is used to return A obtained by multiplying α and β. t The indices idx and idy corresponding to the first k largest matrix elements in A; x and y represent the matrix A. t The row and column numbers in the dynamic graph G for each time slot t , when t = 1, the dynamic graph node set is described as V1 = (v 1,1 ,v 1,2 ,...,v 1,N ); when t>1, the set of nodes in the dynamic graph is represented by V t =(v t,1 ,v t,2 ,...,v t,N ,v t-1,1 ,v t-1,2 ,...,v t-1,N ), and add a connecting edge from each node in time slot t-1 to the corresponding node in time slot t, that is, e (t-1,n),(t,n) ,n=1,2,...,N, where N represents the number of nodes.
[0023] In one embodiment, in step 3, the calculation formula of the node features output by the first layer dynamic graph isomorphic network is:
[0024]
[0025] Where: Represents the feature vector output by the dynamic graph isomorphic network of the first layer of the dynamic graph of node v in the dynamic graph of time slot t; MLP l,trepresents the fully connected network to which the isomorphic network of the l-th layer of the dynamic graph belongs in the dynamic graph corresponding to time slot t; u∈N(v,t) represents the neighbor nodes of node v in the dynamic graph of time slot t; ε is a learnable parameter used to adjust the importance of the node's own features;
[0026] Output the node features of the l-th layer dynamic graph isomorphic network Arranged in matrix form As the input of the lth time graph collapse pooling layer, the formula for constructing the feature vector from the node features is as follows:
[0027]
[0028] N l Indicates the number of nodes corresponding to this layer.
[0029] In one embodiment, in step 4, the calculation process of the time graph collapse pooling layer is as follows:
[0030]
[0031] Where: Represents the tensor consisting of the node features output by the collapsed pooling layer of the l-th layer of the temporal graph, N represents the graph adjacency matrix after pooling of the collapsed pooling layer of the l-th layer of the sequential graph. The two are input to the l+1-th layer of the dynamic graph isomorphic network, thereby continuously repeating steps 3 and 4. l+1 The number of nodes after pooling in the corresponding time series graph collapse pooling layer is determined by the number of nodes in the lth layer and the pooling ratio hyperparameter, that is, N l+1 =r pooled ×N l , W t l and represents the learnable parameter matrix;
[0032] In one embodiment, the step 4 uses a two-dimensional convolutional neural network based on a given pooling ratio hyperparameter r pooled The corresponding nodes are concentrated into clusters as fused super nodes, where the node dimensions are regarded as different feature extraction channels in a two-dimensional convolutional neural network.
[0033] In one embodiment, the step 6 first converts the final feature vector Input fully connected layer:
[0034]
[0035] Among them, FC represents the fully connected layer, The prediction result of stability is represented by the fully connected layer, which maps the high-dimensional features into a two-dimensional output space, corresponding to stable and unstable states;
[0036] Then apply the Softmax function to get the probabilities of stability and instability:
[0037] P(stable),P(unstable)=Softmax(Y)
[0038] The Softmax function converts the output of the fully connected layer into a probability distribution, ensuring that the sum of the two probabilities is 1;
[0039] Finally, make a final judgment based on probability:
[0040] If P(stable)>P(unstable), the system is considered stable; otherwise, the system is considered unstable.
[0041] In one embodiment, in step 6, Focal Loss is used as the loss function during training:
[0042]
[0043] Among them, y is the true label, is the prediction result, α is the weight factor, and γ is the modulation factor.
[0044] Compared with the prior art, the present invention can dynamically adapt to changes in the topology of the power grid, improving the timeliness and robustness of transient stability assessment. Through the dynamic graph model, the present invention can effectively capture the information transmission characteristics between different regions in the transient process of the power grid, especially in a complex power grid environment, and can significantly improve the performance of transient power angle stability assessment. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is the overall flow chart of the present invention.
[0046] Figure 2 It is a schematic diagram of the main grid topology structure of the power system in an embodiment of the present invention.
[0047] Figure 3 It is a flow chart of implementing the conversion module in the embodiment of the present invention.
[0048] Figure 4 It is a schematic diagram of hierarchical pooling based on TGP in an embodiment of the present invention.
[0049] Figure 5 It is a schematic diagram of the structure of a dynamic graph set in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The embodiments of the present invention are described in detail below with reference to the accompanying drawings and examples.
[0051] According to the above, since the existing technology based on data-driven transient power angle stability judgment technology has insufficient ability to extract information between power grid regions, the present invention is based on graph deep learning technology, and through establishing a message passing graph neural network framework based on subgraphs of different scales of the power grid, it realizes the interconnection and interaction of power grid-related parameters in different regions and feature aggregation, and uses GAT as a single-layer feature extraction model. By using the attention mechanism to adaptively adjust the aggregation parameters in the feature update process, an end-to-end transient stability prediction model is established, which provides a new feasible means for graph neural networks to solve the problem of transient power angle stability assessment, and provides a preliminary attempt to integrate vertical domain knowledge into graph deep learning applications in the power grid field.
[0052] Specifically, refer to Figure 1 The method for evaluating the transient power angle stability of a power grid based on a spatiotemporal dynamic graph model of the present invention comprises the following steps:
[0053] Step 1: Data preprocessing.
[0054] The multivariate time series of the power grid is trimmed and integrated into An input tensor of the form m is the mth multivariate time series, x m =[x m1 ,x m2 ,...,x md ], m = 1, 2, ..., M, M is the number of multivariate time series, d is the length of a single time series data, x md is the dth data in the mth multivariate time series. X is divided into S time series slices of equal length along the time dimension X1, X2, …, X S ,, each time slice corresponds to a time slot, and the time slice X corresponding to time slot t t The length is The length is
[0055] The data set used in the embodiment of the present invention is generated based on the AC / DC hybrid network with a high proportion of new energy built by China Electric Power Research Institute. Figure 2As shown, different fault scenarios that cause power angle instability are set as experimental objects. This example has a total of 197 nodes (85 of which are 500kV main grid nodes), and the installed capacity ratio of new energy and conventional units is set at a ratio of 1:2.31, of which the output of new energy is 1.8 million kilowatts, the output of direct drive, double-fed wind turbines and photovoltaics at the sending end is 600,000 kilowatts each, and the output of conventional units is 7.8 million kilowatts. Fault types include: power angle transient instability faults caused by safety control device refusal to move, N-1, N-2, N-3, DC bipolar lockout, three-phase short circuit single-phase refusal to move, and DC restart. In a single sample, the fault occurred 0.05s after the start of the simulation, the fault lasted 0.1s, and the sampling time interval was 0.01s. The sample set contains a total of 23,996 simulation samples, including 2,957 unstable samples. The experimental part of the present invention randomly divides the sample set into training set, verification set and test set according to the ratio of 8:1:1.
[0056] Multivariate time series data used in the present invention Contains M time series x m =[x m1 ,x m2 ,...,x md ], and the length of a single sequence is d. In the present invention, four electrical quantities, including bus voltage U, bus angle θ, bus active load P and reactive load Q, corresponding to 85 bus nodes (nodes with bus voltage above 500kV) of the main grid structure of the power grid in the CEPRI-TAS-173 example are selected to construct the corresponding single sample multivariate time series input. The number of multivariate time series M is 340 (i.e. 4×85), and a single time series includes 20 sampling points, i.e. d=20. Divide X into S time slots along the time dimension. In the actual implementation process, S=3 is selected, then the length of each time slot is 7, and the time slots with insufficient length are supplemented by 0 to meet the requirements. Then X is divided into X1, X2 and X3.
[0057] Step 2: Initial dynamic graph construction.
[0058] According to the segmentation of X, the initial dynamic graph G = {G1, G2, ..., G S}, where G t =(V t ,A t ), then V={V1,V2,...,V S} represents a node set, A={A1,A2,...,A S} represents the adjacency matrix set. Furthermore, this step uses the self-learning graph generation module to construct the initial adjacency matrix set, which encodes the adjacency matrix using embedding based on the multi-layer perceptron (MLP). Two parameters are assigned to each graph node, representing all the starting nodes and target nodes of the node. The dimension of the adjacency matrix is determined by d, and the adjustable hyperparameters are topk and the total number of time slots n. Then, the association between adjacent time slot graphs is constructed through the graph conversion module to obtain the initial adjacency matrix set.
[0059] For each time slot t, two vectors α and β with a sequence length of M are generated, and the elements in the vectors are completely learnable parameters. The first generation is obtained by random initialization. On this basis, the vector α is calculated T The product of and β is used as the adjacency matrix A corresponding to time slot t t The initial value of , that is, the original adjacency matrix The specific implementation process is as follows:
[0060]
[0061] Where α=[α t,1 ,α t,2 ,...,α t,M ],β=[β t,1 ,β t,2 ,...,β t,M ] represents the random initialization of the learnable embedding vectors α and β; argtopk() is used to return the index idx, idy corresponding to the first k largest matrix elements in the adjacency matrix obtained by multiplying the vectors α and β. x, y represent the matrix A t For each time slot in the dynamic graph G t In the first time slot t=1, the dynamic graph information is only represented by the current time slot graph structure, and its input is and The dynamic graph node set is described as V1=(v 1,1 ,v 1,2 ,...,v 1,N ). For the subsequent time slot t, the set of dynamic graph nodes will become V t =(v t,1 ,v t,2 ,...,v t,N ,v t-1,1 ,v t-1,2 ,...,v t-1,N ). At the same time, add a connecting edge from each node in time slot t-1 to the corresponding node in time slot t, that is, e (t-1,n),(t,n) ,n=1,2,...,N, where N represents the number of nodes.
[0062] This self-learning graph generation method has the following advantages: First, it makes the establishment of the initial graph input no longer limited to the number of bus nodes of the power grid itself, increasing the flexibility and scope of application of the model. Second, it avoids the problem that the initial features of the graph nodes are difficult to model due to different measurement parameters of different bus nodes. Finally, the graph generation module can continuously perform iterative optimization during model training to reflect the phased differences in the actual power system topology during transient processes. The graph conversion module constructs the association between adjacent time slot graphs to obtain a complete initial adjacency matrix set A. The working principle of this module draws on the basic idea of recurrent neural network, that is, the grid characteristic information contained in the current time slot is composed of the graph structure characteristic information of the corresponding time slot and the grid characteristic information contained in the previous time slot. On this basis, the graph conversion module realizes the connection between the graph structure corresponding to a specific time slot and the node characteristic information in the graph structure of its previous time slot.
[0063] In specific implementation, the present invention assumes that although the transient process of the power system caused by the fault will cause the topological connection mode of the power grid to change, it will not affect the total number of bus nodes in the power grid, but will only cause the characteristic representation of the bus node itself to change over time. Based on this assumption, for the dynamic graph structure corresponding to each time slot, the same number of nodes are added to represent the bus node information of the previous time slot corresponding to the time slot.
[0064] The advantage of this graph conversion method is that it can effectively capture the dynamic characteristics of the power grid transient process and link the power grid status at different times, thereby providing richer and more coherent information for subsequent feature extraction. At the same time, it also maintains the consistency of model processing, allowing the model to uniformly process the power grid status at different times.
[0065] Step 3: Dynamic Graph Isomorphism Network (DyGIN) feature extraction.
[0066] The main purpose of this step is to use the Dynamic Graph Isomorphism Network (DyGIN) to capture the topological changes of the power grid during transient processes.
[0067] First, slice the time series X obtained in step 2 t and the adjacency matrix A corresponding to the time slot t Input to the DyGIN layer, the feature tensor composed of all nodes output by the dynamic graph isomorphic network in the first layer
[0068] The core of the DyGIN layer is to update the node features through the message passing mechanism, while considering the information transmission between different time slots. The node feature update of the DyGIN of the present invention first calculates the node features output by the dynamic graph isomorphic network of the first layer:
[0069]
[0070] Where: The feature vector output by node v in the DyGIN network at layer l in the dynamic graph representing time slot t; MLP l,t In the dynamic graph corresponding to time slot t, the fully connected network to which the l-th layer DyGIN network belongs; u∈N(v,t) represents the neighbor nodes of node v in the dynamic graph of time slot t. ε is a learnable parameter used to adjust the importance of the node's own features.
[0071] Update the node features of the lth DyGIN layer Arranged in matrix form As the input of the subsequent lth TGP layer, the formula for constructing the feature vector from the node features is as follows:
[0072]
[0073] Where: N l Indicates the number of nodes corresponding to this layer.
[0074] The design features of DyGIN make it particularly suitable for handling transient stability analysis of power systems. By introducing the time dimension t, DyGIN can capture the changes in the topology of the power grid over time, which is crucial for analyzing the system behavior before and after a fault occurs. Using the sum operation as the aggregation function can better preserve the graph structure information compared to the average or maximum operation, which is conducive to distinguishing different network topologies. The learnable parameter ε allows the model to adaptively adjust the importance of the node's own characteristics and neighborhood characteristics, enhancing the flexibility of the model. Another important feature of the DyGIN layer is its sensitivity to graph isomorphism. In power systems, this means that even if the bus number changes, DyGIN can get a consistent representation as long as the overall topology remains unchanged. This feature is particularly important for handling large-scale power grids because it ensures the generalization ability of the model. Through the processing of DyGIN, a node feature representation that integrates time and space information is obtained. These features not only contain the network state information at a single moment, but also contain the dynamic characteristics of the system evolving over time. This is crucial for accurately evaluating the transient power angle stability of power systems, because transient stability is essentially a dynamic process that requires considering both the instantaneous state and time evolution of the system. Step 4: Timing Graph Collapse Pooling (TGP).
[0075] For time slot t, the l-th DyGIN layer obtains Enter the TGP layer and adjust the pooling ratio hyperparameter r pooled Perform graph collapse processing on the current dynamic graph structure to obtain the corresponding pooled feature tensor and the adjacency matrix
[0076] The TGP layer is a new pooling method proposed in this paper. It not only considers the topological structure of the graph, but also incorporates the timing information. It is particularly suitable for processing dynamic systems such as power systems with complex spatiotemporal characteristics.
[0077] The core idea of the TGP layer is to cluster the nodes in the graph into “super nodes” while retaining the timing information.
[0078] The specific implementation is as follows:
[0079] 1. Node feature pooling:
[0080]
[0081] in, N represents the tensor composed of node features output by the lth layer TGP, which is also the input of the l+1th layer DyGIN network; l+1 The number of nodes after pooling in the corresponding time series graph collapse pooling layer is determined by the number of nodes in the lth layer and the pooling ratio hyperparameter, that is, N l+1 =r pooled ×N l ; W t l and represents the learnable parameter matrix.
[0082] 2. Adjacency matrix update:
[0083]
[0084] in, It represents the graph adjacency matrix after the l-th layer TGP pooling, which is also the input of the l+1-th layer DyGIN network.
[0085] In the actual implementation of TGP, a two-dimensional convolutional neural network is used based on a given pooling ratio hyperparameter r pooled The corresponding nodes are clustered into clusters as fused super nodes, where the node dimensions are regarded as different feature extraction channels in a two-dimensional convolutional neural network. This method allows the model to adaptively learn how to optimally aggregate nodes to retain the most important structural information. Through TGP processing, we obtain the reduced-dimensional feature representation and the corresponding new adjacency matrix. These features contain rich spatiotemporal information and greatly reduce the dimension of the data, providing high-quality, low-dimensional input for subsequent transient power angle stability assessment.
[0086] Step 5, feature extraction iteration.
[0087] when When the number of nodes in the corresponding dynamic graph is greater than 1, repeat steps 3 to 4; otherwise, go to step 6.
[0088] In each iteration, the output tensor shape of the DyGIN layer is consistent with the input. This design ensures that when multiple layers of DyGIN are stacked, each layer can maintain a consistent data structure for subsequent processing. At the same time, the TGP layer will gradually reduce the number of nodes until only one node is left, representing the global characteristics of the entire system.
[0089] Step 6: transient power angle stability assessment.
[0090] After completing all iterations, a highly abstract representation of system characteristics can be obtained. The goal of this step is to perform the final transient power angle stability assessment based on these characteristics. The specific implementation is as follows:
[0091] 1. The final feature vector X l Input fully connected layer:
[0092]
[0093] Among them, FC represents the fully connected layer, represents the prediction result of stability, X l is the feature vector obtained for each time slot The concatenated vectors, The function of the fully connected layer is to map high-dimensional features into a two-dimensional output space, corresponding to stable and unstable states.
[0094] 2. Apply the Softmax function to get the probability of stability and instability:
[0095] P(stable),P(unstable)=Softmax(Y)
[0096] The Softmax function converts the output of the fully connected layer into a probability distribution, ensuring that the sum of the two probabilities is 1.
[0097] 3. Make a final judgment based on probability:
[0098] If P(stable)>P(unstable), the system is considered stable; otherwise, the system is considered unstable.
[0099] This evaluation process is end-to-end from the raw power system data to the final stability assessment results, without the need for manual feature engineering. This method can automatically discover and utilize implicit patterns in the data and capture complex relationships that are difficult to identify manually. At the same time, the model not only gives a stable / unstable judgment, but also provides the corresponding probability, which provides engineers with more information for risk assessment. For example, if the model predicts that the probability of system instability is 51%, this indicates that the system is in a critical state and may require more cautious operations. By analyzing the weights of the fully connected layer, the contribution of different features to the final decision can be obtained, which improves the interpretability of the model. Due to the use of highly abstract features, the final evaluation process has a small amount of calculation and is suitable for real-time applications. This makes this method suitable for online monitoring and real-time control of power systems.
[0100] The present invention also needs to construct a loss function for parameter learning. In order to further improve the performance of the model, especially considering the problem of sample imbalance in power system transient stability assessment (usually there are many more stable samples than unstable samples), the embodiment of the present invention uses Focal Loss as the loss function during the training process:
[0101]
[0102] Among them, y is the true label, is the model prediction value, α is the weight factor (taken as 0.25 in the present invention), and γ is the modulation factor (taken as 4 in the present invention). By adjusting α, a higher weight can be given to minority samples (usually unstable samples) to alleviate the impact of sample imbalance. Adjusting the parameter γ makes the model pay more attention to samples that are difficult to classify during training, improving the model's ability to recognize boundary conditions.
[0103] In general, the method proposed in this paper can not only handle large-scale complex power grids, but also adapt to different fault scenarios, providing strong support for the safe and stable operation of power systems. Its efficiency, accuracy and interpretability make it a powerful supplement to traditional methods and is expected to play an important role in future smart grids.
[0104] Example Effect Description
[0105] In order to verify the effectiveness of the dynamic graph model AndyGIN proposed in the present invention in transient power angle stability assessment, the CEPRI-TAS-173 example and the stable and unstable samples generated under the corresponding multi-fault scenarios are used for experiments. The data sample composition of the training set, validation set and test set is the same as that used by the MS-GAT model, which is convenient for subsequent experimental analysis and comparison of the impact of the dynamic graph network on the transient power angle stability assessment performance compared with the simple graph model.
[0106] In actual use, the bus voltage U, bus angle θ, bus active load P and reactive load Q corresponding to 85 bus nodes (bus voltage above 500 kV) of the main grid structure of the power grid in the CEPRI-TAS-173 example are selected to construct the corresponding single sample multivariate time series input The number of multivariate time series d is 340, and the length of the single time series l is 20 sampling points.
[0107] The experimental results of all control models and the k-GAT model used in the present invention on the test set are shown in Table 1.
[0108] Table 1 Test results of different multivariate time series classification models on the CEPRI-TAS-173 example
[0109] Experimental model <![CDATA[A cc / %]]> <![CDATA[P rec / %]]> <![CDATA[R ec / %]]> <![CDATA[F1 value]]> OS-CNN 97.82 98.41 97.64 0.9802 ShapeNet 98.10 98.76 97.69 0.9822 TapNet 94.24 95.64 94.03 0.9483 1NN-ED 82.75 86.47 82.16 0.8426 1NN-DTW-I 86.59 88.33 86.24 0.8727 1NN-DTW-D 87.52 88.94 87.46 0.8819 MLSTM-FCN 85.15 87.32 84.98 0.8613 TodyNet 98.37 98.84 98.06 0.9845 MS-GAT 97.63 98.38 97.35 0.9786 AndyGIN 98.63 99.02 98.47 0.9874
[0110] The selected multivariate time series classification models are as follows: 1) OS-CNN: It extracts time series information based on a one-dimensional convolutional neural network and designs multi-layer convolution blocks in combination with the Goldbach conjecture to achieve theoretically free receptive fields for sequences of any length. It is currently one of the best models for time series classification tasks; 2) ShapeNet. A study of shapelet sequences for multivariate time series classification tasks that can embed shapelet candidate sequences of different lengths into a unified space for classification. 3) TapNet. Use LSTM and multiple groups of one-dimensional convolutions to extract low-dimensional sequential information and multivariate information of time series, and extract high-dimensional feature information of time series through an attention mechanism. 4) 1NN-ED. One of the main baseline models for multivariate time series classification tasks, its essence is a nearest neighbor classifier using Euclidean distance. 5) 1NN-DTW-I and 1NN-DTW-D. Similar to 1NN-ED, it is a time series classification model that uses a nearest neighbor classifier, but it calculates the similarity between unknown samples and known samples based on the dynamic time warping algorithm (DTW). 1NN-DTW-I uses an index to accelerate the nearest neighbor search, and 1NN-DTW-D directly performs a similarity search between unknown and nearest neighbor known samples; 6) MLSTM-FCN. This model uses LSTM and stacked convolutional layers to extract feature information of multivariate time series variables, and adaptively adjusts the contribution and weight of different channel features to the final classification result through compression and excitation modules between convolutional layers. 7) TodyNet. A multivariate time series classification model that uses TCN and GIN stacked on each other, and implements hierarchical pooling of graph topology information by using the TGP graph collapse pooling layer.
[0111] The accuracy rate A cc It is the primary indicator for evaluating the transient power angle stability of the model. The recall rate R ecThe higher the model is, the lower the possibility of "misjudgment of stability" is, and the prediction accuracy P rec The higher the value, the lower the probability that the model will predict a stable sample as unstable. The F1 value reflects the evaluation effect of the model on the imbalanced data set. cc and recall R ec The requirements are high, that is, the model is expected to ensure the prediction accuracy while avoiding misjudging unstable samples as stable samples to avoid power accidents.
[0112] The test results show that the dynamic graph model AndyGIN for grid transient power angle stability assessment proposed in this invention has achieved the best results compared with other multivariate time series classification models and MS-GAT models, with a prediction accuracy of A cc It reached 98.63%, which is higher than the accuracy of the static graph model MS-GAT and the dynamic graph model TodyNet that uses TCN to extract timing features. cc They were improved by 1.10% and 0.26% respectively. Among them, 1NN-ED, 1NN-DTW-I and 1NN-DTW-D are nearest neighbor classifiers that use different methods to calculate the similarity between samples. Since it is difficult to extract the potential spatiotemporal feature information in multivariate time series, the transient stability assessment results are poor. The OS-CNN and TapNet models that use convolutional neural network modules to extract time series feature information can effectively extract time series information in a single time series to a certain extent. In particular, the receptive field of OS-CNN can effectively cover time series of any length, so the transient stability assessment results are relatively good. The ShapeNet model has better prediction effect than the previous two, which is due to its effective use of time series information, but it does not involve the extraction of power grid topology information, so the final prediction result is slightly weaker than the dynamic graph models AndyGIN and TodyNet. For the MS-GAT model proposed in Chapter 3 of this invention, although the power grid topology features can be effectively extracted by considering the feature information between subgraphs of different scales of the power grid, the time features are only extracted through a small number of sampling points and a fully connected network, so the final prediction effect is weaker than AndyGIN. In the above models, TodyNet is a dynamic graph network model with a similar structure to AndyGIN, which can simultaneously extract the temporal and spatial feature information of the power grid. However, the two have different processes for extracting temporal features. TodyNet uses TCN with convolution kernels of different sizes for extraction, while AndyGIN extracts through a multi-head attention mechanism. Compared with TCN, AndyGIN has a stronger ability to extract temporal information in the transient process of the power grid. Therefore, the final transient stability evaluation result of TodyNet is slightly weaker than that of AndyGIN.
[0113] In order to analyze the effectiveness of each component module of the dynamic graph model AndyGIN proposed in the present invention and its contribution to the transient power angle stability assessment of the power grid, a module of the complete AndyGIN is removed to form a new model. The specific model and corresponding modifications are as follows: 1) AndyGIN without Graph: remove the topological feature extraction module in AndyGIN, directly use the MHA time series feature extraction module to extract features from the original multivariate time series data, and input the results into the fully connected network for classification; 2) AndyGIN without DyGraph: use the feature extraction results of the MHA module as node features, generate a unique graph structure through the self-learning graph generation module, use the static GIN network to extract the topological features of the power grid, use the three-layer TGP graph collapse hierarchical pooling and the single-layer global pooling network to pool the results and input them into the fully connected network for classification; 3) AndyGINwithout TGP: use a single block of AndyGIN, remove the TGP layer to directly connect the global pooling and the subsequent fully connected network for classification. The transient stability assessment results of the above three modified models and the original AndyGIN model on the test set are shown in Table 2.
[0114] Table 2 Evaluation results of AndyGIN and its modified models on the test set
[0115]
[0116] It can be seen from the results that the prediction effect of the AndyGIN model is significantly better than the other three models that remove a certain module. Combined with the results of AndyGIN without Graph, it can be seen that the power grid topology information extracted by the graph deep learning network can effectively improve the transient power angle stability assessment effect of the model. For AndyGIN without DyGraph, this experiment shows that by using a dynamic graph model, it is possible to capture information about the changes in the topological structure at different stages of the transient process of the power grid. At the same time, by adding TGP graph collapse hierarchical pooling, the loss of topological information output by the graph model in the graph classification task can be effectively avoided. Based on the above ablation experimental results and analysis, it is shown that each module of AndyGIN proposed in the present invention has a positive gain effect on the transient power angle stability assessment of the power grid.
[0117] In summary, the present invention constructs a graph input according to the topological structure of the power system and the power grid measurement data in the time window from the steady state before the fault occurs to the time of fault removal, uses the graph neural network deep learning model to realize end-to-end mapping, and outputs the prediction result of the transient power angle stability of the power grid; based on the k-dimensional graph neural network (k-GNN), the basic framework of the message passing graph neural network is constructed to realize the feature aggregation and update of subgraphs of different scales of the power grid; based on the graph attention network (GAT), the aggregation function weights of the neighboring nodes in the process of bus node feature update are adaptively adjusted through the multi-head attention mechanism, as a single-layer feature extraction network in the transient stability assessment model; based on the focal loss function Focal Loss, the imbalance problem of the number of positive and negative samples and the training difficulty in transient stability simulation is solved; as a transient stability assessment model based on data-driven, the present invention can effectively mine the potential high-dimensional subgraph region message transmission properties in the power grid, improve the transient stability assessment effect in power systems of different scales and multi-fault scenarios, provide a feasible means for transient stability assessment of the power grid, and provide a feasible idea for integrating the knowledge of the power grid domain into the data-driven stability judgment model.
Claims
1. A method for evaluating the transient power angle stability of a power grid based on a spatiotemporal dynamic graph model, characterized in that: The steps include: Step 1: The multivariate time series of the power grid are trimmed and integrated into the input tensor X, where the mth multivariate time series x m =[x m1 ,x m2 ,...,x md ], m = 1, 2, ..., M, M is the number of multivariate time series, d is the length of a single time series data, x md is the dth data in the mth multivariate time series; along the time dimension, X is divided into S time series slices of equal length X1, X2, …, X S , each time slice corresponds to a time slot, and the time slice X corresponding to time slot t t The length is d / S, t=1,2,...,S; Step 2: Construct the initial dynamic graph G = {G1, G2, ..., G S }, where G t =(V t ,A t ), then V={V1,V2,...,V S } represents a node set, A={A1,A2,...,A S } represents the adjacency matrix set; for each time slot t, two learnable embedding vectors α and β of length M are generated, and the elements in the vectors are completely learnable parameters. The first generation is obtained by random initialization. The vector α is calculated T The product of and β is used as the adjacency matrix A corresponding to time slot t t The initial value of Step 3: For time slot t, slice the corresponding time series X t and the adjacency matrix A corresponding to the time slot t Input into the dynamic graph isomorphic network, the feature tensor composed of all nodes output by the l-th layer dynamic graph isomorphic network Step 4: For time slot t, the feature tensor obtained by the l-th layer dynamic graph isomorphism network is Input the time series graph to collapse the pooling layer, by adjusting the pooling ratio hyperparameter r pooled Perform graph collapse processing on the current dynamic graph structure to obtain the corresponding pooled feature tensor and the adjacency matrix Step 5, feature extraction iteration: When When the number of nodes in the corresponding dynamic graph is greater than 1, repeat steps 3 to 4; otherwise, go to step 6; Step 6: The feature vector obtained for each time slot The data are concatenated into a vector and input into the fully connected layer for binary classification to obtain the transient power angle stability assessment result.
2. The method for evaluating the transient power angle stability of a power grid based on a spatiotemporal dynamic graph model according to claim 1, characterized in that: In step 1, the d-th data x in the m-th multivariate time series md It includes the bus voltage U, bus angle θ, bus active load P and reactive load Q corresponding to the bus nodes of the main grid structure of the power grid. The types of power grid faults include: failure of safety and control device to operate, N-1, N-2, N-3, DC bipolar lockout, single-phase failure to operate due to three-phase short circuit and transient instability of power angle caused by DC restart; the transient process of the power system caused by the fault will cause the power grid topology connection mode to change, but will not affect the total number of bus nodes in the power grid, but will only cause the characteristic representation of the bus node itself to change over time.
3. The method for evaluating the transient power angle stability of a power grid based on a spatiotemporal dynamic graph model according to claim 1, characterized in that: In step 2, the self-learning graph generation module is used to construct an initial adjacency matrix set, the matrix dimension is determined by d, and the adjustable hyperparameters are topk and the total number of time slots n. Then, the association between adjacent time slot graphs is constructed through the graph conversion module to obtain the initial adjacency matrix set.
4. The method for evaluating the transient power angle stability of a power grid based on a spatiotemporal dynamic graph model according to claim 3 is characterized in that: In step 2, the self-learning graph generation module encodes the adjacency matrix using embedding based on a multi-layer perceptron (MLP), and assigns two parameters to each graph node, which respectively represent all the starting nodes and target nodes of the node.
5. The method for evaluating the transient power angle stability of a power grid based on a spatiotemporal dynamic graph model according to claim 1, characterized in that: In step 2, the two learnable embedding vectors α and β are respectively expressed as α=[α t,1 ,α t,2 ,...,α t,M ] and β = [β t,1 ,β t,2 ,...,β t,M ], adjacency matrix A t The initial value of The implementation process is as follows: Among them, argtopk() is used to return A obtained by multiplying α and β. t The indices idx and idy corresponding to the first k largest matrix elements in A; x and y represent the matrix A. t The row and column numbers in the dynamic graph G for each time slot t , when t = 1, the dynamic graph node set is described as V1 = (v 1,1 ,v 1,2 ,...,v 1,N ); when t>1, the set of nodes in the dynamic graph is represented by V t =(v t,1 ,v t,2 ,...,v t,N ,v t-1,1 ,v t-1,2 ,...,v t-1,N ), and add a connecting edge from each node in time slot t-1 to the corresponding node in time slot t, that is, e (t-1,n),(t,n) ,n=1,2,...,N, where N represents the number of nodes.
6. The method for evaluating the transient power angle stability of a power grid based on a spatiotemporal dynamic graph model according to claim 1, characterized in that: In step 3, the calculation formula of the node features output by the first layer dynamic graph isomorphic network is: Where: Represents the feature vector output by the dynamic graph isomorphic network of the first layer of the dynamic graph of node v in the dynamic graph of time slot t; MLP l,t represents the fully connected network to which the isomorphic network of the first layer of dynamic graph belongs in the dynamic graph corresponding to time slot t; u∈N(v,t) represents the neighboring nodes of node v in the dynamic graph of time slot t; ε is a learnable parameter used to adjust the importance of the node's own features; Output the node features of the l-th layer dynamic graph isomorphic network Arranged in matrix form As the input of the lth time-series graph collapse pooling layer, the formula for constructing the feature vector from the node features is as follows: N l Indicates the number of nodes corresponding to this layer.
7. The method for evaluating the transient power angle stability of a power grid based on a spatiotemporal dynamic graph model according to claim 1, characterized in that: In step 4, the calculation process of the time graph collapse pooling layer is as follows: Where: Represents the tensor consisting of the node features output by the collapsed pooling layer of the l-th layer of the temporal graph, N represents the graph adjacency matrix after pooling of the collapsed pooling layer of the l-th layer of the sequential graph. The two are input to the l+1-th layer of the dynamic graph isomorphic network, thereby continuously repeating steps 3 and 4. l+1 The number of nodes after pooling in the corresponding time series graph collapse pooling layer is determined by the number of nodes in the lth layer and the pooling ratio hyperparameter, that is, N l+1 =r pooled ×N l , W t l and represents the learnable parameter matrix.
8. The method for evaluating the transient power angle stability of a power grid based on a spatiotemporal dynamic graph model according to claim 1, characterized in that: In step 4, a two-dimensional convolutional neural network is used based on a given pooling ratio hyperparameter r pooled The corresponding nodes are concentrated into clusters as fused super nodes, where the node dimensions are regarded as different feature extraction channels in a two-dimensional convolutional neural network.
9. The method for evaluating the transient power angle stability of a power grid based on a spatiotemporal dynamic graph model according to claim 1, characterized in that: In step 6, firstly, the final feature vector Input fully connected layer: Among them, FC represents the fully connected layer, The prediction result of stability is represented by the fully connected layer, which maps the high-dimensional features into a two-dimensional output space, corresponding to stable and unstable states; Then apply the Softmax function to get the probabilities of stability and instability: P(stable),P(unstable)=Softmax(Y) The Softmax function converts the output of the fully connected layer into a probability distribution, ensuring that the sum of the two probabilities is 1; Finally, make a final judgment based on probability: If P(stable)>P(unstable), the system is considered stable; otherwise, the system is considered unstable.
10. The method for evaluating the transient power angle stability of a power grid based on a spatiotemporal dynamic graph model according to claim 1, characterized in that: In step 6, Focal Loss is used as the loss function during training: Among them, y is the true label, is the prediction result, α is the weight factor, and γ is the modulation factor.
Citation Information
Patent Citations
Transient stability evaluation method of electric power system based on graph attention network
CN111914486A
Microgrid transient power angle trajectory prediction method based on time-space diagram convolutional neural network of attention mechanism
CN115238980A
Large power grid transient power angle stability assessment method based on high-dimensional map attention network
CN116760015A
Transient voltage stability evaluation model construction method, system, equipment and medium
CN117767442A
Cited By
Power system load online prediction method based on space-time dynamic graph
CN120377247A
