Filter Design
Filter Design
Filter Design
In Stopband
G (e j ) s , for s
n 0
h[n] h[ N n]
IIR DIGITAL FILTER DESIGN
Convert the digital filter specifications into analog
lowpass prototype filter specifications
Determine the analog lowpass filter transfer function
to meet these specifications
Then transform it into the desired digital filter
transfer function
Why used this approach?
Analog approximation techniques are highly advanced
Usually yield closed-form solutions
Extensive tables are available for analog filter design.
Many applications require the digital simulation of analog
filters.
IIR DIGITAL FILTER DESIGN
Pa ( s) P( z)
H a ( s) G( z)
Da ( s ) D( z )
A mapping from s-domain to z-domain
The imaginary (j ) axis in s-plane be mapped
onto the unit circle of z-plane
A stable analog tranfer function be transform into
a stable digital transfer function
The most widely used transformation is the
bilinear transformation.
IIR ANALOG FILTER ORDER
ESTIMATION
Selectivity parameter
p
k
s
1
c
1 log10 A2 1 2
log10 d
N
2 log10 s p log10 k
N
p
with
c
IIR ANALOG FILTER ORDER
ESTIMATION
The magnitude of Butterworth Low-Pass Filter can
also be defined as:
|Ha(j )|2 = Ha(s)Ha(-s)|s=j
Thus,
Ga(s) = Ha(s)Ha(-s)|s=j = 1 / [1+(s/j c)2N]
= |Ha )|2 = 1 / [1+(s/ c)2N]
The poles of Butterworth Low-Pass Filter can also
be defined as:
sk = c ej[ /2 + (2k + 1) /2N], k = 0,1,…N-1
Thus, the Transfer Function is defined as:
Ha(s) = 1 / [sN + a1sN-1 + … + aN-1s + aN]
IIR ANALOG FILTER ORDER
ESTIMATION
Example 2:
Design the Butterworth Low-Pass Filter to meet
the following specification:
fp = 6 kHz, fs = 10 kHz, p = s = 0.1
IIR ANALOG FILTER ORDER
ESTIMATION
Chebyshev Type I
Magnitude response
2 1
Ha ( j ) 2 2
1 TN ( p )
2 1
2
1
1 p
IIR ANALOG FILTER ORDER
ESTIMATION
Chebyshev Type I
Where the chebyshev polynomial of order N, TN ) is :
cos( N cos 1 ), 1
TN ( )
cosh( N cosh 1 ), 1
Filter order, N
cosh 1 (1 d )
N
cosh 1 (1 k )
IIR ANALOG FILTER ORDER
ESTIMATION
Example 3
Design a lowpass Chebyshev Type 1 filter to meet
the following spec:
fp = 6 kHz, fs = 10 kHz, p = s = 0.1
IIR ANALOG FILTER ORDER
ESTIMATION
Solution
1. Calculate d & k,
d = sqrt[((1- p)-2 -1)/ ( s
-2 – 1)] = 0.0487
k= p/ s= 0.6
2. Calculate the Filter Order, N
N cosh-1 (1/d) / cosh-1 (1/k) 3.38 = 4
3. Calculate passband ripple controller,
= [(1- p)-2 – 1]1/2 = 0.4843
4. Calculate Nth order Chebyshev Polynomials,
T4 )=8 4– 8 2 -1, -1 x 1
5. The magnitude of the Frequency response of the filter:
|Ha )|2 = 1 / [1 + 2T 2
N P)] =
= 1 / [1 + (0.4843)2 /(12000 )]
= 1 / [1 + 6.22x10-6 ]
IIR ANALOG FILTER ORDER
ESTIMATION
Chebyshev Type II
Magnitude response
2 1
Ha ( j ) 2
2 TN ( p)
1 s
TN ( s )
1 s
z
1 s
BILINEAR TRANSFORMATION
Example 4
Design the Digital Low-Pass Filter with 3-dB Cut-Off
Frequency, c = 0.25 by using Bilinear Transformation
method to analog Butterworth Low-Pass Filter defined below:
Ha(s) = [1 / 1 + (s/ s)]
Example 5
Determine the Low-Pass Digital Filter with 3-dB Cut-Off
Frequency of 0.2 and its Frequency
Response from the analog filter given below:
Ha(s) = c / s + c
where c is the 3-dB Cut-Off Frequency.
DESIGN OF LOW-ORDER DIGITAL
FILTERS
First-order Butterworth lowpass digital filters
Analog transfer function
H LP ( s ) c
s c
1 1 z1 1 tan( T 2)
where c
2 1 z1 1 tan( c T 2)
DESIGN OF LOW-ORDER DIGITAL
FILTERS
First-order Butterworth highpass digital filters
Analog transfer function
s
H HP ( s )
s c
s 1 1 z 1
GHP ( z )
s c 2 1 z1
1
s 2 1 z
T 1 z 1
DESIGN OF LOW-ORDER DIGITAL
FILTERS
Second-order bandpass digital filter
Bs 1 1 z 2
H BP ( s) 2 2
GBP ( z )
s Bs o 2 1 (1 ) z 1 z 2
where
1 tan( B T 2)
, cos( oT )
1 tan( B T 2)
n 0
h(n) = hd(n)w(n)
Blackman
w(n) = 0.42 - 0.5cos(2 n/M) +
0.08cos(4 n/M), 0 n M
0, elsewhere
FIR FILTER WITH WINDOW METHOD
The relationship between the length of window,
M and Filter Transition Band is shown below:
=c
1. Rectangular
M = 0.9 , s = -21 dB
2. Hanning
M = 3.1 , s = -44 dB
3. Hamming
M = 3.3 , s = -53 dB
4. Blackman
M = 5.5 , s = -74 dB
FIR FILTER WITH WINDOW METHOD
The diagram of Rectangular, Hanning, Hamming
& Blackman is shown below:
KAISER WINDOW METHOD
The Kaiser window is defined as
I0 1 [( n ) ]2
w[n] , 0 n M
I0 ( )
0, otherwise
Where = M/2, M is the filter order, is the shape
parameter and I0(µ) represents the zeroth-order
modified Bessel Function of the first kind.
2
2
r
I0 ( ) 1
r 1 r!
KAISER WINDOW METHOD
Shape parameter,
0.1102( s 8.7), s 50
0.5842( s 21) 0.4 0.07886( s 21), 21 s 50
0, s 21