Professional Documents
Culture Documents
IIR Filters
Why interest in z-Transform?
! DFT computable
! z-Transform
" Poles and zeros => can describe filter characteristics
" Implementation, how to build a filter
Example:
H1 ( z )
H 2 ( z)
H3(z)
H ( z ) = H1 ( z ).H 2 ( z ).H 3 ( z )
How to break H(z) into components has a lot to do with hardware
implementation (for example, get chips implementing a 2nd order
digital filter on and hook these together).
IIR Filters
Issues:
! Polynomials do not factor in M-D case
! Difference equations harder to deal with (direction of recursion, ordering
relation) than 1-D
! Stability analysis much more complicated than 1-D
IIR Filters
2-D Difference Equation
b(l , l
1
l1
!
!
!
!
!
l2
) y ( n1 l1 , n2 l 2 ) = a ( r1 , r2 ) x ( n1 r1 , n2 r2 )
r1
r2
IIR Filters
2-D Difference Equation
b(l , l
1
l1
l2
) y ( n1 l1 , n2 l2 ) = a ( r1 , r2 ) x ( n1 r1 , n2 r2 )
r1
Recursive Computability
y ( n1 , n 2 ) =
a (r , r ) x(n
1
r1
r2
r1 , n 2 r2 )
r2
b ( l1 , l 2 ) y ( n1 l1 , n 2 l 2 ) , ( l1 , l 2 ) ( 0 , 0 )
l1
1
4l 2 4 4 442 4 4 4 4 4
3
similar to a convolutio n
If an ordering exists so that all needed output samples on the right side, are
available when needed, then the system is recursively computable.
EEE 507 - Lecture 14
IIR Filters
Recursive Computability
y (n1 , n2 ) = a (r1 , r2 ) x(n1 r1 , n2 r2 ) - b(l1 , l2 ) y (n1 l1 , n2 l2 ), (l1 , l2 ) (0,0)
r1
r2
r2
l1
l2
l2
Input array x
n2
Weight&sum
n1
Input
mask
r1
Weight&sum
Output mask
n2
n1
l1
output y
IIR Filters
Recursive Computability
! Examples of recursively-computable output masks
" First-quadrant or causal filter
b(l1 , l2 ) 0 for {0 l1 N1 ,0 l2 N 2 }
n2
N2+1
n1
N2
N1
N1+1
IIR Filters
Recursive Computability
! Examples of recursively-computable output masks
" Non-symmetric half-plane (NSHP) filter
n2
N2+1
n1
14243
N +N +2
1
3
N1+1 N3
IIR Filters
Recursive Computability
! Not all masks are recursively computable
! Examples of non-recursively computable output masks
IIR Filters
Recursive Computability
! Boundary conditions
" For a recursive system, how do you choose the boundary conditions?
" If the system is LSI, the initial conditions must be zero and they must lie
outside the support of the output y(n1,n2)
IIR Filters
Recursive Computability
! Example: Computation Ordering and Precedence Graph
n2
Output Mask
N2+1
n1
Initial condition
region
N1+1
The next point to be computed
is (0,1) or (1,0), or we can calculate
both of them in parallel if the hardware permits.
x
x
x
(0,0)
(0,1)
(0,2)
EEE 507 - Lecture 14
(1,0)
(1,1)
Precedence Graph
(2,0)
Copyright 2004 by Lina J. Karam
IIR Filters
Recursive Computability
! Not all the possible computation orderings are equivalent
" Amount of storage
" Degree of parallelism
! Example:
" 3x3 output mask
" Output evaluated on NxN square region
n2
N-1
n2
N-1
N-1
n1
N-1
n1
IIR filters
Recursive Computability
! Example: Computation Ordering storage/parallelism (continued)
n2
N-1
n2
N-1
N-1
n1
N-1
n1
where
-
l2
b(m , m ) x(n m , n
1
m2 )
m1
m2
( m1 ,m2 ) ( 0, 0)
b(0,0) = 1.
x ( n1 , n2 ) = ( n1 , n2 ) y ( n1 , n2 ) = h ( n1 , n2 )
h(n1 , n2 ) = a (n1 , n2 )
b( m , m ) h( n m , n
1
m2 )
m1
m2
( m1 , m2 ) ( 0 , 0 )
H z ( z1 , z 2 ) = a(l1 , l2 ) z1 z 2
1
l1
l2
A (z , z )
H z ( z1 , z 2 ) = z 1 2 , where
Bz ( z1 , z 2 )
b( m , m ) z
1
m1
z2
m2
H z ( z1 , z 2 )
m1
m2
( m1 , m2 ) ( 0 , 0 )
Az ( z1 , z2 ) = a (l1 , l2 ) z1 z 2
1
l1
l2
Bz ( z1 , z2 ) = b(m1 , m2 ) z1
m1
z2
m2
; b(0,0) = 1
m1 m2
x ( n1 , n2 )
FIR
Az ( z1 , z2 )
Purely IIR
1
Bz ( z1 , z 2 )
y ( n1 , n2 )
y ( n1 , n 2 )
Az ( z1 , z 2 )
Copyright 2004 by Lina J. Karam
y ( n1 , n 2 )
Az ( z1 , z 2 )
Iterative Implementation
Efficient
Requires recursive computability
Not so efficient
Recursive computability not required (does
not have to be casual)
Can use boundary condition
All input samples need to be available and
stored (such as in image processing)
Az ( z1 , z 2 )
Az ( z1 , z2 )
=
Bz ( z1 , z 2 ) 1 C z ( z1 , z2 )
where C z ( z1 , z 2 ) = 1 Bz ( z1 , z 2 )
1424
3
deno min ator
Y z ( z1 , z 2 ) = H z ( z1 , z 2 ). X z ( z1 , z 2 )
Y z ( z1 , z 2 ) = Az ( z1 , z 2 ). X z ( z1 , z 2 ) + C z ( z1 , z 2 ).Y z ( z1 , z 2 )
y ( n1 , n2 ) = a ( n1 , n2 ) x ( n1 , n2 ) + c ( n1 , n2 ) y ( n1 , n2 )
(*)
(*)
- Approach:
1. Guess y ( n1 , n 2 )
2. Substitute in the RHS of () to get a better estimate
3. Repeat Step 2 until satisfied
- Note: a ( n1 , n 2 ) and
yi ( n1 , n2 ) = a (n1 , n2 ) x ( n1 , n2 ) + c( n1 , n2 ) yi 1 (n1 , n2 )
Yi (1 , 2 ) = Az (1 , 2 ). X z (1 , 2 ) + C z (1 , 2 ).Yi 1 (1 , 2 )
EEE 507 - Lecture 14
y i ( n1 , n2 ) = a ( n1 , n2 ) x ( n1 , n2 ) + c( n1 , n2 ) y i 1 ( n1 , n2 )
In frequency domain, this becomes:
Yi (1 , 2 ) = A(1 , 2 ). X (1 , 2 ) + C (1 , 2 ).Yi 1 (1 , 2 )
Convergence Proof:
- Let the initial guess be Y-1(1, 2)= 0.
Y0 (1 , 2 ) = A(1 , 2 ). X (1 , 2 )
Y1 (1 , 2 ) = A(1 , 2 ). X (1 , 2 ) + C (1 , 2 ). A(1 , 2 ). X (1 , 2 )
I
M
YI (1,2 ) = A(1,2 ).X (1,2 )Ci (1,2 )
i =0
1 C I +1 (1 , 2 )
= A(1 , 2 ). X (1 , 2 )
1 C (1 , 2 )
- Convergence condition: C (1 , 2 ) < 1
A(1 , 2 )
lim I YI (1 , 2 ) =
X (1 , 2 ) = H (1 , 2 ) X (1 , 2 ) = Y (1 , 2 )
1 C (1 , 2 )
EEE 507 - Lecture 14
A(1 , 2 ) B (1 , 2 ) A(1 , 2 )
=
H (1 , 2 ) =
2
B (1 , 2 )
B (1 , 2 )
- Set
C (1 , 2 ) = 1 B(1 , 2 )
142
4 43
4
2
- Choose paramter
0< <
in the range
2
max B ( 1 , 2 )
( 1 , 2 )
B(1 , 2 )
1
C
((
,
)
X (1 , 2 )
B (1 , 2 )
1
2
- Iterative computation:
Initial Guess: Y-1(1, 2) = 0.
Yi (1 , 2 ) = B (1 , 2 ). A(1 , 2 ). X (1 , 2 ) + C (1 , 2 )Yi 1 (1 , 2 )
1 C I +1 (1 , 2 )
YI (1 , 2 ) = B (1 , 2 ) A(1 , 2 ) X (1 , 2 ) +
, at iteration " I"
1 C (1 , 2 )
*
lim I YI (1 , 2 ) = Y (1 , 2 )
1 C I +1 (1 , 2 )
, at iteration " I"
YI (1 , 2 ) = B (1 , 2 ) A(1 , 2 ) X (1 , 2 ) +
1 C (1 , 2 )
*
- Error:
E ( 1 , 2 )
Y ( 1 , 2 )
I +1
1 = C ( 1 , 2 )
YI ( 1 , 2 )
max E (1 , 2 ) <
(1, 2 )