ELEG–305: Digital Signal Processing Lecture 20: Lattice Filters Filters & Implementation Structures for IIR Filters
Kenneth E. Barner Department of Electrical and Computer Engineering University of Delaware
Fall 2008
K. E. Barner (Univ (Univ.. of Delaware Delaware))
ELEG–305: Digital Signal Processing
Fall 2008
Outline
1
Review of Previous Lecture
2
Lecture Objectives
3
Implementation of Discrete-Time Systems Direct–Form to Lattice Translation Structures for IIR Filters – Direct–Form Structures Structures for IIR Filters – Transpose Structures Structures for IIR Filters – Cascade–Form Structures Structures Structures fo forr IIR Filters Filters – Pa Paralle rallel–F l–Form orm Structures Structures Structures for IIR Filters – Lattice & Lattice–Ladder Structures
1 / 24
Review of Previous Lecture
Review of Previous Lecture
Lattice Filters – general recursion f 0 (n ) = g 0 (n ) = x (n ) f m (n ) = f m −1 (n ) + K m g m −1 (n − 1) g m (n ) = K m f m −1 (n ) + g m −1 (n − 1), Lattice to Direct–Form Translation – utilize recursion on A0 (z ) = B 0 (z ) = 1 Am (z ) = Am −1 (z ) + K m z −1 B m −1 (z ), B m (z ) = z −m Am (z −1 ),
K. E. Barner (Univ. of Delaware)
m = 1, 2, . . . , M − 1
m = 1, 2, . . . , M − 1
ELEG–305: Digital Signal Processing
Fall 2008
3 / 24
Lecture Objectives
Lecture Objectives
Objective Develop a method for converting direct–form (FIR) coefficients to lattice filter coefficients; Derive implementation structures for IIR filters Reading Chapters 9 (9.2–9.3); Next lecture, filter design (Chapter 10.1–10.3)
Implementation of Discrete-Time Systems
Direct–Form to Lattice Translation
Lattice Filter Representation Summary
Case 1: FIR filter representations (time domain) f m (n ) =
m
αm (k )x (n − k )
and
g m (n ) =
k =0
m
β m (k )x (n − k )
k =0
Case 2: FIR filter representations (z –domain) F m (z ) = Am (z )X (z )
or
G m (z ) = B m (z )X (z )
or
Also, B m (z ) = z −m Am (z −1 ), K. E. Barner (Univ. of Delaware)
F m (z ) X (z ) G m (z ) B m (z ) = X (z ) Am (z ) =
m = 1, 2, . . . , M − 1
ELEG–305: Digital Signal Processing
Implementation of Discrete-Time Systems
Fall 2008
Direct–Form to Lattice Translation
Case 3: Lattice representations (time domain) 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
Case 4: Lattice representations (z –domain) A0 (z ) = B 0 (z ) = 1 Am (z ) = Am −1 (z ) + K m z −1 B m −1 (z ),
m = 1, 2, . . . , M − 1
B m (z ) = K m Am −1 (z ) + z −1 B m −1 (z ),
m = 1, 2, . . . , M − 1
5 / 24
Implementation of Discrete-Time Systems
Direct–Form to Lattice Translation
Design Questions: How do we convert lattice coefficients (K terms) to direct-form filter coefficients (α terms)? Solved last lecture. How do we convert direct–form coefficients to lattice coefficients, i.e., Given αm (1), αm (2), . . . , αm (m ), how do we determine K 1 , K 2 , . . . , K m ? Case 2: Direct–Form to Lattice Translation Approach: Utilize relations Am (z ) = Am −1 (z ) + K m z −1 B m −1 (z ),
m = 1, 2, . . . , M − 1
B m (z ) = K m Am −1 (z ) + z −1 B m −1 (z ),
m = 1, 2, . . . , M − 1
Note that K m = αm (m ) [why? z −1 B m −1 (z ) has z −m term] To get K m −1 , we need αm −1 (m − 1) or entire Am −1 (z ) polynomial Recursively generate Am (z ) for m = M − 1, M − 2, . . . , 1 K. E. Barner (Univ. of Delaware)
ELEG–305: Digital Signal Processing
Implementation of Discrete-Time Systems
Fall 2008
Direct–Form to Lattice Translation
Rearrange the Am (z ) and B m (z ) recursions B m (z ) = K m Am −1 (z ) + z −1 B m −1 (z )
⇒ z −1 B m −1 = B m (z ) − K m Am −1 (z ) Substituting this into the Am (z ) recursion Am (z ) = Am −1 (z ) + K m z −1 B m −1 (z )
= Am −1 (z ) + K m [B m (z ) − K m Am −1 (z )] Finally, solving for Am −1 (z ) gives Am (z ) − K m B m (z ) Am −1 (z ) = , 2 1 − K m
m = M − 1, M − 2, . . . , 1
Note: The RHS contains higher order (known) terms Result: Solve (∗) recursively, setting K m −1 = αm −1 (m − 1)
(∗)
7 / 24
Implementation of Discrete-Time Systems
Direct–Form to Lattice Translation
Example Determine the lattice representation for: H (z ) = A3 (z ) = 1 +
7 −1 11 −2 1 −3 z + z + z 8 16 4
First step, set m = 3. Then directly from A3 (z ) K 3 = α3 (3) =
1 4
Also, B 3 (z ) is the reverse polynomial of A3 (z )
⇒ B 3 (z ) = Next, evaluate Am −1 (z ) =
1 11 −1 7 −2 z + z + z −3 + 4 16 8 Am (z )−K m B m (z ) 2 1−K m
A2 (z ) = K. E. Barner (Univ. of Delaware)
A3 (z ) − K 3 B 3 (z ) 1 − K 32
ELEG–305: Digital Signal Processing
Implementation of Discrete-Time Systems
A2 (z ) =
=
Fall 2008
9 / 24
Direct–Form to Lattice Translation
A3 (z ) − K 3 B 3 (z ) 1 − K 32 1+
7 −1 8 z
+
11 −2 16 z
+
1 −3 4 z
1
− 14 14 − ( 14 )2
+
3 1 = 1 + z −1 + z −2 4 2 Thus for m = 2 K 2 = α2 (2) =
1 2
and reversing A2 (z ) gives 1 3 −1 B 2 (z ) = + z + z −2 2 4
11 −1 16 z
+
7 −2 8 z
+
z −3
Implementation of Discrete-Time Systems
Direct–Form to Lattice Translation
For m = 1, A2 (z ) − K 2 B 2 (z ) 1 − K 22
A1 (z ) =
1+
=
3 −1 4 z
+
1 −1 2 z
1
− 12 12 − ( 12 )2
+
3 −1 4 z
2
+ z
1 −1 = 1 + z 2 Thus K 1 = α1 (1) =
1 2
Final Result: 1 1 1 K 1 = , K 2 = , K 3 = 2 2 4
K. E. Barner (Univ. of Delaware)
ELEG–305: Digital Signal Processing
Implementation of Discrete-Time Systems
Fall 2008
11 / 24
Direct–Form to Lattice Translation
Summary: Direct–Form to Lattice Translation The translation recursion can be rearranged to yield the following steps 1
Set m = M − 1
2
Set K m = αm (m ) and αm −1 (0) = 1
3
If m = 1 stop; otherwise continue
4
Evaluate αm −1 (k )
= =
5
αm (k ) − K m β m (k ) 2 1 − K m αm (k ) − αm (m )αm (m − k ) , 2 1 − αm (m )
1 ≤ k ≤ m − 1
Decrement m and go to 2
Note: Procedure fails if some |K m | = 1 ⇒ Am −1 (z ) has a root on the unit circle; Solution – factor this root out
Implementation of Discrete-Time Systems
Structures for IIR Filters – Direct–Form Structures
Structures for IIR Filters – Direct-form Structures Consider the IIR system H (z ) = H 1 (z )H 2 (z ), where H 1 (z ) =
M
b k z −k
[All–zero];
H 2 (z ) =
k =0
1+
M
−k k =1 a k z
ELEG–305: Digital Signal Processing
Implementation of Discrete-Time Systems
[All–pole]
Direct Form II Realization (N = M )
Direct Form I Realization K. E. Barner (Univ. of Delaware)
1
Fall 2008
Structures for IIR Filters – Transpose Structures
Transpose Structures Objective: Represent a filter as a flow graph Directed branches connect nodes Gains and delays are listed along branches Nodes sum (are adders) or are branching (splitting) points Inputs are source nodes, outputs are sink nodes Theorem (Flow–Graph Reversal) Given a flow graph, if we perform the following: Reverse flow on all branches Interchange inputs/outputs then the resulting system, known as the transposed structure , is functionally equivalent to the original system, i.e., they produce the same input/output function.
13 / 24
Implementation of Discrete-Time Systems
Structures for IIR Filters – Transpose Structures
Example: Generate the transposed form of
Direct Form II Realization
Transposed Direct Form II Realization
Signal Flow Graph
Transposed Signal Flow Graph
K. E. Barner (Univ. of Delaware)
ELEG–305: Digital Signal Processing
Implementation of Discrete-Time Systems
Fall 2008
15 / 24
Structures for IIR Filters – Transpose Structures
Note: The flow–graph reversal operations can be applied directly to a direct form realization, i.e., (1) reverse flow on all branches and (2) interchange inputs/outputs
Direct Form II Realization
Transposed Direct Form II Realization
Implementation of Discrete-Time Systems
Structures for IIR Filters – Transpose Structures
The transposed direct form II realization can be redrawn (flipped) to yield a more conventional left–to–right signal flow
Transposed Direct Form II Transposed Direct Form II Realization K. E. Barner (Univ. of Delaware)
Realization (L–R signal flow)
ELEG–305: Digital Signal Processing
Implementation of Discrete-Time Systems
Fall 2008
Structures for IIR Filters – Cascade–Form Structures
Cascade Form Structures Objective: Represent a filter as a cascade of subsystems
Approach: Factor H (z ) into a product of Second-order subsystems H (z ) = where
H k (z ) =
K
H k (z )
k =1 b k 0 + b k 1 z −1 + b k 2 z −2 1 + a k 1 z −1 + a k 2 z −2
Each H k (z ) can, for instance, be realized in direct form II (Right) Note: Pair complex–conjugate poles to ensure real–valued coefficients
17 / 24
Implementation of Discrete-Time Systems
Structures for IIR Filters – Parallel–Form Structures
Parallel–Form Structures Objective: Represent a filter as a sum of subsystems Approach: Expand H (z ) through partial-fractions H (z ) = C +
N k =1
Ak 1 − p k z −1
Combine (complex–conjugate) poles to form real–valued two–pole subsystems
IIR System Parallel Realization
b k 0 + b k 1 z −1 H k (z ) = 1 + a k 1 z −1 + a k 2 z −2 Second order H k (z ) of Parallel Realization K. E. Barner (Univ. of Delaware)
ELEG–305: Digital Signal Processing
Implementation of Discrete-Time Systems
Fall 2008
Structures for IIR Filters – Parallel–Form Structures
Example Determine cascade and parallel realizations of H (z ) =
10(1 − 12 z −1 )(1 − 23 z −1 )(1 + 2z −1 )
(1 − 34 z −1 )(1 − 18 z −1 )[1 − ( 12 + j 12 )z −1 ][1 − ( 12 − j 12 )z −1 ]
For the cascade case, group poles (complex–conjugates), e.g., H (z ) = 10H 1 (z )H 2 (z ) where H 1 (z ) = H 2 (z ) =
1 − 23 z −1 1 − 78 z −1 +
3 −2 32 z −2
1 + 32 z −1 − z
1 − z −1 + 12 z −2
Cascade Realization of H (z )
19 / 24
Implementation of Discrete-Time Systems
Structures for IIR Filters – Parallel–Form Structures
For the parallel realization, use partial fractions to obtain H (z ) =
2.93 1 − 34 z −1
12.25 − j 14.57 12.25 + j 14.57 −17.68 + + + 1 −1 1 1 1 − 1 − 8 z 1 − ( 2 + j 2 )z 1 − ( 12 − j 12 )z −1
Then combine pairs of poles (complex–conjugates, when possible)
−14.75 − 12.90z −1 H (z ) = 3 −2 1 − 78 z −1 + 32 z +
24.50 + 26.82z −1 1 − z −1 + 12 z −2 Parallel Realization of H (z )
K. E. Barner (Univ. of Delaware)
ELEG–305: Digital Signal Processing
Implementation of Discrete-Time Systems
Fall 2008
21 / 24
Structures for IIR Filters – Lattice & Lattice–Ladder Structures
Lattice & Lattice–Ladder Form Structures Objective: Represent an IIR filter as a lattice Approach: Introduce feedback to the previously developed structure Case 1: All–pole systems The resulting filter structure in this case is
Lattice structure for an all–pole IIR system
Note: All–pole lattice structures are used to model physical systems, e.g., the human vocal tract, layers in the stratified earth, etc. The K i values correspond to physical reflection phenomena and can often be physically measured, e.g., seismically
Implementation of Discrete-Time Systems
Structures for IIR Filters – Lattice & Lattice–Ladder Structures
Also of note: The system is BIBO stable iff |K i | < 1 for i = 1, 2, . . . , N A set of recursive governing equations can be derived similarly to the FIR case The system has feed forward (f i (·)) and feedback (g i (·) paths Case 2: Pole–zero systems Including zero–terms results in a lattice–ladder structure:
Lattice–ladder structure for a pole–zero IIR system K. E. Barner (Univ. of Delaware)
ELEG–305: Digital Signal Processing
Fall 2008
23 / 24
Lecture Summary
Lecture Summary Direct–Form to Lattice Translation – Initialize m = M − 1 1 Set K m = αm (m ) and αm −1 (0) = 1; If m = 1 stop; otherwise cont. 2
Evaluate αm −1 (k ) =
3
αm (k ) − αm (m )αm (m − k )
1 − α2m (m )
,
1 ≤ k ≤ m − 1
Decrement m and go to 1
Implementation Structures for IIR filters – Direct–Form Structures – Direct–Form I and II Transpose Structures – Reversing the flow on all branches and interchange inputs/outputs leaves function unchanged K Cascade–Form Structures – Use factored form H (z ) = k =1 H k (z ) N Parallel–Form Structures – Use PF form H (z ) = C + k =1 1−p Akk z −1 Lattice & Lattice–Ladder Structures – model physical phenomena with reflection coefficients (|K i | < 1 for i = 1, 2, . . . , N )
Next lecture – Filter design (Chapter 10.1–10.3)