Control Systems: From Bang-Bang to PID

Interactive visualization of how different control methods respond to setpoint changes

Live Simulation
50°C

Bang-Bang Control

On/Off control - simplest form

if (error > 0) ON else OFF
Current: 50.0°C Status: HEATING

Behavior: Oscillates around setpoint. Heater is either 100% ON or 100% OFF. Simple but causes overshoot and constant cycling.

P Control (Proportional)

Output proportional to error

u(t) = Kp × e(t)
Current: 50.0°C Offset: 0.0°C

Behavior: Smooth response but never reaches setpoint exactly. Has steady-state error (offset) because output decreases as error decreases.

PI Control (Proportional-Integral)

Eliminates steady-state error

u(t) = Kp×e + Ki×∫e dt
Current: 50.0°C Integral: 0.0

Behavior: Integral term accumulates error over time, eliminating offset. May overshoot and takes longer to settle.

PD Control (Proportional-Derivative)

Anticipates future error

u(t) = Kp×e + Kd×de/dt
Current: 50.0°C Rate: 0.0°/s

Behavior: Derivative predicts error change, reducing overshoot and improving response. Still has steady-state offset like P control.

Full PID Control

Combined: fast response, no offset, minimal overshoot

u(t) = Kp×e + Ki×∫e dt + Kd×de/dt
Current Value
50.0°C
P Component
0.0
I Component
0.0
D Component
0.0

Behavior: The gold standard of control. P provides quick response, I eliminates offset, D reduces overshoot. Well-tuned PID reaches setpoint quickly with minimal oscillation.

Control Method Comparison

Method Speed Accuracy Overshoot Complexity
Bang-Bang ⚡ Fast ❌ Poor �� High ��� Simple
P Only ⚡ Fast ⚠️ Offset 📉 Low ✅ Simple
PI 🐢 Slower ✅ Good 📈 Medium ⚠️ Medium
PD ⚡ Fast ⚠️ Offset 📉 Low ⚠️ Medium
Full PID ⚡ Fast ✅ Excellent 📉 Minimal ❌ Complex