tank level math-confused

irondesk40

Member
Join Date
Jan 2008
Location
nc
Posts
630
have posted a section out of a program that a integrator did for one of our plants in mexico. Now the integrator has busted up, and the company no longer is there. I now have inherited the system and trying to understand it. It looks like the documentation is good, just confused about the math and values used for the tanks.
Most of my experience has been with automated type equipment, not much at all with process type controls.
Could someone please take a look that is a lot smater than I am and help explain it in simplier terms that I may be able to understand better.
 
Not the way I would have done it, but basically they are calculating pounds of material into N16:0. The math statement there is taking the raw value of the analog input and using some multiplier that has to be taking into account the density of the product and geometry of your tank. At some point they probably said that a full tank is X lbs and back calculated this factor. That's assuming that the tank geometry in the vertical axis makes the level measurement linear. If you had a round tank on its side then all bets are off. The second calculation is doing the same thing but converting it into percent level. Again, they are saying that a full tank is X lbs and 100% level and back calculated the factor for the calculation into N17:0.

Why the initial subtraction of 4000 off the raw input I'm not sure. Maybe their way of compensating for the input signal itself (is it ma or V). The less than comparison is just insuring the end result never goes negative and creates a negative weight/level % in the subsequent calculations.

EDIT: Hah, I should have looked at the word doc first. What I explained above is what they basically explained in the word doc.
 
Last edited:
irondesk,

This is a strange way to do it but it appears to work none the less. I do my calcs. into gallons from a sensor calibrated in inches of H2O instead of feet of H2O.

N15:0 is the density of your fluid compared to H2O times * 1,000. In other words Peroxide weighs 1.196 times as much as water, which is what your sensor is calibrated to.

N14:0 is your sensor reading in milliamps * 1000 - 4000
So.. 4 milliamps = 0 & 20 milliamps = 16000

85.9375 is a scaling factor. Not too sure how they arrived at this value.
BD
 
Thanks

Have to admit, I am confused, due to the fact that I have not done that much process type controls.

To me, would it not have worked if for example the tank is 22ft tall and 6ft in diameter. You mount a ultrasonic level sensor in the top of the tank looking down to the bottom. If you know for example that when the tank is full it holds 10,000 pounds of a liquid, and when 0 is then equal to 0 pounds.

With the allen bradley, i have the SCP in a lot of programs, and I do not understand why they did not take the 4-20ma raw value when the sensor senses that the tank is full, and the raw analog value when the sensor sensed the tank is empty and just use the SCP instructions to scale the raw analog in to be 0-10,000 pounds.

Would this not be just a good of way to do the same thing?
 
We often bust the equation apart and perform calculations this way, mostly because of this:

Originally posted by bikerdude:

85.9375 is a scaling factor. Not too sure how they arrived at this value.

The SCP kind of puts you in the same boat. You need to know the physical end quantities to make it work. And then, if you make it work and something changes, there is no real easy way to change the parameters unless you back-calculate them anyway. For example, consider your case but you have water in the tank one day, peroxide in the tank the next day and a slurry in the tank the day after that. In each case the density is different.

Now, why they chose to use head pressure versus direct measurement is another matter and is really an application question.

Keith
 
Thanks kamenges,

Makes more sense now if you consider the fact that the liquid in the tanks could change, but in the case where you have a dedicated tank that will always be peroxide for example and never change, would you think using a ultra sonic and the scp for a tank that is a set height and diameter all the way to the top.

Just trying to learn as much as possible, and have come to realize that if a group of people design the controls for a system, the odds are each of them are going to go about it a little different.

Also, another reason is that at some point in the future, since now I have inherited this system, I know I will be ask to install a storage tank for something and know the volume. I have only done this once, it was a storage tank used for a cleaning compound used to inject in some dye equipment when you wanted to clean the inside out before you changed colors. That tank was 12 feet tall and 5 feet in diameter, and I knew when full it held a certain amount of gallons, and I used a Siemens ultra sonic sensor and scaled that with the scp instructions in order to show on a display how many gallons was in the tank, and when it got so slow signal that it needed to be refilled. That worked great on that application. To be honest, at that time, I never thought of how to figure the volume and gallons using math formulas ( which is not really my strong point), which is why I did it that way.

Thanks for info, now I know that it would be best to learn how to use the math formulas for certain chemicals.
 
Using pressure, to determine level, is a basic of instrumention... provided that the density of the liquid is consistant.... Manometers are still used as a very accurate pressure guage, based on the same principles.

27.7" Water will exert 1 pound / sq in. of pressure. As long as the tank is uniform through out it's height, we can use a simple volume equation to calculate it's level. Thus a cylinder is good, a cone shaped tank or odd shaped tank, will be more difficult to calculate.

The specific gravity of water is 1. For using liquids other than water, multiply 27.7" by 1 / specific gravity of the liquid.... I think that this is the 0.85 multiplier in the equations... When I looked up peroxcide SG on the net, I got 1.15 which would give you 0.869. So for peroxcide every 1 psi measured = 24.07" above the sensor. You can then get volume, by multiplying the area of the tank, by the height. If the specific gravity can change, then this calculation will not work.

For your situation, I think that a pressure sensor is the best way and cheapest way to go... Of course you are always limited by the sensitivty requirements of your process measurement, and that of the sensor... Choose accordingly.
 
great explanations!!!

Looks like what I need is to do some research on how you figure the volume in a tank, and then what to divide by, or add and subtract for the different types of chemicals and liquids. Is there a engineering guide for this, which is something that I now have a big interest in learning?

But, if you have a tank that is a certain height and diameter, and a cylinder shape, would you then be able to use a ultrasonic sensor (good quality) and the scp, if you know exactly how many gallons or pounds when full and empty, and be just as accurate as you the math equations.
curious, now going to rig me up some type of small tank in the shop and experiment.
 
Based on the fact that each term is from a different file, rather than a group of registers in a single file, I doubt that it was created by a rocket scientist.

I like to do all the conversions in a compute statement rather than scaling the analog input because you can document what was done in the rung comments and you can watch it work (Just my perference).

Also, be careful not to do away with too much resolution at the input by turning your measurement into a small number like 22 instead of 220 or 22000, etc. (In other words, multiply before divide)

Bob A.
 
Bob A. said:
Based on the fact that each term is from a different file, rather than a group of registers in a single file, I doubt that it was created by a rocket scientist.

Bob A.

I thought that too initially, but then considered that if it was part of a tank farm of 100 tanks done the same way, then it would make sense to put each into a separate file. For example all N14s are the sensor values, N15s the densities, N16s the weight, N17s the level %.
 
Watch Out

I have experience with H2O2 level measurement. One "gotcha" is that specific gravity changes with concentration. We use 35% concentration which has a specific gravity of 1.128 relative to water. You need to contact the manufacturer of the H2O2 and get the SG from them. The SG will also vary on the quality of peroxide because it will have more or less residuals in it. Just a heads up, speaking from experience.

*disclaimer: I'm asuuming it's H2O2, and not something else that ends in "O2".

Greg
 
Last edited:
Tank liquid density

There is a way of measuring the liquid density of large storage tanks.
you would install two identical pressure transmitters in the side wall of the tank at a fixed, exact vertical distance like 30".
the lower transmitter is your level transmitter, the upper transmitter is for density.
(Note: They should be as low as possible, as soon as the level drops below the upper transmitter, you cannot measure the density ).
It works by measuring the pressure difference over a fixed 'head pressure', any change in density and you will get a corresponding change in this pressure.

FOXBORO has a system like this, it's called HTG 'Hydrostatic Tank Gauging'
 
Last edited:
hsjinst said:
There is a way of measuring the liquid density of large storage tanks.
you would install two identical pressure transmitters in the side wall of the tank at a fixed, exact vertical distance like 30".
the lower transmitter is your level transmitter, the upper transmitter is for density.
(Note: They should be as low as possible, as soon as the level drops below the upper transmitter, you cannot measure the density ).
It works by measuring the pressure difference over a fixed 'head pressure', any change in density and you will get a corresponding change in this pressure.

FOXBORO has a system like this, it's called HTG 'Hydrostatic Tank Gauging'

Thanks, that's a usefull little thing to know :)
 

Similar Topics

need to know how to determine how much water in a tank by taking the MA output of a transmitter and converting it to feet of H2O. thanks
Replies
7
Views
5,791
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...
Replies
15
Views
732
Does anyone have RSLogix 5000 ladder diagram program of tank leveling (factory IO). Fill valve, discharge valve, set point, level, etc? I looked...
Replies
2
Views
173
I seem to remember a number of posts regarding calculation the actual level or volume in a horizontal tank, here is the formula written in ST...
Replies
15
Views
1,592
Back
Top Bottom