Engineering · Lesson 03
Every autopilot, thermostat, and self-driving car relies on the same elegant idea: measure the error, then correct it — proportionally, by its accumulation, and by its rate of change. Tune a virtual drone and feel the math come alive.
Quick Brief
Live Simulator
Error Over Time
Blue = setpoint · Orange = actual position · Shaded area = error
The P term produces an output proportional to the current error. High Kp responds aggressively but can overshoot. Too low and the system is sluggish, never quite reaching the setpoint ("steady-state error").
The I term sums all past error over time. It eliminates steady-state error that P alone cannot fix, but too much Ki causes oscillation and "integral windup."
The D term reacts to the rate of change of the error. It acts as a brake, smoothing out overshoot and damping oscillations. Too much Kd amplifies sensor noise.
Engineers use methods like Ziegler–Nichols to find good starting gains. The goal: reach the setpoint quickly, with minimal overshoot and no sustained oscillation. Explore the sliders above to feel this balance.
Challenge Mode — Coming Soon
Random wind gusts will push your drone off course. Can you tune the PID gains to recover within 2 seconds every time?