Distilling physical laws autonomously from data has been of great interest in
many scientific areas. The sparse identification of nonlinear dynamics (SINDy)
and its variations have been developed to extract the underlying governing
equations from observation data. However, SINDy faces certain difficulties when
the dynamics contain rational functions. The principle of the least action
governs many mechanical systems, mathematically expressed in the Lagrangian
formula. Compared to the actual equation of motions, the Lagrangian is much
more concise, especially for complex systems, and does not usually contain
rational functions for mechanical systems. Only a few methods have been
proposed to extract the Lagrangian from measurement data so far. One of such
methods, Lagrangian-SINDy, can extract the true form of Lagrangian of dynamical
systems from data but suffers when noises are present. In this work, we develop
an extended version of Lagrangian-SINDy (xL-SINDy) to obtain the Lagrangian of
dynamical systems from noisy measurement data. We incorporate the concept of
SINDy and utilize the proximal gradient method to obtain sparse expressions of
the Lagrangian. We demonstrated the effectiveness of xL-SINDy against different
noise levels with four nonlinear dynamics: a single pendulum, a cart-pendulum,
a double pendulum, and a spherical pendulum. Furthermore, we also verified the
performance of xL-SINDy against SINDy-PI (parallel, implicit), a recent robust
variant of SINDy that can handle implicit dynamics and rational nonlinearities.
Our experiment results show that xL-SINDy is 8-20 times more robust than
SINDy-PI in the presence of noise