Hyoungseo Son

Part 1 · Mathematical Foundations

Maximal vs Minimal Coordinates

7 min read

Every engine answers one question before it simulates anything: which numbers are the state? Two answers split the field.

Two ways to write a configuration

Minimal (generalized) coordinates. One number per degree of freedom. A pendulum is a single angle θ\theta; an nn-link arm is nn angles qRnq \in \mathbb{R}^n. The rigid links and joints are baked into the parametrization, so every state you can write is automatically legal.

Maximal (Cartesian) coordinates. Give every body its full pose: (x,y,θ)(x, y, \theta) per body in the plane, position plus orientation (6 numbers) in 3D. Joints become separate equations that the solver has to keep satisfied. A joint is just a constraint function pinned to zero,

C(q)=0,C:RnRm.C(q) = 0, \qquad C : \mathbb{R}^{n} \to \mathbb{R}^{m}.

For the same mechanism the two choices carry very different amounts of bookkeeping. Drag nn:

Coordinate count · open chaininteractive
minimal q
3
maximal coords
9
pin constraints
−6
net DOF
9 − 6 = 3

Same physical freedom either way. Minimal stores exactly 3; maximal stores 9 numbers and must actively enforce 6 constraints.

Both representations describe the same net DOF. Maximal stores 3 numbers per body and pays for it with 2 constraint equations per pin joint.

Why the choice shows up in the dynamics

In minimal coordinates the equations of motion are self-contained,

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

and there is nothing else to enforce: the coordinate space is the set of legal configurations.

In maximal coordinates you carry the constraints explicitly, with Lagrange multipliers λ\lambda that are the constraint (joint) forces,

Mq¨=fext+Jλ,J=Cq,C(q)=0.M\,\ddot q = f_{\text{ext}} + J^{\top}\lambda, \qquad J = \frac{\partial C}{\partial q}, \qquad C(q) = 0 .

That pairing (a differential equation in qq plus an algebraic equation C(q)=0C(q)=0) is a differential-algebraic equation, and the algebraic half is where numerics bite.

The drift

You cannot hand C(q)=0C(q) = 0 to an integrator directly, so you differentiate it: once for Jq˙=0J\dot q = 0, twice for a relation in q¨\ddot q that solves alongside the dynamics. But a discrete step only satisfies the acceleration-level equation, so small position errors pile up with nothing to remove them. The pin joint slowly stretches.

The usual fix is Baumgarte stabilization. Instead of C¨=0\ddot C = 0, enforce a damped spring that pulls CC back toward zero,

C¨+2βC˙+β2C=0.\ddot C + 2\beta\,\dot C + \beta^{2} C = 0 .

Left is the pendulum in minimal coordinates; right is the same pendulum in maximal coordinates. At β=0\beta = 0 the bob wanders off its dashed circle as the constraint drifts (raise dt to see it sooner). Turn up β\beta and the rod snaps back to length.

Constraint drift · one pendulum, two coordinate systemsinteractive

minimal · q = [θ]

‖p‖ − L = 0 (exact)

maximal · q = [x, y]

‖p‖ − L = +0.0000

Minimal coordinates cannot leave the circle; the angle is the only state. Maximal coordinates track (x, y) and must be told to stay on it.

Then why use maximal coordinates at all?

If minimal coordinates are smaller and drift-free, why do PhysX and Bullet default to maximal? Because minimal coordinates buy their tidiness with structure you do not always have.

  • Closed loops. A four-bar linkage or a parallel robot has no independent set of joint angles, so you are forced back to constraints anyway.
  • Contact. Every contact is a constraint that appears and vanishes at runtime. You cannot re-parametrize the configuration manifold each time two bodies touch; maximal coordinates just absorb contacts as more rows of CC.
  • Uniform structure. Every body is the same 6-DOF blob, which is easy to batch across a GPU.

That is the real split from the landscape: MuJoCo, Drake, and RaiSim commit to minimal coordinates and lean on Featherstone's algorithms to keep them fast, while PhysX and Bullet stay maximal and pour their effort into the constraint solver. Both branches are coming up: Featherstone's O(n)O(n) algorithms for the minimal side, and the contact and constraint solvers for the maximal one.

Next in Part 1: rotations, SO(3)SO(3), and the exponential map, the piece that makes 3D orientation its own small subject.