Visual walkthrough — PID control — proportional, integral, derivative terms
Step 1 — The gap we are trying to close
WHAT. We have a target — a number we want to reach. Call the target , the setpoint (subscript... no subscript, just ; the means "it can change over time"). We have the actual measured value , the process variable (what a sensor reports). The single most important quantity is the gap between them:
is the error. Positive means we are below target; negative means we overshot above it.
WHY. Every controller in existence is a machine that reads and decides a push. So the very first thing to draw is what looks like — a vertical gap on a graph of "value vs time".
PICTURE. The red curve is where we actually are, . The flat black line is the target . The red gap is .

Step 2 — The Proportional push: react to the present
WHAT. The simplest possible rule: push in proportion to how big the gap is right now.
Here is the control signal — the actual command sent to the actuator (a thruster, a motor). is the proportional gain: a dial. Big = aggressive.
WHY proportional and not, say, constant? A constant push can't know when to stop. Proportional push automatically fades as you approach — big gap, big shove; small gap, gentle nudge; zero gap, hands off. It's the natural "steer harder the more you've drifted" law.
PICTURE. The height of the red arrow (the push) tracks the height of the gap. As the gap shrinks left-to-right, the arrow shrinks with it.

Step 3 — Why P alone always misses: the steady-state gap
WHAT. Suppose something constant fights us — gravity, drag, a steady solar torque. Call it the disturbance . At rest ("steady state"), our push must exactly cancel , otherwise we'd still be moving. So at rest:
is the steady-state error — the leftover gap once everything settles.
WHY it can never be zero. Zero error would give zero push (), and then nothing opposes , so the system drifts and error grows back. The only resting place is a nonzero gap that produces just enough push to hold against .
PICTURE. The red curve settles — but it settles below the target, parked at a permanent gap . Raising shrinks the gap but never closes it (dashed red = bigger ).

Step 4 — The Integral: remember the past to erase the gap
WHAT. Instead of reacting only to the present height, add up the whole history of error — the shaded area under the error curve — and push based on that.
The symbol just means "the shaded area from time up to now." is a dummy stand-in for "each past instant." is the integral gain.
WHY this kills the leftover gap. Watch what "steady" now demands. In steady state the push must be constant. But the integral term only stops changing when nothing new is being added to the area:
So the only possible resting state is zero error. As long as any gap remains, the area keeps growing, the push keeps rising, and it hunts the gap down to nothing.
PICTURE. The shaded red area under the error curve grows over time. As the accumulator fills, the push climbs until the error is dragged all the way onto the target line — .

Step 5 — The Derivative: predict the future to stop overshoot
WHAT. Add up nothing this time — instead look at the slope of the error curve: is the gap closing fast?
(say "dee-ee-dee-tee") is the rate of change of the error — the steepness of the red curve. is the derivative gain.
WHY it damps. When we rush toward the target, the gap is shrinking fast, so its slope is negative: . Then — a braking command that eases the approach before we arrive, killing the overshoot that P+I alone would cause.
PICTURE. Where the error curve is steep and falling, the red tangent line points down — and the derivative term applies a backward brake exactly there.

Step 6 — The degenerate cases (never leave the reader stranded)
WHAT / WHY / PICTURE. Four corner situations, each answered:
- but (perfect aim, still fighting a disturbance): P gives nothing, D gives nothing — only I (its stored area) holds the push. Without I the system would immediately drift back off target.
- constant and nonzero (parked with an offset): P gives a steady push, D gives zero (flat slope), I keeps ramping — proof it will not rest here.
- changing but momentarily zero (whipping through the target): P is zero, I holds steady, but D fires hard because the slope is steep — it brakes the fly-through.
- All three zero (on target, still, no history): command is zero. This is the only true equilibrium, and every term agrees on it.

Recall Which term is "awake" in each corner?
, area held ::: only I is awake (it stores the past). flat and nonzero ::: P holds, I ramps, D sleeps. crossing zero fast ::: D fires hardest, P momentarily silent. everything zero ::: total silence — the true rest state.
Step 7 — Stack the three pushes into one command
WHAT. Add the present, past, and future pushes. That sum is the PID control law.
WHY these three and only these. They are precisely value, integral, derivative — the three things calculus can pull out of any signal. Each cures the previous term's disease: P is fast but biased, I removes the bias but overshoots, D tames the overshoot. Together, one balanced push.
PICTURE. Three separate curves (one per term) sum into a single red command curve.

The one-picture summary
Everything above, compressed: the same error curve read three ways — height (P), area (I), slope (D) — feeding one boat toward one dot.

Recall Feynman retelling of the whole walkthrough
You're steering a toy boat to a dot, and a steady wind keeps shoving it aside.
- First you measure the gap between boat and dot — that's the error.
- You turn the wheel harder the bigger the gap. That's P. But the wind means you settle just short of the dot forever, because holding position needs a little steady turn, which needs a little leftover gap.
- Annoyed, you add extra turn for how long it's been wrong — the piled-up history. That's I. Now the only way the piling stops is if the gap becomes exactly zero, so you finally sit on the dot.
- But you're now zooming at the dot and about to shoot past. So you start un-turning early, based on how fast the gap is closing. That's D — the brake that reads the future. Present, past, future. Three ways of reading one gap, three helpers steering one boat.