Hyoungseo Son

Part 2 · Equations of Motion

The Manipulator Equation

6 min read

Part 1 ended with the equation of motion. Here is where it comes from, what each term does, and the two directions you can run it.

One equation, two derivations

The Lagrangian route starts from energy. With L=TVL = T - V (kinetic minus potential), the Euler-Lagrange equations ddtLq˙Lq=τ\frac{d}{dt}\frac{\partial L}{\partial \dot q} - \frac{\partial L}{\partial q} = \tau grind out, after substituting T=12q˙M(q)q˙T = \tfrac12\dot q^{\top}M(q)\dot q, exactly

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

The Newton-Euler route writes f=maf = m\,a and τ=Iω˙+ω×Iω\tau = I\dot\omega + \omega\times I\omega for every body and projects onto the joint axes. It produces the same equation, and done recursively over the tree it is the RNEA algorithm of the next chapter. Both give the standard manipulator form, with MM symmetric positive definite, Cq˙C\dot q the Coriolis and centripetal terms, and gg gravity.1

Reading the three terms

  • M(q)q¨M(q)\ddot q: inertia felt at the joints. Configuration dependent, as the mass matrix demo showed.
  • C(q,q˙)q˙C(q,\dot q)\dot q: Coriolis and centrifugal forces. Quadratic in velocity, the bookkeeping cost of describing motion in a rotating, moving frame.
  • g(q)g(q): gravity.

Run the arm along a prescribed motion and watch inverse dynamics split the required torque into those three parts:

τ = M q̈ + C q̇ + g, decomposedinteractive
τ₁ (shoulder)
τ₂ (elbow)
inertial M q̈Coriolis C q̇gravity g
Inverse dynamics on a 2-link arm. Gravity dominates when the arm moves slowly; the Coriolis term grows with the square of joint velocity; the inertial term tracks acceleration. All three vary continuously with configuration.

Two directions

  • Forward dynamics. Given torques, find the acceleration, q¨=M1(τCq˙g)\ddot q = M^{-1}(\tau - C\dot q - g). This is what a simulator does every step.
  • Inverse dynamics. Given a desired acceleration, find the torque that produces it. This is what a controller does, and what the demo computes.

Both look like they need M1M^{-1}, an O(n3)O(n^{3}) operation if you form and factorize MM. You do not have to. Featherstone's articulated-body algorithm computes forward dynamics in O(n)O(n), and its inverse-dynamics sibling RNEA is also O(n)O(n). That is the next chapter. It is also worth knowing that the derivatives of this equation, q¨/q\partial\ddot q/\partial q and q¨/τ\partial\ddot q/\partial\tau, have closed-form O(n)O(n) algorithms too,2 which is what makes minimal-coordinate engines like Drake differentiable and usable inside trajectory optimization.

Footnotes

  1. Lynch & Park, Modern Robotics (2017): "M(θ) is the symmetric positive-definite mass matrix, c(θ, θ̇) is the vector containing the Coriolis and centripetal torques, and g(θ) is the vector containing the gravitational torques."

  2. Carpentier & Mansard, Analytical Derivatives of Rigid Body Dynamics Algorithms (RSS 2018).