Digital Signal Processing: A User's Guide by Douglas L. Jones. - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub for a complete version.

Chapter 3Digital Filter Design

3.1Overview of Digital Filter Design*

Advantages of FIR filters
  1. Straight forward conceptually and simple to implement

  2. Can be implemented with fast convolution

  3. Always stable

  4. Relatively insensitive to quantization

  5. Can have linear phase (same time delay of all frequencies)

Advantages of IIR filters
  1. Better for approximating analog systems

  2. For a given magnitude response specification, IIR filters often require much less computation than an equivalent FIR, particularly for narrow transition bands

Both FIR and IIR filters are very important in applications.

Generic Filter Design Procedure
  1. Choose a desired response, based on application requirements

  2. Choose a filter class

  3. Choose a quality measure

  4. Solve for the filter in class 2 optimizing criterion in 3

Perspective on FIR filtering

Most of the time, people do L optimal design, using the Parks-McClellan algorithm. This is probably the second most important technique in "classical" signal processing (after the Cooley-Tukey (radix-2) FFT).

Most of the time, FIR filters are designed to have linear phase. The most important advantage of FIR filters over IIR filters is that they can have exactly linear phase. There are advanced design techniques for minimum-phase filters, constrained L2 optimal designs, etc. (see chapter 8 of text). However, if only the magnitude of the response is important, IIR filers usually require much fewer operations and are typically used, so the bulk of FIR filter design work has concentrated on linear phase designs.

3.2FIR Filter Design

Linear Phase Filters*

In general, for πωπ H(ω)=|H(ω)|–(θ(ω)) Strictly speaking, we say H(ω) is linear phase if H(ω)=|H(ω)|–(ⅈωK)–(θ0) Why is this important? A linear phase response gives the same time delay for ALL frequencies! (Remember the shift theorem.) This is very desirable in many applications, particularly when the appearance of the time-domain waveform is of interest, such as in an oscilloscope. (see Figure 3.1)

Linear Phase Filters
Figure 3.1

Restrictions on h(n) to get linear phase

()_autogen-svg2png-0005.png

For linear phase, we require the right side of Equation to be –(θ0)(real,positive function of ω) . For θ0=0 , we thus require h(0)+h(M−1)=real number h(0)−h(M−1)=pure imaginary number h(1)+h(M−2)=pure real number h(1)−h(M−2)=pure imaginary number Thus h(k)=h*(M−1−k) is a necessary condition for the right side of Equation to be real valued, for θ0=0 .

For _autogen-svg2png-0015.png, or –(θ0)=– , we require h(0)+h(M−1)=pure imaginary h(0)−h(M−1)=pure real number h(k)=–(h*(M−1−k))

Usually, one is interested in filters with real-valued coefficients, or see Figure 3.2 and Figure 3.3.

Restrictions on h(n) to get linear phase
Figure 3.2
θ0=0 (Symmetric Filters). h(k)=h(M−1−k).

Restrictions on h(n) to get linear phase
Figure 3.3
_autogen-svg2png-0023.png (Anti-Symmetric Filters). h(k)=–(h(M−1−k)).

Filter design techniques are usually slightly different for each of these four different filter types. We will study the most common case, symmetric-odd length, in detail, and often leave the others for homework or tests or for when one encounters them in practice. Even-symmetric filters are often used; the anti-symmetric filters are rarely used in practice, except for special classes of filters, like differentiators or Hilbert transformers, in which the desired response is anti-symmetric.

So far, we have satisfied the condition that _autogen-svg2png-0025.png where A(ω) is real-valued. However, we have not assured that A(ω) is non-negative. In general, this makes the design techniques much more difficult, so most FIR filter design methods actually design filters with Generalized Linear Phase: _autogen-svg2png-0028.png, where A(ω) is real-valued, but possible negative. A(ω) is called the amplitude of the frequency response.

Excuse
A(ω)

_autogen-svg2png-0032.png_autogen-svg2png-0033.png

Example 3.1

Lowpass Filter

Desired |H(ω)|
Figure 3.4Desired |H(ω)|

Desired ∠H(ω)
Figure 3.5Desired ∠H(ω)
The slope of each line is _autogen-svg2png-0034.png.

Actual |H(ω)|
Figure 3.6Actual |H(ω)|
A(ω) goes negative.

Actual ∠H(ω)
Figure 3.7Actual ∠H(ω)
2π phase jumps due to periodicity of phase. π phase jumps due to sign change in A(ω) .

Time-delay introduces generalized linear phase.

For odd-length FIR filters, a linear-phase design procedure is equivalent to a zero-phase design procedure followed by an _autogen-svg2png-0039.png-sample delay of the impulse response. For even-length filters, the delay is non-integer, and the linear phase must be incorporated directly in the desired response!

Window Design Method*

The truncate-and-delay design procedure is the simplest and most obvious FIR design procedure.

Is it any Good?

Yes; in fact it's optimal! (in a certain sense)

L2 optimization criterion

find h[n]  ,   0≤nM−1    , maximizing the energy difference between the desired response and the actual response: i.e., find _autogen-svg2png-0002.png by Parseval's relationship

()_autogen-svg2png-0003.png

Since _autogen-svg2png-0004.png this becomes _autogen-svg2png-0005.png

h[n]

The best we can do is let _autogen-svg2png-0007.png Thus h[n]=hd[n]w[n] , _autogen-svg2png-0009.png is optimal in a least-total-sqaured-error ( L2, or energy) sense!

Why, then, is this design often considered undersirable?

Gibbs Phenomenon
(a) A(ω) , small M
Gibbs Phenomenon
(b) A(ω) , large M
Figure 3.7

For desired spectra with discontinuities, the least-square designs are poor in a minimax (worst-case, or L) error sense.

Window Design Method

Apply a more gradual truncation to reduce "ringing" (Gibb's Phenomenon)   

H(ω)=Hd(ω)*W(ω)

The window design procedure (except for the boxcar window) is ad-hoc and not optimal in any usual sense. However, it is very simple, so it is sometimes used for "quick-and-dirty" designs of if the error criterion is itself heurisitic.

Frequency Sampling Design Method for FIR filters*

Given a desired frequency response, the frequency sampling design method designs a filter with a frequency response exactly equal to the desired response at a particular set of frequencies ωk.

(3.1)
Procedure
_autogen-svg2png-0002.png

Desired Response must incluce linear phase shift (if linear phase is desired)

What is Hd(ω) for an ideal lowpass filter, cotoff at ωc?

_autogen-svg2png-0005.png

This set of linear equations can be written in matrix form

(3.2)
_autogen-svg2png-0006.png
(3.3)
_autogen-svg2png-0007.png

or _autogen-svg2png-0008.png So

(3.4)
_autogen-svg2png-0009.png
W N=M ωiωj+2πl ij