You are on page 1of 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:

H m [z ] = Am [z ] m = 0,1,2,......., ( M − 1)
here Am [z ] is the polynomial :

m
Am [z ] = 1 + ∑ α m (k )z − k m ≥1
k =1

and A0 [z ]= 1

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
xˆ[n] = −∑ α m [k ]x[n − k ]
k =1

where, {- α m [k ] } represent the prediction coefficients.

The output sequence y[n] may be expressed as:

m
y[n] = x[n]- x̂[n] = x[n]+ ∑ α [k ]x[n − k ]
k =1
m (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 x̂[n] .

Two direct form realization of the FIR prediction filter are shown below:
x[n]
z-1 z-1 z-1 z-1

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


1 αm(1)

y[n]

Fig .1

y[n]

x[n]
z-1 z-1 z-1 z-1

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

Fig.2

Suppose that we have a filter for which m = 1. Then the output of this filter is:

y[n ] = x[n] + α1 [1]x[n − 1] (2)

This output can also be obtained from the first order or single-stage lattice filter shown below:

f0[n]

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

k1
g1[n]
z-1
g0[n] g0[n-1]

Single stage lattice filter.


f 0 [n] = g 0 [n] = x[n]

f1[n] = f 0 [n] + k1 g 0 [n − 1] = x[n] + k1 x[n − 1]

g1 [n] = k1 f 0 [n] + g 0 [n − 1] = k1 x[n] + x[n − 1]

If we select k1 = α1 [1] the f1 [n] 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:

2
y[n] = x[n] + α 2 [1]x[n − 1] + α 2 [2]x[n − 2] = x[n] + ∑ α m [k ]x[n − k ]
k =1

y[n] = x[n] + α 2 [1]x[n − 1] + α 2 [2]x[n − 2] (3)

f0[n]
f1[n] f2[n]=y[n]
x[n] k1 k2

g0[n] k1 k2
g1[n] g2[n
z z ]

Two stage Lattice Filter


Output from the first stage is:

f1 [n] = x[n] + k1 x[n − 1]

g1 [n] = k1 x[n] + x[n − 1]

the output from the second stage is:

f 2 [n ] = f1[n ] + k2 g1[n − 1]

g 2 [n ] = f1 [n ]k2 + g1[n − 1]
or equivalently using the results of stage-1

f 2 [n] = x[n] + k1 x[n − 1] + k 2 [k1 x[n − 1] + x[n − 2]]


(4)
= x[n] + k1 (1 + k2 )x[n − 1] + k2 x[n − 2]
Note here that equation (4) is identical to equation (3) if we equate:

α 2 [2] = k2 , α 2 [1] = k1 (1 + k2 )

Or equivalently :
k 2 = α 2 [2]

α 2 [1]
k1 =
1 + α 2 [2]

hence the reflection coefficients k1 and k2 of the lattice filter can be obtained from the
coefficients { α m [k ] } 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.

f 0 [n ] = g 0 [n] = x[n ]

f m [n] = f m −1 [n] + k m g m −1 [n − 1] m = 1,2,....., M − 1

g m [n] = k m f m −1 [n ] + g m −1 [n − 1] m = 1,2,....., M − 1

The output of the (M-1)th stage corresponds to output of an (M-1) order FIR filter.

i.e. y[n]= f M −1[n]

As a consequence of the equivalence between an FIR filter and a lattice filter the output f m [n]
of an m-stage lattice filter can be written as:

m
f m [n] = ∑ α m [k ]x[n − k ] where, α m [0] = 1
k =0
(5)

Since eq.(5) is a convolution sum it follows that the Z-transform is a simple multiplication.

Fm [z ] = Am [z ]X [z ]
or equivalently
Fm [z ] Fm [z ]
Am [z ] = =
X [z ] Fo [z ]
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 g m [n] from an m-stage lattice filter may be expressed by the convolution sum of the
form:

m
g m [n] = ∑ β m [k ]x[n − k ] where, β m [0] = 1 (6)
k =0

where the filter coefficients {βm(k)} are associated with a filter that produces f m [n] = y[n]
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:
m −1
xˆ[n − m] = −∑ β m [k ]x[n − k ] (7)
k =0

where the coefficients βm(k) in the prediction filter are simply the coefficients { α m [k ] } taken
in reverse order.

β m [k ] = α m [m − k ] k = 0,1,....., m

Now if we consider the same in Z-domain , the transform of eq. (6) becomes:

Gm [z ] = Bm [z ]X [z ]

Gm [z ]
∴ Bm [z ] =
X [z ]

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

m
Bm [z ] = ∑ β m [k ]z −k
k =0

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

m
Bm [z ] = ∑ α m [m − k ]z − k
k =0
m
= ∑ α m [l ]z l − m
l =0
m
= z − m ∑ α m [l ]z l
l =0

= z Am z −1
−m
[ ]
This implies that zeros of the FIR filter with system function Bm [z ] are simply the reciprocal
of the zeros of Am [z ] . Hence Bm [z ] is called the reciprocal polynomial of Am [z ] .

Now that this relationship is shown lets get back to recursive lattice equations and transfer
them to z-domain.

Fo [z ] = Go [z ] = X [z ]
Fm [z ] = Fm −1[z ] + K m z −1Gm −1 [z ] m = 1,2,....., m − 1
Gm [z ] = K m Fm −1 [z ] + z Gm −1 [z ]
−1
m = 1,2,....., m − 1

If we divide each equation by X[z]

Ao [z ] = Bo [z ] = 1
Am [z ] = Am −1 [z ] + K m z −1Bm −1 [z ] m = 1,2,....., m − 1
Bm [z ] = K m Am −1 [z ] + z Bm −1 [z ]
−1
m = 1,2,....., m − 1

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

 Am [z ]  1 K m   Am −1 [z ] 
 B [z ] =  K 1   z −1Bm −1 [z ]
 m   m

The lattice coefficients {Ki} can be converted to direct form coefficients{ α m [k ] } as shown
below:
Ao [z ] = Bo [z ] = 1
Am [z ] = Am −1 [z ] + K m z −1Bm −1 [z ] m = 1,2,....., m − 1
Bm [z ] = z Am z
−m
[ ]−1
m = 1,2,....., m − 1

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 :

A1 [z ] = A0 [z ] + K1 z −1B0 [z ]
1 −1
= 1 + K1 z −1 = 1 + z
4
Hence the coefficients of an FIR filter corresponding to the single-stage lattice are:
1
α1 (0) = 1,α1 (1) = K1 = . Since Bm[z] is the reverse polynomial of Am[z] we have :
4
1
B1 [z ]= + z −1
4

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

A2 [z ] = A2 [z ] + K 2 z −1B1 [z ]
3 1
= 1 + z −1 + z − 2
8 2

Hence the FIR filter parameters corresponding to the two-stage lattice are
3 1
α 2 (0 ) = 1,α 2 (1) = ,α 2 (2 ) = . Also
8 2

1 3 −1
B2 [z ]= + z + z −2
2 8

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

A3 [z ] = A2 [z ] + K 3 z −1B2 [z ]
13 −1 5 − 2 1 − 3
=1+ z + z + z
24 8 3

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

13 5 1
α 3 (0) = 1, α 3 (1) = , α 3 (2 ) = , α 3 (3) =
24 8 3

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)
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

>>

You might also like