From: POWERS_W%FLC@VAXF.COLORADO.EDU (William T. Powers)
Newsgroups: bit.listserv.csg-l
Subject: Jeff's Loose control system
Date: 5 Nov 92 22:45:03 GMT
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
X-Envelope-to: CSG-L@vmd.cso.uiuc.edu
X-VMS-To: @CSG
MIME-version: 1.0
Content-transfer-encoding: 7BIT


 [From Bill Powers (921105.1430)]

 Jeff Hunter (921104) --

 I've got your program to run, and think I understand it now. By the
 way, Turbo C doesn't like long integers as indexes to arrays -- I
 fixed that, plus the difference in random() functions.

 Your control systems are contained entirely in the lines

 		if (cont_tot > 0) cont_tot -= 2;
 		if (cont_tot < 0) cont_tot += 2;

 		bias_tot++;
 		if (bias_tot > 0) bias_tot -= 2;
 		if (bias_tot < 0) bias_tot += 2;

 The perceptual function and comparator are in "if (cont_tot > 0)",
 for that implies perception of the value of cont_tot and comparison
 with the reference level of 0. The error signal is either 1 or 0, so
 this is a binary comparator. The output function either adds 2 to the
 environmental variable cont_tot (or bias_tot) or subtracts 2. The
 output function, too, is binary, with a gain of 4 and an offset of 2.

 The environmental part of the loop is a simple integrator. If you add
 2 on each iteration the environmental variable *_tot increases by 2
 and holds its value until the next iteration. The environmental
 variable and the perceptual variable are the same, here. The output
 quantity has the values 2 or -2, so the system as a whole can never
 come to a steady state (with all variables unchanging).

 The steady-state loop gain of these control systems is nominally
 infinite. The reason is the integration in the environmental part of
 the loop. Loop gain, as you know, is found by multiplying together
 all the steady-state multiplying factors in the functions encountered
 in one trip all the way around the loop. The input function gain is
 1, because the perceptual signal is the same as the value of the
 environmental variable. The gain of the comparator is -1, and of the
 output function is 4. The gain of the environmental feedback link is,
 in the steady state, infinite, because of the integration. The loop
 gain is therefore 1 * -1 * 4 * infinity, or infinity. So this system
 would bring its controlled variable exactly to the reference value of
 0, if the output were continuous instead of bang-bang. The size of
 the output quantity determines how fast the error is corrected. In
 your design, it also determines how much oscillation there is at
 asymptote.

 The control systems reduce the (squared) error that would be seen
 without control (free_cont) from 51220 to either 23 (unbiased) or 104
 (biased), by your numbers. These are sums of squared errors, so the
 RMS error over 10,000 iterations is 5, 0.0023, and 0.0104. (That
 value of 5 seems like too great an RMS error for equal distribution
 between positive and negative disturbances. Better check that). It is
 impossible to estimate the effective loop gain except for the biased
 case, where a constant of 1 was added on each iteration. Over 10,000
 iterations, this should have added 10,000 to the value of bias_tot
 (and a lot more to the squared error); instead, bias_tot changed by
 only 104, or about 1% of the expected value. This yields an effective
 loop gain of about 100. The effective loop gain is not infinite
 because of the binary comparison and output functions.

 This is therefore not a loose control system but one tight enough to
 exceed by a factor of 10 my definition of a "good" control system
 (whether biased or not), with the defect that it must continually
 oscillate around its final average state. It is the oscillation that
 prevents the effective loop gain from being infinite and the final
 error from being zero.

 If you intended to portray a loose (low-loop-gain) control system,
 you didn't succeed. By choosing an environmental variable that would
 accumulate the effects of outputs and hold them indefinitely, you
 made the loop gain infinite. I define loose control as the result of
 a negative loop gain considerably smaller than 10. Perhaps you have
 been confusing the output sensitivity with the loop gain. In many
 real control systems, it is true that most of the loop gain is
 determined by the output function. But in this case, the environment
 contributes most of it.
 -------------------------------------------------------------------
 Best,


 Bill P.
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU