LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CIC decimation and Compensation filter

Hi,

 

I have to implement a three stage multirate filter in FPGA where Stage1 is a CIC filter, Stage2 and Stage3 are the FIR filters. I have generated the filter parameters of all the stages using the 'Multistage Multirate Filter Design Express VI'. According to that Stage1 decimates the signal 4 times, Stage2 and 3 decimates 2 times. So an overall decimation factor of 16. 

I used an FM band of 4 MHz with an IQ rate of 5MS/s as my input to the CIC filter. The CIC filter works fine and decimates the signal to an IQ rate of 1.25 MS/s. I then used those decimated signal values and fed it to the 'DFD MRate Filtering for Single block VI' , which decimates the signal further to an IQ rate of 625 kHz and gives the correct output as desired.

I did the same with 'FIR filter VI' using the coefficients generated by the' Multistage Multirate Filter Design Express VI' for stage2 and decimated it 2 times using 'Decimate (continuous) VI'. It should give me the same output as obtained by 'DFD MRate Filtering for Single block VI'. The frequency response of both FIR and MRate filter are the same but their filtered outputs don't match. 

 

Any suggestions why am I not getting the desired output? I have attached the VI of my labview code. Kindly have a look.

 

Thanks

0 Kudos
Message 1 of 7
(4,137 Views)

it is not clear from the code what your issue is.  as you say, the frequency reponses are equivalent.  the data itself is shifted in phase but I do not see a big difference otherwise. 

Stu
0 Kudos
Message 2 of 7
(4,119 Views)

Please have a look at the attached VI. It's more clear in this.

 

 

0 Kudos
Message 3 of 7
(4,113 Views)

I see.  the difference you are seeing is due to the phase delay difference between the filters.  if you skip the first 4 elements of FIR filter set and throw away last 4 of MR, data and response are identical.

Stu
0 Kudos
Message 4 of 7
(4,098 Views)

 

Thanks Stu. I got it!

0 Kudos
Message 5 of 7
(4,093 Views)

Hello

 

I am building a digital down converter in LabVIEW. I am not able to figure out if my output is correct ( Inphase and Quadrature components). Am I on the right path? Please find attached the VI I have been working on.

 

Thank you.

 

0 Kudos
Message 6 of 7
(3,499 Views)

@nid,

 

you have now entered three different threads to post your totally unrelated question. Why don't you open your own thread?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 7
(3,471 Views)