0% found this document useful (0 votes)
14 views1 page

DSAP Lab 3

Uploaded by

ashutoshjak88
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)
14 views1 page

DSAP Lab 3

Uploaded by

ashutoshjak88
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/ 1

Nepal Engineering College

Changunarayan, Bhaktapur
Digital Signal Analysis and Processing (DSAP) Lab
Lab 3: Poles and Zeros
A second order digital filter has the difference equation of the form:
y[n] = b0 x[n] +b1x[n-1] +b2 x[n-2] - a1 y[n-1] – a2 y[n-2]
Assume the values for {ak} and {bk}.
1. Write a MATLAB program that plots the frequency and phase responses of this digital filter.

Hints: Find the system function, replace z with ejω then plot ω Vs |H(ejω)| for magnitude plot and ω
Vs arg(H(ejω)) for phase plot. You can also use the freqz MATLAB command.

2. Write a MATLAB program that calculates the poles and zeros of this digital filter. Also plot the poles
and zeros of this filter. Hint use the tf2zp & zplane MATLAB command.

3. Write a MATLAB program that calculates the transfer function of the digital filter that has the
following poles and zeros. Hint use the zp2tf MATLAB command. Let the gain of this digital filter k = 1.

{zk} = {+1, -1, 1 + i, 1 – i} and {pk} = {0.5, -0.5, 0.1 + 0.2i, 0.1 – 0.2i}
4. Write a MATLAB program that plots the poles and zeros of the digital filter in step 3.

5. Write a MATLAB program that calculates the poles and zeros of the accumulator circuit whose
difference equation is y[n]  x[n]  y[n - 1] .

6. Write a MATLAB program that factorised the 4th order digital filter in step 3 into two cascaded 2nd
order digital filters. Hint use the zp2sos MATLAB command.

1  z 2 1  2 z 1  2 z 2
Ans: The resultant transfer function is H ( z ) 
1  0.25 z  2 1  0.2 z 1  0.05 z  2

7. Write a MATLAB program that calculates the partial fraction expansion of system function obtained
in question no. 6. Hint use residuez MATLAB command.
8. Write a MATLAB program that calculates the same for another 4th order digital filter that has the
following poles and zeros.
z1 = +2 z2 = -2 z3 = 1 +2 i z4 = 1 –2 i

p1 = 1 p2 = -1 p3 = 1+ i p4 = 1 - i

Compiled by: Rupesh D. Shrestha, nec2020

You might also like