Reflection Coefficients for Lattice Realization

8
Lattice Realization Here we will study an other FIR filter structure called the LATTICE FILTER or lattice realization. Lattice filters are extensively used in speech processing and in the implementation of adaptive filters. Let us consider a sequence of FIR filters with system functions: [] [] ) 1 ( ,......., 2 , 1 , 0 = = M m z A z H m m here [] z A m is the polynomial : [] () [] 1 1 1 0 1 = + = = z A and m z k z A m k k m m α The unit impulse response of the m th filter is h m (0) =1 and h m (k) = α m (k) for k = 1,2,....,m. Here subscript m also denotes the degree of the polynomial. It is desirable to view FIR filters as linear predictors since the input sequence x[n-1], x[n-2], .......,x[n-m] can be used to predict the value of the signal x[n]. The linearly predicted value of x[n] equals: [] [][ ] = = m k m k n x k n x 1 ˆ α where, {- [] k m α } represent the prediction coefficients. The output sequence y[n] may be expressed as: y[n] = x[n]- [] n x ˆ = x[n]+ [][ ] = m k m k n x k 1 α (1) Hence the FIR filter output given by equation (1) may be interpreted as the error between the true signal value x[n] and the predicted value [ ] n x ˆ . Two direct form realization of the FIR prediction filter are shown below:

description

mtech r13 sem 1 decs

Transcript of Reflection Coefficients for Lattice Realization

Page 1: Reflection Coefficients for Lattice Realization

Lattice Realization Here we will study an other FIR filter structure called the LATTICE FILTER or lattice realization. Lattice filters are extensively used in speech processing and in the implementation of adaptive filters. Let us consider a sequence of FIR filters with system functions: [ ] [ ] )1(,.......,2,1,0 −== MmzAzH mm here [ ]zAm is the polynomial :

[ ] ( )

[ ] 1

11

0

1

=

≥+= ∑=

zAand

mzkzAm

k

kmm α

The unit impulse response of the mth filter is hm(0) =1 and hm(k) = αm(k) for k = 1,2,....,m. Here subscript m also denotes the degree of the polynomial. It is desirable to view FIR filters as linear predictors since the input sequence x[n-1], x[n-2], .......,x[n-m] can be used to predict the value of the signal x[n]. The linearly predicted value of x[n] equals:

[ ] [ ] [ ]∑=

−−=m

km knxknx

1

ˆ α

where, {- [ ]kmα } represent the prediction coefficients. The output sequence y[n] may be expressed as:

y[n] = x[n]- [ ]nx̂ = x[n]+ [ ] [ ]∑=

−m

km knxk

1α (1)

Hence the FIR filter output given by equation (1) may be interpreted as the error between the true signal value x[n] and the predicted value [ ]nx̂ . Two direct form realization of the FIR prediction filter are shown below:

Page 2: Reflection Coefficients for Lattice Realization

Fig .1

Fig.2

Suppose that we have a filter for which m = 1. Then the output of this filter is: [ ] [ ] [ ] [ ]111 −+= nxnxny α (2) This output can also be obtained from the first order or single-stage lattice filter shown below:

Single stage lattice filter.

x[n]

y[n]

z-1 z-1z-1z-1

-αm(1) -αm(2) -αm(3) -αm(m)

f0[n]

g0[n] g0[n-1]

x[n]

y[n]

z-1 z-1z-1z-1

1 αm(1) αm(2) αm(3) αm(m-1) αm(m)

z-1

x[n] f1[n]=y[n]

g1[n]

k1

k1

Page 3: Reflection Coefficients for Lattice Realization

[ ] [ ] [ ]

[ ] [ ] [ ] [ ] [ ]

[ ] [ ] [ ] [ ] [ ]11

11

10011

10101

00

−+=−+=

−+=−+=

==

nxnxkngnfkng

nxknxngknfnf

nxngnf

If we select k1 = [ ]11α the [ ]nf1 will be equal to equation (2) Parameter k1 in the lattice filter is called the “reflection coefficient”. Now consider an FIR filter for which m=2. In this case the output from a direct-form structure is:

y[n] = x[n] + [ ] [ ] [ ] [ ] [ ] [ ] [ ]∑=

−+=−+−2

122 2211

km knxknxnxnx ααα

y[n] = x[n] + [ ] [ ] [ ] [ ]2211 22 −+− nxnx αα (3)

Two stage Lattice Filter Output from the first stage is:

[ ] [ ] [ ]

[ ] [ ] [ ]1

1

11

11

−+=

−+=

nxnxkng

nxknxnf

the output from the second stage is:

[ ] [ ] [ ]

[ ] [ ] [ ]1

1

1212

1212

−+=

−+=

ngknfng

ngknfnf

or equivalently using the results of stage-1

[ ] [ ] [ ] [ ] [ ][ ]

[ ] ( ) [ ] [ ]211211

221

1212

−+−++=−+−+−+=

nxknxkknxnxnxkknxknxnf

(4)

z

x[n] f1[n]

g1[n]

k1

k1

z

f2[n]=y[n]

g2[n]

k2

k2g0[n]

f0[n]

Page 4: Reflection Coefficients for Lattice Realization

Note here that equation (4) is identical to equation (3) if we equate:

[ ] [ ] ( )21222 11,2 kkk +== αα Or equivalently :

[ ]

[ ][ ]21

1

2

2

21

22

αα

α

+=

=

k

k

hence the reflection coefficients k1 and k2 of the lattice filter can be obtained from the coefficients { [ ]kmα } of the direct form realization. By continuing this process one can easily demonstrate by induction the equivalence between an mth oder direct-form FIR filter and an m-stage lattice filter. The lattice filter is generally described by the following set of order-recursive equations.

[ ] [ ] [ ]

[ ] [ ] [ ]

[ ] [ ] [ ] 1,.....,2,11

1,.....,2,11

11

11

00

−=−+=

−=−+=

==

−−

−−

Mmngnfkng

Mmngknfnf

nxngnf

mmmm

mmmm

The output of the (M-1)th stage corresponds to output of an (M-1) order FIR filter. i.e. y[n]= [ ]nfM 1− As a consequence of the equivalence between an FIR filter and a lattice filter the output [ ]nfm of an m-stage lattice filter can be written as:

[ ] [ ] [ ] [ ] 10,0

=−=∑=

m

m

kmm whereknxknf αα

(5) Since eq.(5) is a convolution sum it follows that the Z-transform is a simple multiplication. [ ] [ ] [ ]zXzAzF mm = or equivalently

[ ] [ ][ ]

[ ][ ]zFzF

zXzFzA

o

mmm ==

Page 5: Reflection Coefficients for Lattice Realization

The second output gm[n] of the lattice can also be expressed as a convolution sum by using an other set of coefficients {βm(k)}. The output [ ]ngm from an m-stage lattice filter may be expressed by the convolution sum of the form:

[ ] [ ] [ ] [ ] 10,0

=−=∑=

m

m

kmm whereknxkng ββ (6)

where the filter coefficients {βm(k)} are associated with a filter that produces [ ] [ ]nynfm = but operates in reverse order. Supposing x[n], x[n-1], …….., x[n-m+1] is used to linearly predict the signal value x[n-m]. The predicted value equals:

[ ] [ ] [ ]∑−

=

−−=−1

0

ˆm

km knxkmnx β (7)

where the coefficients βm(k) in the prediction filter are simply the coefficients { [ ]kmα } taken in reverse order. [ ] [ ] mkkmk mm ,.....,1,0=−=αβ Now if we consider the same in Z-domain , the transform of eq. (6) becomes:

[ ] [ ] [ ]

[ ] [ ][ ]zXzGzB

zXzBzG

mm

mm

=∴

=

here [ ]zBm represents the system function of the FIR filter with coefficients βm(k).

[ ] [ ]∑=

−=m

k

kmm zkzB

Since βm(k) =αm(m-k)

[ ] [ ]

[ ]

[ ]

[ ]10

0

0

−−

=

=

=

=

=

=

−=

zAz

zlz

zl

zkmzB

mm

lm

lm

m

mlm

lm

m

k

kmm

α

α

α

Page 6: Reflection Coefficients for Lattice Realization

This implies that zeros of the FIR filter with system function [ ]zBm are simply the reciprocal of the zeros of [ ]zAm . Hence [ ]zBm is called the reciprocal polynomial of [ ]zAm . Now that this relationship is shown lets get back to recursive lattice equations and transfer them to z-domain.

[ ] [ ] [ ][ ] [ ] [ ][ ] [ ] [ ] 1,.....,2,1

1,.....,2,1

11

1

11

1

−=+=

−=+=

==

−−

−−

mmzGzzFKzGmmzGzKzFzF

zXzGzF

mmmm

mmmm

oo

If we divide each equation by X[z]

[ ] [ ][ ] [ ] [ ][ ] [ ] [ ] 1,.....,2,1

1,.....,2,1

1

11

1

11

1

−=+=

−=+=

==

−−

−−

mmzBzzAKzBmmzBzKzAzA

zBzA

mmmm

mmmm

oo

Hence the lattice stage is described in the z-domain by the matrix equation:

[ ][ ]

[ ][ ]

=

−−

zBzzA

KK

zBzA

m

m

m

m

m

m

11

1

11

The lattice coefficients {Ki} can be converted to direct form coefficients{ [ ]kmα } as shown below:

[ ] [ ][ ] [ ] [ ][ ] [ ] 1,.....,2,1

1,.....,2,1

1

11

11

−==

−=+=

==

−−

−−

mmzAzzBmmzBzKzAzA

zBzA

mm

m

mmmm

oo

Solution is obtained recursively beginning with m = 1. Thus we obtain a sequence of (M-1) FIR filters one for each value of m. Example: Given a three-stage lattice filter with coefficients K1=1/4 , K2=1/2, K3=1/3, determine the FIR filter coefficients for the direct form structure. We can solve this problem recursively. Let us begin with m=1. Thus we have :

[ ] [ ] [ ]

111

01

101

4111 −−

+=+=

+=

zzK

zBzKzAzA

Page 7: Reflection Coefficients for Lattice Realization

Hence the coefficients of an FIR filter corresponding to the single-stage lattice are:

( ) ( )411,10 111 === Kαα . Since Bm[z] is the reverse polynomial of Am[z] we have :

[ ] 11 4

1 −+= zzB

Next we add the second stage to the lattice. For m=2

[ ] [ ] [ ]21

11

222

21

831 −−

++=

+=

zz

zBzKzAzA

Hence the FIR filter parameters corresponding to the two-stage lattice are

( ) ( ) ( )212,

831,10 222 === ααα . Also

[ ] 212 8

321 −− ++= zzzB

Finally the addition of the third stage to the lattice results in the polynomial

[ ] [ ] [ ]

321

21

323

31

85

24131 −−−

+++=

+=

zzz

zBzKzAzA

Consequently, the desired direct-form FIR filter is characterized by the coefficients

( ) ( ) ( ) ( )313,

852,

24131,10 3333 ==== αααα

MATLAB for calculating reflection coefficients M-functions: poly2rc rc2poly >> k=[1/4 1/2 1/3 ] k = 0.2500 0.5000 0.3333 >> rc2poly(k)

Page 8: Reflection Coefficients for Lattice Realization

ans = 1.0000 0.5417 0.6250 0.3333 >> OR >> a=[1 13/24 5/8 1/3] a = 1.0000 0.5417 0.6250 0.3333 >> poly2rc(a) ans = 0.2500 0.5000 0.3333 >>