How PID Control Works

u(t) = Kp·e(t) + Ki·∫e(t)dt + Kd·de(t)/dt

Proportional (P)

Responds to current error with output proportional to error magnitude. Higher Kp = faster response but may cause oscillation.

Output = Kp × error

Integral (I)

Accumulates past errors to eliminate steady-state error. Higher Ki = faster error elimination but may cause overshoot.

Output = Ki × ∫error dt

Derivative (D)

Predicts future error based on rate of change. Higher Kd = reduced oscillation and overshoot but sensitive to noise.

Output = Kd × de/dt

Response Curve

Setpoint
Output
Error

Physical System Animation

Target Position
Actual Position

PID Components

P
I
D

Observation Guide

Tuning Kp (Proportional)

  • Increase Kp for faster response
  • Too high Kp causes oscillation and instability
  • Start with Kp around 1-3 for moderate response

Tuning Ki (Integral)

  • Add Ki to eliminate steady-state error
  • Too high Ki causes overshoot and slow settling
  • Use small Ki values (0.01-0.5) typically

Tuning Kd (Derivative)

  • Add Kd to reduce overshoot and oscillation
  • High Kd amplifies sensor noise
  • Kd = 0.3-1.5 works well for most systems

Test Scenarios

  • Click "Step Input" to test step response
  • Use "Add Disturbance" to test rejection
  • Try "Sine Tracking" for dynamic reference

Pro Tips

  • Start with only Kp, add Ki if steady-state error exists
  • Add Kd last if you see oscillation or too much overshoot
  • Real systems often have limits on actuator output
  • PID tuning is iterative - small adjustments work best
  • Applications: Temperature control, motor speed, robotics, drones