# Not all PID controllers are the same

## Variations in the proportional, integral, derivative (PID) algorithm from one controller to the next can be confusing. Here are considerations when applying PID to your next implementation.

11/28/2017

The beauty of the proportional, integral, derivative (PID) algorithm for feedback control is its simplicity. The controller need only compute the current error between the measured process variable and the desired setpoint, then calculate how much and how fast that difference has been changing over time. The controller then can combine the resulting proportional, integral, and derivative terms to generate a suitable control effort.

The trick is in deciding how to best combine those three terms or modes to achieve the most efficient regulation of the process variable. The most obvious way is to use a simple weighted sum where each term is multiplied by a tuning constant or gain, and the results then are added together (see Figure 1). The relative contributions of each term then can be adjusted by choosing appropriate values for the proportional gain (P), integral gain (I) and derivative gain (D).

But that's not how most PID controllers actually work in industrial applications. Commercial PID controllers do compute the error signal, its integral, and its derivative, but they typically combine those three quantities using a slightly rearranged formula with a different set of tuning parameters: controller gain (Kp), integral time (Ti), and derivative time (Td), as shown in Figure 2.

The weighting factors for the proportional, integral, and derivative terms in the standard PID algorithm are Kp, Kp/Ti, and Kp x Td, respectively. That may seem complicated unnecessarily, but there is a method to that madness. Configuring Kp to affect all three terms equally gives the control engineer a single knob to turn to make the overall controller more aggressive or more conservative.

Furthermore, the format of the standard PID algorithm gives physical significance to Ti and Td that can be illustrated best by a conceptual experiment. Imagine opening the feedback loop, resetting the controller to a zero output, and inputting a constant error into the controller. The output of the proportional term (the proportional action) immediately will assume a constant value while the output of the integral term (the integral action) will start ramping up from zero. The magnitude of the integral action will catch up to the proportional action in exactly Ti seconds.

The integral time therefore describes the relative strengths of the proportional and integral actions in terms of the time each requires to achieve the same contribution to the overall control effort. A relatively weak integral action corresponds to a longer value of Ti and vice-versa. Similarly, a relatively weak derivative action corresponds to a longer value of Td and vice-versa (though the conceptual experiment that demonstrates this correlation involves inputting a ramp into the offline controller rather than a constant error.)

Potential for confusion

Fortunately, it's easy enough to compare the theoretical and standard PID algorithms and relate P, I, and D to Kp, Ti, and Td as follows:

P = Kp

I = Kp / Ti

D = Kp x Td

The proportional gain P is the same as the controller gain Kp, so a control engineer unaware of the difference between the theoretical and standard PID algorithms might also assume that "integral gain" is synonymous with "integral time," and "derivative gain" is synonymous with "derivative time." Unfortunately, that mistake makes tuning the loop virtually impossible.

Suppose, for example, that an inexperienced control engineer has determined that a particular feedback loop requires a theoretical controller with a proportional gain of 3, an integral gain of 2, and a derivative gain of 1. Entering those three values into a standard commercial controller under the headings of controller gain, integral time, and derivative time would be akin to setting:

P = 3

I = 3/2 = 1.5

D = 3 x 1 = 3

The controller would end up with the desired degree of proportional action but 25% less integral action (with a gain of 1.5 rather than 2) and three times as much derivative action as the engineer had intended.

Which is which?

A third PID algorithm adds to the confusion. Some commercial controllers use the series or serial form as shown in Figure 3. A control engineer trying to tune three controllers in otherwise identical loops will get different results if one controller happens to use the theoretical algorithm, the second uses the standard algorithm, and the third uses the series algorithm.

Worse still, both the theoretical and standard algorithms sometimes are described as the ideal algorithm, even though they're different. Consequently, some techniques for tuning ideal controllers won't work on some ideal controllers.

On the other hand, the phrases parallel, ideal parallel, and independent seem to refer exclusively to the theoretical algorithm in which the proportional, integral, and derivative terms operate independently and in parallel rather than in series. Ironically, the three terms in the standard algorithm also operate in parallel, but standard and parallel are almost never used synonymously.

Tuning terminology

The tuning parameters themselves also have different labels depending on who's describing them. When PID controllers were first developed, the derivative term was known as the pre-act mode because it seemed to act preemptively, accelerating the controller's corrective efforts beyond what the proportional term could manage on its own. Early control engineers increased or decreased the degree of preemptive (derivative) action by selecting a larger or smaller pre-act time. Today's PID vendors typically describe a controller's derivative action as its rate.

Integral action was known originally as automatic reset because the integral term seemed to automatically adjust the setpoint to the exact value required to eliminate the steady-state offset caused by the proportional term (see "The Three Faces of PID," Control Engineering, March 2007). Some control engineers still specify the reset time when tuning a controller's integral term, but a higher reset time corresponds to less integral action, not more.

Alternately, the degree of integral action is sometimes specified in terms of the reset rate, which is the inverse of the reset time and entirely unrelated to the derivative rate. Confusing "reset" and "reset rate" leads to increased integral action when the control engineer wants less, and vice-versa.

Likewise, the proportional gain in some PID controllers is specified in terms of its inverse known as the proportional band. More precisely, the proportional band is 100 divided by the proportional gain so that it represents the percent change in the error signal necessary to cause a full-scale change in the proportional action. Confusing "proportional band" with "proportional gain" leads to decreased proportional action when the control engineer wants more, and vice-versa.

More variations

Compounding the confusion are the various ad hoc enhancements that have been developed over the years to improve a PID controller's performance (see "Fixing PID," Control Engineering, November 2012, May 2014, December 2015).

Fortunately, all these fixes work no matter which PID algorithm a particular controller uses, and most are available at least as options on most commercial controllers. On the other hand, it's not always obvious which options have been selected for a particular controller that is already in operation.

For example, the process variable signal often is filtered before it enters the PID calculation so as to remove measurement noise that would otherwise cause the control effort to fluctuate unnecessarily (see "The Basics of Numerical Filtering," Control Engineering, October 2008).

Unfortunately, filtering the process variable also tends to make the controller look sluggish. A control engineer, unaware that a filter is in place, might try to make the controller more responsive by turning up the controller's gains. The desired closed-loop performance might be achievable, but the filter and the PID algorithm will end up working against each other.

With so many variations on the PID algorithm in use today, the first step when retuning or otherwise modifying an existing controller has to be determining exactly which kind of PID controller it is.

This article appears in the Applied Automation supplement for Control Engineering and Plant Engineering.

- See other articles from the supplement below.

The Top Plant program honors outstanding manufacturing facilities in North America.
The Product of the Year program recognizes products newly released in the manufacturing industries.
Each year, a panel of Control Engineering and Plant Engineering editors and industry expert judges select the System Integrator of the Year Award winners in three categories.
2018 Engineering Leaders under 40, Women in Engineering, Six ways to reduce waste in manufacturing, and Four robot implementation challenges.
GAMS preview, 2018 Mid-Year Report, EAM and Safety
2018 Lubrication Guide, Motor and maintenance management, Control system migration
SCADA standardization, capital expenditures, data-driven drilling and execution
Machine learning, produced water benefits, programming cavity pumps
ROVs, rigs, and the real time; wellsite valve manifolds; AI on a chip; analytics use for pipelines
Burners for heat-treating furnaces, CHP, dryers, gas humidification, and more
Choosing an automation controller, Lean manufacturing
Effective process analytics; Four reasons why LTE networks are not IIoT ready

### Annual Salary Survey

After two years of economic concerns, manufacturing leaders once again have homed in on the single biggest issue facing their operations:

It's the workers—or more specifically, the lack of workers.

The 2017 Plant Engineering Salary Survey looks at not just what plant managers make, but what they think. As they look across their plants today, plant managers say they don’t have the operational depth to take on the new technologies and new challenges of global manufacturing.

Maintenance and reliability tips and best practices from the maintenance and reliability coaches at Allied Reliability Group.
The One Voice for Manufacturing blog reports on federal public policy issues impacting the manufacturing sector. One Voice is a joint effort by the National Tooling and Machining...
The Society for Maintenance and Reliability Professionals an organization devoted...
Join this ongoing discussion of machine guarding topics, including solutions assessments, regulatory compliance, gap analysis...
IMS Research, recently acquired by IHS Inc., is a leading independent supplier of market research and consultancy to the global electronics industry.
Maintenance is not optional in manufacturing. It’s a profit center, driving productivity and uptime while reducing overall repair costs.
The Lachance on CMMS blog is about current maintenance topics. Blogger Paul Lachance is president and chief technology officer for Smartware Group.
This digital report explains how everything from conveyors and robots to automatic picking systems and digital orders have evolved to keep pace with the speed of change in the supply chain.
This digital report explains how plant engineers need to take greater care when it comes to electrical safety incidents on the plant floor.
Articles in this digital report highlight technologies that enable Industrial Internet of Things, IIoT-related products and strategies.
Maintenance Manager; California Oils Corp.
Associate, Electrical Engineering; Wood Harbinger
Control Systems Engineer; Robert Bosch Corp.
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
This eGuide explains how the operation of hydraulic systems for subsea applications requires the user to consider additional aspects because of the unique conditions that apply to the setting