Dynamics & Torque Control
Position servos hide the physics. Switch the arm to torque control and write the controllers that run inside real robots: predict motion from the equations of motion, cancel gravity, let PID find a load the model doesn't know about, track fast trajectories with computed torque, and make the hand safely springy.
Start the lesson0/5 steps done
What you'll learn
- Use the equations of motion M(q) q̈ + h = τ
- Cancel gravity with a model-based feed-forward
- Let PID find what the model misses, without integral windup
- Track fast motions with computed torque
- Make the hand compliant with Cartesian impedance control
- Weigh an unknown payload by least squares
Before you start
Finish Jacobians & Velocity Control first: step 5 turns a force at the hand into joint torques with the arm's Jacobian. You should be at ease with numpy arrays and matrix products (@, np.linalg.solve). Each step introduces the dynamics it uses, and the Foundations refreshers cover inertia, torque and PD control.
Steps
- 1The equations of motionPredict what torques will do to the whole arm with M(q) q̈ + h = τ, then watch the real arm follow your prediction.Equations of motionMass matrixCoriolis and centrifugal torquesForward dynamicsOpen
- 2Gravity compensationCancel gravity with the arm's own model: it floats wherever you leave it, and PD stops sagging.Gravity compensationSteady-state errorFeed-forward vs feedbackHand-guidingOpen
- 3PID when the model is wrongThe hand carries a load the model doesn't know about. Let the I term find the missing torque, without winding up.PIDModel errorIntegral windupAnti-windupPro
- 4Computed torqueUse the model to supply the torque a fast motion needs, so feedback only fixes small errors: tenths of a degree where PD lags by degrees.Inverse dynamicsComputed-torque controlFeed-forward vs feedbackPro
- 5Making the arm springyGive the hand a virtual spring and damper: it yields when pushed, by exactly the amount you choose, and comes back.Impedance controlJacobian transposeStiffness and dampingCompliancePro
- ★Bonus: Weigh the payloadHold the arm still at a few poses, read the motor torques, and solve for the unknown payload by least squares.System identificationLinear in the parametersLeast squaresPro