lab5b - Purdue University ECE438 Digital Signal Processing...

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

View Full Document Right Arrow Icon
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]
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Purdue University: ECE438 - Digital Signal Processing with Applications 2 The rectangular window is defined as w ( n ) = braceleftBigg 1 n = 0 , 1 , . . . , N 1 0 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 0 1 2 3 4 -40 -30 -20 -10 0 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 0 1 2 3 4 -50 -40 -30 -20 -10 0 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 0 . 5 0 . 5 cos 2 πn N - 1 n = 0 , 1 , . . . , N 1 0 otherwise 2. Hamming window w ( n ) = braceleftBigg 0 . 54 0 . 46 cos 2 πn N - 1 n = 0 , 1 , . . . , N 1 0 otherwise
Image of page 2
Purdue University: ECE438 - Digital Signal Processing with Applications 3 3. Blackman window w ( n ) = braceleftBigg 0 . 42 0 . 5 cos 2 πn N - 1 + 0 . 08 cos 4 πn N - 1 n = 0 , 1 , . . . , N 1 0 otherwise In filter design using different truncation windows, there are two key frequency domain effects that are important to the design: the transition band roll-off , and the passband and stopband ripple (see Fig. 3 below). There are two corresponding parameters in the spectrum of each type of window that influence these filter parameters. The filter’s roll-off is related
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern