8
$\begingroup$

For an FIR filter, with symmetrical tap values $h[N-1-n]=h[n]$,

  • why is the group delay $\frac{N-1}{2} T$ (where $N$ is the number of taps of the FIR filter and $T$ is the sampling time)?
  • Why is linear phase so important for the filter response?
$\endgroup$
2
  • 4
    $\begingroup$ Have a look at the book Oppenheim Schafer, Digital Signal Processing, section 5.7. They have quite a good explanation about this. It's the bible of signal precessing and will give you real precise answers $\endgroup$
    – Rouven
    Commented Dec 7, 2017 at 8:54
  • 1
    $\begingroup$ Good overview at MathWorks: Compensate for the Delay Introduced by an FIR Filter. $\endgroup$
    – Danijel
    Commented Aug 23, 2018 at 13:09

4 Answers 4

9
$\begingroup$

To be precise the group delay of a linear phase FIR filter is $(N-1)/2$ samples, where $N$ is the filter length (i.e. the number of taps). The group delay is constant for all frequencies, because the filter has a linear phase, i.e. its impulse response is symmetrical (or asymmetric). A linear phase means that all frequency components of the input signal experience the same delay, i.e. there are no phase distortions. So for a frequency selective filter (e.g., a low pass filter), if the input signal is in the passband of the filter, the output signal is approximately equal to the input signal delayed by the group delay of the filter. Note that in general FIR filters do not have a linear phase response. In this case, the group delay is a function of frequency.

EDIT:

Consider an odd length FIR filter with even symmetry ("type I filter"). In this case the group delay is an integer number of samples $K=(N-1)/2$. The filter has a linear phase response (because the group delay is the negative derivative of the phase) and the filter's frequency response can be written as

$$H(\omega)=A(\omega)e^{-jK\omega}$$

where $A(\omega)$ is the real-valued amplitude function, and $\phi(\omega)=-K\omega$ is the (linear) phase. If the input signal's Fourier transform is $X(\omega)$, then the Fourier transform of the output signal is given by

$$Y(\omega)=H(\omega)X(\omega)=A(\omega)X(\omega)e^{-jK\omega}\tag{1}$$

Now assume that the frequency content of the input signal is in the passband of the filter, i.e. in the frequency region where $A(\omega)\approx 1$ holds. Then from (1) the output signal's spectrum can be written as

$$Y(\omega)\approx X(\omega)e^{-jK\omega}\tag{2}$$

and, from the shift property of the Fourier transform, the output signal is (approximately) given by

$$y(n)\approx x(n-K)$$

i.e. $y(n)$ is a delayed version of the input signal, where the delay is given by the group delay $K$.

$\endgroup$
6
  • $\begingroup$ the highest weight is assigned to the middle coefficient. so the output of the filter will follow the input only after (N-1)/2 samples. Is this why the group delay is (N-1)/2? $\endgroup$ Commented Oct 2, 2014 at 9:37
  • $\begingroup$ @JayeshP: Not really, because the middle coefficient (assuming that $N$ is odd) is not necessarily the largest coefficient, even though in practice it often is. I'll try to add more explanation to my answer later. $\endgroup$
    – Matt L.
    Commented Oct 2, 2014 at 10:02
  • $\begingroup$ If N is even, the group delay will be ((N/2)+(1/2))T? $\endgroup$ Commented Oct 2, 2014 at 10:42
  • $\begingroup$ @JayeshP: If $N$ is even, the equation that Matt gave in his answer still holds. In this case, you have a non-integer-sample group delay, which is sometimes undesirable. $\endgroup$
    – Jason R
    Commented Oct 2, 2014 at 11:50
  • $\begingroup$ @JayeshP: I've added some more information to my answer. $\endgroup$
    – Matt L.
    Commented Oct 2, 2014 at 14:58
1
$\begingroup$

Why is the group delay constant and close to half of the number of taps in this symmetric tap filter ($h[N−1−n]=h[n]$)? The answer lies in it being symmetric. Note that the $n^{th}$ tap (coefficient) of an FIR filter can be seen as delay of $n$ "sampling intervals" (or $n$ samples).

Thus, if you pick a pair of "symmetric" taps/coefficients of this filter (say at $n_1$ and $N-n_1-1$), and pass a sinusoidal signal, $\sin(\omega t)$, through this pair, you would see that the output of this passing is a sinusoidal signal of the same frequency $\omega$ but with a delay which is an average of the two tap delays, i.e., $(N-n_1-1+n_1)/2 = (N-1)/2$. It is simple math, i.e., try adding $\sin(\omega t-t_0-t_1)$ and $\sin(\omega t-t_0+t_1)$, the sum is $K*\sin(\omega t-t_0)$. Do this for all $N/2$ pairs and you will find all will have a time delay of $t_0 = (N-1)/2$. Please excuse my extreme brevity and delay in replying. I hope I got the point across.

$\endgroup$
1
$\begingroup$

To answer your second question: why Linear phase so important for filter response. Consider filter as a channel, when you pass your signal from a channel what you want is all frequency components to be delayed by equal number of samples, if different frequency components gets delayed by different value then there will be distortion in your signal which is a bit difficult to compensate while a constant delay can be compensated by some simple techniques at receiver. Linear phase or constant group delay indicates that all frequencies (for which filter response is linear) are delayed by an equal amount. Therefore your output signal is just a shifted version of your input signal.

$\endgroup$
0
$\begingroup$

FIR Equation is given as

$y(k) = \sum\limits_{i=1}^{N-1}w_n$$\cos\omega(k-n)$ - Eq(1)

where

  1. $w_n$ are taps (coefficients or weights) of the filter

  2. $\omega$ is the frequency of the signal

  3. $N$ is the number of filter taps

Consider an example $N = 8$ (ie 8 Tap FIR filter ie filter having 8 coefficients/weights). The coefficients will be from $w_0$ to $w_7$

For symmetric FIR filter - Eq(2)

$w_0$ = $w_7$

$w_1$ = $w_6$

$w_2$ = $w_5$

$w_3$ = $w_4$

Eq 1 can be expanded for N=8 case as - Eq(3)

$y(k) = w_0\cos\omega(k-0) + w_1\cos\omega(k-1) + w_2\cos\omega(k-2) + w_3\cos\omega(k-3) + w_4\cos\omega(k-4) + w_5\cos\omega(k-5) + w_6\cos\omega(k-6) + w_7\cos\omega(k-7)$

Due to symmetry indicated in Eq(2), we can rewrite Eq(3) as Eq(4)

$y(k) = w_0\cos\omega(k-0) + w_1\cos\omega(k-1) + w_2\cos\omega(k-2) + w_3\cos\omega(k-3) + w_3\cos\omega(k-4) + w_2\cos\omega(k-5) + w_1\cos\omega(k-6) + w_0\cos\omega(k-7)$

Eq(4) can be indicated in compact form as Eq(5)

y$(k) = \sum\limits_{i=1}^{3} w_n\cos\omega(k-n) + \sum\limits_{i=1}^{3} w_n\cos\omega(k-7+n)$

Using the identity

$\cos A + \cos B = 2\cos(A+B)/2 \cdot \cos(A-B)/2$

Eq(5) can be expressed as

$y(k) = 2\sum\limits_{i=1}^{3} \cos\ \omega(k-(7/2))w_n \cdot\cos\ \omega(n-(7/2))$

We can take $\cos\ \omega(k-(7/2))$ out of summation, as this equation does not depend on $n$ which is limit of summation

$y(k) = \cos\ \omega(k-(7/2))\sum\limits_{i=1}^{3} 2w_n\cos\ \omega(n-(7/2))$

We can see that, value inside the summation is a constant and value outside the summation is the signal sample shifted by 7/2 ie (N-1)/2 --- We have taken N as 8 (N is number or filter taps/coefficients/weights)

So the signal is delayed by (N-1)/2 in symmetric or antisymmetric FIR filter. In the answer, example is shown only for symmetric case. Similarly antisymmetric case also can be worked out.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.