Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Three types of PID controllers, which is best?

21 views
Skip to first unread message

BESTune

unread,
Jun 3, 2001, 2:34:15 AM6/3/01
to
There are three PID controller types:

Type A (textbook PID):

CO(k)=CO(k-1) + Kp*[e(k)-e(k-1)] + Ki*T*e(k) + Kd/T*[e(k)-2e(k-1)+e(k-2)]

Type B (e.g. AB PLCs):

CO(k)=CO(k-1) + Kp*[e(k)-e(k-1)] + Ki*T*e(k) - Kd/T*[PV(k)-2PV(k-1)+PV(k-2)]

Type C (not common):

CO(k)=CO(k-1) - Kp*[PV(k)-PV(k-1)] + Ki*T*e(k) -
Kd/T*[PV(k)-2PV(k-1)+PV(k-2)]

I have done some research on the topic: Of the three types, which one is the
best?

The differences:

Type A: All P, I, and D terms act on error e.
Type B: Setpoint is removed from the D term of type A.
Type C: Setpoint is removed from BOTH D term and P term of type A.

My answer is: Type C is the best when setpoint changes. For more of my
research see

http://bestune.50megs.com/typeABC.htm

Therefore, I hope that all PID controllers should implement type C PID
equation. What is your idea?

Dan
http://bestune.isclever.com

John Popelish

unread,
Jun 3, 2001, 12:21:50 PM6/3/01
to

What is best depends on what you are afraid of most.

If you want absolute fastest response to setpoint changes, have all
terms react to error (). This is almost never the optimal choice,
because it almost never happens that there is a pole in the process
response that coincides with a pole in the setpoint response that can
both be treated equally by the same derivative term. I have never
improved the performance of a loop by switching to this algorithm.

If you want to have the derivative effect focus only on a process pole
(especially in the inner loop of a cascade pair, where the inner loop
derivative focuses on the inner process, and the outer derivative
focuses on a pole in the outer loop process), having the derivative
react only to process (B) may be best.

But if you are afraid that the output may move too fast, and upset
this or other interrelated processes (and you are in no particular
hurry to get to setpoint), you may want to use version c and have only
the integral term react to setpoint changes, to ramp to the new
setpoint with the least upset. This version is also nice for manual
setpoints that might be entered incorrectly. It gives the operator
"oops time" to correct his mistake without slamming outputs.

I think a better form should be produced that has more advantages than
any of these for moving setpoint applications. I want to see a form
that has two gains (one that responds only to process changes and one
that responds to setpoint changes) and two derivative gains (or times)
(again, one that responds to the derivative of the process changes and
one that responds to the derivative of setpoint changes) and a single
integral gain (or time) that responds to error. This would eliminate
the necessity of choosing any of the common "all or nothing" schemes
you describe, but would let me tune optimally, process disturbance
response and setpoint disturbance response independently. One
algorithm fits all, with just 5 coefficients, rather than 3
coefficients and 3 extreme choices.

Please, somebody, bring the PID controller into the 21st century.

--
John Popelish

BESTune

unread,
Jun 8, 2001, 6:18:27 PM6/8/01
to
John,

If your PID is not tightly tuned, then type A may reduce the settle
time and it may not be so. Typically type A will cause an overshoot in
PV. Please take a look at

http://bestune.50megs.com/typeABC.htm

In this case, the overshoot may be reduced if (1) the tightness of
type A is further reduced and/or (2) A smaller admissible range is
enforced on CO so that the bad effect of type A is further restricted.
But remember, if the your type A PID is too loose in order to reduce
overshoot, the settling time will be longer.

Similar comments apply to tyep B. But for type B, things are not that
serious as for type A.

Type C completely overcomes the problems mentioned above. If your type
C is well tuned, the settling time can be very short AND the overshoot
can be zero. Take a look at

http://bestune.50megs.com/tightness.htm

to verify this.

Dan

Peter Nachtwey

unread,
Jun 10, 2001, 11:00:24 PM6/10/01
to
Only PID A is a true PID. The PID B and PID C are a 'work around' for not
having a motion target generator or a set point ramp and soak capability.
PID A will cause big discontinuities in the output if the target or set
point changed with a step jump. Motion controllers always ramp from one
position to another using at least trapezoidal velocity profile to avoid the
step jumps in position. The PID B will not follow a ramp properly because
it assumes the set point is fixed in the derivative term. PID C is worse
yet because it assume the set point is constant in the proportional term
and the differential term. PID B and PID C may be OK for process people
that the make step jumps in the set point and only care that the PV gets to
the SP sometime.

A motion controller would never use the PID B or PID C.

Peter Nachtwey

"BESTune" <bes...@163.net> wrote in message
news:1e55aea5.01060...@posting.google.com...

BESTune

unread,
Jun 12, 2001, 2:50:28 PM6/12/01
to
If well-tuned, type C PID can be very tight. See

http://bestune.50megs.com/tightness.htm.

And you do not need to ramp setpoint from one value to another for
type C. So I strongly recommend the use of type C PID in motion
control. Type A, B, and C are equivalent if setpoint is a constant.
This does not mean type B or C is good only when setpoint is a
constant. The defects of type A comes with the first PID that was
invented more than half a century ago. The setpoint should have
removed from P and D terms. As I said, people still have strong good
feelings towards type A PID even though some experienced engineers
call them "textbook" PID (more or less this shows some frustration
with what they learned from textbook).

Think about this: Why people called type A textbook PID? Why people
began to use type B PID even though type A was invented long time ago?
If you know the answers, then you know why type C is the better than
type A and B, because the answer is the same.

Dan

"Peter Nachtwey" <pnac...@home.com> wrote in message

John Popelish

unread,
Jun 12, 2001, 6:12:41 PM6/12/01
to
BESTune wrote:
>
> If well-tuned, type C PID can be very tight. See
>
> http://bestune.50megs.com/tightness.htm.
>
> And you do not need to ramp setpoint from one value to another for
> type C. So I strongly recommend the use of type C PID in motion
> control. Type A, B, and C are equivalent if setpoint is a constant.
> This does not mean type B or C is good only when setpoint is a
> constant. The defects of type A comes with the first PID that was
> invented more than half a century ago. The setpoint should have
> removed from P and D terms. As I said, people still have strong good
> feelings towards type A PID even though some experienced engineers
> call them "textbook" PID (more or less this shows some frustration
> with what they learned from textbook).
>
> Think about this: Why people called type A textbook PID? Why people
> began to use type B PID even though type A was invented long time ago?
> If you know the answers, then you know why type C is the better than
> type A and B, because the answer is the same.
>
> Dan

I think you would benefit from doing a bode plot (phase delay and gain
versus frequency) of the process response versus setpoint for the
three versions, and you will see why C is not the preferred choice in
many fast changing (relative to process settling time) applications.
Of course, the perfect gain would be 1 and the phase delay would be
zero. None of your controllers (each optimally tuned) will achieve
that, but your C version will have gain drop off at lower frequencies,
and more phase delay than A or B.

--
John Popelish

BESTune

unread,
Jun 13, 2001, 3:16:39 PM6/13/01
to
If simulation shows that type C's setting time is shorter than type A
and B, why is there a need to see the bode plot?

Dan

John Popelish

unread,
Jun 13, 2001, 5:08:41 PM6/13/01
to
I don't believe that this a true statement for all process responses
and optimally tuned controllers of each kind. What kind of process
responses have you tested?

BESTune wrote:
>
> If simulation shows that type C's setting time is shorter than type A
> and B, why is there a need to see the bode plot?
>

> John wrote:
> > I think you would benefit from doing a bode plot (phase delay and gain
> > versus frequency) of the process response versus setpoint for the
> > three versions, and you will see why C is not the preferred choice in
> > many fast changing (relative to process settling time) applications.
> > Of course, the perfect gain would be 1 and the phase delay would be
> > zero. None of your controllers (each optimally tuned) will achieve
> > that, but your C version will have gain drop off at lower frequencies,
> > and more phase delay than A or B.


--
John Popelish

Peter Nachtwey

unread,
Jun 13, 2001, 10:50:31 PM6/13/01
to
"BESTune" <bes...@163.net> wrote in message
news:1e55aea5.01061...@posting.google.com...

> If well-tuned, type C PID can be very tight. See
>
> http://bestune.50megs.com/tightness.htm.
>
> And you do not need to ramp setpoint from one value to another for
> type C.

What do you do about the overshoot? The integrator must overshoot because
it winds up when there is a step jump in the error. It must unwind by
overshooting the set point. This is not acceptable. If the motion
controller can follow a ramped setpoint from one position to another with
only a small error the integrator will not windup and overshoot.

> So I strongly recommend the use of type C PID in motion
> control.

You haven't tried this on a motion controller have you?
Has anyone else?

> Type A, B, and C are equivalent if setpoint is a constant.

Yes, but that is not reality. By definition a motion controller controls
motion. That is a moving set point!.

> This does not mean type B or C is good only when setpoint is a
> constant. The defects of type A comes with the first PID that was
> invented more than half a century ago. The setpoint should have
> removed from P and D terms. As I said, people still have strong good
> feelings towards type A PID even though some experienced engineers
> call them "textbook" PID (more or less this shows some frustration
> with what they learned from textbook).
>
> Think about this: Why people called type A textbook PID?

Because it is ideal. In practice there must be limits on the integral windup
and a pole in the differentiator to keep from having infinite gain at high
frequencies

> Why people
> began to use type B PID even though type A was invented long time ago?

Because they were too lazy, lacked processing power, or not capable of
making a good trajectory generator ( ramp and soak for the process people).
This is where 90% of the effort is. The PID is the trivial part.
Motion people must do gearing, clutching, camming, and super imposed moves
not just point to point moves.
In many applications the set point never stops!

> If you know the answers, then you know why type C is the better than
> type A and B, because the answer is the same.

WRONG! This may be acceptable to process people but a motion controller
must follow a set point that is ramped precisely from one position to
another. Motion people want to know that the motion controller not only
gets to position but is exactly where it should be every millisecond along
the path. This way multiple axes can be synchronized together. Your B and
C 'PID' do not even take into account that set point is moving! How can
that be better at following a moving set point?

Peter Nachtwey


BESTune

unread,
Jun 14, 2001, 2:10:19 AM6/14/01
to
I have read all the responses. I think one way to reach the correct
conclusion is to find examples in process control and motion control.

-----------------------
For a process control problem, I have "An Open PID Controller Tuning
Contest" published at

http://bestune.50megs.com/CO_PV.htm

A comparison between type A, B, C is given at

http://bestune.50megs.com/typeABC.htm

The performance of type C PID with different tightness is shown at

http://bestune.50megs.com/tightness.htm

If someone can get better PID control results using type A or B, then
I am defeated.
---------------------
If someone can provide me with a motion PID control problem, I can
repeat all the above work, i.e., give a comparison between type A, B,
and C PIDs. I am sure type C is still the best. Let's do it now.
---------------------

John Popelish

unread,
Jun 14, 2001, 11:54:52 AM6/14/01
to

As far as I can tell from your page that compares controller
algorithms, your process is a zero dead time, single time constant
one. This is an extremely well behaved, undemanding sort of thing to
control with a PID controller. Almost any controller algorithm can be
made to work pretty well. Most real process responses are lots
tougher than this.

And if you give credit to shortest first time to setpoint, your
equation C does not even win with that process, but is the worst. In
fact, if you specify a reasonable error band (anything from +-1/4 of
the setpoint step size to +-1/10 of the setpoint step size) and time
the response to stability within that band, C always looses even with
this easy example. Your visual definition of best is a very arbitrary
and not very useful one.

Try this comparison with an integrating process with an additional
time constant and C will fall on its ass. The only kind of process
response that I expect C to excel at would be a pure dead time
response. For that one, derivative is useless, and proportional gain
can only be used sparingly, anyway, so reacting with mostly integral
action is the only solution left to the PID, anyway.

--
John Popelish

John G

unread,
Jul 14, 2001, 8:51:00 AM7/14/01
to
There are MANY more types of controllers than the ones listed by Dan:
http://www.expertune.com/articles.html

a good reference is "Feedback Controllers for the Process Industries" by F.
G. Shinskey.

One solution to Dan's "Which controller is best?" is to use a setpoint
filter:
http://www.expertune.com/Advanced.html#SetPointFilter

All of Dan's controllers respond identically to load upsets which is what
process industry people usually care most about:
http://www.expertune.com/artcon91.html

I would not recommend using ANY of Dan's controllers unless the D action
were filtered and I had intimate knowledge of the anti-windup features.

John Gerry, ExperTune Inc.


Mongkol Janchookiat

unread,
Jul 25, 2001, 7:27:36 AM7/25/01
to
"John G" <jp...@expertune.com> wrote in message news:<3b5040e8$0$93665$272e...@news.execpc.com>...
" Each type of controller has its purpose.
If all three term P, I and D act on error and PV changes. THis type is
recommended for slave controller because the inner loop must be fast
to reject the disturbances before affecting the master loop.
Another type of controller that he mentioned was only I acts on error
and P and D act on PV changes. THis type of controler is mostly used
for master controller. Becasue the master loop is generally slower
than the slave loop in term of process dynamic (Time constant). Imagin
that if the setpoint of master controller is changed I term will act
to this change by smoothly change the slave controller setpoint. For
the case of disturbance, P and D action will rather fast reject the
disturbace from the loop. I have an good example here in my refinery.
Air/Fuel Ratio Control is used in Furnace or Boiler control. Heater
out let temperature is the master controller act to 2 slave flow
controllers, which are Fuel Flow Controller and Air Flow Controller.
First of all, the 2 slave flow controller must be able to well tune or
fast reject any disturbace from the inner loops becasue if both fuel
flow swing can affect the stability of heater outlet temperature so
that both flow controllers must be tuned as fast as posible to reject
the disturbace and in the same time if master loop want to change the
setpoint of both flow controllers, they must be fast react to the
demand of master controller. It is clear why slave flow controller
should be configured as P, I and D act on error and PV change. For
heater outlet temperature controller or master controller, we seldom
adjust its setpoint and the main job of master controller is to have a
quick load response. For the setpoint of heater outlet temperature,
imagin that it could be a heating section to heat up the crude to the
distilation column. We would like to see it smoothly react to the
setpoint change and don't want to see the fuel flow and air flow have
a spike by the derivative or P action.
Conclude here is it depends what kind of process and controlled
variables that we want to control and manipulate. We use all three
term P, I and D act for all cases for the slave loop and we use I act
to setpoint changesa(error)and P,D act to pv changes for the master
loop. This is the practical way to apply and maximize the capability
of PID in industries.
More comments and suggestion, please email me.
Mongkol Janchookiat
Process Control Technologist
Thaioil Refinery
Sriracha Thailand

BESTune

unread,
Jul 25, 2001, 6:49:00 PM7/25/01
to
Now you can download the BESTune demo and find out which PID algorithm
is the best. Just go to section G of

http://bestune.50megs.com

Dan

BESTune

unread,
Aug 10, 2001, 2:45:32 PM8/10/01
to
Hi John,

Thanks for your comments. For a PID controller with buit in filter
please take a look at

http://bestune.50megs.com/piddesign.htm.

In many practical applications signals (e.g. process variables PV)
contain noise. Filters are used to reduce noise in the signals. There
hardware filters and software filters. When tuning a PID controller,
the filter should consider as one part of the process. This is because
the PID controller receives the PV from a filter.

The design of a PID controller and the design of a filter can be
separated, even though they can be put into the same program or even
the same function. For a hardware filter, we have to separate the PID
controller with the filter.

Having the above in mind, we can say the three types of PID controller
described at:

http://bestune.50megs.com/typeABC.htm

cover all PID controllers in industry. I don't it is convenient to mix
filters with PID controllers, because there are so many different
filters and there are even larger number of all possible combinations.
Again, I don't think filters and PID controllers cannot be put
together (see above). For more of my idea
please take a look at

http://bestune.50megs.com/piddesign.htm.

Futher comments welcome.

Dan

"John G" <jp...@expertune.com> wrote in message news:<3b5040e8$0$93665$272e...@news.execpc.com>...

0 new messages