temperature control; electronics analogy

[From Bill Powers (960125.1430 MST)]

Remi Cote 012596.0945 --

     I tried to simulate the system suggested by Bill and here is the
     result. I think I made a mistake. I need detective here:

     1) 0.1*(20-0) - cooling of 0.3 = 1.7 of heat output
     2) 3.23 = 0.1*(20-1.7)=1.83 + 1.7 = 3.53 - cooling 0.3 = 3.23
     3) 4.61 ...

     it is an asymptote heading to 17... not 20 degree.
     I think I made a mistake but don't know what.

You did it perfectly. Reason it out. When the temperature reaches 17
degrees, the heat output is 0.1(20 - 17) = 0.3 units. This is exactly
enough to balance out the disturbance of -0.3 units, leaving no heat
output to add to or subtract from the previous heat output. So the
temperature remains the same from then on.

The first lesson to learn is that control systems are not perfect. It is
true that 17 degrees is not 20 degrees, but it is 85% of 20 degrees.
This shows that there is a modest amount of control. If you increase and
decrease the heat loss, you will see that there is an effect on
temperature, but the temperature stays near 20 degrees -- not equal to
20 degrees, but close to it. If you vary the reference temperature T'
with the cooling at 0.3, you will see that the final value of T remains
at 85% of T'. So varying the reference temperature does make the actual
temperature follow it reasonably well, and the cooling is resisted.

We can easily improve the performance of this control system.

The number 0.1 is called the output gain or output amplification of the
control system. It determines how much heat output there will be for any
given difference between T' and T. For now, just try increasing the
output gain. Raise it to 0.2, 0.3, and so on, and see what happens to
the asymptotic temperature.

After you have experimented with this but before we go on, it would be
best to make your simulation a little more physically correct. A heat
output is measured in calories. When you put a certain number of
calories into an object, its temperature rises by a specific amount. If
the object is a one milliliter volume of water, its temperature will
rise by 1 degree centigrade for each 1 calorie of heat input (4.18
joules). Let's assume that we're dealing with just this situation so we
don't have to worry about physical scaling factors for the present.

The heat output produced in one round of calculations (minus the loss in
the same iteration) is

H = G*(T' - T) - 0.3 calories
  Where G = output gain

Heat output is measured in units of energy, not temperature.

When we put this many calories into one milliliter of water, the
temperature will rise from the former temperature this way:

T(new) = T(old) + H degrees centigrade

You were adding the new heat output to the old heat output, but you got
the right answer because you then set the temperature directly equal to
the heat output. With this more correct approach, we first calculate the
heat output, and then add it to the old temperature to get the new
temperature on each iteration. If you try it this way with the same
numbers you used, you will see that the results are the same.

When you use these steps in doing your calculation, each step describes
a physically realistic process: the generation of heat energy, and then
the use of this energy to raise the temperature of an object.

As you continue increasing the output gain G from 0.1, you will
eventually run into a problem. After you have seen it, tell me about it
and I will tell you what we do next to prevent the problem.

···

-----------------------------------------------------------------------
Bruce Abbott (960125.1035 EST) --

There's nothing you can learn from your electronic analogy that you
can't learn directly from the equations. If using this analogy puts you
on more familiar grounds, fine -- but let's not start naming even more
entities by analogy with other situations. What we need to do is to get
rid of superfluous entities.
-----------------------------------------------------------------------
Best to all,

Bill P.