Professional Documents
Culture Documents
Filter Design Techniques
Filter Design Techniques
Implementation
Specification for effective frequency response of a continuoustime lowpass filter and its corresponding specifications for
discrete-time system.
p or 1 passband ripple
s or 2 stopband ripple
p, p passband edge frequency
s, s stopband edge frequency
2 passband ripple parameter
1 p = 1/1 + 2
BW bandwidth = u l
c 3-dB cutoff frequency
u, l upper and lower 3-dB cutoff
frequensies
transition band = |p s|
Ap passband ripple in dB
= 20log10(1 p)
As stopband attenuation in dB
= -20log10(s)
Bessel Filter
Butterworth Filter
Chebyshev Filter
Chebyshev Type I
Bessel Filter
Butterworth Filter
Example
Chebyshev Filters
Frequency response of
lowpass Type I Chebyshev filter
|H()|2 = 1/[1 + 2TN2(/p)]
Frequency response of
lowpass Type II Chebyshev filter
|H()|2 = 1/[1 + 2{TN2(s/p)/TN2(s/)}]
k = 0, 1, , N-1.
Example
dy ( t )
dt
=
t =nT
y ( nT ) y ( nT T ) y [ n ] y [ n 1]
T
T
dy ( t )
dt
t =nT
y [ n ] 2 y [ n 1] + y [ n 2 ]
T2
which s2 = [(1 z-1)/T]2. So, for the kth derivative of y(t), sk = [(1 z-1)/T]k.
Hence, the system function for the digital IIR filter obtained as a
result of the approximation of the derivatives by finite
difference is
H(z) = Ha(s)|s=(z-1)/Tz
It is clear that points in the LHP of the s-plane are mapped into
the corresponding points inside the unit circle in the z-plane and
points in the RHP of the s-plane are mapped into points outside
this circle.
Unit circle
s-plane
z-plane
T2
1+ 0.2T + 9.01T 2
1 filter. 1For
T)
2( 1of
+ 0.1designed
can be selected to satisfied specification
1+ 0.2T +at
9.01T 2
1+ 0.2T + 9.01T
example, if T = 0.1, the poles are located
p1,2
z 2
Fs/4
Unit Circle
Im
Re
Fs/2
3Fs/4
frequency
Unit Circle
Im
Re
ck
k =1 s p k
N
H(z) =
ck
p k T 1
1
e
z
k =1
N
pk t
c
e
k
k =1
=
1
2
Then
H(z)
s + 0.1 j 3
1e
1
2
0.1T
j 3T
1
2
s + 0.1 + j 3
1
1
2
1 e 0.1T e j 3T z 1
Frequency response
of digital filter.
Frequency response
of analog filter.
Log
Magnitude
Magnitude
Group delay
Disadvantage of previous
techniques: frequency
warping aliasing effect
and error in specifications
of designed filter (frequencies)
So, prewarping of frequency
is considered.
Mapping of the continuous-time frequency axis onto the discretetime frequency axis by bilinear transformation.
Frequency warping
inherent in the bilinear
transformation of a
continuous-time lowpass
filter into a discretetime lowpass filter. To
achieve the desired
discrete-time cutoff
frequencies, the
continuous-time cutoff
frequencies must be
prewarped.
To
Mapping Operator
Lowpass
Lowpass
s = s/p
Lowpass
Highpass
s = p/s
Lowpass
Bandpass
s = (s2 + O2)/Bs
Lowpass
Bandstop
s = Bs/(s2 + O2)
H(z) = [(1+ 02) 2(1- 02) z-1 + (1+ 02) z-2]/[(1+ 02 +B) 2(1- 02) z-1 + (1+ 02 -B) z-2]
The system function for the digital filter is obtained by applying the bilinear
transformation with Td = 1. The result is:
H(z) = 0.0007378(1+z-1)6/[(1-1.2686z-1+0.7051z-2)(1-1.0106z-1+0.3583z-2)(1-0.9044z-1+0.2155z-2)]
Log
Magnitude
Magnitude
Group
delay
Log
Magnitude
Magnitude
Group
delay
Log
Magnitude
Detailed
plot of
magnitude
in passband
Group delay
Log
Magnitude
Detailed
plot of
magnitude
in passband
Group delay
Log
Magnitude
Detailed
plot of
magnitude
in passband
Group delay
Ha ( s ) =
( s z k )
k =1
N
H( z ) =
( 1e zkT z 1 )
k =1
N
( s pk )
( 1e pk T z 1 )
where {zk} are the zeros and {pk} are the poles of the analog filter, and
k =1
k =1
To
Transformation
Lowpass
Lowpass
s [p/p ]s
Lowpass
Highpass s pp/s
Lowpass
l, u
Lowpass
l, u
The mapping z-1 g(z-1) must map points inside the unit circle in the zplane into itself.
The unit circle must also be mapped into itself.
Transform
to
Transformation
Operator
Parameters
Lowpass
a = sin[(pp)/2]/sin[(p+p)/2]
Highpass
b = -cos[(p+p)/2]/cos[(p-p)/2]
Bandpass
a1 = -2K/(K+1)
a2 = (K-1)/(K+1)
Bandstop z-1 -(z-2 b1z-1 + b2)/(b2z-1 - b1z-1 + 1)
b1 = -2/(M+1)
b2 = (1-M)/(1+M)
Where a = cos[(u+l)/2]/cos[(ul)/2], K = cot[(ul)/2]tan(p/2), and
M = tan [(ul)/2] tan(p/2).
p is passband edge frequency new filter, l and u are lower and upper band
edge frequencies.
H( z ) =
bk z
=0
1 + a k z k
h[ k ] z
=0
Suppose that the input to the filter is a unit sample (x[n] = [n]).
Then the response of the filter is y[n] = h[n] and hence
0nM
The set of last two equations can be used to solve for filter
parameters.
Since the design method matches hd[n] only up to the number of filter
parameters, the more complex the filter, the better the
approximation.
The major limitation with the Pade approximation method is the
resulting filter must contain a large number of poles and zeros. Thus
this method has found limited use in filter designs for practical
applications.
[n]
Hd(z)
hd[n]
1/H(z)
y[n]
- [n]
[n]
All-pole filter
H1(z)
v[n]
All-zero filter
H2(z)
hd[n]
Shanks method: Both sets of parameters {ak} and {bk} are determined
by application of the least-squares method (proposed by Shanks [1967]).
Firstly, the parameter {ak} are computed and then the parameters
{bk} can also be determined later.
The design is most easily carried out with the system function for the
IIR filter expressed in the cascade form.
Then the filter gain and the filter coefficients are to be determined
by iterative procedure in order to obtain the desired frequency
response of the filter.
Instead of dealing with the phase of the filter, it is more convenient
to deal with the group delay as a function of frequency.
The total weighted least-squares error over all frequencies will be
minimized via the iterative process.
The major difficulty with any iterative procedure that searches for
the parameter values that minimize a nonlinear function is that the
process may converge to a local minimum instead of a global minimum.
Windowing Method
Frequency-Sampling Method
Optimum Approximations
Least-Squares Inverse (Wiener) Filter
Windowing Method
Hd(ej) = n=-hd[n]e-jn
hd[n] = (1/2) Hd(ej)ejnd
h[n] = hd[n]w[n] = hd[n], 0 n M,
0,
otherwise.
H(ej) = (1/2) Hd(ej)W(ej())d .
Window Type
Time-Domain Sequence
Rectangular
w[n] =
Bartlett
(Triangular)
w[n] =
Hanning
w[n] =
Hamming
w[n] =
Blackman
w[n] =
Kaiser
w[n] =
1, 0 n M
0, otherwise
2n/M,
0 n M/2
2-2n/M, M/2 < n M
0,
otherwise
0.5 0.5cos(2n/M), 0 n M
0,
otherwise
0.54 0.46cos(2n/M), 0 n M
0,
otherwise
0.42 0.5cos(2n/M) + 0.08cos(4n/M), 0 n M
0,
otherwise
I0[(1 - {(n )/}2)1/2]/I0(), 0 n M, = M/2
0,
otherwise
I0(.) is zero order modified Bessel function of the first kind, is window shape parameter.
Rectangular
M = 50
Hamming
M = 50
Bartlett
M = 50
Blackman
M = 50
Hanning
M = 50
Kaiser
M = 20
The width of the main lobe and the relative side-lobe amplitude
depend primarily on the window length L and the shape (amount of
tapering) of the window.
Through the choice of the shape and duration of the window, we
can control the properties of the resulting FIR filter:
The windows with the smaller side lobes yield better approximations
of the ideal response at a discontinuity.
The smaller width of the main lobe which can be achieved by
increasing M yield the narrower transition regions.
Type of
window
Rectangular
-13
4/(M+1)
-21
1.81/M
Bartlett
-25
8/M
-25
1.33
2.37/M
Hanning
-31
8/M
-44
3.86
5.01/M
Hamming
-41
8/M
-53
4.86
6.27/M
Blackman
-57
12/M
-74
7.04
9.19/M
-50
-70
-90
4.54
6.76
8.96
4.86/M
8.64/M
11.42/M
Kaiser
= s p
Illustration of type of
approximation
obtained at a
discontinuity of the
ideal frequency
response.
,A > 50
,21 A 50
,A < 21
A = -20log10
M = (A 8)/2.285
Where is the peak approximation error, and = s p is
the transition width.
M = 20
M = 20
= 6
M = 10, 20, 40.
Windowing Algorithm
Filter Type
Lowpass
2fc[sin((n-M/2)c)/(n-M/2)c]
2fc
Highpass
-2fc[sin((n-M/2)c)/(n-M/2c]
1-2fc
Bandpass
Bandstop
2(f2 f1)
2f2[sin((n-M/2)2)/(n-M/2)2]
- 2f1[sin((n-M/2)1)/(n-M/2)1]
2f1[sin((n-M/2)1)/(n-M/2)1]
1-2(f2 - f1)
- 2f2[sin((n-M/2)2)/(n-M/2)2]
Impulse response
Log magnitude
Approximation
error
Type II: M = 25
Impulse
response
Log magnitude
Approximation
error
Time-Domain Sequence
Rectangular
w[n] =
Bartlett
(Triangular)
w[n] =
Hanning
w[n] =
Hamming
w[n] =
Blackman
w[n] =
Kaiser
w[n] =
1, 0 n M
0, otherwise
2n/M,
0 n M/2
2-2n/M, M/2 < n M
0,
otherwise
0.5 - 0.5cos(2n/M), 0 n M
0,
otherwise
0.54 - 0.46cos(2n/M), 0 n M
0,
otherwise
0.42 - 0.5cos(2n/M) + 0.08cos(4n/M), 0 n M
0,
otherwise
I0[(1 - {(n )/}2)1/2]/I0(), 0 n M, = M/2
0,
otherwise
I0(.) is zero order modified Bessel function of the first kind, is window shape parameter.
Rectangular
-13
4/(M+1)
-21
1.81/M
Bartlett
-25
8/M
-25
1.33
2.37/M
Hanning
-31
8/M
-44
3.86
5.01/M
Hamming
-41
8/M
-53
4.86
6.27/M
Blackman
-57
12/M
-74
7.04
9.19/M
-50
-70
-90
4.54
6.76
8.96
4.86/M
8.64/M
11.42/M
Kaiser
= s p
h[0] = h[64]
h[1] = h[63]
h[2] = h[62]
h[3] = h[61]
h[4] = h[60]
h[5] = h[59]
h[6] = h[58]
= hd[0]w[0]
= hd[1]w[1]
= hd[2]w[2]
= hd[3]w[3]
= hd[4]w[4]
= hd[5]w[5]
= hd[6]w[6]
= 0x0.08
= -0.01007x0.08222
= -0.00406x0.08884
= 0.00913x0.09981
= 0.00804x0.11502
= -0.00655x0.13432
= -0.01131x0.15752
=0
= -0.00083
= -0.00036
= 0.00091
= 0.00093
= -0.00088
= -0.00178
h[30] = h[34]
h[31] = h[33]
h[32] = h[32]
= hd[30]w[30]
= hd[31]w[31]
= hd[32]w[32]
= 0.06091x0.99116
= 0.31219x0.99779
= 1x1
= 0.06037
= 0.31150
=1
Where fc will be chosen to the center of the transition band = fc + f/2 = [1.5k
+ 0.5k/2]/8k = 0.21875
Simplicity
Lack of flexibility
Unprecision
Lack of capability
T1
T2
T3
0.589 954 18
0.593 571 18
0.589 432 70
0.557 153 12
0.499 174 24
0.184 578 82
0.173 607 13
0.163 973 10
0.123 939 63
0.668 976 13
0.659 515 26
0.647 112 64
0.601 811 54
Frequency response of frequency sampling filter with (a) no transition band samples;
(b) One transition band sample; (c) two transition band samples; (d) three transition
Band samples.
Alternation Theorem
Yes
No
Changed
Retain (L+2)
largest extrema
h[n]
y[n]
d[n] = [n]
+
e[n]
{bk}
Windowing method
Optimum method