Beruflich Dokumente
Kultur Dokumente
z Transforms
2 of 3
Spring 2007
References
Fundamentals of Digital Signal Processing, 2002, by Joyce Van de Vegte, from Prentice Hall, ISBN 0-13-
016077-6
Topics of Discussion
Laplace Transform - Review
z Transform Basics: x[n] ↔ X(z), y(n) ↔ Y(z)
z Transform
Inverse z Transform
Transfer Functions
Transfer Functions and Difference Equations: H(z) = Output/Input = Y(z)/X(z)
Transfer Functions and Impulse Response: Y(z) = H(z)X(z)
Filter Outputs
Cascade and Parallel Combinations of Transfer Functions
Back to Time Domain
Standard Form
Simple Inverse z Transforms (table)
Inverse z Transform by Long Division
Inverse z Transform by Partial Fraction Expansion
Transfer Functions and Stability
Poles and Zeros
Stability (z-plane), unit circle
First Order Systems
Second Order Systems
Transfer Functions
Or
http://www.etcs.ipfw.edu/~lin/ECET357/2007Spring/Lectures/6_z-Transfomrs_S07_2_of_3.html 1/18
5/1/2018 Z Transform 2 of 3
Then rearrange the Y(z) and X(z) as follows to obtain the transfer function H(z):
Example 6-8: Find the transfer function of the system described by the difference equation:
Taking the z-transforms term by term, and rearrange Y(z) and X(z) to obtain H(z):
Example 6-10: Find the transfer function for the non-recursive difference equation
Ans:
The transfer function H(z):
Example 6-11: Find the difference equation that corresponds to the transfer function
http://www.etcs.ipfw.edu/~lin/ECET357/2007Spring/Lectures/6_z-Transfomrs_S07_2_of_3.html 2/18
5/1/2018 Z Transform 2 of 3
Ans:
or
Example 6-12: Find the difference equation that matches the transfer function:
Ans:
Find inverse transform for each term, to obtain the difference equation:
MATLAB Example
%ex6_12_transferHz.m
% Reference:
% Digital Signal Processing Laboratory using MATLAB, by Sanjit K. Mitra,
% from McGraw-Hill, 1999
%
% y[n] - 0.75y[n-1] + 0.125y[n-2] = 0.125x[n-1]
n = 0:40;
s1 = sin(2*pi*0.1*n);
s2 = sin(2*pi*0.4*n);
x = 2*s1 + (-3)*s2;
num = [0 0.125 0];
den = [1 -0.75 0.125];
IC =[0 0]; % Set zero initial conditions
y1 = filter(num, den, s1,IC); % compute y1[n]
y2 = filter(num, den, s2,IC); % compute y2[n]
y = filter(num, den, x, IC); % compute y[n]
yt = 2*y1 + (-3)*y2;
d = y - yt; % compute difference
subplot(3,1,1), stem(n, y)
subplot(3,1,2), stem(n, yt)
subplot(3,1,3), stem(n,d)
http://www.etcs.ipfw.edu/~lin/ECET357/2007Spring/Lectures/6_z-Transfomrs_S07_2_of_3.html 4/18
5/1/2018 Z Transform 2 of 3
Where
Y(z) – the z-transform of y[n]
H(z) – the z-transform of h[n]
X(z) – the z-transform of x[n]
And
MATLAB Example
Example 6.14: Find the difference equation that corresponds to the cascaded sections of block diagrams.
%ex_6_14_cascadeHz.m
% Reference: Example 6.14
% Fundamentals of Digital Signal Processing, 2002,
% by Joyce Van de Vegte, from Prentice Hall, ISBN 0-13-016077-6
%
% Three cascading sections of a filter:
% y1[n] = x1[n] - 0.1 x1[n-1] + 0.2 x1[n-2]
% y2[n] = x2[n] + 0.3 x2[n-1] + 0.1 x2[n-2]
% y3[n] = x3[n] - 0.4 x3[n-1]
%
% Transfer Functions
% H1(z) = 1 - 0.1z^-1 + 0.2z^-2
http://www.etcs.ipfw.edu/~lin/ECET357/2007Spring/Lectures/6_z-Transfomrs_S07_2_of_3.html 6/18
5/1/2018 Z Transform 2 of 3
% H2(z) = 1 + 0.3z^-1 + 0.1z^-2
% H3(z) = 1 - 0.4z^-1
%
% H(z) = H1(z)H2(z)H3(z)
H1_z = [ 1 -0.1 0.2];
H2_z = [ 1 0.3 0.1];
H3_z = [ 1 -0.4 0];
H_z = conv(H3_z, conv(H1_z, H2_z))
% H_z = [1.0 -0.2 0.19 -0.058 0 -0.008 0]
% H(z) = 1 -0.2z^-1 + 0.19z^-2 - 0.058z^-3 + 0.0z^-4 - 0.008z^-5
Example 6.15: Find the transfer function of the transposed direct form 2 realization of the filter.
%ex_6_15_cascadeHz.m
% Reference: Example 6.15
% Fundamentals of Digital Signal Processing, 2002,
% by Joyce Van de Vegte, from Prentice Hall, ISBN 0-13-016077-6
%
% Three cascading sections of a filter:
% y1[n] = -0.1y1[n-1] + 0.5y1[n-2] + 2.5x1[n] +0.9x1[n-1] -0.4x1[n-2]
% y2[n] = 0.2y2[n-1] -0.2y2[n-2] + 1.2x2[n-1] + 0.5x2[n-1] + 0.1x2[n-2]
%
% Transfer Functions
% H1(z) = (2.5 + 0.9z^-1 - 0.4z^-2)/(1 + 0.1 z^-1 - 0.5z^-2)
% H2(z) = (1.2 + 0.5z^-1 + 0.1z^-2)/(1 - 0.2z^-1 + 0.2z^-2)
%
% H(z) = H1(z)H2(z)
numH1_z = [ 2.5 0.9 -0.4];
denH1_z = [ 1 0.1 -0.5];
numH2_z = [ 1.2 0.5 0.1];
denH2_z = [ 1 -0.2 0.2];
numH_z = conv(numH1_z, numH2_z)
denH_z = conv(denH1_z, denH2_z)
printsys(numH_z, denH_z, 'z')
numH_z =
denH_z =
num/den =
Example 6.16
Find the transfer function for the parallel combination in Figure 6.8.
%ex_6_16_cascadeHz.m
% Reference: Example 6.16
% Fundamentals of Digital Signal Processing, 2002,
% by Joyce Van de Vegte, from Prentice Hall, ISBN 0-13-016077-6
%
% Find the y2[n] for the lower section of the filter:
http://www.etcs.ipfw.edu/~lin/ECET357/2007Spring/Lectures/6_z-Transfomrs_S07_2_of_3.html 7/18
5/1/2018 Z Transform 2 of 3
% y[n] = y1[n] + y2[n]
% = upper section output + lower section output
% y2[n] = 0.2y2[n-1] + 0.4y2[n-2] + 0.25x[n] +0.1x[n-1]
% y1[n] = x[n-1]
%
% Transfer Functions
% H2(z) = (1 + 0.25z^-1 + 0.1z^-2)/(1 + 0.2z^-1 + 0.4z^-2)
% H1(z) = z^-1
% H(z) = H1(z) + H2(z)
% === Conver all H1(z)and H2(z)to show the positive z terms
% H2(z) = (z^2 + 0.25z + 0.1)/(z^2 + 0.2z + 0.4)
% H1(z) = 1/z
% H(z) = H1(z) + H2(z)
% z^2 + 0.25z + 0.1 1
% = --------------------- + ----
% z^2 + 0.2z + 0.4 z
%
% Combining H1(z) and H2(z) with the common denominator:
%
% z(z^2 + 0.25z + 0.1) + 1(z^2 + 0.2z + 0.4)
% = --------------------------------------------
% (z^2 + 0.2z + 0.4)z
%
% z^3 + 0.25z^2 + 0.1z + z^2 + 0.2z + 0.4
% = --------------------------------------------
% (z^2 + 0.2z + 0.4)z
%
% z^3 + 1.25z^2 + 0.3z + 0.4
% = ----------------------------------
% z^3 + 0.2z^2 + 0.4z
%
% z^-3
% Multipying H(z)* ------
% z^-3
%
% 1 + 1.25z-1 + 0.3z^-2 + 0.4z^-3
% = ----------------------------------
% 1 + 0.2z^-1 + 0.4z^-2
denH_z =
num/den =
Becomes
Where
Terms used for describing H(z)
Degree:
The highest power in a polynomial
Proper Rational Function:
The degree of the numerator is less than or equal to the degree of the denominator
Strictly Proper Rational Function:
The degree of the numerator is less than the degree of the denominator
Improper Rational Function
The degree of the numerator is greater than the degree of its denominator
Example 6.17
Express the following transfer function in standard form:
http://www.etcs.ipfw.edu/~lin/ECET357/2007Spring/Lectures/6_z-Transfomrs_S07_2_of_3.html 9/18
5/1/2018 Z Transform 2 of 3
Example 6.18
Answer:
Using Long division:
Thus,
MATLAB Example
%ex_6_18_transfer.m
% Reference: Example 6.18
% Fundamentals of Digital Signal Processing, 2002,
% by Joyce Van de Vegte, from Prentice Hall, ISBN 0-13-016077-6
%
% Convert the proper transfer function
% Transfer Functions
% H(z) = (z^2 + 0.1z + 0.3)/(z^2 - 0.5z + 0.9)
numH_z = [1 0.1 0.3];
denH_z = [1 -0.5 0.9];
printsys(numH_z, denH_z, 'z')
num/den =
Example 6.19
Example 6.20
Find the inverse-z transform of the function
Example 6.21
A system’s transfer function is
Answer:
a.
http://www.etcs.ipfw.edu/~lin/ECET357/2007Spring/Lectures/6_z-Transfomrs_S07_2_of_3.html 11/18
5/1/2018 Z Transform 2 of 3
b. The impulse response for this system is the inverse z-transform of its transfer function H(z):
Example 6.22
The input to a digital filter is x[n] = u[n]. The output form the filter is
Answer:
a. From Table 6.1,
Compute H(z)
http://www.etcs.ipfw.edu/~lin/ECET357/2007Spring/Lectures/6_z-Transfomrs_S07_2_of_3.html 12/18
5/1/2018 Z Transform 2 of 3
Z(δ[n]) ↔ 1
So
Example 6.23
Find the time domain signal x[n] that corresponds to the z-transform
So
So H(z) =
http://www.etcs.ipfw.edu/~lin/ECET357/2007Spring/Lectures/6_z-Transfomrs_S07_2_of_3.html 13/18
5/1/2018 Z Transform 2 of 3
Example 6.25
Using long division, find the time domain signal x[n] that corresponds to the z transform of Example 6.23, that
is
Answer:
So we have
And
We can identify the pattern that defines x[n], so a close form can be found
http://www.etcs.ipfw.edu/~lin/ECET357/2007Spring/Lectures/6_z-Transfomrs_S07_2_of_3.html 14/18
5/1/2018 Z Transform 2 of 3
Z{z[n-1]} = X(z) =
· h[n] = (-0.25)n u[n] – Impulse response of the system
Z{h[n]} =
· Y(z) = H(z)X(z) =
Find A and B:
MATLAB Solution:
>> help residuez
RESIDUEZ Z-transform partial-fraction expansion.
[R,P,K] = RESIDUEZ(B,A) finds the residues, poles and direct terms
of the partial-fraction expansion of B(z)/A(z),
http://www.etcs.ipfw.edu/~lin/ECET357/2007Spring/Lectures/6_z-Transfomrs_S07_2_of_3.html 15/18
5/1/2018 Z Transform 2 of 3
%ex_page_190.m
% Reference: Page 190-191
% Fundamentals of Digital Signal Processing, 2002,
% by Joyce Van de Vegte, from Prentice Hall, ISBN 0-13-016077-6
%
% X(z) = 1/(z-1)
% H(z) = z/(z + 0.25)
% Y(z) = H(z)X(z) = z/(z + 0.25)(z-1)
numH_z = [0 1 0];
denH_z = conv([1 0.25], [1 -1]);
printsys(numH_z, denH_z, 'z')
% z
% Y(z) = ------------------
% z^2 – 0.75z -0.25
% z^-2(z)
% = -----------------------
% z^-2(z^2 – 0.75z -0.25)
%
% z^-1
% = -----------------------
% 1 – 0.75z^-1 -0.25z^-2
B = [0 1];
A = [1 -0.75 -0.25]
[r, p, k] = residuez(B, A)
% r – residues
% p - poles
num/den =
z
-------------------
z^2 - 0.75 z - 0.25
r=
0.8000
0.2000
p=
1.0000
http://www.etcs.ipfw.edu/~lin/ECET357/2007Spring/Lectures/6_z-Transfomrs_S07_2_of_3.html 16/18
5/1/2018 Z Transform 2 of 3
-0.2500
This corresponds to
%ex_matlab.m
% Reference: Page 1-35
% MATLAB Signal Processing Toolbox - User's Guide
%
% H(z) = -4+8z^-1/(1 + 6z^-1 + 8z^-2)
numH_z = [-4 8];
denH_z = [1 6 8];
[r, p, k] = residuez(numH_z, denH_z)
% r – residues
% p - poles
r=
-12
8
p=
-4
-2
http://www.etcs.ipfw.edu/~lin/ECET357/2007Spring/Lectures/6_z-Transfomrs_S07_2_of_3.html 17/18
5/1/2018 Z Transform 2 of 3
Find
Hence
http://www.etcs.ipfw.edu/~lin/ECET357/2007Spring/Lectures/6_z-Transfomrs_S07_2_of_3.html 18/18