Digital Signal Processing Reference
In-Depth Information
The three methods are
1.
Recursive algorithm
2.
Convolution sum
3.
z
-Transform method
In this section, we illustrate the use of MATLAB functions to implement some of
the algorithms discussed in the previous sections. At this point it is strongly sug-
gested that the students review the MATLAB primer in Chapter 9 to refresh their
understanding of MATLAB, although it is only an introduction to the software.
First let us consider the case of a system described by the linear shift-invariant
difference equation
y(n)
=
0
.
4
y(n
−
1
)
+
0
.
05
y(n
−
2
)
+
x(n)
where the initial states are given as
y(
1
.
0. We learned
how to find the output of this system for any given input, by using the recursive
algorithm. Assuming
x(n)
−
1
)
=
2and
y(
−
2
)
=
δ(n)
and the initial two states in this example to
be zero, we found the unit impulse response
h(n)
. Knowing the unit impulse
response, we can find the response when any input is given, by using the convo-
lution algorithm. It was pointed out that convolution algorithm can be used to find
only the zero state response since it uses
h(n)
, whereas the recursive algorithm
computes the total response due to the given input and the initial states.
Now we use the
z
transform to convert the difference equation above to get
=
Y(z)
[1
−
0
.
4
z
−
1
−
0
.
05
z
−
2
]
=
0
.
4
y(
+
0
.
05[
z
−
1
y(
−
1
)
−
1
)
+
y(
−
2
)
]
+
X(z)
0
.
1
z
−
1
=
[0
.
8
+
+
0
.
05]
+
X(z)
Therefore
0
.
85
+
0
.
1
z
−
1
X(z)
Y(z)
=
0
.
05
z
−
2
]
+
(2.68)
[1
−
0
.
4
z
−
1
−
[1
−
0
.
4
z
−
1
−
0
.
05
z
−
2
]
=
Y
0
i
(z)
+
Y
0
s
(z)
(2.69)
=
Y
0
i
(z)
+
H (z)X(z)
−
0
.
05
z
−
2
] from the given
linear difference equation describing the discrete-time system.
But when we decide to use MATLAB functions, note that if the given input is a
finite-length sequence
x(n)
, we can easily find the coefficients of the polynomial
in the descending powers of
z
as the entries in the row vector that will be
required for defining the polynomial
X(z)
. But if the input
x(n)
is infinite in
length, MATLAB cannot find a closed-form expression for the infinite power
series
X(z)
=
1
/
[1
−
0
.
4
z
−
1
We obtain the transfer function
H(z)
=
n
=
0
x(n)z
−
n
; we have to find the numerator and denominator
coefficients of
X(z)
.
Search WWH ::
Custom Search