Lattice-Structure for
FIR filters
Spring 2009
© Ammar Abu-Hudrouss - ١
Islamic University Gaza
Lattice Structures
Lattice filter is used in extensively in digital speech
processing and in implementing adaptive filters
H m ( ) Am ( z ) m 0,1,2,......, M 1
Where by definition
m
Am ( z ) 1 m ( k ) z k m 1
k 1
Which leads to
1 n0
h ( n)
m ( n ) n 1,2,...., m
Digital Signal Processing
Slide ٢
١
Lattice Structures
So the output can be expressed as
m
y ( n ) x ( n ) m ( k ) x( n k )
k 1
This can be expressed by the direct form as
x(n) z -1 z -1 z -1 z -1
1 αm(1) αm(2) αm(3) αm(m -1) αm(m )
+ + + + + y(n)
Digital Signal Processing
Slide ٣
Lattice Structures
The lattice filter is generally described by the
following set of 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 m1 (n) g m 1 (n 1) m 1,2,......, M 1
The output of the (M-1) stage filter
y (n) f M 1 (n)
Digital Signal Processing
Slide ٤
٢
Lattice Structures
f 0(n) f 1(n) f 2(n) f M-2(n) y(n)=f M-1(n)
First Second Second
Stage Stage Stage
gM-1(n)
g0(n) g1(n) g2(n) gM-2(n)
+ fm(n)
fm-1(n)
Km
Km
z -1 + gm(n)
gm-1(n)
Digital Signal Processing
Slide ٥
Lattice Structures
Suppose we have a filter of order one (m = 1). The
output of this filter can be expressed as
y ()n ) x ( n ) 1 (1) x ( n 1)
f0(n
+ f1(n) =y(n)
K1
x(n)
K1
z -1 + g1(n)
g0(n)
f1 (n) x (n) K1 x (n 1) K 1 1 (1)
g1 (n) K1 x(n) x(n 1)
Digital Signal Processing
Slide ٦
٣
Lattice Structures
Suppose we have a filter of order one m = 2. The
output of this filter can be expressed as
y ( n ) x ( n ) 2 (1) x ( n 1) 2 ( 2 ) x ( n 2 )
+ + f2(n) =y(n)
f0(n) f1(n)
K1 K2
x(n)
K1 K2
z -1 + z -1 + g2(n)
g0(n) g1(n)
Digital Signal Processing
Slide ٧
Lattice Structures
The output from the lattice implementation is
f 2 ( n ) f1 ( n ) k 2 g 1 ( n 1)
Substituting for g1(n - 1) and f1(n)
f 2 (n) x (n) K1 x(n 1) K 2 K1 x (n 1) K 2 x (n 2)
f 2 (n) x(n) ( K1 K 2 K1 ) x(n 1) K 2 x(n 2)
Comparing that with
y ( n) x( n) 2 (1) x( n 1) 2 ( 2) x( n 2)
2 (1) K1 (1 K 2 ) 2 (2) K 2
2 (1)
K1 K1 2 (2)
1 2 ( 2)
Digital Signal Processing
Slide ٨
٤
Lattice Structures
The output from the lattice implementation is
g 2 ( n ) K 2 f1 ( n ) g 1 ( n 1)
Substituting for g1(n - 1) and f1(n)
g 2 (n) K 2 x(n) K 2 K1 x (n 1) K1 x(n 1) x (n 2)
g 2 (n) K 2 x(n) K1 (1 K 2 ) x (n 1) x(n 2)
g 2 (n) 2 (2) x(n) 2 (1) x (n 1) x (n 2)
m
g m (n) m (k ) x (n k )
k 0
m ( k ) m (m k ) k 0,1,......, m
Digital Signal Processing
Slide ٩
Lattice Structures
m
g m (n) m (k ) x (n k ) m (n) * x (n)
k 0
m
f m ( n) m ( k ) x( n k ) m ( k ) * x ( k )
k 0
Convert to z-transform
Gm ( z ) Am ( z ) X ( z ) Fm ( z ) Bm ( z ) X ( z )
Then if we convert the recursive lattice equation to z domain
F0 ( z ) G0 ( z ) X ( z )
Fm ( z ) Fm1 ( z ) K m z 1Gm 1 ( z )
Gm ( z ) K m Fm 1 ( z ) z 1Gm 1 ( z )
Digital Signal Processing
Slide ١٠
٥
Lattice Structures
Divide the previous equation by X (z)
A0 ( z ) B0 ( z ) 1
Am ( z ) Am 1 ( z ) K m z 1 Bm 1 ( z ) m 1,2,3,....., M 1
Bm ( z ) K m Am1 ( z ) z 1 m 1 ( z ) m 1,2,3,....., M 1
Divide the previous equation by X(z)
Am ( z ) 1 K m Am 1 ( z )
B ( z ) K
1 z 1Bm 1 ( z )
m m
Digital Signal Processing
Slide ١١
Lattice to Direct Form
To get the direct form coefficients from the lattice constants
we have
A0 ( z ) B0 ( z ) 1
Am ( z ) Am 1 ( z ) K m z 1Bm1 ( z )
m m
Bm ( z ) m ( k ) z k m (l ) z l m
k 0 l 0
m m
Bm ( z ) m (l ) z l m z m m (l ) z l
l 0 l 0
m 1
Bm ( z ) z Am ( z )
Solve the previous equation recursively to get Am(z)
Digital Signal Processing
Slide ١٢
٦
Lattice to Direct Form
Example: Given a three stage lattice filter with coefficients K1 =
0.25, K2 = 0.5 and K3 = 1/3, determine the FIR filter coefficients
for the direct-form structure.
A1 ( z ) A0 ( z ) K 1 z 1 B0 ( z )
1 (1 / 4) z 1
By reversing the order of A1(z), we get
B1 ( z ) 1 / 4 z 1
2nd stage
A2 ( z ) A1 ( z ) K 2 z 1 B1 ( z )
1 (3 / 8) z 1 (1 / 2) z 2
B2 ( z ) (1 / 2) (3 / 8) z 1 z 2
Digital Signal Processing
Slide ١٣
Lattice to Direct Form
The third stage
A3 ( z ) A2 ( z ) K 3 z 1 B2 ( z )
1 (13 / 24) z 1 5 / 8z 2 (1 / 3) z 2
By performing the inverse z transform
3 ( 0) 1
3 (1) 13 / 24
3 ( 2) 5 / 8
3 (3) 1 / 3
Digital Signal Processing
Slide ١٤
٧
Direct Form to Lattice
To get the lattice constants from the direct form coefficients
Am ( z ) Am 1 ( z ) K m z 1 Bm 1 ( z )
Am ( z ) Am 1 ( z ) K m Bm ( z ) K m Am1 ( z )
Solve the previous equation to get Am-1(z)
Am ( z ) K m Bm ( z )
Am 1 ( z ) m M 1, M 2,....,1
1 K m2
This is a step-down recursion
Digital Signal Processing
Slide ١٥
Direct Form to Lattice
Example Determine the lattice coefficients corresponding
Example:
to the FIR filter
H ( z ) A3 ( z ) 1 (13 / 24) z 1 (5 / 8) z 2 (1 / 3) z 3
K3 1 / 3
B3 ( z ) (1 / 3) (5 / 8) z 1 (13 / 24) z 2 z 3
The step down relationship with m = 3
A3 ( z ) K 3 B3 ( z )
A2 ( z )
1 K 32
A2 ( z ) 1 (3 / 8) z 1 (1 / 2) z 2
K2 1/ 2
Digital Signal Processing
Slide ١٦
٨
Direct Form to Lattice
B2 ( z ) (1 / 2) (3 / 8) z 1 z 2
The step down relationship with m = 2
A2 ( z ) K 2 B2 ( z )
A1 ( z )
1 K 22
A1 ( z ) 1 (1 / 4) z 1
K1 1 / 4
Digital Signal Processing
Slide ١٧