an MCT theodolite controller

[Hans Blom, 970226]

(Bill Powers (970225.0530 MST))

To Bill and any other interested programmers. Right now I have no
time to write a program, but I'll provide the few formulas that need
to be implemented and a description of how they are derived. Bill,
being the programming buff that you are, I expect you to be able to
get the program right within half an hour, given yours as the basis:
only a few things need to be changed. Others may need more time ;-).

The following derivation of the controller would be pretty familiar
by now, if you have followed the discussions so far. The differential
equation of the theodolite example (itself an approximation, or what
MCT calls a model!) is

  J * d2x(t)/dt2 = u(t) + d(t)

We first derive the equivalent difference equation form. We have,
after all, to implement computer code. We therefore introduce the
(temporary!) variables acceleration a(t) and velocity v(t)

  a(t) = d2x(t)/dt2 and v(t) = dx(t)/dt

The equation then becomes

  J * a(t) = u(t) + d(t)

Now we approximate a(t) as

  a(t) = dv(t)/dt = [v(t) - v(t-dt)]/dt

so we get

  J * [v(t) - v(t-dt)]/dt = u(t) + d(t)

Next, we approximate v(t) as

  v(t) = dx(t)/dt = [x(t) - x(t-dt)]/dt

and we get

  J * [[x(t)-x(t-dt)]/dt - [x(t-dt)-x(t-2dt)]/dt]/dt = u(t) + d(t)

Defining K as J/dt^2 lets us get rid of all the multiplier-dt's:

  K * [x(t) - 2x(t-dt) + x(t-2dt)] = u(t) + d(t)

In the term between square brackets one can recognize the discrete-
time approximation of a second derivative. It is, however, centered
around t-dt, so we can do slightly better if we center around t and
use the formula

  K * [x(t+dt) - 2x(t) + x(t-dt)] = u(t) + d(t)

which we will therefore use (this is not essential). Thus far, we've
only translated a differential equation into a difference equation.
Nothing new, just a preliminary step.

Rewriting the last expression, we obtain the "prediction equation"

  x(t+dt) = 2x(t) - x(t-dt) + u(t)/K + d(t)/K

At time instant t, we know everything but the lefthand side (which is
only a prediction so far, not yet an observation) and the disturbance
d(t). Because d(t) is unknown, we cannot really predict yet; we need
an assumption about the value of d(t). Let's make a naive start and
see what happens if we assume d(t) to be zero always. That would be
good enough only if there were no significant disturbances. We then
get the prediction

  xpre(t+dt) = 2x(t) - x(t-dt) + u(t)/K

where xpre(t) is the predicted value of x(t). Specifying the control
goal

  xpre(t+dt) = r(t+dt)

we substitute and get

  r(t+dt) = 2x(t) - x(t-dt) + u(t)/K

and, solving for u(t), we get

  u(t) = K * [r(t+dt) - 2x(t) + x(t-dt)]

Let's plug this in into the prediction equation and see what we get:

  x(t+dt) = r(t+dt) + d(t)/K

That is, there is good control only if d(t)/K is small with respect
to r(t). In the case that Bill specified, this is far from true, I
guess.

What to do? In order to be able to compute a prediction, we need some
expression/model for d(t). We now drop the assumption that d(t)=0 for
all t and take the simplest model possible (except for the assumption
that d(t)=0), a zero order hold, which assumes that d(t)=constant and
can be described as

  d(t) = d(t-dt)

Now d(t) is not known either, of course, but we can estimate it. That
is done as follows. Assuming some estimate d(t-dt) -- whose initial
value we take to be zero -- and using the zero order hold equation
and thus the previous value of d, we get the prediction

  xpre(t+dt) = 2x(t) - x(t-dt) + u(t)/K + d(t-dt)/K

This prediction will be incorrect, because at time t+dt we will
actually observe

  x(t+dt) = 2x(t) - x(t-dt) + u(t)/K + d(t)/K

But by taking the "error correction" difference we obtain

  xpre(t+dt) - x(t+dt) = d(t)/K - d(t-dt)/K

from which we can, once x(t+dt) has been observed, compute an
estimate d(t) as

  d(t) = d(t-dt) + K * [xpre(t+dt) - x(t+dt)]

and it will be this value that we will use in the following iteration
as d(t-dt). At this point we _can_ compute an action u(t) from

  xpre(t+dt) = 2x(t) - x(t-dt) + u(t)/K + d(t-dt)/K

because all terms on the righthand side are now known (or available
as estimates), if we combine this expression with the control goal

  xpre (t+dt) = r(t+dt)

Thus the control law will be

  u(t) = K * [r(t+dt) - 2x(t) + x(t-dt)] - d(t-dt)

How good will this zero-order-hold based controller be? Well, plug
this equation into the model. We get

  x(t+dt) - r(t+dt) = [d(t) - d(t-dt)]/K

That is, control will be perfect as long as d(t) = d(t-dt) -- which
Bill was so nice to provide most of the time with his square wave
disturbance! -- and it will only be bad at those time instants (and
only there!) where the disturbance makes large jumps.

I did not take limitations in u(t) into account. I assume that they
do not cause difficulties and that their effect will be intuitively
obvious: the specified reference cannot be reached in a single step.

I expect that the only complaint left will be that this controller is
_too_ good to mimick a human ;-). Maybe. Maybe not. That requires a
different test.

If y'all don't get around to rewriting the above into a program, I
will, but that may take some days.

Greetings,

Hans

[From Bill Powers (970225.0725 MST)]

Hans Blom, 970226 --

There's no rush; I would prefer that you provide the program for the MCT
model, because there are some things I don't understand yet about it, and
while I'm studying them you could probably finish the program.

I don't yet understand your treatment of the disturbance, although I suppose
I will eventually. The disturbance, you will recall, is defined as a square
wave torque applied to the theodolite, having a duration of 2 seconds and
(now) an amplitude of 100 newton-meters, but it starts at a time 1.5 +
6*random seconds after the start of the run, where the "random" function
returns a value between 0 and 1. I don't see just yet how your MCT model is
going to anticipate when this disturbance is going to occur.

Also, in respect of your substitution of K for J/dt^2, doesn't this lead to
an infinite value of K as dt goes to zero? I'm using a dt of 0.002 sec, so
dt^2 becomes 4e-6, a very large number. The behavior of the simulation
shouldn't depend on the size of dt, as long as dt is small enough. It should
become perfect as dt approaches zero.

You may want to re-think the way you're handling dt, because at the moment
it doesn't seem that your simulation will become independent of the size of
dt as dt shrinks toward zero. In my PCT model, if I change dt from 0.002 to
0.0001 sec, the model takes longer to run, but its behavior in real time is
the same (the plotting of points simply has a finer grain).

Best,

Bill P.

[From Bill Powers (970226.0830 MST)]

Hans Blom, 970226--

I think there's a problem with your prediction equation, which you obtained from

K*[x(t) - 2*x(t-dt) + x(t - 2*dt)] = u(t) + d(t).

You converted this (to obtain a prediction equation) as follows:

K * [x(t+dt) - 2x(t) + x(t-dt)] = u(t) + d(t)

If you arbitrarily advance all the time-indices by dt, as in the first two
equations above, then you must advance them by dt on both sides of the
equation. Your equation should be

K * [x(t+dt) - 2x(t) + x(t-dt)] = u(t+dt) + d(t+dt)

As you see, this means you must also be using the _next_ values of u and d.
So you don't get a prediction out of this.

The problem with this development so far is that you do not know d(t+dt).
You know the amplitude and duration of d, but not the time at which it will
change value. As I set up the problem, there is no way to predict whether dt
will be 100 or 0 at the start of the next iteration. The PCT simulation
doesn't need to know this, but apparently the MCT simulation does.

Is this right?

Best,

Bill P.

···

At time instant t, we know everything but the lefthand side (which is
only a prediction so far, not yet an observation) and the disturbance
d(t). Because d(t) is unknown, we cannot really predict yet; we need
an assumption about the value of d(t). Let's make a naive start and
see what happens if we assume d(t) to be zero always. That would be
good enough only if there were no significant disturbances. We then
get the prediction

xpre(t+dt) = 2x(t) - x(t-dt) + u(t)/K

where xpre(t) is the predicted value of x(t). Specifying the control
goal

xpre(t+dt) = r(t+dt)

we substitute and get

r(t+dt) = 2x(t) - x(t-dt) + u(t)/K

and, solving for u(t), we get

u(t) = K * [r(t+dt) - 2x(t) + x(t-dt)]

Let's plug this in into the prediction equation and see what we get:

x(t+dt) = r(t+dt) + d(t)/K

That is, there is good control only if d(t)/K is small with respect
to r(t). In the case that Bill specified, this is far from true, I
guess.

What to do? In order to be able to compute a prediction, we need some
expression/model for d(t). We now drop the assumption that d(t)=0 for
all t and take the simplest model possible (except for the assumption
that d(t)=0), a zero order hold, which assumes that d(t)=constant and
can be described as

d(t) = d(t-dt)

Now d(t) is not known either, of course, but we can estimate it. That
is done as follows. Assuming some estimate d(t-dt) -- whose initial
value we take to be zero -- and using the zero order hold equation
and thus the previous value of d, we get the prediction

xpre(t+dt) = 2x(t) - x(t-dt) + u(t)/K + d(t-dt)/K

This prediction will be incorrect, because at time t+dt we will
actually observe

x(t+dt) = 2x(t) - x(t-dt) + u(t)/K + d(t)/K

But by taking the "error correction" difference we obtain

xpre(t+dt) - x(t+dt) = d(t)/K - d(t-dt)/K

from which we can, once x(t+dt) has been observed, compute an
estimate d(t) as

d(t) = d(t-dt) + K * [xpre(t+dt) - x(t+dt)]

and it will be this value that we will use in the following iteration
as d(t-dt). At this point we _can_ compute an action u(t) from

xpre(t+dt) = 2x(t) - x(t-dt) + u(t)/K + d(t-dt)/K

because all terms on the righthand side are now known (or available
as estimates), if we combine this expression with the control goal

xpre (t+dt) = r(t+dt)

Thus the control law will be

u(t) = K * [r(t+dt) - 2x(t) + x(t-dt)] - d(t-dt)

How good will this zero-order-hold based controller be? Well, plug
this equation into the model. We get

x(t+dt) - r(t+dt) = [d(t) - d(t-dt)]/K

That is, control will be perfect as long as d(t) = d(t-dt) -- which
Bill was so nice to provide most of the time with his square wave
disturbance! -- and it will only be bad at those time instants (and
only there!) where the disturbance makes large jumps.

I did not take limitations in u(t) into account. I assume that they
do not cause difficulties and that their effect will be intuitively
obvious: the specified reference cannot be reached in a single step.

I expect that the only complaint left will be that this controller is
_too_ good to mimick a human ;-). Maybe. Maybe not. That requires a
different test.

If y'all don't get around to rewriting the above into a program, I
will, but that may take some days.

Greetings,

Hans

[hans Blom, 970227]

(Bill Powers (970225.0725 MST))

I don't yet understand your treatment of the disturbance, although I
suppose I will eventually. The disturbance, you will recall, is
defined as a square wave torque applied to the theodolite, having a
duration of 2 seconds and (now) an amplitude of 100 newton-meters,
but it starts at a time 1.5 + 6*random seconds after the start of
the run, where the "random" function returns a value between 0 and
1. I don't see just yet how your MCT model is going to anticipate
when this disturbance is going to occur.

It doesn't. It can't. No controller could. The disturbance comes at a
_random_ time, i.e. a time that cannot be predicted or anticipated.

What the primitive "disturbance estimator" part of the controller
_does_ anticipate (expect) is that the disturbance changes slowly
from sample time to sample time, as expressed in the formula

  d(t+dt) = d(t)

With the disturbance that you specified, this is true for every t
except two: when the disturbance starts and when it ends. Only at
these two points in time will the controller's incorrect assumptions
cause incorrect control behavior. But these time instants are soon
over, so that correct behavior will ensue immediately again.

Also, in respect of your substitution of K for J/dt^2, doesn't this
lead to an infinite value of K as dt goes to zero? I'm using a dt of
0.002 sec, so dt^2 becomes 4e-6, a very large number. The behavior
of the simulation shouldn't depend on the size of dt, as long as dt
is small enough. It should become perfect as dt approaches zero.

I agree with you that the behavior of the simulation shouldn't depend
on the size of dt, as long as dt is small enough. I hope I did my
math right (can you find errors?) and that numerical instability
doesn't become a problem. I kept the dt's explicit in the formulas at
your recommendation (I normally don't, and choose a fixed sampling
interval) so that they can be changed easily. I haven't analyzed what
the best range of values of dt would be, but I assume that the value
is not critical at all.

You may want to re-think the way you're handling dt, because at the
moment it doesn't seem that your simulation will become independent
of the size of dt as dt shrinks toward zero.

It _is_ independent of the size of dt, in the same way your
controller is.

In my PCT model, if I change dt from 0.002 to 0.0001 sec, the model
takes longer to run, but its behavior in real time is the same (the
plotting of points simply has a finer grain).

This would be the same in the MCT controller.

Greetings,

Hans

[Hans Blom, 970227b]

(Bill Powers (970226.0830 MST))

I think there's a problem with your prediction equation ... If you
arbitrarily advance all the time-indices by dt, as in the first two
equations above, then you must advance them by dt on both sides of
the equation.

No. Let me show you why I did this. I approximated the acceleration a
as

  a(t) = dv(t)/dt = [v(t)-v(t-dt)]/dt

In the righthand side you see that the dv is taken as the difference
between two velocities, v(t) and v(t-dt). At only these times are
values available, due to the discrete time intervals. But what
actually corresponds best with [v(t)-v(t-dt)]/dt is a(t-0.5dt). So
rather than having a(t) we have a(t-0.5dt). With the velocity this is
done as well: another 0.5dt phase shift, making a full 1.0dt phase
shift in total. This is due to the approximations, and this is what I
corrected for. If you ask a control engineering student how to
compute a second derivative in a sampled system at time t, (s)he
ought to be able to tell you that you will need three data points to
do so, and that these ought to be as symmetrical as possible around
time instant t.

Think about it. When driving your car, one quick glance in the rear
view mirror will tell you that there is a car behind you. You will
need _two_ quick glances (or one longer one) to estimate its speed.
And you will need _three_ quick glances (or one very long one) to
estimate its acceleration. And, if the acceleration changes, the
acceleration estimate that you will have obtained corresponds best
with the accelaration as it occurred at the time of the second of the
three glances.

Greetings,

Hans

[From Bill Powers (970227.0655 MST)]

Hans Blom, 970227 -

I don't yet understand your treatment of the disturbance, although I
suppose I will eventually. The disturbance, you will recall, is
defined as a square wave torque applied to the theodolite, having a
duration of 2 seconds and (now) an amplitude of 100 newton-meters,
but it starts at a time 1.5 + 6*random seconds after the start of
the run, where the "random" function returns a value between 0 and
1. I don't see just yet how your MCT model is going to anticipate
when this disturbance is going to occur.

It doesn't. It can't. No controller could. The disturbance comes at a
_random_ time, i.e. a time that cannot be predicted or anticipated.

OK. I'm glad that we're together on that.

What the primitive "disturbance estimator" part of the controller
_does_ anticipate (expect) is that the disturbance changes slowly
from sample time to sample time, as expressed in the formula

d(t+dt) = d(t)

But wouldn't the control system have to be sensing d in order to make this
prediction? The equation I gave you described the physical situation,
outside the controller. All the controller can sense is x, the angular
position of the theodolite. If it's going to predict d (someone passing by
and bumping into the barrel of the theodolite), then it must contain some
calculation for deducing the current magnitude of d(t) -- otherwise, how can
it predict d(t+dt)? I did not give the PCT control system the ability to
sense the magnitude of d(t). Are you proposing that we add such a sensor to
the model? If so, I get to use it, too.

In your Kalman Filter model, I thought your control system DID contain a
calculation that deduced the value of d and extrapolated it forward by one
step. Did I misunderstand the program? Were you using the _actual_ value of
d in that program? I didn't think you were, but I could be wrong.

With the disturbance that you specified, this is true for every t
except two: when the disturbance starts and when it ends. Only at
these two points in time will the controller's incorrect assumptions
cause incorrect control behavior. But these time instants are soon
over, so that correct behavior will ensue immediately again.

This would be true if your program contained a means of sensing or deducing
the value of d(t). But if either is the case, then the machinery for
accomplishing this end should be explicitly represented in your model. If
you're assuming that d(t) is being sensed, your model would be using
information that mine is denied. I did not propose a sensor for d(t).

You may want to re-think the way you're handling dt, because at the
moment it doesn't seem that your simulation will become independent
of the size of dt as dt shrinks toward zero.

It _is_ independent of the size of dt, in the same way your
controller is.

OK, I'll take your word for it.

In my PCT model, if I change dt from 0.002 to 0.0001 sec, the model
takes longer to run, but its behavior in real time is the same (the
plotting of points simply has a finer grain).

This would be the same in the MCT controller.

Fine. I await your program when you have time to produce it. Perhaps, to
test this point about dt, you could use the same ability to adjust dt that I
use in the revised version of "theodPCT." If it will save you time, feel
free to use any parts of my code that you can use.

Best,

Bill P.

[From Bill Powers (970227.0902 MST)]

Hans Blom, 970227b --

I tried the formula for computing x(t+dt) in my program, and while it works,
the behavior is strongly dependent on dt. I suspected it might be, because
of the dt^2. Offhand, however I don't see why. My way of doing it uses two
steps.

v = v + (u+d)*dt/J, and
x := x + v*dt.

As you can see, dt enters twice in these two steps, giving an overall effect
of dt^2. The only effect of changing dt is to change the resoution of the plot.

But when I substitute the other equation as a program step,

x := (u+d)*dt^2/J + 2*x - xlast {where xlast is x(t-dt)},

the shape of the plot changes radically with changes in dt. So evidently I'm
doing something wrong. Can you spot it?

Best,

Bill P.

P.S. I discovered that I left J out of the program, which is equivalent to
setting J = 1 newton-meter^2. Entering J where it belongs and initializing
it to 1.0 gave the identical plot. Actually that's a more realistic value
than 100 n-m^2 for a transit-type theodolite, so let's just leave it that
way. A torque of 0.098 kilogram-meter (1 newton-meter) would accelerate the
theodolite at 1 radian per second per second, so that's a pretty hefty
theodolite tube. At j = 100 we'd be talking about an 5-inch gun mount.

I know these numbers don't affect the mathematical derivation, but they help
me see mistakes when the results are far from physically realistic.

WTP

From Bill Powers (970227.0725 MST)]

Hans Blom, 970227b --

I think there's a problem with your prediction equation ... If you
arbitrarily advance all the time-indices by dt, as in the first two
equations above, then you must advance them by dt on both sides of
the equation.

No. Let me show you why I did this. I approximated the acceleration a
as

a(t) = dv(t)/dt = [v(t)-v(t-dt)]/dt

In the righthand side you see that the dv is taken as the difference
between two velocities, v(t) and v(t-dt). At only these times are
values available, due to the discrete time intervals. But what
actually corresponds best with [v(t)-v(t-dt)]/dt is a(t-0.5dt). So
rather than having a(t) we have a(t-0.5dt). With the velocity this is
done as well: another 0.5dt phase shift, making a full 1.0dt phase
shift in total. This is due to the approximations, and this is what I
corrected for. If you ask a control engineering student how to
compute a second derivative in a sampled system at time t, (s)he
ought to be able to tell you that you will need three data points to
do so, and that these ought to be as symmetrical as possible around
time instant t.

Nice clear explanation. What you're saying is that given three points for
x(t) (that is, x(t), x(t-dt) and x(d-2*dt)), the v(t) you compute in this
way is actually v(t-0.5*dt), and the value of a is really a(t-dt). So from
observing x up to the present time, you can deduce what the acceleration was
one dt in the past. So the correct form of the expression for a(t-dt) would be

[x(t) - 2*x(t-dt) + x(t - 2*dt)]/dt^2

This means that the aceleration represented by this equation represents the
forces that were acting at t-dt, so we can write

J*[x(t) - 2*x(t-dt) + x(t - 2*dt)]/dt^2 = u(t-dt) + d(t-dt).

Now if we add dt to the indices on both sides of the equation, we get

J*[x(t+dt) - 2*x(t) + x(t-dt)]/dt^2 = u(t) + d(t)

Do I have it right, now?

I could probably use this improved way of computing x from a in my model, to
get a more accurate picture of the behavior of the theodolite when torque is
applied to it. Since I can make dt small enough so that making it still
smaller doesn't change the result, my Euler "integrations" are accurate
enough. For faster computation, however, your method is clearly a more
accurate way of doing the integrations -- I could get the same accuracy with
a larger dt.

For the current values u(t) and d(t), the next value of theodolite position
will be, if my algebra is correct,

x(t+dt) = {[u(t) + d(t)]*dt^2/J + 2*x(t) - x(t-dt)

This should be equivalent to your expression with K substituted for J/dt^2.
I think I'll try it just to make sure it works.

Best,

Bill P.

[Hans Blom, 970303]

(Bill Powers (970227.0655 MST))

What the primitive "disturbance estimator" part of the controller
_does_ anticipate (expect) is that the disturbance changes slowly
from sample time to sample time, as expressed in the formula

d(t+dt) = d(t)

But wouldn't the control system have to be sensing d in order to
make this prediction?

You forget that our example-MCT-controller has a perfect model of the
environment function. Thus, it perfectly predicts which perception
will be due to its action. When the actual observation is different
from this prediction, the difference must be due to an unanticipated
disturbance. Thus, the disturbance can be reconstructed/modeled as
well. Lacking a model, a PCT controller cannot do this.

The equation I gave you described the physical situation, outside
the controller.

Yes, but the controller _knows_ the physical situation -- it has a
(perfect) model of it. That was the assumption that we started with.

All the controller can sense is x, the angular position of the
theodolite.

Which is the sum of (1) the perceptual result of the action, and (2)
the disturbance. Knowing the sum, i.e. the actual observation and
(1), due to the model, (2) can be computed as d(t) = x(t)-xpre(t).

If it's going to predict d (someone passing by and bumping into the
barrel of the theodolite), then it must contain some calculation for
deducing the current magnitude of d(t) -- otherwise, how can it
predict d(t+dt)?

The prediction of the disturbance follows two steps: (1) the actual
observation delivers the previous value of the disturbance (see
above); (2) the disturbance prediction equation d(t+dt) = d(t)
predicts the next value of the disturbance. If the disturbance
fluctuates rapidly, this prediction won't be very adequate. But if
the disturbance varies slowly, it will work well.

I did not give the PCT control system the ability to sense the
magnitude of d(t). Are you proposing that we add such a sensor to
the model? If so, I get to use it, too.

Please do. You will need a model of the environment equation if you
are to reconstruct the magnitude of d(t) from x(t), I'm afraid...

This would be true if your program contained a means of sensing or
deducing the value of d(t). But if either is the case, then the
machinery for accomplishing this end should be explicitly
represented in your model.

It is. See the program.

If you're assuming that d(t) is being sensed, your model would be
using information that mine is denied. I did not propose a sensor
for d(t).

The disturbance d(t) is not sensed by a separate sensor; it is
reconstructed from x(t), given the model. I remember a discussion of
some time back where the common PCT view was that the value of the
disturbance cannot be discovered given only values of x(t) and u(t).
This does not hold (the same way) for model-based controllers. If a
good model is available, the disturbance is that part of the
perception that cannot be "explained" as being due to the action.

Greetings,

Hans

[Hans Blom, 970303b]

(Bill Powers (970227.0725 MST))

So the correct form of the expression for a(t-dt) would be

[x(t) - 2*x(t-dt) + x(t - 2*dt)]/dt^2

This means that the aceleration represented by this equation
represents the forces that were acting at t-dt, so we can write

J*[x(t) - 2*x(t-dt) + x(t - 2*dt)]/dt^2 = u(t-dt) + d(t-dt).

Now if we add dt to the indices on both sides of the equation, we
get

J*[x(t+dt) - 2*x(t) + x(t-dt)]/dt^2 = u(t) + d(t)

Do I have it right, now?

Yes.

For the current values u(t) and d(t), the next value of theodolite
position will be, if my algebra is correct,

x(t+dt) = [u(t) + d(t)]*dt^2/J + 2*x(t) - x(t-dt)

This should be equivalent to your expression with K substituted for
J/dt^2.

Yes, that's it.

Greetings,

Hans

[From Bill Powers (970303.0900 MST)]

Hans Blom, 970303--

The disturbance d(t) is not sensed by a separate sensor; it is
reconstructed from x(t), given the model. I remember a discussion of
some time back where the common PCT view was that the value of the
disturbance cannot be discovered given only values of x(t) and u(t).
This does not hold (the same way) for model-based controllers. If a
good model is available, the disturbance is that part of the
perception that cannot be "explained" as being due to the action.

I finally figured out how you were doing this. It's quite simple, once you
get used to the idea that the control system contains a simulation of the
external feedback path. In fact, this was discussed on the net some years
ago, but using a simple linear environment.

Suppose we use the simplest environment model in which we can say

p = o+d (perception equals output plus disturbance)

It follows that d = p - o. So if there is a sensor for the output, and given
that we already have a signal representing the input, it is possible to
deduce the value of d, or at least a disturbance equivalent to d. So it's
possible for higher-order control systems to construct a signal representing
the disturbance, just as if it was being sensed.

In the more general case, where p = f1(o) + f2(d), the only way to deduce
the disturbance is to compute

d = f2^-1[p - f1(o)]

However, the system can still compute an _equivalent_ disturbance, as if
f2() were a simple multiplier of 1. In that case we just have

d = p - f1(o),

where now f1 is a model of the actual external feedback function, just as in
the MCT model. The basic model would have to be changed a lot: we would have
to add a sensor for the output quantity, and even more machinery for
constructing a model of the environment. I discarded this idea because it
didn't seem reasonable to me that the control system could contain a model
of f1, and the PCT model works quite adequately without one.

As you will see when you read my later posts, this is not the main problem
with the MCT model you proposed.

Best,

Bill P.

[From Bill Powers (970303.0926 MST)]

Hans Blom, 970303b --

For the current values u(t) and d(t), the next value of theodolite
position will be, if my algebra is correct,

x(t+dt) = [u(t) + d(t)]*dt^2/J + 2*x(t) - x(t-dt)

This should be equivalent to your expression with K substituted for
J/dt^2.

Yes, that's it.

As you will see, I've gone on from here in later posts over the weekend.

I just realized this morning that this is an identity, not a computation of
a dependent variable from an independent variable. If you substitute the
original expression for acceleration into this equation, you come up with

x(t+dt) = x(t+dt), or 0 = 0.

This tells you immediately that this is not a _system_ equation, but only a
way of reexpressing the same variable. No equation used in defining a system
can be reduced to 0 = 0; there are always one or more independent variables
(input) and one dependent variable (output).

This is why, when you repeatedly apply a constant (u+d) in the expression
for x(t+1), you do not get the parabola you should get, but only a linear
rise in x(t+1). Of course since you make the same mistake in both the
"observation" function and the simulation or prediction of the next x, the
MCT model seems to work -- but it means nothing.

See my later posts.

Best,

Bill P.

[Hans Blom, 970304b]

(Bill Powers (970303.0900 MST))

One small quibble.

... it's possible for higher-order control systems to construct a
signal representing the disturbance, just as if it was being sensed.

In the more general case, where p = f1(o) + f2(d), the only way to
deduce the disturbance is to compute

d = f2^-1[p - f1(o)]

It is generally not required to know d. To know f2(d) would generally
be sufficient.

However, the system can still compute an _equivalent_ disturbance,
as if f2() were a simple multiplier of 1. In that case we just have

d = p - f1(o),

where now f1 is a model of the actual external feedback function,
just as in the MCT model.

Change this into

f2(d) = p - f1(o)

and you get what I mean.

The basic model would have to be changed a lot: we would have to add
a sensor for the output quantity ...

Yes, I've mentioned that a couple of times. An MCT controller knows
what it does and even what it did in the recent past. I have no doubt
that this applies to humans as well...

and even more machinery for constructing a model of the
environment.

That is the basis of model-based control, indeed.

Greetings,

Hans