An interactive PID control-loop simulator. A virtual cart is pushed left and right by a software controller trying to track a moving target. Configure both the plant (the physical thing being controlled) and the loop (the controller and its hardware constraints), then tune the three PID gains to get the best response.
← Back to Technical GuidesA PID controller computes its output as a weighted sum of three terms applied to the error signal e(t) = setpoint − measured value:
u(t) = Kp·e(t) + Ki·∫e(τ)dτ + Kd·de(t)/dt
Reacts to the magnitude of the current error. Provides the primary corrective force. Alone, it cannot eliminate steady-state error against constant disturbances — it always leaves a residual offset proportional to the disturbance.
Accumulates error over time, ensuring the long-term average error is driven to zero. Eliminates the steady-state offset that P alone leaves behind. Pays for this with reduced phase margin — increases overshoot and oscillation risk.
Acts on the rate of change of error, providing predictive damping. Reduces overshoot and improves transient response. Highly sensitive to sensor noise because differentiation amplifies high-frequency content — often filtered or omitted entirely on noisy plants.
Set any gain to 0 to disable that term (PI, PD, P-only, etc.). Hover the ? markers for technical detail and examples.