Digital Signal Processing Reference
In-Depth Information
Fig. 13.11. Location of poles and
zeros obtained in Example 13.21
using M
ATLAB
4
3
2
1
0
−1
−2
−3
−4
−6
−4
−2
0
real part
2
4
13.11.3 Computing the z-transfer function from poles and zeros
M
ATLAB
provides the built-in function
zp2tf
to calculate the z-transfer
function from poles and zeros. In terms of Eq. (13.49), the syntax for
zp2tf
is given by
>> [B,A] = zp2tf(Z,P,K);
% Calculate poles and zeros
where vector
Z
contains the location of the zeros, vector
P
contains the location
of the poles, and
K
is a scalar providing the gain of the numerator. The numerator
coefficients are returned in
B
and the denominator coefficients in
A
.
Example 13.22
Consider the poles and zeros calculated in Example 13.21. Using the values of
the poles and, zeros and the gain factor, determine the transfer function
H
(
z
).
Solution
The M
ATLAB
code to determine the coefficients of the transfer function is
listed below. The explanation follows each instruction in the form of comments.
>> Z = [0; -5.666667]; % Zeros in a column vector
>> P = [3+4 * j; 3-4 * j; 1]; % Poles in a column vector
>>K=6;
%Gain of the numerator
>> [B,A] = zp2tf(Z,P,K);
% Calculate poles and zeros
The returned values are given by
B=[06340]andA=[1-731-25],
which implies that the transfer function is given by
6
z
2
+
34
z
z
3
−
7
z
2
+
31
z
−
25
.
H
(
z
)
=
Search WWH ::
Custom Search