Slow Level PID Loop


Thread Starter



I am seeking some advice on a level control loop on site.

The loop controls a tank level by driving the output of a VF drive. It is very slow reacting as the link is via telemetry and the water is pumped about 10km.

The problem is the drive continuously ramps up and down, cycling even when the PV is far from SP. For example, when the tank is at less than 50% the output on the drive will fluctuate from 50% to 100%, stay there for a short while and then repeat. I would have thought being that far from SP the output should be locked onto 100% until it approaches SP.

I have tried a wide variety of PID settings in the control block in the PLC but nothing seems to change it.

Any advice on starting PID values for slow level loops?
The modicon PLC we have uses Proportional Band, Min/Repeat and Min time constant.


Could you elaborate upon the PLC PID controller output? i.e., how it is varying (0 to 100 %) because you only said that -- <b>" the output on the drive will fluctuate from 50% to 100% ". </b>

You can trouble shoot this in two ways,
1. Put your PLC PID controller in open loop/ manual, set some fixed set point; say 60% and observe VF drive.

2. Feed VF drive by a external source to simulate its input (0 to 100 %) and observe VF drive.

post the observation

> As the call so the echo

Pm me if you want: [email protected]
You are experiencing a common problem in level control. Level is an integrating process, and you are seeing the problem of using an integral time constant that is not zero or close to zero. Do not add integrating control to an integrating process. You need proportional-only control for level. This will not drive the tank level to the setpoint, but will leave you with an offset. If the level offset causes the tank to empty or go full, try increasing the proportional gain (decrease the proportional band) or the reverse. This depends upon the location of the pump - if it is filling the tank or pumping out of the tank. DO NO USE any derivative control on level.

Dick Caro, CAP
Either manually or via some added PLC code, capture some snapshots of at least the PV, bias, and CV (and you can also capture the P, I, & D terms if you want to) and run the PID equation manually. Make sure you get the same CV. Figure out where the oscillation is coming from. Or, less formally, just watch all that same stuff in a data window in real time, and see what it's doing.
Thanks for the response.

When placed into manual the drive output is locked to a fixed output and holds as it should. This is leading me to believe the PID setting are causing the issue.
Thanks for the response mate.

This makes sense.

The Tank is being filled and SP is usually around 90%. I have taken the Integral and Derivative control out and lowered my PB. Will let it trend for a while and check for results.

Is it an option to use a very small amount of Integral control to cause a slow rise to set point without causing cycling? or am i best off accepting the offset and working with that?

Thanks for the response.

If i were to capture the PID settings and PV, SP and Output at some point in time, how would I use the data to run the equation manually? Is this via a simulator or something?

The simulator I have requires me to input the process gain, time constant and delay all of which I am do not quite understand.

> If i were to capture the PID settings and PV, SP and Output
> at some point in time, how would I use the data to run the
> equation manually? Is this via a simulator or something?

No, I'm saying literally do the math manually. Look up in the help for your PLC and find out what form of the equation they're using. Then with a calculator, or a pencil and a piece of paper, do the same calculation yourself for the various terms and see what you get.

Oh, and I agree with the other poster. If you're simply using the tank level as an indicator of load to match inflow to outflow and don't really care what the level is so long as it's stable, just use P with no I. (Think of a dancer arm on a strip of material between two machines. You don't really care what the dancer level is; you're not trying to "correct" it, you're just using it as a source of speed information about the one machine to be able to synch the other)

I think it's OK to use a BIT of integral in level control, if it's a case where there's a "correct" level, as opposed to using the level as a load gauge.

I agree it can cause problems if your integral accumulates some bias and then the load changes dramatically. So I'd probably limit the bias to just a portion of the full control output, say maybe 25% or something like that. So at some loads you might not be able to achieve the setpoint, but you'll be closer, and the negative effects of integral windup will be less or gone.
I teach this in my CAP exam preparation course. Theoretically, you need proportional-only control and no reset. Practically, most users prefer just a little Integral Control to reduce the offset. It may not eliminate it. Too much integral causes the unstable oscillation that you have seen. You are on the right track now.

Dick Caro, CAP
In my experience, operators expect that PV == SP with any control system, and if there is a prolonged deviation between them with no change will either take to fiddling so the two agree, or generate numerous "faulty equipment" reports saying the controller isn't working.

My approach with level loops has been to estimate the level process hold-up time (volume between 0 % and 100 % level, divided by the flow through the control valve at 100 % opening). This determines the maximum rate at which the process level can change. If the controller output changes faster than this due to integral action, the excess will be "stored" as integral windup in the controller and has to be removed when the PV reaches SP. This is what causes the "double integral" cycle.

To avoid the cycle, the maximum rate of change of the controller output under integral action must be much less than the maximum rate of change of level. As a good rule of thumb, the integral action time of the PI controller must be at least 1.5 x the hold-up time, and preferably more. If working in reset rate, repeats/minute must be less than 60% of (1/holdup time). But keep the integral effect as small as possible.
Your problem might be tuning however, might be something else either.
Make sure all is OK ie. you don't have some non-linearities in the loop as jams, hysteresis etc. If there is water flow through a valve have a look how is the valve linearized.

If something is wrong on that side tuning would not help much.
What kind of pump is the VFD driving? I am guessing it is a centrifugal or rotodynamic. If so operating off of the BEP (Best Efficiency Point) to far on the pump curve can cause recirculation or cavitation problems. The pump would ideally operate near the BEP at the average flowrate that would maintain a constant level. All the tuning in the world will not compensate for impossible process conditions.
>Any advice on starting PID values for slow level loops?
>The modicon PLC we have uses Proportional Band, Min/Repeat
>and Min time constant.

I would start with at least 200% PB (gain = 0.5) and no reset.

Once the level is stable make a 10% change in setpoint, you should get somewhat less change in level (loop gain < 1)

If you can get the loop to slowly oscilate the frequency will give you the integral time (reset) use the PB at oscilation x 1.5 and the intergral about 1.5 x the oscillation frequency.

Many VFDs have a PID function built in, you could use that to make the control all local and simply change the setpoint from the remote system (Supervisory Control)

Good Luck