PID Controllers - Dutton-Christian-Robotics/Learning-to-Code GitHub Wiki

What Each Part Does

  • Proportional (the present): the farther way, the harder it pushes
    • Too Low: it doesn't really move
    • Too High: overshoots and oscillates back and forth
  • Integral (the past): error added up over time. Leads to extra push if you're close but not quite there.
    • Too High: "causes slow, heavy sloshing or windup"
  • Derivative (the future): acts as a brake if you're approaching the target too fast.
    • Too High: twitchy and sensitive to small things

An Approach to Tuning

  • Set I and D to 0
  • Raise P slowly until you get oscillation
  • Back off on P
  • Add I if there's still a little bit of a gap
  • Add D if needed to dampen overshoot and smooth out motion