Digital Signal Processing Reference
In-Depth Information
So we enter the samples of the input in the row vector x , besides the vectors for
the coefficients of num and den of H(z 1 ) . When the vector x is simply 1, the
output vector y is obviously the unit sample response h(n) . This function even
allows us to find the output when initial states are given, if we use
[y, F]=filter(num, den, x, I 0 )
where I 0 is the vector listing the initial conditions and F is the final value. It is
important to know that although the transfer function H(z 1 ) is the z transform of
the zero state response, the function filter implements the recursive algorithm
based on the transfer function and can find the total response when initial states
are also given. So this function is a more useful function in signal processing
applications.
Example 2.23
Let us consider the z transform of the zero input function found in (2.73):
0 . 1 z 1
0 . 85
+
Y 0 i (z 1 )
=
(2.77)
[1 0 . 4 z 1
0 . 05 z 2 ]
To find the partial fraction expansion, we use the following MATLAB script:
num=[0.85 0.1];
den=[1 -0.4 -0.05] ;
[r,p,k]=residuez(num,den)
and we get
r
=
0 . 8750
0 . 0250
p
=
0 . 5000
0 . 1000
k
= []
So the partial fraction expansion of Y 0 i (z 1 )
= 0 . 8750 z/(z
0 . 5 )
0 . 025 z/
= [0 . 8750 ( 0 . 5 ) n
(z
+ 0 . 1 ) . Therefore the zero input response y 0 i (n)
0 . 025
0 . 1 ) n ] u(n) .
(
Example 2.24
To find the 20 samples of the zero input response y 0 i (n) directly from (2.77), we
use the function impz in the following script:
Search WWH ::




Custom Search