Gaussian Process Port-Hamiltonian Systems: Bayesian Learning with Physics Prior

Thomas Beckers, Jacob H. Seidman, Paris Perdikaris, George J. Pappas · DOI

Abstract

Data-driven approaches achieve remarkable results for the modeling of complex dynamics based on collected data. However, these models often neglect basic physical principles which determine the behavior of any real-world system. This omission is unfavorable in two ways: The models are not as data-efficient as they could be by incorporating physical prior knowledge, and the model itself might not be physically correct. We propose Gaussian Process Port-Hamiltonian systems (GP-PHS) as a physics-informed Bayesian learning approach with uncertainty quantification. The Bayesian nature of GP-PHS uses collected data to form a distribution over all possible Hamiltonians instead of a single point estimate. Due to the underlying physics model, a GP-PHS generates passive systems with respect to designated inputs and outputs. Further, the proposed approach preserves the compositional nature of Port-Hamiltonian systems.

Introduction

Modern data-driven modeling, while powerful, often operates as a "physics-blind" black box. When learning the dynamics of mechanical or electrical systems, standard neural networks may violate fundamental principles such as energy conservation or passivity—the requirement that a system does not produce more energy than it consumes.

Conceptual overview of the GP-PHS framework: integrating physical system data with a Port-Hamiltonian prior to produce probabilistic Hamiltonians and trajectory realizations.

We introduce Gaussian Process Port-Hamiltonian Systems (GP-PHS) to bridge this gap. By embedding physical laws directly into a Bayesian prior, GP-PHS ensures that learned models are physically consistent and highly data-efficient, providing robust uncertainty quantification even with sparse or noisy datasets.

Methodology

The core innovation of GP-PHS is the construction of a specialized PHS Kernel. Unlike traditional approaches that map states directly to velocities, GP-PHS places a Gaussian Process (GP) prior on the Hamiltonian ($H$), which represents the system's total energy.

The system dynamics are defined by the Port-Hamiltonian structure: $$\dot{x} = [J-R]\nabla H + Gu$$ where $J$ is the interconnection matrix, $R$ is the dissipation matrix, and $G$ is the input matrix. Because GPs are closed under affine operations, the gradient of the Hamiltonian and its subsequent transformation remain within the GP framework. This allows the derivation of a matrix-valued kernel that describes state derivatives directly.

Key theoretical properties of this approach include:

  • Passivity Guarantees: Any realization sampled from the GP is mathematically proven to be "almost surely passive."
  • Compositionality: The framework allows for the interconnection of multiple learned GP-PHS models (e.g., a motor connected to a pump) while maintaining the validity of the overall system.
  • Optimization: Model parameters, such as friction coefficients and kernel hyperparameters, are optimized using Negative Log Marginal Likelihood (NLML).

Experimental Results

The framework was evaluated using a simulated controlled inductor with an iron ball, a 3D system characterized by position ($x_1$), momentum ($x_2$), and magnetic flux ($x_3$). The model was trained on a single noisy trajectory of 401 points collected over 20 seconds.

Performance comparison of GP-PHS against ground truth and a trivial GP baseline. GP-PHS accurately tracks the system state, whereas the non-physics-informed model diverges significantly.

Key Findings

  • Superior Generalization: GP-PHS accurately predicted trajectories for new initial conditions and inputs not present in the training set.
  • Data Efficiency: The physics-informed model outperformed a "trivial" black-box GP even when the latter was provided with ten times more data.
  • Physical Correctness: In scenarios where external inputs were removed, GP-PHS correctly modeled the gradual decrease of total energy due to dissipation, a property the black-box GP failed to respect.

Discussion and Future Work

GP-PHS offers a significant advancement in physics-informed machine learning by providing a distribution over possible Hamiltonians rather than a single point estimate. This uncertainty quantification is vital for safety-critical engineering applications.

However, the approach currently faces the $O(N^3)$ computational scaling typical of standard GPs. Future research will focus on utilizing inducing points for larger datasets and applying these learned probabilistic models to energy-based control strategies that explicitly account for model uncertainty to ensure stability.

Summary updated

BibTeX
@inproceedings{beckers2022gaussian,
  author = {Thomas Beckers and Jacob H. Seidman and Paris Perdikaris and George J. Pappas},
  title = {{Gaussian Process Port-Hamiltonian Systems: Bayesian Learning with Physics Prior}},
  booktitle = {CDC},
  year = {2022},
  doi = {10.1109/cdc51059.2022.9992733},
}
Figure