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
You should be comfortable with basic Python: variables, loops and functions. We'll introduce the robotics and the maths as you go. The first visit downloads the physics engine and Python, about 20 MB, and later visits load from your browser's cache.
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-guidingPro
- 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