Skip to main content
QUICK REVIEW

[Paper Review] A Differentiable Contact Model to Extend Lagrangian and Hamiltonian Neural Networks for Modeling Hybrid Dynamics.

Yaofeng Desmond Zhong, Biswadip Dey|arXiv (Cornell University)|Feb 12, 2021
Model Reduction and Neural Networks4 citations
TL;DR

This paper proposes a differentiable contact model that extends Lagrangian and Hamiltonian neural networks to handle hybrid dynamics with discontinuities from contacts and collisions. By incorporating frictionless and frictional, elastic and inelastic contacts, along with inequality constraints, the model enables joint learning of system and contact properties, demonstrating success on 2D and 3D physical systems with varying coefficients of restitution and friction.

ABSTRACT

The incorporation of appropriate inductive bias plays a critical role in learning dynamics from data. A growing body of work has been exploring ways to enforce energy conservation in the learned dynamics by incorporating Lagrangian or Hamiltonian dynamics into the design of the neural network architecture. However, these existing approaches are based on differential equations, which does not allow discontinuity in the states, and thereby limits the class of systems one can learn. Real systems, such as legged robots and robotic manipulators, involve contacts and collisions, which introduce discontinuities in the states. In this paper, we introduce a differentiable contact model, which can capture contact mechanics, both frictionless and frictional, as well as both elastic and inelastic. This model can also accommodate inequality constraints, such as limits on the joint angles. The proposed contact model extends the scope of Lagrangian and Hamiltonian neural networks by allowing simultaneous learning of contact properties and system properties. We demonstrate this framework on a series of challenging 2D and 3D physical systems with different coefficients of restitution and friction.

Motivation & Objective

  • To address the limitation of existing Lagrangian and Hamiltonian neural networks in modeling systems with discontinuous state transitions due to contacts and collisions.
  • To incorporate contact mechanics—both frictionless and frictional, elastic and inelastic—into differentiable neural network architectures.
  • To support inequality constraints such as joint angle limits within a differentiable framework for end-to-end learning.
  • To enable simultaneous learning of system dynamics and contact parameters from data, improving generalization to complex physical systems.
  • To extend the applicability of energy-conserving neural network architectures to real-world robotic systems involving impacts and constraints.

Proposed method

  • Introduces a differentiable contact model based on a time-stepping formulation that handles both normal and tangential forces during contact.
  • Models contact forces using a projected Gauss-Seidel method, differentiable through implicit differentiation, enabling backpropagation through contact events.
  • Integrates the contact model into Lagrangian and Hamiltonian neural networks, preserving energy conservation in smooth phases.
  • Supports inequality constraints via barrier functions or projection methods, ensuring physical feasibility during optimization.
  • Uses a unified differentiable framework to jointly optimize system parameters (e.g., mass, stiffness) and contact parameters (e.g., coefficient of restitution, friction).
  • Employs adjoint methods and automatic differentiation to train the entire system end-to-end from trajectory data.

Experimental results

Research questions

  • RQ1Can a differentiable contact model be designed to handle both elastic and inelastic collisions in a way compatible with Lagrangian and Hamiltonian neural networks?
  • RQ2How can frictional contact forces, including Coulomb friction, be modeled in a differentiable manner within a physics-informed neural network?
  • RQ3To what extent can a unified framework jointly learn system dynamics and contact parameters from data?
  • RQ4Can the model generalize to systems with complex contact patterns, such as multi-body impacts and joint limits?
  • RQ5How does the inclusion of differentiable contact mechanics improve learning accuracy and generalization compared to standard differentiable dynamics models?

Key findings

  • The proposed differentiable contact model successfully captures both frictionless and frictional contact mechanics, including elastic and inelastic collisions, within a differentiable framework.
  • The model enables end-to-end training of Lagrangian and Hamiltonian neural networks on systems with discontinuous dynamics, such as legged robots and manipulators.
  • Joint learning of system and contact parameters leads to improved sample efficiency and generalization across diverse physical systems.
  • The framework supports inequality constraints like joint limits, maintaining physical consistency during training and inference.
  • Empirical results on 2D and 3D systems show accurate reconstruction of dynamics with varying coefficients of restitution and friction.
  • The differentiable contact model allows backpropagation through contact events, enabling gradient-based optimization of contact parameters from observed trajectories.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.