0% found this document useful (0 votes)
10 views10 pages

Lab 7

The document describes a student's lab session analyzing different pole-zero locations and their effects on system stability and response. The student performs 9 tasks where they define transfer functions with varying pole-zero positions and analyze the step, impulse and frequency responses. Key observations include systems being stable, conditionally stable, oscillating and decaying, or rising and oscillating depending on the pole and zero locations.

Uploaded by

Kinza Mallick
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views10 pages

Lab 7

The document describes a student's lab session analyzing different pole-zero locations and their effects on system stability and response. The student performs 9 tasks where they define transfer functions with varying pole-zero positions and analyze the step, impulse and frequency responses. Key observations include systems being stable, conditionally stable, oscillating and decaying, or rising and oscillating depending on the pole and zero locations.

Uploaded by

Kinza Mallick
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

KINZA PERVEZ

EE-20141
LAB SESSION 7

To study s-plane and plot impulse and frequency response for different pole-zero locations in s-
plane. Also, to determine whether the system is FIR or IIR.
clear all; close all; clc;

Num = poly([(0-(i*(pi/2))),(0+(i*(pi/2)))]);
Zeros = roots(Num); Den = poly([-1,-1]);
poles = roots(Den); sys = tf(Num,Den);

figure;
subplot(3,1,1);
pzmap(sys);
xlim([-2 2]); ylim([-4 4]);

subplot(3,1,2);
[mag phase w] = bode(sys);
mag = squeeze(mag);
plot(w,mag);
subplot(3,1,3);
impulse(sys);
H = dfilt.df1(Num,Den);A = isfir(H)

The system is IIR.


TASK#1:
clear all; close all; clc;

Num = [1]; Den = poly([0]);

sys=tf(Num,Den)
zeros=roots(Num)
poles=roots(Den)
KINZA PERVEZ
EE-20141
LAB SESSION 7

figure('color','w')
subplot(3,1,1)
pzmap(sys)
xlim([-3 3])
ylim([-3 3])

subplot(3,1,2)
[H w]=freqs(Num,Den);
mag=abs(H);
plot(w,mag)
xlabel('Frequency (\omega)');
ylabel('Gain |H(\omega)|')
title('Frequency Response');
axis tight; grid

subplot(3,1,3)
impulse(sys,'r')
grid

TASK#2:
clear all; close all; clc;

Num = [1];
Den = poly([-0.5]);

sys=tf(Num,Den)
zeros=roots(Num)
poles=roots(Den)
KINZA PERVEZ
EE-20141
LAB SESSION 7

figure('color','w')
subplot(3,1,1)
pzmap(sys)
xlim([-3 3]); ylim([-3 3]);

subplot(3,1,2)
[H w]=freqs(Num,Den);
mag=abs(H);
plot(w,mag)
xlabel('Frequency (\omega)');
ylabel('Gain |H(\omega)|');
title('Frequency Response');
axis tight; grid;

subplot(3,1,3)
impulse(sys,'r'); grid;

The system is stable.


TASK#3:
clear all; close all; clc;

Num = [1];
Den = poly([0.5]);

sys=tf(Num,Den)
zeros=roots(Num)
poles=roots(Den)

figure('color','w')
subplot(3,1,1)
pzmap(sys)
xlim([-3 3]); ylim([-3 3]);
KINZA PERVEZ
EE-20141
LAB SESSION 7

subplot(3,1,2)
[H w]=freqs(Num,Den);
mag=abs(H);
plot(w,mag)
xlabel('Frequency (\omega)'); ylabel('Gain |H(\omega)|')
title('Frequency Response')
axis tight; grid

subplot(3,1,3)
impulse(sys,'r'); grid;

The system is stable.


TASK#4:
clear all; close all; clc;

Num = [1];
Den = poly([(0-(i*(pi/2))),(0+(i*(pi/2)))]);

sys=tf(Num,Den)
zeros=roots(Num)
poles=roots(Den)

figure('color','w')
subplot(3,1,1)
pzmap(sys)
xlim([-3 3]); ylim([-3 3]);

subplot(3,1,2)
[H w]=freqs(Num,Den);
mag=abs(H);
plot(w,mag)
KINZA PERVEZ
EE-20141
LAB SESSION 7

xlabel('Frequency (\omega)'); ylabel('Gain |H(\omega)|')


title('Frequency Response')
axis tight; grid

subplot(3,1,3)
impulse(sys,'r'); grid;

The system is conditionally stable.


TASK#5:
clear all; close all; clc;

Num = [1];
Den = poly([(-0.5-(i*(pi/2))),(-0.5+(i*(pi/2)))]);

sys=tf(Num,Den)
zeros=roots(Num)
poles=roots(Den)

figure('color','w')
subplot(3,1,1)
pzmap(sys)
xlim([-3 3]); ylim([-3 3]);

subplot(3,1,2)
[H w]=freqs(Num,Den);
mag=abs(H);
plot(w,mag)
xlabel('Frequency (\omega)');
ylabel('Gain |H(\omega)|')
title('Frequency Response')
axis tight; grid
KINZA PERVEZ
EE-20141
LAB SESSION 7

subplot(3,1,3)
impulse(sys,'r'); grid;


The system is oscillating and decaying.
TASK#6:
clear all; close all; clc;

Num = [1];
Den = poly([(0.5-(i*(pi/2))),(0.5+(i*(pi/2)))]);

sys=tf(Num,Den)
zeros=roots(Num)
poles=roots(Den)

figure('color','w')
subplot(3,1,1)
pzmap(sys)
xlim([-3 3]); ylim([-3 3]);

subplot(3,1,2)
[H w]=freqs(Num,Den);
mag=abs(H);
plot(w,mag)
xlabel('Frequency (\omega)');
ylabel('Gain |H(\omega)|')
title('Frequency Response')
axis tight; grid

subplot(3,1,3)
impulse(sys,'r'); grid;
KINZA PERVEZ
EE-20141
LAB SESSION 7

The system is rising and oscillating.


TASK#7:
clear all; close all; clc;

Num = poly([(0-(i*(pi/2))),(0+(i*(pi/2)))]);
Den = poly([(-0.2-(i*(pi/4))),(-0.2+(i*(pi/4)))]);

sys=tf(Num,Den)
zeros=roots(Num)
poles=roots(Den)

figure('color','w')
subplot(3,1,1)
pzmap(sys)
xlim([-3 3]); ylim([-3 3]);

subplot(3,1,2)
[H w]=freqs(Num,Den);
mag=abs(H);
plot(w,mag)
xlabel('Frequency (\omega)');
ylabel('Gain |H(\omega)|')
title('Frequency Response')
axis tight; grid

subplot(3,1,3)
impulse(sys,'r'); grid;
KINZA PERVEZ
EE-20141
LAB SESSION 7

The system is decaying or oscillatory.


TASK#8:
clear all; close all; clc;

Num = poly([(0-(i*(pi/2))),(0+(i*(pi/2)))]);
Den = poly([(0.2-(i*(pi/4))),(0.2+(i*(pi/4)))]);

sys=tf(Num,Den)
zeros=roots(Num)
poles=roots(Den)

figure('color','w')
subplot(3,1,1)
pzmap(sys)
xlim([-3 3]); ylim([-3 3]);

subplot(3,1,2)
[H w]=freqs(Num,Den);
mag=abs(H);
plot(w,mag)
xlabel('Frequency (\omega)');
ylabel('Gain |H(\omega)|')
title('Frequency Response')
axis tight; grid

subplot(3,1,3)
impulse(sys,'r'); grid;
KINZA PERVEZ
EE-20141
LAB SESSION 7

TASK#9:
clear all; close all; clc;
Num = poly([(-0.1-(i*(pi/2))),(-0.1+(i*(pi/2)))]);
Den = poly([(0-(i*(pi/2))),(0+(i*(pi/2)))]);
sys=tf(Num,Den)
zeros=roots(Num)
poles=roots(Den)
figure('color','w')
subplot(3,1,1)
pzmap(sys)
xlim([-3 3]); ylim([-3 3]);
subplot(3,1,2)
[H w]=freqs(Num,Den);
mag=abs(H);
plot(w,mag)
xlabel('Frequency (\omega)');
ylabel('Gain |H(\omega)|')
title('Frequency Response')
axis tight; grid
subplot(3,1,3)
impulse(sys,'r'); grid;
KINZA PERVEZ
EE-20141
LAB SESSION 7

clear all; close all; clc;

Num = poly([(0.1-(i*(pi/2))),(0.1+(i*(pi/2)))]);
Den = poly([(0-(i*(pi/2))),(0+(i*(pi/2)))]);

sys=tf(Num,Den)
zeros=roots(Num)
poles=roots(Den)

figure('color','w')
subplot(3,1,1)
pzmap(sys)
xlim([-3 3]); ylim([-3 3]);

subplot(3,1,2)
[H w]=freqs(Num,Den);
mag=abs(H);
plot(w,mag)
xlabel('Frequency (\omega)');
ylabel('Gain |H(\omega)|')
title('Frequency Response')
axis tight; grid

subplot(3,1,3)
impulse(sys,'r'); grid;

You might also like