You are on page 1of 2

Assignment 6: Time domain simulation

of filters
1. Write a MATLAB code to design a first order low pass filter with transfer
1−𝛼 1+𝑧 −1
function 𝐻 (𝑧 ) = Where 𝛼 = 0.9 𝑎𝑛𝑑 𝜔(−2𝜋, 2𝜋, 1024)
2 1−𝛼𝑧 −1
Also plot the pole-zero graphs, magnitude and phase spectrum.
Exercise:
i. Write the corresponding difference equation with x(n) as input and
y(n) as output.
ii. Take x(n) as sinc pulse with its spectrum 𝑋(𝜔) uniform in the range
(−2𝜋, 2𝜋). Take No. of points as 1024.
iii. Find the output response y(n) and plot in sample domain, then apply
FFT and plot spectrum of 𝑌(𝜔).

2. Write a MATLAB code to design a first order high pass filter with transfer
1−𝛼 1−𝑧 −1
function 𝐻 (𝑧 ) = Where 𝛼 = 0.9 𝑎𝑛𝑑 𝜔(−2𝜋, 2𝜋, 1024)
2 1−𝛼𝑧 −1
Also plot the magnitude and phase spectrum. Repeat the exercise as given in
Q.1

3. Design a band pass filter with transfer function 𝐻𝐵𝑃 (𝑧) =


1−𝛼 1−𝑧 −2
𝑊ℎ𝑒𝑟𝑒 𝛽 = cos 𝜔0 and 𝐵𝑊 = 𝜔𝐶2 − 𝜔𝐶1 =
2 1−𝛽(1+𝛼)𝑧 −1 +𝛼𝑧 −2
−1 2𝛼
cos (1−𝛼2 ) 𝛼 = 0.8 and 𝛽 = 0.34 𝜔(−2𝜋, 2𝜋, 1024). Repeat the
exercise as given in Q.1

4. Design a band stop filter with transfer function 𝐻𝐵𝑆 (𝑧) =


1+𝛼 1−2𝛽𝑧 −1 +𝑧 −2
𝛽 = cos 𝜔0 and 𝐵𝑊 = 𝜔𝐶2 − 𝜔𝐶1 =
2 1−𝛽(1+𝛼)𝑧 −1 +𝛼𝑧 −2
−1 2𝛼
cos (1−𝛼2 ) 𝛼 = 0.8 and 𝛽 = 0.5 𝜔(−2𝜋, 2𝜋, 1024). .Also plot its pole-
zero pattern, magnitude and phase spectrum. Repeat the exercise as given in
Q.1

You might also like