Digital Signal Processing Systems, Basic Filtering Types, and Digital Filter Realizations
Digital Signal Processing Systems, Basic Filtering Types, and Digital Filter Realizations
• B and A are vectors for the coefficients bj and aj , whose formats are
• x and y are the input data vector and the output data vector, respectively.
• Note that the filter function filtic( ) is a MATLAB function used to obtain
initial states required by the MATLAB filter function filter( ) (requirement by
a direct-form II realization) from initial conditions in the difference equation.
• Zi contains initial states required for operating MATLAB function filter( ), that
is,
Zi = [w(-1) w(-2) . . .],
which can be recovered by the MATLAB function, filtic( ). Xi and Yi
are initial conditions with a length of the greater of M or N, given by
y = filter(B,A,x)
Example-1
Compute the system output
y (n) = 0.5 y (n − 2) + x(n − 1)
for the first four samples using the following initial conditions:
[h,w] = freqz(B,A,N)
z
a. H ( z) =
z − 0.5
b. H ( z ) = 1 − 0.5 z −1
0.5 z 2 − 0.32
c. H ( z) = 2
z − 0.5 z + 0.25
1 − 0.9 z −1 + 0.81z −2
d. H ( z ) =
1 − 0.6 z −1 + 0.36 z −2