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


Figure 1: The theoretical proportional, integral, derivative (PID) algorithm computes the next control effort by adding the error, the integral of the error, and the derivative of the error with weighting factors P, I, and D, respectively. Courtesy: Control EngineeringThe 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. 

Advantages of the standard algorithm

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.

Figure 2: The standard or noninteracting PID algorithm first adds the integral of the error and the derivative of the error using weighting factors. That sum is increased by 1, and the results are multiplied to compute the next control effort. Courtesy: Control EngineeringThe 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.

Figure 3: The series or interacting PID algorithm first computes the integral and derivative of the error signal, increases each by 1, then multiplies their product by Kp to compute the next control effort. Courtesy: Control EngineeringTuning 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. View the 2015 Top Plant.
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.
Pipe fabrication and IIoT; 2017 Product of the Year finalists
The future of electrical safety; Four keys to RPM success; Picking the right weld fume option
A new approach to the Skills Gap; Community colleges may hold the key for manufacturing; 2017 Engineering Leaders Under 40
Control room technology innovation; Practical approaches to corrosion protection; Pipeline regulator revises quality programs
The cloud, mobility, and remote operations; SCADA and contextual mobility; Custom UPS empowering a secure pipeline
Infrastructure for natural gas expansion; Artificial lift methods; Disruptive technology and fugitive gas emissions
Power system design for high-performance buildings; mitigating arc flash hazards
VFDs improving motion control applications; Powering automation and IIoT wirelessly; Connecting the dots
Natural gas engines; New applications for fuel cells; Large engines become more efficient; Extending boiler life

Annual Salary Survey

Before the calendar turned, 2016 already had the makings of a pivotal year for manufacturing, and for the world.

There were the big events for the year, including the United States as Partner Country at Hannover Messe in April and the 2016 International Manufacturing Technology Show in Chicago in September. There's also the matter of the U.S. presidential elections in November, which promise to shape policy in manufacturing for years to come.

But the year started with global economic turmoil, as a slowdown in Chinese manufacturing triggered a worldwide stock hiccup that sent values plummeting. The continued plunge in world oil prices has resulted in a slowdown in exploration and, by extension, the manufacture of exploration equipment.

Read more: 2015 Salary Survey

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.
The maintenance journey has been a long, slow trek for most manufacturers and has gone from preventive maintenance to predictive maintenance.
This digital report explains how plant engineers and subject matter experts (SME) need support for time series data and its many challenges.
This digital report will explore several aspects of how IIoT will transform manufacturing in the coming years.
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.
click me