Hyoungseo Son

Part 5 · Contact & Constraints

Contact as Complementarity: LCP and Signorini

7 min read

A spring obeys an equality: its force is a fixed function of displacement, and it acts in both directions. Contact obeys nothing so tidy. A body can push on what it touches but never pull it back, and it feels a force only at the instant of contact. That one-sidedness is why the honest model of contact is an inequality, not an equation.

The Signorini condition

Let ϕi\phi_i be the gap at contact ii and λi\lambda_i the normal contact impulse there. Neither may be negative: bodies cannot interpenetrate, so ϕi0\phi_i \ge 0, and contact cannot pull, so λi0\lambda_i \ge 0. And the two are complementary, since a force acts only when the gap is closed:

0ϕi    λi0ϕi0,λi0,ϕiλi=0.0 \le \phi_i \;\perp\; \lambda_i \ge 0 \qquad\Longleftrightarrow\qquad \phi_i \ge 0,\quad \lambda_i \ge 0,\quad \phi_i\,\lambda_i = 0.

Either there is a gap and no force, or contact and a nonnegative force, never both. When bodies are already touching the same law holds one derivative up, on the normal relative velocity vi=ϕ˙iv_i = \dot\phi_i:

0vi    λi0.0 \le v_i \;\perp\; \lambda_i \ge 0 .

The feasible set is not a curve but an L: the two positive axes glued at the origin.1

From condition to LCP

A solver works over a timestep at the velocity and impulse level, across all contacts at once. The post-step normal velocities depend affinely on the stacked impulses λRk\lambda \in \mathbb{R}^{k},

w=Aλ+b,A=JM1J,w = A\lambda + b , \qquad A = J M^{-1} J^\top ,

where JJ is the contact Jacobian, MM the mass matrix, AA the contact-space inverse inertia (the Delassus operator), and bb collects the bias from external and gravitational impulses. Stacking the Signorini condition over every contact gives a Linear Complementarity Problem (LCP): find λ\lambda with

w=Aλ+b,0λ    w0,w = A\lambda + b , \qquad 0 \le \lambda \;\perp\; w \ge 0 ,

which spelled out elementwise is

λ0,w0,λw=0    λiwi=0  i.\lambda \ge 0, \qquad w \ge 0, \qquad \lambda^\top w = 0 \;\Longleftrightarrow\; \lambda_i\, w_i = 0 \ \ \forall i .

Same three ingredients as the scalar condition, now coupled through AA. Add Coulomb friction, whose force lives in a cone tied to the very same normal impulse, and you recover the classic time-stepping LCP formulations of rigid-body contact.23 That cone is the friction chapter's subject; here it is enough that friction rides on the same complementarity.

A worked two-contact LCP

Take a concrete k=2k = 2 system:

A=[2112],b=[13].A = \begin{bmatrix} 2 & -1 \\ -1 & 2 \end{bmatrix}, \qquad b = \begin{bmatrix} -1 \\ 3 \end{bmatrix} .

Complementarity forces an active-set choice: each contact is either active (λi>0, wi=0\lambda_i > 0,\ w_i = 0) or inactive (λi=0, wi0\lambda_i = 0,\ w_i \ge 0). Guess contact 11 active and contact 22 inactive, so set w1=0w_1 = 0 and λ2=0\lambda_2 = 0. The active row of w=Aλ+bw = A\lambda + b collapses to a scalar equation:

2λ1λ21=0   λ2=0   2λ1=1        λ1=12.2\lambda_1 - \lambda_2 - 1 = 0 \;\xrightarrow{\ \lambda_2 = 0\ }\; 2\lambda_1 = 1 \;\implies\; \lambda_1 = \tfrac12 .

Back-substitute to recover the full pair:

λ=[120],w=Aλ+b=[2(12)0112+0+3]=[052].\lambda = \begin{bmatrix} \tfrac12 \\ 0 \end{bmatrix}, \qquad w = A\lambda + b = \begin{bmatrix} 2(\tfrac12) - 0 - 1 \\ -\tfrac12 + 0 + 3 \end{bmatrix} = \begin{bmatrix} 0 \\ \tfrac52 \end{bmatrix} .

Now check every condition:

λ0 ,w0 ,λw=120+052=0 .\lambda \ge 0 \ \checkmark, \qquad w \ge 0 \ \checkmark, \qquad \lambda^\top w = \tfrac12\cdot 0 + 0\cdot\tfrac52 = 0 \ \checkmark .

The guess is consistent, so it is the solution: contact 11 carries a positive impulse and stays closed (w1=0w_1 = 0), while contact 22 separates (w2=52>0w_2 = \tfrac52 > 0) and carries none. Guessing wrong is self-correcting. Try both contacts active, w1=w2=0w_1 = w_2 = 0, and you must solve Aλ=bA\lambda = -b, which gives λ1=13<0\lambda_1 = -\tfrac13 < 0, violating λ0\lambda \ge 0, so that active set is rejected.

Signorini complementarityinteractive

(gap, force) plane (drag the point)

φ gapλ force
φ (gap)
1.50
λ (force)
1.10
φ·λ
1.65 (must be 0)

separated: gap > 0, force = 0

Valid states form an L: on the axes the product φ·λ is zero. Off the axes you are pushing without contact, or overlapping under load, which the Signorini condition forbids.

Drag P = (gap φ, normal force λ). The valid set is the L of the two positive axes: a force only when the gap is closed. The dashed line projects P to the nearest valid state, and the product φ·λ is zero exactly on the axes.

Why contact is hard

Nothing here is nonlinear. The difficulty is combinatorial: λw=0\lambda^\top w = 0 forces each of kk contacts onto one of two branches, so there are 2k2^{k} candidate active sets and only a consistent one solves the problem. Enumerating them, as we did by hand above for k=2k = 2, does not scale. The escape is structure. When A=JM1JA = J M^{-1} J^\top is symmetric positive semidefinite, the LCP is exactly the optimality condition of the convex program

minλ0 12λAλ+bλ,\min_{\lambda \ge 0} \ \tfrac12\, \lambda^\top A \lambda + b^\top \lambda ,

so the next chapters can drop the enumeration and reach for convex relaxations and iterative solvers instead of guessing active sets.

Footnotes

  1. Le Lidec et al., Contact Models in Robotics: a Comparative Analysis (2024).

  2. Stewart & Trinkle, An implicit time-stepping scheme for rigid body dynamics with inelastic collisions and Coulomb friction (IJNME 1996).

  3. Anitescu & Potra, Formulating Dynamic Multi-Rigid-Body Contact Problems with Friction as Solvable Linear Complementarity Problems (Nonlinear Dynamics 1997).