Sei sulla pagina 1di 9

DSP LAB REPORT

#006

TO:
SIR DR IHSAN-ULLAH
FROM:
YASAR KHAN / IHSAN ULLAH KHAN
REG #’s:
FA17-BTN-009 / FA17-BTN-026
DATE:
15-11-2019
Q.1_a:
CODE:
clear all
close all
clc

p=[-2;1/2] %poles
z=[0;0] %zeros
k=1; %
[num den]=zp2tf(z,p,k) % find denomenetor & numerator of a
transfuntion
zplane(z,p) % plot of ploes and zeros
filt(num,den) % creation of transfunction

OUTPUT
Q.1-B:
CODE
clear all
close all
clc

p=[1/3;2;3] %poles
z=[-1] %zeros
k=1; %
[num den]=zp2tf(z,p,k) % find denomenetor & numerator of a transfuntion
zplane(z,p) % plot of ploes and zeros
transper_function=filt(num,den) % creation of transfunction

OUTPUT
Q.2:
CODE
clear all
close all
clc

z=[0.5*exp(j*pi/2);0.5*exp(-j*pi/2)] %zeros
p=[1/4] %poles
k=1; %
[num den]=zp2tf(z,p,k) % find denomenetor & numerator of a transfuntion
zplane(z,p) % plot of ploes and zeros
transfer_function=filt(num,den) % creation of transfunction
OUTPUT
Q.3:
CODE
clear all
close all
clc

p=[0.8*exp(j*pi/4);0.8*exp(-j*pi/4)] %poles
z=[1/2] %zeros
k=1; %
[num den]=zp2tf(z,p,k) % find denomenetor & numerator of a transfuntion
zplane(z,p) % plot of ploes and zeros
transfer_function=filt(num,den) % creation of transfunction
OUTPUT
Q.4:
CODE
clear all
close all
clc
syms z
z=(1-(1/2)*(z^-1))/(1+(3/4)*(z^-1)+(1/8)*(z^-2)) % transfuntion

iztrans(z) % inverse transform


num=[1,1/2] % numerator
den=[1,3/4,1/8] %denomenotor

[z,p,k]=tf2zp(num,den) % finding zeros and poles


zplane(z,p) %ploting zeros and poles
OUTPUT
Q.5:
CODE
clear all
close all
clc
syms z
z=(1-(1/2)*(z^-1)-(1/3)*(z^-2))/(1-(1/4)*(z^-2)) % transfuntion

Result=iztrans(z) % inverse transform


num=[1;1/2;1/3] % numerator
den=[1 1/4] %denomenotor

[z,p,k]=tf2zp(num,den); % finding zeros and poles


zplane(z,p) %ploting zeros and poles
OUTPUT

The system is IIR as it has pole.


Q.6:
CODE
clear all
close all
clc
syms z
z=(1+2*(z^1)+(z^2))/(1-(1/2)*z^-1)*(1-(1/4)*z^-2)*(1-(z^-1)) % transfuntion

Result=iztrans(z) % inverse transform


num=[1,2,1] % numerator
den=[1,1/2,1/4,1/8] %denomenotor

[z,p,k]=tf2zp(num,den) % finding zeros and poles


zplane(z,p) %ploting zeros and poles
figure
impz(num,den)
OUTPUT

As the pole zero graph contains poles so it is IIR system.


Q.7:
CODE
clear all
close all
clc
syms z
z=(1-(1/2)*(z.^-1)-(1/3)*(z.^-2))/(1-(1/4)*(z.^-2)) % transfuntion

Result=iztrans(z) % inverse transform


num=[2;6;2;6;8] % numerator
den=[2] %denomenotor

[z,p,k]=tf2zp(num,den) % finding zeros and poles


zplane(z,p) %ploting zeros and poles
OUTPUT

Potrebbero piacerti anche