foamman
Member
- Join Date
- Jan 2005
- Posts
- 19
Application:
Read in pulses from a volumetric flowmeter via a high-speed counter card to display flowrate i.e. cc/sec.
Present Configuration:
Allen Bradley SLC-5/03 with HSCE2 high-speed counter card.
1. The flowmeter pickup is wired to the input of the high-speed counter card.
2. A selectable timed interrupt routine is programmed; the time interval can be easily changed.
3. When the time interval expires, the interrupt routine is executed as follows; the counter value is read, the counter is reset and then continues to count.
4. The counter value from step 3 is divided by the interrupt time from step 3 (this gives pulses per second) then multiplied by the flowmeter's pulse resolution so the result is flowrate (in my case cc/sec).
5. Repeat the calculation upon the execution of the timed interrupt routine.
Problem:
The above routine works fine but the signal always has bounce or noise. Bounce in the flowrate display is unacceptable of course!
The counter card counter result always has a random bounce of 1 count. This one count results in a flowrate bounce equal to 1 times the flowmeter resolution divided by the sample time. So to minimize the flowrate display bounce the flowmeter resolution can be decreased (less CC's per pulse) or the sample time can be increased. Well in my application a more accurate flowmeter is not an option - they cost too much. Obviously increasing the sample time solves the problem but then the display reacts very slowly to real changes in the flowrate.
Things I've tried:
I have tried several traditional filtering techniques that work but all result in a flowrate display that is slow to react to real changes in the flowrate. For example, a real change would be from 180 cc/sec to 200 cc/sec. I have programmed averaging routines and a first order Butterworth low pass filter. Each of these results is a steady signal but extremely slow transient response to real flowrate changes.
Help!
I'm thinking some sort of intelligent routine that inspects the numbers and decides on some sort of windowed limiting might work but frankly I'm stuck. I'm sure this has been done before and would welcome any suggestions.
Thanks.
Read in pulses from a volumetric flowmeter via a high-speed counter card to display flowrate i.e. cc/sec.
Present Configuration:
Allen Bradley SLC-5/03 with HSCE2 high-speed counter card.
1. The flowmeter pickup is wired to the input of the high-speed counter card.
2. A selectable timed interrupt routine is programmed; the time interval can be easily changed.
3. When the time interval expires, the interrupt routine is executed as follows; the counter value is read, the counter is reset and then continues to count.
4. The counter value from step 3 is divided by the interrupt time from step 3 (this gives pulses per second) then multiplied by the flowmeter's pulse resolution so the result is flowrate (in my case cc/sec).
5. Repeat the calculation upon the execution of the timed interrupt routine.
Problem:
The above routine works fine but the signal always has bounce or noise. Bounce in the flowrate display is unacceptable of course!
The counter card counter result always has a random bounce of 1 count. This one count results in a flowrate bounce equal to 1 times the flowmeter resolution divided by the sample time. So to minimize the flowrate display bounce the flowmeter resolution can be decreased (less CC's per pulse) or the sample time can be increased. Well in my application a more accurate flowmeter is not an option - they cost too much. Obviously increasing the sample time solves the problem but then the display reacts very slowly to real changes in the flowrate.
Things I've tried:
I have tried several traditional filtering techniques that work but all result in a flowrate display that is slow to react to real changes in the flowrate. For example, a real change would be from 180 cc/sec to 200 cc/sec. I have programmed averaging routines and a first order Butterworth low pass filter. Each of these results is a steady signal but extremely slow transient response to real flowrate changes.
Help!
I'm thinking some sort of intelligent routine that inspects the numbers and decides on some sort of windowed limiting might work but frankly I'm stuck. I'm sure this has been done before and would welcome any suggestions.
Thanks.