Table of Contents
Fetching ...

Residual-Informed Learning of Solutions to Algebraic Loops

Felix Brandt, Andreas Heuermann, Philip Hannebohm, Bernhard Bachmann

TL;DR

The paper tackles the computational bottleneck of solving algebraic loops in Modelica by introducing a residual-informed neural surrogate trained on the loop residual $L(\hat{y}) = \tfrac{1}{2} f(x,\hat{y})^T f(x,\hat{y})$, eliminating the need for labeled data and mitigating solution-ambiguity. The method yields gradients via $grad L(\hat{y}) = J_f(x,\hat{y})^T f(x,\hat{y})$ and supports batched training; a semi-supervised extension mixes residual and supervised terms to steer toward a preferred branch. Empirically, it outperforms supervised surrogates and reduces Newton iterations to fewer than five, delivering about 60% faster simulations on the IEEE 14-bus system while maintaining accuracy; it also demonstrates data-generation efficiency and effective handling of branching through multi-model and clustering strategies. The work promises significant speedups for optimization and control tasks in large-scale hybrid models, with opportunities for adaptive sampling, domain decomposition, and trajectory-guided data collection to further enhance robustness and generalization.

Abstract

This paper presents a residual-informed machine learning approach for replacing algebraic loops in equation-based Modelica models with neural network surrogates. A feedforward neural network is trained using the residual (error) of the algebraic loop directly in its loss function, eliminating the need for a supervised dataset. This training strategy also resolves the issue of ambiguous solutions, allowing the surrogate to converge to a consistent solution rather than averaging multiple valid ones. Applied to the large-scale IEEE 14-Bus system, our method achieves a 60% reduction in simulation time compared to conventional simulations, while maintaining the same level of accuracy through error control mechanisms.

Residual-Informed Learning of Solutions to Algebraic Loops

TL;DR

The paper tackles the computational bottleneck of solving algebraic loops in Modelica by introducing a residual-informed neural surrogate trained on the loop residual , eliminating the need for labeled data and mitigating solution-ambiguity. The method yields gradients via and supports batched training; a semi-supervised extension mixes residual and supervised terms to steer toward a preferred branch. Empirically, it outperforms supervised surrogates and reduces Newton iterations to fewer than five, delivering about 60% faster simulations on the IEEE 14-bus system while maintaining accuracy; it also demonstrates data-generation efficiency and effective handling of branching through multi-model and clustering strategies. The work promises significant speedups for optimization and control tasks in large-scale hybrid models, with opportunities for adaptive sampling, domain decomposition, and trajectory-guided data collection to further enhance robustness and generalization.

Abstract

This paper presents a residual-informed machine learning approach for replacing algebraic loops in equation-based Modelica models with neural network surrogates. A feedforward neural network is trained using the residual (error) of the algebraic loop directly in its loss function, eliminating the need for a supervised dataset. This training strategy also resolves the issue of ambiguous solutions, allowing the surrogate to converge to a consistent solution rather than averaging multiple valid ones. Applied to the large-scale IEEE 14-Bus system, our method achieves a 60% reduction in simulation time compared to conventional simulations, while maintaining the same level of accuracy through error control mechanisms.

Paper Structure

This paper contains 16 sections, 19 equations, 16 figures, 5 tables.

Figures (16)

  • Figure 1: The big box represents the computation of the RHS which takes states as inputs and computes the corresponding state derivatives. It contains computation of preceding and following equations and specifically one nls, that will be replaced by an ann. The nls receives $\mathbf{x}$ from preceding computations inside the RHS and returns $\mathbf{y}$.
  • Figure 2: Training loss from a semi-supervised run illustrating the two-phase strategy: MSE loss is used for the first 100 epochs, followed by a residual-based loss. The example is based on the SimpleLoop model from \ref{['sec:simpleloop']}.
  • Figure 3: Continuous output space of a model which computes the square root of a complex number, partitioned by k-Means. Now a model is trained on each partition and during the simulation one could then only evaluate the model for the part of output space the simulation is currently in. The model contains two solutions, and the border between them is indicated by the horizontal "solution cut" line.
  • Figure 4: Predictions of all models, each trained on one part of the partition using the second technique from \ref{['sec:semisupervisedloss']}. One can see that the whole space is covered (with some overlap on the boundaries) and can in principle be predicted.
  • Figure 5: Solution space of \ref{['eq:sldef']}. As $r$ varies, the circle grows or shrinks and the line moves along. As $s$ varies, the line moves along the main diagonal.
  • ...and 11 more figures