More answers on how to automate: The mechanics of loop tuning

Here find more expert answers about PID tuning, part of a “How to automate” series webcasts from Control Engineering, including simulation software, PID loop-tuning instructions, overlooked PID tuning advice and quantifying poor control into dollars lost. The Aug. 1 webcast is archived for a year.

By Control Engineering August 14, 2024
Figure 2: This classic image shows a flow controller with a bad control valve. The PV draws a square wave and the OP draws a peaked wave. This is typical for a valve without a positioner. Positioners tremendously reduce the number of problem valves, but when they go bad, they create their own kind of fun. If you do not install positioners on many or most control valves, you may see a lot of this. Learn more in the webcast, “How to automate: The mechanics of loop tuning.” https://www.controleng.com/webcasts/how-to-automate-the-mechanics-of-loop-tuning Courtesy: Control Engineering webcasts, Ed Bullerdiek, a retired process control engineer

 

Learning Objectives

  • Understand more answers on PID loop tuning topics including simulation software, PID loop-tuning instructions, overlooked PID tuning advice and quantifying poor control into dollars lost.
  • Learn how to view the PID loop tuning webcast, before Aug. 1, 2025, “How to automate: The mechanics of loop tuning.”

A process control expert provide more answers about proportional-integral-derivative (PID) tuning for process control applications, after the Control Engineering Aug. 1 webcast, “How to automate: The mechanics of loop tuning” that will be archived for a year. Audience listening live had the opportunity to earn a one professional development hour and submit questions after the formal webcast presentation.

Some answers below, from questions not answered during the webcast, include information on how simulation software help control loop tuning, easy PID loop-tuning instructions for beginners, overlooked PID tuning advice and help with translating poor control into dollars lost.

Webcast instructor for the loop tuning mechanics webcast, objectives

The instructor in the webcast and expert providing the extra answers below is Ed Bullerdiek is a retired control engineer with 37 years of process control experience in petroleum refining and oil production.

Figure 1: Ed Bullerdiek, a retired control engineer with 37 years of process control experience in petroleum refining and oil production, provided more answers after the Control Engineering Aug. 1 webcast, “How to automate: The mechanics of loop tuning,” archived for a year. Courtesy: Control Engineering webcasts, Ed Bullerdiek, a retired process control engineer

Figure 1: Ed Bullerdiek, a retired control engineer with 37 years of process control experience in petroleum refining and oil production, provided more answers after the Control Engineering Aug. 1 webcast, “How to automate: The mechanics of loop tuning,” archived for a year. Courtesy: Control Engineering webcasts, Ed Bullerdiek, a retired process control engineer

The learning objectives for the webcast were:

  • Understand the etiquette for working with operators.

  • Take steps to avoid upsetting the process while tuning.

  • You aren’t done when you are done: How to close out a loop tuning session properly.

Question: Can simulation software help with calculating accurate controller tuning constants?

You can get surprisingly good tuning constants from surprisingly low fidelity simulations. Just getting tuning constants that are in the ballpark can be a win during a hectic process startup.

Question: What is a good practice to tune controllers that have a delayed feedback (around five minutes for emissions control in a power plant)?

I assume by “delayed feedback” you mean deadtime (it doesn’t matter if the deadtime comes from the process or sample delay in the instrument). Unfortunately, the deadtime will negatively impact controller performance. Following ordinary controller tuning methods should get you the best PID tuning possible. If this is not good enough you will need to explore ways to eliminate the deadtime (assuming this is instrument deadtime) or perhaps look beyond this webcast topic to implement model predictive control.

Question: Are there easy PID loop-tuning instructions for beginners?

If you want to read the minimum amount of information necessary to do loop tuning read the PID spotlight 5 article and the upcoming PID spotlight 9 articles. These cover how to recognize what is causing bad controller performance and what to do about it. This is the core of the heuristic loop tuning method (a fancy way of saying educated trial and error), which will usually get you adequate results if your process is a normal self-limiting process. The simplified version of the process is “it looks like I have too much controller gain, so let’s lower controller gain by 25%.” (Rinse and repeat.)  Feel free to ignore some of the fancy calculations. They speed up the process, but you can get by without them. [Also see PID terminology in PID spotlight 2.]

Part 1 – Three reasons to tune control loops: Safety, profit, energy efficiency

PID spotlight, part 2: Know these 13 terms, interactions

PID spotlight, part 3: How to select one of four process responses

PID spotlight, part 4: How to balance PID control for a self-limiting process

PID spotlight, part 5: What does good and bad controller tuning look like?

PID spotlight, part 6: Deadtime? How to boost controller performance anyway

PID spotlight, part 7: Open-loop tuning of a self-limiting process

In September, see PID spotlight, part 8 on closed loop tuning of a self-limiting process.

In October, see PID spotlight, part 9: on heuristic tuning of a self-limiting process.

Question: How will artificial intelligence (AI) help PID tuning?

AI does pattern recognition; heuristic loop tuning is based on pattern recognition. I would expect that if the patterns can be correctly encoded into AI that AI-facilitated controller tuning could be very successful.

Question: Many loops have valve problems. How do valve problems affect closed-loop tuning?

I have not done closed-loop tuning in the real world in more than 20 years and do not recommend it. It is too hazardous for use in a refinery.

That said, a valve with stick/slip problems (hysteresis) will cause one of these problems:

  • It may be hard to get a continuous swing started if the initial bump is below the hysteresis limit.

  • It may be difficult to identify when a steady swing is established as the swing peaks will vary somewhat randomly.

  • The apparent natural period will be longer than the actual natural period. Smaller swings will have a longer apparent natural period than larger swings. This is because hysteresis creates variable deadtime depending on how fast the commanded valve position moves through the hysteresis deadband. Faster swing means less deadtime.

Figure 2 shows a classic graph of a flow controller with a bad control valve.

Figure 2: This classic image shows a flow controller with a bad control valve. The PV draws a square wave and the OP draws a peaked wave. This is typical for a valve without a positioner. Positioners tremendously reduce the number of problem valves, but when they go bad, they create their own kind of fun. If you do not install positioners on many or most control valves, you may see a lot of this. Learn more in the webcast, “How to automate: The mechanics of loop tuning.” https://www.controleng.com/webcasts/how-to-automate-the-mechanics-of-loop-tuning Courtesy: Control Engineering webcasts, Ed Bullerdiek, a retired process control engineer

Figure 2: This classic image shows a flow controller with a bad control valve. The PV draws a square wave and the OP draws a peaked wave. This is typical for a valve without a positioner. Positioners tremendously reduce the number of problem valves, but when they go bad, they create their own kind of fun. If you do not install positioners on many or most control valves, you may see a lot of this. Learn more in the webcast, “How to automate: The mechanics of loop tuning.” Courtesy: Control Engineering webcasts, Ed Bullerdiek, a retired process control engineer

Question: Any more suggestions on when adaptive control may be required?

PID control is linear and time invariant, so it expects a linear and invariant process. In simple terms, the process gain is always the same regardless of the process variable (0-100% of span) and regardless of anything going on in the overall process. Similarly, with the deadtime and lag(s). Therefore, adaptive control may be required if:

  • The process is inherently non-linear.

  • There are valve issues like quarter turn valves or split range control.

  • There are variable transport delays.

  • There is back-mixing that varies based on feed rate (for example, surge tanks).

I’m sure you can come up with others.

If you have a situation where a process runs at the same rate continuously, adaptive gain or integral will not be required; tune for the rate you normally run at and live with suboptimal control for those brief periods when you are running at different rates.

You can also address non-linearity issues through the use of straight feedforward, feedforward with feedback trim, or X to flow cascade arrangements to “linearize” apparent valve characteristics (flow is so fast relative to temperature that a poorly tuned flow controller looks linear to the cascade primary.)

Question: What is the most efficient way to deal with deadtime?

Through tuning alone, there is no efficient way to deal with deadtime.

If you can measure process disturbances then feedforward is the best way to deal with deadtime.

You can get some improvement using model-based control to achieve deadtime compensation, however unmeasured disturbances will still cause problems.

You should also look at ways to prevent disturbances from entering the process in the first place (tune all the upstream controls).

Question: When should derivative control be used or avoided?

Derivative tries to look ahead (or peek around the corner) by looking at how the direction of the process is changing. This means that for self-limiting processes derivative is usually only helpful when a process has multiple lags with similar time constants, and there is little or no noise. The way to spot a process with multiple similar lags is when the process variable (PV) starts to move after an output (OP) change has a visible curve (see PID spotlight article on deadtime part 6, figure 5b). Otherwise, derivative is not recommended when there is significant noise, for lag dominant or deadtime dominant processes, or any process that makes sharp changes in direction. This covers the vast majority of control loops, which is why most people have been told “never use derivative.” This admonition actually makes a certain sort of sense given how rarely derivative truly is useful.

Question: Is it a good idea to specify system sampling times for digital output and for sensor input?

This gets a strong “It depends.” If you need fast response, then you should specify overall acceptable control loop latency. This should include every element of the control loop: instrument response, communications to the I/O card (if you use a digital bus), input card, I/O bus, controller execution speed, I/O bus (again), output card, communications to the valve and valve response speed. All of these items contribute to deadtime, which negatively affects tuning. (Never be afraid to consider old-time mechanical devices like pressure regulators if you need really fast response.)

Praise for Control Engineering PID tuning webcast, related Control Engineering PID articles

  • Thanks, Ed, for sharing your knowledge. Great presentation and articles, guys.
  • Well done, Ed! Thank you, Ed and Mark.

Question: How do tuning methods differ for fast or slow changes?

Conceptually, tuning methods do not differ for fast or slow changes. All processes with the same lag/deadtime ratio behave the same way, with the only difference being how fast (horizontal scale) and how big (gain).

Practically, however, there is a vast difference in tuning methods for fast or slow changes. Fast loops are easy to tune in the sense that it doesn’t take much time to gather the data. There is also little likelihood that external disturbances will pollute the data collection effort. Slow loops can be very difficult to tune because of the time commitment and the high probability of external disturbances. This means that your best bet is to use heuristics as this poses the lowest risk and is less susceptible to external influences.

Question: Please discuss the most-overlooked PID tuning advice.

I have two widely overlooked pieces of PID-tuning advice.

  1. Maintain PID tuning logs. Many control engineers have told me: “I can just retune the loop if I have to.” They simply do not see a value in this, and, since they refuse to maintain logs, they will never see a value in this.

  2. Don’t walk away when tuning slow processes. As mentioned in the presentation, a controller cannot begin to correct a disturbance until one-half the natural period has passed. Trial-and-error PID tuners (and there are a large number out there) often change tuning constants far too quickly while tuning slow loops, which creates a muddled response. They never take the time to figure out what the true process dynamics are, and therefore never get to acceptable tuning.

Question: You have more advice about tuning cascade loops?

Cascade controls get tuned from the bottom up. This is because the response of the secondary affects the response to the primary.

The primary controller should be connected to a process that is five times slower that the cascade secondary (primary process lag > 5 * secondary process lag). If this is not the case, then the primary integral constant should be five times slower than the secondary integral constant. You should make a note in the tuning log stating that the integral is intentionally slow.

This is required to prevent setting up a resonance between the primary and secondary, which will result in instability.

Verify that anti-reset windup logic is setup properly for the cascade primary. Otherwise, you run the risk of having the primary windup if the secondary cannot keep up, which will result in overshoot (possibly severe) when the process changes direction. Alternately you can use an external reset PID controller for the primary. In this case, tie the external reset signal to the secondary controller PV.

Question: How do you configure a system with a slow responding sensor?

Regarding slow responding sensors, unfortunately there is not a lot you can do. This is going to create deadtime, which will affect controller performance.

Question: Will you please show an example of a loop tuning log including log entries?

Slide 29 of the presentation provides an excellent example (Figure 3). This could be done in any spreadsheet software.

Figure 3: This slide 29 in the webcast, “How to automate: The mechanics of loop tuning.” https://www.controleng.com/webcasts/how-to-automate-the-mechanics-of-loop-tuning provides an excellent example of a loop-tuning log. Log content should reflect the configuration choices the control system provides. The log provided shows most choices the last system I worked on allowed. Do not be afraid to write notes. The value of keeping logs may not show up for several years, which can make this a hard sell to many control engineers. Eventually you will notice trends that will help fix the nagging issues that every facility has. Courtesy: Control Engineering webcasts, Ed Bullerdiek, a retired process control engineer

Figure 3: This slide 29 in the webcast, “How to automate: The mechanics of loop tuning,” provides an excellent example of a loop-tuning log. Log content should reflect the configuration choices the control system provides. The log provided shows most choices the last system I worked on allowed. Do not be afraid to write notes. The value of keeping logs may not show up for several years, which can make this a hard sell to many control engineers. Eventually you will notice trends that will help fix the nagging issues that every facility has. Courtesy: Control Engineering webcasts, Ed Bullerdiek, a retired process control engineer

The important thing here is not the technology used to keep the logs. Early in my career we kept handwritten logs in a three-ring binder. The content of the log should reflect the configuration choices the control system gives you. The log provided provides most of the choices the last system I worked on allowed.

Do not be afraid to write notes. Most will be brief (such as, “Initial tuning” for a new controller). Some will be lengthy (“Tuned slowly to mitigate interaction with 00AC0001” if you have detuned a controller due to interaction problems.)

The value of keeping logs may not show up for several years, which can make this a hard sell to many control engineers. Eventually you will start to notice trends, at which time you can concentrate on fixing the nagging issues that every facility has.

Question: What’s your opinion about adaptive model-based control?

Tuning software I have seen does a fine job on easy-to-tune controllers. It will turn out serviceable tuning constants quite reliably. However, it often fails on difficult controllers, typically slow or noisy processes. As a very experienced engineer, I no longer need help with easy controllers, and I have found that I can get tuning constants faster than any tuning software I have worked with.

That said, tuning software will help new process control professionals or instrument technicians tune most controllers reliably. Unfortunately, tuning software uses an identification algorithm that forces the data to fit a model (for example, first-order plus deadtime) and makes calculations based on the assumed model. If the process doesn’t really fit the assumed model, then the tuning constants will not be truly optimal. This may be OK if your other option is abysmal tuning or the performance of this controller doesn’t have a huge impact on the overall profitability of the process. (Of course, you can use tuning software to get first cut tuning constants and then trim out using heuristic methods.)

Manual tuning by an expert still has a place in a process facility. Many processes do not fit the assumptions of the automated tuning tools; critical thought is required to achieve optimal performance. Fortunately, this is likely a minority of your loops. Unfortunately, this is where most of the money is.

If we believe that human expertise is still required for the small percentage of big money loops, then we need to have a method in place to create experts. The only way to create experts is to have non-experts manually tune simple controllers, which will not happen if a site places too much emphasis on loop tuning software.

Question: Do you have tips on composition control (slow, overhead, etc.) subject to unmeasured disturbances?

From a pure loop-tuning perspective slow or fast doesn’t matter. Since your problem is unmeasured disturbances, the tuning will need to be more aggressive (quarter amplitude damping to SP changes might be about right). You should also look at options beyond tuning.

Question: Is there a way to translate poor control into dollars lost?

Maximum profitability generally occurs when you can operate against constraints without a process trip or off-specification product. So how often do you:

  • Produce off-spec product?

  • Experience process upsets and trips?

  • Damage equipment from mis-operation?

  • (Hopefully you never) get people injured?

  • Operate at reduced rate?

Question: Have you seen anything like a PID-loop-tuning easy button?

Quantifications help. Is there a way you can translate poor control into dollars lost? Maximum profitability generally occurs when you can operate against constraints, and you never ever have a process trip, and you never produce off-spec product. So how often do you:

  • Produce off-specification product?

  • Experience process upsets and trips?

  • Damage equipment from mis-operation?

  • (Hopefully you never) get people injured?

  • Operate at reduced rate?

What does the bottom line look like if you can reduce these by 10%, 25% or 50%? What if you can increase throughput by 5 or 10%?

When I arrived at the first refinery where I worked, the refinery produced off-spec product frequently, units upsets were routine, and something shutdown monthly. It was a constant struggle to deal with the chaos. By the time I left eight years later the culture had changed completely; the refinery seldom produced off-spec product, units were seldom upset, and the new operators were concerned about entering a planned maintenance shutdown because “I’ve been on this unit four years, and I’ve never seen a shutdown.” My boss commented on the huge improvement in equipment reliability because we weren’t beating it up anymore. When I got there, everybody’s focus was on getting past the next crisis; by the time I left, everybody’s focus was on optimizing refinery operations. (Needless to say, the financials for our little refinery looked very good.)

I know testimonials will not help with your current management. They will have some excuse for why this is “different.” You may need to pursue improving control on the sly.

As for an “easy button,” see if you can acquire one of the loop tuning tools on the market. These are reasonably inexpensive. They may not do a good job resolving difficult loops, but my guess is your problem is probably all the easy loops. Grind through the easy ones, focusing on the ones likely to make the most money. As a general rule, tune from front to back and from bottom up. If you can clean up the front of a unit, then the tuning on the back end becomes less important. Don’t forget utilities as (for example) an upset in the fuel gas system causes disturbances in every heater in the facility.

If you can free up some money you should consider bringing a loop tuning consultant into the plant to provide an opportunity review, tune some of the more egregious loops and perhaps do some training. Scoring a couple of wins might open the door to more opportunities.

I wish you good luck because I know this is hard.

Edited by Mark T. Hoske, editor-in-chief, Control Engineering, WTWH Media, mhoske@wtwhmedia.com, also the moderator for this webcast.


Related Resources