You are on page 1of 30

FIR Filter Design Using Transformations

Objectives
! Reduces M-D FIR design to 1-D FIR design
! Efficient realization of designed filters

Motivation
! M-D designs based on L (Chebyshev) norm are difficult
! 1-D designs very well studied and understood

Strategy (M = 2; similar for any M-D design)


! Given ideal 2-D specifications I(1, 2)
" Transform 2-D specs into appropriate 1-D specs by choosing appropriate 1D filter I()
1-D filter called prototype filter.
" Design 1-D FIR filter H() approximating I() using known 1-D techniques
" Transform the designed 1-D prototype FIR filter H() into a 2-D FIR filter
H(1, 2) by using an appropriate 2-D mapping function
F(1, 2)
1-D FIR prototype
Resulting designed
H()
,

)
H(
mapping
1
2
2-D FIR filter
" Want to choose 1-D prototype I() and 2-D mapping function F(1, 2) such
that H(1, 2) ~ I(1, 2).
EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations


Two main issues
! How can we transform a 1-D FIR filter into an 2-D FIR filter ?
! How do we choose the 1-D filter (prototype filter) and mapping function
F(1, 2) ?

EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations


How to transform 1-D FIR filter into a 2-D FIR filter?
! Only symmetric 1-D filters can be transformed by the proposed
McClellan Transformation method.
! Background:
" Mcclellan transformation method maps 1-D positive-symmetric FIR filters into
2-D (positive-symmetric) FIR filters.
" Consider a 1-D zero-phase symmetric filter of length 2N+1

H ( ) =

h ( n)e

j n

= h ( 0) +

h ( n )e

n = N
N

n= N

jn

+ h(n)e jn
n =1

= h(0) + h(n)[e jn + e jn ]
N

n =1

= a (n) cos n
where

n =0

h (0), n = 0
a (n ) =
2h ( n ), 1 n N
EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations


How to transform 1-D FIR filter into a 2-D FIR filter? (continued)
! Background: Chebyshev Polynomials
" It is well-known that cos n can be expressed as a polynomial of
degree n in the variable cos

cos n = Tn (cos )
where

Tn ( x) = n th Chebyshev polynomial
T0 ( x) = 1
T1 ( x) = x
Tn +1 ( x) = 2 xTn ( x) Tn 1 ( x),
" Thus:

1 x 1

H ( ) = a (n) cos n
n =0

H ( ) = a(n)Tn (cos )
n =0

EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations


How to transform 1-D FIR filter into a 2-D FIR filter? (continued)
! Background: Derivation of the Chebyshev Recursion
1
1
cos A cos B = cos( A + B ) + cos( A B )
2
2
" Let A = and B = (n 1) , then
or

2 cos cos(n 1) = cos n + cos(n 2)


cos n = 2 cos cos(n 1) + cos(n 2)

Tn (cos ) = 2 cos Tn 1 (cos ) Tn 2 (cos )

Tn ( x) = 2 xTn 1 ( x) Tn 2 ( x)

EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations


How to transform 1-D FIR filter into a 2-D FIR filter? (continued)
! The Transformation:
" McClellan suggested that we can obtain a 2-D zero-phase FIR filter
if we make the substitution

cos

replace by

F (1 , 2 )

Then
N

H ( ) = a(n) cos n
n =0
N

H ( ) = a(n)Tn (cos )
n =0

H(1,2 ) = a(n)Tn[F(1,2 )]
n=0

EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations


How to transform 1-D FIR filter into a 2-D FIR filter? (continued)
! The Transformation:

H ( ) = a(n)Tn (cos )
n =0
N

H(1,2 ) = a(n)Tn[F(1,2 )]
n=0

" The mapping function F(1,2) should be real (zero-phase) and

F (1 , 2 ) 1 or

1 F (1 , 2 ) 1

since F(1,2) has to replace cos() and has to take the same
values of cos() since argument of Chebyshev polynomial
=> H(1,2) takes same exact values of designed 1-D FIR
prototype filter H().
Consequence:
- values of H(1,2) are determined by values of H().
- H(1,2) only takes values of H().

EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations


How to transform 1-D FIR filter into a 2-D FIR filter? (continued)
! The Transformation:
" The mapping function F(1,2) should be chosen to be the frequency
response of a zero-phase FIR filter
" If F(1,2) is real and a(n) real H(1,2) is real zero-phase
" If F(1,2) is (2Q+1) x (2Q+1) H(1,2) is (2NQ+1) x (2NQ+1) because
H(1,2) is a polynomial of degree N in F(1,2) same size as FN
FT

f F

(2Q + 1) (2Q + 1)

f * f F2

(4Q + 1)(4Q + 1)

M
f f K f F N
14243
N

(2 NQ + 1)(2 NQ + 1)

Times

g Tn ( F )
123

(2nQ + 1) (2nQ + 1)
144424443

h H (1 , 2 )
1424
3

( 2 NQ + 1) ( 2 NQ + 1)

an F n +...+ a0

size of support of g

bn F n +...+ b0

" Size of support of h(n1,n2) depends on Q (order of transformation subfilter F)


and on N (order of 1-D prototype filter)
EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations


How to transform 1-D FIR filter into a 2-D FIR filter? (continued)
! The Transformation:

H ( ) = a(n)Tn (cos )
n =0
N

H(1,2 ) = a(n)Tn[F(1,2 )]
n=0

" The mapping function F(1,2) determines the symmetries of the


designed 2D FIR filter H(1,2) => H(1,2) have the same
symmetries of F(1,2).
" Example: For zero-phase, even-symmetric H(1,2), F(1,2)
should be zero-phase and even-symmetric of the form:
Q

F (1 , 2 ) = t qr cos( q1 ) cos( r2 )
q =0 r =0
I

+ sij sin(i1 ) sin( j2 )


i =0 j =0

Note: Order of F(1,2) = max(Q,R,I,J).


EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations


How to transform 1-D FIR filter into a 2-D FIR filter? (continued)
! The Transformation:

H ( ) = a(n)Tn (cos )
n =0
N

H(1,2 ) = a(n)Tn[F(1,2 )]
n=0

" The mapping function F(1,2) determines the shape of the


contours of the designed 2D FIR filter H(1,2) => Contours of
H(1,2) have the same shape as the contours of F(1,2).
" Let F (1 , 2 ) = C , C 1
2
N

H (1 , 2 ) = a (n)Tn [C ] = C
n =0

F = C = const

H (1 , 2 ) = C ' = const
1

" Consequence:
Shape of contours of H(1,2) determined by F(1,2).
Value C determined by {a(n)}, n = 1 to N, which depends on the
designed 1-D prototype H() => prototype H() determines the
values of H(1,2) along contours.
EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations

Flexible and Modular:


-

Change F(1,2) to change contour shape


Change {a (n )} (prototype) to change values on contours

Procedure:
1) Design transformation subfilter F(1,2) :
a. to get desired symmetries
b. to produce or approximate desired contours
c. OR, if prototype filter already specified, to map values of prototype to
desired 2-D locations or contours

2) Design prototype to get desired values along contours

EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations


Example:
Consider

F (1 , 2 ) = A + B cos(1 ) + C cos(2 ) + D cos(1 2 ) + E cos(1 +

Let A=-B=-C=-1/2, D=E=1/4 (proposed by McClellan)

1
1 1
1
F (1 , 2 ) = + cos(1 ) + cos(2 ) + cos 1 cos 2
2 2
2
2

n2
f (n1 , n2 )

1
8
1
4
1
8

1
4
1
2

1
4

1
8
1
4
1
8

n1

F (1 , 2 ) = F ( 1 , 2 ) = F ( 1 , 2 ) = F (1 , 2 ) (quadrant symmetry)
=> designed H (1 , 2 ) has same symmetry
EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations

Example: (continued)

1 1
1
1
+ cos(1 ) + cos(2 ) + cos 1 cos 2
2
2 2
2
Contours of F(1,2):

F (1 , 2 ) =

F (1 , 2 )

Tend to be rectangular

1
Circular around origin

Note:
N
1) F (1 ,0) = cos 1 H (1 ,0) = a(n)Tn (cos 1 ) = H (1 )
n =0

=>Prototype exactly mapped along 1 = 0 axis


N
2) F (0, 2 ) = cos 2 H (0, 2 ) = a(n)Tn (cos 2 ) = H ( 2 )
n =0

=>Prototype exactly mapped along 2 = 0 axis

EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations


To get lowpass 2-D filter, use
H ( )

To get bandpass 2-D filter, use


H ( )

L
EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations

Mapping F(1, 2)

Prototype Filter H()

Designed 2D Filter H(1, 2)

EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations

Mapping F(1, 2)

Prototype Filter H()

Designed 2D Filter H(1, 2)

EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations


Desired I(1, 2)

Prototype Filter H()


EEE 507 - Lecture 13

Mapping F(1, 2)

Designed 2D Filter H(1, 2)


Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations


Design Example: We want to design a Fan filter using transformation
2

I (1 , 2 )

Requirement: 1) Use a 1st order transformation F(1,2) function => Q=R=1


2) Use a lowpass 1-D prototype
I()

EEE 507 - Lecture 13

/2

/2

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations


2

Example: Design of a Fan Filter (continued)

I (1 , 2 )

Choice of Transformation Function


- I (1 , 2 ) quadrant symmetric => F (1 , 2 ) needs to be quadrant symmetric
so, F (1 , 2 ) of the form:
Q

F (1 , 2 ) = t qr cos( q1 ) cos( r2 )
q =0 r = 0

= t00 + t10 cos 1 + t01 cos 2 + t11 cos 1 cos 2


Note: since quadrant symmetric => need to consider only 2

one quadrant
0

EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations

Example: Design of a Fan Filter (continued)

F (1 , 2 ) = t00 + t10 cos 1 + t01 cos 2 + t11 cos 1 cos 2


! Determination of parameters:
Typically done by:
1. Exploiting other symmetries
2. Mapping values of prototype appropriately

EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations

Example: Design of a Fan Filter (continued)

F (1 , 2 ) = t00 + t10 cos 1 + t01 cos 2 + t11 cos 1 cos 2


2

1. Exploiting Other Symmetries:


I (1 , 2 ) symmetric about line 2 = 1 +
=> Choose F (1 , 2 ) to be symmetric about same line
F (1 , 2 ) = F ( 2 , 1 )

I (1 , 2 )

t00 + t10 cos1 + t01 cos 2 + t11 cos1 cos 2

= t00 t10 cos 2 t01 cos1 + t11 cos 2 cos1

t01 = t10

t10 = t01

F (1 , 2 ) = t00 + t10 (cos 1 cos 2 ) + t11 cos 1 cos 2


3 unknowns => need 3 equations to solve for them
EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations

Example: Design of a Fan Filter (continued)


F (1 , 2 ) = t00 + t10 (cos 1 cos 2 ) + t11 cos 1 cos 2
2. Map values of prototype:

Since used 1-D prototype is lowpass, appropriate


mapping is as follows:
1-D point

=0
=

=
2

maps into

2-D point (1,2)

(0, )

( ,0)


( , )
2 2

I (1 , 2 )

Note: To map value at 1-D point to a desired 2-D location (1,2),


simply set F(1,2)=cos().

EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations


Example: Design of a Fan Filter (continued)
F (1 , 2 ) = t00 + t10 (cos 1 cos 2 ) + t11 cos 1 cos 2
a) = 0 (1 , 2 ) = (0, )
F (0, ) = cos(0) = 1
t00 + t10 (cos 0 cos ) + t11 cos 0 cos = 1 t00 + t10 (1 + 1) t11 = 1
t00 + 2t10 t11 = 1

(1)

b) =

(1 , 2 ) = ( ,0)
F ( ,0) = cos( ) = 1

t00 + t10 (1 1) + t11 cos cos 0 = 1 t00 2t10 t11 = 1

(2)

(1) ( 2) 4t10 = 2 t10 = 1 / 2

c) = / 2

(1 , 2 ) = ( / 2, / 2)
F ( / 2, / 2) = cos / 2 = 0

t00 = 0

t00 = 0
t11 = 2t10 1 = 0
t10 = 1 / 2

F (1 , 2 ) = 1 / 2 cos 1 1 / 2 cos 2

( using (1) )

EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations


Example: Design of a Fan Filter (continued)

F (1 , 2 ) = 1 / 2 cos 1 1 / 2 cos 2
(2 N + 1) = length of h( n)
F (1 , 2 ) = 1 / 2(cos 1 cos 2 )

H ( )

F<0

2 > 1
cos 2 < cos 1
=> F > 0

H (1 , 2 ) = h(0) + 2h(n)Tn ( F (1 , 2 ))
cos() >0

cos() < 0

n =1

= a (n)Tn ( F (1 , 2 ))
n =0

where a (0) = h(0), a(n) = 2h(n), 1 n N

EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

FIR Filter Design Using Transformations


Review of design procedure
N

H ( ) = a(n)Tn (cos )
n =0
N

H(1,2 ) = a(n)Tn[F(1,2 )]
n=0

{a (n )}: from 1-D prototype design


F (1, 2 ) : frequency response of low-order FIR zero-phase filter
! If h(n) is 2N+1 points long and f(n1,n2) is (2Q+1)x(2Q+1), then
h(n1,n2) is (2NQ+1)x(2NQ+1).
! Contour shape and symmetries depends only on F.
! Amplitude associated with a particular contour depends upon the
1-D prototype

EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

Implementation of Transformed FIR Designs


Since the filter is FIR, a direct convolution can be used to implement
the filter
A DFT can also be used
There also exists a special implementation that exploits the design
! Based on the recursion of Chebyshev polynomials
Tn [ F (1 , 2 )] = 2 F (1 , 2 )Tn 1 [ F (1 , 2 )] Tn 2 [ F (1 , 2 )]

T0 [ F (1 , 2 )] = 1

T1[F(1, 2 )] = F(1, 2 )
! Thus, if we have Tn1 [ F ] and Tn2 [ F ], we can get Tn [F ],because
F(1,2) is an FIR filter.
Tn2 [ F ]

Tn1 [ F ]
EEE 507 - Lecture 13

2 F (1 , 2 )

+ +

Tn [F ]
Copyright 2004 by Prof. Lina Karam

Implementation of Transformed FIR Designs


From the Chebyshev polynomials recursion, we obtain:
Tn2 [ F ]

Tn1 [ F ]

+ +

2 F (1 , 2 )

Tn [F ]

In addition, we can get Tn1 [ F ] and Tn2 [ F ] from the polynomial that
come before and so on until we get back to T1 [ F ] and T0 [ F ] .
-1
F

2F

2F

-1

T0 [ F ]

EEE 507 - Lecture 13

T1 [ F ]

T2 [ F ]

T3 [ F ]

Copyright 2004 by Prof. Lina Karam

Implementation of Transformed FIR Designs


Finally, the frequency response H(1, 2) of the 2D designed FIR
filter is just a linear combination of the Ti [F ]:
N

H (1 , 2 ) = a (n)Tn [ F (1 , 2 )]
n =0

a(0)= h(0) and a(n) = 2h(n), 1 n N .

where

-1
IN

h(0)

2F
2h(1)

-1
+

2F

2h(3)

2h(2)

out

Note: This structure will work for filters of any dimensionality.


To realize an M-dimensional filter H (1 , 2 ,..., M ),
we simply substitute an M-dimensional mapping function

F (1 , 2 ,..., M )
EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

Implementation of Transformed FIR Designs


Consider the first-order transformation:
F (1 , 2 ) = A + B cos 1 + C cos 2 + D cos(1 2 ) + E cos(1 + 2 )
A,
B
,
2
C
,

f (n1 , n2 ) = 2
D ,
2
E
,
2

n1 = n1 = 0
n1 = 1, n2 = 0
n1 = 0, n2 = 1
n1 = 1, n2 = n1
n1 = 1, n2 = n1

f ( n1 , n2 ) of size 3x3

D
2
B
2
E
2

C
2
A
C
2

E
2
B
2
D
2

Direct implementation of F requires 5 multiplications per output and


8 adds per output

! Note: Multiplications reduced by combining terms


EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

Implementation of Transformed FIR Designs


Computational Complexity
! To implement each filter F of size (2Q+1)x(2Q+1) requires in general:
( 2Q + 1) 2 Multiplications/Output
( 2Q + 1) 2 1 Additions/ Output
( 2Q + 1) Rows of storage

! For the whole filter H(1, 2), we have N filters F:


N ( 2Q + 1) 2 + ( N + 1) Mults/Output
N ( 2Q + 1) 2 + ( N 1) Adds/Output

EEE 507 - Lecture 13

Copyright 2004 by Prof. Lina Karam

You might also like