02.10.2019 Views

UploadFile_6417

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

242 Chapter 6 IMPLEMENTATION OF DISCRETE-TIME FILTERS<br />

The equations (6.20) can also be used to determine the direct, form<br />

coefficients {b m } from the lattice filter coefficients {K m } using a recursive<br />

procedure [22]:<br />

A 0 (z) =J 0 (z) =1<br />

A m (z) =A m−1 (z)+K m z −1 J m−1 (z) , m =1, 2,...,M − 1<br />

J m (z) =z −m A m<br />

(<br />

z<br />

−1 ) , m =1, 2,...,M − 1<br />

(6.21)<br />

b m = K 0 α M−1 (m), m =0, 1,...,M − 1<br />

The following MATLAB function latc2dir implements (6.21). Note<br />

that the product K m z −1 J m−1 (z) isobtained by convolving the 2 corresponding<br />

arrays, whereas the polynomial J m (z) isobtained by using a<br />

fliplr operation on the A m (z) polynomial.<br />

function [b] = latc2dir(K)<br />

% All-Zero Lattice form to FIR Direct form Conversion<br />

% ---------------------------------------------------<br />

% [b] = latc2dir(K)<br />

% b = FIR direct form coefficients (impulse response)<br />

% K = Lattice filter coefficients (reflection coefficients)<br />

%<br />

M = length(K); J = 1; A = 1;<br />

for m=2:1:M<br />

A = [A,0]+conv([0,K(m)],J); J = fliplr(A);<br />

end<br />

b=A*K(1);<br />

□ EXAMPLE 6.8 An FIR filter is given by the difference equation<br />

y(n) =2x(n)+ 13<br />

12 x(n − 1) + 5 4 x(n − 2) + 2 x(n − 3)<br />

3<br />

Determine its lattice form.<br />

Solution<br />

MATLAB script:<br />

>> b=[2, 13/12, 5/4, 2/3]; K=dir2latc(b)<br />

K =<br />

2.0000 0.2500 0.5000 0.3333<br />

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).<br />

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!