Port-Hamiltonian neural networks learn passive models of physical systems directly from input-output data. Their dynamics depend on the Hamiltonian, which describes the system's stored energy, only through its gradient. Existing methods obtain the gradient via automatic differentiation of a neural Hamiltonian function. This paper utilizes a gradient network to directly model the Hamiltonian gradient. The resulting model remains port-Hamiltonian while omitting the differentiation step. The effectiveness of direct gradient modelling is tested against the automatic differentiation method on a simulated mass-spring-damper system and the real-world cascaded tanks benchmark. The proposed method attains better accuracy while using fewer parameters and achieving a more reliable learning procedure.
翻译:暂无翻译