Chapter 7
The Drone's Real Personality
Why does the drone bounce like a spring?
Chapter 7: The Drone's Real Personality ↗
The controller is a spring
Mika: June asked where our drone lives on the map. Clue: remember the bouncy drone from Chapter 2? The more we cranked , the more it boinged. It looked exactly like a weight on a spring.
Theo: "Looked like" isn't proof. Let's put them side by side and write down both equations.
On the left: a mass of 0.5 kg hanging on a spring with a damper (a little oil-filled piston that resists motion). On the right: our drone, same mass, same drag, under proportional control.
First, let's write down every force on the mass, one at a time. Measure its position from the resting point, with up as positive.
- The spring pulls back towards rest, harder the further it's stretched: . Stretch it twice as far and it pulls twice as hard.
- The damper pushes against the motion, not the position: . Standing still, it does nothing. Moving fast, it pushes back hard. ( is Chapter 3's speed.)
- Gravity only moves the resting point down a little. Measuring from rest takes care of it.
Force = mass × acceleration, and acceleration is the slope of the slope (Chapter 3). Add the forces up and move everything to one side:
Mika: So the damper is basically air that hates speed?
Theo: Pretty much. And for our drone, the damper is the air.
In the widget, the orange arrow on the mass is the spring's pull and the grey one is the damper's push. Watch how the damper's arrow vanishes whenever the mass stops for an instant at the top or bottom of a swing.
Chapter 7: The Drone's Real Personality ↗
June: The curves are on top of each other. Not similar. Identical.
Look at the two equations. The spring pushes back with force : the further it's stretched, the harder it pulls. Our controller pushes with : the further from the target, the harder it pushes. Same rule. The controller is a spring: an invisible one, pulling the drone towards 2 m.
Theo: So a P controller is a virtual spring, and the air drag is a virtual damper. Everything we learn about springs, we get for free.
Two personality knobs
Every mass-spring-damper, and so every P-controlled drone, is described by just two numbers. Let's earn them one at a time.
How fast: the natural frequency
Take the damper away and we're back in Chapter 6: the spring swings as with . We call that speed the natural frequency : how fast the system wants to swing when nothing slows it down.
Chapter 7: The Drone's Real Personality ↗
Mika: Stiffer spring, faster swing. So I just crank and everything gets better!
A stiffer spring pulls harder, so it swings faster. A heavier mass is harder to shove around, so it swings slower. (Radians per second is Chapter 5's spinning speed: one full turn is 2π radians, a rim 2π radii long.)
Theo: Careful. In Chapter 2, cranking made the drone faster and bouncier. Let's hear what the damper has to say first.
How bouncy: the damping ratio
Now put the damper back. How much damping is "a lot"? That depends on the spring: a damper that tames a soft spring barely slows a stiff one. So we compare against one special amount, the critical damping : the smallest damping that stops the overshoot completely.
The damping ratio ζ (the Greek letter zeta) is our damping as a fraction of that. It's a pure number, with no units. ζ = 0 swings forever, ζ = 1 is exactly critical, and ζ = 0.5 has half the damping it would take to stop the overshoot.
Chapter 7: The Drone's Real Personality ↗
June: Wait. 0.16? That's exactly the drone's ζ from the first widget!
Theo: Same mass, same drag, same stiffness, so the same ζ. The spring and the drone really are twins.
The two dots on the map
Now back to the map of . Guessing , as in Chapters 4 and 6, turns the equation into . Divide by , then write the two coefficients with our knobs:
Theo: Hold on. Where did that come from? It looks made up.
June: Multiply it out: . It's the same number, just renamed, so our two knobs show up in the equation.
Solve it with the quadratic formula and out come the two values of :
The ± sign gives us two answers, one for each dot. The left-right position of a dot is σ (sigma): how fast that part of the motion shrinks. Its height is ω: how fast it spins. When damping is below 1, the dots share a left-right position but sit at opposite heights. At 1 they meet; above 1 both lie on the horizontal axis.
New words
- Step response
- How a system answers a sudden jump of its target, here from 0 to 1 m. It's the standard way to show a personality.
- Settling time (2%)
- How long until the response stays within 2% of the target for good.
Play with the two knobs. Watch the blue dots on the map: they're the two values of , and on top of the height it settles to, the motion is a mix of and . (At exactly ζ = 1 the two dots are one, and the second ingredient becomes .)
Chapter 7: The Drone's Real Personality ↗
New words
- Underdamped ()
- The two values are a mirror-image pair off the real axis, sitting on a circle of radius . The response overshoots and wiggles while it settles.
- Critically damped ()
- The pair meets on the real axis as one double dot, so the motion is . The fastest response that doesn't overshoot.
- Overdamped ()
- The pair splits along the real axis: one moves left, one creeps towards zero. No overshoot, but sluggish.
One more detail hides in the underdamped dots: their height is , a bit less than . Damping doesn't only shrink the wiggle, it slows it down a little too. This is the damped frequency , and the widget shows it.
Mika: So the spirals from Chapter 6 were the drone's personality all along. Spinning = wiggling, shrinking = settling!
Is more damping always better?
June: Easy. Wiggles are bad and damping kills wiggles. So I'll set to be safe. Safest drone ever.
Predict first! Same spring, same . We raise the damping from to . Does it reach the target faster or slower?
Chapter 7: The Drone's Real Personality ↗
June: My "safe" drone takes forever. It's like moving through honey.
Mika: Look at the map! One dot ran off to the left, super fast. But the other one is sitting really close to zero.
Theo: And with close to zero dies out very slowly. The fast one is gone in a blink. The slow one is in charge.
Each ingredient of the motion is called a mode. The motion is a mix of modes, and once the fast ones have faded, only the slowest is left. So for this step response, the slowest mode that actually appears sets the long wait.
Too little damping means wobbles; too much means creeping. In between there's a sweet spot. Pick ζ = 0.7 in the race: it overshoots by less than 5%, but it gets within 5% of the target much sooner than ζ = 1 does. Many designs aim for ζ between about 0.7 and 1, trading a small overshoot for speed. Other tasks may prefer a different balance.
Back to the drone
Now Chapter 2 finally makes sense. For our drone, the spring constant is the gain:
sits in the bottom of the damping formula. Turning up the gain makes the drone faster (bigger ), but less damped. With N/m: . Very bouncy, just as we saw. On the map, its two values sit far up and only a little left of the vertical axis. That's where our drone lives.
Theo: And we can't get more damping without turning way down, which brings back the droop. We need a way to add damping on purpose.
Drag the gain and watch the trade-off in one sentence:
Arrows have a length and an angle
Mika: Wait. The dots sit on a circle of radius , and ζ just slides them round it. So a dot is really two things: how far from 0, and which way.
Every arrow can be told the other way round: by its length and its angle. Pythagoras gives the length. For an arrow pointing right (), the angle is the one whose rise over run is . Its name is the arctangent, : the tangent's undo button.
Chapter 7: The Drone's Real Personality ↗
Chapter 5 found that multiplying arrows multiplies their lengths and adds their angles. Dividing has to undo that, so it divides the lengths and subtracts the angles.
Theo: So : length , and the angle is 45° plus 45°, so 90°? Hmm. Multiply that back by and it points at 135°, nowhere near 1.
June: Minus, then. long at −45°. Times at +45°, and it's length 1 at 0°: exactly 1. It checks.
Chapter 7: The Drone's Real Personality ↗
The faint dashed arrow is the mirror twin from Chapter 6 (mathematicians call it the conjugate): same length, opposite angle. Multiply an arrow by its twin and the angles cancel, leaving a plain positive number, the length squared. Chapter 9's table will need exactly this:
And the circle? A pole at has length . Measure its angle θ from the negative real axis and the leftward part is . So : the damping is the angle.
June: Try the second setting in the widget: 1 + iωτ. That's Chapter 3's coffee rule meeting a wiggle. Dividing by it shrinks and turns back, more and more as the wiggle speeds up, but never past a quarter turn. I bet the shower cares.
New words
- Length
- How long an arrow is: for . Multiplying arrows multiplies their lengths.
- Angle
- Which way an arrow points, from the positive real axis. for an arrow pointing right. Multiplying adds angles, dividing subtracts them.
- Mirror twin
- The arrow flipped across the real axis, (the conjugate). .
What we know now
What we figured out
- A P-controlled drone obeys exactly the same equation as a mass on a spring: the controller is a virtual spring.
- Two numbers capture its personality: (how fast) and (how bouncy).
- is the swing speed with no damper. compares the damping with the critical damping that just stops the overshoot.
- The motion is a mix of two terms. The two values sit on a circle of radius when underdamped, and split along the real axis when overdamped.
- An arrow has a length and an angle (). Multiplying multiplies lengths and adds angles; dividing divides and subtracts. .
- Damping also slows the wiggle a little: .
- More damping isn't always better: past the slow value creeps towards zero and everything slows down.
- For the drone, more means less damping. That's why it got wobblier.
Theo: "We guessed our way to these values. Add gravity, wind, packages and a smarter controller, and guessing gets ugly. Is there a machine that turns this calculus into plain algebra?"