[From Bill Powers (2001.06.09.1903MDT)]
Bjoern Simonsen(2001.06.06,23:40 EST)--
I have made a feedback loop at level 1 with an environmental disturbance and
also an unaffected environmental disturbance. I think it works well.
Then I also have placed an input function for level 2, for level 3, for
level 4, for level 5 and an upper reference for level 5.
Running the system the input function at level 1 produce a "p" for the
comparator at level 1.
The same "p" goes to the input function for level 2, 3, 4 and 5.
I have a constant upper reference value at 300 going to the comparator at
level 5.
If I understand you, you have just one control system at each level. This
iosnot going to show you how the hierarchy works. I think that you need to
explore many control systems at each level, as in Rick Marken's spreadsheet
demo where there are three levels with six systems at each level. Each
system at a given level constructs its perception by weighting copies of
the perceptual signals from _all six_ lower systems. Different systems at
the same level use different sets of weightings.
The best way to start would be to use a simpler simulation. I suggest
you try to set up a two-level system with two systems at each level.
At the first level, set up two integrating control systems: S1a and S1b.
S1a controls its perception p1a = X, the other controls p1b = Y, where X
and Y are environmental variables.
The error signal of the X control system is e1a = r1a - p1a. The output of
the X control system is o1a = o1a + k1a*e1a*dt. That is the integrator. In
the simulator you would probably just make k1a*e1a the input to an
integrating block, with o1a being its output. The size of dt is the
step-time of the simulator and is automatically taken care of.
We can bring in an environmental disturbance of X, d1a, so that X = d1a +
o1a. The output gain factor k1a should be fairly small -- try 1.0, with a
simulation step time of 0.01 sec.
The Y control system works exactly the same way, with a Y disturbance of d1b.
At the second level, set up two more "a" and "b" control systems, this time
with output proportional to error. S2a perceives p2a = p1a + p2a (which is
X+Y), and system S2b perceives p2b = p1a - p2a, or X-Y. The "a" error
signal e2a is equal to r2a - p2a, and the "b" error signal e2b = r2b - e2b.
The output signals are now just proportional to the error signals: o2a =
k2a*e2a, and o2b = k2b*e2b. Use small values of k2a and k2b at first,
increasing them after you see that the whole system is stable.
The reference signal for the X control system at the first level is the sum
of the two second-level output signals: r1a = o2a + o2b. Why? If you reason
out what is needed by each higher-order system if its perception is lower
than its reference signal (which we haven't talked about yet), you will see
that in either case, r1a must be increased to increase X. Increasing X will
cause both p2a and p2b to increase. So r1a = o2a + o2b.
Using the same reasoning, we can see that if p2b is less than r2b, the
output signal o2b must _subtract_ from the reference signal for the Y
controller, because Y _subtracts_ from the perception p2a. Thus r1b = o1a -
o1b.
Now trace around each second-level loop starting with a small positive
change in the error signal, go through either first-level reference signal,
to the first-level output, back to the first-level perceptual signal, and
finally to the second-level perceptual signal again. You will see that the
feedback is always negative: an increase in error signal at the second
level leads to an increase of the associated perceptual signal, and because
the perceptual signal _subtracts_ from the reference signal, the effect is
to decrease the error signal -- opposite to the change we started with.
That means the feedback is negative around each possible loop. I suggest
diagraming this setup to make it easier to understand.
When you get this system set up, you will find that you can change either
of the second-level reference signals, and the corresponding perceptual
signal will follow it. At the same time, and quite independently, you can
change the other reference signal, and the other perceptual signal will
follow _it_. Also, you can apply variable disturbances to X and Y in the
environment, and you will see that their effects are resisted at _both_
levels. Both second-level systems act by altering _both_ environmental
variables, yet the sum of X and Y can be controlled completely
independently of the difference between X and Y.
In this demonstration you can see all the basic features of a hierarchy of
control systems.
Let me know if you have trouble setting this up. To test the model, you
will need to use some signal generators that will set disturbances and
second-level reference signals to known values at known times during a
run.I'm sure your simulating program has them.
Best,
Bill P.