ServoLNN: Lagrangian Neural Networks Driven by Servomechanisms
Brandon Johns, Zhuomin Zhou, Elahe Abdi
TL;DR
ServoLNN extends Lagrangian neural networks by introducing externally specified generalised coordinates to model systems driven by servomechanisms. The architecture outputs a potential energy $\\mathcal{V}(\\mathbf{q})$ and constructs a mass matrix $\\mathbf{M}(\\mathbf{q})$ via a Cholesky-like factorization, enforcing physical consistency and positive definiteness. Reformulated Euler–Lagrange equations with partitioned coordinates yield forward/inverse dynamics, energies, power, and the forces driving the servomechanisms, including an explicit expression for the equivalent driving force $\\mathbf{Q}_e$. Evaluation on a crane-cart pendulum dataset demonstrates real-time inference (~1.7 ms per sample) and accurate recovery of dynamic quantities when $\\mathbf{Q}_e$ is known, while highlighting a family of solutions in its absence and proposing methods to resolve it by incorporating $\\mathbf{Q}_e$ during training.
Abstract
Combining deep learning with classical physics facilitates the efficient creation of accurate dynamical models. In a recent class of neural network, Lagrangian mechanics is hard-coded into the architecture, and training the network learns the given system. However, the current architectures do not facilitate the modelling of dynamical systems that are driven by servomechanisms (e.g. servomotors, stepper motors, current sources, volumetric pumps). This article presents ServoLNN, a new architecture to model dynamical systems that are driven by servomechanisms. ServoLNN is compatible for use in real-time applications, where the driving motion is known only just-in-time. A PyTorch implementation of ServoLNN is provided. The derivations and results reveal the occurrence of a possible family of solutions that the training may converge on. The effect of the family of solutions on the predicted physical quantities is explored, as is the resolution to reduce the family of solutions to a single solution. Resultantly, the architecture can simultaneously accurately find the energies, power, rate of work, mass matrix, generalised accelerations, generalised forces, and the generalised forces that drive the servomechanisms.
