*This preview shows
pages
1–4. Sign up
to
view the full content.*

This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
**Unformatted text preview: **Purdue University: ECE438 - Digital Signal Processing with Applications 1 ECE438 - Laboratory 5: Digital Filter Design (Week 2) October 6, 2010 1 Introduction This is the second part of a two week laboratory in digital filter design. The first week of the laboratory covered some basic examples of FIR and IIR filters, and then introduced the concepts of filter design. In this week we will cover more systematic methods of designing both FIR and IIR filters. 2 Filter Design Using Standard Windows Download DTFT.m We can generalize the idea of truncation by using different windowing functions to trun- cate an ideal filter’s impulse response. Note that by simply truncating the ideal filter’s impulse response, we are actually multiplying (or “windowing”) the impulse response by a shifted rect () function. This particular type of window is called a rectangular window. In general, the impulse reponse h ( n ) of the designed filter is related to the impulse response h ideal ( n ) of the ideal filter by the relation h ( n ) = w ( n ) h ideal ( n ) , (1) where w ( n ) is an N-point window. We assume that h ideal ( n ) = ω c π sinc parenleftbigg ω c π parenleftbigg n − N − 1 2 parenrightbiggparenrightbigg , (2) where ω c is the cutoff frequency and N is the desired window length. Questions or comments concerning this laboratory should be directed to Prof. Charles A. Bouman, School of Electrical and Computer Engineering, Purdue University, West Lafayette IN 47907; (765) 494- 0340; [email protected] Purdue University: ECE438 - Digital Signal Processing with Applications 2 The rectangular window is defined as w ( n ) = braceleftBigg 1 n = 0 , 1 , . . . , N − 1 otherwise The DTFT of w ( n ) for N = 21 is shown in Fig. 1. The rectangular window is usually not preferred because it leads to the large stopband and passband ripple as shown in Fig. 2.-4-3-2-1 1 2 3 4-40-30-20-10 10 20 30 Frequency Response of Truncation Window Magnitude in dB Frequency Radians per Sample Figure 1: DTFT of a rectangular window of length 21.-4-3-2-1 1 2 3 4-50-40-30-20-10 10 Magnitude of Truncated Filter Response Magnitude in dB Frequency in Radians per Sample Figure 2: Frequency response of low-pass filter, designed using the truncation method. More desirable frequency characteristics can be obtained by making a better selection for the window, w ( n ). In fact, a variety of raised cosine windows are widely used for this purpose. Some popular windows are listed below. 1. Hanning window (as defined in Matlab, command hann(N) ): w ( n ) = braceleftBigg . 5 − . 5 cos 2 πn N- 1 n = 0 , 1 , . . . , N − 1 otherwise 2. Hamming window w ( n ) = braceleftBigg . 54 − . 46 cos 2 πn N- 1 n = 0 , 1 , . . . , N − 1 otherwise Purdue University: ECE438 - Digital Signal Processing with Applications 3 3. Blackman window w ( n ) = braceleftBigg . 42 − . 5 cos 2 πn N- 1 + 0 . 08 cos 4 πn N- 1 n = 0 , 1 , . . . , N − 1 otherwise In filter design using different truncation windows, there are two key frequency domain...

View
Full
Document