04-18-2013 10:49 AM
1) I have 3 channels sampling at 30,000 samples per second for 60 seconds. I am handling the acquisition and putting the data in arrays of integers (I32).
2) I need to decimate them down to 100 samples per second in order to get rms noise from the white noise generated by the input of the shorted ADC.
To do this I need to ...
1) I have been given 3 filter coeffiecents files which I need to use in a multirate FIR filter.
2) The product of this needs to be used to calculate RMS and Mean.
I am not asking someone to solve this for me. But to state the feasability of using labview to run a multirate FIR with predetermined co-effiecents.
This is my first attempt at using FIR filters and my calculus is a little rust. So be gentle.
I have attached the first of 3 sets of coeffients.
Solved! Go to Solution.
04-18-2013 10:50 AM - edited 04-18-2013 10:50 AM
2nd coeffiecent
04-18-2013 10:50 AM
3rd coeffiecent
04-18-2013 10:58 AM
First of all, you can have 3 attachments to a single post (there's a little Add Attachment link below the attachment input to add more). If you have more than that, zip them together and post the zip file.
LabVIEW will work just fine with what you are describing. But to make your life really easy, just use the FIR Filter VI.
04-26-2013 12:00 PM
I tried using the FIR Filter.vi with coefficients calculated in Matlab and the results were not what I expected.
I tried using the same variables to build FIR Narrowband Coefficients VI. it produced different coefficients which can be expected. But it was 20 coefficients instead of 165.
fir1Sps.txt was from Matlab.
So I am abandoning making the FIR filter coefficients in Labview.
I will try again to use the FIR Filter.vi
Does the FIR Filter.vi remove the first N values from X. Where N is the number of coefficients.
What format does FIR Filter.vi expect the coefficients in?
04-29-2013 06:44 PM
Hi BeanBoy,
You can see how the FIR Filter VI works in the detailed help here, which says:
The FIR Filter VI obtains the elements of Filtered X using the following equation.
where y is Filtered X, Nb is the number of FIR Coefficients, and bj is FIR Coefficients.
The inputs of the FIR Filter .vi are a 1-D array of X values and a 1-D array of coefficients. All of the coefficients are used for EACH value of X calculated. The dimensions of the arrays do not need to line up. I threw together a quick example with 3 coefficients and 6 values in my input array. The output was a 1-D array of 6 values.
So, in answer to your questions:
Does the FIR Filter.vi remove the first N values from X, where N is the number of coefficients?
No, FIR Filter.vi uses the coefficients to approximate for each value of X.
What format does FIR Filter.vi expect the coefficients in?
A 1-D array of numeric data.
Note: For Multi-rate FIR Filters, you may need to use the Digital Filter Design toolkit, to be able to use the Multirate FIR Design Express VI.