[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.