LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I design multi-stage multi- rate filter given knowing the filter coefficients

I have an output signal generated from NI-9229 with rate 25k Sample/second. The required output final rate should be 100 sample/second.

Please, I want to design three stage FIR decimation filter given knowing the filter coefficients for each stage. I used Multistage Multirate Filter Design Express VI, however, the coefficients of the stages are automatically calculated. Could you help to design this filter urgently. 

 

Kindly, find the attached pics for more information.

 

 

0 Kudos
Message 1 of 6
(214 Views)

All the info I can find on 'Multi stage FIR decimation filter' seems to be patents...

 

But with FIR Filter \ FIR Filter PtByPt you can do a single FIR filter (with given coefficients):

 

wiebeCARYA_0-1653980933287.png

 

If you're in a hurry, post what you have... All info (references, specifications, links) and code, working and not working. Expectations too... 

0 Kudos
Message 2 of 6
(173 Views)

Great thanks for your cooperation. Kindly, find the attached file that includes a reference file for the required filter response, text files for filter coefficients, fig files (MATLAB files) for the required filter response, and my trial in LabVIEW with name new_filter.vi.

 

My expectations:

 

# If we can build the three filters using FIR filter VI followed by the decimate stage as shown in the attached flow chart, it may solve the problem,

 or 

# The other suggested way is to edit the DFD NStage MRate Filter Design VI to match the target.

 

Best Regards 🙂

Download All
0 Kudos
Message 3 of 6
(169 Views)

I can't open the VI (still in LV20), but if it's just 3 sequential FIR filters, what is the problem exactly?

 

I think you could use those lvm files (I can't open the matlab files).

 

Do you want to use those coefficients permanently? Or do yuo want to read them from the files, so they get updated when the files are updated? Is that the problem? The Read From Measurement File express VI has a lvm file option, and that should work almost out of the box. I wouldn't use an express VI, but it does the trick.

 

0 Kudos
Message 4 of 6
(161 Views)

The problem is to design 3 sequential FIR filter correctly.

 

I tried to build the vi, but I have three problems (as shown in the front panel picture):

 

1- The timing window for the waveform graph should be 10 Sec not 1000.

2- The signal start always beginning at zero.

3- the output final signal rate is not correct (not equal to 100 Sample/second).

 

Please, find my suggested vi in older version and the front panel of the vi.

Download All
0 Kudos
Message 5 of 6
(153 Views)

@Omda2022 wrote:

1- The timing window for the waveform graph should be 10 Sec not 1000.


Not sure why that is. Maybe the nr of samples you're asking for isn't supported, or limitted by the DAQmx task? Can you check that the nr of samples you're asking is the nr of samples you get? Maybe the frequency you set isn't the frequency you're asking for?

 

@Omda2022 wrote:

2- The signal start always beginning at zero.


You probably need to set init to true for (only) the first iteration.

 

@Omda2022 wrote:

3- the output final signal rate is not correct (not equal to 100 Sample/second).


Probably related to 1. If 1. isn't correct 3 won't be correct.

0 Kudos
Message 6 of 6
(147 Views)