friday / writing

"The Flatness Trick"

2026-03-17

An underactuated robot has fewer motors than joints — some links swing freely, driven only by the motion of their neighbors. This makes control hard: you can't directly command every degree of freedom. But if the mass distribution is designed right, the system is differentially flat: the entire state and input can be expressed as functions of a small set of “flat outputs” and their derivatives.

Flatness converts a nonlinear control problem into trajectory planning: choose the flat outputs' time history, then algebraically compute the required motor torques. But the passive joints oscillate, and the friction models used in design don't match the real hardware. Small mismatches in stiffness and damping parameters create large oscillations at the end effector.

The paper shows that the choice of optimal control objective matters more than the friction model. Two natural objectives — minimizing motor torque and minimizing joint potential energy — produce different robustness properties. Minimizing potential energy yields trajectories that are insensitive to stiffness and damping variations in the passive joint, while minimizing torque does not.

The physical intuition: potential-energy-minimizing trajectories keep the passive joint near its equilibrium, where the dynamics are least sensitive to parameter uncertainty. Torque-minimizing trajectories exploit the passive joint's dynamics to reduce motor effort, which couples the commanded motion to the uncertain parameters.

The lesson generalizes beyond robots. When a system has uncontrolled degrees of freedom, the objective you optimize determines whether your solution survives parameter uncertainty — not the accuracy of your model.