0% found this document useful (0 votes)
4 views

Lab 12 Final - Copy

Digital Signal Processing Lab Manual Solved

Uploaded by

cpen221101010
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Lab 12 Final - Copy

Digital Signal Processing Lab Manual Solved

Uploaded by

cpen221101010
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Department of Computer Engineering

Digital Signal Processing

Course Instructor:

Lab Engineer:

Semester
LAB EXPERIMENT # 12
Linear Phase FIR Filter Based on Windows

OBJECTIVES
The aim of this lab to design ideal filters.
Truncation (windowing) of impulse response obtain finite impulse response filters.

DESCRIPTION
The basic idea behind the window design is to choose a proper ideal frequency selective filter
(which always has a no causal, infinite duration impulse response) and then truncate (or window) its
impulse response to obtain a linear-phase and causal FIR filter. Therefore, the emphasis in this

denote an ideal frequency-selective𝐻𝑑(𝑒𝑗𝑤), which has a unity magnitude gain and linear-phase
method is on selecting an appropriate windowing function and appropriate ideal filter. We will

wc < 𝜋 is given by
characteristics over its pass band, and zero response over its stop band. An ideal LPF of bandwidth

off frequency, and 𝛼 is called the sample delay (note that from the DTFT properties, 𝑒𝑗𝛼𝑤 implies
where wc, is also called the cut-

shift in the positive n direction or delay). The impulse response of this filter is of infinite duration
and is given by

Note that hd(n) is symmetric with respect to a, a fact useful for linear phase FIR filters.
To obtain an FIR filter from h d(n), one has to truncate h d(n) on both sides. To obtain a causal and
linear-phase FIR filter h(n) of length M, we must have

This operation is called "windowing." In general, h(n) can be thought of as being formed by the
product of hd(n) and a window function w(n) as follows:

Depending on how we define w(n) above, we obtain different window designs.


WINDOW DESIGN TECHNIQUES

Table 1: Summary of commonly used window function characteristics.


Window Name Transition Width Δw Exact Min. Stopband
Approximate Values Attenuation
4π 1.8π
Rectangular 21 dB
M M
8π 6.1π
Bartlett 25 dB
M M
8π 6.2π
Hanning 44 dB
M M
8π 6.6π
Hamming 53 dB
M M
12π 11π
Blackman 74 dB
M M

Design Equations
Given w,, w., Rp, and As

MATLAB IMPLEMENTATION
MATLAB provides several routines to implement window functions discussed in this section. A brief
description of these routines is given below.

• w=rectwin(M) returns the M-point rectangular window function in array w.


• w=triang(M) returns the M-point Bartlett (triangular) window function in array w.
• w=hann(M) returns the K-point Hanning window function in array w.
• w=hamming(M) returns the M-point Hamming window function in array w.
• w=blackman(M) returns the M-point Blackman window function in array w.
• w=kaiser(M, beta) returns the beta-valued Kpoint rectangular window function in array w.
Using these routines, we
can use MATLAB to design FIR filters based on the window technique, which also requires an ideal
low pass impulse response hd(n). Therefore, it is convenient to have a simple routine that creates
hd(n).

PRACTICE QUESTIONS
Q1. Design a high pass FIR filter using window method. Select an appropriate window
function and justify your choice by comparing it with any of other window function for same
high pass filter.
Code:

Graph:
Q2. Design a digital FIR lowpass filter with the following specifications:

Choose an appropriate window function from Table 1. Determine the impulse response and
provide a plot of the frequency response of the designed filter.
Code:

Graph:
Rubrics:

Theoretical Setup Troubleshooting Completeness Total Aggregate


concepts preparation

You might also like