Newtonian and Lagrangian Neural Networks: A Comparison Towards Efficient Inverse Dynamics Identification

Minh Trinh, Andreas René Geist, Josefine Monnet, Stefan Vilceanu, Sebastian Trimpe, Christian Brecher

Abstract

Accurate inverse dynamics models are essential tools for controlling industrial robots. Recent research combines neural network regression with inverse dynamics formulations of the Newton-Euler and the Euler-Lagrange equations of motion, resulting in so-called Newtonian neural networks and Lagrangian neural networks, respectively. These physics-informed models seek to identify unknowns in the analytical equations from data. Despite their potential, current literature lacks guidance on choosing between Lagrangian and Newtonian networks. In this study, we show that when motor torques are estimated instead of directly measuring joint torques, Lagrangian networks prove less effective compared to Newtonian networks as they do not explicitly model dissipative torques. The performance of these models is compared to neural network regression on data of a MABI MAX 100 industrial robot.

Introduction

To achieve precise control in industrial robotics, an Inverse Dynamics (ID) model is indispensable. This model maps the desired trajectory—defined by joint positions, velocities, and accelerations—to the required torques. Traditionally, these models rely on analytical physics equations like Newton-Euler or Euler-Lagrange. However, the rise of "physics-informed" machine learning has introduced hybrid architectures that embed these physical laws into deep learning frameworks. These models aim to combine the structural consistency of physics with the high-dimensional learning capabilities of neural networks.

Despite the proliferation of these models, there is a lack of comparative research to guide engineers in choosing between Newtonian and Lagrangian architectures. A significant practical challenge is that most industrial robots do not measure "joint torque" directly; instead, they estimate "motor torque" via electrical current. This measurement is inherently "noisy" from a physics perspective because it includes significant dissipative forces—such as friction, damping, and gear backlash—that are often omitted in idealized physical models. This paper evaluates which architecture best handles these real-world complexities.

Methodology

The study compares several "Grey Box" modeling approaches against standard black-box baselines:

  1. Newtonian Neural Networks (RNEA + MLP): This modular approach utilizes the standard Recursive Newton-Euler Algorithm (RNEA) to calculate the rigid-body dynamics. A Multi-Layer Perceptron (MLP) is then used to learn the "residual" forces—primarily friction and other dissipative effects—that the RNEA equations do not capture.
  2. Lagrangian Neural Networks (LNN & DeLaN): These models attempt to learn the robot's Lagrangian (the difference between kinetic and potential energy). The joint torques are subsequently derived using the Euler-Lagrange equations.
  3. Baselines: The researchers also tested standard Multi-Layer Perceptrons (MLPs), Long Short-Term Memory (LSTM) networks, and a traditional physics model paired with linear friction identification (RNEA + LQ).

The technical focus of this comparison lies in how each model transforms internal neural outputs into torque predictions and whether those transformations can effectively represent non-conservative forces like friction.

Experimental Setup

The models were evaluated using a real-world dataset from a MABI MAX 100, a 6-axis industrial robot weighing 1250 kg.

  • Data Collection: To ensure a rich dataset, the robot was driven using a 3rd-order Fourier series excitation signal, providing a wide range of velocities and accelerations.
  • Processing: Joint angles, velocities, and motor currents were sampled at 8 ms intervals. Motor currents were converted to torque estimates and filtered for noise. The data was split into a 70% training set and a 30% test set.

Key Insights: The Friction Challenge

A central finding of the study is the critical distinction between "joint torque" and "motor torque." In many theoretical contexts, these are treated as equivalent, but in industrial applications, motor torque is heavily influenced by friction.

Lagrangian networks struggle in this environment because the standard Euler-Lagrange framework is designed for conservative systems. Incorporating friction requires adding non-conservative terms that do not naturally fit the energy-based derivation. Conversely, Newtonian networks are inherently modular. By treating friction as an additive residual to the RNEA output, the MLP can focus specifically on modeling dissipation without being constrained by the derivatives of an energy function. In the MABI MAX 100, where the massive weight of the arms creates significant friction in the primary joints, this modularity becomes a decisive advantage.

Results and Discussion

The experimental results clearly favor the Newtonian approach:

  • Superior Accuracy: The RNEA + MLP model significantly outperformed all competitors. For Joint 1, it achieved a Root Mean Square Error (RMSE) of 0.0322, whereas the Lagrangian DeLaN model reached 0.0773 and a standard MLP lagged at 0.1045.
  • Lagrangian Limitations: Pure Lagrangian models (LNN and DeLaN) struggled particularly with high-friction joints. Even hybrid versions (LNN + MLP) failed to match the accuracy of the Newtonian counterpart.
  • Temporal Dynamics: Interestingly, the LSTM performed remarkably well for a black-box model, often outperforming Lagrangian networks. This suggests that friction in industrial robots has significant temporal dependencies that LSTMs are well-suited to capture, even without explicit physical grounding.

Conclusion

While Lagrangian neural networks offer an elegant, energy-consistent framework for dynamics, they appear less suited for practical industrial applications where dissipative forces dominate motor torque measurements. Newtonian neural networks (RNEA + MLP) provide a more flexible and accurate alternative by explicitly separating rigid-body dynamics from residual dissipative effects.

Future research should address the initialization challenges of Lagrangian models and explore the simultaneous identification of physical parameters (mass, length) alongside neural network weights to further refine these physics-informed controllers.

Summary updated

BibTeX
@inproceedings{trinh2025newtonian,
  author = {Minh Trinh and Andreas René Geist and Josefine Monnet and Stefan Vilceanu and Sebastian Trimpe and Christian Brecher},
  title = {{Newtonian and Lagrangian Neural Networks: A Comparison Towards Efficient Inverse Dynamics Identification}},
  booktitle = {IFAC-PapersOnLine},
  year = {2025},
  doi = {10.1016/j.ifacol.2025.10.192},
}
Figure