FORC · Lecture 5

Gravity compensation and inverse dynamics

Simeon Nedelchev

Full notes, practice, and references

Model-based compensation

Mv˙+c=u+τpassiveM\dot v+c=u+\tau_{\rm passive}

Gravity compensation uses the gravitational bias.

Bias compensation also includes velocity-dependent inertial terms.

Desired acceleration

a⋆=q¨⋆−Kd(v−v⋆)−Kp(q−q⋆)a^\star=\ddot q^\star-K_d(v-v^\star)-K_p(q-q^\star)

The reference must specify position, velocity, and acceleration consistently.

Computed torque

u=Ma⋆+c−τpassiveu=Ma^\star+c-\tau_{\rm passive}

Exact cancellation assumes an accurate model and sufficient actuation.

Passive damping

For τpassive=−bv\tau_{\rm passive}=-bv, cancellation contributes +bv+bv.

Leaving physical damping in the loop changes the error equation.

MuJoCo connection

qfrc_bias, qfrc_passive, and mj_fullM expose the required terms.

mj_inverse requires a desired qacc and careful force interpretation.

Failure analysis

Reduce the actuator limit.

Does compensation still improve tracking?

Reading: MIT multibody dynamics

Reading

Return to the notes