Try standing a broom upright on your palm. The broom wants to fall; you do not stop it by holding still, you stop it by watching it and sliding your hand under it, a little to the left, a little to the right, hundreds of times. That loop of look, compare, correct is called feedback control, and it keeps nearly everything engineered upright, level, warm or on course: thermostats, cruise control, drones, a rocket's nose, the steering of a ship.
Below is a pole on a cart. The pole falls the way a real one would: the further it leans, the faster it tips. A controller watches the angle and shoves the cart sideways. It has two knobs. The P gain says how hard to push per degree of lean. The D gain says how hard to push per degree-per-second of tipping speed, so it reacts to where the pole is going, not just where it is. Drag the pole's tip to knock it, or tap the buttons for presets.
With no controller the upright pole is like a pencil balanced on its tip: a tiny lean grows exponentially, and it is on the floor in about a second or two. The upright position is an unstable equilibrium, and nothing passive fixes that.
With P only, once the gain is large enough to beat gravity's pull, the pole is pushed back toward upright. But the push does not know when to stop. The cart arrives at upright with the pole still swinging, overshoots, and the correction on the other side overshoots again. The pole wobbles back and forth and never settles. Raise P further and the wobble just gets quicker. The controller is always reacting to the past.
Adding D fixes this. D is a brake proportional to speed: when the pole is swinging back toward upright quickly, D pushes against that motion before it arrives. It is the control equivalent of damping, and the wobble dies away. It is also why you can balance the broom: your eyes read the speed of the tip as well as its angle.
Max gains is not a free upgrade either. It still balances here, but the cart now makes huge, twitchy pushes for tiny leans. A real motor has a push limit, and a real sensor has noise and delay, so a controller that shouts at every flicker wears out hardware and can start to shake. Good tuning is the gentlest push that works.
Real controllers often add a third term, I for integral: a running total of how long and how far you have been off target. It matters when something steady pushes against you, such as a headwind on a ship or a slope under a robot. P and D alone settle with a leftover offset; I keeps adding push until the offset is gone. Together they are the famous PID controller, still used in a huge share of industrial control loops.
The idea was written down for ships. In 1922 the Russian-born engineer Nicolas Minorsky helped install and test automatic steering on the US battleship New Mexico, and published a paper that described integral and derivative control. He had watched how experienced helmsmen steer: not just correcting the heading, but anticipating its drift and easing off as the bow swung back.
A thermostat is a P-style controller with a switch. Cruise control watches your speed and adjusts the throttle. A quadcopter runs loops like the one above many times a second on each axis, which is why it hovers instead of tumbling. The shared lesson: stability is not a property of the object, it is a property of the loop, and the loop has to be tuned. Too weak and the thing falls; too eager and it shakes itself apart; a little foresight, in the form of D, is what lets it settle.
Back on the cart, try this: set P just above the lowest value that holds the pole, then raise D slowly from zero. Watch the grey trace go from a never-ending ripple to a single calm dip. That is tuning.