You are on page 1of 3

~

Muhammad Kamran Siddiqui

Class no : 21

LAB NO : 09
DESIGNING AND ANALYSIS OF ALL PASS AND NOTCH
FILTERS
Tasks:
Lab task:
a) Design and analysis of all pass filter in matlab.
b) Design and analysis of notch filter in matlab.
c) Design and analysis of notch filter using FDA tool.

Lab Task (a)


Draw the pole-zeros and frequency response of the transfer function given for the al
pass filter.

H(z) = (0.8z2 - 0.5z + 1) / (z2 0.5z + 0.8)

Pole-zero plot
Matlab Code:
num = [0.8 -0.5 1];
den = [1 -0.5 0.8];
figure (1)
[z p k] = zplane(num,den);
figure(2)
freqz(num,den);

Frequency Response

Muhammad Kamran Siddiqui

Class no : 21

Lab Task (b)


Draw the pole-zeros and frequency response of the transfer function given for notch
filter.
H(z) = ((1 + a)z2 2b(1 + a)z + (1 + a)) / (2z2 2b(1 + a)z + a)
Where b = cos(wo), a = mag (roots of v).
Matlab Code:
wo = 0.3 * pi;
b = cos(wo);
c = 0.05 * pi;
v = [cos(c), -2, cos(c)];
a = roots(v);
if abs(a(1))<1;
a = a(1);
else
a = a(2);
end
num1 = (1 + a)*[1 -2*b 1];
den1 = [2 -2*b*(1+a) a];
figure(3)
freqz(num1,den1)
figure(4)
[z p k] = zplane(num1,den1);

Pole-zero plot

Frequency Response

Lab Task (b)


Draw the pole-zeros and frequency response for notch filter of task-2 using FDA tool.
Notch Filter Specification

Magnitude plot

Muhammad Kamran Siddiqui


Frequency Response

Class no : 21
Pole-zero plot

You might also like