## DT and furnace/thermostat models

"Jim Hines"
Junior Member
Posts: 14
Joined: Fri Mar 29, 2002 3:39 am

### DT and furnace/thermostat models

Ed Gallahers note on thermostats is a terrific example of how most modeling
difficulties are resolved when the real-world "policies" are understood. I
have noticed that its much easier to model after asking people how they
really make decisions, than it is after simply thinking about either how
they **ought** to make the decisions or how I **imagine** I might make the
decision. The same obviously applies to physical systems, such as
thermostats.

Jim Hines
jhines@mit.edu

Tom Fiddaman
Junior Member
Posts: 14
Joined: Fri Mar 29, 2002 3:39 am

### DT and furnace/thermostat models

>Should we use 0-off, 1=on to indicate an on-off switch in a thermostat?

Thats what I would do, because of the binary switch analogy.

>To what extent does this require incorporating DT into the equation?

You still need DT (TIME STEP in Vensim) on the RHS of an equation:
Switch State = INTEG( Switch Change Rate, Initial Switch State )
Switch Change Rate = (Indicated Switch State - Actual Switch State)/TIME STEP

you can seemingly get out of this with a special function, e.g.
Switch State = DELAY FIXED( Switch Change Rate, 0 )

Really this is just a trick, because infinite-order delays (like DELAY
FIXED or DELAY MATERIAL in Vensim) and other discrete functions implicitly
use DT on the RHS.

>Is this good SD practice?

Since good SD practice is to model things the way they work, I think the
answer is yes, subject to the earlier comments of Geoff Coyle, Jack Homer,
Nelson Repenning, Jim Hines, et al. The key questions to consider are
whether the underlying time constant of the switch is very fast with
respect to the rest of the model behavior and whether were modeling one
thermostat or a neighborhood full. Clearly the thermal interaction between
a house and its environment is continuous, so in this case a discrete event
simulation would be a poor alternative to a continuous model with some
discrete switching.

>In the normal residential heating system we dont want the thermostat to
>detect room temperatures to within 0.1 degrees, thus turning the furnace on

>and off minute by minute.
...
>Consider a traditional thermostat with a bi-metallic coil. Start with a
>cool room. The coil contracts, hits a contact, turns on the furnace, and
>the room begins to warm. With some delay, the coil begins to warm and
>expand, releasing the contact and turning off the furnace. The room begins
>to cool, starting the cycle again. ...

Its been a while since I had a bimetallic thermostat to fool with, but I
wonder if theres a second mechanism - in addition to the slow-changing
state of the coil - that creates a deliberate dead zone around the desired
temperature. I remember the coil having a pointer on it, which would meet a
contact to the right when warm (switching the furnace off) and to the left
when cool (switching it on), creating the same logic as in a digital
thermostat. Perhaps someone in an old classroom can check.

>Rather than model one stock (room temp) and one on-off switch, I would use
>two stocks. One illustrates room temp, the other illustrates the temp of
>the bi-metallic coil.
>
>The size of the coil, the amount of expansion per degree, etc. will
>contribute to the "lag" in the system, thus damping the response of the
>furnace to very small changes in room temp.
...
>We have thus converted a comfortable system with a +/- 1 degree "dead zone"
>into an uncomfortable system with a +/- 5 degree dead zone. More
>importantly, we have captured the true dynamic structure of the system if
>we model it in this way, rather than by using a mathematical on-off switch
>to simulate the thermostat switch.
>
>Question: Before continuing below, does the above analysis make sense?

The analysis is very sensible, however it seems you still need to compare
the thermostat temperature to the desired temperature, which will require a
logical switch, unless you want to get really complicated and model the
physics of the electrical and mechanical systems of the switch and furnace.
The only way out of IF-THEN logic seems to me to be a furnace that runs at
a variable rate, proportional to the gap between the desired and actual
temperature.

>High Tech thermostat:
...
>(It is possible that this probe was designed with a very small mass and
>therefore a very rapid time constant. If undamped this would lead to rapid
>on-off cycles. OR the mass of the probe might be designed to take this into
>account. I am ignorant about this design issue. Does anyone know the

It seems quite likely that it does have a small mass. There are probably
still delays in the measurement process because the house isnt really a
well-mixed, first-order box of air (or heat). It takes a while for warm air
to move around. Also, theres a delay between the firing of burners and the
startup of blowers or pumps - so the system has a fairly high order if you
get into detail.

...

>e.g. Algorithm says --> If the temp is rising, turn OFF at 71 degrees; if
>the temp is falling, turn ON at 69 degrees.

The algorithm probably actually reads "if the furnace is on, turn it off
above 71 degrees; if the furnace is off, turn it on below 69 degrees."
Theres no way in principle for the thermostat to directly measure the rate
of change of the temperature in the room; this would have to be estimated
by some kind of smoothing or data storage and trend estimation process,
which would be complicated and sensitive to noise. Its much easier for the
thermostat to work with the switch state, which it already knows. Also,
its a good bet that when the furnace is on, the temperature is rising, and
when its off its falling.

>These logic statements would create a dead band of +/- 1 degree around the
>desired temperature of 70 deg.
>
>Back to the philosophy and practice of SD modeling and simulation:In this
>case the "correct" model would explicitly -require- the use IF-THEN
>statements!

Right. The reason IF-THEN logic is frequently shunned in SD practice is
that it is often misused when a decision is heterogeneous. For example, an
IF-THEN statement would be a poor model of the behavior of a neighborhood
of thermostats, as not all of them would be set to the same temperature,
have the same tolerances, etc. If the congregation will now turn to
Industrial Dynamics 5.5,

"Even major executive decision represent a rather continuous process; they
are reached after a period of consideration; advance actions may be taken
in anticipation of the probable outcome; action is not taken immediately
after the decision; and the decision is interpreted and smoothed and
produces gradual change as it overcomes resistance and the inertia of other
persons in the organization."

(See the book for more good details on this).

A traditional alternative would be to create a table function, continuous
between 0 and 1, representing the distribution of on and off thermostats in
the neighborhood at each temperature. A more accurate method would be to
disaggregate the neighborhood, representing each individual thermostat,
with diversity in their target temperatures and physics, but this would be
overkill in most cases.

I think Im overkilling this topic as well, so all for now.

Tom

****************************************************
Thomas Fiddaman, Ph.D.
Ventana Systems http://www.vensim.com
8105 SE Nelson Road Tel (253) 851-0124
Olalla, WA 98359 Fax (253) 851-0125