Académique Documents
Professionnel Documents
Culture Documents
Content
Preliminaries
Characteristics of Prototype Analog Filters
Analog-to-Digital Filter Transformations
Frequency Transformations
Preliminaries
Third: Implementation
The product of the above step is a filter description
in the form of either a difference equation, or a
system function, or an impulse response. From this
description we implement the filter in hardware or
software on a computer.
The specifications
In many applications, digital filters are used to implement
frequency-selective operations;
Therefore, specifications are required in the frequency-
domain in terms of the desired magnitude and phase
response of the filter;
Generally a linear phase response in the passband is
desirable;
An FIR filter is possible to have an exact linear phase;
An IIR filter is impossible to have linear phase in
passband. Hence we will consider magnitude-only
specifications.
Preliminaries
j
[ s , ] Stopband
H (e ) a2 s | |
[ p , s ] Transition band
a1 The tolerance (or ripple) in passband
a 2 The tolerance (or ripple) in stopband
p The ending frequency of the passband. Bandwidth
s The beginning frequency of the stopband.
Preliminaries
Examples
In a certain filters specifications the passband
ripple is 0.25dB, and the stopband attenuation is
50dB. Determine the a1 and a2.
0.25
( )
1 0.25 20 lg(1 a1 ), a1 1 10 20
0.0284
50
( )
2 50 20 lg a 2 , a 2 10 20
0.0032
Preliminaries
Approach 1
Designed
IIR filter
Apply freq. band Apply filter
Design analog
transformation transformation
lowpass filter
ss sz
Approach 2
Designed
IIR filter
Apply filter Apply freq. band
Design analog
transformation transformation
lowpass filter
sz zz
return
Characteristics of Prototype Analog Filters
Magnitude-squared function
Let H a ( j ) be the frequency response of an analog
filter
1 2 2 1
H a ( j ) 1, | | p H a ( j ) at p
1 2
1 2
2 1 2 1
0 H a ( j ) 2 , | | s H a ( j ) 2 at s
A A
is a passband ripple parameter
A is a stopband attenuation parameter
p is the passband cutoff frequency in rad/sec
s is the stopband cutoff frequency in rad/sec
Characteristics of Prototype Analog Filters
2
The properties of H a ( j )
H a ( j ) H a ( s ) s j ha (t ) is a real function
2
H a ( j ) H a ( j ) H a ( j ) H a ( j ) H a ( j ) H a ( s ) H a ( s ) s j
2
H a ( s ) H a ( s ) H a ( j )
2 s 2
H a ( s)H a ( s) j
s-plane
2
Characteristics of Prototype Analog Filters
How to construct H a (s )
H a (s ) is the system function of the analog filter. It must be
causal and stable. Then all poles of H a (s ) must lie within
the left half-plane.
All left-half poles of H a ( s ) H a ( s ) should be assigned to H a (s )
K 0 ( s 2 25) H a ( s ) s 0 H a ( j ) 0
H a ( s)
( s 7 )( s 6) K0 4
4( s 2 25) 4 s 2 100
H a ( s) 2
( s 7 )( s 6) s 13 s 42
Characteristics of Prototype Analog Filters
2 1
H a ( j ) 2N
1
c
Characteristics of Prototype Analog Filters
2 1 ( j c )2 N
H a ( s) H a ( s) H a ( j ) 2N
s / j
s
2N
s ( j c )2 N
1
j c
1 j ( 1 2 k 1 )
sk ( 1) 2N
( j c ) c e 2 2N
, k 1,2, ,2 N
Characteristics of Prototype Analog Filters
cN
H a ( s) N j ( 1 2 k 1 )
(s s k ) sk c e 2 2N
, k 1,2, , N
k 1
s
H a ( s ) H an ( )
c
Designing equations
Given p , s , 1 , 2 , two parameters are required to
determine a Butterworth lowpass filters : N , c
2N
p
at p 20 lg 1 1
c
2N
s
at s 20 lg 1 2
c
Solving these two equations for N , c
1 2
lg (10 1) /(10
10 10
1)
N , N N
p
2 lg( )
s
Since the actual N chosen is larger than required,
specifications can be either met or exceeded at p or s
To satisfy the specifications exactly at p
p s
c c
2N 1 2N 2
10 10
1 10 10
1
To satisfy the specifications exactly at s
Example
Determine the system function of 3th-order Butterworth
analog lowpass filter. Suppose c 2 rad/s
Solution:
2
H a ( j ) 1 1
H a ( s) H a ( s) 1
2N 6
1
6
s
1 1
c 2 64
j ( 1 2 k 1 )
s k 2e 2 6
, k 1,2, ,6
c3 8
H a ( s) 3
( s s1 )( s s2 )( s s3 ) s 4 s 2 8 s 8
Design the above filter with normalized Butterworth
analog prototype filter. See table 6-4 on page 261
d0
H an ( s ) , a0 a N 1
a0 a1 s a 2 s a N s
2 N
d 0 a0 in case of H a ( j 0) 1
1 8
1 2( s ) 2( s ) 2 ( s ) 3 8 8s 4s 2 s 3
2 2 2
Design a lowpass Butterworth filter to satisfy:
Passband 1 1 dB for 0 2 104 rad/s
Stopband 2 15 dB for 2 1.5 104 rad/s
2N
2 10 4
20 lg 1 1
c
2N
2 1.5 10 4
20 lg 1 15
c
1 2
1 15
lg (10 1) /(10
10 10
1) lg (10 1) /(10 1)
10 10
N
p 2 104
2 lg( ) 2 lg
s 4
2 1.5 10
5.8858
N 6
s 2 1.5 104
c 2 1.1279 104
2N 2 12 15
10 10
1 10 10
1
1
H an ( s )
1 a1 s a 2 s a 3 s a4 s a5 s s
2 3 4 5 6
1
1 3.864 s 7.464 s 9.142 s 7.464 s 3.864 s s
2 3 4 5 6
H a ( s ) H an ( s ) s s H an ( s ) s s
c 2 1.13104
1.28 10 29
1.28 10 29 6.97 10 24 s 1.90 10 20 s 2 3.27 1015 s 3 3.76 1010 s 4 2.74 10 5 s 5 s 6
To construct a cascade structure s1,6 0.259 j 0.966
Look for table 6-6 on page 263 s2 ,5 0.707 j 0.707
s3 ,4 0.966 j 0.259
1
H an ( s )
( s s1 )( s s2 )( s s3 )( s s4 )( s s5 )( s s6 )
1
2
( s 0.52 s 1.00)( s 2 1.41s 1.00)( s 2 1.93 s 1.00)
s s
s
c 2 1.13 10 4
1.28 10 29
H a ( s) 2
( s 3.69 10 4 s 5.04 10 9 )( s 2 10 5 s 5.04 10 9 )( s 2 1.37 10 5 s 5.04 10 9 )
Characteristics of Prototype Analog Filters
cos( N cos 1 x ), | x | 1
C N ( x) where x
-1
ch( Nch x ), | x | 1 c
C N 1 ( x ) 2 xC N ( x ) C N 1 ( x )
C 0 ( x ) 1, C1 ( x ) x
The properties of Chebyshev lowpass filters
At 0 H a ( j ) 1
:
H a ( j 0) 1 for N is odd 1 2C N2
c
H a ( j 0) 1 for N is even
1 2
At c H a ( j c ) 1 for all N
: 1 2
For0 c H a ( j) oscillates between 1 ~ 1
: 1 2
For c H a ( j ) decreases monotonica lly to 0
:
For s H a ( j s ) 1
: A
Designing equations
Given c , s , As, A p , two parameters are required to
determine a Chebyshev-I filter: , N
0.1 A p
10
2
1
1 10 0.1 As
1
ch
N
s
1
ch
c 1 10 1
0.1 As
1
s c ch ch
N
3 dB c ch 1 ch1 1
N Note: this is only for c 3 dB
Determine system function
To determine a causal and stable H a (s ) , we must find
the poles of H ( s ) H ( s ) and select the left half-plane
a a
poles for H a (s ) . The poles are obtained by finding the
roots of
s
1 C
2 2
0
j c
N
1 12 1
H a ( s) K
N
(s s
k 1
k )
1, N is odd
1
H a ( j 0) , N is even
1 2
Determine poles by geometric method
The poles of H a ( s ) H a ( s ) fall on an ellipse with major axis b
c
and minor axis
a .
c
j
N
a c b c
Examples
Determine the system function of 2th-order Chebyshev-I
lowpass filter. Suppose c 1 rad/s and Ap 1 dB
Solution: 10
2 0.1 Ap
1 10 1 0.2589
0.1
a0 1.1025
a1 1.0977
d0 d0
H a ( s)
a0 a1 s s 2
1.1025 1.0977 s s 2
H a ( j 0) 1 1 0.8913
1 2
1.2589
d0
H a ( s ) s 0 0.8913, d 0 0.9827
1.1025
Design a lowpass Chebyshev-I filter to satisfy:
Passband cutoff: c 2 104 rad/s
Passband ripple: Ap 1 dB
Stopsband cutoff: s 2 1.5 10 rad/s
4
Stopband attenuation: As 15 dB
Solution: 0. 1 A p
10 1 10 1 0.5088
0.1
1
100.1 As 1
ch
ch 1 (10.8761)
N 1
3.1978
1 s ch (1.5)
ch
c
Ap 1 dB N 4 0.5088
a0 0.2756a1 0.7426, a 2 1.4539, a 3 0.9528
d0
H an ( s )
a0 a1 s a 2 s 2 a 3 s 3 s 4
d0
H a ( j 0) 1 1 0.8913
1 2 1.2589
d0
H an ( s ) s 0 0.8913, d 0 0.2456
0.2756
H an ( s ) 0.2456
0.2756 0.7426 s 1.4539 s 0.9528 s s
2 3 4
s s s
c 2 104
H a ( s)
3.8278 1018
4.2954 1018 1.8420 1014 s 5.7398 109 s 2 5.9866 104 s 3 s 4
Analog-to-Digital Filter Transformations
1
2
H ( z ) z e sT
T
k
Ha (s j
T
k)
T
0
Re[z ]
T
3
T
Analog-to-Digital Filter Transformations
Properties
Using Re[s ]
0 maps into | z | 1 (inside of the UC)
0 maps into | z | 1 (on the UC)
0 maps into | z | 1 (outside of the UC)
All semi-infinite left strips of width 2 / T map into | z | 1 .
Thus this mapping is not unique but a many-to-one mapping
Since the entire left half of the s-plane maps into the unit
circle, a causal and stable analog filter maps into a causal
and stable digital filter.
Analog-to-Digital Filter Transformations
k 1
To sample the ha (t )
N N
h( n) ha ( nT ) Ak e sk nT u( n) Ak (e sk T ) n u( n)
k 1 k 1
The z-transform of h(n) is
N N
Ak
H (z) h(n)z
n
n
Ak (e
n 0 k 1
sk T
z )
1 n
k 1 1 e s k T 1
z
N
Ak
Compared with H a ( s )
k 1 s s k
Conclusions:
s T
The pole sk in s-plane is mapped to the pole e k in z-plane
The partial fraction expansion coefficient of H (z ) is the
same as that of H a (s )
The zeros in the two domains do not satisfy the same
relationship
Analog-to-Digital Filter Transformations
k 1 1 e
sk T
z 1
Analog-to-Digital Filter Transformations
Examples
2 1 1
Transform H ( s )
a
s 4s 3 s 1 s 3
2
T T Tz 1 (e T e 3T )
H (z) 1 T
1 3T
1 z e 1 z e 1 z 1 ( e T e 3T ) z 2 e 4 T
0.3181z 1
1 0.4177 z 1 0.0183 z 2
Analog-to-Digital Filter Transformations
Bilinear transformation
Definition
This is a conformal mapping that transforms the j -axis
into the unit circle in the z-plane only once, thus avoiding
aliasing of frequency components. This mapping is the
best transformation method.
1T 1T
j j
1T e 2
e 2
1 e j1T
c tan j c 1T 1T
c
2 j j 1 e j1T
e 2
e 2
1 e s1T 1 z 1 cs
s c s1T
c z
1 e 1 z 1 cs
1 e s1T
s c
1 e s1T z e s1T
j j Im[z ]
s-plane s1-plane j 1 z-plane
0 0 1 0
Re[z ]
1
1 z
s c
1 z 1
Analog-to-Digital Filter Transformations
Parameter c
Keeping a good corresponding relationship between
the analog filter and the digital filter in low
1 i.e.
frequencies. in low frequencies
1T 1T 2
c tan c , 1 then c
2 2 T
Keeping a good corresponding relationship between the
analog filter and the digital filter in a specific frequency
(for example, in the cutoff frequency, c 1cT )
1c T c c
c c tan c tan then c c cot
2 2 2
Properties
Using s j , we obtain
c s ( c ) j (c ) 2 2
z , | z |
c s ( c ) j (c ) 2 2
So 0 | z | 1, 0 | z | 1, 0 | z | 1
Using z e j , we obtain
1 z 1 1 e j
s c 1
c j
jc tan( ) j
1 z 1 e 2
The imaginary axis maps onto the unit circle in a one-to-one
fashion. Hence there is no aliasing in the frequency domain.
The entire left half-plane maps into the inside of the unit
circle. Hence this is a stable transformation.
Analog-to-Digital Filter Transformations
It is a stable design;
There is no aliasing;
There is no restriction on the type of filter that can
be transformed;.
The frequencies and are not linearly related.
So a linear phase analog filter cannot be mapped
to a linear phase digital filter.
Design procedure
Given the digital lowpass filter specifications p , s , 1 , 2
Choose a value for T. We may set T=1
Prewarp the cutoff frequencies p and s ; that is
2 p 2 s
p tan( ), s tan( )
T 2 T 2
Examples
2
Transform H a ( s ) 2
s 4s 3
into a digital filter using the bilinear transformation.
Choose T=1
2 1 z 1 1 z 1
H (z) Ha ( ) H a (2 )
T 1 z 1 T 1
1 z 1
2 p
p tan( ) 2 tan(0.1 ) 0.6498
T 2
2 s
s tan( ) 2 tan(0.15 ) 1.0191
T 2
Design an analog Chebyshev-I filter H a (s ) to meet the
specifications p , s , 1 , 2
0.0438
H a ( s) 4
s 0.6192 s 3 0.6140 s 2 0.2038 s 0.0492
return
Frequency Transformations
Introduction
The treatment in the preceding section is focused
primarily on the design of digital lowpass IIR filters. If we
wish to design a highpass or a bandpass or a bandstop
filter, it is a simple matter to take a lowpass prototype
filter and perform a frequency transformation.
There are two approaches to perform the frequency
transformation
Frequency transformations in the analog domain
Frequency transformations in the digital domain
Frequency Transformations
Approach 1
Designed
IIR filter
Frequency Filter
Analog
transformation transformation
lowpass filter
ss sz
Approach 2
Designed
IIR filter
Filter Frequency
Analog
transformation transformation
lowpass filter
sz zz
Frequency Transformations
highpass filter s , p , 1, 2
bandpass filter s 1 , p1 , p 2 , s 2 , 1 , 2
bandstop filter p1 , s 1 , s 2 , p 2 , 1 , 2
Frequency Transformations
Such that H d ( Z ) H L ( z ) z 1 G ( Z 1 )
1
To do this, we simply replace z everywhere in H L (z )
by the function G ( Z 1 )
Frequency Transformations
The unit circle of the z-plane must map onto the unit
circle of the Z-plane
The inside of the unit circle of the z-plane must also
map onto the inside of the unit circle of the Z-plane.
G ( Z 1 ) must be a rational function in Z 1 so that H d (Z )
is implementable.
Frequency Transformations
Z 1
z 1
1 Z 1
c : Cutoff frequency of new digital filter
sin[( c c ) / 2]
sin[( c c ) / 2]
Frequency Transformations
Lowpass - Highpass
Z 1
z 1
1 Z 1
cos[( c c ) / 2]
cos[( c c ) / 2]
Frequency Transformations
Lowpass - Bandpass
Z 2 1 Z 1 2
z 1
2 Z 2 1 Z 1 1
1 : lower cutoff frequency of bandpass digital filter
2 : upper cutoff frequency of bandpass digital filter
0 : center frequency of the passband
cos[( 2 1 ) / 2] 2 1 c
cos 0 , k cot( ) tan
cos[( 2 1 ) / 2] 2 2
2 k k 1
1 , 2
k 1 k 1
Frequency Transformations
Lowpass - Bandstop
Z 2 1 Z 1 2
z 1
2 Z 2 1 Z 1 1
1 : lower cutoff frequency of bandstop digital filter
2 : upper cutoff frequency of bandstop digital filter
0 : center frequency of the stopband
cos[( 2 1 ) / 2] 2 1 c
cos 0 , k tan( ) tan
cos[( 2 1 ) / 2] 2 2
2 1 k
1 , 2
1 k 1 k
Frequency Transformations
Design procedure
Determine the specifications of the digital prototype
lowpass filter;
Determine the specifications of the analog prototype
lowpass filter;
Design the analog prototype lowpass filter;
Transform the analog prototype lowpass filter into a digital
prototype lowpass filter using bilinear transformation;
Perform the frequency transformation in digital domain to
obtain the desired frequency-selective filters.
Frequency Transformations
Examples
Given the specifications of Chebyshev-I lowpass filter
p 0.2 , 1 1dB
s 0.3 , 2 15dB
and its system function
0.01836(1 z 1 )4
H L (z)
(1 1.4996 z 1 0.8482 z 2 )(1 1.5548 z 1 0.6493 z 2 )
Solution
cos[(0.2 0.6 ) / 2]
0.3820
cos[(0.2 0.6 ) / 2]
H d ( Z ) H L ( z ) z 1 Z 1 0.3820
1 0.3820 Z 1
0.0243(1 Z 1 )4
e j s e j 0.46 0.3820
s arg( j s
) arg( j 0.46
) 0.3
1 e 1 0.3820e
2 p
p tan( ) 2 tan(0.1 ) 0.6498
T 2
2 s
s tan( ) 2 tan(0.15 ) 1.0191
T 2
Design an analog Chebyshev-I prototype lowpass filter
to satisfy the specification: p , s , R p , As
0.0438
H a ( s) 4
s 0.6192 s 3 0.6140 s 2 0.2038 s 0.0492
H h ( Z ) H L ( z ) z 1 Z 1
1Z 1
0.0243(1 Z 1 )4
2 p
p tan( ) 2 tan(0.1 ) 0.6498
T 2
2 s
s tan( ) 2 tan( 0.3450 ) 3.7842
T 2
Design an analog Chebyshev-I prototype lowpass filter
to satisfy the specification: p , s , R p , As
0.4149
H a ( s) 2
s 0.7134 s 0.4656
Transform the analog prototype lowpass filter into a
digital prototype lowpass filter using bilinear transformation
0.0704 (1 z 1 ) 2
H L (z)
1 1.1997 z 1 0.5157 z 2
H bp ( Z ) H L ( z ) z 1 Z 2 1 Z 1 2
2 Z 2 1 Z 1 1
2 p
p tan( ) 2 tan(0.1 ) 0.3168
T 2
2 s
s tan( ) 2 tan( 0.0959 ) 0.6217
T 2
Design an analog Chebyshev-I prototype lowpass filter
to satisfy the specification: p , s , R p , As
0.0156
H a ( s) 3
s 0.3131s 2 0.1243 s 0.0156
Transform the analog prototype lowpass filter into a
digital prototype lowpass filter using bilinear transformation
H bs ( Z ) H L ( z ) z 1 Z 2 1 Z 1 2
2 Z 2 1 Z 1 1
0.132 (1 Z 2 ) 3
return
H a ( j ) Magnitude Response
N=2
1 N=4
N=8
N=16
0.707
0 30 40 50 60
Analog frequency in rad/s
return
H a ( j ) Magnitude Response
1
Amplitude
0.707
0 2 4 6
Analog frequency in rad/s
Phase Response
3
Phase in rad
1
0
-1
-3
0 2 4 6
Analog frequency in rad/s
return
Magnitude Response Magnitude in dB
1
0
-1
0.8913
decibels
H
-15
0.1778
0 -30
0 2 3 5 0 2 3 5
Analog frequency in pi units 4 Analog frequency in pi units 4
x 10 x 10
Phase Response Impulse Response
1
20000
0.5
ha(t)
0 10000
P
-0.5
0
-1
0 2 3 5 0 0.5 1 1.5
Analog frequency in pi units 4 time in seconds -4
x 10 x 10
return
Magnitude Response Magnitude in dB
1
0
-1
0.8913
decibels
H
-15
0.1778
0 -30
0 2 3 5 0 2 3 5
Analog frequency in pi units 4 Analog frequency in pi units 4
x 10 x 10
Phase Response Impulse Response
1
20000
0.5
15000
ha(t)
0 10000
P
5000
-0.5
0
-1 -5000
0 2 3 5 0 0.5 1 1.5
Analog frequency in pi units 4 time in seconds -4
x 10 x 10
return
C0 ( x )
-1
-2
-1
-2
-1
-2
-1
-2
-1
-2
-1
-2
-1
-2
return
Magnitude Response N 4
0.8913
Amplitude
0 2 3 5
Analog frequency in rad/s
Magnitude Response
N 5
0.8913
Amplitude
0 2 3 5
Analog frequency in rad/s
return
H a ( j ) Magnitude Response
1
0.8913
Amplitude
0 1 2 3 5
Analog frequency in rad/s
Phase Response
1
0
Phase in rad
-1
-2
-3
0 1 2 3 5
Analog frequency in rad/s
return
Magnitude Response Magnitude in dB
1
0
-1
0.8913
decibels
H
-15
0.1778
0 -30
0 2 3 5 0 2 3 5
Analog frequency in pi units 4 Analog frequency in pi units 4
x 10 x 10
Phase Response Impulse Response
1 20000
15000
Phase in pi units
0.5
10000
ha(t)
0
5000
-0.5 0
-1 -5000
0 2 3 5 0 1 2 3 4
Analog frequency in pi units 4 time in seconds -4
x 10 x 10
return
H a ( j ) T 1
0.6
0.4
0.2
0 pi/T 2*pi/T
H ( e j )
0.6
0.4
0.2
0 pi 2*pi
H a ( j ) T 0.1
0.6
0.4
0.2
0 pi/T 2*pi/T
H ( e j )
0.6
0.4
0.2
0 pi 2*pi
return
Magnitude Response Phase Response
1
1
0.8913 0.5
-0.5
0.1778
-1
0 0.2 0.3 1 0 0.2 0.3 1
Frequency in pi Frequency in pi
Magnitude Response in dB Group Delay
10
0
-1 8
-15 4
0.4
0.2
0 pi/T 2*pi/T
frequency in rad/s
H ( e j )
0.6
0.4
0.2
0 pi 2*pi
frequency in rad/sample
H a ( j ) Magnitude Response T 0.1
0.6
0.4
0.2
0 pi/T 2*pi/T
frequency in rad/s
H ( e j )
0.6
0.4
0.2
0 pi 2*pi
frequency in rad/sample
return
Magnitude Response Phase Response
1
1
0.8913 0.5
pi units
0
-0.5
0.1778
-1
0 0.2 0.3 1 0 0.2 0.3 1
Frequency in pi units Frequency in pi
Magnitude Response in dB Group Delay
15
0
-1 12
samples
9
-15 6
1 1
0.8913 0.8913
0.1778 0.1778
0
-1 0
-1
-15 -15
pi units
0
-0.5
0.1778
-1
0 0.46 0.6 1 0 0.46 0.6 1
Frequency in pi units Frequency in pi
Magnitude Response in dB Group Delay
10
0
-1 8
samples
6
-15 4
pi units
0
-0.5
0.1778
-1
0 0.2 0.4 0.5 0.7 1 0 0.2 0.4 0.5 0.7 1
Frequency in pi units Frequency in pi
Magnitude Response in dB Group Delay
15
0
12
-20
samples
-40 9
-60 6
-80 3
-100
0 0.2 0.4 0.5 0.7 1 0 0.2 0.4 0.5 0.7 1
Frequency in pi units Frequency in pi units
return
Magnitude Response Phase Response
1
1
0.8913
0.5
pi units
0
-0.5
0.1
-1
0 0.250.35 0.650.75 1 0 0.250.35 0.650.75 1
Frequency in pi units Frequency in pi
Magnitude Response in dB Group Delay
10
0
8
-10
samples
6
-20 4
-30 2