Effective mass in a normal-contact penalty mode (source code)

= Effective mass in a normal-contact penalty mode
{title2=$m_{\rm eff}=(JM^{-1}J^{\mathsf T})^{-1}$}

The <effective mass in a normal-contact penalty mode> is the inertia seen by one specified relative normal displacement, rather than automatically the total <mass> of either body. A contact away from a <center of mass> can excite rotation as well as translation, changing that inertia and the <normal contact penalty time scale>.

Use independent generalized velocities $v$, a positive-definite <mass matrix> $M$, and a normal gap $g$ whose local velocity is $\dot g=Jv$. A scalar normal <force> $\lambda$ produces generalized <force> $J^{\mathsf T}\lambda$. The primary multibody formulation gives this contact-Jacobian velocity/<force> pairing explicitly.<Underactuated Robotics by Russ Tedrake>[Multi-Body Dynamics, Contact modeling: contact Jacobian and equation with generalized force J-transpose times lambda]{ref} At a frozen configuration, the part of gap acceleration caused by that <force> is
$$
\ddot g\big|_\lambda=JM^{-1}J^{\mathsf T}\lambda.
$$
If the scalar $a=JM^{-1}J^{\mathsf T}$ is positive, define
$$
\boxed{m_{\rm eff}=\frac1{JM^{-1}J^{\mathsf T}}.}
$$
The definition uses a physical normal gap measured in metres and a matching <normal force> measured in newtons. Arbitrarily rescaling the gap coordinate changes the associated inertia. Constraints must first be accounted for by independent coordinates or the appropriate constrained response.

A short normal <impulse> $P$ gives $\Delta v=M^{-1}J^{\mathsf T}P$, hence $\Delta\dot g=P/m_{\rm eff}$. This supplies a direct interpretation: less effective <mass> means a larger relative normal-velocity change for the same <impulse>. At a fixed local configuration, a compressed linear penalty spring of <stiffness> $k$ gives the small-motion estimate
$$
\ddot\xi+\frac{k}{m_{\rm eff}}\xi=0,\qquad
\omega_c=\sqrt{k/m_{\rm eff}}.
$$
It omits changing contact geometry, other driving <forces> and damping; the source separately explains why stiff compliant contact challenges numerical integration.<Underactuated Robotics by Russ Tedrake>[Multi-Body Dynamics, Compliant Contact Models]{ref}

For two freely translating particles, the relative gap sees $a=1/m_1+1/m_2$, so $m_{\rm eff}=m_1m_2/(m_1+m_2)$. This is the <reduced mass>. Equal $2\,\mathrm{kg}$ particles give $m_{\rm eff}=1\,\mathrm{kg}$; replacing one by a fixed wall gives $2\,\mathrm{kg}$ instead.

For a planar rigid body above a fixed plane, let its <mass> be $m$, rotational <moment of inertia> about its center be $I$, and the contact normal be vertical. A contact a horizontal distance $r$ from the center has
$$
a=\frac1m+\frac{r^2}{I},\qquad
m_{\rm eff}=\left(\frac1m+\frac{r^2}{I}\right)^{-1}.
$$
For $m=2\,\mathrm{kg}$, $I=0.020\,\mathrm{kg\,m^2}$ and $r=0.10\,\mathrm m$, $m_{\rm eff}=1\,\mathrm{kg}$. At the center it is $2\,\mathrm{kg}$. With $k=10^5\,\mathrm{N/m}$, the off-center angular <frequency> is $316.2\,\mathrm{rad/s}$, compared with $223.6\,\mathrm{rad/s}$ at the center. Using the full <mass> in both cases misses this rotational response.

Several simultaneous contacts require more than separate scalar replacements. Their matrix $A=JM^{-1}J^{\mathsf T}$ generally has off-diagonal terms: a <force> at one contact changes another contact’s acceleration. With frozen geometry and positive diagonal <stiffness> matrix $K$, compressed gap perturbations satisfy $\ddot\xi+AK\xi=0$; its nonzero modal squared <frequencies> are those of the symmetric matrix $K^{1/2}AK^{1/2}$. <Coupled normal-contact penalty modes> can therefore be faster than estimates treating each contact independently. A proposed verification applies a small known <impulse> or displacement perturbation at a stated configuration and checks relative contact motion, followed by a timestep convergence study.