4

I have an Interpolating Cascaded Integrator Comb (CIC) filter designed as so:

Rate Change = 100
Number of Stages = 4
Differential Delay = 1

I'd like to calculate the group delay of this filter but I am not sure how. This question on DSP Related is helpful, but I am not sure my filter will have 0 delay.

Also, Richard Lyons explanation is helpful, but he doesn't directly deal with group delay.

I also have a Decimating CIC filter designed as so:

Rate Change = 25
Number of Stages = 4
Differential Delay = 1

How would I calculate its group delay?

jeremy
  • 509
  • 1
  • 6
  • 19

1 Answers1

5

Consider an $D$-tap FIR filter with liner phase, the group delay (measured in samples) is $$g=\frac{D-1}{2}\tag{1}$$ and therefore, if it is measured in seconds it will be $$g=T_s\frac{D-1}{2}\tag{2}$$ where $T_s=1/F_s$.

The CIC filter which is also denoted as recursive running sum filter is indeed a special implementation of a moving-average filter. The moving average filter is $$y[n]=\frac{1}{D}[1+z^{-1}+z^{-2}+\cdots z^{-D+1}]=\frac{1}{D}\sum_{n=0}^{D-1}z^{-n}=\frac{1}{D}\frac{1-z^{-D}}{1-z^{-1}}$$ which can be implemented by a $D$-tap FIR filter. If you compare carefully, the above response is identical to the frequency response of each stage of a CIC filter. Therefore, we can use $(1)$ and $(2)$ for calculation of the group delay in each stage.

Comparing the response given for moving average with that of the CIC filter, assuming $R$ is rate change and $M$ is the number of samples per stages, then $$D=RM$$ So for $N$ stages we have $$g_{\text{cic}}=N\left(\frac{RM-1}{2}\right)$$ expressed in samples and $$g_{\text{cic}}=NT_s\left(\frac{RM-1}{2}\right)$$ in seconds.

msm
  • 4,285
  • 1
  • 13
  • 25
  • The number of samples per stage of my filters is 1 (differential delay). Should N be 1? What would the group delay be for the two filters I describe? – jeremy Sep 30 '16 at 00:45
  • 1
    in your case, $M=1$. Here $N$ is the number of stages. – msm Sep 30 '16 at 01:09
  • This is true for interpolating filter. Would you add additional information for the decimating filter? – jeremy Sep 30 '16 at 16:15
  • @jeremypatterson in the link I provided the system function is given for the general case (that is why it is said "R = decimation or interpolation ratio"). Can you explain why it is not true for decimating filter? – msm Sep 30 '16 at 21:27
  • If I understand correctly, my example interpolating filter has 4(1001-1)/2 = 198 samples of delay. For Decimation, I don't think it would have 4(251-1)/2 = 48 samples of delay since the sample rate is significantly smaller after the filter. Would I need to divide by R after the calculation for Decimation? – jeremy Sep 30 '16 at 22:20
  • Ok. But can the fact that you ultimately decimate some samples change the group delay of the previous stage? – msm Sep 30 '16 at 22:29
  • Yes, I think it will. I think you answered my question. I'll keep thinking through the decimation filter. Thanks! – jeremy Oct 01 '16 at 00:17
  • @jeremypatterson It is good to think about it. But I really don't think it will change anything. Just think about the last sample that is not decimated. – msm Oct 01 '16 at 00:37