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);
k=0;
step1_sig=zeros(1,128);
for i=1:16
step1_sig(1,i)=CIC1(real(normalRx(1+k:8+k)'));
k=k+8;
end
step1_sig'
The output looks mirrored as you can see in the figure below:
I am confident that the C code output is correct, because I have compared it to the following C++ :
https://github.com/EsonJohn/CIC-filter
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:
https://www.mathworks.com/help/dsp/ref/dsp.cicdecimator-system-object.html#d120e192907
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:
1 Asked on October 24, 2021 by mohammadsadeq-borjiyan
digital filters filter design infinite impulse response lowpass filter matlab
0 Asked on October 24, 2021 by rohitm
1 Asked on October 24, 2021
0 Asked on October 24, 2021 by jonah-f
2 Asked on October 24, 2021
1 Asked on March 10, 2021 by bl-lov
discrete signals filter design filters finite impulse response lowpass filter
2 Asked on March 7, 2021 by digi1
1 Asked on February 24, 2021 by ankit-chudasama
1 Asked on February 24, 2021 by gabriel-galeote-checa
0 Asked on February 23, 2021 by blue_electronx
1 Asked on February 21, 2021 by uxkqez7
1 Asked on February 19, 2021 by anand-kulkarni
0 Asked on February 11, 2021 by tobalt
1 Asked on February 10, 2021 by dsp-guy-sam
1 Asked on February 10, 2021 by jisbon
convolution differential equation laplace transform linear systems math
1 Asked on February 7, 2021
0 Asked on February 6, 2021 by jay-patel
1 Asked on February 5, 2021 by malik12
Get help from others!
Recent Questions
Recent Answers
© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir