Tank Level Control

MATT116

Member
Join Date
Dec 2009
Location
Dallas, TX
Posts
330
Hardware
1756-L71
RsLogix 5000 V20

I need to control the level in a tank. The tank will be feed by a filter with a V-port ball valve. The filter has a min flow of 369gpm and a max of 423gpm. I would like to control this using 1 PID for simplicity but I'm kinda stumped on how to do this so that I dont under or over flow the filter. Basically I need the PID to stop opening/closing the valve when the min/max flows of the filter have been reached even though the tank is requesting more or less water.
I've attached a loop diagram using cascading PID's but these seems overly complex.
O-yea I can use ladder, function block or structured text.

Thanks
 
I'd have 4 setpoints - Min/Max Flow and Min/Max Level.
With those four setpoints, calculate a calculated setpoint to the PID.

This strategy will use the tank as a buffer. Feed more water when the tank level is lower, and less when it is higher.

Ultimately you want the in and the out to be the same. This will allow for variance in either without upsetting the other.
 
I've attached a loop diagram using cascading PID's but these seems overly complex.

The way you have it depicted will satisfy what you've specified and is probably the most straightforward way to do it. That flow window is pretty narrow and I expect could be problematic relative to controlling level. (What recourse do you have, or additional downstream controls, to prevent from emptying or overfilling the tank)?

Not sure what operator interface requirements you have but you'd want the combined PIDs to behave gracefully on mode changes from auto to manual and back again. (Manual mode would allow for the operator to be able to position the valve directly, for example).
 
The way you have it depicted will satisfy what you've specified and is probably the most straightforward way to do it. That flow window is pretty narrow and I expect could be problematic relative to controlling level. (What recourse do you have, or additional downstream controls, to prevent from emptying or overfilling the tank)?
First let me give some more detail about the filter. The filter has to go through a flush to drain every time its started up. It will also need to backwash every 40min so the idea is to have the filter stay in service for the 40min between backwashes by adjusting the flow thus preventing cycling of the filter from a high tank shutdown. The tank capacity has been sized to keep the downstream equipment running while the filter backwashes...I hope LOL
I don't have any down stream control but the customers normal usage is 400gpm +/- 10gpm so hopefully the narrow window wont be a problem. When the tank goes high 98% I will shut the control valve all the way by putting the loop in override and setting CVOverride to 0. I will then wait till xx% tank level before flowing again. As for emptying the tank I guess the filter will just flow at 423gpm and the downstream equipment protection is up to the customer.


Not sure what operator interface requirements you have but you'd want the combined PIDs to behave gracefully on mode changes from auto to manual and back again. (Manual mode would allow for the operator to be able to position the valve directly, for example).
Yes I have taken that into account, and I am following Allen Bradley publication LOGIX-WP008A-EN-P provides an example of how to setup cascading loops.

Thanks
 
If you can keep the error small the inflow will match the outflow so the inflow will be between 390 and 410 GPM.

There is a way to avoid the inner flow loop but it depends on how linear the valve is. The cascaded loop will linearize the flow vs the control signal. How linear is the valve?
 
If you can keep the error small the inflow will match the outflow so the inflow will be between 390 and 410 GPM.

There is a way to avoid the inner flow loop but it depends on how linear the valve is. The cascaded loop will linearize the flow vs the control signal. How linear is the valve?

I don't know how linear the valve is, will try to get that tomorrow but we generally just tell our supplier our flow range and tolerable PSI drop and they size the valve according. I think it will be a 4" Triac V-port ball valve, just dont know the if it will be 30 or 60deg.
 
First let me give some more detail about the filter...

Ok, so this may affect things. How long is the expected backwash cycle (40 minutes on, x minutes off... what's x?).

How many filters discharge to this tank?

The tank serves as buffer volume then to account for the cyclic filter operation? Since the inflow to the tank (from the filter) is periodic, you'd want/expect the level to be periodic as well assuming you want a constant outflow. So, given an outflow from the tank, it would seem we'd want to set the filter flowrate to maintain some expected/bounded profile of the tank level.

Please verify we're on the same page or not and let me think about it more...
 
Ok, so this may affect things. How long is the expected backwash cycle (40 minutes on, x minutes off... what's x?).

How many filters discharge to this tank?

The tank serves as buffer volume then to account for the cyclic filter operation? Since the inflow to the tank (from the filter) is periodic, you'd want/expect the level to be periodic as well assuming you want a constant outflow. So, given an outflow from the tank, it would seem we'd want to set the filter flowrate to maintain some expected/bounded profile of the tank level.

Please verify we're on the same page or not and let me think about it more...
The filter will backwash every 40min. The backwash will take 2min 40sec then it will return to service. This is why normal flow for the filter is 400gpm but can run as high as 423gpm to recover the tank level after a backwash. If down stream usage drops below 400gpm the filter can turn down the flow to prevent the tank from going high and shutdown the filter.
Yes the tank is a buffer for the cyclic filter operation.
 
Ideally, you can imagine a nominal filter flow of 400 gpm with a tank outflow of approximately 375 gpm (400*40/42.667). This would result in a sawtooth-shaped level trend; during filter operation, the level increases at a % rate equivalent of 25 gpm whereas the level decreases at 375 gpm during backwash.

So, I’d choose one of the following where each successive recommendation builds on the one prior and offers slight advantage.

1) Operate the level/flow PID cascade discussed before. This is disabled during backwash and reinitialized once the filter is brought back in service. Reintroduce the loop to service something like: put flow valve in manual with some nominal output (to establish flow), wait 2-4 seconds (to establish flowmeter reading), put flow loop in auto with a setpoint of 400, put level loop in auto with some nominal setpoint (output limits of 369 and 423). When level loop goes to auto, make sure it’s output initializes to the flowmeter’s setpoint.

2) As above but the level setpoint will be ramped. The ramprate is calculated (percent / min, say) from the current level at the time of filter reintroduction, and that desired level setpoint you’d like to see at the end of the 40 minute filter cycle (x % / 40 minutes). Thus, the setpoint will try to follow the rising part of the sawtooth as discussed earlier. So, if the tank outflow was 375 as discussed earlier, little control action would be needed from the 400 gpm filter flow. Control action would be available to account for all the flow/timing uncertainties that are otherwise present.

3) Implement some form of 2 above but initialize the flowrate at the start of the cycle based on known or desired tank outflow. So, if you were trying to turndown the system to 369, you could best achieve this. Conversely, if your boss says an extra 15gpm throughput is worth an annual $10 million and a ham sandwich, you could best achieve it this way also.

Also, your level controller should have no or negligible integral action (sometimes the neglibile integral action makes controller output intialization easier). Good luck and let us know what happens.
 
Last edited:

Similar Topics

I'm coming from a background of PLC ladderlogic/rockwell products. I am new to blocks. Can you point me in right right direction? What I would...
Replies
5
Views
1,557
This video shows the things I think about on page 1. I use Laplace transforms a lot. Laplace transforms allow one to express differential...
Replies
2
Views
1,806
New to group I've seen well pump controllers with analog circuits that pump till sensing a current drop then start a timer. Seems an opportunity...
Replies
7
Views
2,703
We have a few filling machines at work that utilize 2 normally closed capacitive sensors emulating float switches. These machines are relay...
Replies
1
Views
1,540
Oh No! Not that again! I will start out sort of simple ( evil thoughts ) Suppose I have a tank that is 4 meters tall with a constant surface area...
Replies
15
Views
7,409
Back
Top Bottom