Flow rate

Join Date
Aug 2015
Location
Minot, ND
Posts
1
We are trying to get a flow rate from digital pulse inputs. currently we just take the pulses over a period of 60 seconds and mov that to a mul by 60 function to get a bbl/hr rate. is there a PID function or a math formula that could take pulses and give us a more accurate running flow rate. has anyone tried this? we use RSlogix 5000.

thank you
 
The only thing I would add would be a moving average (MAVE), it would help with any noise or spikes in the reading.
 
A great technique for a filtered moving average is to ....

Have an array for successive readings.

At each new reading, shift the array, and put the new reading in to the space created by the shift.

Copy the array to a second array.

Sort the new array.

Take the average of all but the top, and bottom elements of the array.

This effectively rejects transient readings.

You can apply more aggressive filtering by averaging less of the copied array - e.g. leave out the top and bottom 2 values....
 
A great technique for a filtered moving average is to ....

Have an array for successive readings.

At each new reading, shift the array, and put the new reading in to the space created by the shift.

Copy the array to a second array.

Sort the new array.

Take the average of all but the top, and bottom elements of the array.

This effectively rejects transient readings.

You can apply more aggressive filtering by averaging less of the copied array - e.g. leave out the top and bottom 2 values....
That method works so well that it is an adjustable drop-down selection on the analog input setup for Unitronics PLCs.
 
In cases like these, I normally calculate units of time per pulse rather than pulses for a fixed period. Then invert the formula to get parts per minute/hour/second or whatever is called for. This gives you an instant result on the rising edge of each pulse, which can lead to enough bouncing around that it is often useful to then run the result through some filter or averaging logic. The goal is usually not to have to wait a whole minute to see the results of a change in rate but still have a steady useful number that won't freak out the operators.
 
that could take pulses and give us a more accurate running flow rate
Accuracy depends on how many pulses you get per timed period and how smooth the flow rate is and so how regular the pulses are, and if the speed of the flow is normally the same or if it varies. Plus, how quick the PLC input registers the pulse and the accuracy of the timer on the PLC.

Two ways to do it. The way you're already doing it or you can measure the time between pulses which gives you milliseconds per pulse. Take the inverse of that (1 divided by your value) to get pulses per millisecond.
Actually three ways. The way you are doing it, the way Mr Bailey describes, and the third way is to measure the time between a number of pulses. A problem with either version of the time between pulses is that you must have a watchdog timer that kicks in, otherwise if the pulses stop the last value is retained and it looks as though the flow rate is perfect. So I use a high speed counter set to say 100 pulses and a high speed ms timer that is read when the high speed counter reaches its set point. After you have a reading of flow, then you can use a control system to adjust the flow to what you require, you mentioned PID which is a control method.
 

Similar Topics

Hi, The hardware is: Click Plc model # CO-O1DD1-O HMI model # S3ML-R magnetic-inductive flow meter model # FMM100-1001. I will set the flow meter...
Replies
4
Views
127
One of the engineers has asked me to add code to the PLC to calculate oil flow rate based on delta pressure, using the equation below: Flow rate...
Replies
13
Views
2,814
Hello. I wanted to write the logic of the flow totalizer and the flow itself for self-education in RSLogix5000 V20.01 software. After reading the...
Replies
13
Views
7,601
can any one help with the math for converting an instantaneous value to a totalised value for Gas Consumption usage every hour. in the plant we...
Replies
5
Views
3,207
Hi, I have AB PLC (1769-L30ER) and PV800 HMI in my project. I have a horizontal tank (same dimension) having a height of 200" and capacity of...
Replies
1
Views
2,069
Back
Top Bottom