X-Envelope-to: CSG-L@vmd.cso.uiuc.edu
X-VMS-To: @CSG
MIME-version: 1.0
Content-transfer-encoding: 8BIT
Newsgroups: bit.listserv.csg-l
Date:         Tue, 8 Sep 1992 11:04:51 -0600
From:         "William T. Powers" <POWERS_W%FLC@VAXF.COLORADO.EDU>
Subject:      Stelli models'

[From Bill Powers (920908.1030)]

Hans Blom (920908) --

I understand now.

Here is some more grist for your mill. This program really isn't a
model of e. coli -- it's a demonstration in which YOU play the part of
e. coli. This gives lots of insights into "control by random output."

When you try it, you'll think you're using lots of sophisticated
perceptions, like which way the dot is moving in space, how close to
the target it's projected direction will come, and so on. Most of
these perceptions are superfluous.

You can prove this by changing the display so that the spot moves only
in X, and X represents the radial distance of the spot from the target
(modulo a screen wrap). You can make the spot approach the target just
as well even though you've lost all 2-D information and have only a
one-dimensional perception. This is E. coli's situation.

You can try putting in some slow random disturbances of direction. You
will get to the target anyway. This is a control system!

program ecoldemo;
uses dos,crt,graph;


var x,y,x0,y0,dx,dy,theta: real;
    ch: char;
    i,j,hsize,vsize,vcenter,hcenter: integer;

{ This is lifted from your program }

procedure grinit; {initialize graphics stuff}
var
  driver, mode: integer;
begin
  detectgraph (driver, mode);
  initgraph (driver, mode, '');
  if graphresult <> grok then
    begin writeln ('cannot find graphics driver'); halt end;
end;


begin
clrscr; gotoxy(1,12);
writeln(
'Experiment in "directed randomness." Use space bar to change
direction');
writeln(
'of moving dot, and steer it into the circle. "r" to reset, "q" to
quit.');
write('                     Press space to start');
ch := readkey;
grinit;
i := 20; j := 0;
hsize := getmaxx; vsize := getmaxy;
hcenter := hsize div 2; vcenter := vsize div 2;
x0 := hsize - 75; y0 := vcenter;
theta := 0.75; randomize;
repeat
 clearviewport;
 outtextxy(0,vsize - 20,
  'TAP SPACE TO CHANGE DIRECTION;  RESET=R   QUIT=Q');
 ch := chr(0); circle(hsize - 75,vcenter,10);
 i := random(vsize); j := random(hsize div 4);
 x := 0.0; y := 0.0;
 setcolor(white);
repeat
 theta := 2 * pi * random;
 while (not keypressed) and (abs(x - x0) + abs(y - y0) > 10) do
  begin
   x := x + 1.0 * cos(theta); y := y + 0.7 * sin(theta);
   if x > hsize then x := 0 else if x < 0 then x := hsize;
   if y > vsize then y := 0 else if y < 0 then y := vsize;
   i := round(x); j := round(y);
   putpixel(i,j,white);
   delay(30);   { CHANGE THIS DELAY TO MAKE SPOT MOVE AT GOOD SPEED }
  end;
 ch := chr(ord(readkey) and $df);
 until (ch = 'Q') or (ch = 'R');
until ch = 'Q';
closegraph;
end.
----------------------------------------------------------------------
-
Eric Harnden (920908) --

Bully for you, Eric. Another modeler, by golly. This is really welcome
news. Can Stella setups be transmitted as Ascii code? It would be
great if you could send models to Gary Cziko, to help him learn Stella
and work out problems with you. Do you know if there's a PC version of
Stella, and what it costs? Rick Marken, would Aerospace pop for Stella
for your Mac? I'll bet somebody there already has it.

>3) i put the following plot into stella the other night:
>
>      |-------------------level<-------valve----------->source/sink
>      |--->perceived level               /\
>                      |                  |
>                      \/                 |
>reference----------->error--------->rate of change
>level                                    /\
>                                         |
>                                     disturbance
>
>where the only material flow is the increase/decrease of the level,
and >all other connections are information flows. the first question
is: >does this at all capture the basic pct structure (wihout the
>hierarchy)?

It sure does. As shown, it's a one-way control system: by setting the
reference signal ("level") you can make the level rise to the
reference level, but the system can't make the level fall if the
reference level decreases. Put a leak in the tank and it will be able
to go both ways. Or is your system set up so the valve can cause
losses as well as gains of level? I guess that's what "source/sink"
means, now that I think of it.

>it seems to me that the entity is controlling the environment (acting
>upon the rate of change) in order to obtain (is controlling for) a
>certain perception. yes? no?

Yes! I would not use the word "control" for the effect on the rate of
change, however, because that implies that there is some preferred
rate of change that is brought about by the system. I would just say
that the system VARIES the rate of change of valve position (my
interpretation). I know that your usage of "control" is common in
servo circles, but I'd rather do without it. It's too confusing when
you say that the control system controls by controlling.

To show that valve position or its rate of change isn't controlled,
put a variable leak in the tank, so the amount escaping varies
randomly (or as a sine wave or whatever's handy -- but make it slow).
Now you'll find that the valve position varies in more or less the
same random way, while the controlled variable -- the perceived level
-- remains near the reference level. So the system clearly isn't
trying to make the valve assume any particular position or rate of
change. I think it's less confusing if we reserve the word "control"
for the whole process of making the perceptual signal match the
reference signal.

Your disturbance of the rate of change is perfectly OK. Disturbances
can happen anywhere in the environment, and in more than one place at
the same time. That won't bother the control system. Try the variable
leak while leaving the disturbance you already have in place. It will
still work -- but you won't get the impression that the rate of change
is a controlled variable!

Can you plot the behavior of variables against time? I seem to
remember that Stella could do this. If so, try superimposing plots of
the disturbance and the rate of change of valve position.

If everyone out there had Stella it would be SO EASY to illustrate
critical points about PCT! Static diagrams just don't capture the
relationships.
----------------------------------------------------------------------
--
Best to all,


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