Tank Level Problem

We recently had a problem where the level in a tank went up when it wasn't supposed to, this was caused by back from the system the tank normally supplies. What we want to do is add a bit of logic so that the tank discharge valve will shut when the tank level is increasing, but should not be.

The process normally works this way: tank is in service, discharging to the system, fill pump off. While in service the tank fill pump turns on and fills the tank then shuts off after filling the tank to 45%. The tank then discharges to about 12.5% before the fill pump turns back on to repeat the process. What we're doing is shutting the valve if the level goes up instead of down, while the fill pump is off.

The best I've been able to come up with so far is to capture the level every 5 seconds and compare it to the previous level. Is there a cleaner/easier/better way to do this? I'm working in RSLogix 5000.
 
A lot will depend on how stable the level signal is during normal operation. If it normally varies a little bit up and down, you want to be sure to not generate a false alarm. Perhaps a few consecutive 5-second samples that show an increase while the fill valve is off. The method you described to check is about as clean as it gets with the sensor you have.
 
We recently had a problem where the level in a tank went up when it wasn't supposed to, this was caused by back from the system the tank normally supplies. What we want to do is add a bit of logic so that the tank discharge valve will shut when the tank level is increasing, but should not be.

The process normally works this way: tank is in service, discharging to the system, fill pump off. While in service the tank fill pump turns on and fills the tank then shuts off after filling the tank to 45%. The tank then discharges to about 12.5% before the fill pump turns back on to repeat the process. What we're doing is shutting the valve if the level goes up instead of down, while the fill pump is off.

The best I've been able to come up with so far is to capture the level every 5 seconds and compare it to the previous level. Is there a cleaner/easier/better way to do this? I'm working in RSLogix 5000.

That won't really work as well as you expect. For one, you'd need a deadband, to avoid false positives. But then that introduces the problem what if youre increasing the level by .1 less than the deadband every 5 seconds. Eventually you'd overfill the tank because you're only looking at the previous change. You need to account for accumulative error. For these types of applications I generate a rate of change value over a period of time and then alarm on that. The ROC should be 0 to negative on a non filling vessel...the ROC accounts for fluctuations around the current level as the ROC is an averaging routine over time.
 
What is the time frame of the level change?

How many percent per minute in the various configurations (discharge valve open or shut, fill pump on or off, etc.)
 
Samples taken at 10Hz and averaged over 5s, will beat down the noise by about a factor of 7 (square root of 50, IIRC), assuming gaussian noise.

A least squares regression/linear fit on the past X seconds of samples (FIFO) will remove some of the noise compared to calculating difference between consecutive sample pairs.
 
Is there a fundamental process issue with material backfeeding into the tank (contamination, temperature issues, etc)? Does the level ever drift up to 50% in normal operation when the pump is shut off at 45%? Is there an issue if the level gets up to 50%? If the answer to all of these is "no" then I would just close the valve if the tank level gets to 50%. Note that I picked 50% arbitrarily. It could be any number above 45%. I'm not saying ROC is a bad idea but I would put an absolute shutoff in there as well.

I assume opening the valve back up will be an operator triggered event. Once the valve is closed ROC will go to zero and it will either look like the system is acting the way it should again (level not increasing) and the valve will open or it will look like it is not emptying as it should and the valve will never re-open, depending on whether you consider zero ROC good or bad.

Keith
 
On pump off (max level)
min_level := level

on every scan (or whatever)

if level < min_level then
min_level := level

if level – min_level > delta then
shut valve
 

Attachments

  • lsm.png
    lsm.png
    10 KB · Views: 8
the problem I see, and I think this is mentioned by a couple of others above, is that if the discharge valve is shut because of backflow from the downstream process, however that backflow is detected, then how will the process, or even the operator, know when to open the valve again?

Perhaps a better backflow detection would be an orifice restriction near the discharge valve. when there is pressure drop across the orifice+valve from upstream to downstream, then the valve should be open; when there is pressure rise across the orifice+valve, then the valve should be closed. this still has a noise problem.
 
the problem I see, and I think this is mentioned by a couple of others above, is that if the discharge valve is shut because of backflow from the downstream process, however that backflow is detected, then how will the process, or even the operator, know when to open the valve again?
I agree: the first thing the OP should do is understand what's wrong (or right) with the process. And than realize how whole system (including staff) will works

But just for fun

On valve = 1 (open)
min_level := level

on every scan (or whatever)

if level < min_level then
min_level := level

if level – min_level > delta then
valve := 0.1

On valve = 0.1
max_level := level

on every scan (or whatever)

if level > max_level then
max_level := level

if max_level – level > delta then
valve := 1
 

Attachments

  • lsm2.png
    lsm2.png
    8.6 KB · Views: 4
Thank you everyone.

So everyone knows, normally there is no back flow in the tank. But because of a recent incident we're looking for a way to automatically monitor for it, and shut the tank discharge valve when it happens. Because level in the tank is normally either steady or lowering, I couldn't find a better tool for monitoring for an increase in level (averaged 0.1% increase over 5 seconds) than using a capture of the level to compare it to. A pseudo ROC process.

I have found a module for one of our AOIs which has a ROC process built into it which I've decided to use. It allows me to choose the sample frequency, debounce time and rate to trigger an alarm. I've just tied the alarm to the valve output.
 
Thank you everyone.

So everyone knows, normally there is no back flow in the tank. But because of a recent incident we're looking for a way to automatically monitor for it, and shut the tank discharge valve when it happens. Because level in the tank is normally either steady or lowering, I couldn't find a better tool for monitoring for an increase in level (averaged 0.1% increase over 5 seconds) than using a capture of the level to compare it to. A pseudo ROC process.

I have found a module for one of our AOIs which has a ROC process built into it which I've decided to use. It allows me to choose the sample frequency, debounce time and rate to trigger an alarm. I've just tied the alarm to the valve output.
Have the process and safety teams thought about what would have happened if the backflow had been prevented? If it was caused by a pressure event, the backflow was a sort of pressure relief, and implementing this logic effectively reduces the amount pressure relief available to the downstream tank. It should have proper pressure reliefs engineered in, but I can't assume that.
 
Well, that reminds me of a well known story here in the UK, a council run bus company had a bus wedged under a low bridge, attending were the council engineers, the police & fire brigade trying to come up with a way of getting it out like cutting sections of the roof etc., a little boy came along & said, hey mister why don't you let the tyres down (yes in the UK we use a "Y" before we get the comments on spelling)
 
We recently had a problem where the level in a tank went up when it wasn't supposed to, this was caused by back from the system the tank normally supplies. What we want to do is add a bit of logic so that the tank discharge valve will shut when the tank level is increasing, but should not be.

The process normally works this way: tank is in service, discharging to the system, fill pump off. While in service the tank fill pump turns on and fills the tank then shuts off after filling the tank to 45%. The tank then discharges to about 12.5% before the fill pump turns back on to repeat the process. What we're doing is shutting the valve if the level goes up instead of down, while the fill pump is off.
I would be questioning how you are getting backflow from the process when it sounds like you haven't had it before. I would be trying to figure the root cause of the backflow before implementing unnecessary changes. Maybe something in the process has failed and all you need is a high level alarm to warn others of the issue.
 

Similar Topics

Hello, I was needing some guidance on the best way to capture an erratic tank level and have this to alarm in our SCADA. Here is what I mean 1. I...
21
Replies
1,331
Views
Hi all, Last week you might remember me posting about a water plant I'm working on post lightning strike. As I said in my last post in that...
4
Replies
971
Views
I want to measure the tank level and get the sensor output to the PLC. Below are the details : Tank Height =0 - 3m, the sensor is stalled 0,2m...
15
Replies
4,770
Views
Does anyone have RSLogix 5000 ladder diagram program of tank leveling (factory IO). Fill valve, discharge valve, set point, level, etc? I looked...
2
Replies
1,151
Views
Top