After search, use << and >> links at top of page to view other pages.
Get Updates on Facebook

Unraveling Controller Algorithms

Someone recently asked me which controller algorithm the Emerson Provox PID controller uses. She pointed me to the PID equations given in the Provox manual (Figure 1).

Provox PID

Figure 1. PID Algorithm given in the Emerson Provox Manual (click to enlarge)

The author of this documentation has obviously given little thought to the information sought by the end user:

  1. What algorithm does the controller use (interactive, noninteractive, parallel)?
  2. Is the integral setting in units of time (min/sec) or gain (repeats/min, repeats/sec)?
  3. Do the proportional and derivative terms act on error or PV?

The answers to these questions are critical for tuning the controller and understanding its response to setpoint changes. But the information given in the manual does not give one of these pieces of information in a straightforward manner. (It may seem obvious from Figure 1 that the integral setting is in units of time, but this is wrong.)

To help decipher controller algorithms as documented by many manufacturers, I thought it may be useful to summarize the building blocks of a PID controller and their Laplace representations (Figure 2).

Controller Building Blocks

Figure 2. Controller algorithm building blocks used in manufacturer documentation. (Click to enlarge.)

TI = Integral time
TD = Derivative time
TF = Filter time constant
a = Derivative filter ratio. Also called derivative gain limiter, or rate action limiter. Usually set between 0.1 and 0.125.

Now back to the Provox PID algorithm…

Rearranging the equation at the top of Figure 1 to reflect the blocks given in Figure 2, and substituting IVP (implied valve position) with CO (controller output) we obtain the equation in Figure 3.

Rearranged Provox PID

Figure 3. Rearranged Provox PID equation. (Note that 1/Ti should actually be Ki – see text).

The equation in Figure 3 indicates that the Provox uses the interactive PID control algorithm because the derivative term is multiplied by the proportional and integral terms, not added to them. The rearranged equation in Figure 3 also tells me that the Provox uses a lead-lag block, which provides derivative action with the numerator (lead) and derivative filtering with the denominator (lag). This answers the first question.

The equation and text in Figure 1 would have led me to believe that the controller uses integral time, but… WATCH OUT, the part of Emerson’s manual I pasted in Figure 1 turned out to be wrong in this aspect! Many pages later, the Provox manual says that the integral tuning constant (called RESET), is actually a gain expressed in repeats per minute. In their own peculiar way the second question has been answered.

Finally, doing some extensive rearrangement of the math at the bottom of Figure 1, I concluded that the derivative term acts on PV and not Error. Admittedly, the latter is difficult to do with the interactive controller algorithm. Luckily the manual actually tells the reader “the set point term of the PID algorithm has been isolated so that rate action occurs only on changes to the PV”. If you know what you are looking for – this line says it. Tediously, the last question was answered.

To summarize, the Emerson Provox PID controller uses:

  1. The interactive control algorithm
  2. Integral gain in repeats/minute
  3. Derivative on PV and proportional on error

As a consultant working on many controller types, I have been compiling a database of controller algorithms and tuning units over that past 20+ years. I learned that you often have to rearrange the manufacturer’s equations into a familiar format to see what algorithm they are using (Emerson is not the only culprit here and not the worst I have seen). And you should question the accuracy of the information given in controller equations – try to find text to back it up.

Stay tuned,

Jacques Smuts – author of Process Control for Practitioners.

5 Responses to “Unraveling Controller Algorithms”

  • Allan Zadiraka:

    Jacques –

    Very interesting article, especially when read with your linked article on PID Controller Algorithms. I disagree with your statement in that article that the parallel arrangement is non-intuitive and should be avoided.

    I spent most of my career with the Bailey 721/820 and Network 90 function codes 18 & 19 controllers which include both controller (Kc) and proportional gains (Kp). My training was to keep the controller gain at 1.0 since a parallel arrangement is much easier to tune. Changing Kc means you have to change Ki & Kd as well.

    To me, controller gain is a legacy of the mechanical arm adjustment in pneumatic controllers which needs to be eradicated.

    I have no problem with using PID control, just with the cookie cutter PID controllers that we are stuck with.

  • Said:

    We are working on a sliimar quadrotor project and we are newbeeies in the control algorithm. We have a working IMU now with precise Euler angle outputs. Our struggle is with the PID control. We just implemented a very simple PID control and tried tuning it to balance just pitch axis while keeping the other axis fixed on a stand. However, we could not get to a good enough result especially in high throttle. I would really appreciate if you could give us some feedback on the PID control you guys implemented.ThanksGuinness

  • We have to use the PID control algorithm supplied by the control system vendor in their hardware. That is why we have to understand what algorithm they provide so that we can tune it properly. If you tell me more about your algorithm and tuning methods I might be able to give you some direction.
    – Jacques

  • Anu:

    Interesting article. I have got a driver for a dc motor. I know my system and motor specifications. The driver software allows the user to decide the gains of the controller. But am required to tune the PI controller. How will I know what algorithm they have coded in the DSP of the driver? Without knowing the algorithm, how am I supposed to tune the controller? Please do give your inputs and suggestions.

  • Anu – I suggest you contact the supplier to obtain the algorithm and the units of measure for the tuning parameters. You could potentially also determine the algorithm by looking how the controller reacts to a setpoint change while holding the process variable constant when using different values for the tuning parameters, e.g. 0 and 1; 1 and 0; 1 and 1.

Leave a Reply

The Book for Practitioners