Method for evaluating transient stability of power system with new energy access and dynamic topology

By constructing the TransGAT-ResFusion model and generative adversarial networks, combined with transfer learning, the adaptability and efficiency issues of traditional power system transient stability assessment methods after the grid connection of new energy sources are solved, and a fast and accurate assessment of new energy systems is achieved.

CN120728633APending Publication Date: 2025-09-30YUNNAN MINZU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510808047.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-17
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

Traditional power system transient stability assessment methods are difficult to adapt to diversified operating modes and frequent topology changes after the connection of renewable energy to the grid. The model has poor adaptability, high computational complexity, and low assessment efficiency. It also fails to fully consider the coupling effects of the dynamic characteristics and topology changes after the connection of renewable energy to the grid, resulting in a decrease in the accuracy of the assessment results.

Method used

A TransGAT-ResFusion model is constructed, combining the Transformer and graph attention networks to jointly model topological characteristics and temporal dynamic characteristics. A generative adversarial network is used to generate transient stability data under diverse topological change scenarios, and transfer learning is used to quickly adapt to new topological scenarios. Real-time evaluation is performed in combination with phasor measurement units.

Benefits of technology

It significantly improves the accuracy and efficiency of transient stability assessment of renewable energy access to power systems, shortens model training time, enables rapid response to system dynamic changes, and provides a more realistic assessment framework.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120728633A_ABST
    Figure CN120728633A_ABST
Patent Text Reader

Abstract

The invention provides a method for evaluating the transient stability of a power system containing new energy access and dynamic topology, and aims to solve the problems of poor model adaptability, high calculation complexity and low efficiency of a traditional method in a new energy grid-connected and topology change scene, design a TransGAT-ResFusion model fusing Transform, a graph attention network and a residual mechanism. According to the method, topological correlation characteristics are extracted through a graph attention module, a deep network gradient disappearance problem is solved by combining Transform modeling time sequence dynamic characteristics and introducing residual connection, and accurate sensing of time-space dynamics of a power system is realized. An improved generative adversarial network is further combined, transient data in a diversified topological change scene is generated through condition information and a physical constraint loss function, and the data generation efficiency and authenticity are remarkably improved; the pre-training model is quickly adapted to a new topology scene by using a transfer learning technology, and evaluation can be completed without retraining, so that the evaluation time is greatly shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power systems and automation thereof, and relates to a method for evaluating the transient stability of a power system including new energy access and dynamic topology. Background Art

[0002] As the global energy mix shifts toward a low-carbon future, the large-scale integration of renewable energy generation (such as wind power and photovoltaics) has significantly changed the operating characteristics of traditional power systems. The volatility and intermittency of renewable energy, coupled with the dynamic changes in power system topology, present unprecedented challenges for transient stability assessment. Traditional assessment methods rely on fixed system structures and preset scenarios, making them difficult to adapt to the diverse operating modes and frequent topological changes in renewable energy scenarios. They suffer from poor model adaptability, high computational complexity, and low assessment efficiency, limiting their real-time application and effectiveness.

[0003] After renewable energy is integrated into the grid, the system's operating mode becomes more complex. For example, wind power and photovoltaic power generation are significantly affected by natural conditions (such as wind speed and light intensity), and their output is uncontrollable and uncertain, which can easily cause system frequency fluctuations and voltage instability. In addition, the integration of renewable energy leads to frequent topology changes such as line disconnections and generator shutdowns, further increasing the complexity of the system's dynamic behavior. Traditional evaluation methods are based on fixed topologies and preset fault scenarios, and are unable to effectively capture the dynamic characteristics of renewable energy after grid integration, resulting in deviations between evaluation results and actual operating conditions.

[0004] In existing technologies, transient stability assessment methods based on physical models rely on precise system parameters and fixed topologies, making it difficult to cope with the diversity of system operating modes after the integration of renewable energy. For example, traditional time-domain simulation methods require a large amount of computing resources and require rebuilding the model in scenarios with topological changes, which is time-consuming and difficult to meet real-time requirements. At the same time, the coupling effect of system dynamic characteristics and topological changes caused by the integration of renewable energy is not fully considered. Traditional methods often ignore the role of the control logic of renewable energy equipment (such as virtual synchronous generators (VSG)) on system stability during modeling, resulting in a decrease in the accuracy of the assessment results.

[0005] In recent years, AI-based transient stability assessment methods (such as convolutional neural networks and long-short-term memory networks) have made some progress in fixed-topology scenarios. However, their adaptability and generalization capabilities remain insufficient in scenarios involving renewable energy grid integration and topology changes. Existing methods often rely on time-domain simulation to generate datasets, which is time-consuming and does not fully consider the coupled effects of the dynamic characteristics of renewable energy grid integration and topology changes. Furthermore, traditional data-driven methods often require retraining the model when dealing with topology changes, resulting in high training costs and difficulty in quickly adapting to new scenarios.

[0006] Dynamic changes in power system topology (such as line disconnections and generator decommissioning) can significantly alter the system's power flow distribution and stability boundaries. Existing transient stability assessment methods for topology change scenarios are limited and suffer from the following issues: low data generation efficiency. Traditional time-domain simulations take a long time to generate datasets for topology change scenarios, making them inadequate for real-time assessment of large-scale renewable energy systems. Model generalization is poor. Existing methods are mostly designed for fixed topology scenarios and lack adaptability to multiple topologies, resulting in decreased accuracy in new topology scenarios. Furthermore, traditional methods require retraining after topology changes, which takes a long time and prevents them from quickly responding to system dynamics. Summary of the Invention

[0007] The purpose of the present invention is to provide a method for evaluating the transient stability of a power system with new energy access and dynamic topology, in order to solve the problem.

[0008] To solve the above technical problems, the present invention provides a method for evaluating the transient stability of a power system with new energy access and dynamic topology, comprising the following steps:

[0009] S1. Build an improved power system model

[0010] Introducing wind power, photovoltaic, and energy storage systems into the traditional IEEE 39-bus system or NPCC 140-bus system, and designing virtual synchronous generators in parallel with the renewable energy generation bus to reduce system oscillations caused by grid connection;

[0011] S2. Build the TransGAT-ResFusion model

[0012] The residual network is combined with the Transformer and graph attention network interactive fusion model to achieve joint modeling of topological characteristics and temporal dynamic characteristics through the following formula:

[0013] Graph Attention Module: Calculates the correlation between a node and its neighbors and aggregates neighbor node features using the following formula:

[0014]

[0015] in, is a learnable weight matrix, a is the attention weight vector, and || represents the vector concatenation operation;

[0016]

[0017] Among them, σ is a nonlinear activation function, and the final output is

[0018] Transformer module: Models the global dependencies of time series through the following formula:

[0019] Modeling global dependencies:

[0020]

[0021] Where Q = TW Q , K=TW K 、V=TW V , is the linear transformation matrix, d k is the scaling factor;

[0022] MultiHead(Q,K,V)=Concat(head1,...,head h )W O

[0023] Each head is calculated independently, W O It is an output linear mapping, which can retain the time series order information in combination with the position encoding PE(t). The encoding information is expressed as:

[0024]

[0025] Among them, pos is the position and i is the dimension;

[0026] Interactive fusion mechanism: The following formula is used to realize the feature interaction and weighted aggregation between Transformer and graph attention network:

[0027]

[0028] After interactive fusion, the two output channels of Transformer and GAT are aggregated by weight:

[0029]

[0030] S3. Generate adversarial network-assisted dataset generation

[0031] Based on an improved generative adversarial network, transient stability data is generated under diverse topology change scenarios. Conditional information (topological adjacency matrix, load level, generator output) and a physical constraint loss function are introduced to improve the diversity and practical relevance of the generated data.

[0032] S4. Transfer learning to adapt to topology changes

[0033] The pre-trained TransGAT-ResFusion model is migrated to the new topology scenario through transfer learning technology, and fine-tuned using the working condition data generated by the generative adversarial network to reduce the model retraining time;

[0034] S5. Real-time evaluation and stability judgment

[0035] The bus voltage and phase angle data are collected in real time through the phasor measurement unit, and the updated model is input for real-time transient stability judgment. The evaluation results are output based on the generator power angle stability index and transient voltage stability criteria.

[0036] Further preferably, the physical constraint loss function of the generative adversarial network in step S3 is implemented by the following formula:

[0037]

[0038] Among them, V i is the voltage amplitude of the i-th node, and N is the total number of nodes.

[0039] 3. The method for evaluating transient stability of a power system with renewable energy access and dynamic topology according to claim 1, wherein the transfer learning in step S4 measures the difference in data distribution between the source domain and the target domain by using the maximum mean difference, as shown in the following formula:

[0040]

[0041] Among them, φ(·) is the nonlinear feature mapping function, D source and D target are the source domain and target domain datasets respectively.

[0042] Further preferably, the loss function of the generative adversarial network in step S3 includes generator loss and discriminator loss, and the formula is as follows:

[0043]

[0044] Among them, c is the conditional information, D is the discriminator, and G is the generator.

[0045] Further preferably, the calculation of the generator power angle stability index in step S5 is achieved by the following formula:

[0046]

[0047] Among them, Δδ max is the maximum power angle difference between any two generators when they are running. If A TSI >0, the system is considered stable, otherwise the system is unstable.

[0048] Further preferably, the transient voltage stability criterion in step 5 is implemented by the following formula:

[0049]

[0050] Among them, V i (t) is the per-unit voltage value of the i-th bus, and S(t) is the stability indicator function.

[0051] Further preferably, the quality of the data generated by the generative adversarial network in step 3 is evaluated by the Fréchet Inception Distance indicator, which is as follows:

[0052]

[0053] Among them, μ r and Σ r is the mean and covariance matrix of the real data, μ g and Σ g is the mean and covariance matrix of the generated data.

[0054] Further preferably, the fine-tuning process of transfer learning in step S4 includes:

[0055] Initialize the target domain model using the source domain model parameters;

[0056] Based on a small amount of real samples from the target domain and data generated by the generative adversarial network, the model parameters are fine-tuned through the back-propagation algorithm;

[0057] The MMD values ​​of the source domain and the target domain are calculated using the formula to verify the migration effect.

[0058] The present invention is further configured to have the following beneficial effects compared with the prior art:

[0059] First, this invention optimizes the IEEE 39-bus system and NPCC system, introduces wind power generation, photovoltaic power generation, and energy storage systems, and designs a virtual synchronous generator (VSG) model to address the volatility of renewable energy generation. These improvements enable the system to more realistically simulate the operating characteristics of modern renewable energy power systems, providing a more realistic evaluation framework.

[0060] Second, to address the low accuracy of transient stability assessment, the proposed TransGAT-ResFusion model combines the Transformer's extraction of time series features with the topological structure learning of the Graph Attention Network (GAT). It uses residual connections to prevent vanishing gradients, significantly improving the model's learning and processing capabilities. Experimental results demonstrate that this model achieves faster convergence and higher accuracy in assessments.

[0061] Third, to accelerate the generation of simulation datasets for topology change scenarios, this paper proposes an improved GAN model that combines conditional information and physical constraints to generate data that conforms to the actual load distribution. The effectiveness and accuracy of the data generated by this method are verified using the FID metric and simulation data.

[0062] Fourth, to shorten the model training time, this paper introduces a transfer learning method. By migrating the source domain model (topology-fixed scenario) to the topology-changing scenario and fine-tuning it, the training time is significantly reduced. The accuracy of the new model is comparable to that of the model retrained based on simulation data, verifying the efficiency and accuracy of transfer learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 This is a schematic diagram of the attention mechanism;

[0064] Figure 2 It is a schematic diagram of feature aggregation;

[0065] Figure 3 This is a schematic diagram of the multi-head self-attention mechanism;

[0066] Figure 4 It is a schematic diagram of the residual network;

[0067] Figure 5 It is a schematic diagram of the TransGAT-ResFusion process;

[0068] Figure 6 This is a schematic diagram of an improved adversarial generative network;

[0069] Figure 7 It is a schematic diagram of the transfer learning process;

[0070] Figure 8 It is a schematic diagram of transient stability assessment process;

[0071] Figure 9 It is a schematic diagram of the improved IEEE39 node system;

[0072] Figure 10 This is the VSG schematic;

[0073] Figure 11 It is the dynamic change diagram of generator power;

[0074] Figure 12 It is the PSSE simulation flow chart;

[0075] Figure 13 This is a comparison chart of the convergence of loss functions of different models;

[0076] Figure 14 It is a comparison diagram of the spatial position of real data and generated data;

[0077] Figure 15 This is a comparison chart of the evaluation accuracy and time consumption of the two methods;

[0078] Figure 16 This is the geographical distribution map of the NPCC bus system;

[0079] Figure 17 This is a comparison chart of the evaluation effects of the two methods. DETAILED DESCRIPTION

[0080] The following is a further detailed description of a method for evaluating the transient stability of a power system with new energy access and dynamic topology proposed by the present invention, in conjunction with the accompanying drawings and specific embodiments. The advantages and features of the present invention will become clearer based on the following description. It should be noted that the drawings are all in a very simplified form and are not in precise proportions, and are only used to conveniently and clearly assist in illustrating the purpose of the embodiments of the present invention. The same or similar reference numerals in the drawings represent the same or similar components.

[0081] 1TransGAT-ResFusion Model Introduction

[0082] Transformer is suitable for capturing time series information and global dependencies, and is widely used in sequence modeling and natural language processing. GAT can effectively capture the relationship between nodes and neighbors in the graph structure through the attention mechanism, and is suitable for processing the topological characteristics of the power system. Transformer provides time series feature extraction capabilities, and GAT provides topological structure modeling capabilities. The combination of the two can achieve complementarity in the transient stability assessment of the power system, and introduce a residual mechanism to reduce the gradient disappearance phenomenon. The input data of the power system includes node features Where N represents the number of nodes and F represents the characteristic dimension of each node (such as voltage and phase angle). The adjacency matrix of the graph is expressed as Represented. Time series features are represented as Where L represents the time step.

[0083] 1.1. Graph Attention Module (GAT)

[0084] In the GAT module, the relevance of each node to its neighboring nodes is calculated through the attention mechanism:

[0085]

[0086] Attention mechanism such as Figure 1 shown

[0087] in, is a learnable weight matrix, a is the attention weight vector, and || represents the vector concatenation operation. The aggregation of neighbor nodes is expressed as:

[0088]

[0089] The polymerization process Figure 2 As shown, where σ is a nonlinear activation function and the final output is

[0090] 1.2 Transformer Module

[0091] For the time series feature T, the Transformer module uses a multi-head self-attention mechanism to model global dependencies:

[0092]

[0093] Where Q = TW Q , K=TW K 、V=TW V , is the linear transformation matrix, d k is the scaling factor. The long-head mechanism is expressed as:

[0094] MultiHead(Q,K,V)=Concat(head1,...,head h )W O (4)

[0095] Each head is calculated independently, W O is the output linear map, such as Figure 3 As shown. Combining position encoding PE(t) can retain the time series order information, and the encoding information is expressed as:

[0096]

[0097] Where pos is the position and i is the dimension. Each dimension of the positional encoding corresponds to a sine wave. This makes it easier for the model to learn the attention mechanism based on relative positions.

[0098] 1.3 Interactive Fusion Mechanism

[0099] The main principle of TransGAT-ResFusion is to use the original data H (l) After passing through the Transformer and GAT channels, the Transformer output is connected to the GAT input, and the GAT output is connected to the Transformer input. After mutual fusion, the two outputs are finally weighted for feature aggregation to ensure that the model has a comprehensive perception of the temporal and spatial dynamics of the power system.

[0100] 1.3.1 Residual Connection

[0101] When performing interactive fusion, the gradient may disappear when the network level is deep, so this paper introduces residual connection to convert the initial feature H (l) Retained and directly passed to the subsequent modules through residual connections. The residual principle is as follows Figure 4 shown.

[0102] 1.3.2 Interactive Integration

[0103] The outputs of Transformer and GAT are exchanged through the interactive fusion layer. The interactive process is expressed as:

[0104]

[0105] After interactive fusion, the two output channels of Transformer and GAT are aggregated by weight:

[0106]

[0107] The result of interactive fusion is added to the residual connection to retain the original input features. output =H fusion +H input Ensure that the deep network maintains a stable gradient flow during interaction. Finally, the residual output is passed to the fully connected layer to complete feature integration and classification. The principle of TransGAT-ResFusion is as follows Figure 5 shown.

[0108] 2 Active Transfer Learning Evaluation Method Based on Topology Change

[0109] In transient stability assessment of power systems, diverse topology change scenarios require a large number of simulation samples to ensure model generalization. However, generating these samples is not only time-consuming but also reduces assessment efficiency. Furthermore, the model must maintain high accuracy for unseen topology change scenarios. Therefore, a method based on an improved generative adversarial network and transfer learning is proposed to address these issues. By utilizing the improved generative adversarial network to efficiently generate simulation samples and combining it with the rapid adaptability of transfer learning, this method achieves efficient and accurate assessment of topology change scenarios while minimizing computational costs.

[0110] 2.1 Improved Generative Adversarial Network with Conditional Information and Physical Constraints

[0111] When the improved generative adversarial network generates transient voltages and phase angles with topological structure changes, it is divided into two batches. A small number of transient data samples with topological changes are generated through PSSE simulation. The first batch is to input the real samples of transient stability to the adversarial generation network, and the second batch is to input the real samples of transient instability to facilitate the physical constraints of the generated transient stability samples. The principle is as follows Figure 6 shown.

[0112] 2.1.1 Data Preprocessing Module

[0113] In the generator, the conditional information includes the topological initial adjacency matrix, load level, and generator output. The conditional information is passed as an additional input, with the adjacency matrix treated as an additional input feature (as an additional graph structure input). The load level and generator output can be concatenated with the noise vector as additional feature vectors. The input random noise z and the conditional information c are then converted into embedding vectors, and the conditional information and random noise are fed into the generator together, further improving the generator's performance.

[0114] 2.1.2 Generator Design

[0115] Added graph convolutional network (GCN) processing to directly operate on the adjacency matrix when generating topology. The flow data and topology are generated through joint learning within the generator to maintain data consistency.

[0116] 2.1.3 Physical Constraint Module

[0117] For transient stability, the voltage amplitude must be within a certain range in the actual power grid (usually 0.8 pu to 1.2 pu). The generated data must meet the voltage amplitude constraint. The loss function for constructing its physical constraint is:

[0118]

[0119] 2.1.4 Loss Function

[0120] The loss function consists of two parts: generator loss and discriminator loss. The generator loss includes not only its own loss but also physical constraint loss, which is expressed as Loss G =Loss adversarial +Loss Voltage , condition information c is introduced into both the generator and the discriminator at the same time, with the goal of generating topological data that meets condition c. The final loss function is expressed as:

[0121]

[0122] Among them, p data (x) is the distribution of real data, p z (z) is the noise distribution. The generator learns to generate the same distribution as the real distribution p by minimizing the expectation of (1-D(G(z|c)|c)) data (x) Consistent data samples.

[0123] 2.2 Overview of Transfer Learning

[0124] Transfer learning is a machine learning method that improves the learning efficiency of new tasks by transferring knowledge. Its core idea is to transfer the knowledge of the source domain to the target domain, thereby reducing the target domain model's dependence on large-scale data. In the transient stability assessment of power systems, although there are significant differences between different topologies, their dynamic characteristics and transient behaviors share similarities to a certain extent. Therefore, through transfer learning, the knowledge of the modeled topology scenario can be fully utilized to quickly model and evaluate the new topology scenario. The process is as follows: Figure 7 shown.

[0125] Transfer learning addresses data insufficiency and feature discrepancies in target tasks by leveraging knowledge from source tasks. In transient stability assessments of power system topology changes, the core idea of ​​transfer learning is to leverage models trained on one power system topology and transfer them to assessments of other topologies, thus avoiding retraining and reducing the amount of training data required.

[0126] 2.2.1 Source Task and Target Task

[0127] The source task is to use a fixed topology of the power system to perform transient stability assessment and obtain relevant dynamic response data (such as voltage and phase angle). The loss function is:

[0128]

[0129] is the predicted value of the source task model, is the true label, L is the loss function, and N is the number of samples of the source task.

[0130] The target task is to evaluate the power system under different topologies using the model learned from the source task. The loss function is:

[0131]

[0132] is the predicted value of the target task model, is the true label of the target task, L is the loss function, and N is the number of samples of the target task.

[0133] To ensure that the model is not affected by data distribution differences when evaluating the transient stability of systems under different topologies, the maximum mean difference, such as Formula 14, is used to measure the data distribution of the source task and the target task, reducing the impact of data distribution differences and thus more accurately evaluating the system stability in the target task.

[0134]

[0135] φ(·) is a nonlinear feature mapping function (kernel method, which is described in [1] and will not be elaborated here), D source and D target Represents the datasets of source task and target task respectively, N source and N target Represent the number of samples of the source task and the target task respectively.

[0136] 2.2.2 Feature Transfer and Model Fine-tuning

[0137] Feature transfer: In transfer learning, the learning process of the source task can help the target task extract effective features. For example, voltage and phase angle data under a fixed topology can be used to help the model in the target topology extract similar features through transfer learning.

[0138] Model fine-tuning: Based on the pre-trained model obtained by training the source task, fine-tune it for the target task and retrain it with a small amount of new data to adapt the model to the new topology.

[0139] 2.3 Model Evaluation Metrics

[0140] 2.3.1 Classification Performance Evaluation

[0141] Precision, Recall, F1, and Acc are used as evaluation indicators, which are defined as follows:

[0142]

[0143] TP, FP, TN, and FN are confusion matrices, and their meanings are shown in Table 1:

[0144] Table 1 Confusion matrix

[0145]

[0146] 2.3.2 Model Transfer Performance Evaluation

[0147] For the model transferred from the source domain, the transfer learning performance improvement (Transfer Gain) is used as the evaluation indicator, which is defined as follows:

[0148]

[0149] Acc source is the initial performance of the source domain model on the target domain; Acc transfer is the performance of the transferred model on the target domain.

[0150] 2.4.3 Data Generation Quality Assessment

[0151] Fréchet Inception Distance (FID) evaluates the difference in feature distribution between generated data and real data, and the difference between the mean and covariance matrix in the Inception network feature space to evaluate their similarity. The formula is as follows:

[0152] 2.3.3Data Generation Quality Evaluation

[0153]

[0154] u r ,∑ r represents the mean and covariance of the real data; u g ,∑ g represents the mean and covariance of the generated data; Tr(·) is the trace of the computation matrix.

[0155] 2.4 Transient stability assessment process under topology changes

[0156] The transient stability assessment under power system topology changes consists of a three-stage approach: offline training, model updating, and online application. The details are as follows:

[0157] (i) Offline Training of a Fixed-Topology Assessment Model: Using PSSE software, we comprehensively generate simulation datasets covering a variety of short-circuit fault parameters and dynamic component parameters, given a fixed power system topology. After normalization, these datasets are converted into tensor form and fed into a deep learning model based on TransGAT-ResFusion. This model, trained on large-scale simulation data, accurately assesses transient stability in fixed-topology scenarios.

[0158] (ii) Model update to adapt to topology changes: When the power system topology changes, only a small amount of sample data related to the changed topology is generated through time-domain simulation. Then, an improved generative adversarial network is used to expand the dataset and generate a large amount of transient simulation data under topology changes. On this basis, transfer learning is performed on the evaluation model trained in the first stage. The generated data is combined with a small number of real samples, and fine-tuning is performed to further improve the model's evaluation accuracy in the new topology scenario. This stage enables the model to quickly adapt to changes in the power system topology.

[0159] (iii) Online application of real-time evaluation: In actual grid operation, dynamic data such as voltage and phase angle of the system bus are collected in real time through the phasor measurement unit (PMU), and input into the updated evaluation model to judge the transient stability of the power system in real time. Based on the evaluation results, stability risk warnings or intervention suggestions are provided to the grid dispatchers in a timely manner to support rapid decision-making. The overall evaluation process is as follows: Figure 8 shown.

[0160] 3 Improvement of IEEE39 system

[0161] 3.1 Introduction of new energy systems

[0162] In this paper, wind power generation (generator dynamic model is WT4G1, electrical dynamic model is WT4E1, mechanical dynamic model is WT3T1) and energy storage system (energy storage model is DERA1, electrical dynamic model is REECA1) are introduced to node 28 on the traditional IEEE39 system, and photovoltaic power generation (generator dynamic model is DERA1, electrical dynamic model is REECCA1) and energy storage system are introduced to node 29, as shown in the following example: Figure 9 As shown, considering the stability of new energy grid connection, virtual synchronous generators are connected in parallel at nodes 28 and 29 to reduce system oscillations caused by grid connection.

[0163] 3.2 Virtual synchronous generator modeling

[0164] because The E software itself does not provide a ready-made virtual synchronous generator (VSG) model. This article proposes a method to build a VSG model in Simulink and generate a dynamic link library (.dll) using the MinGW compiler. The specific steps are as follows:

[0165] First, a VSG model is built in Simulink. The model design follows the control principle of the virtual synchronous generator, such as Figure 10 As shown in the figure, the model is converted into C language code using the Coder tool in Simulink. Then, the generated C file is compiled into a dynamic link library (.dll) file using the MinGW compiler. Next, copy the dynamic library file to In the user dynamic model directory of E. In E, the compiled .dll model is loaded through the Dynamic Data interface and connected in parallel with the busbars of renewable energy generation equipment (such as wind power and photovoltaic power). Through this integrated model, the VSG can control the electrical output of renewable energy generation in real time, thereby regulating and optimizing the stability of the power system.

[0166] After connecting the virtual synchronous generator (VSG) in parallel to the renewable energy bus, we set a three-phase short circuit fault on the transmission line near the renewable energy bus. As a control experiment, we also simulated a short circuit fault situation without VSG. In the experiment, the load level and generator output configuration were the same to ensure fairness of the comparison. By observing and recording the dynamic changes of the generator power angle at bus No. 30 (see Figure 11As shown in the figure), we found that the load level and generator output setting (before 0.1 seconds) will cause the generator power angle to fluctuate. When the fault is introduced (0.1 seconds), the results show that the access of VSG effectively mitigates the transient stability fluctuation of the new energy system when a short circuit fault occurs. This experiment not only makes up for While E can overcome the shortcomings in modeling virtual synchronous generators, it also provides a new and effective tool for the dynamic control of renewable energy power generation systems, which has significant application value and broad expansion potential.

[0167] 3.3 Basis for transient stability judgment

[0168] 3.3.1 Generator power angle stability

[0169] This paper uses the transient power angle stability index as the judgment basis.

[0170]

[0171] Δδ max It is the maximum power angle difference between any two generators when they are running. TSI >0 determines that the system is stable, otherwise the system becomes unstable.

[0172] 3.3.2 Transient voltage stability

[0173] In addition to considering the change in generator power angle, this paper also adds the allowable range of transient voltage deviation. When a short circuit fault occurs, can the transient voltage be restored to a safe range until the fault is cleared? That is, the voltage per unit value deviation is ±0.2pu. The stability judgment basis can be expressed as:

[0174]

[0175] 4 Case Verification

[0176] In order to verify the accuracy of the evaluation model proposed in this paper and the efficient evaluation method based on the change of new energy topology structure, the The E software configures the psspy environment through Anaconda, and uses Python language to write scripts for transient stability simulation to generate batch data sets. The evaluation model uses the Pytorch framework to build a deep learning network model, and the hardware platform is 13th Gen Core TM i9-13900HX and NVIDIA GeForce RTX 4060 Laptop GPU.

[0177] 4.1 Construction of fixed topology dataset

[0178] For the simulation parameter setting, the three-phase short-circuit fault position is randomly set, the load level changes in 5% steps from 70% to 140%, the generator output range is 0.8-1.2, the simulation time is 3.5s, the system fails at 0.1s, and the fault is removed between 0.2-0.5s. The voltage per unit value and phase angle data before, during and after the fault are removed are recorded to fully record the transient dynamic process. The number of generated samples is set to 10,000 (4226 stable samples and 5774 unstable samples). The simulation data generation process is as follows: Figure 12 As shown:

[0179] 4.2 Model Evaluation Performance Test

[0180] This section verifies the accuracy of the TransGAT-ResFusion model evaluation. To demonstrate the effectiveness of the model, this paper compares it with several classic data-driven models, considering representative approaches: CNN, LSTM, GCN, and standalone GAT and Transformer. The CNN has three convolutional layers, each using a 3x3 convolution kernel. Every two convolutional layers are followed by a max pooling layer with a pooling window size of 2x2 and a stride of 2. The remaining networks have two layers, and the standalone GAT and Transformer use four attention heads. The Adam optimizer is used uniformly with dropout = 0.2 and a learning rate of 0.01. Since the problem is binary classification, the cross-entropy loss function is used as the model loss function. All models are evaluated on a modified IEEE 39 bus system. Training is set to 40 epochs, and an early stopping strategy is used. Training is stopped early if performance on the validation set stops improving within a certain number of epochs. The performance metrics of each model are shown in Table 2.

[0181] Table 2 Model evaluation and performance comparison experiments based on fixed topology

[0182]

[0183] Table 2 compares the performance of different models in the power system transient stability assessment task. It can be observed that the TransGAT-ResFusion model significantly outperforms other models across all evaluation metrics, particularly in precision (99.57%), recall (99.46%), F1 score (99.51%), and accuracy (99.59%). In contrast, while the performance of other models such as CNN, LSTM, GCN, Transformer, and GAT has also reached a certain level, there is still a significant gap between them and the TransGAT-ResFusion model.

[0184] The TransGAT-ResFusion model shows a faster convergence speed during the training process, such as Figure 13 As shown in the figure, the model begins to converge after about 20 rounds and Early Stops after the 25th round, while other models tend to converge after about 30 rounds, such as GAT, which Early Stops after the 33rd round. At the same time, the final convergence loss is also lower than that of other models, which is mainly due to its powerful representation learning ability and efficient information transmission mechanism. Transformer can capture the temporal relationship in the power system in a short time through its self-attention mechanism, while GAT effectively models the system's topological structure through a graph convolutional network, allowing the model to fully utilize multi-dimensional feature information in the early stages of training. The complementarity and flexibility of this structure enable TransGAT-ResFusion to quickly adapt to the task of predicting the transient stability of the power system and accelerate the convergence of the model.

[0185] 4.3 Topology Change Scenario Assessment Model Verification and Testing

[0186] 4.3.1 Construction of Topology Change Scenario Dataset

[0187] The dataset construction in the present invention is divided into two parts: the first part is to generate a small amount of datasets through time-domain simulation, which is used as real samples for generative adversarial networks, and then generate more samples as datasets. In this part, the topology change of the power system is achieved by decommissioning the generator and disconnecting some lines. Specifically, the study selected three topology change scenarios: 1) disconnecting one line and one generator; 2) disconnecting two lines and one generator; 3) disconnecting three lines and two generators. For the simulation parameter settings, except for the random output adjustment of the load level in the range of 70% to 140%, the other parameters are consistent with the simulation settings in the fixed topology scenario. The datasets generated under the above three topology change scenarios are shown in the table.

[0188] The second part is a large-scale dataset generated through time-domain simulation. This dataset serves as a test set for evaluating the proposed model and as a control set for retraining the model. This dataset aims to cover a wider range of scenarios to verify whether the samples generated by the generative adversarial network can effectively supplement time-domain simulation data. The fault scenarios are consistent with the three topology change scenarios described in the first part, and the simulation parameters are set consistent with those for the fixed topology scenario. The time consumed by the time-domain simulation is also recorded. The amount of data generated is shown in Table 3.

[0189] Table 3 Comparison of simulation data size and time consumption in different scenarios

[0190]

[0191] 4.3.2 Generative Adversarial Network Dataset Verification

[0192] First, the transient stability samples and transient instability samples generated by the adversarial generative network with the introduction of conditional information and physical constraints are visualized and analyzed in three dimensions: voltage, phase angle, and simulation time (including before the fault occurs, during the fault occurs, and after the fault is removed). This visually shows the spatial feature overlap between the real data and the generated data, such as Figure 14 shown.

[0193] from Figure 14 (a) It can be seen that the real dataset and the generated dataset of transient stability roughly overlap in the feature space, and the spatial distance between them is relatively close; Figure 14 (b) It can be observed that for both the real and generated datasets with transient instability, due to the occurrence of transient instability, features near the normal voltage per unit value are relatively sparse, and most features are concentrated in the unstable voltage range. The figure shows that the spatial features of the two datasets are highly similar, and the feature overlap area is relatively obvious. This result indirectly indicates that the adversarial generative network with constrained behavior can better fit the real data, and the generated dataset has a high similarity with the real data in feature distribution. The quantitative analysis of FID is performed using Equation 20, and the calculation results are shown in Table 4:

[0194] Table 4. Improved GAN data quality evaluation

[0195]

[0196] For both the real and generated datasets with transient stability, the FID value was 2.07, indicating minimal differences in their feature distributions. For both datasets with transient instability, the FID value was 3.51, again indicating minimal differences. In contrast, the FID value was higher without the introduction of conditional information and physical constraints, indicating that the introduction of these constraints significantly reduced the FID value and improved the similarity between the generated and real data. Therefore, through qualitative and quantitative analysis, the proposed generative adversarial network with conditional information and physical constraints can effectively generate transient datasets with topological variations, serving as a powerful supplement to time-domain simulation data.

[0197] 4.3.3 Topology Change Scenario Evaluation Performance Test

[0198] Equation 14 yields an MDD value of 0.13 for both the topology-fixed and topology-variable scenarios, indicating minimal differences between the source and target domains. Therefore, the source domain model can be transferred to the target task. Next, the model trained in the topology-fixed scenario is transferred to the current scenario. The generated data serves as input for the transferred model, and the model parameters are fine-tuned to obtain the final model. Simultaneously, the comparison group model is also transferred to the current scenario for training and fine-tuning. The final performance metrics of each model are shown in Table 5.

[0199] Table 5 Model evaluation and performance comparison experiments based on dynamic topology

[0200]

[0201] The TransGAT-ResFusion model excels across multiple performance metrics, particularly in precision, recall, F1 score, and accuracy, significantly outperforming other models. This demonstrates the model's adaptability and robustness in power system fault detection and stability assessment tasks. The fusion advantage of TransGAT-ResFusion is particularly evident in scenarios with topology changes. It can effectively handle the complex relationship between timing information and topological structures, making the model more robust in the face of different fault modes and system topology changes.

[0202] We used the large amount of data generated by time-domain simulation in Table 3 as a test set for the transfer learning model to evaluate its accuracy. We also compared the performance of the model trained directly in the source domain with that of the model fine-tuned through transfer learning on the test set. We calculated the transfer performance evaluation metrics for each model using a formula and recorded the total time consumed by the GAN for data generation and transfer. The final results are shown in the table.

[0203] Table 6 Comparison of transfer learning effects

[0204]

[0205] Table 6 shows that the accuracy achieved by using the time-domain simulation data as a test set and the dataset generated by the GAN as evaluation data is comparable, further validating that the generated data can effectively supplement the time-domain simulation data. Compared with directly using the source-domain model for transient stability assessment of power systems with topology changes, the accuracy of the TG model improved by 10.34% after using transfer learning. The evaluation accuracy of other models also improved significantly.

[0206] To visually compare the timeliness of our method, we trained each initialization model using a large amount of data generated by time-domain simulation. Since the time-domain simulation time is already reported in Table 3, this article focuses on the training time. The overall evaluation time includes both the time-domain simulation and model training processes. The final model evaluation metrics and total time are summarized and presented in Table 7.

[0207] Table 7 Simulation + retraining model evaluation results

[0208]

[0209] As can be seen from Table 7, the various evaluation indicators obtained by retraining the model using the dataset generated by time-domain simulation are not much different from the results of using the generative adversarial network to generate data and fine-tuning the model through transfer learning, and the absolute error of ACC is only 0.28%. It can be concluded from Tables 3 and 6 that the total evaluation time of the method proposed in this paper (including the time for time-domain simulation to generate a small number of samples, the time for the adversarial generative network to generate the dataset, and the transfer learning time) is 2.6 hours, which significantly shortens the evaluation time of the model in the topology change scenario. Compared with Table 7, the method in this paper shortens the evaluation time by 15.9 hours, and the evaluation time of other models is also greatly reduced. For the sake of comparison, the evaluation method proposed in this paper is recorded as Method 1, and the simulation retraining model is recorded as Method 2. Figure 15 Visual comparison of evaluation accuracy and total evaluation time (the sum of time in Table 3 and Table 6) shows that this method can improve evaluation efficiency while ensuring evaluation accuracy.

[0210] 4.4 Large-scale example system verification

[0211] In order to verify the applicability of the proposed method, the evaluation method is improved based on the Northeast Power Coordinating Council (NPCC) 140 bus system. The NPCC 140 bus system is a simplified model of the Northeastern United States and Canadian power grid, which contains 140 nodes and 47 generators. The geographical distribution of the bus system is as follows: Figure 16 As shown (squares represent load buses, circles represent generator buses, and triangles represent balancing buses). Because the original system used two different types of synchronous generators (GENCLS and GENROU), we introduced new energy configurations based on multiple factors, including geography, resource distribution, and load demand. The locations and configuration types introduced are shown in Table 8.

[0212] Table 8 New energy introduction and configuration types in different locations

[0213]

[0214] The simulation process remained the same as before. Due to the larger scale of the system and the need to cover more fault scenarios, the number of generated samples was increased to 20,000 to ensure sufficient coverage of various transient behaviors. Table 8 shows the datasets for different scenario types and their generation times. For the samples generated by the innovative generative adversarial network proposed in this paper with conditional information and physical constraints, transfer learning was used to evaluate topology change scenarios (Method 1). Method 2 used time-domain simulation to generate the dataset and retrain the model. The model evaluation accuracy and training time for both approaches are reported in Table 9.

[0215] Table 9 Simulation data size and time consumption in different scenarios

[0216]

[0217]

[0218] Table 10 Performance evaluation comparison of two methods in large-scale new energy systems

[0219]

[0220] As can be seen from Table 9, under large-scale topological network structures, the time required for time-domain simulation to generate transient data sets is relatively long. In Table 10, from the perspective of Acc data, the evaluation accuracy of the efficient evaluation method proposed in this paper is not much different from that of the method based on generating data through time-domain simulation and retraining the model, and the other control group models also perform similarly. However, the model training time of this method is significantly reduced, and the training time is reduced by 4 hours compared to method 2. In addition, the generation time of a small number of simulation data sets used for adversarial generative networks in this paper is also greatly shortened, reducing by nearly 19 hours. Figure 17 It can be clearly seen that the total evaluation time difference between the two methods is significant, which shows that the method in this paper can not only ensure the accuracy of the evaluation, but also significantly reduce the evaluation time, verifying its applicability in large-scale systems.

[0221] The above description is only a description of the preferred embodiments of the present invention and does not limit the scope of the present invention. Any changes and modifications made by ordinary technicians in the field of the present invention based on the above disclosure shall fall within the scope of protection of the claims.

Claims

1. A method for evaluating transient stability of a power system with new energy access and dynamic topology, characterized in that: The following steps are involved: S1. Build an improved power system model Introducing wind power, photovoltaic, and energy storage systems into the traditional IEEE 39-bus system or NPCC 140-bus system, and designing virtual synchronous generators in parallel with the renewable energy generation bus to reduce system oscillations caused by grid connection; S2. Build the TransGAT-ResFusion model The residual network is combined with the Transformer and graph attention network interactive fusion model to achieve joint modeling of topological characteristics and temporal dynamic characteristics through the following formula: Graph Attention Module: Calculates the correlation between a node and its neighbors and aggregates neighbor node features using the following formula: in, is a learnable weight matrix, a is the attention weight vector, and || represents the vector concatenation operation; Among them, σ is a nonlinear activation function, and the final output is Transformer module: Models the global dependencies of time series through the following formula: Modeling global dependencies: Where Q = TW Q , K=TW K 、V=TW V , is the linear transformation matrix, d k is the scaling factor; MultiHead(Q,K,V)=Concat(head1,...,head h )W O Each head is calculated independently, W O It is an output linear mapping, which can retain the time series order information in combination with the position encoding PE(t). The encoding information is expressed as: Among them, pos is the position and i is the dimension; Interactive fusion mechanism: The following formula is used to realize the feature interaction and weighted aggregation between Transformer and graph attention network: After interactive fusion, the two output channels of Transformer and GAT are aggregated by weight: S3. Generate adversarial network-assisted dataset generation Based on an improved generative adversarial network, transient stability data is generated under diverse topology change scenarios. Conditional information (topological adjacency matrix, load level, generator output) and a physical constraint loss function are introduced to improve the diversity and practical relevance of the generated data. S4. Transfer learning to adapt to topology changes The pre-trained TransGAT-ResFusion model is migrated to the new topology scenario through transfer learning technology, and fine-tuned using the working condition data generated by the generative adversarial network to reduce the model retraining time; S5. Real-time evaluation and stability judgment The bus voltage and phase angle data are collected in real time through the phasor measurement unit, and the updated model is input for real-time transient stability judgment. The evaluation results are output based on the generator power angle stability index and transient voltage stability criteria.

2. The method for evaluating transient stability of a power system with new energy access and dynamic topology according to claim 1 is characterized in that: The physical constraint loss function of the generative adversarial network in step S3 is implemented by the following formula: Among them, V i is the voltage amplitude of the i-th node, and N is the total number of nodes.

3. The method for evaluating transient stability of a power system with new energy access and dynamic topology according to claim 1, characterized in that: In step S4, transfer learning measures the difference in data distribution between the source domain and the target domain by the maximum mean difference. The formula is as follows: Among them, φ(·) is the nonlinear feature mapping function, D source and D target are the source domain and target domain datasets respectively.

4. The method for evaluating transient stability of a power system with new energy access and dynamic topology according to claim 1, characterized in that: The loss function of the generative adversarial network in step S3 includes the generator loss and the discriminator loss, and the formula is as follows: Among them, c is the conditional information, D is the discriminator, and G is the generator.

5. The method for evaluating transient stability of a power system with new energy access and dynamic topology according to claim 1, characterized in that: The calculation of the generator power angle stability index in step S5 is achieved by the following formula: Among them, Δδ max is the maximum power angle difference between any two generators when they are running. If A TSI >0, the system is considered stable, otherwise the system is unstable.

6. The method for evaluating transient stability of a power system with new energy access and dynamic topology according to claim 1, characterized in that: The transient voltage stability criterion in step 5 is implemented by the following formula: Among them, V i (t) is the per-unit voltage value of the i-th bus, and S(t) is the stability indicator function.

7. The method for evaluating transient stability of a power system with new energy access and dynamic topology according to claim 1, characterized in that: The quality of the data generated by the generative adversarial network in step 3 is evaluated by the FréchetInceptionDistance indicator, which is as follows: Among them, μ r and Σ r is the mean and covariance matrix of the real data, μ g and Σ g is the mean and covariance matrix of the generated data.

8. The method for evaluating transient stability of a power system with new energy access and dynamic topology according to claim 1, characterized in that: The fine-tuning process of transfer learning in step S4 includes: Initialize the target domain model using the source domain model parameters; Based on a small amount of real samples from the target domain and data generated by the generative adversarial network, the model parameters are fine-tuned through the back-propagation algorithm; The MMD values ​​of the source domain and the target domain are calculated using the formula to verify the migration effect.