Matlab CIC decimator output mirrored

Signal Processing Asked by Edson Manoel on August 7, 2020

I am trying to use the dsp.CICDecimatior function and comparing the output to a C code algorithm that I have. The CIC decimator is configured as decimation factor of 8 , 3 sections and differential delay equals 1.
below is the code used:

CIC1 = dsp.CICDecimator(8,1,3);
for i=1:16

The output looks mirrored as you can see in the figure below:

enter image description here

I am confident that the C code output is correct, because I have compared it to the following C++ :

Both produced the same output, so the issue have to be in my Matlab code.
In the traditional CIC decimator algorithm, the delay unit in the integrator is used in the feedback path, but in the MATLAB block it uses the unit delay in the feedforward path of the integrators:

enter image description here

Although the filter will be equivalent (same frequency response), the numerical output of the two implementations are a different (I guess it is the mirrored look that I mentioned above).

As it seems that the reason to the problem might be the way the CIC filter is implemented in MATLAB with the unit delay in the feedforward path of the integrator, the question now becomes:
Is there a way of using the dsp.CICDecimator with the unit delay on the FEEDBACK path of the integrator?

It should be like this:

enter image description here

Add your own answers!

Related Questions

Question on N point DTFT – Fourier transform

2  Asked on October 24, 2021 by ruhi


Lifting scheme versus filter banks

1  Asked on October 24, 2021


Match an Equalizer Curve

1  Asked on October 24, 2021 by alex-lisi


Effect of time duration in bandpass filtering

0  Asked on October 24, 2021 by joe-kid


Conventional channel coding/decoding

2  Asked on October 24, 2021 by fatima_ali


Why does fft energy leakage was solved

1  Asked on October 24, 2021


Ask a Question

Get help from others!

© 2023 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP