Transient stability evaluation and interpretability analysis method based on Inform-GCN model
By adopting the Infor-GCN model and SHAP interpretation theory in the transient stability evaluation of power systems, the shortcomings of existing methods in characterizing complex spatiotemporal correlation characteristics and model interpretability are solved, and a more efficient and interpretable transient stability evaluation is achieved.
Patent Information
- Application Number
- CN202411913064.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing transient stability evaluation method of power systems lacks characterization capabilities when dealing with complex spatiotemporal correlation characteristics, and the deep learning model is poorly interpretable, making it difficult to explain the decision-making process.
The transient stability evaluation method based on the Infor-GCN model is adopted to characterize the system's synchronization capabilities and spatial correlation through improved adjacency matrix, and an interpretability analysis framework is constructed in combination with SHAP interpretation theory to enhance the interpretability of the model.
It improves the evaluation ability and credibility of the results of the model, enhances the interpretability of the model, and can more accurately characterize the transient stability of the power system and explain the decision-making process.
Smart Images

Figure CN119885857A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power system transient stability assessment and artificial intelligence deep learning technology, and in particular to a transient stability assessment based on an Infor-GCN model and an interpretability analysis method thereof. Background Art
[0002] Driven by the dual carbon goals, new power systems with a high proportion of new energy and power electronic equipment have become a future development trend. However, the complex coupling characteristics and time-varying factors of new power systems have increased sharply, and the system inertia has decreased. When the system is hit by a large disturbance (such as machine cutting, load cutting, short circuit fault, etc.), unbalanced power will spread in the power grid. If the system fails to make timely judgments and carry out effective control, the transient stability of the system will be destroyed, which will lead to chain failures and even large-scale power outages, causing significant losses to the national economy. Therefore, transient stability assessment has always been a key research issue to ensure the stable operation of the power system.
[0003] The existing methods for transient stability assessment of power systems can be roughly divided into classical methods represented by time domain simulation method and direct method and data-driven methods. The time domain simulation method (also known as step-by-step integration, numerical solution method) establishes a set of simultaneous differential-algebraic equations that describe the transient behavior of the power system, and uses numerical integration methods to obtain the time solution of the differential equations of disturbed motion, so as to judge the system stability according to the relative angles of each generator rotor. The direct method is based on Lyapunov stability theory and analyzes the stability of the power system from the energy perspective. It does not need to solve the differential equations of system transients, and judges the system stability by comparing the transient energy of the system at the time of the fault with the critical energy borne by the system. Compared with the classical method, the transient stability assessment method based on data-driven and artificial intelligence relies on its ability to quickly process complex information and good fault tolerance. Without clarifying the mechanism evolution process, it relies on data to quickly mine the correlation between features, overcomes the difficulties in modeling large-scale power systems and the huge amount of calculation, and has become a hot research direction. However, different devices in the power system are cross-coupled in time and space, and there are complex spatiotemporal correlation characteristics between the electrical quantities of the system. The current transient stability assessment scheme is insufficient to characterize the temporal state and spatial characteristics of the measured data. On the other hand, when the transient stability assessment task is completed through a deep learning algorithm, its internal feature extraction and decision-making process are both unknown. The structure of the model is similar to a "black box". It is difficult to study how the model gives a decision result or whether the model makes a decision based on correct physical information, and there is a problem of poor interpretability. Summary of the invention
[0004] The purpose of the present invention is to provide a transient stability assessment and interpretability analysis method based on the Infor-GCN model. Firstly, an improved adjacency matrix is established based on the electrical node coupling strength to characterize the system synchronization capability and describe the spatial correlation. Secondly, a transient stability assessment framework based on the Infor-GCN model is established to effectively improve the assessment capability of the model and the credibility of the results. Finally, an interpretability analysis framework of the stability assessment model is constructed based on the SHAP interpretation theory to explain the model decision results and enhance the model interpretability.
[0005] To achieve the above object, the present invention provides a transient stability assessment and interpretability analysis method based on the Infor-GCN model, comprising the following steps:
[0006] S1. An improved adjacency matrix is established based on the electrical node coupling strength to describe the spatial correlation while characterizing the system synchronization capability;
[0007] S2. Establish a transient stability assessment framework based on the Infor-GCN model to improve the assessment capability of the model and the credibility of the results;
[0008] S3. Based on the SHAP interpretation theory, an interpretability analysis framework for the stable evaluation model is constructed to explain the model decision results and enhance the model interpretability.
[0009] Preferably, in step S1, an improved adjacency matrix is established based on the electrical node coupling strength to characterize the system synchronization capability while describing the spatial correlation. The specific steps are as follows:
[0010] S11. Generate an adjacency matrix describing the spatial relationship based on the actual topological connection of the power system; if there is a connection between nodes, the corresponding element of the classic adjacency matrix is 1, otherwise it is 0;
[0011] S12. An improved adjacency matrix is established based on the node coupling strength to characterize the system synchronization capability. The node coupling strength K is selected to characterize the system synchronization capability while describing the spatial correlation and guiding the extraction of model space and synchronization features. The specific modification of the adjacency matrix is as follows:
[0012]
[0013] Among them, select E i and E j are the voltage amplitudes of nodes i and j in the steady state of the system respectively; if there is a connection between nodes i and j, the corresponding adjacency matrix element k ij Changed from 1 to the coupling strength of the connection line;
[0014] The greater the coupling strength between nodes, the stronger the coherence of the system, the easier it is to maintain synchronization, and the coupling strength will push more nodes into the system synchronization tone. When it is greater than the critical value, the synchronization will be maintained and stable operation will be maintained.
[0015] Preferably, in step S2, a transient stability assessment framework based on the Infor-GCN model is established, and specific steps for improving the assessment capability of the model and the credibility of the results are as follows:
[0016] S21, timing enhancement of power angle features based on the Informer model;
[0017] S22. Build a model for aggregating spatial topological information based on the spectral domain graph convolutional neural network algorithm, and use the product of the spectral domain to replace the convolution operation in the spatial domain;
[0018] S23. Build an overall transient stability assessment operation framework and a comprehensive result output strategy.
[0019] Preferably, in step S21, the nformer model adopts a typical encoding-decoding architecture, which is composed of an improved multi-head probabilistic sparse self-attention mechanism and a feedforward neural network, and information is directly exchanged between input and output, as shown below:
[0020] S211, Probabilistic Sparse Self-Attention:
[0021] The input feature x of the self-attention mechanism is positionally encoded and embedded to obtain the X matrix. X is linearly transformed to obtain the query matrix Q, key matrix K and value matrix V. The expression is as follows:
[0022]
[0023] Among them, W Q , W K , W V is the weight matrix;
[0024] The calculation formula of the self-attention mechanism is as follows:
[0025]
[0026] The multi-head self-attention mechanism simulates the multi-channel feature operation of convolution and integrates the encoding information of different subspaces. The specific formula is as follows:
[0027] head i =Attention(Q i ,K i ,V i ) (4);
[0028] MultiHead(Q,K,V)=Concat(head1,...,headh )W O (5);
[0029] Among them, head i Represents the i-th attention head. MultiHead concatenates h-head attention heads through Concat, and finally passes through the weight matrix W O Output the result;
[0030] The probabilistic sparse self-attention mechanism of selective counting is adopted, and the KL divergence is used to measure the similarity between q and K, so as to screen important q. The probability form of the i-th q attention is:
[0031]
[0032] Among them, q i , k i 、v i are the i-th row of matrices Q, K, and V, respectively, and p(k j ∣q i )=k(q i ,k j ) / ∑ l k(q i ,k l ) Given the probability distribution of k under the i-th q condition, Using an asymmetric exponential kernel function, the sparsity measure of the i-th q is defined as:
[0033]
[0034] In the probabilistic sparse self-attention mechanism, each K only focuses on u important q, and the self-attention is modified as follows:
[0035]
[0036] in, Contains only the first u q of the sparse metric, u = clnL Q , c is a constant sampling factor;
[0037] The exploration metric boundary uses the maximum mean approximation of the q-sparse metric as follows:
[0038]
[0039] Extract U=L based on metric approximation Q LqCy K Dot product pair calculation The overall computational complexity is reduced to
[0040] S212, Generative Decoder:
[0041] A shorter sequence is sampled from the input feature sequence and fed into the decoder as a slice. The specific input vector is as follows:
[0042]
[0043] in, is the selected slice sequence, It is a placeholder for the target output; the decoder outputs all prediction results under the feature sequence in one forward calculation.
[0044] Preferably, in step S22, the convolution operation is as follows: a graph G=(V, E, W) including n nodes and m edges is defined, and the normalized Laplacian matrix L on the graph is:
[0045]
[0046] Where W is the adjacency matrix, I is the identity matrix, and D is the degree matrix, whose diagonal elements are D ii =∑ j W ij ; Perform spectral decomposition on the real symmetric matrix L as follows:
[0047] L=UΛU T (12);
[0048] Among them, the standard orthogonal eigenvector U=[u1,…,u n ], eigenvalue matrix Λ=diag([λ1,…,λ n ]); Select the orthogonal vector as the basis of Fourier transform, and define the Fourier transform on the graph as:
[0049]
[0050] in, The original feature x is passed through the orthogonal basis U T Expression projected onto the spectral domain; define the matrix dot product operator as ⊙, then the spectral graph convolution of two features x and y is:
[0051] x*y=U((U T x)⊙(U T y)) (14);
[0052] For input feature x, U T y=[θ0,…,θ n-1 ] T It can be regarded as a convolution kernel in the spectral domain; the parameter contains n vectors θ, which defines the diagonal matrix g θ =diag([θ0,…,θ n-1]) is the graph convolution kernel, then the graph convolution calculation formula in the spectral domain is:
[0053] x*y=Ug θ U T x (15);
[0054] Introducing Chebyshev polynomials for graph convolution kernel g θ Approximately, we obtain the spectral graph convolution:
[0055]
[0056] In the formula, β k is the coefficient corresponding to the k-th order Chebyshev polynomial; the order of the Chebyshev polynomial represents the receptive field of the graph convolution, and the k-th order polynomial will determine the characteristic information of the k-th order neighborhood node of the fused power system.
[0057] Preferably, in step S23, a transient stability overall assessment operation framework is constructed, and the specific steps of the comprehensive result output strategy are as follows:
[0058] S231, transient stability feature selection and sample generation, select the network node phase θ to supplement the generator power angle δ, and realize information complementation through the training features of the two angles; use the multi-time section information of the system before the fault, the fault stage, and the fault after the fault to form a feature set, and select the moment after the fault is removed as the sample end point;
[0059] The selected original feature set covers the steady state stage before the fault occurs, the time when the fault occurs, and the f and fault removal t cl After the three-stage feature, input selection fixed window [t cl -(k-1)T,t cl +T], T is the sampling period, and k is selected or adjusted according to the specific scenario;
[0060] The transient stability index is used to quantify the transient stability of the power system by the power angle difference of the generator after the disturbance. Its expression is:
[0061]
[0062] After the fault occurs, Δδ max It represents the maximum rotor angle interval between any two synchronous motors in the system. If TSI<0, the system is unstable, otherwise the system is stable.
[0063] S232, power system graph data processing, the power disturbance caused by the fault propagates along the system line, the improved adjacency matrix established in step S12 is used to characterize the difference in connection relationship and coupling strength of different nodes, and the GCN model is trained on the voltage characteristics. The input is the processed graph structure data and the improved adjacency matrix, where the graph structure data is represented as follows:
[0064]
[0065] Among them, the number of columns n represents the number of system nodes, and the number of rows N t Characterize the number of samples, and the input voltage characteristic data is normalized using z-score; the output is the probability value evaluated by the Softmax function, which is used to eliminate the impact of the data dimension on the model results;
[0066] S233, a transient stability assessment model integrating electrical coupling strength and spatiotemporal information, wherein the Informer self-attention layer and the GCN layer extract temporal and spatial features respectively, and the overall input of the model is the graph structure data of the generator power angle timing characteristics and the improved adjacency matrix, wherein the graph structure data follows formula (18), and the matrix elements of non-generator nodes are automatically padded with 0, and the power angle feature data input to the model is also normalized by z-score; the Informer layer outputs the power angle timing trajectory under the subsequent step size; the GCN layer outputs the stability probability value evaluated by the Softmax function;
[0067] The evaluation results of the model are analyzed using the confusion matrix. Three evaluation indicators, namely accuracy, missed detection rate and false positive rate, are selected to quantify the evaluation results of the model separately. The accuracy is measured by the ratio of the number of correctly predicted samples to the test samples. Different types of error rates are defined as follows:
[0068]
[0069] S234. Comprehensive result output strategy.
[0070] Preferably, the specific steps of the comprehensive result output strategy in step S234 are as follows:
[0071] Assume that the output results of GCN are Y1=(y 11 ,y 10 )、Y2=(y 21 ,y 20 ), where y 11 ,y 21 They are the probability outputs of stable labels of the two GCN models;
[0072] The specific comprehensive result output strategy is as follows:
[0073] (1) If min{y 11 ,y 21}>ξ1, the result is stable;
[0074] (2) If max{y 11 ,y 21}<ξ2, the result is instability;
[0075] (3) If both conditions (1) and (2) are not met, the result is uncertain;
[0076] For uncertain samples, a high priority calculation level or ranking will be set to give priority to simulation analysis;
[0077] Among them, the thresholds ξ1 and ξ2 take values close to 1 and 0 respectively. The model will output deterministic results for samples whose classifier output probability is close to 1 or close to 0; for samples with a predicted probability near 0.5, it is difficult to evaluate and they are judged as uncertain samples.
[0078] Preferably, in step S3, an interpretability analysis framework of a stable evaluation model is constructed based on the SHAP interpretation theory, and the specific steps of interpreting the model decision results and enhancing the model interpretability are as follows:
[0079] SHAP’s additive feature attribution method, expressed as a linear function of binary variables, explains the evaluation results of the model based on a single input variable as follows:
[0080]
[0081] Where N is the total number of input features of the transient stability assessment model, z i ′∈{0,1} N Measures whether all N features are included in the model decision path. If the corresponding element of the feature is 1, it means that the feature contributes to the stable evaluation result of the model and is considered in the decision process of the model. On the contrary, if the feature element is 0, it means that the feature does not contribute to the stable prediction of the model and the model does not consider the feature.
[0082] The value is the contribution of the feature. SHAP uses Shapley value to quantify the contribution of each input feature of the data-driven model. i , where the contribution of a given feature i is equal to the average marginal contribution created by the coalition in which the feature participates;
[0083] First, find the feature x i All features except X F A subset M of:
[0084] X F =[x1 x i … x N ] T (twenty four);
[0085] Among them, x i is the i-th eigenvalue, X F is the vector set of input features, x i ∈XF ; For subset M, use the inclusion and exclusion of feature x i The features of each model are trained separately x (M∪{x i}) and f x (M), in the current feature x i Compare the difference between the two model predictions by entering:
[0086] F diff (x i ) = f x (M∪{x i})-f x (M) (25);
[0087] Compare Features x i Marginal value before and after adding to the subset, removing feature x i After all possible subsets The process is repeated for the subset;
[0088] Measuring feature importance φ i The weighted average of all marginal contributions is calculated as follows:
[0089]
[0090] For SHAP with additive feature properties, a unique solution exists if and only if the model satisfies the following three key properties:
[0091] Local accuracy: The sum of the feature Shapley values is equal to the output of the stable evaluation model, and the attributed values of each feature in a single sample also satisfy the additive law:
[0092]
[0093] Missingness: Features that are missing from the original input have no attributable effect on the model output:
[0094]
[0095] Consistency: If the power system TSA model changes so that the marginal contribution of some feature increases or remains unchanged, the attributed value of this feature will also increase or remain unchanged regardless of other inputs;
[0096] For two models f and f′:
[0097]
[0098] Among them, z′\i means that z i′ is set to 0. Based on the above three properties, E[f(x)] is defined as the expected value of the function conditioned on the input feature set of non-zero z′. Then f x (z′)=f(h x (z′)) = E[f(x)];
[0099] Combined with the conditional expected value, the formula can be rewritten as:
[0100]
[0101] Here, |z′| is the number of non-zero entries in z′.
[0102] Therefore, the present invention adopts a transient stability assessment and interpretability analysis method based on the Infor-GCN model with the above structure, which has the following beneficial effects:
[0103] The present invention improves the adjacency matrix by improving the coupling strength of electrical nodes, introduces prior knowledge into the model, and proposes the Infor-GCN model to extract spatiotemporal coupling information and perform feature enhancement in combination with the Informer model of the self-attention mechanism. Then, a comprehensive output strategy is designed for the stable discrimination results of different input features to improve the reliability of the model results. The local and global interpretations of the model are expanded based on the SHAP attribution framework to enhance the interpretability of the transient stability assessment task completed based on the intelligent model.
[0104] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0105] Figure 1 It is a schematic diagram of the Informer model architecture of a transient stability assessment and interpretability analysis method based on the Infor-GCN model of the present invention;
[0106] Figure 2 A GCN network schematic diagram of a transient stability assessment and interpretability analysis method based on the Infor-GCN model of the present invention;
[0107] Figure 3 A schematic diagram of a transient stability framework integrating synchronous knowledge and spatiotemporal information for transient stability assessment and interpretability analysis method based on the Infor-GCN model of the present invention;
[0108] Figure 4 It is a schematic diagram of a characteristic three-stage change process of a transient stability assessment and interpretability analysis method based on the Infor-GCN model of the present invention;
[0109] Figure 5It is a schematic diagram of the structure of an Infor-GCN assessment model of a transient stability assessment based on the Infor-GCN model and an interpretability analysis method thereof of the present invention;
[0110] Figure 6 It is a schematic diagram of a SHAP interpretation framework of a transient stability assessment and interpretability analysis method based on the Infor-GCN model of the present invention;
[0111] Figure 7 A schematic diagram of IEEE16-machine 68-node topology wiring for a transient stability assessment and interpretability analysis method based on the Infor-GCN model of the present invention;
[0112] Figure 8 A SHAP mean diagram of the characteristics of a transient stability assessment and interpretability analysis method based on the Infor-GCN model of the present invention;
[0113] Fig. 9 A schematic diagram of SHAP value distribution of characteristics of a transient stability assessment and interpretability analysis method based on the Infor-GCN model of the present invention;
[0114] Fig.10 A two-dimensional distribution diagram between the voltage phase and the SHAP value of the node 51 of the transient stability assessment and interpretability analysis method based on the Infor-GCN model of the present invention;
[0115] Fig.11 A schematic diagram of the interactive relationship between different generator power angle characteristics of a transient stability assessment and interpretability analysis method based on the Infor-GCN model of the present invention;
[0116] Fig.12 A schematic diagram of two-dimensional distribution between generator power angle values and SHAP values of a transient stability assessment and interpretability analysis method based on the Infor-GCN model of the present invention;
[0117] Fig.13 A schematic diagram of explaining a single sample decision result of a transient stability assessment and interpretability analysis method based on the Infor-GCN model of the present invention. DETAILED DESCRIPTION
[0118] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.
[0119] Unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0120] Example
[0121] As shown in the figure, the present invention provides a transient stability assessment and interpretability analysis method based on the Infor-GCN model, including the following steps:
[0122] S1. An improved adjacency matrix is established based on the electrical node coupling strength to describe the spatial correlation while characterizing the system synchronization capability.
[0123] S11. Generate an adjacency matrix describing spatial relationships based on the actual topological connections of the power system. If there is a connection between nodes, the corresponding element of the classic adjacency matrix is 1, otherwise it is 0.
[0124] S12. Establish an improved adjacency matrix based on the node coupling strength to characterize the system synchronization capability.
[0125] The present invention selects the node coupling strength K to characterize the system synchronization capability and describe the spatial correlation, guiding the extraction of model space and synchronization features. The specific modification of the adjacency matrix is as shown in formula (1):
[0126]
[0127] In the formula, select E i and E j are the voltage amplitudes of nodes i and j in the steady state of the system. If there is a connection between nodes i and j, the corresponding adjacency matrix element k ij Change from 1 to the coupling strength of the connection line. The greater the coupling strength between nodes, the stronger the coherence of the system, the easier it is to maintain synchronization, and the coupling strength will push more nodes into the system synchronization tone. When it is greater than the critical value, it can maintain stable synchronization. Therefore, the system synchronization level depends on the coupling strength of the electrical nodes, and the coupling strength is strongly related to the actual topological parameters of the line.
[0128] S2. Establish a transient stability assessment framework based on the Infor-GCN model to effectively improve the model's assessment capabilities and the credibility of its results.
[0129] S21. Perform time series enhancement on the power angle feature based on the Informer model. As a generator state variable, the power angle feature is difficult to change suddenly, and it is difficult to accurately evaluate it based on the power angle data under the input window. However, the generator power angle is subject to the constraints of the rotor motion differential equation and has significant time-varying properties, which is suitable for the powerful time series modeling capabilities of the self-attention mechanism. The Informer model adopts a typical encoding-decoding architecture, which consists of an improved multi-head probabilistic sparse self-attention mechanism and a feedforward neural network. Information is directly exchanged between input and output, which can retain the time series information of the data to the greatest extent. Its structure is as follows: Figure 1 shown.
[0130] S211, Probabilistic Sparse Self-Attention
[0131] The input feature x of the self-attention mechanism is positionally encoded and embedded to obtain the X matrix, and X is linearly transformed to obtain the query matrix Q, key matrix K and value matrix V.
[0132]
[0133] Among them, W Q , W K , W V is the weight matrix. The calculation formula of the self-attention mechanism is as follows. To avoid the variance of the dot product of self-attention being too large, divide the similarity by A single calculation process consists of two matrix multiplications, which can achieve efficient parallel computing.
[0134]
[0135] The multi-head self-attention mechanism simulates the multi-channel feature operation of convolution and integrates the encoding information of different subspaces. The specific formula is as follows:
[0136] head i =Attention(Q i ,K i ,V i ) (4);
[0137] MultiHead(Q,K,V)=Concat(head1,...,head h )W O (5);
[0138] Among them, head iRepresents the i-th attention head. MultiHead concatenates h-head attention heads through Concat, and finally passes through the weight matrix W O Output the result.
[0139] The computational complexity of the classic point multiplication self-attention is quadratic, and it is inefficient when processing large-scale sample features. In addition, the attention coefficient is sparsely distributed with a long tail, and most of the input features of the power system also conform to the sparse characteristics of the matrix. Therefore, the probabilistic sparse self-attention mechanism of selective counting will be adopted to ensure the prediction performance while reducing the computational complexity. The main steps are as follows: KL divergence is used to measure the similarity between q and K, so as to select important q. The probability form of the attention of the i-th q is:
[0140]
[0141] Among them, q i , k i 、v i are the i-th row of matrices Q, K, and V, respectively, and p(k j ∣q i )=k(q i ,k j ) / Σ l k(q i ,k l ) Given the probability distribution of k under the i-th q condition, Using an asymmetric exponential kernel function, the sparsity measure of the i-th q is defined as:
[0142]
[0143] Therefore, in the probabilistic sparse self-attention mechanism, each K only focuses on u important q, and the self-attention is modified as follows:
[0144]
[0145] in, Contains only the first u q of the sparse metric, u = clnL Q , c is a constant sampling factor. However, when screening important q, it is necessary to traverse all dot products, and the calculation is still relatively complicated. Therefore, the metric boundary is explored and the maximum mean approximation of the q sparse metric is proposed.
[0146]
[0147] Extract U=L based on metric approximation Q LqCy K Dot product pair calculation The overall computational complexity is reduced to When faced with the problem of large-scale power system characteristic time series prediction, the computational complexity of this mechanism is improved compared to classical self-attention.
[0148] S212, Generative Decoder
[0149] Since the efficiency of autoregressive dynamic output is low, and the online time series prediction of the feature of the present invention needs to output the prediction results as quickly as possible, the generative decoder structure is considered to be introduced. Analogous to the slice (start token) in natural language processing, a shorter sequence is sampled from the input feature sequence and fed into the decoder as a slice. The specific input vector is as follows:
[0150]
[0151] in, is the selected slice sequence, is a placeholder for the target output. The decoder can output all prediction results under the feature time sequence in one forward calculation.
[0152] S22. A model for aggregating spatial topological information is constructed based on the spectral domain graph convolutional neural network (GCN) algorithm. The spectral domain product is used to replace the convolution operation in the spatial domain. The GCN network used is as follows: Figure 2 shown.
[0153] The convolution operation on the graph is as follows. Define a graph G = (V, E, W) with n nodes and m edges, then the normalized Laplacian matrix L on the graph is:
[0154]
[0155] Where W is the adjacency matrix, I is the identity matrix, and D is the degree matrix, whose diagonal elements are D ii =Σ j W ij . Perform spectral decomposition on the real symmetric matrix L as follows:
[0156] L=UΛU T (12);
[0157] Among them, the standard orthogonal eigenvector U=[u1,…,u n ], eigenvalue matrix Λ=diag([λ1,…,λ n ]). Select the orthogonal vector as the basis of Fourier transform, and define the Fourier transform on the graph as:
[0158]
[0159] in, The original feature x is passed through the orthogonal basis UT The expression projected onto the spectral domain. Define the matrix dot product operator as ⊙, then the spectral graph convolution of two features x and y is:
[0160] x*y=U((U T x)⊙(U T y)) (14);
[0161] For input feature x, U T y=[θ0,…,θ n-1 ] T It can be regarded as a convolution kernel in the spectral domain. The parameter contains n vectors θ, which define the diagonal matrix g θ =diag([θ0,…,θ n-1 ]) is the graph convolution kernel, then the graph convolution calculation formula in the spectral domain is:
[0162] x*y=Ug θ U T x (15);
[0163] In order to solve the problem that the explicit solution of the eigenvector is difficult and computationally complex, we consider introducing the Chebyshev polynomial to the graph convolution kernel g θ We make an approximation to solve the high cost of Laplace transform and thus obtain the spectral graph convolution:
[0164]
[0165] In the formula, β k is the coefficient corresponding to the k-order Chebyshev polynomial. The order of the Chebyshev polynomial represents the receptive field of the graph convolution, and the k-order polynomial will determine the characteristic information of the k-order neighborhood nodes of the fused power system. However, the larger the k value, the greater the complexity of the calculation. Therefore, the current convolution kernel is mostly limited to considering the information within the first-order neighborhood (k=1), and the dependency of multi-order neighbors is established by stacking multiple layers of graph convolution networks.
[0166] S23, Transient Stability Overall Assessment Operation Framework Figure 3 As shown, the specific research of each part will be explained below.
[0167] S231, Transient stability feature selection and sample generation
[0168] Considering the sources of various electrical quantities, the electrical quantity attributes of the power system include two angles: the unit and the network. Transient power angle stability corresponds to the synchronous operation state between the groups, and the unit disturbance response is used as the information source for stability analysis and judgment, which is intuitive and direct; the network is the link between the units to exchange unbalanced power and suppress the dynamic deviation of the power angle, reflecting the flow of unbalanced energy caused by the fault. Corresponding to whether the power angle of the unit is stable or not, different electrical quantities in the network show differentiated trends as the system changes in stability. Moreover, the stability information represented by the unit electrical quantity and the network electrical quantity is different, and the characteristics of the two angles have their own advantages. Therefore, in order to ensure that the data-driven model learns the stability information represented by different angles, the present invention will select features from the two entry points of the unit and the network to achieve the fusion of information from various angles, thereby improving the performance of stability judgment.
[0169] On the other hand, considering that the lack of interpretability and credibility of data-driven models is an important factor hindering the development of models, the present invention takes improving the credibility and evaluation performance of the model as the starting point, so the selection of model input features also needs to take into account the credibility and evaluation performance of the results. From the analysis of the mechanism of transient power angle stability and the characteristics of electrical quantities, it can be seen that the power angle feature is based on the definition of stability and has an explicit expression with stability. It is the most intuitive and highly explanatory feature, but the power angle feature changes relatively slowly and it is difficult to reflect more significant feature information in a short period of time. The accuracy of model evaluation is limited. Therefore, the present invention will use Infor-GCN to enhance the timing features of short-term power angle trajectories, and then conduct a system stability evaluation to improve the evaluation performance of the features; another feature, considering the physical characteristics of network node features, the node voltage amplitude and phase information can transiently follow the stability changes of the system power angle, such as Figure 4 As shown, the key stability information can be covered in a short period of time, and there is a clear mapping relationship between stability, which can more accurately characterize the transient response of the system to fault shocks and the accumulation state of unbalanced energy, and the evaluation accuracy is high.
[0170] However, the transient power angle instability and voltage instability of the current complex power system are coupled with each other. Although the accuracy of the node voltage parameter for stability assessment is high, there are still cases of missed judgment and misjudgment. The instability judged based on the voltage characteristics is difficult to be a sufficient condition for transient power angle instability. Therefore, the present invention supplements the generator power angle δ on the basis of the selected network node phase θ, realizes information complementarity through the training features of the two angles, enhances the credibility of the results and improves the classification accuracy.
[0171] In addition, the present invention uses multi-time cross-sectional information (three-stage) of system pre-fault, fault stage, and post-fault to form a feature set. Considering the limitation of simulation computing resources and overall evaluation time, the moment after fault removal is selected as the sample end point, such as Figure 4As shown in Figure 2, the system characteristics follow the fault response at the time of fault occurrence and fault removal, so the original feature set is selected to cover the steady-state stage before the fault occurs, the fault occurrence t f and fault removal t cl Considering the different occurrence times and durations of different preset faults in the system, the present invention selects a fixed window [t cl -(k-1)T,t cl +T], T is the sampling period, which is 0.01s. k can be selected or adjusted according to the specific scenario. In the present invention, k is selected as 18, that is, the fixed window length is 0.18s.
[0172] The commonly used transient stability index (TSI) quantifies the transient stability of the power system by the power angle difference of the generator after the disturbance, as shown in formula (18). max It represents the maximum rotor angle interval between any two synchronous motors in the system. If TSI<0, the system is unstable, otherwise the system is stable.
[0173]
[0174] S232, Power System Diagram Data Processing
[0175] Compared with other graph neural networks, GCN considers the actual topological connection of the system when describing the network space topology. The power disturbance caused by the fault propagates along the system line, so the improved adjacency matrix established in step S12 can be used to characterize the difference in connection relationship and coupling strength of different nodes. Then, the GCN model is trained for voltage characteristics, and the input is the processed graph structure data (voltage phase) and the improved adjacency matrix, where the graph structure data is represented as follows:
[0176]
[0177] Among them, the number of columns n represents the number of system nodes, and the number of rows N t Characterize the number of samples; To eliminate the impact of data dimension on model results, the input voltage feature data is normalized using z-score; The output is the probability value evaluated by the Softmax function. For this classification problem, the model uses the cross entropy loss function to measure the gap between the predicted value and the true value.
[0178] S233, Transient stability assessment model integrating electrical coupling strength and spatiotemporal information
[0179] The Infor-GCN model that integrates coupling strength and spatiotemporal information is as follows Figure 5As shown in the figure, the Informer self-attention layer and the GCN layer can extract temporal and spatial features respectively, and mine more stability-related temporal and spatial information for power grid transient stability analysis.
[0180] The overall input of the model is the graph structure data of the generator power angle timing characteristics and the improved adjacency matrix. The graph structure data uses formula (18), and the matrix elements of non-generator nodes are automatically padded with 0. The power angle feature data input to the model is also normalized using z-score. The Informer layer outputs the power angle timing trajectory under the subsequent step size. The GCN layer outputs the stable probability value evaluated by the Softmax function.
[0181] In addition, as a binary classification problem, the confusion matrix is used to analyze the evaluation results of the model, as shown in Table 1. Considering that in the actual operation of the power system, missed judgment (instability samples are judged as stable, False Dismissal Rate, FD) is more harmful than misjudgment (stable samples are judged as unstable, False Alarm Rate, FA), so the accuracy rate, missed judgment rate and misjudgment rate are selected to quantify the evaluation results of the model.
[0182] Table 1 Confusion matrix of transient power angle stability assessment
[0183]
[0184] Among them, the accuracy (AC) is measured by the ratio of the number of correctly predicted samples to the test samples, and different types of error rates are defined as formula (20) and formula (21) respectively.
[0185]
[0186] S234, comprehensive result output strategy
[0187] The transient stability rapid assessment framework proposed in the present invention considers the following two scenarios when applied online: one is for the screening and queuing of anticipated accidents in the online safety analysis of the power system, working together with the online time domain simulation to improve the speed of traversal analysis of the accident table in the online operation scenario. In the online safety analysis of the system, TSA needs to perform a hypothetical assessment of all possible fault conditions of the system under a certain scheduling scheme within 10 minutes to complete the safety verification of the scheduling instructions. Considering the expansion of the system scale and the proportion of new energy access, the fault scenarios of the system online evaluation are massive, and simulation verification in a short time is difficult to achieve. The existing online TSA verification is mostly for the power grid dispatchers to screen key anticipated faults for evaluation based on experience, which is highly dependent on the experience of the operating personnel and has a low fault tolerance rate. The evaluation framework proposed in the present invention can supplement the above-mentioned shortcomings of anticipated fault screening, quickly screen out a large number of anticipated accidents with confirmed results (obviously unstable or stable) in a relatively short time, and mark the accidents that may threaten the stability of the system or are critically unstable as uncertain samples, and perform detailed simulation analysis on the uncertain samples, thereby improving the efficiency of online analysis of operating conditions.
[0188] Another application scenario is to assist decision-making in transient stability analysis of the system after a large disturbance occurs. When the framework of the present invention is applied online, it performs online evaluation based on the disturbed trajectory measured by the system, selects the moment of system fault removal, reads the real-time electrical data within the first step (i.e., half a cycle of the PMU) after the fault is removed, extracts a total of 18 steps (9 cycles) of input features, and performs stable sorting of samples in different scenarios.
[0189] For data-driven probabilistic statistical learning, its operation results are somewhat uncertain and uncontrollable. The above application scenarios all place high demands on the accuracy of TSA. Therefore, in order to ensure the highest degree of accuracy, this section will divide the results into two categories: certain (clearly stable or unstable samples) and uncertain (critically stable samples) based on the output probability value threshold index of the classifier. For samples with uncertain output results, the final results can be determined based on simulation when working together, or a higher ranking can be obtained when assisting decision-making, giving priority to time domain simulation.
[0190] Considering that the response periods of the two angle characteristics of generator power angle and node voltage are different, the transient information contained is different, and the corresponding optimal model structure parameters are also different. Therefore, the present invention will conduct parallel evaluations on the GCN models of the above two angle characteristics respectively. Since TSA requires high reliability, misjudgment may bring catastrophic consequences. The present invention will design a comprehensive output strategy for the above model to ensure the reliability of the model results on the basis of theoretical credibility and avoid misjudgment to the greatest extent. A comprehensive output strategy is designed for the above GCN results to obtain the final stable result of the model. Assume that the output results of the above GCN are Y1=(y 11 ,y 10)、Y2=(y 21 ,y 20 ), where y 11 ,y 21 These are the probability outputs of stable labels of the two GCN models. To reduce the possibility of misjudgment, the specific comprehensive result output strategy is as follows:
[0191] (1) If min{y 11 ,y 21}>ξ1, the result is stable.
[0192] (2) If max{y 11 ,y 21}<ξ2, the result is instability.
[0193] (3) If both conditions (1) and (2) are not met, the result is determined to be uncertain. For uncertain samples, when the transient stability assessment framework proposed in the present invention works together with the time domain simulation, a high priority calculation level or ranking will be set, and simulation analysis will be performed first.
[0194] Among them, the thresholds ξ1 and ξ2 take values close to 1 and 0 respectively. Therefore, the model will output a deterministic result (stable or unstable) for samples whose classifier output probability is close to 1 (stable) or close to 0 (instability); for samples with a predicted probability near 0.5 (critical stability), it is difficult to evaluate and they are judged as uncertain samples. In short, the framework proposed in the present invention can give clear stable or unstable results for clear and easy-to-distinguish samples, and will output uncertain results for samples that are difficult to judge, such as critical stability. For uncertain samples, simulation can be performed by setting priority levels, thereby reducing the burden of time domain simulation computing resources without affecting the accuracy and speed of evaluation. The comprehensive output results of the above two GCNs can prevent the serious harm caused by the system's incorrect judgment of critical samples, thereby improving the reliability and practical value of the model.
[0195] S3. Based on the SHAP interpretation theory, an interpretability analysis framework for the stable evaluation model is constructed to explain the model decision results and enhance the model interpretability.
[0196] SHAP is a method based on Shapley value to explain machine learning models. It provides a global explanation method based on the local explanation of Shapley value. In the transient stability assessment problem of power system, the predicted value of the stability assessment model under a single sample corresponds to the total expenditure in the cooperative game, and the difference between the actual prediction corresponding to the input features of the TSA model and the average prediction of all samples corresponds to the profit in the game. Based on this mapping relationship, SHAP regards the electrical input features of the stability assessment model as contributors and constructs a simple model to approximate the nonlinear complex model to be explained (black box neural network), such as Figure 6As shown. Where f is the original transient stability assessment model to be interpreted, and g is the interpretation model. There is a mapping function x=h between the simplified input x used in the interpretation model and the original TSA input x′. x (x′), and in addition, the explanation model ensures that for any feature Whenever z′≈x′, then g(z′)≈f(h x (z′)).
[0197] SHAP’s additive feature attribution method, expressed as a linear function of binary variables, can explain the evaluation results of the model based on a single input variable as follows:
[0198]
[0199] Analogous to the cooperative game model, where N is the total number of input features of the transient stability assessment model, z i ′∈{0,1} N Measures whether all N features are included in the model decision path. If the corresponding element of the feature is 1, it means that the feature contributes to the stable evaluation result of the model and is considered in the decision-making process of the model. Conversely, if the feature element is 0, it means that the feature does not contribute to the stable prediction of the model and the model does not consider the feature. The value is the contribution of the feature. SHAP uses Shapley value to quantify the contribution of each input feature of the data-driven model. i , where the contribution of a given feature i is equal to the average marginal contribution created by the coalition in which the feature participates. First, find i All features except X F A subset M of:
[0200] X F =[x1 x i … x N ] T (twenty four);
[0201] Among them, x i is the i-th eigenvalue, X F is the vector set of input features, x i ∈X F For subset M, include and exclude feature x i The features of each model are trained separately x (M∪{x i}) and f x (M), in the current feature x i Compare the difference between the two model predictions by entering:
[0202] F diff (x i ) = f x(M∪{x i})-f x (M) (25);
[0203] To compare feature x i The marginal value before and after adding to the subset, for removing feature x i After all possible subsets The process is repeated for each subset. Combining the above equation, the feature importance φ is measured i The weighted average of all marginal contributions is calculated as follows:
[0204]
[0205] In addition, for SHAP with additive feature properties, a unique solution exists if and only if the model satisfies the following three key properties:
[0206] 1) Local accuracy: The sum of the feature Shapley values is equal to the output of the stable evaluation model, and the attributed values of each feature in a single sample also satisfy the additive law:
[0207]
[0208] 2) Missing: Features missing from the original input have no attributable effect on the model output:
[0209]
[0210] 3) Consistency: If the power system TSA model changes so that the marginal contribution of some features increases or remains unchanged, the attribution value of this feature will increase or remain unchanged regardless of other inputs. That is, for two models f and f′:
[0211]
[0212] Among them, z′\i means that z i ′ is set to 0. Based on the above three properties, E[f(x)] is defined as the expected value of the function conditioned on the input feature set of non-zero z′, then f x (z′)=f(h x (z′))=E[f(x)]. Combined with the conditional expectation, the formula can be rewritten as:
[0213]
[0214] Among them, |z′| is the number of non-zero items in z′. Therefore, the size of the SHAP value directly quantifies the influence of each input feature on the final prediction result of the model, thereby revealing the decision basis of the model output result.
[0215] The role of the temporary stability assessment framework proposed in the present invention can be understood as, on the one hand, handing over the simple large disturbance scenarios in the accident table that need to be analyzed online to the intelligent algorithm for evaluation, and leaving the large disturbance scenarios that are difficult to evaluate to the time domain simulation, thereby reducing the waste of precious time domain simulation computing resources; on the other hand, the temporary stability assessment framework can also be understood as a ranking system, which provides the time domain simulation system with the importance ranking of large disturbance examples that need to be analyzed within a limited time, thereby improving the utilization efficiency of time domain simulation computing resources. The overall operation framework can be divided into the following parts:
[0216] First, considering the model training efficiency and stability discrimination effect, the model input features are selected from the two perspectives of the unit and the network, and the input features of the two angles of the selected generator power angle and node voltage phase are selected. The node voltage feature follows the transient response of the system, covers a wealth of stability-related information, and has a high evaluation accuracy. The GCN model of electrical coupling strength is introduced for judgment. However, the power angle feature of the generator is difficult to instantaneously reflect the fault and response information in the short term. Infor-GCN is used to enhance the timing features for stability evaluation.
[0217] Secondly, considering the differences in the stability information represented by the characteristics of the generator and the network node, the optimal structure and parameters of the model are different, and the response time of the two angle characteristics is also different. Therefore, the GCN and Infor-GCN models with different characteristics are evaluated in parallel to ensure accuracy while reducing the complexity of the model.
[0218] Then, considering that the data-driven model is statistical probability learning, the probability value of the output result is used for classification judgment. Therefore, the idea of integration is followed, and a comprehensive strategy is designed based on the output probability of the sub-classifier. The final result is output based on the threshold comparison, and the result is divided into certain and uncertain samples. The uncertain samples will be prioritized for time domain simulation, thereby improving the reliability of the evaluation results.
[0219] Finally, based on the SHAP interpretation theory, an interpretability analysis framework for the stable evaluation model is constructed to explain the model decision results and enhance the model interpretability.
[0220] To verify the feasibility of the proposed algorithm, the present invention builds the Informer and GCN frameworks in the Pytorch environment. The PC configuration is Intel Core i5-12400 CPU 2.50GHz / 16GB RAM, and the MATLAB Power System Toolbox 3.0 simulation tool is used to generate transient samples. The example uses the IEEE 16-machine 68-node system containing the equivalent power grid of New England, New York, and New Jersey in the United States as the test system. The system includes 16 synchronous generators, 68 nodes, and 86 transmission lines, such as Figure 7 shown.
[0221] In order to cover the system response under different fault scenarios, the sample load level is set to fluctuate between 75% and 125% of the original load, and the load level of individual nodes is randomly changed to determine the representative load demand, and the corresponding generator output is configured to achieve feasible power flow adjustment of the system, thereby enriching the sample library and improving the difficulty of training the stability judgment model and the applicability of the model after training. The fault type is set to the most serious three-phase short circuit fault; the fault location is selected as the 66 transmission lines of the system without transformers close to any node; the short circuit start time is 0.1s, the removal time is 1 to 11 cycles after the fault with a cycle as the step size (cycle is 0.01s), and the simulation time is 5s. Based on the above simulation conditions, 10,000 samples are generated, including 8,434 stable samples and 1,566 unstable samples. The following different examples are set to verify the advantages of this solution.
[0222] (1) Performance comparison of different input features
[0223] The present invention verifies the influence of the selected features on the stability judgment performance of the model. The input uses the data of the three-stage type of each input feature in the table with a total of 18 steps. The model selects the GCN model with the same 3-layer structure. The test results are shown in Table 2. As can be seen from Table 2, whether in the characteristics of the unit or network node dimensions, the node voltage phase feature has a relatively superior evaluation accuracy, with an accuracy of up to 99.8%. In addition, considering the mapping relationship between the input features and the output labels is an important factor in characterizing the credibility of the output results. There is a group mapping relationship between the voltage phase feature and stability, but the power angle feature is used as a system synchronization criterion, and there is a clear explicit expression between the transient power angle stability, so the model trained by the power angle feature has a stronger credibility in theory; at the same time, the accuracy of the power angle feature in the test results is higher than that of other features in the unit dimension. Therefore, starting from the response data of the two dimensions of the generator and the network, selecting the node voltage phase and generator power angle features is more conducive to the model to extract stability information at different levels, proving the effectiveness of the input feature selection.
[0224] Table 2 Stability judgment performance of different input features
[0225]
[0226] (2) Comparison of model stability judgment performance
[0227] For the power angle feature under a fixed window of 18 steps, the Infor-GCN model proposed in this invention not only incorporates the coupling strength parameter, but also takes into account the enhancement of the feature spatiotemporal information, thereby improving the performance of the power angle feature classifier. This section will test the discrimination performance of different models for a fixed 18-step power angle input sequence, and the specific evaluation index results are shown in Table 3. Among them, GCN-K represents an improved graph convolutional neural network with the introduction of coupling strength.
[0228] Table 3 Stability judgment performance of the model based on power angle characteristics
[0229]
[0230] From the results in Table 3, it can be seen that after the model proposed in the present invention enhances the timing features and extracts the coupled spatial topological relationship, the classifier of the short-term power angle feature has been improved in terms of discrimination accuracy, missed judgment rate and misjudgment rate. In particular, the number of missed samples in the model output results is reduced, and the harm to the system operation is greatly reduced. Among them, the accuracy of the Infor-GCN model reached 99.7%, which is 81.3% higher than CNN, 5.1% higher than conventional GCN, and 0.1% higher than the improved GCN-K, indicating that considering the spatiotemporal coupling relationship plays an important role in capturing the dependency between the power angles of generators. In addition, the accuracy of the Infor-GCN model proposed in the present invention reached more than 99.7%, the missed judgment rate was 96% higher than CNN, and 57% higher than conventional GCN, and it has reached the stable judgment performance of the integrated output with the voltage feature sub-classifier.
[0231] (3) Comprehensive output strategy verification
[0232] Formulating a reasonable comprehensive output strategy is particularly important to reduce the number of missed and misjudged samples of the model. If the threshold ξ1 increases (the requirement for judging stability increases), the possibility of missed judgment by the system decreases; similarly, when the threshold ξ2 decreases (the requirement for judging instability increases), the number of samples misjudged by the system will decrease, but the changes in the above two thresholds will lead to an increase in the final uncertain samples, which will increase the burden of online time domain simulation. Therefore, the setting of the threshold plays an important role in the final result. This section will test the final judgment under different thresholds to avoid missed and misjudged samples to the greatest extent while ensuring that the uncertain samples are within a small range, verifying the effectiveness of the output strategy. This section selects 2000 samples from each test set for the output of the above two sub-classifier models, and sets different thresholds to judge the final results.
[0233] Table 4 Comprehensive output results
[0234]
[0235] As shown in Table 4, according to the test results under different threshold settings, after adopting the comprehensive strategy output, it can be determined that there are no missed and misjudged samples in the sample, the model accuracy reaches 100%, and the proportion of output uncertain samples can be controlled within 3%, indicating that the model has excellent fault discrimination ability.
[0236] By testing the final output results through the threshold setting in the table, it is found that as the threshold ξ1 increases, the proportion of uncertain samples increases, and when the threshold ξ1 is reduced, missed judgments will occur in the determined samples, and when the threshold ξ2 is increased, misjudgments will occur in the determined samples, which matches the analysis of the impact of the threshold in the previous article. When the system is guaranteed not to make wrong judgments, the proportion of uncertain samples output by the model can be within 3%. In the online analysis of large-scale samples, the computational burden of time domain simulation is greatly reduced, playing a key role in actual auxiliary decision-making.
[0237] (4) Model interpretability analysis
[0238] 1) Global interpretation of the GCN model for node voltage phase characteristics
[0239] The present invention will Figure 7 The voltage phase of the IEEE68 bus system shown in the figure is used as the feature input model. Through the SHAP attribution theory, the SHAP mean size of the feature is used to obtain the importance ranking of the feature, as shown in Figure 8 As shown. The ordinate is the node phase features ranked in the top 20 in terms of importance, and the abscissa is the SHAP mean of the features, that is, the SHAP mean of all input features in all input samples, representing the average impact of each feature on the model output. The larger the mean of the feature, the more the model pays attention to the node feature, the closer the relationship between the feature and transient stability is, and the greater the impact on the final decision output of the model. According to Figure 8 As a result, the voltage phase at node 51 and node 68 in the system is more important to the model decision.
[0240] On this basis, this section traverses the samples to give the distribution differences of feature SHAP values, such as Fig. 9 Each point in the figure corresponds to a sample of the model. The horizontal axis represents the SHAP value of the feature in the sample, and the vertical axis is the feature number. Figure 8 The color indicates the value of the feature itself. The redder the sample point, the larger the value of the feature, and vice versa. Fig. 9 It can be seen that the variance of the numerical distribution of features with higher SHAP average values is relatively large. For example, the variance of the numerical distribution of the voltage phase of node 51, which is more important, is also higher. The difference between different samples is large, the stability information is richer, and it is easier for the model to distinguish. Therefore, the model pays more attention to this feature. At the same time, there is a certain correlation between the numerical size of each node feature and the SHAP value. For example, the voltage phase of node 51 and node 68, the voltage phase of node 51 is positively correlated with the SHAP value. The higher the voltage phase value, the positive and larger the corresponding SHAP value; while the voltage phase of node 68 is negatively correlated with the SHAP value. The higher the voltage phase value, the negatively increasing the corresponding SHAP value.
[0241] Furthermore, the SHAP theory is used to give a two-dimensional distribution diagram between the key characteristic values (51 node voltage phases) and the SHAP values, as shown in Fig.10 shown.
[0242] analyze Fig.10 It can be seen that when the voltage phase in the figure presents a negative value, the characteristic SHAP value has a negative impact, pushing the model decision result to evolve towards instability (label 0); in the simulation test, the normal operating level of the node voltage phase is around 0.1rad, so when the phase value reaches the normal level, the SHAP value turns positive, adding a push in the stable direction (label 1) for the model decision result.
[0243] 2) Global interpretation of the Infor-GCN model for generator power angle characteristics
[0244] The interpretation of the power angle input sequence focuses on the interaction between the power angle characteristics of different generators and the relationship between the model decision and the corresponding power angle value. Among them, the influence of the power angles of the first seven positions that the model pays more attention to is as follows: Fig.11 As shown. The horizontal axis is the characteristic SHAP value, the diagonal elements are the main influence of each generator power angle, and the non-diagonal elements represent the interaction between the feature and other power angles. Taking the power angle feature of generator No. 9 as an example, the power angles of the other 6 generators have an impact on their own SHAP values, especially generator No. 14. When the power angle value of generator No. 14 is large (red sample), its SHAP value will have a large negative impact, making it easier for the model to obtain a decision result of 0 (i.e. instability).
[0245] Considering the relationship between model decision and corresponding power angle value, a two-dimensional distribution diagram between the power angle value of key generators and SHAP value is given as follows: Fig.12 As shown in the figure, there is an inverse relationship between the generator power angle and stability. As the power angle value is greater than a certain threshold, the characteristic SHAP value is less than zero and increases negatively, and the decision result develops towards instability (label 0), which proves that the decision basis of the model matches the power angle stability judgment mechanism.
[0246] 3) Local explanation of single sample classification results
[0247] Based on the SHAP theory, the results of a single sample of the model are partially explained. Three samples with different stable results are randomly selected from the test data set, and the model classification results are explained by SHAP respectively, as follows: Fig.13 The red / blue part represents the features with positive / negative SHAP values, respectively. The larger the area, the larger the absolute value of the SHAP value of the feature, which means the greater the impact on the model classification result. The algebraic sum of the SHAP values corresponding to each feature is the model output value.
[0248] Fig.13 At the same time, several features with the largest SHAP values based on which the model judges stability are given, which intuitively demonstrates the degree of influence of different features on the final result and the process of generating the final decision result. When the output value is greater than 0.5, the model considers the system to be stable, otherwise it is unstable. Under different stability conditions, the SHAP value of the same feature and the positive and negative influence of the feature on the result are different, indicating that under different fault conditions, the change amplitude and change trend of system features (power angle or voltage phase) at different positions are different, and the impact on the model is also different. Taking the power angle feature of generator No. 9 as an example, when the decision result is stable (see the first sample), the power angle 9 produces a positive contribution, that is, it pushes the final output to move toward the stable label. On the contrary (see the second sample), the power angle 9 produces a negative contribution, and the result develops towards instability, indicating that the power angle 9 feature has a positive change relationship with the decision result.
[0249] Therefore, the present invention adopts the above-mentioned transient stability assessment and interpretability analysis method based on the Infor-GCN model, improves the adjacency matrix through the electrical node coupling strength, introduces prior knowledge into the model, and combines the Informer model of the self-attention mechanism to propose the Infor-GCN model to extract spatiotemporal coupling information and perform feature enhancement; then, a comprehensive output strategy is designed for the stability discrimination results of different input features to improve the reliability of the model results; based on the SHAP attribution framework, the local and global interpretations of the model are expanded to enhance the interpretability of the transient stability assessment task completed based on the intelligent model.
[0250] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A transient stability assessment and interpretability analysis method based on the Infor-GCN model, characterized in that: The following steps are involved: S1. An improved adjacency matrix is established based on the electrical node coupling strength to describe the spatial correlation while characterizing the system synchronization capability; S2. Establish a transient stability assessment framework based on the Infor-GCN model to improve the assessment capability of the model and the credibility of the results; S3. Based on the SHAP interpretation theory, an interpretability analysis framework for the stable evaluation model is constructed to explain the model decision results and enhance the model interpretability.
2. According to claim 1, a transient stability assessment and interpretability analysis method based on the Infor-GCN model is characterized by: In step S1, an improved adjacency matrix is established based on the electrical node coupling strength to characterize the system synchronization capability and describe the spatial correlation. The specific steps are as follows: S11. Generate an adjacency matrix describing the spatial relationship based on the actual topological connection of the power system; if there is a connection between nodes, the corresponding element of the classic adjacency matrix is 1, otherwise it is 0; S12. An improved adjacency matrix is established based on the node coupling strength to characterize the system synchronization capability. The node coupling strength K is selected to characterize the system synchronization capability while describing the spatial correlation and guiding the extraction of model space and synchronization features. The specific modification of the adjacency matrix is as follows: Among them, select E i and E j are the voltage amplitudes of nodes i and j in the steady state of the system respectively; if there is a connection between nodes i and j, the corresponding adjacency matrix element k ij Changes from 1 to the coupling strength of this connection line.
3. According to claim 2, a transient stability assessment and interpretability analysis method based on the Infor-GCN model is characterized in that: In step S2, a transient stability assessment framework based on the Infor-GCN model is established. The specific steps to improve the assessment capability of the model and the credibility of the results are as follows: S21, timing enhancement of power angle features based on the Informer model; S22. Build a model for aggregating spatial topological information based on the spectral domain graph convolutional neural network algorithm, and use the product of the spectral domain to replace the convolution operation in the spatial domain; S23. Build an overall transient stability assessment operation framework and a comprehensive result output strategy.
4. According to claim 3, a transient stability assessment and interpretability analysis method based on the Infor-GCN model is characterized in that: In step S21, the nformer model adopts a typical encoding-decoding architecture, which consists of an improved multi-head probabilistic sparse self-attention mechanism and a feedforward neural network, and directly exchanges information between input and output, as shown below: S211, Probabilistic Sparse Self-Attention: The input feature x of the self-attention mechanism is positionally encoded and embedded to obtain the X matrix. X is linearly transformed to obtain the query matrix Q, key matrix K and value matrix V. The expression is as follows: Among them, W Q , W K , W V is the weight matrix; The calculation formula of the self-attention mechanism is as follows: The multi-head self-attention mechanism simulates the multi-channel feature operation of convolution and integrates the encoding information of different subspaces. The specific formula is as follows: head i =Attention(Q i ,K i ,V i )(4); MultiHead(Q,K,V)=Concat(head1,...,head h )W O (5); Among them, head i Represents the i-th attention head. MultiHead concatenates h-head attention heads through Concat, and finally passes through the weight matrix W O Output results; The probabilistic sparse self-attention mechanism of selective counting is adopted, and the KL divergence is used to measure the similarity between q and K, so as to screen important q. The probability form of the i-th q attention is: Among them, q i , k i 、v i are the i-th row of matrices Q, K, and V, respectively, and p(k j ∣q i )=k(q i ,k j ) / Σ l k(q i ,k l ) Given the probability distribution of k under the i-th q condition, Using an asymmetric exponential kernel function, the sparsity measure of the i-th q is defined as: In the probabilistic sparse self-attention mechanism, each K only focuses on u important q, and the self-attention is modified as follows: in, Contains only the first u q of the sparse metric, u = clnL Q , c is a constant sampling factor; The exploration metric boundary uses the maximum mean approximation of the q-sparse metric as follows: Extract U=L based on metric approximation Q LqCy K Dot product pair calculation The overall computational complexity is reduced to S212, Generative Decoder: A shorter sequence is sampled from the input feature sequence and fed into the decoder as a slice. The specific input vector is as follows: in, is the selected slice sequence, It is a placeholder for the target output; the decoder outputs all prediction results under the feature sequence in one forward calculation.
5. The transient stability assessment and interpretability analysis method based on the Infor-GCN model according to claim 3 is characterized by: In step S22, the convolution operation is as follows: a graph G = (V, E, W) containing n nodes and m edges is defined, and the normalized Laplacian matrix L on the graph is: Where W is the adjacency matrix, I is the identity matrix, and D is the degree matrix, whose diagonal elements are D ii =Σ j W ij ; Perform spectral decomposition on the real symmetric matrix L as follows: L=UΛU T (12); Among them, the standard orthogonal eigenvector U=[u1,…,u n ], eigenvalue matrix Λ=diag([λ1,…,λ n ]); Select the orthogonal vector as the basis of Fourier transform, and define the Fourier transform on the graph as: in, The original feature x is passed through the orthogonal basis U T Expression projected onto the spectral domain; define the matrix dot product operator as ⊙, then the spectral graph convolution of two features x and y is: x*y=U((U T x)⊙(U T y))(14); For input feature x, U T y=[θ0,…,θ n-1 ] T It can be regarded as a convolution kernel in the spectral domain; the parameter contains n vectors θ, which defines the diagonal matrix g θ =diag([θ0,…,θ n-1 ]) is the graph convolution kernel, then the graph convolution calculation formula in the spectral domain is: x*y=Ug θ U T x(15); Introducing Chebyshev polynomials for graph convolution kernel g θ Approximately, we obtain the spectral graph convolution: In the formula, β k is the coefficient corresponding to the k-th order Chebyshev polynomial; the order of the Chebyshev polynomial represents the receptive field of the graph convolution, and the k-th order polynomial will determine the characteristic information of the k-th order neighborhood node of the fused power system.
6. The transient stability assessment and interpretability analysis method based on the Infor-GCN model according to claim 3 is characterized by: In step S23, the overall transient stability assessment operation framework is constructed, and the specific steps of the comprehensive result output strategy are as follows: S231, transient stability feature selection and sample generation, select the network node phase θ to supplement the generator power angle δ, and realize information complementation through the training features of the two angles; use the multi-time section information of the system before the fault, the fault stage, and the fault after the fault to form a feature set, and select the moment after the fault is removed as the sample end point; The selected original feature set covers the steady state stage before the fault occurs, the time when the fault occurs, and the f and fault removal t cl After the three-stage feature, input selection fixed window [t cl -(k-1)T,t cl +T], T is the sampling period, and k is selected or adjusted according to the specific scenario; The transient stability index is used to quantify the transient stability of the power system by the power angle difference of the generator after the disturbance. Its expression is: After the fault occurs, Δδ max It represents the maximum rotor angle interval between any two synchronous motors in the system. If TSI<0, the system is unstable, otherwise the system is stable. S232, power system graph data processing, the power disturbance caused by the fault propagates along the system line, the improved adjacency matrix established in step S12 is used to characterize the difference in connection relationship and coupling strength of different nodes, and the GCN model is trained on the voltage characteristics. The input is the processed graph structure data and the improved adjacency matrix, where the graph structure data is represented as follows: Among them, the number of columns n represents the number of system nodes, and the number of rows N t Characterize the number of samples, and the input voltage characteristic data is normalized using z-score; the output is the probability value evaluated by the Softmax function, which is used to eliminate the impact of the data dimension on the model results; S233, a transient stability assessment model integrating electrical coupling strength and spatiotemporal information, wherein the Informer self-attention layer and the GCN layer extract temporal and spatial features respectively, and the overall input of the model is the graph structure data of the generator power angle timing characteristics and the improved adjacency matrix, wherein the graph structure data follows formula (18), and the matrix elements of non-generator nodes are automatically padded with 0, and the power angle feature data input to the model is also normalized by z-score; the Informer layer outputs the power angle timing trajectory under the subsequent step size; the GCN layer outputs the stability probability value evaluated by the Softmax function; The evaluation results of the model are analyzed using the confusion matrix. Three evaluation indicators, namely accuracy, missed detection rate and false positive rate, are selected to quantify the evaluation results of the model separately. The accuracy is measured by the ratio of the number of correctly predicted samples to the test samples. Different types of error rates are defined as follows: S234. Comprehensive result output strategy.
7. The transient stability assessment and interpretability analysis method based on the Infor-GCN model according to claim 6 is characterized by: The specific steps of the comprehensive result output strategy in step S234 are as follows: Assume that the output results of GCN are Y1=(y 11 ,y 10 )、Y2=(y 21 ,y 20 ), where y 11 ,y 21 They are the probability outputs of stable labels of the two GCN models; The specific comprehensive result output strategy is as follows: (1) If min{y 11 ,y 21 }>ξ1, the result is stable; (2) If max{y 11 ,y 21 }<ξ2, the result is instability; (3) If both conditions (1) and (2) are not met, the result is uncertain; For uncertain samples, a high priority calculation level or ranking will be set to give priority to simulation analysis; Among them, the thresholds ξ1 and ξ2 take values close to 1 and 0 respectively. The model will output deterministic results for samples whose classifier output probability is close to 1 or close to 0; for samples with a predicted probability near 0.5, it is difficult to evaluate and they are judged as uncertain samples.
8. The transient stability assessment and interpretability analysis method based on the Infor-GCN model according to claim 1 is characterized by: In step S3, an interpretability analysis framework for a stable evaluation model is constructed based on the SHAP interpretation theory. The specific steps for interpreting the model decision results and enhancing the model interpretability are as follows: SHAP’s additive feature attribution method, expressed as a linear function of binary variables, explains the evaluation results of the model based on a single input variable as follows: Where N is the total number of input features of the transient stability assessment model, z i ′∈{0,1} N Measures whether all N features are included in the model decision path. If the corresponding element of the feature is 1, it means that the feature contributes to the stable evaluation result of the model and is considered in the decision process of the model. Conversely, if the feature element is 0, it means that the feature does not contribute to the stable prediction of the model and the model does not consider the feature. The value is the contribution of the feature. SHAP uses Shapley value to quantify the contribution of each input feature of the data-driven model. i , where the contribution of a given feature i is equal to the average marginal contribution created by the coalition in which the feature participates; First, find the feature x i All features except X F A subset M of: X F =[x1 x i …x N ] T (24); Among them, x i is the i-th eigenvalue, X F is the vector set of input features, x i ∈X F ; For subset M, use the inclusion and exclusion of feature x i The features of each model are trained separately x (M∪{x i }) and f x (M), in the current feature x i Compare the difference between the two model predictions using the following input: F diff (x i )=f x (M∪{x i })-f x (M)(25); Compare Features x i Marginal value before and after adding to the subset, removing feature x i After all possible subsets The process is repeated for the subset; Measuring feature importance φ i The weighted average of all marginal contributions is calculated as follows: For SHAP with additive feature properties, a unique solution exists if and only if the model satisfies the following three key properties: in, For two models f and f′: Among them, z′\i means that z i ′ is set to 0. Based on the above three properties, E[f(x)] is defined as the expected value of the function conditioned on the input feature set of non-zero z′. Then f x (z′)=f(h x (z′)) = E[f(x)]; Combined with the conditional expected value, the formula can be rewritten as: Here, |z′| is the number of non-zero entries in z′.
Citation Information
Patent Citations
Transient stability evaluation method and system based on automation and interpretable machine learning
CN112508442A
Gate graph neural network transient stability evaluation method based on unbalanced data
CN113435575A
Cited By
Unit commitment acceleration solving method and system based on space-time deep learning
CN121440799A
Power grid transient voltage stability evaluation method and system based on interpretable deep learning
CN122286311A
Power grid transient voltage stability evaluation method and system based on interpretable deep learning
CN122286311B