## Transcribed Text

Effect of Pole and Zero Locations on the Frequency Response
Of an LTI Discrete Time System
In this experiment you will investigate the effect of pole and zero placement in the z-plane on
the frequency response of an LTI DTS IIR digital filter. MATLAB will be used for this.
The transfer function
H z( )
of the LTI DTS that we will operate is given by
1 2 ( ) ( ) ( )
( ) ( ) j j
z z z z H z
z re z re
where the two zeros of
H z( )
are:
1z
and
2 z
, and the two poles of
H z( )
are:
j re
and
j re
,
and where
r
is the magnitude of the poles and
and
are the angles of the poles. The
transfer function can also be written as
1 1 1 2
1 2 1 2 1 2
1 1 1 2 2
(1 ) (1 ) 1 ( ) ( )
(1 ) (1 ) 1 2 cos( ) j j
z z z z z z z z z z H z
re z re z r z r z
By inspection of
H z( )
, the difference equation relating the output
y n( )
to the input
x n( )
is
given by
2
1 2 1 2 y n x n z z x n z z x n r y n r y n ( ) ( ) ( ) ( 1) ( 2) 2 cos( ) ( 1) ( 2)
Depending on the pole and zero locations in the z-plane, this algorithm can do different kinds of
filtering. Let’s investigate the possibilities.
1) Set the sampling frequency to
8 sf KHz
, and get the input
x n( )
from sampling
x t t t t ( ) cos(400 ) cos(3600 ) cos(7000 )
(a) What are the frequencies in Hz of the sinusoids in
xt( )
? Set the poles and zeros as follows:
1 2 z z r 1, 1, 0.95,
and
/ 20 .
(b) In the z-plane and with respect to the unit circle,
plot the poles and zeros of the transfer function. (c) Calculate and plot the magnitude frequency
response over the frequency range,
0 s
f f
. (d) What kind of a filter is this? (e) Calculate
the coefficients of the difference equation, and give the difference equation. (f) Apply the input
to the difference equation, and run the algorithm long enough to reach steady-state behavior,
and plot the input and output. (g) In view of the frequency response, discuss the performance of
the filter.
2) Repeat part (1) for
r 0.65.
How did the pole locations change? Discuss what happened
to the frequency response?
3) Repeat part (1) for
r 0.99.
How did the pole locations change? Discuss what happened
to the frequency response?
4) Repeat part (1) for:
1 2 z z r 1, 1, 0.95,
and
/ 2.1 .
5) Repeat part (1) for:
1 2 z z r 1, 1, 0.95,
and
/1.1 .
6) Using the coefficients of parts (1), (2), and (3), obtain and plot the unit pulse response. How
does the unit pulse response change?
7) Repeat part (1) for:
1 2 z z r 1, 1, 1.05,
and
/ 2.1 .
Explain what happened?
8) Overall, give a discussion about the relationship between pole magnitude and angle and the
LTI DTS frequency response. How do the zero locations affect the frequency response?
9) Set the zeros to:
1 2 z z 0, 0,
and set the pole magnitude to:
r 1.0.
Three values of
will be tried, which are:
1 2 / 20, /10,
and
3 / 5.
Set the sampling frequency
to
20 .
sf KHz
For each pole angle, give a pole zero plot. Describe how the poles are being
moved.
(a) For
1
, calculate the coefficients and give the difference equation. For a unit pulse input, run
the algorithm just long enough to reach steady state conditions. Plot the unit pulse response.
What is the frequency of the steady-state response?
b) Repeat part (a) for
2
.
c) Repeat part (a) for
3
.
d) This algorithm can be used as a sine wave generator. What value of
must be used to
generate a 2.5 KHz sine wave?

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction
of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice.
Unethical use is strictly forbidden.

clc;clear;

fs=8*10^3;

t=0:1/fs:0.03;

%input signal

x = cos(400*pi*t) + cos(3600*pi*t) + cos(7000*pi*t);

plot(t,x);

title('input');

xlabel('time(s)');

ylabel('x(n)');

B = [1 2 1];

A = [1 -1*0.95*2*cos(pi/20) 0.95^2];

H = tf(B,A);

pzmap(H)

grid on

[hw,fw] = zerophase(B,A);

z = roots(B);

p = roots(A);

plot3(cos(fw),sin(fw),hw)

hold on

plot3(cos(fw),sin(fw),zeros(size(fw)),'--')

plot3(real(z),imag(z),zeros(size(z)),'o')

plot3(real(p),imag(p),zeros(size(p)),'x')

hold off

xlabel("Real")

ylabel("Imaginary")

view(35,40)

grid...