PID spotlight, part 5: What does good and bad controller tuning look like?
PID controllers have visual cues that you can use to identify performance problems. Improperly set controller gain, integral, and derivative offer unique patterns that you can use to guide your efforts to improve controller performance. See seven takeaways for better PID tuning.
Learning Objectives
 Understand how too much controller gain, integral, or derivative will cause a controller to swing regardless of how the other two tuning constants are set.
 Know that too little gain or integral will result in sluggish controller response regardless of how the other tuning constants are set.
 Understand that a poorly tuned controller gives visual cues that can be used to identify the tuning problem and thus suggest a possible correction.
PID controller tuning insights
 Too much controller gain, integral, or derivative causes the controller to swing regardless of how the other two tuning constants are set.
 Too little gain or integral will result in sluggish controller response regardless of how the other tuning constants are set.
 Using derivative, where appropriate, permits more aggressive overall tuning, which will improve response to setpoint (SP) changes and rejection of process disturbances.
 When a tuning constant is set improperly there is a unique visual signature that you can use to identify the incorrect tuning constant.
There are reportedly some 400 to 500 published looptuning methods. Each supposedly provides “ideal” tuning constants. In reality, no process is ideal, and therefore the best that any control loop tuning method can do is provide a good starting point.
This is not to disparage any single loop tuning method, including open and closed loop tuning methods that will be discussed later in this series. Each method offers unique insight into proportionalintegralderivative (PID) controller performance, and each has advantages and disadvantages. Knowing each of the methods and when to use them is an essential skill and will greatly improve looptuning results. But they will rarely give you a final answer.
What this means is control loop tuning is as much art as science; therefore it is in our best interests to build up some intuition about how proportional, integral and derivative work together. You should know what a welltuned PID controller looks like. You also should be able to tell when a controller is not well tuned and, based on the controller’s response, be able to draw some conclusions about what the PID constants ought to look like; that is, to have some intuition about what needs to be changed. This comes down to pattern recognition, which is something that most of us are very good at. Pattern recognition forms the core of the heuristic controller tuning method that will be discussed as heuristics are used to trim controller tuning to your final answer.
But first we need to know what patterns we are looking for. Before we discuss what “good” looks like let’s look at one way to benchmark good controller performance, comparing it against the process response when the controller is turned off.
Most loop tuning methods assume that a selflimiting process has deadtime and only one lag, also known as first order plus deadtime (FOPDT). Figure 1 shows a process that has three lags, therefore most tuning methods will give an approximate set of tuning constants. This isn’t a problem. It only means that you may have to trim the tuning constants using heuristics to get the response you need.
Note that open loop settling time is about 4 minutes. Ideally, once we close the loop (place the controller in Auto) the controller should get the process variable (PV) to match the setpoint (SP) at least as fast, and preferably faster, than the 4minute open loop settling time.
What good looks like: Critically damped tuning
Figure 2 is a PID controller tuned for critically damped response (tuning that is critically damped gets to SP as fast as possible without overshoot). Critically damped tuning is used when the SP to the process changes frequently, and we do not expect frequent or severe disturbances.
In figure 2, we see that the PV does get to the new SP faster than the openloop settling time, about 2.5 minutes instead of 4. We also can see that once the PV reaches SP the controller output (OP) doesn’t move very much.
The controller gain, integral and derivative contribution plots show us how the three work together. When the SP is changed, the gain immediately jumps 11%, and the integral starts to ramp up at ~6%/minute (1.1/1.9). The OP steps from 70% to 81% and rises as high as 84.4%. Derivative doesn’t start moving until the PV starts moving, at which time it starts pulling the OP down. The gain contribution also starts dropping as the error decreases while the integral continues to climb because the error is still negative (PV – SP). The overall effect is the OP drops to slightly below 80%. As the PV gets close to SP its speed of approach decelerates quickly, causing the derivative contribution to start to drop back toward zero. At this point in time the gain contribution continues to move toward zero as error decreases and the integral contribution slows down. The net effect is that the OP stops moving, and then returns slowly toward 80%. In the end the gain and derivative contributions end up at zero, as we expect, and the integral contribution is 10%, matching the SP change for a process with a gain of 1.0.
To get the PV to SP faster than open loop response the OP must spend some time above its final resting value, which is done by the initial action of the gain and integral. Once the PV starts moving the OP should drop back toward its final resting value. An ideal controller would drop the OP to its final value without overshoot. There is some overshoot which probably cannot be eliminated using a PID controller, but this is still good tuning for a SP change.
This controller is not tuned for optimal disturbance rejection. The disturbance that shows up shortly before the 11minute mark does get turned starting after about 1 minute (the apparent process deadtime), but the disturbance isn’t eliminated for almost 7 minutes.
What good looks like: Disturbance rejection tuning:
Figure 3 is a PID controller tuned for disturbance rejection (tuning that eliminates a process disturbance as fast as possible without swinging). Disturbance rejection tuning is used when we expect frequent or severe disturbances. If we also expect frequent SP changes, we should consider some form of advanced SP processing (this is a future topic in this series).
In figure 3, we see the disturbance that shows up shortly before the 11minute mark gets turned starting after about 1 minute (the apparent process deadtime), but this time the disturbance is eliminated in 3 minutes. Best disturbance rejection should occur in about 2 to 3 times the apparent deadtime and the shape of the PV curve should be roughly symmetrical. Once the disturbance is eliminated the PV and OP should settle in with minimal swinging.
The controller gain, integral and derivative contribution plots show that all three start upward when the disturbance starts with derivative leading the way (looks at the future) followed by gain (the present) then integral (tied to the past). Derivative gives the controller an immediate jump in responding to the disturbance, then turns around as the disturbance turns around to pull the OP back toward the new resting value. Controller gain, of course, mirrors the PV departure from SP. Integral continues upward until the error is eliminated. In the end controller gain and derivative return to zero, and the change in integral contribution (and change in OP) matches the size of the disturbance.
Note that the bigger controller gain and faster integral results in a large jump in OP when a SP change occurs that causes the PV to overshoot. Advanced SP processing is recommended if the sudden change in OP will upset downstream processes. There are multiple advanced SP processing options (to be discussed later); choose the one best suited to the situation.
Finally, note that there can be considerable differences in “optimal” tuning constants depending on how you want the controller to work. None of the more than 400 tuning calculation methods can answer the question, “What does this controller really need to do?”
What bad looks like: Too much controller gain
Figure 4 shows the response to a SP change of a PID controller with too much controller gain. Integral and derivative are set for disturbance rejection.
In PID spotlight part 4, we saw that when the controller gain was set too high (in the absence of integral and derivative) the process swings and the PV and OP peaks line up. This is a clear indicator that the controller has too much controller gain.
When integral and derivative are present, close alignment of the PV and OP peaks is a strong indicator that the controller gain is too high. In this particular case derivative action is turning the OP a little early in anticipation that the PV is going to change direction. Without derivative the OP peak might slightly trail the PV peak. In either case, we could infer that too much controller gain is our likely problem and that it should be reduced.
What bad looks like: Integral set too fast
Figure 5 shows the response to a SP change of a PID controller with the integral set too fast (smaller value). Controller gain is tuned for critical damping and derivative is set to onefourth of integral per best practice for moderate selflimiting processes.
In PID spotlight part 4 we also talked about how integral creates phase lag, which shows up as a delay between the PV changing direction and the OP changing direction. Thus if we saw the OP peak trailing the PV peak we could infer that the PID controller integral constant was set too fast (too small). In fact, if the controller only has integral then the OP peak occurs when the PV crosses SP because that is when integral changes direction.
When controller gain and derivative are present, we should never see a case where the OP peaks when the PV crosses SP. Controller gain and derivative will pull the OP peak closer to the PV peak. The real question is: Are controller gain, integral and derivative properly balanced? If the process is swinging and the OP peak significantly trails the PV peak, we can infer that we likely have too much integral (though “significant” is open to interpretation).
(For decades, the standard advice for “fixing” a swinging controller has been to cut controller gain. For the classical PID algorithm, this will stop swinging, but if controller gain isn’t the problem you will end up with very sluggish control. If your control system happens to use the parallel PID algorithm, you will make the swinging worse if integral is the problem because changing gain does not affect integral.)
What bad looks like: Too much derivative
Figure 6 shows the response to a SP change of a PID controller with too much derivative. Controller gain and integral are tuned for disturbance rejection.
Here we see one of the reasons derivative is not often used; if too much is applied, it causes the OP to swing wildly chasing small changes in the direction of the PV. In figure 6 the amplitude of the OP swings is much larger than the amplitude of the PV swings. This causes the OP to “hunt” before finally settling on a final value. Note that the OP changes direction before the PV in anticipation that the PV will change direction (hence derivative’s alternate name preact).
Because derivative amplifies PV swings to the OP, it will amplify process noise; it is often easier to avoid derivative than to balance PV filtering and derivative. We also had noted that derivative is only useful for moderate selflimiting processes. In short, most people simply avoid it.
However, derivative does have value in specific situations and should be considered where applicable.
What bad looks like: Too little controller gain
Figure 7 shows the response to a SP change of a PID controller with too little controller gain. Integral and derivative are set for critically damped response.
Up above we said that good control requires that the PV gets to SP in less time than the open loop response, and that to get there the controller OP needed to jump above the final OP. Here we see that this doesn’t happen; the initial OP bump is far below the final resting value. Essentially, controller gain is not holding up its part of the bargain, leaving integral to do all the work.
There are a couple of caveats to be aware of:

There are occasions when you will want to tune a controller very slowly, in which case this may be perfectly acceptable tuning.

Deadtime dominant processes must be tuned with the controller gain below the final OP value, otherwise the controller will be unstable. Instead, for deadtime dominant processes the controller OP should be equal to the final OP only when the PV starts moving. This will be the sum of the controller gain response and the integral response before the PV starts moving (this will make more sense when you see a picture).
Finally, note that with the classical form of the PID equation when we reduce controller gain, we also slow down the integral action. The parallel PID equation does not do this, which means you get a very different response when you cut controller gain – the control response may get more oscillatory. This is why it is important to understand the form of the PID equation your control system uses.
What bad looks like: Integral set too slow
Figure 8 shows the response to a SP change of a PID controller with the integral set too slow (larger value). Controller gain and derivative is tuned for critical damping.
In figure 8, we see that the controller has a good initial response to the SP change. After the deadtime passes the PV starts moving smartly toward the SP. As expected, the controller gain contribution falls as the error drops. And then the PV stalls. Looking at the integral contribution we can see that the integral is moving far too slowly and as a result the PV takes a long time to get to SP. This is not just a problem for response to a SP change. We can see that the initial response to a disturbance is reasonable, but then the disturbance persists because the integral responds too slowly to eliminate the remaining error.
What bad looks like: Too little derivative
Figure 9 shows the response to a SP change of a PID controller with too little derivative. Controller gain and integral is tuned for disturbance rejection.
If you have been in control very long you have heard that you should never ever use derivative. It is true that there are a limited number of situations where using derivative helps, one of which is a moderate selflimiting process with multiple lags (like this one). Another would be an exponential process. Both situations feature a PV that accelerates when disturbed – it has a curve. Derivative allows the PID controller to look around the curve. The caveat to this statement is there has to be a curve, otherwise derivative has no value.
For this particular process if we don’t use derivative the most aggressive tuning we can apply without excessive swinging is a controller gain of 1.1 and integral of 2.2. In this case adding derivative allows us to raise controller gain about 35% and speed up integral about 45%.
Seven takeaways for better PID tuning
Here’s a sevenreminder summary to improve PID tuning.

A welltuned control loop will respond to a SP change faster than open loop.

Conversely, a poorly tuned control loop will settle the PV on SP slower than open loop.

Too much controller gain, integral, or derivative will cause oscillatory control behavior (swinging) regardless of how the other two tuning constants are set. Getting two out of three right is not good enough.

Too little gain or integral will result in sluggish controller response regardless of how the other tuning constants are set.

In the limited number of situations where derivative can help adding derivative permits more aggressive overall tuning, which will improve response to SP changes and rejection of process disturbances.

Therefore, it is important to get all three tuning constants correct.

When a tuning constant is set improperly there is a unique control loop response. This results in a unique visual signature that you can use to identify the incorrect tuning constant. This can be used to guide our loop tuning efforts using heuristic tuning methods.
Ed Bullerdiek is a retired control engineer with 37 years of process control experience in petroleum refining and oil production. Edited by Mark T. Hoske, content manager, Control Engineering, CFE Media and Technology, mhoske@cfemedia.com.
KEYWORDS: Proportionalintegralderivative, PID tutorial
CONSIDER THIS
Can you use visual cues to identify controller performance issues?
Do you have experience and expertise with the topics mentioned in this content? You should consider contributing to our WTWH Media editorial team and getting the recognition you and your company deserve. Click here to start this process.