Ad Space — Top Banner

PID Controller Formula

Reference for the PID controller formula, the most widely used feedback control algorithm in industrial automation, robotics, and engineering.

Need to calculate, not just reference? Use the interactive version. Open PID Controller Tuning Calculator →

Key Notes

  • Formula: u(t) = Kp·e(t) + Ki·∫e(t)dt + Kd·de/dt: The control output u is the sum of three terms. e(t) is the error (setpoint − measured value). Kp, Ki, Kd are tuning gains that weight each term's contribution.
  • Each term's role: Proportional (Kp): responds to current error — faster response but may overshoot. Integral (Ki): accumulates past error — eliminates steady-state offset but can cause slow oscillation. Derivative (Kd): reacts to rate of error change — dampens oscillation but amplifies noise.
  • Tuning order: Increase Kp until the system oscillates, then reduce slightly (proportional only). Add Ki to eliminate the residual steady-state error. Finally add Kd to reduce overshoot. Ziegler-Nichols and Cohen-Coon methods provide systematic starting values.
  • Integral windup: When the actuator saturates (hits its physical limit), the integral term keeps accumulating error even though the output can't increase. When saturation ends, the huge integral term causes massive overshoot. Anti-windup logic clamps the integral when the actuator is saturated.
  • Applications: PID controllers are the dominant control algorithm in industry: motor speed regulation, drone attitude stabilization, thermostat temperature control, cruise control, chemical process control, and CNC machine position control.
Ad Space — Bottom Banner

Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.