Learning Switching Port-Hamiltonian Systems with Uncertainty Quantification

Thomas Beckers, Tom Z. Jiahao, George J. PappasarXiv 2023 · OpenReview

TL;DR

This paper introduces Gaussian Process Switching Port-Hamiltonian Systems (GP-SPHS), a novel data-driven approach to learn the dynamics of complex physical systems that exhibit switching behavior. By combining the physics-informed structure of Port-Hamiltonian systems with the uncertainty quantification capabilities of Gaussian Processes, GP-SPHS can learn physically plausible models from data, even when system dynamics are unknown.

What Problem Does This Paper Address?

Many real-world physical systems, from robot locomotion to power converters, involve switching dynamics. Accurately modeling these systems is challenging because their switching conditions and underlying dynamics can be difficult to derive from first principles, especially in unknown or nonlinear environments. While traditional neural networks can learn these dynamics, they often require vast amounts of data, disregard fundamental physical laws (like energy conservation), and fail to provide reliable uncertainty estimates. This lack of physical grounding and uncertainty quantification limits their interpretability and trustworthiness for critical applications. The paper aims to bridge this gap by developing a data-driven method that respects physical principles and quantifies model uncertainty.

Methods

The core innovation is the integration of Gaussian Processes (GPs) with Switching Port-Hamiltonian Systems (SPHS). The approach works as follows:

  1. Hamiltonian Learning: Instead of directly learning the system's differential equations, the method learns the system's Hamiltonian (which represents its total energy) and its derivative. This is done using GPs, which are well-suited for learning from limited data and naturally provide uncertainty estimates. The paper uses separate GPs for each dimension of the Hamiltonian's derivative.
  2. Switching Policy Learning: A GP classifier is employed to learn the switching condition, predicting the probability of being in a particular system mode (e.g., contact vs. no contact) based on the system's state.
  3. Physics-Informed Structure: By framing the problem within the SPHS framework, the learned models inherently respect physical laws like energy conservation and passivity. The paper proves that this property is preserved even with the probabilistic nature of GPs.
  4. Uncertainty Quantification: The Bayesian nature of GPs allows the model to represent a distribution over possible Hamiltonians and switching policies, providing a measure of confidence in the learned dynamics. This is crucial for understanding the reliability of predictions.
  5. Compositionality: The paper also demonstrates that GP-SPHS retain the compositional nature of standard SPHS, meaning they can be combined to model larger, more complex systems.

Datasets

The paper uses a simulated dataset generated from a hopper robot model. This dataset consists of time-stamped state observations, control inputs, and system modes, corrupted with Gaussian noise to simulate real-world sensor imperfections. No new benchmark datasets are introduced.

Key Insights and Ideas

  • Physics-informed ML is powerful: By leveraging the SPHS structure, the learned models are not just black boxes but are grounded in physical principles, leading to more interpretable and reliable results.
  • GPs are ideal for this task: Their ability to handle sparse data and provide uncertainty quantification is critical for learning complex, potentially nonlinear, physical systems where data might be limited or noisy.
  • Uncertainty is not just a number, but a distribution: The GP approach provides a distribution over possible system dynamics, which is far more informative than a single point estimate, especially for control design.
  • Compositionality is key for complex systems: The fact that GP-SPHS can be interconnected is a significant step towards modeling large-scale, modular physical systems.

Key Results

The proposed GP-SPHS approach was evaluated on a simulated hopper robot. The key results include:

  • High accuracy in classification: The GP classifier for the switching policy achieved a mean accuracy of 0.98 on the training data.
  • Physically plausible trajectories: Sampled trajectories from the learned GP-SPHS model consistently showed decreasing Hamiltonian (energy) over time, indicating physical plausibility.
  • Low prediction error: The mean squared error between the actual system trajectory and the sampled GP-SPHS trajectories was 0.193.
  • Preservation of passivity: Theoretical analysis proved that GP-SPHS preserve the passivity property, a crucial characteristic for stable control systems.

Limitations and Future Work

  • Computational Complexity: The training complexity of the GP-SPHS is O(N³ + N²n), where N is the number of data points and n is the state dimension. While efficient methods like inducing points can reduce this, it remains a consideration for very large datasets.
  • Experimental Validation: The current evaluation is based on simulation. The authors suggest that future work should involve experimental validation on real-world systems.
  • Broader Class of Systems: Extending the GP-SPHS framework to a wider range of switching systems beyond the tested hopper robot is also a direction for future research.
  • Real-time Control: While the learned models provide uncertainty, directly using them for real-time control with guaranteed stability would be an interesting extension.

Summary updated

Abstract

Switching physical systems are ubiquitous in modern control applications, for instance, locomotion behavior of robots and animals, power converters with switches and diodes. The dynamics and switching conditions are often hard to obtain or even inaccessible in case of a-priori unknown environments and nonlinear components. Black-box neural networks can learn to approximately represent switching dynamics, but typically require a large amount of data, neglect the underlying axioms of physics, and lack of uncertainty quantification. We propose a Gaussian process based learning approach enhanced by switching Port-Hamiltonian systems (GP-SPHS) to learn physical plausible system dynamics and identify the switching condition. The Bayesian nature of Gaussian processes uses collected data to form a distribution over all possible switching policies and dynamics that allows for uncertainty quantification. Furthermore, the proposed approach preserves the compositional nature of Port-Hamiltonian systems. A simulation with a hopping robot validates the effectiveness of the proposed approach.
BibTeX
@misc{beckers2023learning,
  author = {Thomas Beckers and Tom Z. Jiahao and George J. Pappas},
  title = {{Learning Switching Port-Hamiltonian Systems with Uncertainty Quantification}},
  year = {2023},
  eprint = {2305.09689},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.09689},
}
Figure