What is it that derivative is supposed to help accomplish when tuning proportional-integral-derivative (PID) loops? Most of us get by most of the time with simply using the P and I components when tuning a loop. And if the loop is reasonably fast, such as a flowmeter or speed adjustment or even pressure, we can get the job done and not have to deal with derivative.

When we’re dealing with loops that have long response times such as temperature loops for tanks or dryers, there is a tendency to over-damp those loops to avoid massive overshoot of the process variable.

As an example, think about driving your car. Pretend that you are the PID loop control, the speedometer is your process variable, and the speed limit (at least in your mind) is the setpoint. If you only use P to govern how you apply the accelerator, then you’ll never reach setpoint because P needs some error in order to have an output. And since this is a linear direct proportion (gain being the proportionate factor), it is also immediately responsive. You would get a lot of accelerator when the car was first at zero speed, and then as the speed increased the accelerator would be decreased in proportion to the difference between the current speed and the desired speed (setpoint).

Well, you don’t want to have a setpoint in mind of 80 mph and only be going 50 mph. So you need to incorporate something that continues to add to the accelerator as long as there is an error. Since this error is measured algebraically and you are below the desired speed, you need to determine how much to continue to add every time you look at the speedometer in order to reach your desired speed (integral component). This integral component needs to know how often you’re going to look at the speedometer and how much to add as a function of how far you are from the desired speed (setpoint). Of course, the closer you get to the speed, the less proportional correction you have, so you have to keep adding the integral component to make up for that loss and continue to increase your speed.

As you get closer and closer to the desired speed, the entire accelerator action is the result of the integral addition—remember that with no error (desired minus actual) there is no proportional contribution.

So all is well until you reach the desired speed. By now, you’re shoving down the accelerator pretty aggressively—remember that the integral can’t reduce its contribution until the algebraic sign changes (speed goes over desired setpoint). So here you are zooming down the highway and the only thing you have for adjusting your speed down is again the integral. But now you have a change in the algebraic value—the integral will subtract its contribution in accordance with the same proportion and time interval that was used to increase the accelerator. So you can see that not a great deal is going to happen to reduce speed until you have some measurable error on the other side of the setpoint.

Wouldn’t it be nice if you had some way of knowing that you should be backing off the accelerator a little bit prior to blasting through the setpoint? Yes, you know you are getting close to the setpoint with just P and I, and make the contributions smaller as you get closer. What you don’t know is how quickly you are closing in on the speed target. Wouldn’t it be nice to have something that could help you understand that you are approaching the setpoint way too aggressively and need to start backing off before you get there?

This is where derivative comes in. What the derivative component does is look at rate of change. Remember that integral is adding less and less as we approach the setpoint, but we need derivative to be removing some contribution as a result of rate of change. Its job is to start slowing down the closure rate (back off the accelerator a little) before you get there. As it removes some accelerator, then the rate of change reduces so that the next time it looks at the speedometer, it removes less than the time before, etc.

The idea is once you have reached setpoint, the derivative contribution is now zero along with the proportional contribution and the total contribution is now attributable to the integral component.

I acknowledge that this speedometer story is a simplistic example, but I also feel that we sometimes overthink this PID tuning issue and get lost in the process.

Not all loops can be successfully tuned using PID, for example if they are improperly designed mechanically. There is a mechanical gain in the system that adds to the complexity as well. For example, if the control valve is so large for the required steady-state flow that steady state is barely open, then the mechanical gain of the system is too high and something needs to be adjusted mechanically to allow the control algorithm to accomplish its task. Unstable sensor feedback is another factor that will make tuning a PID difficult if not impossible. There are other examples, but the essence of the story is to help people think through what derivative is intended to do and not be afraid to apply it when needed. The only other option to limit overshoot is to simply over-damp the loop until it sluggishly reaches setpoint and then sluggishly corrects.

*Ray Bachelor is president of Bachelor Controls Inc., a certified member of the Control System Integrators Association (CSIA). For more information about Bachelor Controls, visit its profile on the Industrial Automation Exchange.*