Black hole

[From Bruce Abbott (971205.2005 EST)]

Bill Powers (971205.1235 MST) --

The demonstration that I posted a few day ago on the Behavioral Illusion
seems to have falled into a black hole. Has anyone beside Rick had a look
at it?

I received and ran it the day it was posted; it's quite impressive. I don't
think the source code was distributed though, and have been meaning to ask a
question: why is there hysteresis in the disturbance graph-line which is
produced when you move the mouse back and forth?

Regards,

Bruce

[From Bill Powers (971205.1900 MST)]

Bruce Abbott (971205.2005 EST)--

The demonstration that I posted a few day ago on the Behavioral Illusion
seems to have falled into a black hole. Has anyone beside Rick had a look
at it?

I received and ran it the day it was posted; it's quite impressive. I don't
think the source code was distributed though, and have been meaning to ask a
question: why is there hysteresis in the disturbance graph-line which is
produced when you move the mouse back and forth?

I did attach the source code as well as the excutable program, but it may
have come through as part of the message -- let me look... Yes, I have
checked the box that says "Put text attachments in body of message." So
look farther down in the message -- no, don't bother, I'll just append it
to this message in the text.

The hysterisis is caused by the fact that the environmental feedback
function is a cubic curve with a reversal of slope near the origin. As the
output rises from zero, the effect on the controlled variable first goes
negative, then turns around and goes positive. Near zero output there is
positive feedback. The opposite relationships occur for negative-going
outputs.

The result is that the control system, when it reaches a positive-feedback
point, starts producing a very large rate of change of output until it
reaches the next value where there is negative feedback again. You see this
on the plot as a sudden jump of output (the slower you change the
disturbance, the more abrupt the jump is). There is a brief peak of error
during this positive-feedback transition, as you can see from the red plot,
but everywhere else the error remains close to zero. Without the control,
by the way, the error would be the same size as the disturbance (the
horizontal and vertical scales are the same). This means that the
perceptual signal was maintained quite close to the (zero) reference signal
at all times, except for the instants of transition.

The control system itself in all cases is simply

p := v;
e := r - p;
o := o + 0.3*e

where v is the controlled variable plotted vertically on the screen.

The five environmental feedback functions were given in the original post.

I'm sure it would be possible to get even more dramatic effects given a
little time to think up nefarious functions -- these were the first five
off the top of my head.

The point of the exercise, as you know, is to show that when the
disturbance is considered the IV and the output the DV, the measured
dependence of the DV on the IV has a form that reflects the inverse of the
environmental feedback function, and does not represent the actual
input-output function of the organism. In order to see this effect, one
must know what the controlled variable is, and how it is affected both by
the disturbance and by the output of the system. In normal studies where
the underlying paridigm is lineal cause and effect, the controlled variable
would not be picked up (it wouldn't be looked for, and anyway it doesn't
vary much). So there would be no way to discover that the apparent
relationship of IV to DV is illusory.

Incidentally, if you use the cubic environmental feedback function in a
real experiment, you will see human controllers behaving just as the system
in this demo does. In fact I think all five EFFs would give the same
results with a human being or the computer program.

Source code below.

Best,

Bill P.

program illusion;

uses dos,crt,graph, grutils,mouse;

var d,v,p,e,r,o: real;
    fb: char;
    first: boolean;

procedure controlsys;
begin
p := v;
e := r - p;
o := o + 0.3*e;
case fb of
  '1': v := d + o;
  '2': if o > 0 then v := d + 0.3*o else v := d + 3*o;
  '3': v := d + 1e-4*o*o*o - 0.0001* o;
  '4': v := d + 5e-5*o*o*o - o;
  '5': v := d + 40.0*sin(o/20.0) + 1.0*o;
end;
end;

procedure axes;
begin
line(0,240,639,240);
line(320,0,320,479);
end;

procedure legends;
begin
setcolor(white);
outtextxy(0,0,'FEEDBACK FUNCTION ' + fb);
setcolor(lightred);
outtextxy(300,0,'ERROR');
setcolor(lightgreen);
outtextxy(300,15,'OUTPUT');
setcolor(white);
outtextxy(0,220,'DISTURBANCE <--->');
outtextxy(0,420,'MOVE MOUSE SIDEWAYS TO ADJUST DISTURBANCE');
outtextxy(0,435,'TYPE 1 TO 5 TO SELECT FEEDBACK FUNCTION');
outtextxy(0,450,'TYPE "q" to quit');
end;

procedure showline;
const oldd: integer = 0;
begin
line(320 + oldd,220,320+oldd,235);
oldd := round(d);
end;

begin
initgraphics;
clearviewport;
setwritemode(XORPut);
fb := '1';
legends;
axes;
d := 0.0;
first := true;
repeat
  readmouse;
  d := d + 0.03*(mousex div 3 - d);
  if keypressed then
   begin
    fb := readkey;
    clearviewport;
    axes;
    legends;
    showline;
    d := 0.1; {to avoid stray lines}
   end;

   if first then first := false
   else showline;
   controlsys;
   putpixel(320 + round(d), 240 - round(o),lightgreen);
   putpixel(320 + round(d), 240 - round(e),lightred);
   showline;
   delay(1);
until fb = 'q';
end.

[From Bruce Abbott (971205.0125 EST)]

Bruce Abbott (971205.2005 EST)

Bill Powers (971205.1235 MST)

The demonstration that I posted a few day ago on the Behavioral Illusion
seems to have falled into a black hole. Has anyone beside Rick had a look
at it?

I received and ran it the day it was posted; it's quite impressive. I don't
think the source code was distributed though, and have been meaning to ask a
question: why is there hysteresis in the disturbance graph-line which is
produced when you move the mouse back and forth?

Bill Powers (971205.1900 MST) --

The hysterisis is caused by the fact that the environmental feedback
function is a cubic curve with a reversal of slope near the origin. As the
output rises from zero, the effect on the controlled variable first goes
negative, then turns around and goes positive. Near zero output there is
positive feedback. The opposite relationships occur for negative-going
outputs.

Thanks, Bill. However, on rechecking the running program I see that the
question I had came about as a result of not paying close enough attention
to the graph labels and colors. What I thought was the disturbance graph
was actually a plot of the error, which of course will tend to lag the
disturbance in the control system depicted, yielding overshoot or undershoot
depending on the disturbance direction, thus the apparent hysteresis.

And thanks for the resend of the source code.

Regards,

Bruce

[From Bill Powers (971206.0432 MST)]

Bruce Abbott (971205.0125 EST)--

Thanks, Bill. However, on rechecking the running program I see that the
question I had came about as a result of not paying close enough attention
to the graph labels and colors. What I thought was the disturbance graph
was actually a plot of the error, which of course will tend to lag the
disturbance in the control system depicted, yielding overshoot or undershoot
depending on the disturbance direction, thus the apparent hysteresis.

I suppose you've figured out that the disturbance is represented by a short
vertical white line that moves left and right with the mouse. The green
trace is the output, the red trace the error signal (so you can see how
well the system is controlling).

If you examine cases 4 and 5 a little more closely you will see that
dynamics doesn't account for the hysteresis (as it does in case 3).
Changing the disturbance faster and slower will change the transition
traces for these two EFFs, but no matter how slowly you alter the
disturbance, the hysteresis will still be there, and large (and in case 5,
multiple).

Can you predict what EFF would be needed to make the output vary as the
square root or the square of the disturbance (over negative disturbances)?
A log or exponential response? A response with a dead zone? A response that
appears to saturate for large values of disturbance even more abruptly than
in case 3? A response that goes positive (or negative) for both positive
and negative disturbances (this control system couldn't do that, but a
human being could)?

You might also find it illuminating to remove the feedback path and see
what the effect of the disturbance on the output is. I probably should have
included that as one case. Be sure to start out with the disturbance at zero!
Also, it would be instructive to look at the apparent input-output
relationships for different nonzero values of reference signal.

Anyone else who feels like trying to make the above predictions is welcome
to try. I suppose that some day such questions will be part of checking for
understanding in PCT 101, or possibly 103.

Best,

Bill P.