Lydion Energy Research Neural dynamics
Learning grid dynamics while they happen.
Neural ordinary differential equations for online dynamic security assessment. Research by Mert Karaçelebi and Jochen Cremer in the Intelligent Electrical Power Grids group at TU Delft.
01 The problem
After a severe disturbance, a grid has seconds. Lower inertia means it falls further, faster.
Losing a large generator or a major line opens a gap between generation and demand, and frequency drops. Protection arrests it at the nadir. If the nadir crosses critical limits, more generation disconnects and the system can black out. Inverter-based generation makes the dynamics both faster and harder to model.
Operators need to know, within seconds, where the system is heading. The usual tools struggle with:
- the computational cost of detailed simulation;
- poor generalisation of offline-trained models to unseen conditions and topologies;
- data limits: dimensionality, changing topology and the variety of dynamic events;
- uncertainty about the size and location of the disturbance.

02 Try it
Inertia sets how fast frequency falls. Fast reserves set how far. The earlier a battery acts, the shallower the nadir, which is why a forecast that arrives a second early is worth having.
- Nadir, no battery
- 48.88 Hz
- Nadir, with battery
- 49.17 Hz
- Initial RoCoF
- -1.00 Hz/s
- Frequency stays above 49.0 Hz. No load is shed.
03 The method
A neural ODE learns the right-hand side of dx/dt = fθ(x, t) from measurements. A standard ODE solver then produces the trajectory.
That gives continuous-time predictions, adaptive computation and memory-efficient training, and it does not need to know when, where or what the disturbance was.
Online and decentralised
The Online Neural Dynamics Forecaster does not model the whole grid. Pretrained NODEs sit at measurement points such as large generators. After an event each one retrains on its own local post-fault measurements over a moving window, so it follows cascading effects and control actions as they happen. Only model parameters travel to the operator, which keeps data transfer small, and the validation error doubles as a confidence index.

Training fast enough to matter
Adjoint sensitivity is the standard way to train a NODE. The collocation method instead estimates derivatives straight from the data and fits the network to them: much faster, but it fails on complex dynamics. The work combines the two. The collocation error decides where training points are sampled, so the slower adjoint training spends its effort where the trajectory is hard.

| Training | Sampling | MSE | DFD | R² | s per epoch |
|---|---|---|---|---|---|
| Adjoint sensitivity | None | 4.17 | 0.523 | 0.94 | 0.23 |
| Collocation | None | 39.2 | 17.6 | 0.05 | 0.12 |
| Adjoint sensitivity | Random | 3.44 | 0.32 | 0.96 | 0.15 |
| Adjoint sensitivity | Collocation-weighted | 4.87 | 0.55 | 0.94 | 0.14 |
Sampling cuts training time per epoch from 0.23 s to about 0.15 s at similar accuracy. Collocation on its own is fastest but cannot follow these dynamics (R² of 0.05).
04 Case studies
Test systems were simulated in DIgSILENT PowerFactory 2024 and PowerSimulationsDynamics.jl, some modified with inverter-based generation and its controllers. Initial conditions vary generation and demand. Disturbances are three-phase short circuits of varying impedance, duration and location, and the models are told none of it.


The trigger has to be trustworthy. It fires only after the validation error has stayed below a confidence threshold over repeated training epochs.

Learning oscillations, epoch by epoch
Modified IEEE 9-bus system, one synchronous generator replaced by an inverter-based unit. One NODE tracks angle, voltage and speed of both non-slack generators. Solid lines are predictions, dotted lines the simulated truth, scaled for display.
05 Papers
2025
Online Neural Dynamics Forecasting for power system security
International Journal of Electrical Power & Energy Systems, vol. 167, 110566
Abstract
The increase in variable renewable energy sources has brought about significant changes in power system dynamics, mainly due to the widespread adoption of power electronics and nonlinear controllers. The resulting complex system dynamics and the unpredictable nature of disturbances pose substantial challenges for real-time dynamic security assessment (DSA). Machine learning (ML) methods offer advantages in terms of computational speed compared to numerical methods and simulators. Offline-trained ML models, however, are limited by their training domain; e.g., they cannot easily consider various grid topologies and data changes. Neural Ordinary Differential Equations (NODEs) leverage the integration of neural networks and ODE solvers to enable continuous-time dynamic trajectory predictions from time series data, resolving the limitation on topological and data changes. This paper introduces the Online Neural Dynamics Forecaster (ONDF) workflow, designed to monitor and assess system security in real-time using multiple NODEs trained solely with local post-fault measurements. Through several case studies, we compare the regression and DSA classification capabilities of ONDF with various ML models. Our findings demonstrate that ONDF provides a novel and scalable approach for system operators to make informed decisions and apply corrective control actions based on predicted dynamics.
2025
Power system frequency monitoring and emergency control with neural ordinary differential equations
Sustainable Energy, Grids and Networks, vol. 43, 101815
Abstract
Increasing renewable energy supply and distributed generating sources in the power grid lead to lower inertia levels. Lower inertia combined with higher uncertainty in operation can cause drastic frequency fluctuations when a disturbance occurs. System operators must know whether the transmission system is secure against a disturbance. Real-time models attempt to predict the frequency in near-real time however require pretraining on a large variety of possible disturbances. Training models in real-time would not require pre-training as they are directly trained on the occurring disturbance. However, training in real-time is not feasible until now as fast-occurring system dynamics require shorter prediction (and training) times for security and operation which standard machine learning models are not capable of. For the first time, this work proposes a fast training strategy that learns Neural Ordinary Differential Equations (NODE) in near real-time directly on the occurring disturbance, simultaneously addressing the inaccuracy issue of model-based dynamic studies. NODE learns the dynamics or derivatives of an ODE system that standard ODE solvers can solve. NODE provides a continuous function for predicting future dynamics in a decentralized way, hence faster frequency stability assessment for longer time spans. We propose a collocation-based sampling using the collocation gradients. Case studies on the IEEE 39-bus system show the approach is feasible for near real-time operation, accurately predicts future system states, and enables operators to apply predesigned corrective control actions, potentially making the system secure for future disturbances.