An Open-Source Toolbox for Embedding Neural Stability Surrogates in Stability-Constrained Optimization

Guest lecture at the 3rd International Summer School on IBR-Dominated Power Systems, with an open unit-commitment tutorial.
Programme
3rd International Summer School on IBR-Dominated Power Systems
Institution
University of Strathclyde, Glasgow
Role
Guest Lecturer
Dates
31 August–4 September 2026

Summary

This guest lecture introduces an open workflow for learning a neural surrogate of small-signal stability and embedding that surrogate as an exact constraint in unit commitment. It was delivered at the third International Summer School on IBR-Dominated Power Systems, held at the University of Strathclyde in Glasgow. The school follows earlier editions at Imperial College London in 2024 and Tsinghua University in 2025.

The accompanying tutorial uses a compact IEEE 14-bus example. It generates eigenvalue-labelled operating points, trains a small residual ReLU network, converts the trained model into mixed-integer linear constraints, and compares baseline and stability-constrained decisions.

Course materials

Python tutorial
Open the GitHub repository

NCET package
Documentation · Install

Tutorial workflow

The notebooks follow the modelling steps in order:

  1. Run AC power flow, dynamic initialisation, and small-signal eigenvalue analysis with ANDES.
  2. Train a residual ReLU regressor in PyTorch to predict the critical eigenvalue real part.
  3. Encode the trained network as mixed-integer linear constraints with NCET.
  4. Solve the baseline and stability-constrained one-period unit commitment problems in CVXPY.
Back to top