Addendum on model stability

[From Bill Powers (980907.0935 MDT)]

In Bellinger's model atbd.mdl, modified with a GAIN parameter, it is
possible to make the system stable for any delay, just by adjusting GAIN.
But we can make that adjustment automatic, by changing the equation for
Flow to

0.36787/DELAY*( DESIRED VALUE - DELAY3(Current Value,DELAY))

The number 0.36787 is 1/e, where e is the base of natural logarithms. I
believe that the compensation is now exact for all delays.

However, if you make this change in atbd.mdl as it stands, the model will
be _apparently_ unstable for all delays less than about 0.7. The reason is
that the Time Bounds are set for too coarse a value of TIME STEP. Click on
Model, then Time Bounds in the top menu bar. Change TIME STEP to 0.01, and
uncheck the box called "Save results every time step". Then change SAVE PER
to 0.25, to get the same size data files as before. Now you can reduce the
delay to as little as 0.025 without encountering apparent instabilities. At
a delay of 0.02 (twice the time step) the system becomes drastically
unstable, and the run halts on a floating point error. This is not the real
behavior of the system; it's caused by the inability of a digital machine
to behave like a continuous system. You can reduce TIME STEP even more, and
make the model work for even smaller delays, at the expense of longer
run-times.

For those still unfamiliar with Vensim, when you click on Set, the
adjustable parameters of the model appear highlighted. You can click on
them and type in new values if you like, before starting the run with the
Run button. The next time, the parameter will come up with its original
value, so you can set it again or leave it alone.

I've attached atbd2.mdl, modified to be stable for all Delays down to 0.025
and up to any length desired.

Best,

Bill P.

atbd21.mdl (59 Bytes)