Source-linked AI summary

Deep Lagrangian Networks: Using Physics as Model Prior for Deep Learning

Michael Lutter, Christian Ritter, Jan Peters

arXiv:1907.04490v1cs.LGcs.ROeess.SYstat.ML

TL;DR

Deep learning models for physical control need to extrapolate from few, often online samples while preserving physical plausibility. The paper introduces Deep Lagrangian Networks, which impose Lagrangian Mechanics on a deep network and learn dynamics end-to-end. DeLaN supports online real-time learning and achieves lower sample complexity and better extrapolation, while inheriting limitations of its physics prior.

  • Problem

    Learning physical models for model-based control requires robust extrapolation from fewer online samples, while model errors can cause drastic system damage.

  • Method

    DeLaN imposes Lagrangian Mechanics on a deep-network topology to learn mechanical-system dynamics through standard end-to-end optimization while maintaining physical plausibility.

  • Results

    DeLaN learns system dynamics online in real-time, with lower sample complexity and better extrapolation reported in quantitative real-time control evaluation.

  • Takeaways & Limitations

    DeLaN can recover inertial, gravitational, and centripetal-force contributions from sensor data while learning physically plausible dynamics for robot control.

  • Takeaways & Limitations

    DeLaN inherits the limitations of its physics prior and cannot represent torque correlations that the prior defines as nonexistent.

Abstract

from arXiv · show

Deep learning has achieved astonishing results on many tasks with large amounts of data and generalization within the proximity of training data. For many important real-world applications, these requirements are unfeasible and additional prior knowledge on the task domain is required to overcome the resulting problems. In particular, learning physics models for model-based control requires robust extrapolation from fewer samples - often collected online in real-time - and model errors may lead to drastic damages of the system. Directly incorporating physical insight has enabled us to obtain a novel deep model learning approach that extrapolates well while requiring fewer samples. As a first example, we propose Deep Lagrangian Networks (DeLaN) as a deep network structure upon which Lagrangian Mechanics have been imposed. DeLaN can learn the equations of motion of a mechanical system (i.e., system dynamics) with a deep network efficiently while ensuring physical plausibility. The resulting DeLaN network performs very well at robot tracking control. The proposed method did not only outperform previous model learning approaches at learning speed but exhibits substantially improved and more robust extrapolation to novel trajectories and learns online in real-time

1 Introduction

The paper addresses the gap between data-hungry deep learning and physically plausible models for embodied-system control. It proposes encoding Lagrangian physics into a generic deep-network topology for efficient, robust learning.

  • Learning physical models is critical for controlling embodied systems, reasoning about prior actions, and planning future actions.
  • Classical models ensure physical plausibility and extrapolation but require precise measurements and substantial engineering effort.
  • DeLaN encodes the Euler-Lagrange equation as a differential structure within a deep network to impose physics as a model prior.
  • The physics-informed topology amplifies training-sample information, regularizes end-to-end training, and targets robust extrapolation while maintaining physical plausibility.
  • The work evaluates DeLaN on simulated and physical robots, including real-time control experiments against analytic and learned models.

2 Related Work

Prior robot-dynamics learning methods either rely on embodiment-specific physics features or can produce physically invalid parameters. DeLaN instead imposes a general physics structure on a deep network without requiring kinematic-structure knowledge.

  • Dynamics models connect control inputs and system states and support inverse-dynamics, model-predictive, and optimal control.
  • Physics-derived models require precise embodiment-specific properties, whereas standard learned models commonly ignore known physical structure.
  • Earlier structured approaches use kinematic graphs, Newton-Euler features, or hard-coded physics features to simplify dynamics learning.
  • Learned physical parameters may violate inertia-matrix positive definiteness or the parallel axis theorem, and linear regression can be underdetermined.
  • DeLaN guarantees physical plausibility and generalizes across kinematic structures, including trees and closed loops, without kinematic-structure knowledge.
  • Related differential-equation approaches have largely used neural networks to learn solutions to partial differential equations or overcome PDE-solver limitations.

3 Preliminaries: Lagrangian Mechanics

Lagrangian Mechanics represents mechanical-system dynamics through generalized coordinates, kinetic and potential energy, and the Euler-Lagrange equation. This formulation applies broadly to constrained multi-particle systems and motivates DeLaN’s physics prior.

  • Lagrangian Mechanics uses generalized coordinates and defines the Lagrangian as kinetic energy minus potential energy.
  • The Euler-Lagrange formulation incorporates non-conservative generalized forces into the equations of motion.
  • The inertia matrix H(q) is symmetric and positive definite, ensuring positive kinetic energy for all non-zero velocities.
  • The resulting second-order ordinary differential equation describes mechanical-system dynamics using generalized forces and centripetal and Coriolis forces.
  • This ODE can describe multi-particle mechanical systems with holonomic constraints, including coupled pendulums, flexible-joint manipulators, parallel robots, and legged robots.

4 Incorporating Lagrangian Mechanics into Deep Learning

DeLaN incorporates Lagrangian mechanics into a deep network by learning structured representations that preserve physical plausibility. Analytical derivatives and efficient forward-pass computation make the model suitable for end-to-end training and real-time control.

  • DeLaN formulation: DeLaN learns the inverse dynamics model by representing g(q) and H(q) within the Euler-Lagrange structure and optimizing network parameters end-to-end.The parameters are learned by minimizing violation of the physical law, using a differentiable loss.
  • Model properties: The learned model can generalize, within limits, to arbitrary velocities and accelerations because g(q) and L(q) do not depend on velocity or acceleration.The same model can also be reformulated as a forward model.
  • Optimization: The Lagrangian is not unique because the Euler-Lagrange equation is invariant to L′=αL+β, so an additional L2 penalty on network weights is introduced.The penalty mitigates the ill-posedness of directly optimizing the Lagrangian.
  • Derivative computation: Required derivatives are computed analytically in closed form, allowing full-gradient end-to-end training despite automatic-differentiation limitations.The derivatives d(LL^T)/dt and ∂(q̇^TLL^Tq̇)/∂q_i are required for the control signal and training gradients.
  • Physical constraints: The inertia matrix is parameterized as H(q)=L(q)L(q)^T with positive diagonal entries in L, ensuring symmetry, positive definiteness, and invertibility.These properties enforce positive kinetic energy and permit reformulation as a forward model.
  • Efficient implementation: Extended Lagrangian layers simultaneously compute network derivatives, while chaining layers and reshaping operations efficiently produce L, dL/dt, and ∂L/∂q in a single forward pass.This implementation adds minimal computational complexity for use within a real-time control loop.

5 Experimental Evaluation: Learning an Inverse Dynamics Model for Robot Control

DeLaN is evaluated for online inverse-dynamics learning and tracking control on simulated and physical robots. Experiments compare it with feed-forward, analytic, and PD-based approaches, emphasizing data efficiency, online constraints, and extrapolation to higher velocities.

  • Experimental scope: DeLaN is evaluated on a simulated 2-dof robot and a physical 7-dof Barrett WAM using tracking error on train and test trajectories.The evaluation restricts predictions to real-time and requires models to learn online from random initialization.
  • Experimental setup: The controller combines a low-gain PD term with feed-forward torque from the learned inverse model to compensate system dynamics.Joint states and applied torques are read directly from the real-time control loop for online training.
  • Simulated robot experiments: DeLaN disambiguates inertial, Coriolis and centrifugal, and gravitational torque components from super-imposed torques, with curves closely matching ground truth.Offline tests also report lower test MSE than the feed-forward network, especially with fewer training characters.
  • Simulated robot experiments: With training only at velocity scale 1x, DeLaN extrapolates to higher velocities with significantly lower tracking error than the feed-forward network.Its reduced input domain enables extrapolation within limits, although model errors scale quadratically with velocity.
  • Physical robot experiments: On Barrett WAM experiments, DeLaN is comparable to the feed-forward network in simulation and slightly better than the analytic model on the physical system.The physical results also show that DeLaN inherits the limitations of its rigid-body Lagrangian assumptions, including unmodeled cable-drive dynamics.
  • Physical robot experiments: Across higher-velocity tests, DeLaN maintains good tracking error and outperforms the analytic model, while the feed-forward network deteriorates through overfitting.The analytic model retains constant tracking error, demonstrating guaranteed extrapolation in the reported comparison.

6 Conclusion

The paper introduces DeLaN, which embeds Lagrangian Mechanics into a deep network to learn physically plausible system dynamics end-to-end. It reports lower sample complexity, better generalization than a feed-forward network, and extrapolation to new trajectories and higher velocities, while noting limits for complex dynamics.

  • DeLaN incorporates Lagrangian Mechanics into a deep network topology for end-to-end learning of physically plausible system dynamics.The network can recover inertial, gravitational, and centripetal force contributions from sensor data.
  • DeLaN learns system dynamics online in a real-time control loop while maintaining physical plausibility.
  • DeLaN achieves lower sample complexity and better generalization than a feed-forward neural network.
  • DeLaN extrapolates to new trajectories and increased velocities, whereas the feed-forward network deteriorates from overfitting to training data.
  • The bounded representational power of the physics prior can limit performance on physical systems with complex dynamics.

Appendix A: Offline Benchmarks

Offline benchmarks compare DeLaN with analytic and learned baselines under noisy training, unseen-character, velocity-extrapolation, and simulated-versus-physical conditions. DeLaN generally avoids feed-forward overfitting and extrapolates better, while model assumptions and noise affect relative performance.

  • The offline evaluation measures MSE on training and test trajectories, comparing DeLaN with system identification, a feed-forward network, and an analytic RNE model.Models are trained offline and evaluated on noisy-training and noise-free test conditions.
  • The feed-forward network fits noisy training characters best but overfits and fails to generalize to unseen characters.DeLaN’s structure regularizes training and prevents overfitting to corrupted samples.
  • DeLaN extrapolates better than the feed-forward network to unseen characters and higher velocities, although system identification performs better in these simulated comparisons.
  • The physical Barrett WAM violates the rigid-body assumption through flexible joints and has unknown exact kinematics from production imperfections.These conditions explain why relative performance differs between simulation and the physical system.
  • With increasing Gaussian training noise, system-identification MSE rises significantly faster than the gradient-trained models.

Appendix B: Complete Online Results

The online benchmark visualizes qualitative and average tracking performance for DeLaN and a feed-forward network across different numbers of training characters. Performance is organized by character and training-set size.

  • Figure 10 compares qualitative performance of analytic baselines, a feed-forward network, and DeLaN across different numbers of random training characters.Desired trajectories are shown in red.
  • Figure 11 reports average DeLaN and feed-forward-network performance for each character across training sizes n = 1, 2, 4, 6, 8, 10, 12.The columns of the boxplots correspond to the listed numbers of training characters.
Loading 1907.04490v1…