eee507_2DFIRDesign1
Transcript of eee507_2DFIRDesign1
-
7/24/2019 eee507_2DFIRDesign1
1/18
Design of 2D Finite-Impulse-Response (FIR) Filters
2-D FIR Filter Design Problem
Let
and: Impulse response of ideal filter
, 21
),( 21 nni
consists of an infinite summation and cannot be realized in
2211
1 2
),(),( 2121njnj
n n
eenniI
=
),( 21 I
Approximate by a finite-degree polynomial function),( 21 I
2211
12 22njnj
N N
111 212
computedbetotscoefficien
2121 ,, Nn Nn= = 43421
FIR Filter
Copyright by Prof. Lina Karam
EEE 507 - Lecture 12
-
7/24/2019 eee507_2DFIRDesign1
2/18
Design of 2D Finite-Impulse-Response (FIR) Filters
2-D FIR Filter design using windows
Truncates infinite sum
en ca o - proce ure
Spatial or time-domain method
Review of 1-D Procedure
.
2. Then
.
= dWIH )()(1)(
3. The window w(n) should be chosen such that
- it is N-point long
-
- w(n) should be conjugate symmetric if H() is to be linear-phase
10);1()( * = NnnNwnw
Copyright by Prof. Lina Karam
EEE 507 - Lecture 12
-
7/24/2019 eee507_2DFIRDesign1
3/18
Design of 2D Finite-Impulse-Response (FIR) Filters
2-D FIR Filter design using windows
The 2-D Procedure
. e
2. Then
,.,, 212121 nnwnnnn =
=
2122112121 ),(),(1
),( ddWIH
3. The window w(n1,n2) should be chosen such that (Good
Window criteria)
- 1 2
- its DTFT
- w(n1,n2) should be conjugate symmetric if H(1,2) is to be
-
),(),( 2121 W
10
10);1,1(),(
22
112211
*
21
=
Nn
NnnNnNwnnw
Copyright by Prof. Lina Karam
EEE 507 - Lecture 12
-
7/24/2019 eee507_2DFIRDesign1
4/18
Design of 2D Finite-Impulse-Response (FIR) Filters
-
Choosing The 2-D Window
1-D windows often used for generating 2-D windows
- Method 1:
a 2D window formed as the outer roduct of Good 1-D windows
)().(),( 221121 nwnwnnw =
b) has a rectangular region of support
c) Main lobe shape and side lobe heights can be calculated using
1-D results =
),( 21 nnw
- Method 2:
., 221121
)(),(2
2
2
121 nnwnnw +=
a) w(n) is a Good 1-D continous window function
b) w(n1,n2) is a sampled and approximately a circularly rotatedversion of the 1-D window.
Copyright by Prof. Lina Karam
EEE 507 - Lecture 12
-
7/24/2019 eee507_2DFIRDesign1
5/18
Desi n of 2D Finite-Im ulse-Res onse FIR Filters
2-D FIR Filter design using windows
Example 1: 11x11 lowpass FIR filter design based on an outer product
window and a 1-D Kaiser window
Perspective Plot of Magnitude Response
Copyright by Prof. Lina Karam
EEE 507 - Lecture 12
-
7/24/2019 eee507_2DFIRDesign1
6/18
Desi n of 2D Finite-Im ulse-Res onse FIR Filters 2-D FIR Filter design using windows
Example 1: 11x11 lowpass FIR filter design based on an outer
-
Contour Plot of Magnitude Response
Copyright by Prof. Lina Karam
EEE 507 - Lecture 12
-
7/24/2019 eee507_2DFIRDesign1
7/18
Desi n of 2D Finite-Im ulse-Res onse FIR Filters 2-D FIR Filter design using windows
Example 2: 11x11 lowpass FIR filter design based on a rotated window
-
Perspective Plot of Magnitude Response
Copyright by Prof. Lina Karam
EEE 507 - Lecture 12
-
7/24/2019 eee507_2DFIRDesign1
8/18
Desi n of 2D Finite-Im ulse-Res onse FIR Filters 2-D FIR Filter design using windows
Example 2: 11x11 lowpass FIR filter design based on a rotated
w n ow an a - a ser w n ow
Contour Plot of Magnitude Response
Copyright by Prof. Lina Karam
EEE 507 - Lecture 12
-
7/24/2019 eee507_2DFIRDesign1
9/18
Design of 2D Finite-Impulse-Response (FIR) Filters
Optimal FIR Filter Design Error measure needed to assess how much the designed filter
deviates from the desired ideal filter ),( 21 H),( 21 I
),(),(),( 212121 IHE =2211
1 2
),(),( 2121njnj
n n
eennhI
+=(n1,n2) in
Choose the filter coefficients to minimize some function of this error L Norm:
finite-extent ROS
Lp Norm:
2/1
21
2
2122}),(
4{ =
ddEE
L
Norm:
p
p ddEE 21212 }),(4{ =
),(max EE =
Copyright by Prof. Lina Karam
EEE 507 - Lecture 12
),( 21 B
-
7/24/2019 eee507_2DFIRDesign1
10/18
Design of 2D Finite-Impulse-Response (FIR) Filters
Optimal Least-Squares Designs
=
22 1
ddEE
[ ] =1 2
;),(),( 22121n n
nninnh
4
If R is the region of support of h(n1,n2):
[ ] [ ] +=2
21
2
2121
2
2 ),(),(),( n Rnn Rn nninninnhE
To minimize E22, set
= Rnnnni
nnh),(,),(
),(2121
21
where w(n1,n2) is a rectangular window with support R.
e se,),(),( 2121 nnnni =
Copyright by Prof. Lina Karam
EEE 507 - Lecture 12
-
7/24/2019 eee507_2DFIRDesign1
11/18
Design of 2D Finite-Impulse-Response (FIR) Filters
Optimal Design with Constraints
),(]exp[),(),( 21),(
22112121
21
=Rnn
InjnjnnhE
We have been treating the filter coefficients as if they were independent.These may be constrained.
Exam le: Desi n of a zero- hase filter with real coefficients
(i.e., H(1, 2) Symmetric) ),(),( 2121 nnhnnh =
,,,, 21),(
22112121
21
=Rnn
Copyright by Prof. Lina Karam
EEE 507 - Lecture 12
-
7/24/2019 eee507_2DFIRDesign1
12/18
Design of 2D Finite-Impulse-Response (FIR) Filters
Example: Design of a zero-phase filter with real coefficients (continued)
=> H(1, 2) & h(n1,n2) even symmetric
),(]cos[),(2)0,0(),( 2122112121 ++= InnnnhhE
where (assuming filter is (2N+1)x(2N+1))
)(),(),()( 211
21 = = IiaF
i
i
),( 21 Rnn
2N+1
F= # of degrees of freedom = # samples in region above1)12( 22 ++N
a(i) = ith free parameter
= th
2==
+++=
==
1)12(,),(2
1,)0,0(
1221 nnNinnh
ih
Note: For any linear constraints, the error can be written in the form (*); but F,
a i will differ for different choices of constraints.
,21i
1)12(),cos( 122211 +++=+= nnNinn
Copyright by Prof. Lina Karam
EEE 507 - Lecture 12
-
7/24/2019 eee507_2DFIRDesign1
13/18
Design of 2D Finite-Impulse-Response (FIR) Filters
p ma es gn w ons ra n s
where
),(),()(),( 211
2121 IiaEF
i
i=
=
F= # of degrees of freedom = # of free parameters
a(i) = ith free parameter
=ith basis function),( 21 i
Example: Suppose we want to design a 5x5 circularly symmetric
lowpass FIR filter. The ideal frequency response is given by:
+ R,1 2222
1
otherwise,0, 21
2
2
2
1
2
2
2
121 offunctionJINC"")(),( nnnnfnni +=+=
So, we would like to have:
,,,22
nnhnnhnnnnh ==+=
Copyright by Prof. Lina Karam
EEE 507 - Lecture 12
-
7/24/2019 eee507_2DFIRDesign1
14/18
Design of 2D Finite-Impulse-Response (FIR) Filters
Optimal Design with Constraints
Example: Design of a 5x5 circularly symmetric lowpass filter (continued)
),(),()(),( 12212
2
2
121 nnhnnhnnfnnh ==+=
)1,2()1,1()0,1()1,1()1,2(
)2,2()1,2()0,2()1,2()2,2(
hhhhh
hhhhhonly 6 out of the 25parameters are free.
)2,2()1,2()0,2()1,2()2,2(
)1,2()1,1()0,1()1,1()1,2(
hhhhh
hhhhh
= ),( 21 H
Copyright by Prof. Lina Karam
EEE 507 - Lecture 12
-
7/24/2019 eee507_2DFIRDesign1
15/18
Design of 2D Finite-Impulse-Response (FIR) Filters
Optimal Design with Constraints
Example: Design of a 5x5 circularly symmetric lowpass filter (continued)
, 21
Copyright by Prof. Lina Karam
EEE 507 - Lecture 12
-
7/24/2019 eee507_2DFIRDesign1
16/18
Design of 2D Finite-Impulse-Response (FIR) Filters
Optimal Design with Constraints
Example: Design of a 5x5 circularly symmetric lowpass filter (continued)
F
==
=i
iiaH
1
2121 ),)),
where F=
=
=
)2(
)1(
a
a
=
=
=
),(
),(
212
211
=)(Fa
M
=),(
,
21
213
F
M
Copyright by Prof. Lina Karam
EEE 507 - Lecture 12
-
7/24/2019 eee507_2DFIRDesign1
17/18
Design of 2D Finite-Impulse-Response (FIR) Filters
-
Takin the derivative of E 2 with res ect to the each of the a i and settin the
=
=
21
2
21
1
212
2
2 ),(),()(4
1ddIiaE
F
i
i
result to zero gives the following set of Flinear equations:
=
==F
i
Kik FKIia1
,...,2,1;)(
=
2121212 ),(),(4
ddKiiK
=
2121212 ),(),(1 ddII KK Note: If orthogonal basis , then
KiiK = ;0ii
iIia
= )(
)},({ 21 i
Issues:
Integral may be difficult to solve
No possibility of frequency weighting.
Copyright by Prof. Lina Karam
EEE 507 - Lecture 12
-
7/24/2019 eee507_2DFIRDesign1
18/18
Design of 2D Finite-Impulse-Response (FIR) Filters
Optimal Designs with Constraints
Discrete Solutions
Previous difficulties can be partially alleviated by replacing E2by
)],(),([ 21212 mmm mmm IHWE
)],(),()([ 2121 mmmmi
F
m IiaW =
- Weights
- Error can be controlled with the values of the weights and thedensity/locations of the samples.
0MW
1m i=
- The coefficients that minimize E2are given by
=
==F
i
Kik FKIia1
,...,2,1;)(
w ere),(),( 21
*
21 mmKmmi
m
miK W =
,,*
IWI =
Copyright by Prof. Lina Karam
EEE 507 - Lecture 12
m