PID math demystified, part 3: More on derivative control

Consider how a PD controller would work, without an integral function. Would you ever want to use that approach?

10/21/2013


To investigate how derivative action works, let’s look at a proportional derivative or PD controller. PID controllers are far more common than PD alone, but we already have an understanding of the integral component’s effects from the first two parts of this series, so we don’t need to review it again.

For a PD controller, we add the derivative of the error into the equation. Similar to what we discussed in the previous posts, we’re not really interested in deriving a derivative of the error function. Conceptually, the derivative in this case refers to how fast the error is changing. So, if we take the change in error divided by the change in time we get the slope.

Conceptually, the derivative in this case refers to how fast the error is changing. So, if we take the change in error divided by the change in time we get the slope.

To explain how this works, let’s look at the pseudo code for this controller. The calculation of error is the same as before: setpoint minus process value. Since the derivative reduces down to the change in error, the output is now the same proportional component as before: gain times error. The current error minus last error is multiplied by the gain and divided by the derivative time constant. The current error is stored in last error for use in the next scan.

Error : = Setpoint – ProcessValue;

Output : = K * Error + K/tau_i * (Error – LastError);

LastError : = Error; // save for next scan



So what does this mean?

The proportional component is affected by the error at that time, in the present. The integral component is affected by an accumulation of the error, or the past. The derivative component is a measure of how fast the error is changing, or a prediction of the future error.

How is this prediction of the future used? At first glance you might think that this term would be used to get you to your setpoint that much faster. But, that is not really the case. In practice, the derivative component is used to detect when the process variable is changing too fast, and it puts the brakes on to prevent overshooting the setpoint.

So if the derivative component acts as brakes on the momentum, how does it get you to the setpoint faster? It does this by allowing you to use a higher proportional gain to get you there quickly, but dampening the overshoot that would normally make that level of gain unstable.

The tuning constants for derivative control are typically the same units as the time constant for reset. A couple of other considerations though are important. On many controllers the derivative term is filtered independently. This prevents signal noise or spurious disturbances from being interpreted as a change in momentum, which causes the derivative action to overreact. Also, on some controllers the derivative does not actually derive from the error, but instead on the process variable signal alone. This prevents a change is set point from being seen as a change in momentum.

This video summarizes our PID discussions with a graphical explanation.

I hope this helps to demystify PID, at least a little.

Read Demystifying PID part 1.

Read Demystifying PID part 2.

Also read Understanding Derivative in PID Control.

This post was written by Scott Hayes. Scott is a senior engineer at MAVERICK Technologies, a leading automation solutions provider offering industrial automation, strategic manufacturing, and enterprise integration services for the process industries. MAVERICK delivers expertise and consulting in a wide variety of areas including industrial automation controls, distributed control systems, manufacturing execution systems, operational strategy, business process optimization and more.



LARRY , WA, UNITED STATES, 10/29/13 05:00 PM:

I understand that one goal of this article is to remain brief and simple. But for the case of derivative feedback, maybe a little more warning should be given about the potential hazards of the simplification shown.

Derivative control is often derided as "noisy" and "destabilizing" and switched off without consideration. The particular implementation shown in the pseudocode example can share part of the blame. It substitutes a simple difference of measured terms as an estimate for the actual derivative (which is in general unknown). When this is used by a digital controller at a sample rate sufficient to produce a good, smooth response, there is little time for the last two terms to change by much. To get any meaningful effect out of the difference, it is necessary to apply a very high gain factor. Or an equivalent way to think of this, the derivative approximation is really the difference of the last two terms DIVIDED BY the sampling time interval, and the impact of that division is equivalent to a large scaling factor. Either way, the side effect of a large multiplier is to increase sensitivity to the noise included in the measured terms. But on the other hand, a naive application of a smoothing filter to counteract the noise can produce time lags that impair stability -- the opposite of the desired "damping effect." Not all derivative estimators are created equal.
Serg , Belarus, 10/29/13 10:05 PM:

I did not do math calculations for long time and practically would be agree that in most cases derivative action is disabled by engineers in PID controllers. However sometime observing curves, trends how controller responding I had feeling that it shall go faster.
One thing is non-linearity of control elements, all math formulas is good for linear models only; I have understood that almost 4 years ago and did try to rectify that problem by putting variable gain K in conformance with Valve flow characteristics (control element). Just recently I have discovered, that information has been discussed later on ISA conference and full article can be accessed and read via link: http://www.isa.org/InTechTemplate.cfm?Section=Current_Issue&template=/ContentManagement/ContentDisplay.cfm&ContentID=92938
Second one is by manipulating of values of gain K can be achieved fast reaction of PID controller. Each PID controller has “idle mode” close where Error small, but since process disbalanced, when the Error between SP and PV is rising, would be good to have derivative action value in place for some time. Working with PLC I have seen that in PID controllers exist FF (Feed Forward) input with value minus-zero-plus. In simple words by creating additional logics calculating FF signal on process error I have achieved that PID controller have been reacting incrementally faster as error was rising and going slower as error back to normal to idle conditions. Probably someone can put it in Math calculations and I would be happy to see feedback, for control engineer’s consideration.
DON , OR, United States, 11/06/13 09:17 PM:

It would be helpful to include a listing of those types of processes which are more likely to benefit from adding dirivative. First order processes with minimal delay do well with P+I. Integrating processes have difficulty with integral action. P+D could be a good choice for a level control where you need to keep the level bounded but without a s setpoint. Dirivative can be used on second order processes.
ALFRED , AR, United States, 08/08/14 06:58 PM:

Thanks for providing this series on PID.It saved me agreat deal of time in my teaching schedule.
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.
The Engineering Leaders Under 40 program identifies and gives recognition to young engineers who...
2016 Engineering Leaders Under 40; Future vision: Where is manufacturing headed?; Electrical distribution, redefined
Strategic outsourcing delivers efficiency; Sleeve bearing clearance; Causes of water hammer; Improve air quality; Maintenance safety; GAMS preview
World-class maintenance: The three keys to success - Deploy people, process and technology; 2016 Lubrication Guide; Why hydraulic systems get hot
Flexible offshore fire protection; Big Data's impact on operations; Bridging the skills gap; Identifying security risks
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
Applying network redundancy; Overcoming loop tuning challenges; PID control and networks
Driving motor efficiency; Preventing arc flash in mission critical facilities; Integrating alternative power and existing electrical systems
Package boilers; Natural gas infrared heating; Thermal treasure; Standby generation; Natural gas supports green efforts

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.
This article collection contains several articles on the vital role that compressed air plays in manufacturing plants.
This article collection contains several articles on the Industrial Internet of Things (IIoT) and how it is transforming manufacturing.
This article collection contains several articles on strategic maintenance and understanding all the parts of your plant.
click me