PID Control Tuner

Tune a PID controller and see how the output follows a step setpoint through a first-order plant.

Loading interactive simulation...

why derivative helps and hurts 🖖

The proportional term reacts to present error, the integral term removes long-term offset, and the derivative term damps fast changes. Too much Kp or Ki can overshoot and oscillate; too much Kd can amplify measurement noise, even though it often improves settling.

controlling by the gap, not the goal 🖖

The controller never sees the setpoint as a direct command — it only ever knows the error, the gap between where the output is now and where you want it. Every push it sends is a reaction to that gap, working to shrink it toward zero. Watch the step response: the setpoint jumps, the error is large, so the controller pushes hard and eases off as the output catches up. The takeaway: good control comes from reacting to the mistake, not from knowing the perfect move in advance.

born from watching a battleship's helmsman 🖖

The three-term recipe wasn't derived from equations first. In 1922 Nicolas Minorsky worked out PID control by watching an experienced helmsman steer the battleship USS New Mexico. He noticed the sailor corrected not just for how far off course the ship was (proportional), but for how long it had drifted (integral) and how fast the heading was changing (derivative). Automatic steering copied a human's instinct before the theory caught up.

Example problems

  • P only - P only
  • PI - PI
  • well damped - Balanced gains reduce overshoot while keeping response quick.