Learning outcomes
- Relate PD gains to a second-order response.
- Explain integral windup and actuator saturation.
- Separate continuous stability from sampled implementation.
Prerequisites: Linear algebra, ODEs, and earlier lectures in this sequence.
PD as state feedback
For one inertial joint, approximate
The velocity term dissipates motion. The proportional term creates a restoring action. Increasing both gains can shorten the ideal response while demanding larger torques and making the implementation more sensitive to delay and noise.
Worked gain choice
For
This calculation is a starting point for tuning, not a guarantee for the full robot. Inspect the actual coupled motion and saturation trace.
Integral action
For the same error convention, let
A simple conditional-integration rule freezes the integral when saturation and the proposed integral update would drive the command farther outside the limit. Back-calculation is another option. State the sign convention and test it on both positive and negative saturation. Reset or deliberately preserve the integrator when resetting an episode; either choice changes the experiment.
Robot-specific details
Joint-space PD is convenient for independent hinge joints. For a ball or free joint, compute a tangent-space position error instead of subtracting qpos arrays. A gain on orientation error should multiply three rotational components.
A motor command equals joint torque only for the declared direct, unit-gear actuator. With transmissions, activation dynamics, or position actuators, ctrl has a different interpretation. Inspect qfrc_actuator before interpreting a gain numerically.
Exercise
For a unit mass, apply semi-implicit Euler with
Answer check: the undamped symplectic Euler oscillator requires
The practice compares PD with bias-compensated control under the same torque limit. Use the failure cases to decide whether poor tracking comes from missing dynamics, insufficient actuation, or a timing problem.