# Determine group delay from the frequency response of FIR filter

I have a issue to find out, is there any way that one can determine a group delay from frequency response of the FIR filter. Let's say I have I type FIR filter with order of 51. Frequency response obtained from freqz MATLAB's function is presented below. I know group delay is negative derivative of linear (in this example) phase response, but how can one determine that from the picture above.

• You should review the form of the frequency response of linear phase filters. Given the filter order, it's straightforward to determine the (constant) group delay. No need to look at the plots. Commented Mar 3, 2021 at 12:59

The group delay is the negative derivative of the phase response as the OP has stated, and specifically for the delay of one clock sample, the phase will go linearly negative to $$2\pi$$ radians as the frequency goes from 0 to $$f_s$$

From the picture we see the phase is going approximately 800 degrees at a frequency of $$.17\pi$$ rad/sample (where $$2\pi$$ rad/sample is the sampling rate). So this would be equivalent to

$$800/360*(2\pi)$$ rad /$$(.17\pi)$$ rad/sample = $$26$$ sample delay

For linear phase filters, the group delay is half the order which would be 25.5 in this case (we can't resolve that from the graphic alone). The OP wrote that the order of the filter was 51 which implies 52 taps.

• isn't it $\frac{N-1}{2}$ so a filter with 2 taps will have a group delay of 0.5
– Ben
Commented Mar 3, 2021 at 13:21
• yes N = 52 right? Commented Mar 3, 2021 at 13:22
• $N = 51$ (and cut off frequency $0.1$) in this specific example. So from the Ben's formula it's should be, I guess, $25$ as you Dan wrote before. But I must admit I don't get why the formula $800(2\pi/360).17\pi$ equals to $26$, when I try calculate it straight forward all I get is $7.457$ I'm sure I'm making some rookie mistake Commented Mar 3, 2021 at 13:29
• The order of the filter is 1 less than the number of taps, so is it a 51 order filter or 51 tap filter? (I wrote the formula incorrectly, sorry!--- it is simply comparing 2pi radians over the sampling rate of 2pi (in radians/sample) which ends us being a normalized slope of 1, so the slope is the delay in samples if you divide the phase in radians by the frequency in radians/sample. Commented Mar 3, 2021 at 13:31
• I have filter with order of 51, so 52 taps. Based on formula $\frac{N-1}{2}$ group delay should be $25.5$ samples. Commented Mar 3, 2021 at 14:46