Integrated transient stability prediction method, system and device based on convolution block attention mechanism and residual network, and medium
By integrating convolutional block attention mechanism and residual network into a transient stability prediction method, the problems of insufficient feature extraction and complex model updates are solved, achieving high accuracy and rapid adaptability, and improving the transient stability prediction capability of power systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-03-13
AI Technical Summary
Existing transient stability prediction schemes have insufficient feature extraction capabilities, cannot take into account spatiotemporal correlation characteristics, have poor model generalization ability, and have complex and time-consuming update processes, making it impossible to quickly adapt to changes in system topology while ensuring prediction accuracy and real-time performance.
An integrated transient stability prediction method using convolutional block attention mechanism and residual network is proposed. A high-dimensional power system dataset is constructed through time-domain simulation. Features are extracted from channel and spatial dimensions using convolutional block attention mechanism. A focus loss function is introduced to optimize the model. Active learning and fine-tuning techniques are combined to achieve rapid updates.
It significantly improves the accuracy, recall, precision, and F1 score of transient stability prediction, enhances the model's generalization ability and robustness to feature loss and topological changes, and enables the model to quickly and adaptively update under system changes.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system transient stability prediction technology, specifically to an integrated transient stability prediction method, system, device, and medium based on convolutional block attention mechanism and residual network. Background Technology
[0002] With the rapid development of smart grids, a large proportion of new energy sources and numerous power electronic devices are being integrated into the power system, introducing randomness and volatility, posing significant challenges to the safe and stable operation of the power system. Transient stability prediction is one of the important measures to ensure the safe and stable operation of the power system. Given the rapid development of modern power systems, how to reliably and accurately predict transient stability is of great research significance. With the widespread adoption of synchronous phasor measurement units and wide-area measurement systems, data-driven artificial intelligence methods are increasingly being applied to transient stability prediction. These methods construct a mapping relationship between operating variables and safety indicators through training data, enabling rapid prediction.
[0003] Existing transient stability prediction schemes suffer from two main problems: first, insufficient feature extraction capabilities, failing to simultaneously consider spatiotemporal correlation characteristics, thus affecting prediction accuracy; and second, poor model generalization ability, with performance degrading rapidly when the system topology changes, and the update process being complex and time-consuming. Traditional methods lack sufficient optimization in model structure and update strategies, failing to maintain high accuracy while rapidly adapting to new operating conditions.
[0004] Therefore, existing technologies cannot achieve powerful feature extraction and rapid model updates while ensuring prediction accuracy and real-time performance. An innovative solution is needed that can integrate multi-dimensional feature extraction, introduce attention mechanisms to enhance feature learning, and achieve rapid updates through active learning and fine-tuning techniques. Summary of the Invention
[0005] In view of the above-mentioned existing problems, the present invention provides an integrated transient stability prediction method, system, device and medium based on convolutional block attention mechanism and residual network.
[0006] Therefore, the technical problem solved by this invention is: how to integrate multi-dimensional feature extraction, take into account spatiotemporal correlation characteristics, and introduce an attention mechanism to enhance feature learning, while achieving rapid model updates through active learning and fine-tuning techniques, thereby improving the model's generalization and adaptive capabilities when the system topology changes, while ensuring the accuracy and real-time performance of transient stable predictions.
[0007] To address the aforementioned technical problems, this invention provides the following technical solution: an integrated transient stability prediction method based on convolutional block attention mechanism and residual network, comprising, Time-domain simulation was performed based on an IEEE 10-machine 39-node system. A high-dimensional power system dataset is constructed by collecting various electrical characteristics of the power system through time-domain simulation. Using the dataset as input features, a transient stability prediction model is established. The transient stability prediction model is trained on three sub-classifiers based on convolutional attention mechanism and residual network to obtain the prediction results of the three sub-classifiers; The final prediction result is obtained by integrating the prediction results of the three sub-classifiers, and the samples misclassified by the sub-classifiers are corrected by the integration mechanism. When changes in the operating topology of the power system lead to performance degradation, the transient stability prediction model is rapidly updated through active learning and fine-tuning migration.
[0008] As a preferred embodiment of the integrated transient stability prediction method based on convolutional block attention mechanism and residual network described in this invention, the time-domain simulation based on the IEEE 10-machine 39-node system includes: Time-domain simulation is performed by setting different load levels, setting faults at preset locations on the system transmission lines, and setting the start and end times, duration, and sampling interval of the faults.
[0009] As a preferred embodiment of the integrated transient stability prediction method based on convolutional block attention mechanism and residual network described in this invention, wherein: the step of collecting various electrical features of the power system through time-domain simulation to construct a high-dimensional power system dataset includes, By collecting the generator's relative power angle, speed, kinetic energy, relative electromagnetic power, and excitation current, electrical characteristics are obtained. These electrical characteristics correspond to the state variables of the generator's operation in the power system, thus constructing a high-dimensional power system dataset.
[0010] As a preferred embodiment of the integrated transient stability prediction method based on convolutional block attention mechanism and residual network described in this invention, wherein: the step of using the dataset as input features to establish a transient stability prediction model includes, An ensemble transiently stable prediction model consisting of three sub-classifiers was built using the dataset. Each sub-classifier incorporates a convolutional attention mechanism on top of the residual network.
[0011] As a preferred embodiment of the integrated transient stability prediction method based on convolutional block attention mechanism and residual network described in this invention, the transient stability prediction model trains three sub-classifiers based on convolutional attention mechanism and residual network to obtain the prediction results of the three sub-classifiers, including: The convolutional block attention mechanism extracts features from the channel and spatial dimensions, while the residual network avoids network performance degradation and performs identity mapping. The computational principle of the convolutional block attention mechanism is as follows: in, Here is the formula for calculating channel attention. The formula for calculating the SAM module is as follows. It is the sigmoid activation function. It is a multilayer perceptron. and These are the relevant weighting coefficients of the multilayer perceptron. This represents performing average pooling on the intermediate feature map. This represents performing max pooling on the intermediate feature map. For the process The feature map obtained after the operation, For the process The feature map obtained after the operation, This represents performing a convolution operation on the feature map, where n×n is the size of the filter during the convolution operation. The calculation principle of residual blocks is as follows: in, Identity mapping, , It is the ReLU activation function. This represents residual calculation, where L indicates a deeper level, and the loss function is denoted as... , and The weight coefficient corresponding to the i-th residual unit, and The input features are those of the Lth layer. The input features are those of the (L+1)th layer. In scalar form, In vector form, These are the trainable parameters used in the residual calculation of the Lth layer; The loss function is denoted as The loss function of the transient stability prediction model is replaced by the focus loss function. As shown below: in, Labels for real samples To predict sample labels, It is a balance parameter. It is the focusing parameter. This represents the power of the focusing parameter for predicting sample labels.
[0012] As a preferred embodiment of the ensemble transient stability prediction method based on convolutional block attention mechanism and residual network described in this invention, the step of integrating the prediction results of the three sub-classifiers to obtain the final prediction result, and correcting samples misclassified by the sub-classifiers through the ensemble mechanism, includes: The final prediction results are integrated using the following formula: in, The probability value predicted by the S-th sub-classifier for each sample. For each sample, The two labels corresponding to the samples are stable and unstable. The final prediction result is taken from the class with the highest average predicted probability value, as shown below: in, Corresponding samples The average probability value predicted by the three sub-classifiers as two labels is used as the label corresponding to the largest value as the final prediction result of the model.
[0013] As a preferred embodiment of the integrated transient stability prediction method based on convolutional block attention mechanism and residual network described in this invention, wherein: when the power system operating topology changes lead to performance degradation, the transient stability prediction model is rapidly updated through active learning and fine-tuning transfer learning, including: In actual power systems, when the PMU device malfunctions, resulting in a lack of information acquisition and insufficient training features for the model, the predictive performance of the transient stability prediction model is tested and updated after removing features of a single generator and features of multiple generators, respectively, through active learning and fine-tuning transfer.
[0014] This invention, through an integrated model based on convolutional block attention mechanism and residual network, combined with time-domain simulation and active learning, can accurately predict the transient stability of power systems and correct misjudged samples, enabling rapid model updates and reliable evaluation when the system topology changes.
[0015] This invention provides an integrated transient stability prediction system based on convolutional block attention mechanism and residual network, comprising: The data acquisition module, based on the IEEE 10-machine 39-bus system, conducts time-domain simulation of the power system. By setting different load levels, fault locations and parameters, it generates training samples, collects the electrical characteristics of the power system, constructs a high-dimensional power system dataset, and provides input features for the model. The transient stability prediction model building module uses the dataset as input features to build an integrated transient stability prediction model, which consists of three sub-classifiers. Each sub-classifier is based on the convolutional block attention mechanism and residual network design to extract features from the channel and spatial dimensions. The sub-classifier training module trains three sub-classifiers, using the focus loss function instead of the traditional loss function. During training, the convolutional block attention mechanism and the computational principle of the residual network are applied to optimize the model parameters and obtain the prediction results of each sub-classifier. The integrated prediction and correction module integrates the prediction results of the three sub-classifiers and obtains the final prediction result by calculating the average probability. The integration mechanism corrects the samples that were misclassified by the sub-classifiers. The specific formulas include probability averaging and maximum probability selection. The update and adaptation module, when the power system operating topology changes cause the model performance to degrade, uses active learning and fine-tuning transfer techniques to handle PMU device failures or feature loss, tests and quickly updates the model to maintain predictive performance.
[0016] The present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of an integrated transient stable prediction method based on a convolutional block attention mechanism and a residual network.
[0017] The present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of an integrated transient stability prediction method based on a convolutional block attention mechanism and a residual network.
[0018] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention uses an IEEE 10-machine 39-node system for time-domain simulation, collecting electrical quantities such as the generator's relative power angle, speed, kinetic energy, relative electromagnetic power, and excitation current to construct a high-dimensional power system dataset as model input; subsequently, three sub-classifiers based on Convolutional Block Attention (CBAM) and Residual Network (ResNet) are trained. Each sub-classifier fully extracts features from the channel and spatial dimensions through the CBAM module, and uses the Residual Network to avoid performance degradation, while introducing a focus loss function to focus on hard-to-classify samples; the final output of the model integrates the prediction results of the three sub-classifiers, taking the class with the highest average probability value as the prediction result, effectively correcting the misclassified samples of the sub-classifiers; when the power system operating topology changes, causing the model performance to degrade, active learning and fine-tuning techniques are used to quickly update the model using a small number of labeled samples, so that it maintains high prediction accuracy under the new topology. This invention significantly improves the accuracy, recall, precision, and F1 score of transient stability prediction by integrating the CBAM-ResNet model and the focus loss function. It also enhances the model's generalization ability and robustness to feature loss and topology changes. Through active learning and fine-tuning techniques, the model achieves rapid adaptive updates under system changes, reduces training time costs, and ensures the practicality and reliability of the prediction model in complex power systems. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 The following is a flowchart illustrating the implementation of an integrated transient stability prediction method based on convolutional block attention mechanism and residual network, as provided in one embodiment of the present invention.
[0021] Figure 2 This is a framework diagram of an integrated transient stability prediction model based on a convolutional block attention mechanism and a residual network, provided as an embodiment of the present invention.
[0022] Figure 3 The diagram shows the structure of the convolutional block attention mechanism in an integrated transient stability prediction method based on convolutional block attention mechanism and residual network, as provided in an embodiment of the present invention.
[0023] Figure 4 The residual network structure diagram is provided for an integrated transient stability prediction method based on convolutional block attention mechanism and residual network in one embodiment of the present invention.
[0024] Figure 5 The image shows the prediction performance test of a model after removing features of a single generator, which is an integrated transient stability prediction method based on convolutional block attention mechanism and residual network provided in an embodiment of the present invention.
[0025] Figure 6 The image shows the prediction performance test of a model after removing features from multiple generators, which is an integrated transient stability prediction method based on convolutional block attention mechanism and residual network provided in an embodiment of the present invention.
[0026] Figure 7 This is a topology diagram of an IEEE 10-machine 39-node system based on an integrated transient stability prediction method using convolutional block attention mechanism and residual network, provided as an embodiment of the present invention. Detailed Implementation
[0027] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0028] Example 1, referring to Figure 1 This is the first embodiment of the present invention, providing an integrated transient stability prediction method based on convolutional block attention mechanism and residual network, comprising: S1: Based on the IEEE 10-machine 39-node system, time-domain simulation is performed. Various electrical characteristics of the power system are collected through time-domain simulation to construct a high-dimensional power system dataset.
[0029] S2: Use the dataset as input features to build a transient stability prediction model.
[0030] S3: The transient stable prediction model trains three sub-classifiers based on convolutional attention mechanism and residual network to obtain the prediction results of the three sub-classifiers.
[0031] S4: The final prediction result is obtained by integrating the prediction results of the three sub-classifiers, and the samples misclassified by the sub-classifiers are corrected through the integration mechanism.
[0032] S5: When changes in the operating topology of the power system lead to performance degradation, the transient stability prediction model is updated rapidly through active learning and fine-tuning migration.
[0033] It should be noted that traditional transient stability prediction methods, such as time-domain simulation and direct methods, cannot meet the requirements of online real-time computing. Furthermore, existing AI-based methods, such as convolutional neural networks and recurrent neural networks, have limitations in feature extraction, struggling to simultaneously and effectively capture both spatial global features and temporal series correlation information. They lack a holistic modeling of the spatiotemporal correlation characteristics of the power system, leading to insufficient prediction accuracy. Moreover, model performance significantly degrades when the power system operating topology changes, lacking a mechanism for rapid adaptation to new operating conditions, thus limiting the practicality and robustness of the prediction model. Therefore, developing a transient stability prediction model integrating convolutional block attention mechanisms and residual networks is crucial. This model should achieve multi-dimensional feature extraction of channels and space through the attention mechanism, utilize ensemble learning to correct misclassified samples, and introduce active learning and fine-tuning techniques to achieve rapid model updates. Addressing the challenges of holistic spatiotemporal feature modeling, focusing on difficult-to-classify samples, improving model generalization ability, and enabling rapid adaptation under new topologies is also essential.
[0034] Therefore, addressing the problems of insufficient feature extraction, inadequate spatiotemporal correlation modeling, lack of correction for misclassified samples, and performance degradation after topology changes in traditional transient stability prediction methods, this paper proposes a method that, through steps S1-S5, conducts time-domain simulation based on an IEEE 10-machine 39-node system and constructs a high-dimensional power system dataset. This provides comprehensive feature inputs reflecting system dynamics, improving the data-driven modeling foundation and feature completeness. By establishing a prediction model that integrates convolutional block attention mechanism and residual network, it achieves enhanced feature extraction from channel and spatial dimensions, effectively avoiding the gradient vanishing problem and improving the model's ability to capture spatiotemporal correlation features and training stability. By integrating three sub-classifiers and adopting an average probability fusion mechanism, it effectively corrects samples that may be misclassified by a single classifier, improving the accuracy and robustness of the prediction results. Simultaneously, by introducing active learning and fine-tuning transfer techniques, it uses a small number of samples to quickly update model parameters after system topology changes, achieving the goal of rapid adaptation and continuous reliable prediction under new operating conditions.
[0035] Example 2, refer to Figure 1 - Figure 7 As an embodiment of the present invention, based on the above embodiment, an integrated transient stability prediction method based on convolutional block attention mechanism and residual network is provided.
[0036] In this embodiment of the application, step S1 involves performing time-domain simulation based on the IEEE 10-machine 39-node system. This time-domain simulation is used to collect various electrical characteristics of the power system and construct a high-dimensional power system dataset, including the following steps A1-A2: A1: Time-domain simulation is performed by setting different load levels, setting faults at preset locations on the system transmission lines, and setting the start and end times, duration, and sampling interval of the faults.
[0037] A2: By collecting the generator's relative power angle, speed, kinetic energy, relative electromagnetic power, and excitation current, electrical characteristics are obtained. These electrical characteristics correspond to the state variables of the generator's operation in the power system, thus constructing a high-dimensional power system dataset.
[0038] Specifically, based on the IEEE 10-machine 39-bus system, time-domain simulation is performed, and the collected electrical quantities are used to construct a high-dimensional power system dataset, which is then used as the input features of the model for training.
[0039] The collected electrical characteristics include the generator's relative power angle, speed, kinetic energy, relative electromagnetic power, and excitation current. The definitions of each variable are as follows: Relative angle of work: ; Rotational speed: ; kinetic energy: ; Relative electromagnetic power: ; Excitation current: ; in, The total number of generators, For the first The power angle of the generator, Indicates time, , For the first The inertia coefficient of the generator, For the first The rotational speed of the generator, For the first The inertia coefficient of the generator.
[0040] In an alternative implementation, time-domain simulations can also be performed using the PST 2.0 toolbox on the Matlab platform. By collecting some electrical characteristics of the power system through time-domain simulations, a power system dataset can be constructed.
[0041] Specifically, time-domain simulations were performed using the PST 2.0 toolbox on the Matlab platform, with different load levels used to obtain training samples. Electrical characteristics were obtained by collecting the relative power angle and speed of the generators. These electrical characteristics correspond to the state variables of generator operation in the power system, thus constructing a power system dataset.
[0042] In another alternative implementation, time-domain simulations can be performed using a simplified power system simulation script written by the user on the Matlab platform. The basic electrical characteristics of the power system can be collected through time-domain simulations to construct a power system dataset.
[0043] Specifically, time-domain simulations were performed on the Matlab platform using a simplified simulation script written by the developer, with different load levels set to obtain training samples. Electrical characteristics were obtained by collecting the generator's relative power angle and excitation current; these electrical characteristics correspond to the state variables of the generator operation in the power system, thus constructing a power system dataset.
[0044] In this embodiment of the invention, step S2 uses the dataset as input features to establish a transient stability prediction model, including: An ensemble transiently stable prediction model consisting of three sub-classifiers was built using the dataset. Each sub-classifier incorporates a convolutional attention mechanism on top of the residual network.
[0045] Specifically, such as Figure 2 As shown, an integrated transient stable prediction model is established using the dataset as input features. It consists of three sub-classifiers, each of which is based on a convolutional block attention mechanism and a residual network design to extract features from the channel and spatial dimensions.
[0046] In an alternative implementation, the dataset can be used as input features, and a single classifier structure can be used to build a transiently stable prediction model.
[0047] Specifically, a single residual network model is constructed using the dataset as input features. This model extracts features from the input data through residual blocks and directly outputs the classification results.
[0048] In another alternative implementation, the dataset can be used as input features, and an ensemble model consisting of three sub-classifiers can be used, each using a basic convolutional neural network structure, to build a transiently stable prediction model.
[0049] Specifically, each sub-classifier consists of multiple standard convolutional and pooling layers stacked sequentially, without residual connections or attention mechanisms, and only performs simple feature extraction from the channel and spatial dimensions of the input data.
[0050] In this embodiment of the invention, step S3 involves training the transient stable prediction model on three sub-classifiers based on convolutional attention mechanisms and residual networks to obtain the prediction results of the three sub-classifiers, including the following steps B1-B3: The convolutional block attention mechanism extracts features from the channel and spatial dimensions, while the residual network avoids network performance degradation and performs identity mapping.
[0051] Specifically, B1: such as Figure 3 As shown, the computational principle of the convolutional block attention mechanism is as follows: in, Here is the formula for calculating channel attention. The formula for calculating the SAM module is as follows. It is the sigmoid activation function. It is a multilayer perceptron. and These are the relevant weighting coefficients of the multilayer perceptron. This represents performing average pooling on the intermediate feature map. This represents performing max pooling on the intermediate feature map. For the process The feature map obtained after the operation, For the process The feature map obtained after the operation, This represents performing a convolution operation on the feature map, where n×n is the size of the filter during the convolution operation.
[0052] B2: such as Figure 4 As shown, the calculation principle of the residual block is as follows: in, Identity mapping, , It is the ReLU activation function. This represents residual calculation, where L indicates a deeper level, and the loss function is denoted as... , and The weight coefficient corresponding to the i-th residual unit, and The input features are those of the Lth layer. The input features are those of the (L+1)th layer. In scalar form, In vector form, These are the trainable parameters used in the residual calculation of the Lth layer.
[0053] B3: The loss function is denoted as... The loss function of the transient stability prediction model is replaced by the focus loss function. As shown below: in, Labels for real samples To predict sample labels, It is a balance parameter. It is the focusing parameter. This represents the power of the focusing parameter for predicting sample labels.
[0054] In an alternative implementation, prediction results can also be obtained by training a sub-classifier based on a simple convolutional layer.
[0055] Specifically, in the sub-classifier, basic convolutional and pooling layers are used for feature extraction. Multiple convolutional and max-pooling layers are directly applied to the input data to gradually reduce the feature map size. The final feature map is flattened into a vector and the prediction result is output through a fully connected layer.
[0056] In another alternative implementation, prediction results can be obtained by training a subclassifier based on a shallow network and a simple activation function.
[0057] Specifically, a shallow convolutional network is constructed, and a sigmoid activation function is used after the convolutional layers to directly connect to fully connected layers for classification. During training, the network structure relies on forward propagation to output prediction results.
[0058] In this embodiment of the application, step S4 integrates the prediction results of the three sub-classifiers to obtain the final prediction result, and corrects the samples misclassified by the sub-classifiers through the integration mechanism, including the following steps C1-C4. Specifically, C1: The final prediction results are integrated using the following formula: in, The probability value predicted by the S-th sub-classifier for each sample. For each sample, The two labels corresponding to the samples are stable and unstable.
[0059] C2: The class with the highest average predicted probability value is taken as the final prediction result, as shown below: in, Corresponding samples The average probability value predicted by the three sub-classifiers as two labels is used as the label corresponding to the largest value as the final prediction result of the model.
[0060] C3: The formula for calculating the power angle stability index (TSI) is: in, For transient stability index, This represents the difference in the absolute value of the maximum power angle between two generators after the power system is disturbed.
[0061] C4: The prediction results are evaluated using accuracy, recall, precision, and F1 score. The definitions of each metric are as follows: in, This represents the number of samples where the predicted result was stable and the actual result was stable. This represents the number of samples where the predicted result was stable, but the actual result was unstable. This indicates the number of samples that were predicted to be unstable but actually remained stable. This represents the number of samples where the predicted outcome was instability, and the actual outcome was instability. The score is the harmonic mean of precision and recall, which comprehensively measures the model's performance on unstable classes.
[0062] The required symbols are derived from the confusion matrix in the table below: Table 1 Confusion Matrix
[0063] In an alternative implementation, the final prediction result can also be obtained through majority voting integration.
[0064] Specifically, the predicted labels (stable or unstable) for each sample are collected from the three sub-classifiers, and the frequency of each label is counted. The label with the highest frequency is used as the final prediction result. If there is a tie (i.e., two labels have the same frequency), a label is randomly selected as the final prediction result.
[0065] In another alternative implementation, the final prediction result can be obtained by selecting a random subclassifier.
[0066] Specifically, a sub-classifier is randomly selected from the three sub-classifiers, ignoring the predictions of the other two sub-classifiers. The predicted label of the selected sub-classifier is then used as the final prediction result.
[0067] In this embodiment of the application, when a change in the power system operating topology leads to a performance degradation, step S5 involves rapidly updating the transient stability prediction model through active learning and fine-tuning migration, including: In actual power systems, when the PMU device malfunctions, resulting in a lack of information acquisition and insufficient training features for the model, the predictive performance of the transient stability prediction model is tested and updated after removing features of a single generator and features of multiple generators, respectively, through active learning and fine-tuning transfer.
[0068] Specifically, in real-world power systems, PMU (Power Management Unit) failures are inevitable, leading to missing data acquisition and ultimately insufficient training features for the model, resulting in performance degradation. Therefore, it is essential to test the model's predictive performance under PMU loss conditions to prevent severe performance degradation that renders the model unusable. Two scenarios were considered: feature loss for a single generator and feature loss for multiple generators. Detailed test results are as follows: Figure 6 and Figure 7 As shown.
[0069] In an alternative implementation, the transient stability prediction model can also be updated rapidly based on passive learning using random sampling.
[0070] Specifically, after detecting a PMU device malfunction that leads to feature loss, a subset of samples is randomly selected from the currently available dataset. These random samples are used to adjust the parameters of the transient stability prediction model, and the updated model is then deployed directly.
[0071] In another alternative implementation, the transient stability prediction model can be quickly updated based on retraining of the full dataset.
[0072] Specifically, after detecting a PMU device malfunction that leads to feature loss, all available historical operational data are collected, the transient stable prediction model is reinitialized using this data, and trained from scratch. After training is complete, the new model is deployed and used.
[0073] In summary, this invention utilizes a 10-machine, 39-node IEEE system for time-domain simulation, enabling the acquisition of multi-dimensional electrical features of the power system and the construction of a high-dimensional dataset. By establishing an integrated prediction model that combines convolutional block attention mechanisms with residual networks, it achieves deep feature extraction from both channel and spatial dimensions, and optimizes the model training process using a focus loss function. By training three sub-classifiers separately and integrating their prediction results, it effectively corrects misclassified samples. Furthermore, by introducing active learning and fine-tuning transfer learning techniques, it enables rapid model updates using a small number of samples when the system's topology changes. This significantly improves the accuracy and generalization ability of transient stability prediction, enhances the model's adaptability and robustness under different operating conditions, and provides effective support for the safe and stable operation of the power system.
[0074] Example 3 is the third embodiment of the present invention, which differs from the previous two embodiments in that: This embodiment also provides an integrated transient stability prediction system based on convolutional block attention mechanism and residual network, including: The data acquisition module, based on the IEEE 10-machine 39-bus system, conducts time-domain simulation of the power system. By setting different load levels, fault locations and parameters, it generates training samples, collects the electrical characteristics of the power system, constructs a high-dimensional power system dataset, and provides input features for the model. The transient stability prediction model building module uses the dataset as input features to build an integrated transient stability prediction model, which consists of three sub-classifiers. Each sub-classifier is based on the convolutional block attention mechanism and residual network design to extract features from the channel and spatial dimensions. The sub-classifier training module trains three sub-classifiers, using the focus loss function instead of the traditional loss function. During training, the convolutional block attention mechanism and the computational principle of the residual network are applied to optimize the model parameters and obtain the prediction results of each sub-classifier. The integrated prediction and correction module integrates the prediction results of the three sub-classifiers and obtains the final prediction result by calculating the average probability. The integration mechanism corrects the samples that were misclassified by the sub-classifiers. The specific formulas include probability averaging and maximum probability selection. The update and adaptation module, when the power system operating topology changes cause the model performance to degrade, uses active learning and fine-tuning transfer techniques to handle PMU device failures or feature loss, tests and quickly updates the model to maintain predictive performance.
[0075] This embodiment also provides an electronic device applicable to an integrated transient stability prediction method based on a convolutional block attention mechanism and a residual network, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the integrated transient stability prediction method based on a convolutional block attention mechanism and a residual network as proposed in the above embodiment.
[0076] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements an integrated transient stability prediction method based on a convolutional block attention mechanism and a residual network as proposed in the above embodiment.
[0077] The storage medium proposed in this embodiment belongs to the same inventive concept as the integrated transient stability prediction method based on convolutional block attention mechanism and residual network proposed in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0078] Example 4 is the fourth embodiment of the present invention: This invention presents a case study on an IEEE 10-machine 39-node system. First, time-domain simulations were performed using the PST3.0 toolbox in Matlab 2022b software to obtain training samples. Load levels were set to 80%–120%, increasing in 5% increments, for a total of nine different load levels. Fault locations were set at 20%, 40%, 60%, and 80% of the load on 34 transformerless transmission lines. Faults started at 1 second and ended at 6 seconds, with durations ranging from 0.02 to 0.2 seconds, and a sampling interval of 0.01 seconds. The final number of samples collected is shown in Table 1. To avoid overfitting, the simulated samples were divided into training and test sets in an 8:2 ratio, and five-fold cross-validation was used during training to ensure sample randomness.
[0079] First, the ensemble model was compared with each individual sub-classifier, demonstrating the effectiveness of the proposed ensemble model. Second, to verify the robustness of the model, we added Gaussian white noise of varying intensities to the test dataset. Table 2 shows the test results of each sub-classifier and the ensemble model on a 10-machine system. Furthermore, this invention was also tested on ResNet without the CBAM attention mechanism; the specific prediction results are shown in Table 2.
[0080] Table 2 Test Results of the 10-Machine System
[0081] Observing the results in Table 2, it is clear that the ensemble model shows significant improvement across all evaluation metrics. Specifically, the prediction accuracy of the ensemble model is improved by 0.27%, 0.40%, and 0.31% compared to sub-classifiers 1, 2, and 3, respectively, and it achieves the best performance across all other metrics compared to the individual sub-classifiers. Furthermore, compared to ResNet without the CBAM attention module, both the ensemble model and each sub-classifier outperform ResNet. This indicates that by introducing the CBAM module, the model more fully captures effective features, resulting in more accurate predictions and improving the model's prediction accuracy.
[0082] Table 3 shows the test results using different classifiers such as LSTM, GRU, and CNN on a 10-machine system. This invention introduces an algorithm composed of a lightweight attention module SENet and ResNet for comparison to demonstrate the superiority of the proposed method. The LSTM and GRU have 128 hidden units, and the settings for hyperparameters such as learning rate and optimization solver are the same as those for the proposed ensemble transient stable prediction method.
[0083] Table 3. Prediction results of different classifiers in the 10-machine system
[0084] As shown in Table 3, the ensemble method proposed in this invention still achieved an accuracy of 99.32% among different classifiers, and the F1 score was also the best, reaching 99.09%. This indicates that the overall performance of the model is the best among all classifiers. Although the training time is relatively long, the improvement in accuracy means a reduction in the number of misclassified samples. Misclassifying unstable samples as stable samples may cause significant losses to the power system.
[0085] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0086] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. An integrated transient stability prediction method based on convolutional block attention mechanism and residual network, characterized in that: include, Time-domain simulation was performed based on an IEEE 10-machine 39-node system. A high-dimensional power system dataset is constructed by collecting various electrical characteristics of the power system through time-domain simulation. Using the dataset as input features, a transient stability prediction model is established. The transient stability prediction model is trained on three sub-classifiers based on convolutional attention mechanism and residual network to obtain the prediction results of the three sub-classifiers; The final prediction result is obtained by integrating the prediction results of the three sub-classifiers, and the samples misclassified by the sub-classifiers are corrected by the integration mechanism. When changes in the operating topology of the power system lead to performance degradation, the transient stability prediction model is rapidly updated through active learning and fine-tuning migration.
2. The integrated transient stability prediction method based on convolutional block attention mechanism and residual network as described in claim 1, characterized in that: The time-domain simulation based on the IEEE 10-machine 39-node system includes... Time-domain simulation is performed by setting different load levels, setting faults at preset locations on the system transmission lines, and setting the start and end times, duration, and sampling interval of the faults.
3. The integrated transient stability prediction method based on convolutional block attention mechanism and residual network as described in claim 2, characterized in that: The process involves collecting various electrical characteristics of the power system through time-domain simulation to construct a high-dimensional power system dataset, including: By collecting the generator's relative power angle, speed, kinetic energy, relative electromagnetic power, and excitation current, electrical characteristics are obtained. These electrical characteristics correspond to the state variables of the generator's operation in the power system, thus constructing a high-dimensional power system dataset.
4. The integrated transient stability prediction method based on convolutional block attention mechanism and residual network as described in claim 3, characterized in that: The step of using the dataset as input features to establish a transient stability prediction model includes, An ensemble transiently stable prediction model consisting of three sub-classifiers was built using the dataset. Each sub-classifier incorporates a convolutional attention mechanism on top of the residual network.
5. The integrated transient stability prediction method based on convolutional block attention mechanism and residual network as described in claim 4, characterized in that: The transient stability prediction model is trained on three sub-classifiers based on convolutional attention mechanisms and residual networks, yielding prediction results from the three sub-classifiers, including: The convolutional block attention mechanism extracts features from the channel and spatial dimensions, while the residual network avoids network performance degradation and performs identity mapping. The computational principle of the convolutional block attention mechanism is as follows: in, Here is the formula for calculating channel attention. The formula for calculating the SAM module is as follows. It is the sigmoid activation function. It is a multilayer perceptron. and These are the relevant weighting coefficients of the multilayer perceptron. This represents performing average pooling on the intermediate feature map. This represents performing max pooling on the intermediate feature map. For the process The feature map obtained after the operation, For the process The feature map obtained after the operation, This represents performing a convolution operation on the feature map, where n×n is the size of the filter during the convolution operation. The calculation principle of residual blocks is as follows: in, Identity mapping, , It is the ReLU activation function. This represents residual calculation, where L indicates a deeper level, and the loss function is denoted as... , and The weight coefficient corresponding to the i-th residual unit, and The input features are those of the Lth layer. The input features are those of the (L+1)th layer. In scalar form, In vector form, These are the trainable parameters used in the residual calculation of the Lth layer; The loss function is denoted as The loss function of the transient stability prediction model is replaced by the focus loss function. As shown below: in, Labels for real samples To predict sample labels, It is a balance parameter. It is the focusing parameter. This represents the power of the focusing parameter for predicting sample labels.
6. The integrated transient stability prediction method based on convolutional block attention mechanism and residual network as described in claim 5, characterized in that: The process of integrating the prediction results of the three sub-classifiers to obtain the final prediction result, and correcting samples misclassified by the sub-classifiers through an integration mechanism, includes: The final prediction results are integrated using the following formula: in, The probability value predicted by the S-th sub-classifier for each sample. For each sample, The two labels corresponding to the samples are stable and unstable. The final prediction result is taken from the class with the highest average predicted probability value, as shown below: in, Corresponding samples The average probability value predicted by the three sub-classifiers as two labels is used as the label corresponding to the largest value as the final prediction result of the model.
7. The integrated transient stability prediction method based on convolutional block attention mechanism and residual network as described in claim 6, characterized in that: When performance degradation occurs due to changes in the power system's operating topology, the transient stability prediction model is rapidly updated through active learning and fine-tuning migration, including: In actual power systems, when the PMU device malfunctions, resulting in a lack of information acquisition and insufficient training features for the model, the predictive performance of the transient stability prediction model is tested and updated after removing features of a single generator and features of multiple generators, respectively, through active learning and fine-tuning transfer.
8. An integrated transient stability prediction system based on convolutional block attention mechanism and residual network, employing the integrated transient stability prediction method based on convolutional block attention mechanism and residual network as described in any one of claims 1 to 7, characterized in that, include: The data acquisition module, based on the IEEE 10-machine 39-bus system, conducts time-domain simulation of the power system. By setting different load levels, fault locations and parameters, it generates training samples, collects the electrical characteristics of the power system, constructs a high-dimensional power system dataset, and provides input features for the model. The transient stability prediction model building module uses the dataset as input features to build an integrated transient stability prediction model, which consists of three sub-classifiers. Each sub-classifier is based on the convolutional block attention mechanism and residual network design to extract features from the channel and spatial dimensions. The sub-classifier training module trains three sub-classifiers, using the focus loss function instead of the traditional loss function. During training, the convolutional block attention mechanism and the computational principle of the residual network are applied to optimize the model parameters and obtain the prediction results of each sub-classifier. The integrated prediction and correction module integrates the prediction results of the three sub-classifiers and obtains the final prediction result by calculating the average probability. The integration mechanism corrects the samples that were misclassified by the sub-classifiers. The specific formulas include probability averaging and maximum probability selection. The update and adaptation module, when the power system operating topology changes cause the model performance to degrade, uses active learning and fine-tuning transfer techniques to handle PMU device failures or feature loss, tests and quickly updates the model to maintain predictive performance.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the integrated transient stability prediction method based on convolutional block attention mechanism and residual network as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the integrated transient stability prediction method based on convolutional block attention mechanism and residual network as described in any one of claims 1 to 7.