1. Introduction
The continuous growth in global electricity demand drives power systems to operate under increasingly high-load conditions, often nearing their stability thresholds [
1]. This trend imposes substantial pressure on the reliability and resilience of modern power grids, making it imperative to address the challenges associated with maintaining stable operations. The integration of renewable energy sources (RESs), such as wind and solar power, further complicates this landscape due to their inherent intermittency and variability. While these sources offer significant environmental advantages, they introduce dynamic behaviors that, if not carefully managed, can undermine grid stability. Moreover, the widespread adoption of power electronic devices exacerbates these challenges by introducing rapid and nonlinear dynamics that may interact detrimentally with the grid [
2]. Consequently, ensuring the stability of power systems under such conditions has become a paramount concern for researchers and practitioners. Accurate prediction of power system stability has become increasingly vital, as it enables operators to implement timely and effective control measures, thereby ensuring reliable electricity delivery and mitigating the risk of cascading failures [
3].
Traditional model-based stability prediction methods can be categorized into time-domain simulation and energy function approaches [
4]. Time-domain methods typically use low-order models to simulate system stability. For instance, C.-W. Liu and J. S. Thorp employed an implicit decoupling PQ method for stability prediction while utilizing a linear model for parallel simulation approach [
5] to predict stability in the IEEE 145-bus system [
6]. Time-domain simulation methods require detailed system models to solve differential or algebraic equations. However, with the continuous expansion of modern power systems and the integration of RESs, obtaining detailed models becomes impractical, and the solution process is time-consuming [
2]. Energy function methods are generally based on Lyapunov’s second law. The Lyapunov exponent’s out-of-step technique [
7] is used to predict system stability and energy functions [
8] are employed to estimate stability margins for predicting stability in the IEEE 39-bus system. In large-scale power systems, determining an appropriate Lyapunov function is challenging, and the computation of system energy is highly time-consuming [
9]. However, traditional methods have significant limitations. They require precise power system models, and inaccuracies can lead to unreliable stability analysis. Additionally, their computational time increases with system size, making them unsuitable for real-time applications in modern, large-scale power systems.
With the deployment of phasor measurement units (PMUs) and the development of wide-area monitoring systems (WAMS), machine learning (ML) has been extensively applied to power system stability prediction. ML methods are data-driven and model-free, making them well-suited for online use, where fast response times and high accuracy are required. A.Karami employed a multi-layer perceptron (MLP) to estimate the transient stability margin of power systems [
10]. Convolutional neural networks (CNNs) are utilized for transient stability prediction [
11]. Machine learning techniques are applied to predict voltage stability in power systems [
12], while G. Wang et al. leveraged graph convolutional networks (GCN) and long short-term memory (LSTM) networks for online voltage stability prediction [
13]. ML methods do not rely on the detailed modeling of power systems and possess strong generalization capabilities, making them highly promising for online diagnostics [
14]. Farheen Bano et al. analyzed microgrid voltage stability using a variety of machine learning models, including random forest, gradient boosting, K-means, hierarchical clustering, and regression models [
15].
Short-term power system instability includes transient and voltage instability [
16]. Transient instability occurs when, after a large disturbance, the generators in the power system fail to maintain synchronous operation, causing the system to become unstable. Voltage instability occurs when a disturbance leads to a significant voltage drop, potentially resulting in voltage collapse. When a fault occurs in the system, transient and voltage instability often manifest simultaneously, or the system may transition from one instability mode to another. Different instability types require distinct control strategies [
16]. For transient stability, the objective is to maintain generator synchronization, and control strategies typically focus on the generator rotor, such as excitation control or early disconnection of critical generators [
2]. For short-term voltage stability, the focus is on controlling reactive power, which can be achieved by deploying reactive power compensation devices, such as capacitors, reactors, or emergency load shedding [
17]. However, achieving precise classification of power system stability remains a complex challenge [
18]. For instance, when the rotor angles of two generators gradually separate, the electrical distance between them increases, causing voltage drops at intermediate load nodes. This issue, caused by transient power angle instability, cannot be effectively resolved by reactive power compensation alone at the critical load node [
19]. Therefore, precise classification of power system stability behaviors is crucial for successful operation.
Although current deep learning-based methods for single instability prediction perform relatively well, they focus on individual stability, such as transient or voltage stability, often overlooking the interrelated nature of instability behaviors. The coupling between phase angle and voltage instabilities is well-established, and neglecting this aspect can lead to incomplete or inaccurate control strategies. Moreover, deep learning models face the challenge of imbalanced data, as instability events are rare in power system operations. This imbalance often results in overfitting, reducing model generalizability to unseen scenarios. Current methods have not sufficiently addressed this issue, which limits their robustness in real-world applications. Furthermore, the practical applicability of these methods under more complex conditions, such as N-2 contingencies, remains underexplored. Given the significant impact of such contingencies on system stability, further research is necessary to improve the reliability and scalability of deep learning-based approaches in handling these complex scenarios. This paper proposes a co-prediction of transient and voltage stability based on a spatio-temporal embedding graph neural network (STEGNN). The main contributions of this paper are as follows:
(1) The STEGNN model proposed combines power system topology with PMU historical data to co-predicate transient and voltage stability, enabling a comprehensive analysis of power system dynamic stability for more precise operational decisions in the event of system instability.
(2) In power system operation data, instability samples constitute a small proportion. During the training process, a weighted loss function is adopted to emphasize unstable samples, effectively addressing the data imbalance issue, which enhances the model’s training stability and prevents overfitting.
(3) The proposed STEGNN model is designed for real-time applications, ensuring that it balances prediction accuracy and computational efficiency. By selecting an optimal observation window length, the model provides timely and accurate transient and voltage stability predictions, making it suitable for real-time monitoring and control in power systems.
(4) The STEGNN model is pre-trained on the N-1 contingency dataset and successfully applied to the N-2 contingency dataset, validating its effectiveness in handling various contingency scenarios and demonstrating its strong transferability.
The remainder of the paper is structured as follows:
Section 2 provides a detailed exploration of the STEGNN model.
Section 3 presents the experimental results from various case studies. Finally,
Section 4 offers the conclusions.
3. Case Studies
The experimental results of the IEEE 118-bus power system are used to evaluate the proposed STEGNN model. We evaluate the model’s performance on the stability co-prediction and benchmark it with a single stability prediction. Additionally, we discuss the impact of grid-informed adjacency matrices and the time length of input PMU data on the STEGNN model’s performance. We also discuss the model’s robustness to noise. N-1 contingencies are considered, and the transient fault dynamics of the power system are simulated in the PSS/E program as follows:
- (1)
The consumed power randomly varies between 80% and 120% of the base load levels, repeated for 50 iterations;
- (2)
The load flow equation is solved to adjust the generator outputs accordingly;
- (3)
Three phase-to-ground faults are applied at all 118 buses and the ends of 177 transmission lines, with random fault clearance times of 0.3, 0.4, 0.5, or 0.6 s;
- (4)
The simulation is run for 5 s, and both transient stability and voltage stability labels are set.
Consequently, 59,000 samples are generated, and the number of four classes is 35381, 6389, 701 and 16,529, where the proportions of the training set, validation set, and test set are 80%, 10%, and 10%, respectively.
The confusion matrix is a valuable tool for evaluating the prediction model, defining four key values based on actual and predicted outcomes: true positive (
), false positive (
), true negative (
), and false negative (
). Here,
or
represents the instances where the model correctly predicts the positive or negative class. At the same time,
or
corresponds to instances where the model incorrectly predicts the negative or positive class. Stable (positive) and unstable (negative) are used interchangeably. To assess the performance of the STEGNN model, four metrics are employed: accuracy (
), false positive rate (
), false negative rate (
), and F-score (
) where
where
denotes the fraction of
among the models classified as positive class, and
denotes the fraction of
among the total number of positive samples. While
,
, and
can reveal whether the predictions are good or not,
could evaluate the prediction of the model of imbalanced samples more comprehensively, for it indicates how much more important recall is than precision or vice versa. We set
in this paper. The STEGNN model is trained on the NVIDIA GeForce RTX 4090 platform with the Tensorflow 2.3.1 environment and the model training hyperparameters are shown in
Table 2.
3.1. Concurrent Prediction Performance
ACC and loss curves during the training and validation process are shown in
Figure 2a. ACC and loss denote the validation dataset’s prediction accuracy rate and class-weighted CCE. The confusion matrix for the co-prediction is given in
Figure 2b.
To evaluate the effectiveness of the STEGNN model, a performance comparison is conducted between the proposed method and four existing deep learning models: MLP, CNN, TCN, and GCN. Concurrent transient stability prediction (Co-TSP) and voltage stability prediction (Co-VSP) are performed on the IEEE-118 bus power system using identical training, evaluation, and test datasets, as well as the same experimental setup. The results are presented in
Table 3. As shown in
Table 3, the STEGNN model outperforms the other methods in both transient stability and voltage stability prediction and the results of prediction are shown in bold.
In the IEEE 118-bus power system, the dataset of transmission line ground faults at 0.2 s (TLGF-0.2) has a size of 1770 and simultaneously has transient and voltage stability status labels. Compared to the concurrent prediction model trained with the dataset of the joint labels of transient stability and voltage stability, the single TSP and VSP prediction models are trained with the datasets with the single stability labels for the transient stability and voltage stability, respectively. In
Table 4, it can be observed that the concurrent STEGNN prediction model, co-prediction, can predict the TSP and VSP simultaneously for the TLGF-0.2 dataset, while the combined prediction of the single TSP and single VSP respectively recorded 23 and 38 incorrect predictions and 54 errors in total for TSP and VSP. In
Table 5 and
Table 6, the co-TSP and co-VSP predictions perform better than the single TSP and single VSP. As for the joint prediction, the concurrent STEGNN model can make the perfect prediction for the TLGF-0.2 test dataset. The concurrent prediction method demonstrates superior performance in transient stability, voltage stability, and co-prediction. The results of the joint prediction in
Table 4,
Table 5 and
Table 6 are all optimal, and are presented in bold.
Figure 3 provides a visualization of the high-dimensional features extracted from the hidden layers of the STEGNN model. The training and testing datasets samples are color-coded according to their true labels and predictions, visually assessing the model’s learning process. In the two subplots in the first row of
Figure 3, the training and testing samples are colored based on their true labels, while the second row shows the same datasets colored according to the predicted output with the STEGNN model. The two subplots in the third row of
Figure 3 show the prediction error. The results in
Figure 3 demonstrate that the STEGNN model successfully learns the underlying features of the dataset and makes accurate predictions.
3.1.1. Effect of Time Length
The observation window length of post-fault PMU data directly impacts the real-time application of the proposed STEGNN model. A longer observation window provides more system dynamics information, which enhances prediction (
), as shown in
Table 7. However, it also increases computational training time, as illustrated in
Figure 4. While the training time itself does not affect real-time applications, it may become significant when scaling to larger power systems, increasing the overall computational cost.
As depicted in
Figure 4, when the time length is less than 0.3 s, the
shows a steady increase. Beyond 0.3 s, the
plateaus, providing diminishing returns despite the additional observation data. To balance the demands of real-time application and predictive performance, a time length of 0.3 s is chosen and the prediction effect for time length of 0.3s is shown in bold. This selection ensures high prediction accuracy while limiting the computational cost associated with larger power systems, thereby maintaining the practical feasibility of the model.
3.1.2. Sensitivity Analysis
For the co-prediction of transient stability and voltage stability in practical power systems, the presence of noise in PMU data significantly impacts the prediction model performance. The standard deviation of noise in PMU data typically ranges from 0.0005 to 0.01, corresponding to a signal-to-noise ratio (SNR) of approximately 45 dB [
26].
Table 8 presents the co-prediction performance of the IEEE 118-bus power system under various SNR levels. Even at an SNR of 50 dB (slightly lower than typical levels), the model maintains high accuracy, with the ACCs of transient stability prediction (TSP) and voltage stability prediction (VSP) decreasing by only 0.01% and 0.03%, respectively. Under high-noise conditions at an SNR of 20 dB, the prediction performance exhibits a moderate decline, with ACCs decreasing by 0.14% and 1.22%. Additionally, other evaluation metrics also show degradation as the SNR decreases for co-TSP and co-VSP. These results demonstrate that STEGNN exhibits strong robustness against noise.
3.2. Performance in N-2 Contingency
The N-2 dataset, obtained from simulating three-phase grounding at two random buses in the IEEE 118-bus system, contains 29,500 samples. We evaluated and compared the ACC of co-prediction, single prediction, and co-prediction without a weighted loss function based on the STEGNN model.
Figure 5 shows that co-prediction performs best transferability for the N-2 dataset. All methods achieve high VSP accuracy, with the main differences observed in TSP. The ACC of co-prediction surpasses that of single prediction by 22.4%. It indicates a coupling relationship between transient and voltage stability and co-prediction significantly improves model transferability. Additionally, the ACC of co-prediction exceeds that of co-prediction without weighted loss by 32.3%, highlighting the importance of a weighted loss function for imbalanced datasets.
3.3. Effect of Grid-Informed Adjacency Matrices
In
Figure 6, three grid-informed adjacency matrices are introduced, incorporating the power grid’s structural and electrical parameter information. The grid-informed adjacency matrices are introduced in
Figure 6, where the colors of each small pixel block represent the corresponding element value of the four adjacency matrices. The corresponding prediction performances are shown in
Table 9. It can be observed from
Table 9 that the adjacency matrix
shows the worst performance. This can be explained by the very sparse adjacency matrix visualization in
Figure 6, which indicates that although
contains information on active power flow distribution, other useful information about the power system topology and electrical properties is discarded. Under the same training conditions,
demonstrates superior performance compared to
. Therefore, the STEGNN model uses
as the power grid information adjacency matrix for the co-prediction of the power system stability.
Table 9 presents a comparison of the joint prediction performance of the concurrent STEGNN model as well as the performance of co-TSP and co-VSP using three different grid-informed adjacency matrices for the IEEE-118 bus power system and the predictions of grid-informed adjacency matrice using
are shown in bold. The performance is evaluated using three metrics:
,
, and
. The joint prediction of TSP and VSP is 99.28%. The co-TSP and co-VSP perform very well. The
of the co-TSP and co-VSP are 99.97% and 99.31%, respectively.
3.4. Effect of Weighted Loss
Figure 7 illustrates the impact of weighted loss on the STEGNN model during training.
Figure 7a shows the ACC of co-prediction, co-TSP, and co-VSP. It can be observed that the ACC remains high whether weighted loss is applied, which, to some extent, demonstrates the superiority of the STEGNN model. The ACC is higher when the weighted loss is used.
Figure 7b shows the FPR for co-TSP and co-VSP. The results indicate that without weighted loss, the FPR is significantly higher. This suggests when transient or voltage instability occurs, models without weighted loss fail to provide adequate warnings, which is hazardous and unacceptable.
4. Conclusions
In conclusion, the proposed spatiotemporal enhanced graph neural network (STEGNN) model effectively addresses the intricate challenges of concurrent transient and voltage stability prediction in power systems. The model enables comprehensive and accurate stability assessments by seamlessly integrating spatial features derived from power system topology with temporal dynamics captured from PMU data. This dual-perspective approach enhances predictive precision while capitalizing on the interdependencies between transient and voltage stability, resulting in robust and dependable performance.
The STEGNN framework employs a cohesive integration of spatial and temporal information. Spatial features are extracted via a graph convolution (GC) module, while temporal data from PMUs are processed through a temporal convolution (TC) module. This synergistic design allows for a unified and accurate analysis of both stability phenomena. The model’s capability to simultaneously predict transient and voltage stability delivers several distinct advantages:
1. Superior predictive accuracy: The STEGNN framework outperforms traditional single-focus stability prediction methods for transient stability prediction (TSP) and voltage stability prediction (VSP). By jointly analyzing transient and voltage stability, the model harnesses inherent correlations, such as those between rotor angle dynamics and voltage behavior, to produce more precise and reliable predictions.
2. Real-time prediction capability: The STEGNN model facilitates rapid stability assessments using solely PMU data, making it highly suitable for real-time and online applications. This swift response capability is critical for system operators, enabling proactive interventions and preventive measures to mitigate potential instabilities and enhance grid reliability.
3. Robustness and transferability: To address the issue of limited, unstable samples, a weighted loss function is employed to enhance the model’s generalization ability. The model exhibits exceptional resilience to noise in PMU measurements, a critical attribute for real-world implementation in operational power systems where data imperfections are unavoidable. This robustness ensures consistent performance under varying conditions. Furthermore, the STEGNN framework demonstrates strong adaptability, maintaining high accuracy when applied to more complex and dynamic system scenarios.
The STEGNN’s ability to deliver timely and reliable stability predictions establishes it as a vital tool for system operators managing increasingly complex and interconnected power grids. Its robustness to data noise and unified treatment of transient and voltage stability enhance its practical utility, ensuring reliable operation even in challenging environments. By addressing these critical aspects of power system stability, the STEGNN framework contributes significantly to the operational resilience and security of modern and future energy systems, aligning with the evolving demands of smarter, more interconnected grids.