TactivergeLite

Lite / Discovering How the World Works / Week 25

Correct in proportion

When you park a bike next to a friend, you slow down as you get close. What rule is your brain using?

About 30 min · 3 goals · Reviewed by the founders' mentors · Full interactive version

Why should I care?

Instead of 'full on or off', a proportional controller pushes harder when it's far away and gently when it's close. It's smoother and faster than bang-bang, and it's the first part of the PID controllers inside drones, robot arms and lifts.

Predict

A robot at 0 cm wants to reach 60 cm. Each step it moves half the remaining gap. Where is it after 2 steps?

  1. 60 cm
  2. 45 cm
  3. 30 cm
Guess first, then reveal

45 cm. Step 1: gap 60, move 30, now at 30. Step 2: gap 30, move 15, now at 45. Each step gets smaller as the gap shrinks, so it glides in smoothly. Try it in the diagram.

Discover

Step through with k = 0.5. Then try k = 1, k = 1.5, k = 2 and k = 2.2. Describe what each one does in a few words.

What the interactive shows (text version)

The gap-closer can be replaced by this table, starting at 0 cm with target 60 cm. k = 0.5: 30, 45, 52.5, 56.3 cm (glides in). k = 1: 60 (straight there). k = 1.5: 90, 45, 67.5, 56.3 (overshoots, settles). k = 2: 120, 0, 120, 0 (bounces for ever). k = 2.2: 132, −26.4, 163.7 (grows: unstable).

You can also open the interactive on the full site when you have a faster connection.

Understand

Push in proportion to the gap

A proportional controller makes its correction a fixed fraction of the gap:

correction = k × gap

Far away, big gap, big push. Close by, small gap, gentle push. The number k is called the gain.

Too little, just right, too much

With k below 1, each step closes part of the gap: a smooth glide in. k = 1 jumps straight there (in a perfect world). k between 1 and 2 overshoots and wobbles, then settles. k = 2 bounces for ever. k above 2 wobbles bigger and bigger: unstable.

Settling a little short

A proportional heater only heats when the room is too cold. Near the target the gap is small, so the heat is small, and it can only balance the heat leaking out if the room stays a little below target. Higher gain shrinks this offset; later levels add a trick (integral action) to remove it.

Explain it another way

Intuitive

Pouring a drink: you pour fast when the glass is empty and slow right down near the top. That's proportional control.

Technical

u = Kp · e. In the simple step model, the new gap is (1 − k) × the old gap. If |1 − k| < 1 (0 < k < 2) the gap shrinks to zero; otherwise it doesn't. Real systems add delay and inertia, which make overshoot appear at much lower gains.

Mathematical

Gap after n steps = (1 − k)ⁿ × starting gap. With a 60 cm gap and k = 0.5: 30, 15, 7.5 cm. With k = 1.5: −30, +15, −7.5 (overshoot, flipping sides). With k = 2.2: −72, +86.4 (growing).

Applied

A lift slows smoothly as it approaches a floor because its controller pushes in proportion to the distance left. Engineers tune the gain so passengers don't feel a jolt or bounce at the end.

Worked example 1

A robot is at 20 cm, target 100 cm, k = 0.25. Where is it after one step? After two?

Step 1: gap = 80, move 0.25 × 80 = 20, now at 40 cm. Step 2: gap = 60, move 15, now at 55 cm. Each move is a quarter of what's left.

Common mix-ups

Practice

Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.

cm

cm

Practice 3. Which value of k makes the robot overshoot the target and then settle?
Practice 4. A proportional heater targets 18 °C but the room settles at 16.6 °C. Why?

cm

Apply it

Open the thermostat diagram, switch to Proportional and try Kp from 10% to 300% per °C. Record where the room settles for three values. Then explain in two sentences why it never quite reaches 18 °C, and what happens to the offset as Kp rises.

Reflect

In which everyday task do you correct a lot when you're far off and a little when you're close?

Write your answer on paper or in your own notes. Lite never stores what you write.

← On/off control: the bang-bang thermostatSteering without a steering wheel →