# Machine Learning for Online Transient Stability Assessment

- URL: https://energyai.berlin/thinking/ml4tsa
- Published: 2026-10-12
- Updated: 2026-10-12
- Authors: Mahmoud Draz
- Publisher: EnergyAI Berlin GmbH

Machine learning (ML) offers a computationally tractable alternative to time-domain simulation for online transient stability assessment (TSA), yet inconsistent evaluation practice limits reproducibility and cross-study comparison. We benchmark 17 ML classifiers on IEEE 9-bus and New England 39-bus power systems under a unified evaluation protocol, showing that tree-based ensemble models—Extra Trees (99.22%/98.15% accuracy) and LightGBM (99.10%/98.12%)—consistently outperform parametric and non-parametric approaches across accuracy, recall, and area under the receiver operating characteristic curve (AUC) with training times under two seconds. We further quantify the latency-accuracy tradeoff between snapshot and trajectory-based TSA. A five-second post-fault observation window recovers 85-100% accuracy using physics-informed temporal features, while classical ensembles match Long Short-Term Memory (LSTM), Temporal Convolutional Network (TCN), and Transformer architectures within 1.4% at 30- 100× lower training cost. We introduce Tranpy, an open-source Python package with pre-trained models, labeled datasets, and PowerFactory integration for custom dataset generation, addressing critical reproducibility gaps in ML-based TSA research.

## AI use case

A transmission system operator continuously checks in the control room whether credible faults would cause a loss of transient stability. A tree-based ensemble such as Extra Trees, trained on PowerFactory simulations of the operator's own grid model generated with Tranpy, classifies each contingency as stable or unstable and flags critical cases for full time-domain simulation. The target is to reduce screening time from simulation runtime to model inference time, while the engineer reviews every flagged case.
