Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Digital Signal Processing Here we will make ourselves familiar with Matlab\'s si

ID: 2082480 • Letter: D

Question

Digital Signal Processing

Here we will make ourselves familiar with Matlab's signal processing toolbox. For this j, the following system function is given: H(z) = 0.05634(1 + z^-1)(1- 1.0166z^-1 + z^-2)/(1 - 0.683 z^-1)(1 - 1.4461 z^-1 + 0.7957 z^-2) (a) Learn on how to represent a given system function in Matlab. Then represent the above system with Mat lab's variables. Note that you can use conv() function for polynomial multiplications. (b) Then use roots() function to determine the pole and zero locations of H(z). (c) Use the functions freqz() and grpdelay() to pulicate the plot of Fig. 5.15 in the book. (d) Use the function zplane() to duplicate Fig. 5.14 in the book. (e) Use the function residuez() to make partial fraction expansion of H(z). (f) Learn how to draw direct form II signal flow graphs in Matlab for the system implementation. Draw the diagram by using Matlab.

Explanation / Answer

Copy the following code to a new script file in MATLAB.

close all; clear all; clc;
k = 0.05634;
num1 = [1 1];
num2 = [1 -1.0166 1];
num = k*conv(num1,num2); % coefficients of numerator polynomial
den1 = [1 -0.683];
den2 = [1 -1.4461 0.7957];
den = conv(den1,den2); % coefficients of denominator polynomial
h = tf(num,den,-1,'variable','z^-1'); % system function H(z)
fprintf('Transfer function '); h

% Part (b)
poles = roots(den);
zeros = roots(num);
fprintf('Poles of H(z) = '); disp(poles);
fprintf('Zeros of H(z) = '); disp(zeros);

% Part (c)
figure; freqz(num,den);
figure; grpdelay(num,den);

% Part (d)
figure; zplane(zeros,poles); title('Pole-Zero Map');

% Part (e)
[r,p,k] = residuez(num,den);
fprintf('Residues = '); disp(r);
fprintf('Poles = '); disp(p);
fprintf('Direct term coefficients = '); disp(k);

% Part (f)
Hd = dfilt.df2(num,den);
block(Hd); % block diagram of direct form 2 filter structure