[comp.dsp] Why do FIR filters always have odd tap counts?

mcmahan@netcom.UUCP (Dave Mc Mahan) (12/06/90)

I have done some playing around with FIR filters for various purposes, and
always find something peculiar.  FIR filters always have odd tap counts.
Why is that?  I have looked in various DSP books, but can find no hint as
to why that fact is true.  The books I have looked in, however, always use
odd tap counts.  Can somebody give me a good, clear explaination?  I'm more
interested in a real explaination rather than pointers to books or
articles, but will try to find the articles if sited.

  -dave

-- 
Dave McMahan                            mcmahan@netcom.uucp
					{apple,amdahl,claris}!netcom!mcmahan

hedstrom@sirius.UVic.CA (Brad Hedstrom) (12/06/90)

In article <18193@netcom.UUCP> mcmahan@netcom.UUCP (Dave Mc Mahan) writes:
> I have done some playing around with FIR filters for various purposes, and
> always find something peculiar.  FIR filters always have odd tap counts.
> Why is that?  I have looked in various DSP books, but can find no hint as
> to why that fact is true.  The books I have looked in, however, always use
> odd tap counts.  Can somebody give me a good, clear explaination?  I'm more
> interested in a real explaination rather than pointers to books or
> articles, but will try to find the articles if sited.

A.V. Oppenheim and R.W. Schafer, Digital Signal Processing, 1975, pg.
238.

	"We note that for the case of N [the filter length] odd, the
phase shift corresponds to an integer number of samples delay, while
for N even, the delay is an integer plus one-half sample."

This also assumes linear phase filter (the coefficients are
symmetric).
_____________________________________________________________________________
Brad Hedstrom, University of Victoria, ECE Dept.
Internet:  hedstrom@sirius.uvic.ca
UUCP:   ...!{uw-beaver,ubc-vision}!uvicctr!hedstrom

wilf@sce.carleton.ca (Wilf Leblanc) (12/07/90)

mcmahan@netcom.UUCP (Dave Mc Mahan) writes:

>I have done some playing around with FIR filters for various purposes, and
>always find something peculiar.  FIR filters always have odd tap counts.
>Why is that?  I have looked in various DSP books, but can find no hint as
>to why that fact is true.  The books I have looked in, however, always use
>odd tap counts.  Can somebody give me a good, clear explaination?  I'm more
>interested in a real explaination rather than pointers to books or
>articles, but will try to find the articles if sited.

First of all, FIR filters don't always have odd tap counts.


Linear phase FIR filters _usually_ have an odd tap count
because the group delay is then fixed at (M-1)/2 for an
Mth order FIR filter.  If M is odd, (M-1)/2 is not an integer,
so the delay through the filter is a non integer.

i.e. 
Case I, M = 3, Linear phase FIR filter

H(z) = h(0) + h(1)z^-1 + h(0)z^-2
     = z^(-1) [ h(0)z + h(0)z^-1 + h(1) ]

The group delay is -d arg(H(e^jw))/dw
The part inside [ ] is real so the group delay is
     = 1
a delay of one sample.

Case II, M = 2, Linear Phase FIR filter

H(z) = h(0) + h(0) z^-1
     = z^(-1/2) [ h(0) z^(1/2) + h(0) z^(-1/2)]   

In this case the group delay is 1/2, a delay of 1/2 sample ?

In many cases this delay of 1/2, or (M-1)/2 samples is undesired,
thus it is best to use M odd.

Compensating for an integer delay is easy, but to compensate for
a non-integer delay is more DSP (i.e. another even order FIR).

I don't know if this is the only reason to use an odd tap count
Linear Phase FIR, but this is why I usually use odd tap counts.

>  -dave

>-- 
>Dave McMahan                            mcmahan@netcom.uucp
>					{apple,amdahl,claris}!netcom!mcmahan

--
Wilf LeBlanc                                 Carleton University
Internet: wilf@sce.carleton.ca               Systems & Computer Eng.
    UUCP: ...!uunet!mitel!cunews!sce!wilf    Ottawa, Ont, Canada, K1S 5B6

grosen@amadeus.ucsb.edu (Mark D. Grosen) (12/08/90)

Another reason to use odd-length FIR filters is that even-length
(symmetric) FIR filters always have a zero at omega = pi (ie, 1/2
the sampling rate).  This makes them unsuitable for use as highpass
filters, but possibly better for low or bandpass filters.
Mark D. Grosen		ARPA: grosen@amadeus.ucsb.edu
Signal Processing Lab / Communications Research Lab
ECE Dept.
University of California
Santa Barbara, CA  93106