LGMay 6, 2025Code
Efficient Training of Physics-enhanced Neural ODEs via Direct Collocation and Nonlinear ProgrammingLinus Langenkamp, Philip Hannebohm, Bernhard Bachmann
We propose a novel approach for training Physics-enhanced Neural ODEs (PeN-ODEs) by expressing the training process as a dynamic optimization problem. The full model, including neural components, is discretized using a high-order implicit Runge-Kutta method with flipped Legendre-Gauss-Radau points, resulting in a large-scale nonlinear program (NLP) efficiently solved by state-of-the-art NLP solvers such as Ipopt. This formulation enables simultaneous optimization of network parameters and state trajectories, addressing key limitations of ODE solver-based training in terms of stability, runtime, and accuracy. Extending on a recent direct collocation-based method for Neural ODEs, we generalize to PeN-ODEs, incorporate physical constraints, and present a custom, parallelized, open-source implementation. Benchmarks on a Quarter Vehicle Model and a Van-der-Pol oscillator demonstrate superior accuracy, speed, generalization with smaller networks compared to other training techniques. We also outline a planned integration into OpenModelica to enable accessible training of Neural DAEs.
LGOct 10, 2025
Residual-Informed Learning of Solutions to Algebraic LoopsFelix Brandt, Andreas Heuermann, Philip Hannebohm et al.
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.
NAJun 12, 2015
Efficient algorithm for computing large scale systems of differential algebraic equationsXiaolin Qin, Juan Tang, Yong Feng et al.
In many mathematical models of physical phenomenons and engineering fields, such as electrical circuits or mechanical multibody systems, which generate the differential algebraic equations (DAEs) systems naturally. In general, the feature of DAEs is a sparse large scale system of fully nonlinear and high index. To make use of its sparsity, this paper provides a simple and efficient algorithm for computing the large scale DAEs system. We exploit the shortest augmenting path algorithm for finding maximum value transversal (MVT) as well as block triangular forms (BTF). We also present the extended signature matrix method with the block fixed point iteration and its complexity results. Furthermore, a range of nontrivial problems are demonstrated by our algorithm.