[Hans Blom, 970305b]
(Bill Powers, last post)
Bill, I discovered an error in your PCT/MCT comparison program. In
the initialization, we find a definition of
J := 10.0
But when the PCT controller procedure is called, we find a
redefinition
j := 1.0 (j and J is the same thing in Turbo Pascal!)
This means that the MCT and PCT controller control different objects.
Moreover, the redefinition of J = 1.0 remains in force when one
switches back to the MCT controller. That is very confusing.
I suggest that you remove the redefinition in the PCT controller (and
earlier I suggested to make J user-variable as well). When you do,
you will find that at J = 10 you will have to retune some gain
constants in your control loop to get the same good performance as at
J = 1, for which your controller seems to have been designed. That is
a general feature of the PCT controller: it needs to be retuned for
different values of J. This is not so for the MCT controller, as you
can easily check.
So my suggestion to exercise both controllers at different values of
J may create some problems for the MCT controller. Unless you find a
way to make these gain constants J-dependent. But in that case you
will have created a model-based controller, of course...
Greetings,
Hans