Flow Control On Tank Without Many Inbound Signals

SilverShotBee

Member
Join Date
May 2011
Location
England
Posts
46
Hi All,

I've been trying to design a system to control the flow leaving a product tank but am struggling somewhat. So the set up is this, there's a 12m deep product tank with 3 pumps that draw from it and pump the product onwards. The only signals I have available are:

  • Level of the tank
  • Flow leaving the tank
  • Speed of the pumps

I do not know the rate at which the product is entering the tank except for it can fluctuate quickly anywhere between approx 2000 liters per second at max flow, right down to about 1050 liters per second at minimum flow. There are no signals available before the tank to even approximate this flow and depending on what speed the pumps are at at the time of flow increase, a little can make a massive difference to level in a seriously short space of time!

I need to keep the flow leaving the product tank as constant as I can, using the 12m height (workable range 9m) as a buffer which is allowing the product to rise and fall without affecting the flow as best as is possible.

So I've tried to use a PID control to control the speed of the pumps with a setpoint that is automatically adjusted depending on the level of the tank and the speed in which the tank is rising or falling. The reason I haven't just decided to fix the setpoint is because the rate at which the product is manufactured is not fixed, its not even a setpoint, it just "is what it is" depending on a huge range of factors. There is just no way of knowing how fast we are producing it, so the PID setpoint must be dynamic if we want to control on outflow. If I wanted to control to level, I obviously would just put the setpoint of 8m or what ever and fix it, but this would then cause the outflow to swing around trying to keep the level constant, I need the level to swing and flow to stay constant.

Anywhere between 7m and 9m, the setpoint of the PID does not get adjusted, allowing the flow to stay perfectly stable. If the level gets above 9m OR a "Level is rising quickly" is detected from the level instrument then the setpoint for the PID is increased by a small amount, this repeats every 30 seconds until the condition is no longer true. And the same if the tank is falling, the pumps a slowed down.

This works fine as long as everything is relatively smooth, but just to add more issues to the control, every few hours, upstream from the product tank, a particular activity takes place that uses product before it enters the tank, typically about 500 liters a second of it, which is a huge 25% suddenly not entering the tank anymore. The control explained above cannot deal with it and the PID becomes extremely unstable with pumps ramping up and down all the time.

How would someone of more experience approach this? I'm using Allen-Bradley Logix5000 and have no scope to be able to add more IO or signals to the system. I'm stuck with what I have! Having a flow meter on the inlet would be seriously beneficial!
 
In a few instances I have used a linear level control. Using setpoints for max level=max speed and min level=min speed.
 
so even if the PID says slow down it waits 30 seconds to adjust?

No, Maybe I'm not being clear enough.

The PID has a setpoint that is adjusted automatically via the level in the tank. If the level is rising or falling too quickly, or is outside of limits, then the setpoint for the PID is changed. This happens every 30 seconds.

The PID has an update time of 1 second, which is not related to the above happening in any way.

Effectively I am moving the goal post for the PID when required
 
In a few instances I have used a linear level control. Using setpoints for max level=max speed and min level=min speed.

I have used this method in the past.

When the tank is nearing full just have all pumps at 100% and decreasing on a linear scale to a low level you are comfortable with without damaging the pumps and eventually off.

Thats all you need.
 
"I need to keep the flow leaving the product tank as constant as I can, using the 12m height (workable range 9m) as a buffer which is allowing the product to rise and fall without affecting the flow as best as is possible."

The tank is a buffer. Controlling the level in the tank is not a goal, other than it shouldn't run over or run empty.

"I do not know the rate at which the product is entering the tank except for it can fluctuate quickly anywhere between approx 2000 liters per second at max flow, right down to about 1050 liters per second at minimum flow."

You do not want to use PID control. If you use PID, when the inflow increases to say 1800 lps, the tank level will rise. When the discharge pumps speed up to 1800 lps, the tank level will stop rising, but it will be above set point. The Integral will reduce the error by increasing the outflow higher than 1800 lps. This brings the tank level down to set point, but it violates your requirement of not affecting the flow as little as possible, it's worse than if you didn't have a tank and piped the inflow directly to a booster pump.

Set the tank so that at 10% the pumps pump 1050 lps, at 90% the pumps pump 2000 lps. You could do this with a P controller. Some PID controllers might be able to do it, but most PIDs won't work for this application, as they do not allow you to turn off the I & D and use only P with a Bias.
 
How much can the tank hold as in 30 seconds you can have 30 tons of product. That is very much.
oke. So you want the flow constant, well you are measuring it, so control the speed according to the flow.

When the tank is above a max level (say 8 meters) and it is rising, speed up the pumps, when below 3 meters slow down. so the dead band is 5 meters.
This should be done with different PID controls, so one for low speed and one for high speed.
 
Shinskey has written extensively on this. Basically you want the tank to handle capacity surges in a way that smooths out downstream affects (flows). This is referred to averaging level control or surge tank level control. (so you'll have something to Google...).

To implement something like this, I'd recommend a cascade arrangement where the inner loop is a PI controller that controls flowrate out of the tank by setting your pump VFD speed reference command. The outer loop is a proportional only controller that controls level to a fixed level setpoint by setting the setpoint of the flow controller. The proportional gain of the level loop must be high enough to prevent tank overflow or emptying. This, with proper controller initialization, is set up so that your minimum allowable tank level corresponds to approximately minimum expected inlet flowrate and maximum allowable tank level corresponds to maximum expected inlet flowrate. A disadvantage of this approach is that it may confuse some operators because the tank level won't seem to be returning to setpoint as they're accustomed to with other control loops (so, it's just a training issue).

Good luck
 
Proof has pointed the way. You have to consider the physics of the system.

You can control flow out. You can control tank level. YOU CANNOT CONTROL BOTH UNLESS YOU CAN ALSO CONTROL THE FLOW INTO THE SYSTEM.

I a going to assume that the pumps on the discharge are centrifugal. That means that as the head (level) in the tank goes up and down the flow they produce also goes up and down. You adjust the speed of the pumps, and possibly the number of pumps running, to compensate for that variation.

If you are maintaining constant flow out but not maintaining constant flow in then the tank level will have to go up and down. This is mandated by the Law of Conservation of Matter. If the level gets to a danger point then you must either reduce the flow in, increase the flow out, or call for the clean up crew.
 
Last edited:
I vote P only control of the level, with the CV being the setpoint for your existing PID control of outflow. Max outflow at 90% tank level and min outflow at 10% or so. That will have a natural smoothing effect on your outflow, and also should prevent swings and prevent under/overflow situations.

Any solution is a compromise based on the points made above. I think this is probably the best.
 
A disadvantage of this approach is that it may confuse some operators because the tank level won't seem to be returning to setpoint as they're accustomed to with other control loops (so, it's just a training issue).

Good luck

It would be rare if this doesn't confuse operators. First it is cascade. Cascade confuses operators. Second, the tank level doesn't go back to the specific level. If the plant runs at a 'typical' rate, you can change the set point and the bias so the set point matches the level at the 'typical' rate, but then when you are not running at the typical rate, the operators get more confused. It may better if they do not see the level controller at all, and only set the number coming out of the black box. Then again, you may have smarter operators and controls guys that are better educators than me.
 
Hi All,

I've been trying to design a system to control the flow leaving a product tank but am struggling somewhat. So the set up is this, there's a 12m deep product tank with 3 pumps that draw from it and pump the product onwards. The only signals I have available are:

  • Level of the tank
  • Flow leaving the tank
  • Speed of the pumps

I do not know the rate at which the product is entering the tank except for it can fluctuate quickly anywhere between approx 2000 liters per second at max flow, right down to about 1050 liters per second at minimum flow.
but you do know the rate the fluid is entering the tank. If you know the level you can compute the rate of change in the level which provides the rate of flow when you multiply by the surface area of the fluid.
The problem is that calculate the flow will be noisy but that is what a low pass filter is for. This doesn't sound like a very dynamic system.

There are no signals available before the tank to even approximate this flow and depending on what speed the pumps are at at the time of flow increase, a little can make a massive difference to level in a seriously short space of time!
This good to know. This is why people simulate such situations BEFORE they finalize the size of tanks.

I need to keep the flow leaving the product tank as constant as I can, using the 12m height (workable range 9m) as a buffer which is allowing the product to rise and fall without affecting the flow as best as is possible.
So basically you want to smooth the in-flow into a relatively smooth out-flow like a LOW PASS FILTER!!!! This should be easy enough.

So I've tried to use a PID control to control the speed of the pumps
That is NEVER going to work because of the P gain. If a the level changes quickly the output will change quickly which is what you don't want.

with a setpoint that is automatically adjusted depending on the level of the tank and the speed in which the tank is rising or falling. The reason I haven't just decided to fix the setpoint is because the rate at which the product is manufactured is not fixed, its not even a setpoint, it just "is what it is" depending on a huge range of factors.
That is kind of a kludge but if it works then why not? I think converting the whole tank and control system into a low pass filter is better though.

There is just no way of knowing how fast we are producing it, so the PID setpoint must be dynamic if we want to control on outflow.
But we do know.

If I wanted to control to level, I obviously would just put the setpoint of 8m or what ever and fix it, but this would then cause the outflow to swing around trying to keep the level constant, I need the level to swing and flow to stay constant.
There is no way to do that and keep the flow perfectly constant.

This works fine as long as everything is relatively smooth, but just to add more issues to the control, every few hours, upstream from the product tank, a particular activity takes place that uses product before it enters the tank, typically about 500 liters a second of it, which is a huge 25% suddenly not entering the tank anymore. The control explained above cannot deal with it and the PID becomes extremely unstable with pumps ramping up and down all the time.
Ah, the real problem.

How would someone of more experience approach this?
I have absolutely NO EXPERIENCE with tank level control but to me it is simple differential equations and control theory.

I'm using Allen-Bradley Logix5000 and have no scope to be able to add more IO or signals to the system. I'm stuck with what I have! Having a flow meter on the inlet would be seriously beneficial!
But you have trends. You should be able to plot the SP, PV, and Control signal.

First, you do not what to use P or D gain because that will cause big change in flow if the in-flow starts to increase widely. That eliminates proportional only, PI and PID control. It doesn't eliminate I only control. Using the integrator only would be OK but the integrator will windup or down depending on the error but an integrator and a low pass filter are very similar.

A pure integrator looks like this
Code:
u(n)=u(n-1)+Ki*Δt*(SP-PV(n))
Like I said the integrator will wind up or down. A low pass filter is similar.
I just add a coefficient in front of the two terms on the right side.
Code:
u(n)=A*u(n-1)-(1-A)*Ki*Δt*(SP-PV(n))
A=exp(-Δt/τ)
u(n) is the control output.
Make the time constant τ long enough so that it responds acceptably slowly to flow changes.
The SP should be at or near the lowest level limit.
I changed the + to a - to account for the fact the pump reduces the level.
I could have PV(n)-SP
Now the control output not change rapidly and the low pass filter will not windup.

There are 3 poles. The tank integrates flow. The Ki introduces a pole and the filter introduces a pole. The system should filter the fluctuation in in-flow pretty well depending on the choice for Ki and τ.

Basically the control is Ki/(τ*s+1) the tank is 1/(s*area) it easy to simulate using an Excel spreadsheet.
 
It would be rare if this doesn't confuse operators...

Some operators are sharper than others. It can be an advantage to hide the goings-on of some controllers. For example, the cascade arrangement can have two modes: full auto and full manual, where full manual allows them to control the VFD directly. The disadvantage comes in troubleshooting or routine maintenance where someone might want to take the outlet flowmeter out of service while the controller is in auto...

A cascade arrangement as I described earlier is beneficial in that it linearizes the overall behavior of the system and thus can increase the performance and robustness of the system. The disadvantage is more complexity. From my keyboard, I can't tell if the added complexity and training/documentation is worth it.
 

Similar Topics

I was just presented with an application requiring control of two separate valves, each controlling individual flows into 2(or 2 sets of 2) tanks...
Replies
17
Views
4,953
Hello All Could we get some expertise on flow control ? -Using a PID loop in Productivity 2000 with an analog output, How can we convert...
Replies
19
Views
1,514
Hello: I am experiencing the following error: [ERROR] C0297: Stack overflow detected in DecodeOID. Maximal Stack Size: 64512. Calculated...
Replies
8
Views
1,151
Hi all, i'm after some help on a flow control valve control strategy. There are 8 parallel vessels that require evenly distributed flow. Each...
Replies
32
Views
6,911
Hello all, I am new to pid loops and control. I was wondering how to control a system with two process variables. This is a water system with a...
Replies
7
Views
1,953
Back
Top Bottom