Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate Mean on FPGA Target

Hi,

 

I am trying to calculate the average of an array of 50 elements; in hopes of trying to eliminate noise from an input voltage signal (NI 9215). I am using a pressure transducer, this is a 4-20mA signal which passes through a 200 Ohm resistor where I measure the voltage from this resistor. However I try to calculate the average using regular math (index the array, then sum up the array then divide by size of array)and I do not get the value expected. So is there a more efficient way of calculating an average of an array in the FPGA Target? Or better still: A way to reduce noise from an analog input in FPGA target? I am using LabVIEW 8.6.1

Thank you, 

0 Kudos
Message 1 of 4
(5,847 Views)

There is a fixed point running average example on the NI Developer Zone Community:

http://decibel.ni.com/content/docs/DOC-2460

 

Or you could use a Butterworth Filter Express VI to eliminate noise:

http://zone.ni.com/reference/en-XX/help/371599D-01/lvfpga/fpga_butterworth_filter/

 

David

Message 2 of 4
(5,827 Views)

bermea,

 

What are you measuring the pressure of?  'Noise' in pressure readings may be the result of pressure pulsations in what you are monitoring.  Some pulsations can be taken care of by installing a mechanical snubber at the pressure sensor.

 

 

Message 3 of 4
(5,820 Views)

I am measuring the pressure of mineral oil, the pressure transducer is on the line that feeds in to the pressure vessel. I did try a Butterworth Filter and it did reduce most of the noise.

Thank you for the input.

0 Kudos
Message 4 of 4
(5,789 Views)