[From Bill Powers (950516.0530 MDT)]

Hans Blom (950516) --

RE: simple control model

I must say, you've done your best to make the model fail. I had specified

"reasonable" disturbances, and you came up with the most extreme ones you

could find, both as to magnitude and frequency.

In 1) d = 10 * round (sin (0.3 * iteration)), you present the model with a

series of square waves of +/- 10 units amplitude. The model does not do very

well with steps having a rise time of 20 units in 1 iteration, with the

reference signal set to only 10 units, although 1 iteration after each step

it has corrected the error completely and maintains the correction until the

next step.

In 2) d = (iteration - 10) mod 10, you present a series of sawtooth waves

with a rise time of 10 iterations (changing in steps of 1 unit per iteration)

and a fall time of 10 units in 1 iteration. The model keeps the error down to

1 unit during the rise, and limits the 10-unit error during the fall to a

single iteration.

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

present the control system with a disturbance that rises from 0 to 640 units

in 1-unit steps over 640 iterations. The error on the last iteration is 1.6

units, and on the first iteration is 1 unit. The 1 unit error is due to the

fact that the disturbance is increasing by 1 unit steps in each iteration.

The error is caused to rise by 0.6 additional units by the disturbance of 640

units (64 times the size of the reference signal). Without the opposing

output, the final error would have been 630 units, compared with the actual

1.6 units.

In 4) d = iteration^2 (start of quadratic periodical waveform), the error

increases in steps that start with 1 unit per iteration and end with 640

units per iteration. The final error is 1600 units, where without the

opposing output it would be 409,590 units.

Actually I think my control system did quite well, considering the extreme

behavior of the disturbances. In the "clincher" example (4) it was able to

keep the error to 0.0039 of what it would have been without the opposing

output. When the disturbance was rising in steps 1 unit per iteration, the

error was kept to 10% of the reference signal magnitude.

## ···

-----------------------------------

Most of the "large" errors you see are an artifact of setting the reference

signal to 10 units, which is only 10 times the minimum disturbance step. If

you set the reference signal to 1000 units, you will see quite a different

story.

In order to speak about "reasonable" disturbances, we have to discuss scaling

and how physical time is modeled. Before we get into that, however, I would

like to give you a chance to see the effect of simply changing the reference

signal to a larger value.

The appended program applies each of your disturbances to the control system

with its reference signal set to 1000 units instead of 10. Everything else is

the same, except that I have taken the liberty of dividing the fourth

disturbances by 160 to keep from overflowing the integers needed for the

plot. The maximum disturbance is still 4 times the size of the reference

signal in terms of effect on p and qi. I used both p and qi just to make a

formal parallel with our usual model.

After each plot, hit any key for the next one.

------------------------------------------------------------------------

program simpsys;

{

A simple integrating control system

}

uses dos,crt,graph,grutils;

var

MaxX, MaxY, Xcenter, Ycenter: integer;

p,qi,r,e,o,d: real;

i,j: integer;

ch: char;

procedure InitScreen;

begin

ClrScr;

InitGraphics;

MaxX := GetMaxX; MaxY := GetMaxY;

Xcenter := (MaxX+1) div 2;

Ycenter := (MaxY+1) div 2;

OutTextXY(20, MaxY-50, 'Press ESC to Quit...');

end;

procedure ctsys;

begin

p := qi;

e := r - p;

o := o + (1000.0 * e - o)/1001.0;

qi := o + d;

end;