🤖 AI Summary
This work addresses the limitations of data-driven methods in capturing conservation laws of dynamical systems, which hinder generalization and long-term prediction accuracy. Existing port-Hamiltonian neural networks (PHNNs) often compromise energy-preserving properties due to non-structure-preserving discretization schemes. To overcome this, we propose the first integration of a power-preserving second-order discrete gradient method into PHNNs, rigorously maintaining the port-Hamiltonian structure. Our approach further incorporates Jacobian regularization and explicit modeling of nonlinear dissipation. Experiments on the harmonic oscillator, Duffing oscillator, and self-sustained oscillator demonstrate that the proposed method significantly outperforms equivalent-order Runge–Kutta discretizations, achieving notable improvements in both energy conservation and trajectory prediction accuracy. We also provide a systematic evaluation of the impact of two equivalent port-Hamiltonian formulations.
📝 Abstract
Learning dynamical systems through purely data-driven methods is challenging as they do not learn the underlying conservation laws that enable them to correctly generalize. Existing port-Hamiltonian neural network methods have recently been successfully applied for modeling mechanical systems. However, even though these methods are designed on power-balance principles, they usually do not consider power-preserving discretizations and often rely on Runge-Kutta numerical methods. In this work, we propose to use a second-order discrete gradient method embedded in the learning of dynamical systems with port-Hamiltonian neural networks. Numerical results are provided for three systems deliberately selected to span different ranges of dynamical behavior under control: a baseline harmonic oscillator with quadratic energy storage; a Duffing oscillator, with a non-quadratic Hamiltonian offering amplitude-dependent effects; and a self-sustained oscillator, which can stabilize in a controlled limit cycle through the incorporation of a nonlinear dissipation. We show how the use of this discrete gradient method outperforms the performance of a Runge-Kutta method of the same order. Experiments are also carried out to compare two theoretically equivalent port-Hamiltonian systems formulations and to analyze the impact of regularizing the Jacobian of port-Hamiltonian neural networks during training.