Lab 12 Final - Copy
Lab 12 Final - Copy
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:
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.
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: