Math Detours · Grade 6 · Connections · 20

Why is the shower too hot, then too cold?

You turn the shower hotter, but the water takes a few seconds to reach you. So you turn it more, and then it is far too hot. A delay plus a strong reaction makes things swing.

Name ____________________Date ____________

Tonight's idea

When you turn the shower knob, nothing changes at first: the new water is still in the pipe. You are in a feedback loop. You feel the water, compare it with what you want, and act. That changes what you feel later.

You: compare with 40 Knob Pipe (delay) turn water what you feel, a few steps late

With a delay in the loop, you react to old news. React strongly to old news and you overshoot: past the target, then back past it the other way.

Tonight's simplified model: time moves in steps. The knob number is the temperature, in degrees Celsius, of the water entering the pipe (real knobs are not marked like that). You want 40. At each step you turn the knob by a fixed fraction of (40 minus what you feel).

Watch one: no delay, then a delay of one step

The knob has been at 24 for a while. You react by one half of the difference. With no delay you feel 24, the difference is \(40 - 24 = 16\), and you turn up by 8, to 32. Next you turn up by 4. The knob goes 24, 32, 36, 38, 39, 39.5. The gap halves at every step and you never go past 40.

With a delay of one step you feel what the knob was one step ago. At step 0 that is still 24.

Step012345678
Knob243240444442403939
You feel242432404444424039
Turn by\(+8\)\(+8\)\(+4\)\(0\)\(-2\)\(-2\)\(-1\)\(0\)\(+0.5\)

Each "You feel" is the knob one column to the left. Each new knob is the old knob plus "Turn by". At step 2 the knob is exactly right, but you still feel 32, so you turn up 4 more. The knob reaches 44, an overshoot of 4 degrees, then dips to 39. Later swings get smaller and the knob settles at 40.

Your turn

Every time, the knob starts at 24 and you want 40. Make a table like the one above for steps 0 to 8.

  1. Delay of two steps, react by one half. Now you feel the knob from two steps ago, so at steps 0 and 1 you feel 24. What is the highest knob setting, and how big is the overshoot?
  2. Keep the delay of two steps, but react more gently: turn by one quarter of the difference. How big is the overshoot now?
  3. Go back to a delay of one step, but react by the whole difference. Describe what the knob does. Will it ever settle at 40?
  4. Delay of two steps, react by the whole difference. What are the highest and lowest knob settings up to step 8? What does that tell you about the model?
  5. In your own words: why does a delay together with a strong reaction make the temperature swing? Give two different ways to calm the swings.

Stretch: the patient showerer

Delay of two steps, react by one half. This time you only turn the knob at steps 0, 3, 6 and 9, and keep your hand off it in between. (a) Find the knob for steps 0 to 10. Any overshoot? (b) Compare with the no-delay numbers in the worked example. What does patience cost? (c) Name another feedback loop with a delay. What is measured, what is the action, where is the delay?

Answers

  1. Knob: 24, 32, 40, 48, 52, 52, 48, 42, 36. You feel: 24, 24, 24, 32, 40, 48, 52, 52, 48. For three steps you feel 24 and turn up by 8 each time, so you sail past 40 before any news arrives. The highest setting is 52, an overshoot of 12 degrees. With a delay of one step it was only 4. Then the knob swings back below 40: it is 36 at step 8 and falls to 31 at step 10. The swings do shrink, slowly.
  2. Knob: 24, 28, 32, 36, 39, 41, 42, 42.25, 42. You feel: 24, 24, 24, 28, 32, 36, 39, 41, 42. The highest setting is 42.25, an overshoot of only 2.25 degrees. Same delay, gentler reaction, much smaller swing. The price is speed: you are still at 36 at step 3.
  3. Knob: 24, 40, 56, 56, 40, 24, 24, 40, 56. You feel: 24, 24, 40, 56, 56, 40, 24, 24, 40. At steps 5 and 6 the knob is 24 and you feel 24, exactly as at the start, so everything repeats. The knob goes round 24, 40, 56, 56, 40, 24 for ever and never settles. The swings neither shrink nor grow.
  4. Knob: 24, 40, 56, 72, 72, 56, 24, \(-8\), \(-24\). You feel: 24, 24, 24, 40, 56, 72, 72, 56, 24. Highest 72, lowest \(-24\). The first swing went 32 above 40 and the next goes 64 below, so the swings are growing. A shower cannot be colder than the cold tap or hotter than the hot tank, so the model has stopped describing a real shower. It still tells you something true: this way of reacting never settles at 40.
  5. Because of the delay, what you feel is old news. While you wait, a strong reaction keeps adding big turns, and all of them arrive later, after the knob is already right. So you go past the target, and then you do the same in the other direction. To calm it, react less (exercise 2) or wait for the news to arrive before turning again (the stretch). Whether the swings shrink, repeat or grow depends on both the delay and the strength of the reaction.

Stretch. (a) Knob: 24, 32, 32, 32, 36, 36, 36, 38, 38, 38, 39. At step 3 you feel the knob from step 1, which already includes your last turn, so you are never fooled. No overshoot. (b) The knob takes the same values as with no delay, 32, 36, 38, 39, but each one takes three steps where it used to take one. Patience costs time. (c) Many answers. A room heater with a thermostat: the thermostat measures the air, the action is heater on or off, and the delay is that the heater stays hot for a while after it is switched off, so the room can overshoot. A shop ordering stock: it counts the shelf, orders more, and the delivery comes days later, so it can end up with far too much. Rules like tonight's, where the next change depends on the past and not only on now, are called delay equations.

← PreviousNext: Why does a spoon get pulled into a tap stream? →