Window Design Method

11.5.1 Window Design Method

The usual filter specifications of magnitude and linear phase can be translated into a time-domain specification (i.e., a desired impulse response) by means of the discrete-time Fourier transform. In this section, we will show how to design FIR filters using this specification with the window method. You will see that this is a trial-and-error method, as there is no measure of how close the designed filter is to the desired response, and that using different windows we obtain different results.

be the desired frequency response of an ideal discrete low-pass filter. Assume that the phase of H d ( e jω ) is zero. The desired impulse response is given by the inverse discrete-time Fourier transform

which is noncausal and of infinite length. The filter

H d ( z) =

h d [n]z −n

n =−∞

is thus not an FIR filter. To obtain an FIR filter that approximates H d ( e jω ) we need to window the impulse response h d [n] to get a finite length, and then delay the resulting windowed impulse response to achieve causality.

For an odd integer N, define

d [n]

−(N − 1)/2 ≤ n ≤ (N − 1)/2 = 0 elsewhere

hw[n] =h d [n]w[n]

where w[n] is a rectangular window,

w[n] =

0 otherwise

C H A P T E R 11: Introduction to the Design of Discrete Filters

that causes the truncation of h d [n]. The windowed impulse response hw[n] has a discrete-time Fourier transform of

X −1)/2

Hw(e ) =

hw[n]e −jωn

n =−(N−1)/2

For a large value of N we have that Hw(e jω ) must be a good approximation of H d ( e ) —that is,

|Hw(e jω )

| ≈ |H jω

∠Hw(e jω ) = ∠H

d ( e jω ) =0

It is not clear how the value of N should be chosen—this is what we meant by this design is a trial-and-error method.

To make Hw(z) a causal filter, we shift to the right the impulse response hw[n] by (N − 1)/2 (assume N is chosen to be an odd number so that this division is an integer) samples to obtain

X −1)/2

ˆH(z) = Hw(z)z −(N−1)/2 =

hw[m]z −(m+(N−1)/2)

m =−(N−1)/2

X −1

h d [n − (N − 1)/2)]w[n − (N − 1)/2)]z −n

n =0

after letting n = m + (N − 1)/2. For a large value of N, we have

jω )

| ˆH(e jω | = |Hw(e ) e −jω(N−1)/2 | = |Hw(e ) | ≈ |H

= ∠Hw(e ) −

since ∠Hw(e jω ) = ∠H d ( e jω ) = 0. That is, the magnitude response of the FIR filter ˆH(z) is approxi- mately (depending on the value of N) the desired response and its phase response is linear. These

results can be generalized as follows.

If the desired low-pass frequency response has a magnitude

( e |H jω d )

1 −ω c ≤ω≤ω c

and a linear phase

θ (ω) = −ω(N − 1)/2

the corresponding impulse response is given by

h [n]

sin(ω c ( n

− α))/(π(n − α)) n 6= α

ω c /π

n =α

11.5 FIR Filter Design 683

where α = (N − 1)/2. Using a window w[n] of length N and centered at (N − 1)/2, the windowed

impulse response is h[n] = h d [n]w[n], and the designed FIR filter is N X −1

H(z) =

h[n]z −n

n =0

The design using windows is a trial-and-error procedure. Different trade-offs can be obtained by using various windows and various lengths of the windows.

The symmetry of the impulse response h[n] with respect to (N − 1)/2, independent of whether this is an integer or not, guarantees the linear phase of the filter.