Sunteți pe pagina 1din 3

Level Controller Tuning

Level control loops are common in industrial processes, but tuning level controllers can be
challenging. Many level loops oscillate, sometimes causing large parts of their adjacent
processes to oscillate with them. This article describes how to tune level controllers.

Figure 1: A level control loop.

An important thing we need to know about level loops is that liquid level in a vessel is an
integrating process, which responds differently from a self-regulating process. Therefore it has a
different process model that requires a different set of tuning rules. See my article on level
control loops for some general guidance.

Level controller tuning really is not all that difficult if you follow a few basic steps. There are
always a few outliers, but in general I like tuning level loops and find them reasonably easy to
tune. If the level controller output cascades to a flow controller (more info here), you have to
tune the flow control loop first. Ill assume you have done that already and are now ready to tune
the level loop.

You should tune any controller based on the process dynamic response. Obtaining a model for
the dynamic response of a tanks level is easy:

Make sure as far as possible that the uncontrolled flow into/out of the vessel is as
constant as possible.
Place the level controller in manual control mode.
Wait for a steady slope in the level. If the level is volatile, wait long enough to be able to
confidently draw a straight line though the general slope of the level.
Make a step change in the controller output. Try to make the step change 5% to 10% in
size, if the process can tolerate it.
Wait for the level to change its slope and settle into a new direction. If the level is
volatile, wait long enough to be able to confidently draw a straight line though the
general slope of the level.
Restore the level to an acceptable operating point and place the controller back in auto.

Now determine the process model:

Draw a line (Slope 1) through the initial slope, and extend it to the right (Figure 2).
Draw a line (Slope 2) through the final slope, and extend it to the left to intersect Slope 1.
Measure the time between the beginning of the change in controller output and the
intersection between Slope 1 and Slope 2. This is the process dead time (td), the first
parameter you require for tuning the controller.
Note: Express your dead time measurement in the same time-base your controller uses
for its integral time setting, i.e. minutes or seconds.
Pick any two points (PV1 and PV2) on Slope 1, located conveniently far from each other
to make accurate measurements.
Pick any two points (PV3 and PV4) on Slope 2, located conveniently far from each other
to make accurate measurements.
Calculate the difference in the two slopes as follows:
DS = (PV4 PV3)/T2 (PV2 PV1)/T1
Note: Express your T1 and T2 measurements in the same time-base your controller uses
for its integral time setting, i.e. minutes or seconds.
If your PV is not ranged 0 100 %, convert DS to a percentage of the range as follows:
DS% = 100 x DS / (PV range max PV range min)
Calculate the process integration rate (ri) which is the second and final parameter you
need for tuning the controller:
ri = DS% / dCO

Figure 2: Measurements for tuning a level loop.

Now that you have the dead time (td) and the process integration rate (ri), you can tune the
controller. If the control objective is a nice and fast response to quickly recover from
disturbances, you can use a modification of the Ziegler-Nichols (Z/N) tuning rules. The
modification involves a slight detuning of the controller because the original Z/N tuning rules
result in a very aggressive loop response and low tolerance for any change in operating
conditions. I call the amount of detuning the stability margin, denoted by SM. You should set
SM to a value of 2.0 or larger. The larger you make SM, the slower the loop will respond. In this
way you can use SM as a fine-tuning factor.

Note:

The tuning rules below assume your controllers proportional setting is in gain Kc, not
Proportional Band, PB. If not: PB = 100 / Kc.
The tuning rules below also assume your controllers integral setting is in units of time Ti
(i.e minutes or seconds), not repeats per time Ki. If not: Ki = 1 / Ti.
The tuning rules below also assume you have a controller with an interacting algorithm
(although they work fairly well on noninteracting algorithms too), but not a parallel
algorithm. For controllers with the parallel algorithm, you need to divide Ti by Kc, and
multiply Td by Kc, to obtain their integral and derivative settings, respectively.
See my article on PID controller algorithms for more details.

To calculate tuning constants for a PI controller:

Kc = 0.9 / (SM x ri x td)

Ti = 3.33 x SM x td

Td = 0

And for a PID controller:

Kc = 1.2 / (SM x ri x td)

Ti = 2 x SM x td

Td = td / 2

Important Note:
Some level controllers should not respond fast, e.g. when controlling the level of a surge tank.
Surge tanks need a different set of tuning rules to ensure you make maximum use of the surge
capacity, while not exceeding the upper and lower level limits. Follow this link for tuning surge
tank level controllers.