Forces, Motors & Feedback
Drive the arm with raw motor torques. Estimate velocity from an encoder, work out the torque gravity demands, feel inertia, then close the loop with P and PD control and see what a slow or late sensor does to it.
Start the lesson0/5 steps done
What you'll learn
- Estimate velocity and acceleration from sampled positions
- Compute the torque gravity puts on each joint
- Relate torque, inertia and acceleration
- Close a feedback loop with P and PD control
- Explain how sample rate, latency and quantisation limit a controller
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
- 1Position, velocity & accelerationRead a joint's encoder every 10 ms and work out how fast it is moving, without drowning in the jitter.DerivativesFinite differencesSampling periodResolution and smoothingOpen
- 2Force, torque & gravityWork out the torque each motor needs to hold the arm up, then hold three poses with nothing else.Torque = force × lever armCentre of massGravity torquePayloadOpen
- 3Mass, inertia & F = maMeasure how hard the base is to spin, then turn it 90° and stop dead using nothing but timed torques.Newton's second lawMoment of inertiaMomentumStopping distanceOpen
- 4Feedback: P and PD controlClose the loop: measure the error and push against it. Then add damping so the base stops where you want.ErrorOpen vs closed loopProportional controlDampingSaturationOpen
- 5Sensors, rates & delayRun the same controller at 500, 50 and 20 Hz with a late, coarse sensor, and find gains that survive the slow one.Control loop rateSensor latencyQuantisationStabilityOpen
- ★Bonus: Motors & gearboxesA small fast motor, a gearbox of your choosing: find the ratio that swings the base 90° fastest.Motor torque and speedGear ratioTrade-offsOpen