Hyoungseo Son

Part 1 · Mathematical Foundations

Rigid-Body Dynamics: Inertia and the Mass Matrix

6 min read

With the kinematics in place, we can ask what force does. For a single rigid body the answer is Newton for translation and Euler for rotation,

f=mv˙,τ=Iω˙+ω×(Iω),f = m\,\dot v, \qquad \tau = I\,\dot\omega + \omega \times (I\,\omega),

where II is the 3×33\times3 inertia tensor, symmetric and positive definite, encoding how mass is spread out. The ω×Iω\omega \times I\omega term is why a spun object with unequal axes tumbles: rotation couples into itself.

Kinetic energy and the mass matrix

The clean way to see where a whole mechanism's inertia lives is energy. Kinetic energy of one body is

T=12mv2+12ωIω.T = \tfrac12 m\,\lVert v\rVert^{2} + \tfrac12\,\omega^{\top} I\,\omega .

For an articulated system in generalized coordinates qq, every body's velocity is a linear function of q˙\dot q, so summing the energies gives a quadratic form,

T=12q˙M(q)q˙.T = \tfrac12\,\dot q^{\top} M(q)\,\dot q .

That defines the mass matrix (joint-space inertia) M(q)M(q): symmetric, positive definite, and, importantly, a function of configuration. It is not a constant the way a point mass is.

The mass matrix is configuration dependentinteractive
M(q)
3.571.15
1.150.72

Move the elbow: every entry changes. Move the shoulder: nothing does. M depends on q₂, not q₁. The off-diagonal is joint coupling.

A 2-link arm with equal point masses. Drag the elbow q₂ and every entry of M(q) moves; drag the shoulder q₁ and none do. The off-diagonal term is the inertial coupling between the two joints.

The equation everything else hangs on

Put the inertia (Mq¨M\ddot q), the velocity-dependent terms that the ω×Iω\omega \times I\omega coupling generalizes to (C(q,q˙)q˙C(q,\dot q)\dot q, the Coriolis and centrifugal forces), and gravity together, and you get the equation of motion for the whole mechanism,

M(q)q¨+C(q,q˙)q˙+g(q)=τ.M(q)\,\ddot q + C(q,\dot q)\,\dot q + g(q) = \tau .

Forward dynamics (given torques, find accelerations) means solving it for q¨\ddot q. The naive route is to build M(q)M(q) explicitly and invert it, which is where the Composite Rigid Body Algorithm and, more cleverly, Featherstone's O(n)O(n) Articulated-Body Algorithm come in. That is Part 2.