Physically Consistent Learning of Conservative Lagrangian Systems with Gaussian Processes

Giulio Evangelisti, Sandra Hirche

TL;DR

This paper introduces the Lagrangian-Gaussian Process (L-GP), a novel machine learning framework that embeds the fundamental laws of physics directly into a data-driven model. By tailoring the Gaussian Process to respect the structure of Euler-Lagrange equations, the authors analytically guarantee that learned models preserve energy, maintain positive-definite inertia matrices, and remain passive—making them significantly safer and more reliable for robotic control.

What Problem Does This Paper Address?

In robotics and aerospace, we often use Euler-Lagrange (EL) equations to describe how a system moves based on its kinetic and potential energy. While we have classical mathematical models for these systems, real-world robots often have "unmodeled dynamics"—complexities like soft-body deformations or complex linkages that are hard to write down as equations.

Machine learning, specifically Gaussian Processes (GPs), offers a way to learn these dynamics from data. However, standard GPs are "physics-blind." They might predict that a robot has negative mass or that it can spontaneously create energy, which makes them dangerous to use in safety-critical control loops. Furthermore, most existing methods require "perfect" (noiseless) measurements of acceleration, which is impossible with real sensors.

The authors aim to bridge this gap by creating a GP that is "physically consistent" by design, ensuring the learned model behaves like a real physical system even when data is noisy or sparse.

Methods

The core contribution is the L-GP, which structures the learning process around the components of a Lagrangian ($L = T - V$):

  1. Energy Structuring: Instead of learning the mapping from state to torque directly, the L-GP models the underlying kinetic energy ($T$) and potential energy ($V$) as GPs.
  2. Differential Equation Embedding: Using the linearity of differentiation, the authors apply "Nabla" ($\nabla$) operators to the energy GPs. This mathematically links the scalar energy functions to the vector-valued torque measurements used for training.
  3. Cholesky Decomposed Matrix Kernels: To ensure the learned inertia matrix ($M$) and stiffness matrix ($S$) are always positive definite (i.e., the robot doesn't have "negative mass"), the authors introduce a kernel based on a Cholesky decomposition ($R^\top R$). This provides a probabilistic guarantee of physical validity.
  4. Nonlinear Noise Compensation: The model accounts for the fact that noise in velocity and acceleration sensors propagates nonlinearly through the dynamics. They use a heteroscedastic (state-dependent) noise model to handle this "messy" real-world data.

Datasets

The approach was evaluated using a numerical simulation of a two-link robotic manipulator, a classic benchmark in robotics research.

  • Training Data: Only 25 data points were used, distributed across a joint domain.
  • Noise: The researchers added Gaussian noise to the torques and the acceleration measurements to test the model's robustness.
  • Comparison: The L-GP was compared against a standard Proportional-Derivative (PD) controller to demonstrate its effectiveness in a closed-loop tracking task.

Key Insights and Ideas

  • Structure Over Flexibility: By restricting the GP's "search space" to only include functions that satisfy the Euler-Lagrange equations, the model requires far less data to achieve high accuracy. It essentially "knows" the rules of the game before it starts learning.
  • The "Aha" Moment on Positive Definiteness: Ensuring a learned matrix is positive definite is a notoriously difficult constraint in optimization. By building the Cholesky decomposition directly into the kernel function, the authors turned a hard constraint into a structural property of the GP.
  • Passivity is Free: Because the L-GP is a true Lagrangian system, it is analytically guaranteed to be "passive" (it doesn't produce energy). This allows engineers to use standard Lyapunov-based stability proofs for control, which is usually impossible with "black-box" neural networks.

Key Results

  • Superior Tracking: In a sinusoidal tracking task, the L-GP augmented controller significantly outperformed the standard PD controller, showing much lower Euclidean norms for both position and velocity errors.
  • Extrapolation Power: Despite being trained on a very small dataset (25 points), the L-GP accurately predicted dynamics well outside its training range.
  • Physical Verification: The authors proved that the learned inertia matrix remained positive definite across the entire joint space. Simulation plots confirmed that the system perfectly conserved energy during free-swinging motion, validating the "conservative" nature of the model.

Limitations and Future Work

  • Conservative Systems Only: The current paper focuses on conservative systems—those without friction or air resistance. In the real world, dissipation is everywhere. The authors note that extending this to non-conservative (dissipative) systems is a primary goal for future research.
  • Computational Complexity: Like all standard GPs, the L-GP suffers from $O(N^3)$ scaling, meaning it becomes computationally expensive as the number of data points ($N$) increases. Sparse GP approximations might be needed for larger datasets.
  • Autonomous Assumption: The model assumes the Lagrangian is "autonomous" (doesn't change explicitly with time), which might not hold for systems with time-varying parameters (e.g., a robot picking up a heavy object).

Summary updated

BibTeX
@inproceedings{evangelisti2022physically,
  author = {Giulio Evangelisti and Sandra Hirche},
  title = {{Physically Consistent Learning of Conservative Lagrangian Systems with Gaussian Processes}},
  booktitle = {CDC},
  year = {2022},
  doi = {10.1109/cdc51059.2022.9993123},
}

Loading related content...

Figure