# A Simple PCT Control Example

[From Rupert Young (970220.1700)]

Here is an example of a PCT-type controller working on a controlling a
theodolite. A theodolite is a precision instrument for measuring horizontal
(and vertical) angles for the purposes of measuring land for mapping or
marking out new construction. This much I am sure of, having been a Land
Surveyor for twelve years. Now into uncharted waters. Let's see how much
I've learned since being on CSG.

The purpose of the controller is to keep the telescope of the theodolite
pointing along a particular azimuth (clockwise bearing in degrees)
automatically. Essentially this is a one-level, one-dimensional (parameter)
closed-loop control problem.

The system variables consist of

1. The desired azimuth (reference signal, r).
2. The sensed/measured current azimuth (perception signal, p)
3. A value which denotes how close the current azimuth is to that desired
(error signal, e). Basically,

e = r - p

The sign of e tells us what direction we should go. For example, if (units are
degrees)
r = 145
& p = 60
then e = 145 - 60 = +85

the positive sign of e tells us that we want to move clockwise. If e was
negative we should move anti-clockwise.

4. An output function (f(e)) that tells us how the error signal is converted
into some output.
5. That output value (u).

Now, at first glance it seems logical that the output should equal e. That
is, that the theodolite should move clockwise 85 degrees. However, this is
not taking time into account. We actually want to produce "continuous" output
at a series of time steps so that the effects of external influences
(disturbances), errors in producing exact output (which are only avoided in
"perfectly" calibrated systems) and a changing reference signal can be taken
into account. So that the system becomes "adaptive".

How am I doing so far, CSGers?

···

--
Regards,
Rupert

[From Bill Powers [970221.0700 MST)]

Rupert Young (970220.1700)--

The purpose of the controller is to keep the telescope of the theodolite
pointing along a particular azimuth (clockwise bearing in degrees)
automatically. Essentially this is a one-level, one-dimensional (parameter)
closed-loop control problem.

The system variables consist of

1. The desired azimuth (reference signal, r).
2. The sensed/measured current azimuth (perception signal, p)
3. A value which denotes how close the current azimuth is to that

desired

(error signal, e). Basically,

e = r - p

The sign of e tells us what direction we should go. For example, if (units
are degrees)
r = 145
& p = 60
then e = 145 - 60 = +85

the positive sign of e tells us that we want to move clockwise. If e was
negative we should move anti-clockwise.

4. An output function (f(e)) that tells us how the error signal is
converted into some output.
5. That output value (u).

Now, at first glance it seems logical that the output should equal e.
That is, that the theodolite should move clockwise 85 degrees. However,
this is not taking time into account. We actually want to produce
"continuous" output at a series of time steps so that the effects of
external influences (disturbances), errors in producing exact output
(which are only avoided in "perfectly" calibrated systems) and a changing
reference signal can be taken into account. So that the system becomes

How am I doing so far, CSGers?

I think this kind of working-out of the problem will be very helpful to
others who are trying to understand feedback control. It follows the
evolution of control theory, in that as you develop this idea, you can start
with a simple intuitive model, test it, see where it fails and why, and
gradually introduce the details that make it work better, as the old-time
control engineers did.

I would recommend avoiding the term "adaptive" at this stage. It is true
that a control system can handle variations like disturbances and changing
reference levels, but it does this with a structure having _fixed_
properties. True adaptation, as the term is generally used in control
theory, implies that the properties themselves change to suit changes in the
properties of the local environment. But the need for this sort of
adaptation isn't evident until you have seen how a control system with a
fixed design handles a given environment, which is enough of a chunk to bite
off for beginners.

The theodolite-pointing control system may not be the best one to start
with, because it actually involves a second-order differential equation
(that's why, in my ongoing correspondence with Hans, I changed it to a
cruise control which involves only a first-order differential equation).
Check out the little program I posted yesterday.

We'll be following your development with interest. Remember that the only
crime in the world of PCT is not asking for help when you need it.

Best,

Bill P.

[From Rupert Young (970221.1630 UT)]

Bill Powers (970221.0700 MST)> [From Bill Powers [970221.0700 MST)]

I would recommend avoiding the term "adaptive" at this stage. It is true
that a control system can handle variations like disturbances and changing
reference levels, but it does this with a structure having _fixed_
properties. True adaptation, as the term is generally used in control
theory, implies that the properties themselves change to suit changes in the
properties of the local environment. But the need for this sort of
adaptation isn't evident until you have seen how a control system with a
fixed design handles a given environment, which is enough of a chunk to bite
off for beginners.

Ok, good.

The theodolite-pointing control system may not be the best one to start
with, because it actually involves a second-order differential equation
(that's why, in my ongoing correspondence with Hans, I changed it to a
cruise control which involves only a first-order differential equation).

Ah, ok. Though I'm not sure I understand this, I thought these two examples
were identical. In both the first-order differential equation represents the
changing output at each time step relative to the error signal ? Where does a
second-order differential equation come in ?

Check out the little program I posted yesterday.

Aha, you've done it already. I'm working through it now, it looks just what's needed.

···

--
Regards,
Rupert

[Hans Blom, 970221e]

(Rupert Young (970220.1700))

The purpose of the controller is to keep the telescope of the
theodolite pointing along a particular azimuth (clockwise bearing
in degrees) automatically.

Great idea to try this out in practice! I agree with Bill where he
says:

I would recommend avoiding the term "adaptive" at this stage.

Adaptive control is quite a bit more complex than standard control.
If you do want to try out model-based control, I would recommend that
you start out with a perfect model, then try out how control becomes
worse if the model is imperfect, and only then to attempt to "control
for" a perfect model.

I do not agree with Bill where he says:

The theodolite-pointing control system may not be the best one to
equation ...

Any simple system will do, and this one is extremely so. So by all
means continue with what you started.

Greetings,

Hans

[From Rupert Young (970225.1000 UT)]

Bill Powers (970221.1410 MST)]

The treatment in B:CP was very much simplified. It assumed a purely
proportional control system with a proportional environment. In that type of
system, the result is the same regardless of the output gain, if the gain is
high enough. In the present case, we have a proportional output function,
but . The same rules of thumb don't apply. In
this sort of system, because of the integral, the static loop gain is
infinite. The gain of the output function now determines how rapidly the
error will be corrected; in the long run, the error will be corrected
exactly no matter what the gain (greater than zero). That's because any
output at all will increase the speed, so the speed will increase until the
output is exactly zero. That occurs only when the error is exactly zero.

Before I go on with my control example could you clear up a couple of things
for me ? I'm not quite sure what you mean by "an _integrating_ environment",
could you explain this ? I did calculus at school about 18 years ago but
never really got the feel of integration. In what sort of situations do you
have a proportional environment ?

···

--
Regards,
Rupert