# TRUE PID

D

#### Danyang Liu

There is very good discussion in the news group: news:sci.engr.control about the TRUE PID equation, i.e. whether or not the setpoint should be removed from the P-term and D-term of PID equations.

It is widely accepted that setpoint should be removed from D-term. However, when I mentioned setpoint should also be removed from P-term, I got quite a few objections. Attached below is my reply to these objections. I would like to hear comments from this email group, especially PID controller designers from various PLC, DCS, and microcontroller manufactures.

After its half-a-century development, I think it is high time that we, the so-called control people or control engineers, made it clear what is the TRUE PID. I believe this discussion will benefit the whole industry.

Danyang Liu, PhD of Process Control.

---------------------------------------------
Kari and others,

I am very pleased that my BESTune posting has attracted so much attention.
Thank you all.

Since 1998 while I developed my first PID tuning software BESTune using Matlab/Simulink, I have been using the TRUE PID equation:

CV=Kp*(-PV)+Ki*int(SP-PV)+Kd*(d/dt)(-PV)

The reason why SP should be removed from the P-term is the same with reason why SP should be removed from D-term, which is:

"A step change in SP sometimes can cause an unwanted big change in CV"

The only difference between the two is: When SP changes, the bad effect (sudden large change in CV) of using Kd*(d/dt)(SP-PV) will last longer than using Kp*(SP-PV). You can see this clearer if you look at the discrete form of TRUE PID.

Most industrial PID designers noticed the bad effect of using Kd*(d/dt)(SP-PV) and they removed SP from the D-term. Unfortunately, they still keep SP in the P-term, such as PIDs from A.-B., which I would call semi-PIDs. Until 1998 I proposed the TRUE PID, I did not find any PIDs using the TRUE PID equation.

I noticed that some people believe in some applications such as motion control, textbook PID should still be used in order that PV tracks the
changing SP more quickly. Well, I don't think so. The reason is very funny here: when textbook PID and semi-PID are tuned in a conservative way, the
bad influence of step change in SP helps PV to track SP more quickly.

This is why in my BESTune version 3, I asked users to reduce the tuning related controller tightness when we have to tune textbook PIDs or even semi-PIDs.

In TURE PID, the response speed of PV can be raised by increasing Ki and/or reducing Kp and/or Kd. This is easy to understand if you know that the I-term acts like an accelerator and the P-term and D-term act like two brakes.

Finally, may I ask you to do me a favor:

(1) If you are PID controller designers, please at least include the TRUE PID as an option in your PID controllers. How to implement TRUE PID? Here it is:

CV(k)=CV(k-1)+Ki*(LUT)*[SP(k)-PV(k)] /* I-term, accelerator
-Kp*[PV(k)-PV(k-1)] /* P-term,
brake 1
-(Kd/LUT)*[PV(k)-2*PV(k-1)+PV(k-2)] /* D-term,
brake 2

This is the form when CV POSITIVELY affects PV, i.e., increase in CV will cause PV to increase.
If you only allow positive values for setting Kp, Ki, and Kd, then if CV NEGTIVELY affect PV, you should change the sign of SP and PV before using
the above TRUE PID equation.

(2) Please forward this email to any PID designers or PLC, DCS, Microcontroller vendors (such as Allen-Bradley, Bailey, Honeywell, Modicon, Siemens, Foxboro, etc, etc.)

Kari called me Mr./Ms. BESTune.com. Well, "BESTune.Com" is the name of my own business (Until now I am not making money at all). My name is Danyang Liu.

Thank you all for your attention.

Danyang Liu, PhD of Process Control
BESTune.Isclever.Com

P.S.: I have update BESTune version 3, which includes both PI and PID tuning.

"Kari Olson" <[email protected]> wrote in message
news:8amunm$eto$[email protected]...
> Thanks for the reason; I forgot the limitations of actuator response for a
> moment.
>
> I guess my real point was to ask why a PID which acts on -PV for P and D
but
> SP-PV for I should be considered the "TRUE PID" by Mr./Ms. BESTune.com. I
> can concede that it may _work_ the best in practice (ignoring solutions
> which filter the SP or rate limit changes to it, which are not under
> discussion here). I don't see how it can be considered the canonical PID
> controller when it is a PID controller on -PV in parallel with a SP
> integrator with the integral gains coordinated.
>
> My two cents,
> -Kari
>
> BESTune (The BEST PID Loop doctor) wrote in message
> >I believe the type of PIDs with P-term and D-term acting on (-PV) is
really
> >a correct implementation of PID control algorithm. A.-B.'s PID (with only
> >D-term acting on (-PV)) is NOT a completely correct implementation of
TRUE
> >PID algorithm. It can only be called a semi-PID algorithm. And PIDs with
> all terms acting on (SP-PV) are too far away from the TRUE PID.
> >
> >Could someone tell me which PID controller implemented the TRUE PID
> >algorithm (i.e. the third type PID in BESTune version 3)?
> >
> >BESTune.Isclever.Com

A

#### Al Pawlowski, PE

I will try your "TRUE PID" algorithym sometime to see how it works. What you say about it, vs the more common PID, seems to make sense.

However, I think your naming is a bit misleading. As far as I am aware, the SP-PV in proportional term PID is the one that has been around the
longest, and used the most, so I would consider it the true PID. Perhaps, the "LIU PID" would be a better name for your version.

J

#### Johan Bengtsson

My opinion:
If this is to be implemented, make it an option.

It is, for the reasons stated, often a good thing. BUT you don't want that behavior everytime. For some types of processes it is actually better to have this immediate kick than not to have it.

Further, The inner loop in a cascade, where the SP probably don't change in steps in the first place, should probably have the "original"
behavior and not this new one. (If I find the time I could check this against my process simulations later...). Generally a step in SP might not be a good thing and in that case you can almost as well keep the original formula.

P is stated below to break, I don't agree to that statement. (or perhaps I misunderstood it).

BTW, you can't put too much part of the action on the I term without loosing stability, the different parts of the controller act together
and changing the setting of one might require a change in the other too. Going too far away in some directions will give you a "dead" controller
and in other directions will give you decreased stability.

/Johan Bengtsson

----------------------------------------
Box 252, S-281 23 H{ssleholm SWEDEN
Tel: +46 451 49 460, Fax: +46 451 89 833
E-mail: [email protected]
Internet: http://www.pol.se/
----------------------------------------

J

#### jmGiraud

Ho ! my friend:
Do not plunge too deep, you might drown before you see the fish.
There are several pitfalls in the subject. So, stay in the boat. I have to understand you work numerical PID. Numerical Maths are "receipes". The worst one is the derivative. Untill recently, PLC's could not close the loop if significant derivative was required (the drivative had only three terms: useles and dangerous). Do not trust your Matlab software: it may be too theoretical and out of reality.
Now that you have at least a four term numerical drivative and a nice five term integral as a feed back and proportional somewhere in your five point accumulator PV: Where to put the set point? It depends upon your loop strategy and how much the "controller is doing" (the best one is the one that has nothing to do). Normaly, I D must be of smaller influence than P to maintain some kind of mathematical modeling. Otherwise, it's like changing the initial conditions of the model.
The process reaction is the dominant in the loop behavior. In short, wherever you put it will only influence the overall response of the transfer function and change the shape of the curve with some extra cycling but it might be reduced in shape and peak. It's all mater of energy distribution and how much plastic it is to dissipate.
In one of the supplier you mentionned the SP is left to the choice of the user.
The Instrumentation School (to me and many of my fellow workers) has long dated be Foxboro. They may be willing to divulgate their PID algorithm.
I beleive you should try that step and restart thinking around drilling a square hole before drilling round one.
There was once a nice theory hving all possible control modes resumed only via DERIVATIVE.
By the way, the Ziegler Nichols method of tuning loops has always be my best friend. So that I
developped my own maths to model the reaction curve based on only two time constants: it works.
When many time constants get involved, there is one dominant, the overall raction is only delayed and distorted.
Come back on that forum with all your maths, so one can interpret your algo.

J

#### jmGiraud

.....Continued.....20/07/2000
Quote:"The four control approaches,i.e:, PID, Cascade, Override, And Feedforward have been implemented, for the last 40 years with pneumatic, electronic and, lately digital instrumentation, with varying degrees of sophistication." Page 69 MICON P-100
Printed in U.S.A 10/86
Powell-Process Systems, Inc
...
At that time, the vocabulary of Process Control and Regulation was quite large and intriguing for the non familiar.
Interactive/noninteractive, Set point (SP) Tracking, PV Tracking, Output tracking, External Tracking, Adaptive Gain, Self Tuning, Rate Limiting, Incremental PID, Positional PID ...

All these in conjonction with strategies, to satisfy and cope with overall loop dynamic and also Plant Process Units dynamics as they come back (unexpected) in the picture.

Understanding the basics of PID is a must: sure !
Optimising PID is not understanding the regulation of the Process; because the dominance
of the external dynamic.

If one would be patient enough to draw a square
around the cartesian axes X-Y (± 1) and graph only all known dynamics of systems then the square would be nearly completly black.

In the study of "PID", the right strategy is of prime importance, then comes the twist to tune the gyzma.
[email protected]