Fixing PID, Part 2

04/28/2014


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.

Filtering

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 controleng@msn.com

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.

ONLINE

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 Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by...
The System Integrator Giants program lists the top 100 system integrators among companies listed in CFE Media's Global System Integrator Database.
The Engineering Leaders Under 40 program identifies and gives recognition to young engineers who...
This eGuide illustrates solutions, applications and benefits of machine vision systems.
Learn how to increase device reliability in harsh environments and decrease unplanned system downtime.
This eGuide contains a series of articles and videos that considers theoretical and practical; immediate needs and a look into the future.
Additive manufacturing advancements; Machine vision enhances robotics; Fieldbus evolution; Process safety; Advice from System Integrators of the Year; Road to IANA
Salary and career survey: Benchmarks and advice; Designing controls; Remote data collection, historians; Control valve advances; Hannover Messe; Control Engineering International
System integration: Best practices and technologies to help; Virtualization virtues; Cyber security advice; Motor system efficiency, savings; Product exclusives; Road to Hannover
This article collection contains several articles on the Industrial Internet of Things (IIoT) and how it is transforming manufacturing.
PLCs, robots, and the quest for a single controller; how OEE is key to automation solutions.

Find and connect with the most suitable service provider for your unique application. Start searching the Global System Integrator Database Now!

The digital oilfield: Utilizing Big Data can yield big savings; Virtualization a real solution; Tracking SIS performance
Getting to the bottom of subsea repairs: Older pipelines need more attention, and operators need a repair strategy; OTC preview; Offshore production difficult - and crucial
Digital oilfields: Integrated HMI/SCADA systems enable smarter data acquisition; Real-world impact of simulation; Electric actuator technology prospers in production fields
click me