# control goes down the drain

[Hans Blom, 950516]

(Bill Powers (950515.1615 MDT))

Here is a short program for a control system that will keep its con-
trolled variable (qi) matching an arbitrary reference level (r) in
the presence of any arbitrary disturbance pattern (d). Of course the
disturbance pattern should have some upper frequency limit, but

^^^^^^^^^^^^^^^^^^^^^^^^^^

since this is only a simulation none of the limits matter much (the
disturbance amplitude limit would be the largest real variable on

p := qi e := r - p o := o + (1000*e - o)/1001 qi:= d + o

Iterate this program over and over while applying variable disturb-
ances and recording the output and qi (or p). You will find that the
output is almost the mirror image of the disturbance relative to the
reference level, and qi remains very near the reference level, in
comparison with its value when there is no output action (o).

A constant reference signal will show the relationships the most
easily; however, the input quantity qi will track any (reasonable)

^^^^^^^^^^

varying reference signal.

See how you place limits, however fuzzy, on the world in which this
controller must live in order for it to be able to control (well)? I
assert that this must necessarily be the case for any controller.

I will demonstrate some worlds in which this controller cannot
control at all or looses control temporarily. I take a constant
reference level (r = 10), as you suggest. Here are some variable
disturbances where control is (partially) lost. The variable
"iteration" counts the number of iterations through the loop.

1) d = 10 * round (sin (0.3 * iteration))

p = qi is approximately 10 at most times (OK), but occasionally gets
the value 0 or 20 (not OK); thus loss of control at these time
instants

2) d = (iteration - 10) mod 10

p = qi is approximately 11 at all times (not really OK), and occa-
sionally 1 (not OK); thus bad control always, loss of control
sometimes

3) d = iteration (start of very low frequency triangle waveform)

p = qi steadily rises from 10 to 15 to 20 etc. Never OK.

4) d = iteration^2 (start of quadratic periodical waveform)

this is the clincher; try it out!

You may object that these are not REASONABLE varying reference sig-
nals. If so, please define "reasonable" in a non-circular way, i.e.
NOT in terms of variations that the controller can handle.

My conclusion: Every controller can function only in a limited ("rea-
sonable") environment. A certain relationship must exist between the
controller and its world for the controller to be able to control
(well).

Greetings,

Hans