[Hans Blom, 970321]
I've completed the analysis of the new MCT controller, based on the
motion equations that we now agree on. But not programmed it yet.
That will be straightforward, however. Expect the program some time
after the weekend. Here is the analysis.
The equations that govern our idealized theodolite's motion are:
a(t) = (u(t) + d(t)) / J (1)
v(t+dt) = v(t) + a(t) * dt (2)
x(t+dt) = x(t) + v(t) * dt + 0.5 * a(t) * dt * dt (3)
The objective of the MCT controller is:
x(t+dt) = r(d+dt) (4)
I assume that both x(t) and v(t) are observed at every iteration
(other variants are possible, but this assumption may give the best
comparison with the PCT controller). Start by combining (1), (3) and
(4):
r(t+dt) = x(t) + v(t) * dt + 0.5 * (u(t) + d(t)) * dt * dt / J (5)
For the moment, we assume that d(t) is known (it isn't, of course,
but its estimate is; for the estimation of the true disturbance see
below). Therefore the only unknown in (5) is u(t). We derive an
explicit solution for u(t). From
0.5 * (u(t) + d(t)) * dt * dt / J = r(t+dt) - x(t) - v(t) * dt (6)
we get
u(t) = 2.0*J * (r(t+dt) - x(t) - v(t) * dt) / (dt*dt)) - d(t) (7)
This is the equation that the controller uses to compute its output.
Note that if d(t) is exactly equal to the true disturbance and if
u(t) is not limited by saturation of the controller's output, the
control objective (4) is realized exactly (and in a single step!).
We want, however, to make the controller robust against output
saturation: maybe the actual u(t) given is different from what we
computed in (7). In either case, the next predicted observation is,
given the value of u(t) that is the true output:
x(t+dt) = x(t) + v(t) * dt + 0.5 * (u(t) + d(t)) * dt * dt / J (8)
where we have combined (1) and (3). Note its resemblance to (5).
In (8), the only unknown is d(t); we have used its estimate, not its
true value. If there is a difference between both, (8) will not give
a correct prediction. Let us call the true perception at time t+dt by
the name of x'(t+dt) and the true disturbance at time t by the name
of d'(t). The formula that "explains" the true perception is then:
x'(t+dt) = x(t) + v(t) * dt + 0.5 * (u(t) + d'(t)) * dt * dt/J (9)
Subtracting (8) from (9) gives:
x'(t+dt) - x(t+dt) = 0.5 * (d'(t) - d(t)) * dt * dt / J (10)
Now we can reconstruct d'(t):
d'(t) = d(t) + 2.0 * J * (x'(t+dt) - x(t+dt)) / (dt*dt) (11)
Note that the correct value of the true disturbance d'(t) can only be
known at time d+dt, when we observe x'(t+dt). Thus its estimate
always runs one sample late. As a result, we can predict that the
controller will perform badly when the disturbance consistently
varies significantly between samples. The assumption about the
disturbance (the disturbance model) is, indeed, that it is constant:
d(t+dt) = d(t) (12)
Since we have redundant measurements, the estimation of d'(t) could
be done using equation (2) as well, or any (arbitrarily weighted)
combination of both the expressions for x(t+dt) and v(t+dt). The same
applies to the computation of u(t); it too could be based on equation
(2), but that would be control of _velocity_. That, by itself, would
introduce what Bill calls "integration error", accumulation of small
computational inaccuracies, so it ought to be combined with control
for x. But those are unimportant niceties for now.
This completes the analysis of the MCT controller -- unless I've made
errors in my computations, of course...
Greetings,
Hans