MCT = PCT?

[From Bill Powers (970215.1911 PST)]

With reference to Hans Blom (970214 or something) --

Rick Marken and I decided to try to write a Pascal model of Hans' MCT system
to demonstrate the drift that would occur because of a small error in the
model. Imagine our surprise: it didn't happen. In fact, the system behaved
exactly as it should, the plant output x following changes in the reference
signal r. Maybe a little offset occurred because of the assumed
computational error, but nothing important. Egads!

Rick said, when he first looked at Hans' equations, "Why, this is just a
closed-loop system!" But I didn't see it right away. We talked it over for a
hour while my brain twisted slowly in the wind. And then I, too, saw it.

Here, in part, is how Hans derives his model:

By combining both formulas we get

r(k+1) = x(k) + a*dt*u(k)

and, solving for u, we have

u(k) = [r(k+1)-x(k)] / (a*dt)

Look at the argument in brackets: r(k+1)-x(k). Where did that x(k) come
from? The variable x(k) is the state of the output of the plant, the
controlled variable. This value is being used by the control system. So how
does the control system know the value of x? There's only one possible
answer: x is being SENSED by the control system.

The above equation subtracts the value of the (perceived) plant output from
the reference signal, and the output u is this difference times 1/(a*dt).
That is exactly the amount of output needed to correct the error in one jump
-- in other words, the maximum correction possible in a discrete control
model without generating artifacts in the form of rapid oscillations.

The lack of drift due to computational errors is thus explained: this is the
closed-loop PCT model!

Of course it is not a practical model for the real problem that was posed,
as I pointed out in my post of yesterday (or was it day before yesterday?
I'm writing this in a campground on the shores of the Salton Sea, so it's a
little hard to think about dates). No real control system can swing a
theodolite through a 120 degree angle instantaneously; to do so would call
for infinite output torque. The factor A in the above equation is too small
if it is equal to the factor A in the model of the plant. The magnitude of
1/(A*dt) must be reduced until the maximum motor torque is within the
capabilities of the motor. Then the theodolite will swing to its new
position as fast as practically possible.

In looking for a simple plant, I ended up with an unrealistic model. It
would have been better to use a cruise control, which controls the velocity
of a car by varying the throttle setting. In that case, x would represent
the car's speed, and u the throttle position. We can see clearly that there
is no cruise-control system that could accelerate the car from, say, 30
miles per hour to 60 miles per hour instantly. Even if the cruise control
system could operate the brakes to decelerate the car, it couldn't slow it
from 60 to 30 miles per hour instantly. If everyone will just substitute
this interpretation of the equations for the "theodolite" example, we can
avoid getting into side issues.

ยทยทยท

-----------------------
Now the big question comes to mind: has this use of x been present in ALL
the "MCT" models we've talked about? I'm not in a position to search through
past posts just now, but my memory says yes: in every case, the current
perceived value of x has entered into the computation of u. This is IN
ADDITION to its role in the Extended Kalman Filter for the adaptive part of
the model.

In the full adaptive MCT model, it is x' instead of x that is used in
calculating u. The Kalman Filter method assures that x' will follow x with
reasonable fidelity given the same u driving both, so the information in x'
is almost the same as that in x, except for noise, errors in simulating the
plant, and "unmodeled dynamics" (disturbances). The direct perception of x
is translated into a simulated perception of x, x'.

What I missed (despite its obviousness) was the fact that x' is used in
calculating u. None of my block diagrams of the MCT system included a
feedback path of this kind. Hans, not being accustomed to working with block
diagrams, didn't catch this omission, either. Basically, the MCT system uses
closed-loop feedback control _of the simulated plant_. I almost tumbled to
this fact a year or so ago, when I proposed that the calculation which
generates u could be re-written so its input is (r - x) or (r - x') -- an
error signal. Hans even agreed that this would be possible, but neither of
us went on to work out the details. If we had, the closed-loop nature of the
control system would have been apparent.

Here's my attempt to work out the general case. Suppose the simulation of
the plant is given as

x' = f(u).

We can convert this into differential form by saying

dx'/dt = x'(k+1) - x'[k] = d[f[u]]/dt.

Since we want x'[k+1] to equal r[k+1], we say, following Hans,

r[k+1] - x'(k) = d[f(u)]/dt, or

error signal = d[f(u)]/dt

The next step is to solve the equation for u, which will give us u as a
function of the error signal. Of course the right-hand side of my equation
would also have to be converted to differential form, and we would have to
be able to solve it for u. Also, we have to use t+dt instead of k+1, but we
can ignore that detail for now.

I emphasize that this will not give us a _practical_ control system, because
this solution results in correcting an error in a single instantaneous jump,
which is not possible in any physical system. If the magnitude of u is given
realistic limits, and if the internal simulation duplicates the physical
dynamics of the plant, however, it would be possible to arrive at SOME
calculation of u that would result in good control without violating
physics. And if the simulation of the plant was accurate, the plant, too,
would be controlled by u, in the sense that the real x would follow r just
as x' does -- as long as no unexpected disturbances occurred.
--------------------------
At long last, the MCT model is beginning to make sense in terms of the PCT
model. The basic control loop is exactly the same in both models, and the
problem of converting an error signal into an appropriate output is also
exactly the same.

There are two primary differences. One is that the MCT model actually
controls a simulated perception generated by a simulation of the plant
function, rather than the plant's actual output. The other is that any
unmodeled disturbances acting on the real plant can't be opposed by the MCT
control system because it can't oppose disturbances that aren't included in
the simulation.

The PCT model that we use in most cases doesn't have any provision for
adapting its characteristics to the environment. We put the right
computations into it. However, as I showed with the Artificial Cerebellum
demonstration, it is perfectly possible to make the PCT model adaptive. The
Kalman Filter approach is not the only one that works. The question of
adaptation in a PCT model is not urgently in need of an answer, since before
we can even start to work on that problem we have to know what aspects of
the environment organisms control, and we have only just begun that project.
The models we use represent the fully-adapted form of the real control
systems; for present purposes, it doesn't matter how that final form arose.

Under what circumstances would the MCT model work better than the PCT model?
Principally, when the perception of the environment is intermittent and
highly uncertain and/or the effects of actions on the environment are partly
unreliable. However, these are conditions where no control system is going
to be able to control very well; we're talking about the difference between
poor control and no control, not between good control and poor control. The
MCT system controls a simplified and noise-free simulation of the
environment, so its control of the simulation can be very good. However,
when there is a lot of random variation in the real environment, and when
the real environment is being perceived only intermittently, the environment
is going to deviate from the simulation, and nothing can be done about those
deviations. They are simply ignored.

Finally back home, so I'll just send this and add any loose ends in later posts.

Best to all,

Bill P.

[Martin Taylor 970218 15:30]

Bill Powers (970215.1911 PST)]

With reference to Hans Blom (970214 or something) --

Rick Marken and I decided to try to write a Pascal model of Hans' MCT system
to demonstrate the drift that would occur because of a small error in the
model. Imagine our surprise: it didn't happen. In fact, the system behaved
exactly as it should, the plant output x following changes in the reference
signal r. Maybe a little offset occurred because of the assumed
computational error, but nothing important. Egads!

Rick said, when he first looked at Hans' equations, "Why, this is just a
closed-loop system!" But I didn't see it right away. We talked it over for a
hour while my brain twisted slowly in the wind. And then I, too, saw it.

It's wonderful what a refreshing holiday will do, or is it a face-to-face
conversation as opposed to e-mail? Anyway, congratulations.

Now the big question comes to mind: has this use of x been present in ALL
the "MCT" models we've talked about? I'm not in a position to search through
past posts just now, but my memory says yes: in every case, the current
perceived value of x has entered into the computation of u. This is IN
ADDITION to its role in the Extended Kalman Filter for the adaptive part of
the model.

In the full adaptive MCT model, it is x' instead of x that is used in
calculating u. The Kalman Filter method assures that x' will follow x with
reasonable fidelity given the same u driving both, so the information in x'
is almost the same as that in x, except for noise, errors in simulating the
plant, and "unmodeled dynamics" (disturbances). The direct perception of x
is translated into a simulated perception of x, x'.

What I missed (despite its obviousness) was the fact that x' is used in
calculating u. None of my block diagrams of the MCT system included a
feedback path of this kind. Hans, not being accustomed to working with block
diagrams, didn't catch this omission, either.

And I didn't check closely enough to see that you hadn't, perhaps because
there was a lot of discussion about how to use both x and x' together to
form a "virtual perception" that is more real the more current the sensory
data. I had assumed that the issue was whether the simulated or the current
perception figured in the feedback loop, and I had thought that the
most difficult issue was how to combine those two. That's an issue on
which I have been having some as yet ill-formed thoughts recently.
You may be subjected to those thoughts if they get a bit better formed.

Basically, the MCT system uses
closed-loop feedback control _of the simulated plant_.

At long last, the MCT model is beginning to make sense in terms of the PCT
model.

Hurrah!

The basic control loop is exactly the same in both models, and the
problem of converting an error signal into an appropriate output is also
exactly the same.

There are two primary differences. One is that the MCT model actually
controls a simulated perception generated by a simulation of the plant
function, rather than the plant's actual output. The other is that any
unmodeled disturbances acting on the real plant can't be opposed by the MCT
control system because it can't oppose disturbances that aren't included in
the simulation.

So far as I understand it, yes but...

In the Artificial Cerebellum, if the disturbance follows some predictable
pattern, is it not true that the output comes to conform to that pattern
as if it were an aspect of the environmental feedback function? I seem
to remember that it does. Likewise with the MCT model as I understand it.
The _modelled_ part of the disturbance folds in with the _modelled part_
of the (possibly changing) environmental feedback function. So _some_ of
the disturbance will be opposed provided that the disturbance waveform is
not random (within the control bandwidth).

The PCT model that we use in most cases doesn't have any provision for
adapting its characteristics to the environment.

A one-loop model may not, but a hierarchy does, surely? And even in a one-loop
model, Hebbian reorganization can occur.

We put the right
computations into it. However, as I showed with the Artificial Cerebellum
demonstration, it is perfectly possible to make the PCT model adaptive. The
Kalman Filter approach is not the only one that works.

One can adapt output and/or adapt input, I guess, much as you showed that
you could reorganize to solve the multiple equations by adapting the perceptual
functions or the output functions, but not (on the same time-scale) both
together. I'd hazard a guess that you could do the same in a single
adaptive loop, putting together AC and KF adaptation, but not on the same
time-scale. But we come back to the question of how the simulated and
current percetions might be combined.

Under what circumstances would the MCT model work better than the PCT model?
Principally, when the perception of the environment is intermittent

Going out on a limb here, I'd hazard another guess that they won't be much
different, if you allow for a hierarchic PCT system...

and
highly uncertain and/or the effects of actions on the environment are partly
unreliable.

Sawing at the limb...same comment.

Finally back home, so I'll just send this and add any loose ends in later posts.

Sounds like a good trip. Brave, too, to hazard the mountains in the winter.

Martin

[From Rick Marken (970218.2100)]

Bill Powers (970215.1911 PST) --

Under what circumstances would the MCT model work better than
the PCT model? Principally, when the perception of the
environment is intermittent and highly uncertain and/or the
effects of actions on the environment are partly unreliable.

This assumes, I think, that we are comparing a PCT model that
controls a single perceptual variable to an MCT model that does the
same. I have a feeling that a hierarchal PCT model could do as well
or better than a hierarchical MCT model under the circumstances you
mention above. Also, we still have no data that suggests the need
for an MCT model of the behavior of a living system. How long do we have
to keep trying to find fault with a model that already has the biggest
fault possible: it doesn't account for _any_ data that
cannot be handled by the far simpler PCT model?

Bill Powers (970218.1910 MST) --

Rick, thanks to you and Linda for putting up with us for a couple
of days. We always enjoy our visits with you.

The only problem with your visit (from our perspective) was that it was
way too short. We had a wonderful time with you guys, as usual.
I (possibly we) will see you in Durango!

Best

Rick

[From Bill Powers (970219.0825 MST)

Martin Taylor 970218 15:30--

unmodeled disturbances acting on the real plant can't be opposed by the
MCT control system because it can't oppose disturbances that aren't
included in the simulation.

So far as I understand it, yes but...

In the Artificial Cerebellum, if the disturbance follows some predictable
pattern, is it not true that the output comes to conform to that pattern
as if it were an aspect of the environmental feedback function?

Yes, that's true, but only to a degree. If you use a constant sine-wave
disturbance, the f(tau) function will begin to develop a sine-wave form --
but being finite, it can't carry it very far. The disturbance has to be
exactly repetitive. And of course when the disturbance stops, the f(tau)
function is then wrong for the situation, and has to be re-adapted before
good control is restored.

Under what circumstances would the MCT model work better than the PCT
model? Principally, when the perception of the environment is
intermittent ...

Going out on a limb here, I'd hazard another guess that they won't be much
different, if you allow for a hierarchic PCT system...

I think your hunch about a hierarchical system being able to handle many
"adaptive" situations without real-time adaptation is correct -- especially
if you allow higher systems to vary parameters of lower systems as well as
reference signals. This is left to posterity as an exercise...

Best,

Bill P.