Escolar Documentos
Profissional Documentos
Cultura Documentos
H(z) = (z-a)(z-b)/(z-c)(z-d)
1. Fix b= 1/2; c=1/3; d=1/4 and vary a=1/5, 2/5, 3/5, 4/5
a=[1,-0.5833+0.0833];
b=[1,-0.7,0.1];
b1=[1,-0.9,0.2];
b2=[1,-1.1,0.3];
b3=[1,-1.3,0.4];
w=[0:0.00627:pi];
H=freqz(b,a,w);
H1=freqz(b1,a,w);
H2=freqz(b2,a,w);
H3=freqz(b3,a,w);
magH=abs(H);
magH1=abs(H1);
magH2=abs(H2);
magH3=abs(H3);
figure;
subplot(221)
plot(w,magH);
title('|H(w)|')
xlabel('samples')
ylabel('magnitude')
subplot(222)
plot(w,magH1);
title('|H(w)|')
xlabel('samples')
ylabel('magnitude')
subplot(223)
plot(w,magH2);
title('|H(w)|')
xlabel('samples')
ylabel('magnitude')
subplot(224)
plot(w,magH3);
title('|H(w)|')
xlabel('samples')
ylabel('magnitude')
figure;
subplot(221)
zplane(b,a)
subplot(222)
zplane(b1,a)
subplot(223)
zplane(b2,a)
subplot(224)
zplane(b3,a)
|H(w)| |H(w)|
magnitude 1.4 1.5
magnitude
1.2
1
1
0.8 0.5
0 1 2 3 4 0 1 2 3 4
samples samples
|H(w)| |H(w)|
2 2
1.5 1.5
magnitude
magnitude
1 1
0.5 0.5
0 0
0 1 2 3 4 0 1 2 3 4
samples samples
1 1
Imaginary Part
Imaginary Part
0.5 0.5
0 0
-0.5 -0.5
-1 -1
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
Real Part Real Part
1 1
Imaginary Part
Imaginary Part
0.5 0.5
0 0
-0.5 -0.5
-1 -1
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
Real Part Real Part
2. Fix a= 1/2; b=1/3; c=1/4 and vary d=1/5, 2/5, 3/5, 4/5
b=[1,-0.83333,0.16666];
a=[1,-0.45,0.05];
a1=[1,-0.65,0.1];
a2=[1,-0.85,0.15];
a3=[1,-1.05,0.2];
w=[0:0.00627:pi];
H=freqz(b,a,w);
H1=freqz(b,a1,w);
H2=freqz(b,a2,w);
H3=freqz(b,a3,w);
magH=abs(H);
magH1=abs(H1);
magH2=abs(H2);
magH3=abs(H3);
figure;
subplot(221)
plot(w,magH);
title('|H(w)|')
xlabel('samples')
ylabel('magnitude')
subplot(222)
plot(w,magH1);
title('|H(w)|')
xlabel('samples')
ylabel('magnitude')
subplot(223)
plot(w,magH2);
title('|H(w)|')
xlabel('samples')
ylabel('magnitude')
subplot(224)
plot(w,magH3);
title('|H(w)|')
xlabel('samples')
ylabel('magnitude')
figure;
subplot(221)
zplane(b,a)
subplot(222)
zplane(b,a1)
subplot(223)
zplane(b,a2)
subplot(224)
zplane(b,a3)
|H(w)| |H(w)|
1.5 1.4
1.2
magnitude
magnitude
1 1
0.8
0.5
0 1 2 3 4 0 1 2 3 4
samples samples
|H(w)| |H(w)|
1.2 2.5
2
magnitude
1.1 magnitude
1.5
1
1
0.9 0.5
0 1 2 3 4 0 1 2 3 4
samples samples
1 1
Imaginary Part
Imaginary Part
0.5 0.5
0 0
-0.5 -0.5
-1 -1
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
Real Part Real Part
1 1
Imaginary Part
Imaginary Part
0.5 0.5
0 0
-0.5 -0.5
-1 -1
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
Real Part Real Part
3. Fix a= r*e^(j*pi/4); b= r*e^(-j*pi/4); c=1/2; d=0 and vary r=0.2, 0.5, 0.8, 1
a=[1,-0.5,0];
b=[1,-0.2*(exp((pi*i)/4)+exp((-pi*i)/4)),0.04];
b1=[1,-0.5*(exp((pi*i)/4)+exp((-pi*i)/4)),0.25];
b2=[1,-0.8*(exp((pi*i)/4)+exp((-pi*i)/4)),0.64];
b3=[1,-1*(exp((pi*i)/4)+exp((-pi*i)/4)),1];
w=[0:0.00627:pi];
H=freqz(b,a,w);
H1=freqz(b1,a,w);
H2=freqz(b2,a,w);
H3=freqz(b3,a,w);
magH=abs(H);
magH1=abs(H1);
magH2=abs(H2);
magH3=abs(H3);
figure;
subplot(221)
plot(w,magH);
title('|H(w)|')
xlabel('samples')
ylabel('magnitude')
subplot(222)
plot(w,magH1);
title('|H(w)|')
xlabel('samples')
ylabel('magnitude')
subplot(223)
plot(w,magH2);
title('|H(w)|')
xlabel('samples')
ylabel('magnitude')
subplot(224)
plot(w,magH3);
title('|H(w)|')
xlabel('samples')
ylabel('magnitude')
figure;
subplot(221)
zplane(b,a)
subplot(222)
zplane(b1,a)
subplot(223)
zplane(b2,a)
subplot(224)
zplane(b3,a)
|H(w)| |H(w)|
1.6 1.4
1.4 1.2
magnitude
magnitude
1.2 1
1 0.8
0.8
0 1 2 3 4 0 1 2 3 4
samples samples
|H(w)| |H(w)|
2 3
1.5
magnitude
magnitude
2
1
1
0.5
0 0
0 1 2 3 4 0 1 2 3 4
samples samples
1 1
Imaginary Part
Imaginary Part
0.5 0.5
0 0
-0.5 -0.5
-1 -1
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
Real Part Real Part
1 1
Imaginary Part
Imaginary Part
0.5 0.5
0 0
-0.5 -0.5
-1 -1
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
Real Part Real Part
4. Fix a=0; b=1/2 ; c= r*e^(j*3pi/4); d= r*e^(-j*3pi/4); and vary r=0.2, 0.5, 0.8.
b=[1,-0.5,0];
a=[1,-0.2*(exp((3*pi/4)*i)+exp((-3*pi/4)*i)),0.04];
a1=[1,-0.5*(exp((3*pi/4)*i)+exp((-3*pi/4)*i)),0.25];
a2=[1,-0.8*(exp((3*pi/4)*i)+exp((-3*pi/4)*i)),0.64];
w=[0:0.00627:pi];
H=freqz(b,a,w);
H1=freqz(b,a1,w);
H2=freqz(b,a2,w);
magH=abs(H);
magH1=abs(H1);
magH2=abs(H2);
figure;
subplot(311)
plot(w,magH);
title('|H(w)|')
xlabel('samples')
ylabel('magnitude')
subplot(312)
plot(w,magH1);
title('|H(w)|')
xlabel('samples')
ylabel('magnitude')
subplot(313)
plot(w,magH2);
title('|H(w)|')
xlabel('samples')
ylabel('magnitude')
figure;
title('Pole zero plot')
subplot(311)
zplane(b,a)
subplot(312)
zplane(b,a1)
subplot(313)
zplane(b,a2)
|H(w)|
magnitude 2
0
0 0.5 1 1.5 2 2.5 3 3.5
samples
|H(w)|
4
magnitude
0
0 0.5 1 1.5 2 2.5 3 3.5
samples
|H(w)|
10
magnitude
0
0 0.5 1 1.5 2 2.5 3 3.5
samples
Imaginary Part
-1
-5 0 5
Real Part
Imaginary Part
-1
-5 0 5
Real Part
Imaginary Part
-1
-5 0 5
Real Part
b. Discuss the effect of varying poles and zeros on |H(w)|.
The poles must be strictly inside the unit circle for the system to be causal and stable.
When the poles are far from the unit circle, the frequency response is quite flat.
When the poles are close to the unit circle, the frequency response has peaks. The
closer the poles are to the unit circle, the sharper the peak is.
Poles at the origin (z = 0) have no effect on |H(ω)|.
As the angle of the poles varies, the positions of the frequency response peaks vary.
Zeros close to unit circle decreases |H (w)| and poles close to unit circle increases |H
(w)|.