A quadrotor's altitude is a double integrator: . That's two integrators in series, which means the plant has two poles at the origin — the marginal case. Proportional alone cannot stabilize it. You need a derivative term to provide effective damping.
Watch the drone, not just the graph. Below you'll see a live side-view of the quadrotor with its two propellers — it bobs up and down in real time according to the controller's commands. The dashed line at y = 1 is the setpoint altitude. Tune the PID gains and trigger a wind gust to see how your tuning holds up. Then add a payload (heavy GoPro) and watch the same gains struggle with the new mass.
Hover at 1.0 m, gust-resistant
altitude (live) 0.00 m
overshoot —
gust dip —
SSE —
what to try
- Drop Kd to zero. The drone oscillates around the setpoint with no damping — overshoot becomes the next undershoot, forever. This is the double-integrator failure mode P alone can't fix. Bring Kd back to ~3.
- Crank Kp to 18 with Kd = 0. Same problem, but faster — the drone violently oscillates. P-gain determines speed; D-gain determines whether you survive the ride.
- Trigger the wind gust mid-flight. A downward push lasting 0.3s. Without Ki, a steady wind would leave a permanent offset; the integrator kills it. Try Ki = 0 vs Ki = 3 with the gust active.
- Hang a 2 kg payload (mass slider all the way right). The controller was tuned for 1 kg; suddenly the plant is twice as sluggish. Same lesson as Lesson 01: gains tuned for a nominal plant degrade as the real plant deviates.