The chief control engineer at one of the largest petrochemical refineries in South Africa once sent me an email after a course at his plant. He wrote that he had found the section on SWAG tuning of simple integrating processes one of the most informative of the whole course. After the course he went out into his plant for a couple of days and personally optimised 16 level controls. He found that the originally tuning in all of them was appalling. He decided to try tuning them using the methods covered in this section. Even though he had a Protuner, he found to his delight that he obtained excellent results.
As a matter of interest, this section arose from a course I was giving at a remote diamond mine in Namibia quite a few years ago. Their processing plant was quite primitive compared to the modern one they now have, and there was only one
In the previous three articles in this Loop Signature series, we looked at SWAG tuning of simple self-regulating processes. Now we go on to deal with simple integrating processes- like Level. Once again I must stress that this is for simple integrating processes. When it comes to tuning integrators with complex dynamics, such as very long dead times, with leads or large lags, you really do need to use a good tuning package like the Protuner.
Very few people have a real understanding of the characteristics of integrating processes, and how to go about tuning them. This is because the majority of control practitioners have not been taught about the differences between self-regulating and integrating processes. In most plants the majority of loops are self-regulating processes, which most people find easier to tune by trial and error, and they develop a feel for them. They then try and use that knowledge to tune integrating processes. This is where the main problem comes in, because integrating processes work is very different to
As a result we find that the vast majority of integrating processes in plants are tuned all wrong, and hence operate badly. Typically most are tuned extremely slowly, often with large over- and undershoots on setpoint step changes, followed by a very slow damped cycle that sometimes takes hours to die out. In my courses I always refer to the section on tuning simple integrating processes by a SWAG method as a brainwashing exercise, as we need to change the mindset that most people have about tuning. This will be illustrated as the article progresses.
Let us imagine we have been asked to tune the level control on a particular tank in your plant. The control requirements are:
• No cycling is permissible. This is the most important requirement.
• The response must be as fast as possible. Only one overshoot is permissible on a step change in setpoint.
We go out to the loop and perform a closed loop test as found (setpoint step change test using the existing tuning settings). The result is shown in Figure 1. It is pretty bad with huge overshoots and undershoots with a damped cycle that takes nearly half an hour to die out. We can see why the process people want something done about it if they don’t want cycling. Incidentally I encounter responses like this on many level controls in the majority of plants I work on.
Now, assuming we have not been taught much about integrating processes, we will try and tune the loop the way we would a
How do we do this? Well, all our experience on self-regulating processes has taught us that if the response is too fast, then we must reduce the controller gain (Kp), i.e. increase the proportional band. Going into the controller parameter settings, we find that the person who had previously tuned the controller had set in a
Being determined to really get rid of the cycling, we reduce the gain by a factor of 10 and set the
SWAG Tuning Rule 1: Switch off I and D (if it has been used) and use P only control.
SWAG Tuning Rule 2: Make setpoint changes and establish the closed loop response you want by trial and error by adjusting Kp
A test showing the response to a setpoint change with a
Higher gain in the P only controller will give the advantages of a smaller offset and also a faster control response. However, the higher the gain, the more the output of the controller (PD) moves around, thus leading to more valve wear and a shorter life. There is also very often a high noise amplitude in level measurements. This will be amplified through the P term of the controller, again increasing valve wear. Therefore, when tuning integrating processes like level, one has to carefully balance valve life against control performance.
In the example we are tuning here, the control response shown in Figure 3 is with a
SWAG Tuning Rule 3: Once you are happy with the response, and if the offset is not a problem, then the job is done. Leave the controller like that.
Note that integrating loops are in actual fact better without an I term in the controller. There are two reasons for this: the first is that any hysteresis on a valve on an integrating process that is controlled with P + I control will result in continuous cycling, and the second reason is that the I term introduces a second integral term into the combined loop process transfer function, and prevents perfect pole cancellation tuning from being achieved.
However, if the offset is unacceptable, which may be the case here, as with a P gain of 4 (i.e. a proportional band of 25%), relatively large offsets would result if big load changes occur, and one must then use the I term.
SWAG Tuning Rule 4: If you need to use the I term because the offset is unacceptable, then the next step is to determine the process gain. To recap, and also referring to Figure 4, the process gain of an integrating process is given by:
On our loop the PG works out as 0,01/second.
SWAG Tuning Rule 5:
This works out for the loop we are working on as:
= 100 seconds/repeat
The recording of a closed loop step test with this tuning is shown in Figure 5. It can be seen that the control is working very well with good recovery from load changes.
SWAG Tuning Rule 6: The SWAG formula for the I term given in Rule 5 above is very approximate and is relatively safe. In most cases if you feel the response is too slow, you can reduce the integral by trial and error. As you do so, you will find the overshoot will increase on setpoint changes, but the response to load changes will be faster. However, do not let the response get too cyclic. I generally prefer to tune integrating processes so that the response to setpoint changes results in only one overshoot.
To change your mindset when tuning integrating processes, the little equation given in Rule 5 is really a SWAG type of formula, but it gives excellent results. Moving the denominator on the right side to the left hand side gives us:
In most cases PG is also a constant. Moving it to the right hand side results in an equation:
This means that if you wish to change the response by altering Kp, then you need to change I proportionally. Thinking a bit further about this, we see that the higher the gain we put in, the faster we can make the integral. This goes completely against our gut feeling based on years of experience tuning mostly self-regulating processes. However it’s true, and it works well within reasonable boundaries. There are a lot of advantages for using higher gains on integrating processes, which generally need tuning with relatively slow integrals, so being able to speed up the integral is great.
Conversely, if you really must have a slow response and need to reduce Kp, then you must increase the I term proportionally. Be careful that the process gain is in fact constant. If it varies, which it will do for example on non-uniform tanks, or gravity feed tanks, then you must also take it into account. If the PG varies then at least one or both of the other two terms must change to keep the constant the same.
About Michael Brown
Michael Brown is a specialist in control loop optimisation, with many years of experience in process control instrumentation. His main activities are consulting and teaching practical control loop analysis and optimisation. He now presents courses and performs optimisation over the internet. His work has taken him to plants all over South Africa and also to other countries. He can be contacted at: Michael Brown Control Engineering CC, +27 82 440 7790
© Technews Publishing (Pty) Ltd | All Rights Reserved