Categories
iOS Process Control

Controller Tuning Techniques

Why do I think anybody would be interested in controller tuning? Well, perhaps nobody is, but I can think of a few situations where it is useful to know how to do it or at least be able to tell whether it has been done correctly or not. Here are some scenarios.

  1. You work as a process engineer in a large processing plant. Most likely you are not responsible for the DCS system or loop tuning. However, if a unit is acting up (oscillatory, not staying on spec., etc.) it could be due to one or more poorly tuned controllers. I say could because many times it is a process problem and they are usually harder to fix. That’s why it is good to be able to eliminate controller tuning issues first.
  2. You are in charge of a pilot plant or an elaborate laboratory setup with instruments and controllers. Now you might be responsible checking the instruments and tuning controllers.
  3. You work with data analysis from either of the first two process scenarios. Analyzing dynamic process data can be challenging in its own right but poorly tuned controllers in the mix don’t make it any easier. More than once have I found strange oscillations in process data I’ve analyzed remotely. In those cases I ask the local process engineer or instrument technician for the controller tuning constants to see if they make sense.
  4. You might be a student or a process engineer setting up a dynamic process simulation in some commercial software. Or perhaps you have written your own simulation like I do. In either case you will most likely have some feedback controllers that need to be tuned for the simulation to be stable and give good results.
  5. You might be fortunate, like I was for many years, to be part of design teams for new plants or pilot plants. In those projects you might be responsible for suggesting new control strategies and test them in dynamic simulators. Knowing how to tune the controllers is of course a must in order to gauge whether the system is adequate and to be able to suggest tuning constants for those who ultimately configure the DCS system.

I’m only looking at tuning PID controllers since they are by far the most common controllers in use. If you feel unsure of what a PID controller is, or how it works, I recommend watching one of my YouTube videos, for example https://www.youtube.com/watch?v=sITzOS9sFAg.

Finding the best tuning constants for a PID controller depends to a large extent on what process is being controlled. In the processing industries we can classify a controller as either a flow-, level-, temperature-, pressure-, or composition controller. Once we have made this classification there are some rather simple tuning rules that can be applied to some of the classes. Before I share these simple rules let us take a look at a P&ID for a complete processing plant.

P&ID for a Vinyl acetate process. (adapted from Luyben, M. and Tyreus, B. , Computers Chem. Engng, Vol. 22, No. 7-8, pp. 867-877, 1998.)

I have redrawn this diagram from a paper I published in 1998 with Dr. Michael Luyben. It is useful to name controllers with a suffix to identify their class. So most controllers are either FC, LC, TC, PC, or XC corresponding to flow-, level-, temperature-, pressure-, or composition controllers. Of the 24 controllers in the process, half are either flow, level or pressure. So let me give you some simple tuning rules for these.

  1. Flow controllers: Kc = 0.2 – 0.5, Ti = 0.002 h (=0.12 minutes or 7 seconds). No derivative action allowed in flow loops.
  2. Level controllers: Kc = 2, Ti = 0. If Kc <= 1 is desired then set Ti so the following equality is satisfied Kc * Ti = T_HU where T_HU is the holdup time of the tank in the same units as Ti.
  3. Pressure controllers: Kc = 2 – 10, Ti = 0 for tight pressure control. If for some reason a lower gain is desired, the integral time cannot be too small. A similar rule as with level controllers apply.

Those simple rules took care of 50% of the controllers in our process without having to do plant testing or other process identification.

It is much harder to come up with general guidelines for temperature and composition loops. For these we have to look at the process gain in conjunction with the dead time to time constant ratio (D/tau). Or we can simply perform an ATV test on the process or the simulator and apply the Tyreus-Luyben (Professor William Luyben of Lehigh U. in this case).

Kc = Ku / 3.22, Ti = 2.2 * Pu

The following video demonstrates both the ATV test and the application of the T-L tuning rule to four different cases of a temperature control loop.

Conclusions

In this blog post I hope to have shown that knowing a bit about controller tuning can be useful and does not need to be rocket science. I have presented some general tuning rules for a few classes of controllers and shown how other loops can be identified and tuned. Most modern DCS systems and commercial simulators have provisions to make ATV tests.