Fixing PID, Part 2


Suppressing the derivative kick

On the other hand, there are occasions when a PID controller's performance can be improved by deliberately ignoring setpoint changes. Once again, the controller's derivative action is at the center of this issue.

Recall that the derivative action tends to add a dramatic spike or "kick" to the overall control effort when the error changes abruptly during a setpoint change. This forces the controller to act immediately without waiting for the proportional or integral action to take effect. Compared to a two-term PI controller, a full three-term PID controller can even appear to anticipate the level of effort that will ultimately be required to maintain the process variable at the new setpoint, especially when the controlled process is particularly fast.

But overly dramatic spikes in the control effort can do more harm than good in applications, such as room temperature control, that require slow and steady changes in the process variable. A blast of hot air following every adjustment to the thermostat would not only be uncomfortable for the occupants of the room but hard on the furnace as well.

In those cases, it is advantageous to forgo derivative action altogether or to calculate the derivative from the negative of the process variable rather than directly from the error between the setpoint and the process variable. If the setpoint is constant, the two calculations will be identical anyway. If the setpoint only changes in a stepwise manner, the two calculations will remain identical except at the instant when each step change is initiated, but using the negative derivative of the process variable in the calculation of the derivative action eliminates the spike present in the derivative of the error. See the "Derivative Kick" section below for more information.

The spike induced by a setpoint change can also be mitigated by filtering the setpoint just like the process variable or the control effort. However, a setpoint filter doesn't remove noise so much as it takes advantage of the averaging operation's tendency to make abrupt changes appear much slower. When filtered, stepwise changes in the setpoint appear to the controller to be more gradual, thereby eliminating the abrupt changes in the error that would otherwise lead to spikes in the control effort.

Setpoint filters can also be useful in cascade control applications. Filtering the setpoint for the inner loop also filters the control effort for the outer loop with all the advantages detailed above. For more details on how such filters are implemented, see "The Basics of Numerical Filtering," Control Engineering, September 2008.


A numerical filter averages its input history Fin(0) through Fin(k) to generate its next output Fout(k+1). The most basic filter algorithm, known as "first order," adds a fraction of the most recent input to a fraction of the most recent output to create a running total:

That fraction α between 0 and 1 determines how much of the input history figures into the averaging operation according to this equivalent formula:

Choosing a value of α close to 0 as in Filter A above makes

so that the output sequence looks very much like the input sequence with limited filtering. Choosing a value of α close to 1 as in Filter B makes

so the output changes particularly slowly but incorporates a very long sequence of inputs into its average for maximum filtering. The fraction α is known as the filter's time constant when describing how long it takes for the output to reach a steady state after the input has stopped changing. Alternately, α is known as the smoothing factor when describing how much filtering is being accomplished along the way. When applied to a PID controller's process variable, setpoint, or control effort, a numerical filter can reduce the effects of measurement noise at the expense of closed-loop responsiveness or vice-versa, depending on the value chosen for α.

Derivative kick

Here two PID controllers are applied to the same process driven by the same sequence of setpoint values. At each sampling interval, Controller A calculates the derivative component of its control effort (the derivative action) by computing the latest change in the error between the setpoint and the process variable. Controller B computes its derivative action by subtracting the process variable from zero rather than the setpoint. If the process is relatively slow, as in this example, both methods will drive the process variable toward the setpoint along more-or-less the same trajectory. However, Controller A will tend to "kick" the actuator toward 0% or 100% capacity for an instant following each setpoint change as shown by the green spikes at times 1, 2, and 3. Controller B avoids those potentially damaging spikes but otherwise generates roughly the same control efforts as Controller A.

And for more ways to fix PID problems, including time delays, modeling, integrating process, multi-variable control, and loop tuning, watch for the next installment of this series. 

Vance VanDoren, PhD, PE, is Control Engineering contributing content specialist. Reach him at

Key concepts:

  • PID controllers are deployed in many process applications, but not always thoroughly understood.
  • Manufacturers of PID controllers adjust the mechanism at various times to solve specific control challenges.


Read more about PID control strategy and tuning below.

<< First < Previous 1 2 Next > Last >>

WILLIAM , CA, United States, 05/16/14 01:56 PM:

The most effective addition is "feed-forward" action (FFD), also known as "bias calculation". Given the current input conditions, you calculate the required output to hit the setpoint. Even better if you add lead/lag to each. The PID then acts to slowly fine-tune to the setpoint. It often requires more sensors, but one usually has that with a PLC or SCADA. The simplest form is "setpoint windage" in some panel PID controllers. Automotive and turbine engines have long used FFD (accel pump in carburetors, MAP, MAF, TPS, IAT, and crankshaft sensors).
Jouko , Non-US/Not Applicable, Finland, 05/20/14 07:42 AM:

The reason why PI control is commonly used instead of PID is the noise. When you have to use heavy filtering in the D-part you are actually canceling the derivation. Thus it is better not to use the derivative part at all.
Regarding the feed-forward, it is definitely what you should use whenever it is possible.
LARRY , WA, United States, 05/21/14 05:06 PM:

One of the reasons that "D-filters" tend to have rather poor performance is that they are typically "model free" -- their results are based on the past history of raw inputs, which can be very noisy. A short history leads to high noise sensitivity, while a long history leads to a delayed estimate indicative of past rather than present conditions. Model based approaches (Kalman filters, Active Disturbance Rejection state observers, alpha-beta filters, etc.) do not suffer as much from this. Model updates continuously enforce consistency among model state variables, which provides "smoothing" benefits similar to frequency-selective filters. Then, feedback is calculated from the current-time model state, avoiding the worst of the time delay problems.
Olivier , Quebec, Canada, 06/13/14 02:40 PM:

Text-figure consistency little bug?
Maybe I am wrong but shouldn't we read in Figure 2:
PID Controller A using SP-PV...
PID Controller B using -PV...?
The Top Plant program honors outstanding manufacturing facilities in North America. View the 2013 Top Plant.
The Product of the Year program recognizes products newly released in the manufacturing industries.
The Engineering Leaders Under 40 program identifies and gives recognition to young engineers who...
A cool solution: Collaboration, chemistry leads to foundry coat product development; See the 2015 Product of the Year Finalists
Raising the standard: What's new with NFPA 70E; A global view of manufacturing; Maintenance data; Fit bearings properly
Sister act: Building on their father's legacy, a new generation moves Bales Metal Surface Solutions forward; Meet the 2015 Engineering Leaders Under 40
Cyber security cost-efficient for industrial control systems; Extracting full value from operational data; Managing cyber security risks
Drilling for Big Data: Managing the flow of information; Big data drilldown series: Challenge and opportunity; OT to IT: Creating a circle of improvement; Industry loses best workers, again
Pipeline vulnerabilities? Securing hydrocarbon transit; Predictive analytics hit the mainstream; Dirty pipelines decrease flow, production—pig your line; Ensuring pipeline physical and cyber security
Upgrading secondary control systems; Keeping enclosures conditioned; Diagnostics increase equipment uptime; Mechatronics simplifies machine design
Designing positive-energy buildings; Ensuring power quality; Complying with NFPA 110; Minimizing arc flash hazards
Building high availability into industrial computers; Of key metrics and myth busting; The truth about five common VFD myths

Annual Salary Survey

After almost a decade of uncertainty, the confidence of plant floor managers is soaring. Even with a number of challenges and while implementing new technologies, there is a renewed sense of optimism among plant managers about their business and their future.

The respondents to the 2014 Plant Engineering Salary Survey come from throughout the U.S. and serve a variety of industries, but they are uniform in their optimism about manufacturing. This year’s survey found 79% consider manufacturing a secure career. That’s up from 75% in 2013 and significantly higher than the 63% figure when Plant Engineering first started asking that question a decade ago.

Read more: 2014 Salary Survey: Confidence rises amid the challenges

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.