Lattice Structure For FIR Filter
Lattice Structure For FIR Filter
Fall 2008
Fall 2008
1 / 19
Outline
Lecture Objectives
Implementation of Discrete-Time Systems Lattice Structures for FIR systems Lattice to DirectForm Translation
Fall 2008
2 / 19
Similar tricks hold for length 2N real sequences Linear ltering computation of the DFT the Goertzel algorithm
k yk (n) = WN yk (n 1) + x(n)
gives X (k ) = yk (n)|n=N Implementations of FIR discretetime systems Direct, Cascade, and Lattice lter structures
K. E. Barner (Univ. of Delaware) ELEG305: Digital Signal Processing Lecture Objectives Fall 2008 3 / 19
Lecture Objectives
Objective Derive lattice structures for FIR lters; Develop a method for converting lattice lter coefcients to directform (FIR) coefcients Reading Chapters 9 (9.2); Next lecture, complete lattice lters, structures for IIR systems (Chapter 9.29.3); start lter design (Chapter 10.110.2)
Fall 2008
4 / 19
Objective: Developed a latticestructure realization of FIR lters Approach: Suppose we have a sequence of FIR lters Hm (z) = Am (z) where by denition
m
m = 0, 1, . . . , M 1
Am (z) = 1 +
k =1
m (k )z k
m1
Suppose m = 1. Then the output of H1 (z), for input x(n), is y (n) = x(n) + 1 (1)x(n 1) f0 (n) = x(n) g0 (n) = x(n) f1 (n) = f0 (n) + K1 g0 (n 1) g1 (n) = K1 f0 (n) + g0 (n 1) Question: For what K1 value is () realized, i.e., f1 (n) = y (n)?
K. E. Barner (Univ. of Delaware) ELEG305: Digital Signal Processing Lattice Structures for FIR systems Fall 2008 5 / 19 Implementation of Discrete-Time Systems
()
To realize (), let K1 = 1 (1). Then f1 (n) = f0 (n) + K1 g0 (n 1) = x(n) + 1 (1)x(n 1) = y (n) Similarly, [order m = 1 lter output] g1 (n) = 1 (1)x(n) + x(n 1) g1 (n) = K1 f0 (n) + g0 (n 1)
Fall 2008 6 / 19
Objective: Add a second stage and equate to the m = 2 lter Note that [m = 2 lter] H2 (z) = A2 (z) = 1 + 2 (1)z 1 + 2 (2)z 2 y (n) = x(n) + 2 (1)x(n 1) + 2 (2)x(n 2) The two stage lattice lter is given by ()
The governing equations are f1 (n) = f0 (n) + K1 g0 (n 1) g1 (n) = K1 f0 (n) + g0 (n 1) f2 (n) = f1 (n) + K2 g1 (n 1) g2 (n) = K2 f1 (n) + g1 (n 1)
Procedure: Set K1 and K2 such that () is realized Note: f0 (n) = g0 (n) = x(n) [pipeline input] and f2 (n) = y (n) [output]
K. E. Barner (Univ. of Delaware) ELEG305: Digital Signal Processing Lattice Structures for FIR systems Fall 2008 7 / 19 Implementation of Discrete-Time Systems
f1 (n) = f0 (n) + K1 g0 (n 1)
f2 (n) = f1 (n) + K2 g1 (n 1)
f2 (n) = f1 (n) + K2 g1 (n 1) = [f0 (n) + K1 g0 (n 1)] + K2 [K1 f0 (n 1) + g0 (n 2)] = [x(n) + K1 x(n 1)] + K2 [K1 x(n 1) + x(n 2)] = x(n) + K1 (1 + K2 )x(n 1) + K2 x(n 2) Recalling () [direct FIR form] y (n) = x(n) + 2 (1)x(n 1) + 2 (2)x(n 2) and equating with () [lattice form] yields 2 (2) = K2 or, equivalently, K2 = 2 (2)
K. E. Barner (Univ. of Delaware)
()
()
and
and
K1 =
Process: This is repeated for M 1 stages, with general recursion f0 (n) = g0 (n) = x(n) fm (n) = fm1 (n) + Km gm1 (n 1), gm (n) = Km fm1 (n) + gm1 (n 1), At the nal stage y (n) = fm1 (n)
m1
m = 1, 2, . . . , M 1 m = 1, 2, . . . , M 1
=
k =0
m1 (k )x(n k )
ELEG305: Digital Signal Processing Lattice Structures for FIR systems Fall 2008 9 / 19
Observation: At each stage there are two outputs, fm (n) and gm (n) Consider g2 (n). First & second stage equations: f1 (n) = f0 (n) + K1 g0 (n 1) g1 (n) = K1 f0 (n) + g0 (n 1) g2 (n) = K2 f1 (n) + g1 (n 1) = K2 [f0 (n) + K1 g0 (n 1)] + [K1 f0 (n 1) + g0 (n 2)] = K2 x(n) + K1 (1 + K2 )x(n 1) + x(n 2) using the prior result K2 = 2 (2) and K1 (1 K2 ) = 2 (1), g2 (n) = 2 (2)x(n) + 2 (1)x(n 1) + x(n 2) Result: The coefcients for gm (n) are reverse order those for fm (n)
K. E. Barner (Univ. of Delaware) ELEG305: Digital Signal Processing Fall 2008 10 / 19
fm (n) =
k =0
m (k )x(n k )
and
gm (n) =
k =0
m (k )x(n k )
where m (k ) = m (m k ), Taking the ztransform Fm (z) = Am (z)X (z) Similarly Gm (z) = Bm (z)X (z)
K. E. Barner (Univ. of Delaware)
k = 0, 1, . . . , m
Note: fm (n) is the forward prediction; gm (n) the backward prediction Fm (z) Fm (z) = X (z) F0 (z) Gm (z) Gm (z) = X (z) G0 (z)
Fall 2008 11 / 19
or
Am (z) =
or
Bm (z) =
Recall Am (z) =
k =0
m (k )z k
Bm (z) =
k =0 m
m (k )z k
[substitute m (k ) = m (m k )] [let l = m k ]
=
k =0 m
m (m k )z k m (l)z lm
l=0 m
= z m
l=0
m (l)z l
= z m Am (z 1 ) Result: B(z) has reciprocal zeros of A(z); B(z) is the reciprocal, or reverse, polynomial of A(z)
K. E. Barner (Univ. of Delaware) ELEG305: Digital Signal Processing Fall 2008 12 / 19
fm (n) =
k =0
m (k )x(n k )
and
gm (n) =
k =0
m (k )x(n k )
Case 2: zdomain representations Fm (z) = Am (z)X (z) Gm (z) = Bm (z)X (z) Also, Bm (z) = z m Am (z 1 ), f0 (n) = g0 (n) = x(n) fm (n) = fm1 (n) + Km gm1 (n 1), gm (n) = Km fm1 (n) + gm1 (n 1),
K. E. Barner (Univ. of Delaware) Implementation of Discrete-Time Systems
or or
m = 1, 2, . . . , M 1
Taking ztransform of the recursion lattice representations F0 (z) = G0 (z) = X (z) Fm (z) = Fm1 (z) + Km z 1 Gm1 (z), Gm (z) = Km Fm1 (z) + z 1 Gm1 (z), Dividing by X (z) and using Am (z) =
Fm (z) X (z)
m = 1, 2, . . . , M 1 m = 1, 2, . . . , M 1
Gm (z) X (z)
and Bm (z) =
Case 4: zdomain recursion lattice representations A0 (z) = B0 (z) = 1 Am (z) = Am1 (z) + Km z 1 Bm1 (z), Bm (z) = Km Am1 (z) + z 1 Bm1 (z), or in matrix notation Am (z) Bm (z)
K. E. Barner (Univ. of Delaware)
m = 1, 2, . . . , M 1 m = 1, 2, . . . , M 1
1 Km Km 1
Design Questions: How do we convert lattice coefcients (K terms) to direct-form lter coefcients ( terms)? How do we convert directform coefcients to lattice coefcients? Case 1: Lattice to DirectForm Translation Approach: Utilize relations A0 (z) = B0 (z) = 1 Am (z) = Am1 (z) + Km z 1 Bm1 (z), Bm (z) = z m Am (z 1 ), m = 1, 2, . . . , M 1 m = 1, 2, . . . , M 1
Solve for terms recursively, starting with m = 1 Example Determine the direct form realization of a threestage (M = 4) lattice lter with coefcients K1 = 1/2, K2 = 1/2, K3 = 1/4.
K. E. Barner (Univ. of Delaware) ELEG305: Digital Signal Processing Lattice to DirectForm Translation Fall 2008 15 / 19 Implementation of Discrete-Time Systems
Start recursion set m = 1 A1 (z) = A0 (z) + K1 z 1 B0 (z) 1 () = 1 + z 1 2 Set () equal to 1 polynomial A1 (z) = 1 + 1 (1)z 1 1 1 (1) = 2 Note, Bm (z) is the reverse polynomial of Am (z) 1 B1 (z) = z 1 A1 (z 1 ) = z 1 1 + z 2 1 1 = +z 2
K. E. Barner (Univ. of Delaware) ELEG305: Digital Signal Processing Fall 2008 16 / 19
For m = 2, use recursion Am (z) = Am1 (z) + Km z 1 Bm1 (z) A2 (z) = A1 (z) + K2 z 1 B1 (z) 1 1 1 z = 1 + z 1 + 2 2 3 1 1 2 = 1+ z + z 4 2 equating terms yields 2 (1) = 3 4 and 2 (2) = 1 2
1 + z 1 2
y (n) =
k =0
3 (k )x(n k )
Lecture Summary
Lecture Summary
Lattice Filters general recursion f0 (n) = g0 (n) = x(n) fm (n) = fm1 (n) + Km gm1 (n 1) gm (n) = Km fm1 (n) + gm1 (n 1), Lattice to DirectForm Translation utilize recursion on A0 (z) = B0 (z) = 1 Am (z) = Am1 (z) + Km z 1 Bm1 (z), Bm (z) = z m Am (z 1 ), m = 1, 2, . . . , M 1 m = 1, 2, . . . , M 1
Next lecture Complete lattice lters, structures for IIR systems (Chapter 9.29.3); start lter design (Chapter 10.110.2)
K. E. Barner (Univ. of Delaware) ELEG305: Digital Signal Processing Fall 2008 19 / 19