Materials & Energypreprint2026-08-29

Principled Grammar Specification for Symbolic Regression of Robot Mass-Matrix Dynamics: Identification of sin(2q) Atom Requirements via Structural Analysis

Open access0 citations

Abstract

We address a foundational question in symbolic regression of robot dynamics: what is the minimal sufficient grammar of trigonometric atoms required to express the diagonal mass-matrix elements Mii(q) of a serial manipulator? Using Lasso regression on a principled atom library derived from rigid-body dynamics, we analyse all seven diagonal elements of the Franka Panda composite rigid body mass matrix over 2500 joint configurations sampled to include near-singular regions. We show that the standard symbolic-regression atom library — constants, single-angle trigonometric terms, and their pairwise products — explains 85% of variance in the most complex proximal-joint element (R2 = 0.852 on M11), and we identify sin(2q) singles together with their cross-products against single-angle trig as the principal missing atom class, raising explained variance to R2 = 0.939 with active-atom sparsity dropping from 47% to 22%. We argue this atom class arises naturally from rotating off-diagonal inertia tensor components through joint angles, provide a complete grammar specification, and report negative results on triple products and double-angle pairwise products as further extensions (+0.034 and +0.004 R2 respectively, not justifying the search-space inflation). We additionally document a model-completeness diagnostic, Δs, which correctly flags proximal-joint structural complexity even when discovery fails. Our findings inform grammar design for any symbolic-regression system targeting robot inverse dynamics. New in v2: the original publication identified that the search procedure failed to recover the extended-grammar atoms even after the grammar itself was corrected, and left the fix as future work. This version reports that fix: a bounded residual-projection (greedy, OMP-style) atom selection method, verified reproducible across 5 independent noise seeds, with zero regression confirmed on a separate 44-task validation benchmark. Reproducibility artifacts (data, analysis scripts, Lasso JSONs) and the current codebase are available at https://github.com/Qazi-pk/physics-engine. A live interactive demonstration is available at https://huggingface.co/spaces/Qazihanif/pir-demo.

// Source

View paper (DOI)Open access versionOpenAlexZenodo (CERN European Organization for Nuclear Research)Published 2026-08-29

Authors: Qazi Hanif