CIC decimator output mirrored

조회 수: 2 (최근 30일)
Edson Silva
Edson Silva 2020년 7월 24일
답변: Edson Silva 2020년 7월 24일
Hi,
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 of 8, 3 sections and differential delay equals 1.
below is the code used and attached I have the input vector:
CIC1 = dsp.CICDecimator(8,1,3);
CIC1.SectionWordLengths=[32 32 32 32];
CIC1.FixedPointDataType='Specify word lengths'
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++ :
Both produced the same output, so the issue have to be in my Matlab code.
Any ideas why the Matlab output is mirrored?
  댓글 수: 1
Edson Silva
Edson Silva 2020년 7월 24일
I think the answer to this question is the way the MATLAB block is implemented. 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:
Although the filter will be equivalent (same frequency response), the numerical output of the two implementations are a different (the mirrored look that I mentioned in my question).
I don't know if there is any way of implementing the CIC in Matlab using the unit delay in the feedback.

댓글을 달려면 로그인하십시오.

답변 (1개)

Edson Silva
Edson Silva 2020년 7월 24일
As it seems that the reason to the problem is 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 implementing the CIC filter with the unit delay on the FEEDBACK path of the integrator?
It should be like this:

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by