Table of Contents
Fetching ...

LLM-DMD: Large Language Model-based Power System Dynamic Model Discovery

Chao Shen, Zihan Guo, Ke Zuo, Wenqi Huang, Mingyang Sun

TL;DR

This work addresses the challenge of recovering complete power-system differential-algebraic equations (DAEs) from data when algebraic variables and suitable basis libraries are unknown. It introduces LLM-DMD, a two-loop framework that couples a DE loop for state dynamics with an AE loop for algebraic constraints, guided by an LLM-based M-Agent that generates executable model skeletons and learns through gradient-based evaluation. An island-based experience archive and a variable-extension mechanism enable iterative refinement and adaptive inclusion of missing algebraic or input variables, achieving joint discovery of $\boldsymbol{f}$ and $\boldsymbol{g}$ with improved robustness. Case studies on IEEE 39-bus synchronous generator benchmarks show that LLM-DMD outperforms SINDy baselines, attaining near-zero MAPE and near-unity $R^2$, demonstrating potential for high-fidelity, data-driven dynamic modeling of complex power systems and enabling extensions to other components such as converters and virtual generators.

Abstract

Current model structural discovery methods for power system dynamics impose rigid priors on the basis functions and variable sets of dynamic models while often neglecting algebraic constraints, thereby limiting the formulation of high-fidelity models required for precise simulation and analysis. This letter presents a novel large language model (LLM)-based framework for dynamic model discovery (LLM-DMD) which integrates the reasoning and code synthesis capabilities of LLMs to discover dynamic equations and enforce algebraic constraints through two sequential loops: the differential-equation loop that identifies state dynamics and associated variables, and the algebraic-equation loop that formulates algebraic constraints on the identified algebraic variables. In each loop, executable skeletons of power system dynamic equations are generated by the LLM-based agent and evaluated via gradient-based optimizer. Candidate models are stored in an island-based archive to guide future iterations, and evaluation stagnation activates a variable extension mechanism that augments the model with missing algebraic or input variables, such as stator currents to refine the model. Validation on synchronous generator benchmarks of the IEEE 39-bus system demonstrates the superiority of LLM-DMD in complete dynamic model discovery.

LLM-DMD: Large Language Model-based Power System Dynamic Model Discovery

TL;DR

This work addresses the challenge of recovering complete power-system differential-algebraic equations (DAEs) from data when algebraic variables and suitable basis libraries are unknown. It introduces LLM-DMD, a two-loop framework that couples a DE loop for state dynamics with an AE loop for algebraic constraints, guided by an LLM-based M-Agent that generates executable model skeletons and learns through gradient-based evaluation. An island-based experience archive and a variable-extension mechanism enable iterative refinement and adaptive inclusion of missing algebraic or input variables, achieving joint discovery of and with improved robustness. Case studies on IEEE 39-bus synchronous generator benchmarks show that LLM-DMD outperforms SINDy baselines, attaining near-zero MAPE and near-unity , demonstrating potential for high-fidelity, data-driven dynamic modeling of complex power systems and enabling extensions to other components such as converters and virtual generators.

Abstract

Current model structural discovery methods for power system dynamics impose rigid priors on the basis functions and variable sets of dynamic models while often neglecting algebraic constraints, thereby limiting the formulation of high-fidelity models required for precise simulation and analysis. This letter presents a novel large language model (LLM)-based framework for dynamic model discovery (LLM-DMD) which integrates the reasoning and code synthesis capabilities of LLMs to discover dynamic equations and enforce algebraic constraints through two sequential loops: the differential-equation loop that identifies state dynamics and associated variables, and the algebraic-equation loop that formulates algebraic constraints on the identified algebraic variables. In each loop, executable skeletons of power system dynamic equations are generated by the LLM-based agent and evaluated via gradient-based optimizer. Candidate models are stored in an island-based archive to guide future iterations, and evaluation stagnation activates a variable extension mechanism that augments the model with missing algebraic or input variables, such as stator currents to refine the model. Validation on synchronous generator benchmarks of the IEEE 39-bus system demonstrates the superiority of LLM-DMD in complete dynamic model discovery.
Paper Structure (14 sections, 7 equations, 3 figures, 1 table)