why do you need integral action for level control

Translate This Thread From English to

Threaded View


According to the theory that I was taught, if your level controller
cascades to a flow controller on the total flow out of a vessel, then
this is an integrating process, if the response of the flow is much
faster than the response of the level, a good assumption for the
transfer funtion of the process would be kp/s. Building a software
model of this system, I find that a P-only controller works very well
and gives me steady state accuracy, i.e. I don't need integral control
action.
But if I do this in the plant, I find that I do need a PI-controller;
a P-only controller does not control the level to setpoint.
Why is this? Can somebody explain this to me please.


Re: why do you need integral action for level control




Because some thing is adding more fluid to your tank.  Even if there
is no error the pump must keep pumping fluid out at the rate the fluid
is coming in so there is no net change and there error is maintained
at the SP.   Where does this extra signal come from if you are using
only P gain and it sees no error?   I bet you see an error in
proportion to the rate the fluid is being added to the tank.  You have
found the answer.  Use the I gain,  It will windup to provide a
control signal in proportion to the flow rate,

Peter Nachtwey






Re: why do you need integral action for level control




Because your model of Kp/s does not represent your plant.

You must just make a small modification to your model; add the varying
inflow to the controller output before applying it to the integrator
term Kp/s. Then you will find that the model, similar to the real
plant, will also not give steady state accuracy using a P-only
controller, and you will need the I-action for steady state accuracy.

PI Controller works well for level control, but use mainly P-action,
even with very weak I-action the closed loop response is very good.
There's nothing like strong I-action to make level control unstable
very quickly.

Pieter Steenekamp


Re: why do you need integral action for level control



wrote:

Good, How?


Yes, I said that already.


How do you justify this?


How do you know?  Is there an equation to justify your statement?
I don't believe you just stepped in it after I gave the forum a
warning about upgrading the quality of the posts..


OK, but what is strong?

You are right that the OP needs to modify his model.  For one thing
the gain is negative because increasing the pump speed makes the level
lower.  I have more but I will wait for replies.

John, if you want more information go to
http://www.plctalk.net/qanda/showthread.php?t&395&highlight=sigreg
There is a Scilab simulator script for your application at or near the
end of the thread.  Download Scilab at www.scilab.org.

Peter Nachtwey


Re: why do you need integral action for level control



Thanks for the comments Peter, I will try my best to help you.


You add a summer block with two inputs; one input from the controller
output, and the other on representing the inflow. The output of the
summer is then connected to the input of the pure integrator
representing the vessel.



Good, we agree then.


To close the material balance around a vessel with a uncontrolled
inflow and controlled outflow, the outflow must equal the inflow, then
the level will be stable. This stable level is not necessarily at the
required value; the setpoint could typically be 50% and this stable
level is maybe 70%.
In this scenario, proportional control action will do nothing, because
the level is not changing, but integral control action will now change
the outflow to make the level equal to the setpoint. But this is now
causing the material balance to go unbalanced. Strong integral control
action will cause strong material unbalance and this makes the closed
loop unstable.

If you do a bode-plot of the pure integrating process, you will also
see that. The P-action does not contribute to the -90 degrees phase
shift caused by the process 1/s term, so, disregarding the other lags
and dead times, P-action will never make an integrating-only process
unstable (In practice there are of cause lags and dead times also, but
still, you will find that with P-action, you can have very strong
control action before the loop goes unstable). I-action, on the other
hand, contributes another -90 degrees phase shift and with even the
slightest  additional lag and dead time (that you always get in real
processes), the closed loop goes unstable very easily.

My experience over many years back this up too. In process plants I
have found many LCs with strong oscillatory closed loop behaviour. I
normally then just decrease the integral control action by a factor of
10, and increase the proportional control action by a factor of two,
and nine times out of ten, the closed loop response is then
significantly better. Try this.

Pieter Steenekamp


Re: why do you need integral action for level control



Another way of looking at why you may need Integral Action (is offset
a real problem in all cases?) for a Level Loop lies in the 'bias'
value associated with the P-Only Controller.

The typical P-Only controller form is Output = BIAS + GAIN*ERROR.

For an integrating process (ie: a level loop), as mentioned earlier,
is only steady at its balancing point, (outflow=inflow).  If the BIAS
value is set to the value of the controller output that makes the
outflow (if controller based on outflow) equal to the inflow then a P-
Only controller will not result in offset from SP.  Now this is where
the 'real-world' kicks in, since the inflow is a wild-stream, you
would constantly have to change the BIAS to compensate, which is
basically what integral action does, albeit in a much less intelligent
fashion.

I have also seen papers on an internal feedback method (Sung and Lee
(1996)  and Arbogast (2006)) that basically use an inner controller to
stabilize the non self-regulating process and an outer controller
which now sees a self-regulating (stable) process; its basically a
cascaded system where both controllers use the same process
variable.

Bob Rice


Re: why do you need integral action for level control



wrote:

If you don't have enough integrator gain the tank will overflow before
the motor winds up enough to match the flow.  It would be a real shame
to have the tank over flow when the flow is well within the capacity
of the pump just because the integral action is too low.   So what
gain is is too high?  We don't know becasue we don't really know what
John's system but the formulas within the tanklevel.sce allow one to
simulate what will happen one real numbers are entered for the plant.
One should be able to predict the maximum error in the level that
occurs as the flow goes from 0 to 100%.   This would be handy because
then well will know if the tank will overflow.  Unfortunately I didn't
include those computations in the tanklevel.sce.  I also didn't plot
the in flow rates but you can add that.  Notice that in the
tanklevel.sce there are some equations that calculate the PID gains as
a function of the plant gain, time constant and a closed loop time
constant.  The tanklevel.sce program doesn't assume the pump will
respond instantly so the tanklevel.sce is just a little more
complicated.  The response is supposed to be a critically damped
response.  Take a look at the integrator gain or time constant.  It is
calculated.   The point here is that I don't have to fly by the seat
of my pants and neither does John now.

So what model did I use?  Bob, I know you know.

if you don't have the model then how do you make one a phase-gain/
nichols charts to prove the system is stable or unstable?

Peter Nachtwey


Re: why do you need integral action for level control




How do I just love this! I very nice technical challenge.

I am at the airport on my way to see a customer, so I can't do it
right now. But I will stick my neck out and make a statement and say
how I will test it. Maybe I'll be wrong, then I'll eat humble pie, but
who's right or wrong is not really the issue, we both want to help
John.

My statement is that your statement quoted above is wrong. Let me
qualify that: if you have a steady tank with the level at setpoint and
a disturbance is applied to the system, in the form of a change in
inflow, with the level control on outflow (typical arrangement in
process industries), P-only control will be able to give stronger
disturbance rejection than PI-control. (This is not typical objective
in the a typical process industries application)

I had a quick glance at the reference you gave above, so I'll try to
proof my statement using your Scilab models (I might of course need to
adjust it to reflect my scenario). I'll do it before Monday and get
back to this forum (maybe I'll proof myself wrong, but I won't have a
problem in admitting it, all I want is to help John)

Pieter Steenekamp


Re: why do you need integral action for level control



wrote:

I think I've done it. Thanks for the challenge Peter.

I have taken Peter's Scilab program from the reference earlier, and
modified it to test disturbance rejection as opposed to setpoint
tracking.
My motivation for this is that there are many tank level controllers
with the setpont fixed for years, but the inflow changes all the time.
Given this scenario, response on inflow changes is more important than
setpoint tracking.

Peter made a statement that I interpreted that with P-only control,
the tank would overflow easier. So I tried to proof the opposite.

I used the Scilab simulation to get the proportional gain that will
minimise level disturbance on a step change in inflow, with a constant
setpoint, and then noted this max level variation, for different
integral control time constants.

Results:
Int time    Gain for min level disturbance    level disturbance (mm)
0.5         -7700            16.0
1.0        -8500            15.5
No        -9200            15.2


Conclusion
If you tune the controller for minimum level disturbance on a step
change in inflow, then the more integral control action you use, the
bigger the level variation.

Warning
This is not a recommendation of how to tune a level controller.
You need integral control for steady state accuracy, but a very small
amount is sufficient.
Strong control action is in many cases not a very good way to tune a
level controller. Normally it's better to detune it to make use of the
surge capacity in the vessel.

Pieter Steenekamp



Appendix: Peter's Scilab program as modified by Pieter for the above

// TANK LEVEL CONTROL
Kp=-0.2368;                 // pump gain.  (m^3/m)/CO%
Tp=1/12;                    // plump time constant. minutes
Kt=0.0279;                  // 1/(tank surface area)   1/m^2
Tc=0.25;                    // closed loop time constant. minutes
//Kc=-605.444;                // controller Gain. percent output per meter of
error
//Ti=3*Tc;                    // integrator time constant   minutes
Kc = evstr(x_dialog('controller Gain ?','-605.444'));
Ti = evstr(x_dialog('integrator time constant   minutes ?','0.75'));
T=1/120;                    // simulation update period  minutes
PV(1)=2;                    // fluid level  meters
ui(1) = -10/Kp;                  // integrator contribution to CO
flow_in = 10;                 // flow in.  m^3/min
CO(1) = -flow_in/Kp ;                    // control output. percent of full output
flow_out(1) = -10;              // flow pumped out.  m^3/min
maxLevel=0;

N=round(10/T);              // CONVERT TO SAMPLE TIMES

for n=1:N;                  // simulate 10 minutes
  SP(n)=2;                  // set point  meters

  if n= then
    flow_in ;
  end
  // calculate the rate of change in flow_out.  This uses the simple
differential
  // equation Tp*flow_out_dot+flow_outy=Kp*CO(n).  Note flow_out is
negative.
  flow_out_dot(n) = -flow_out(n)/Tp + (Kp/Tp)*CO(n);
  // calculate the new flow out by adding the rate of change times T
  flow_out(n+1) = flow_out(n) + flow_out_dot(n)*T;
  // integrate the difference between the flow in and flow out.
  PV(n+1) = PV(n) + Kt*(flow_in+flow_out(n))*T;
  if PV(n+1) > maxLevel then
    maxLevel = PV(n+1);
  end
  err(n) =  SP(n) - PV(n);  // calculate error
  up(n+1) = Kc*err(n);           // calculate the proportional control
output percent
  if Ti>0 then
    ui(n+1) = ui(n) + (Kc*T/Ti)*err(n); // calculate the integrator
control output percent
  else
    ui(n+1) = ui(n);
  end
  CO(n+1) = ui(n+1) + up(n+1);        // the control output is the sum of
the integrator and proportional terms
 end
 PV($)=[];                  // LIMIT TO 1200 ITEMS
 CO($)=[];

// PLOT THE SIMULATION
// CREATE TO PLOTS USING THE SUBPLOTS FUNCTION
// THE TOP PLOT SHOWS THE SP AND PV. THE BOTTOM PLOT SHOWS THE CO

t=T:T:N*T;        // COMPUTE TIME INDEXES. START A TIME T IN INCREMENTS OF T
TO N*T
clf();            // CLEAR OR RESET THE CURRENT GRAPHICS FIGURE

subplot(2,1,1);   // PLOT TEMPERATURES ON THE TOP PLOT
plot(t,[SP PV]);
xtitle('Tank Level Control Simulation','Time In Minutes','Tank
Level');
legend("SP","PV");
subplot(2,1,2);   // PLOT CONTROL OUTPUT ON THE BOTTOM PLOT

// PLOT THE CONTROL OUTPUT TERMS

plot(t,[CO]);
xtitle('Tank Level Control Simulation','Time In Minutes','Control
Output%');
legend("CO")

maxDeviation = maxLevel - 2







Re: why do you need integral action for level control



wrote:

This is a good example of the problem with the tweak this gain here
and tweak that gain here iterative approach to tuning.  If you tweak
the gains individually you are moving the poles.  When you increased
the integrator gain how did you affect the poles?   Chances are you
changed my critically damped response and changed it to something
under damped that wouldn't respond well to disturbances.  Hence your
reaction is that more integrator gain is bad.   The sad part is that
you will believe this for the rest of your life.  Now do this my
way.   First, run the original program.  You will see the middle
disturbance shows an error of about 90mm.   Now ONLY reduce the closed
loop time constant, tc, from .25 to .2 minutes and run the program
again.   Now you will see the disturbance caused error of just over
60mm.   How can this be?   According to you increasing the integrator
gain should make the error worse.  By making the close loop time
constant smaller you moved the poles to the left on the negative real
axis.   If you look at the equation for Ti you will see that if was
reduced from .75 minutes to .6 minutes which effectively makes the
gain larger yet the error caused by the disturbance is MUCH smaller.
You can reduce this error even more by making .1 minutes.

The point is that you must look at the end goal.  The goal is the
desired response, not a procedure for twiddling gains.  The response
is dictated by where the poles and zeros are.  So the first sub goal
is to move the poles and zeros  to a place that will result in the
desired response.  The PID gains are just a method of getting the
poles to the desired location.   So what do you do?  Change the PID
gains one at a time and hope they get you to the desired goal or do
you move the poles and then calculate out what the gains should be to
achieve those goals.    Even if you change one PID gain in the right
direction, the poles may not move closer to the desired location and
there resulting response will be worse.  Therefore you will come to
conclusions like you did that increasing the integrator gain is bad.

Lets take a detour back to the iterative tuning thread.  Given the
knowledge from that all gains should be changed together or then you
can see that iterative tuning one gain at a time may not going to lead
you to the best results unless you can find a way to change all the
gains at the same time.  If you looked at the article, to which I
posted a link, you will see is based on changing all the gains at once
by calculating the gradient of how the error changes as function of
the gradient of each gain.   From this calculates a vector or
direction of change and there is a term that limits how much.   This
is a method.
I just wish there was some that had actually implemented this method.

Finally, when I am twiddling gains I still have those equations in my
head but I think about it differently that the rest of you.   I think
about what the system identifier did wrong. I can usually tell by
looking at the graph of the estimate response to the actual response.
I know how to change all the gains if a the estimated plant time
constant is too long and the plant time constant should be shorter.
I then think about how the  a shorter plant time constant will change
all the gains.

Peter Nachtwey



Re: why do you need integral action for level control



Thanks for the response Peter. I agree with you, but you're talking
apples and I'm talking pears.


I can't but agree very strongly with this point; only by agreeing on
the end goal can you compare apples with apples. I will mention three
different possible end goals below.

First one is if you want to minimise the closed loop response time on
setpoint changes. Here I would support your arguments and follow your
design philosophy. Specific proportional and integral control tuning
coefficients would give the "best" response, and my statement of "more
integral control action is bad" would be wrong.

As an alternative consider a surge vessel where the objective is to
maximise (as opposed to the above minimising) the loop response time
on inflow disturbances, with the provision that you don't violate high
or low limits. Although very typical, this is still not my apples.
Let's move on.

Yet another end goal is simply to, starting from a stable system with
no setpoint changes, to minimise the level deviation on inflow
disturbances. With this being the case, and you tune the controller
ending up with non-negative P- and I- settings, using any method you
like, you can find other settings with less I-action that will give a
smaller level deviation on the same inflow disturbance.

I used your program and model coefficients to demonstrate this "more
integral control action is bad" point.

Pieter Steenekamp


Re: why do you need integral action for level control



pieter steenekamp wrote:

Yes, I am talking about being an engineer and doing a good job of
calculating or at least estimating instead of guessing or trial and error.


No problem.  If you can model the system you can do that too.  How are
you going to compute how much error is permissable?


I am beginning to think you are a lost cause.  You didn't try my
suggestion of reducing the Tc ( closed loop time constant ). As you say,
increasing only the integrator is bad.  When you do that the critically
damped response becomes under damped.  I have said that before and I am
getting tired of repeating myself.  The gains should be moved together
because the goal is to move the pole(s) in the desired direction, not
tweak a gain.


One more chance.  Change the closed loop time constant to .2 minutes and
see the difference.  Note that changing the closed loop time constant
changes all the gains, not just the integrator time constant.  That is
because changing the closed loop time constant actually move the poles
along the negative real axis.

Peter Nachtwey

Re: why do you need integral action for level control




It's interesting, that's exactly how my wife describes me too. And
then also, ever since primary school, I was one of the slow learners
in class, I haven't been very quick to pick up complex mental things.
So if you don't mind taking it slowly - let's leave the pole placement
and theoretical stuff for now, and just show me an example to proof
your point, if you can of course!

Please give me a Scilab (or any other "free" package, to share it with
the world, it's maybe unfair to expect the world to use an expensive
package) program, representing a tank with a varying inflow, level
control on the outflow, starting from steady state with the level at
setpoint and a step change in inflow. Then give us the PI controller
tuning, with greater than zero integral action, that will minimise the
maximum level error, and I will respond by taking your model
coefficients and your program and reduce your integral control action,
use my practical, no theory, iterative tuning, and the result will be
smaller maximum level error, for the same inflow disturbance. How's
that for a challenge!

I have done a similar exercise to demonstrate my point. I have taken
Peter's program from the reference given above, changed the
configuration to reflect the said scenario, and found the proportional
control for different integral control settings to minimise the
maximum level error. My conclusion was that the less integral control,
the smaller the maximum level error. Please refer to a previous
posting in this thread. If you don't agree, show me my error please.

The scenario I explained is not too uncommon - there are many (maybe
not most applications, but still not too uncommon) tanks where the
main objective of the level control is just to keep it from
overflowing or emptying. Tuning based on this objective will be good
for these applications. (Again, this is NOT valid for all level
controllers, this is a special case only)

I don't particularly care about me, feel free to call me names if
makes you feel better, but I'd like to continue this to some
conclusion for the other readers of this forum. So the challenge is
not only for Peter, but any other reader of the forum.

In the meantime my advice to the control world is that, given the said
objectives, less integral control is better. I do realise that even
hundred positive examples won't proof it, but one negative will proof
it wrong, but still, as a demonstration of my point, refer to the
Scilab program with different tuning settings that I gave earlier in
this thread.

Pieter Steenekamp


Re: why do you need integral action for level control



Thanks to all the contributors for all the comments; they are very
helpful.

Pieter's conclusion seems to be valid that for level control, it's
better to use less integral action.

I have taken his Scilab program and tried the three different tuning
sets provided. This does indicate that, for this model in any case, on
inflow disturbances a smaller integral control time constant (less
integral action) results in a smaller maximum level deviation. (It
seems like he used iterative tuning to find the best proportional
action for each different integral time). I have also tried some other
values and they confirm the general relationship of less integral
action resulting in smaller level deviation.

We have one application like this on our plant where the pump often
trips on low tank level and I have tried, without spectacular success,
tuning the LC to prevent this. I now realize that my integral control
action is probably too strong. I will go and try a combination of
weaker integral and stronger proportional control to prevent low level
trips. Fortunately, on this application, a sharp drop in feed,
resulting in a low level (and pump trip), is never followed closely by
another sharp drop in feed, so it's not required to recover the level
to setpoint fast after a drop in feed; in fact it's probably good if
it then stays low. We have one very constant flow going into the tank,
and another one that changes between low and high flow. The issue is
simply to prevent a low level trip.

This does raise the following questions though:
a) Is this Scilab model a good representation of a tank level
arrangement in real plants?
b) Are there other typical tank level arrangements for which this
conclusion is not valid?
c) Would it also be valid for the control structure of a LC cascading
to a FC that we typically use on our chemical plant?

john


Re: why do you need integral action for level control



john wrote:

That is only because you didn't follow the thread.
http://www.plctalk.net/qanda/showthread.php?t&395&highlight=sigreg
Pieter modified the program so that it proved his point by disabling the
  the code that computed the PID gains by just changing the closed loop
time constant.

First, it isn't his program.  He modified mine, you would know that if
you follow the thread.  He removed the code that would prove my point
and inserted his own so he could play his trial and error games.

  and tried the three different tuning

A smaller time constant results in more integral action

  results in a smaller maximum level deviation. (It

If you look at the original program you will find the opposite.


No, it is probably a poorly implemented PID.  Again look at the orignal
program and change the Tc ( closed loop time constants ) from .25 to .1
minutes. Change the final flow_in to 0.  Now try the Tc at 0.25 (
Ti=.75) then try Tc=0.1 ( Ti=.3).  You will see the level stops receding
  faster when the Tc=0.1 and the integrator time constant is smaller (
higher gain ).  At this point I am not sure if Pieter isn't confused
,like you are, about the relationship time constant and the gain.
Longer integrator time constants result in lower integrator gains.

  I will go and try a combination of

Read the thread.  The problem was submitted by a young engineer in Poland.


Yes, the pump can be on the inlet or the outlet.


Yes, but I doubt that your flow controller can change the flow rate
instantly.  SIGreg in the thread said his pump definitely had a time
constant and took time to change speeds.  The model in the www.plcs.net
thread assumes the pump or flow controller has a time constant.

Before Pieter lures you to the dark side you really should look at the
whole thread and download the program that is there.  It is obvious to
me that Pieter has not followed my advice. He never tried just changing
the Tc so that all the gains are changed at once.

Peter Nachtwey


Re: why do you need integral action for level control




thread.http://www.plctalk.net/qanda/showthread.php?t&395&highlight=sigreg

that, for this model in any case, on

iterative tuning to find the best proportional

Please help me.

I tried to follow your recommendations very carefully, but the
response does not look like it reflects my problem; the PV is not
equal to the SP when the run starts.

So I changed the SP(n)=0 and kept the flow_in = 20. This does seem to
reflect my problem. It is also very typical in the chemical process
industry where I work; the PV=SP for long periods with everything else
also steady. Then there is a sudden inflow upset. I'd like the
simulation to reflect this scenario. And this is the way Pieter
described his scenario and his modifications to your program seems to
reflect this too. Your's do not.

I then ran your program with above mod to reflect my problem and
tested your two recommended values, and then also ran it with Pieter's
recommended tuning of P=only control

Your first recommendation:
Tc=0.1
Max level deviation = 0.1081467

Your second recommendation:
Tc=0.25
Max level deviation = 0.1208479

Pieter's recommended tuning Kc = -9200 (no integral action):
Max level deviation = 0.0440022

Did I do anything wrong?

john


Re: why do you need integral action for level control



john wrote:

So is the level lower or higher than the set point?  If the level is
much higher then the pump will be on 100% until it approaches the SP If
the level is lower the pump can do nothing. It must remain off. Try
changing my program so that PV(1)=2.5 and then PV(1)=1.5

Notice that the pump gain is only -0.2368 m^3/min/%CO.  At 100% this
example  can only pump 23.68 M^3/min.  It would be close to the maximum
capacity and couldn't get the level down to the set point very quickly.
Does your pump work at maximum capacity very often?

  It is also very typical in the chemical process

What kind of disturbance do you want?  Change the in_flow values on my
program to reflect the disturbance you want.

  And this is the way Pieter

GET MY PROGRAM and don't bother to comment until you do! You have been
led astray by sloppy programming. Pieter obviously didn't understand my
trick to limited integrator wind up so he removed it which will make
using an integrator look bad. My program changes the in_flow as a
function of time to reflect disturbances.  If you had run my program you
wouldn't make false statements like mine program does not reflect
disturbances.  Read the original thread on PLCs.net.  Pieter removed
some of the vital parts of my program like the limit on the output of 0
to 100%. I think I can get better results if I didn't have to worry
about details like that.  He also removed the derivative gain or time
constant and that is required to keep a critically damped response and
avoid overshoot. One more thing that he did is that his disturbance goes
from 10 to 20 m^3/min.  Whereas mine goes from 5 to 20m^3/min

My program didn't calculate the max level deviation. Did you add it or
are you using Pieter's messed up version.
0.029769
That beats Pieter's easily even though my disturbance goes form 5 to 20
m^3/min instead of just 10 to 20.

On my program it is  0.091695 even with the 5 to 20 m^3/min disturbance.


WHY ASK ME? YOU AREN'T DOING WHAT I ASK ANYWAY!
YES, YOU USED PIETER's PROGRAM!!!
I told you were to get my program and to read the thread.

When I run Pieter's program with Kc=-9200 it oscillates. I doubt the
even the Tc as low as 0.1 minutes is practical.  Think about this, if
the gain is -9200 that means that 1 mm of ripple in the tank will cause
the output to change by 9.2 percent.  Quantizing and noise will also be
a problem.

Peter Nachtwey

Re: why do you need integral action for level control



Let me add my two cents to this discussion. Assume that the process can be
modeled as Kp/s and  we control the flow out  with a linearized flow control
valve (just to make the problem simple) using a standard ISA  PID
controller. The tuning will be for disturbance rejection - where the
disturbance is a change in the inlet flow. Let us look at the root locus
sketch as the proportional gain increases from zero to infinity for a fixed
integral gain. There will be two poles at the origin for Kc = 0. As Kc is
increased, the closed loop poles move into the left hand plane and the
sketch forms a circle. The two poles converge on the negative real axis when
Kc = Ki/15Kp. Ki is in repeats per minute and Kc is the proportional gain
and Td = 0. These poles will be at -KpKc/2. If Kc is increased further, the
two poles travel on the negative real axis (one toward the origin and the
other toward - infinity. For Kc less than Ki/15Kp, the response will be
under damped. It is critically damped for Kc = Ki/15Kp. For Kc greater than
Ki/15Kp, the response will be overdamped. If you want it be critically
damped, you would have to adjust Kc every time you adjusted Ki. However if
the Kc is large so that you are overdamped, you can tweak Ki without
adjusting Kc (as long as the poles stay on the real axis) and this is what I
often do.

The concept of Allowable Level Variation (ALV) simplifies tuning of the
level controller. First you must do an open loop bump test to get an
estimate of Kp. The ALV is the maximum variation from setpoint that you will
allow under regulatory operation. It is expressed in %. Use the largest ALV
possible so the tank can absorb the disturbace. The tuning equations are:
Kc = 100/ALV,   Ki = 15KcKp (for critical damping). Then  decrease the Ki
some to make the response more robust. During my 30 year career in the Pulp
& Paper Industy, I used this method on hundreds of tank level controllers.



Re: why do you need integral action for level control



Fred Thomasson wrote:

????  Where does this come from?  Look at the T1 pi.pdf at the bottom.
   The result will be critically damped when the square root term is 0.
  This happens when Ti = 4/(Kc*Kp) or Kc=4/(Ti*Kp) and the poles are at
Kp*Kc/2.  Remember I define Kp as negative because it reduces the level.
Ki should be Kc/Ti.  There must be some confusion here.


  If Kc is increased further, the

Yes and no.  See the equation for Kc.  Increasing Kc could just move
both poles to the left.  It depends on what Ti is doing too.


I don't agree with the Ki/15Kp but if you substitute my numbers I agree.

  If you want it be critically

YES, EXACTLY.  That is what I do using the formulas for the gains as a
function of the closed loop time constants.


Yes, but making the integrator time constant too long means it takes a
long time for the controller to eliminate the error.


That seems too work.  I picked an ALV of .020 meters which yields a gain
    of -5000.  I adjusted the time constants until Kc = 5000.  You can
see the error is about half that ( 0.010m )when the integrator is used
ftp://ftp.deltacompsys.com/public/NG/Mathcad%20-%20t1%20pi.pdf
when the integrator is not used the error is a little larger 0.017m
ftp://ftp.deltacompsys.com/public/NG/Mathcad%20-%20t1%20p.pdf


So far we agree except for the KiKcKp.  Where does this come from? I
show how I derive my Ti = 4/(Kc*Kp) at the bottom of the .pdf.

Peter Nachtwey

Re: why do you need integral action for level control





The difference is in the definition of Kp. My value comes from making a step
change in the controller output and record the change in level (level needs
to be steady first) over a given time period(in seconds).

Kp = delta_level / [(delta_CO)(delta_time)]

If I had used the time period in minutes, my Kp would have been smaller by a
factor of 60 and Ki = (Kc*Kp)/4 or Ti = 4/(Kc*Kp). Hence we have the same
value.

One last comment. When I tuned level controllers for tanks, I rarely used Kc
above 20. But I usually used ALVof 20% to 50%. There may be some instances
where you can only tolerate a very small deviation from the setpoint but in
most industial applications the purpose of the tank is to take the surge in
process demand that defines the disturbance. Using a large Kc passes the
disturbance and create quality problems in the product.



Site Timeline