Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Preliminary Consideration
IIR Digital Filter Design Methods
MATLAB Functions in IIR Filter Design
p - passband
edge frequency.
s - stopband
edge frequency.
p - peak ripple
in the passband.
s - peak ripple
in the stopband.
dB
max 20 log10 1
dB
2 FpT
FT
FT
s 2 Fs
s
2 Fs T
FT
FT
Example:
Let Fp=7 kHz, Fs= 3 kHz, and FT=25 kHz
Then
2 (7 10 )
p
0.56
3
25 10
3
2 (3 10 )
s
0.24
3
25 10
3
The basic idea is to apply a mapping from sdomain to the z-domain so that the essential
properties of the analog frequency response
are preserved.
This implies that the mapping should be:
(1) The imaginary axis in the s-plane be mapped
onto the unit circle of the z-plane.
(2) A stable analog transfer function be transferred
into a stable digital transfer function.
Butterworth approximation
Chebyshev approximation
Type1 Type2
Elliptic approximation
Linear-phase approximation
Butterworth Approximation
The magnitude-square response of an
N-th order analog lowpass Butterworth
filter is given by:
1
2
H a ( j )
2N
1 ( / c )
Butterworth Approximation
Gain in dB is:
G()=10log10|Ha(j)|2
As G(0)=0 and
G( c)=10log10(0.5) -3 dB
c is called 3-dB
cutoff frequency.
Typical magnitude
responses with c =1 are
shown in right.
ButterworthFilter
N=2
N=4
N=10
Magnitude
1
0.8
0.6
0.4
0.2
0
Butterworth Approximation
Butterworth Approximation
1
1
| H a ( j p ) |
2N
1 ( p / c )
1 2
2
1
1
| H a ( j s ) |
2
2N
1 ( s / c )
A
Solving the above, we get:
2
2 log10 ( s / p )
log10 (1/ k )
Butterworth Approximation
Transfer function of an analog Butterworth
lowpass filter is given by:
C
H a (s)
DN ( s )
Where:
N
c
N 1
s dl s
N
l 0
pl c e
N
c
(s p )
l 1
j [ ( N 2 l 1) / 2 N ]
, 1 l N
Example:
Therefore 1/k1=(A2-1)/=196.51334
And 1/k=s/p=5
Hence N=log10(1/k1)/log10(1/k)=3.2811
Choose N=4.
Chebyshev Approximation
The magnitude-square response of an N-th
order analog lowpass Type 1 Chebyshev filter is
given by:
1
2
H a (s)
1 2TN2 ( / p )
where TN() is the Chebyshev polynomial of
order N:
cos( N cos 1 ),
1
TN ()
cosh( N cosh ),
Chebyshev Approximation
Typical magnitude response plots of the analog
lowpass Type 1 Chebyshev filter are shown below:
Chebyshev Approximation
If at = s the magnitude is equal to 1/A, then
2
H a ( j s )
1
1
1 2TN2 ( s / p ) A2
1
cosh ( s / p )
cosh 1 (1 / k )
Order N is chosen as the nearest integer
Chebyshev Approximation
The magnitude-square response of an N-th
order analog lowpass Type 2 Chebyshev (also
called inverse Chebyshev) filter is given by:
H a ( j )
TN ( s / p )
1
T
(
)
N s
Chebyshev Approximation
Chebyshev Approximation
cosh ( A 1 / ) cosh (1 / k1 )
N
1
cosh ( s / p )
cosh 1 (1 / k )
1
cosh (1 / k )
2.6059
Elliptic Approximation
The square-magnitude response of an elliptic
lowpass filter is given by:
1
H a ( j )
1 2 RN2 ( / p )
2
Elliptic Approximation
Typical magnitude response plots are shown below:
Elliptic Approximation
For given p, s, , and A, the filter order
can be estimated using:
2 log10 (4 / k1 )
N
log10 (1 / )
where
k' 1 k 2
1
k
'
0
2(1 k ')
5
9
13
0 2( 0 ) 15( 0 ) 150( 0 )
Elliptic Approximation
Example
hence N = 2.23308
Choose N = 3.
ha (t )
g[n] ha (nT)
y a (t )
y(n) ya(nT)
X a ( s ) L[ x a (t )]
^
Q x a (t ) xa (t ) |t nT
(nT ) (t nT )
X a (s)
xa (nT ) (t nT )e st dt
xa ( nT ) (t nT )e st dt
nsT
x
(
nT
)
e
a
n
x
[
n
]
z
s-Plane
/T
z-Plane
/ T
ze
e j e jT
The unit circle
sT
2
1
H
(
j
jk
)
a
T
T
k
k 2
Ha ( j
)
T
k
Discussion:
The mapping satisfies the essential properties ( jaxis mapped onto the unit circle, stable region in splane mapped into the stable region in z-plane).
The relation of the normalized angular frequency
and the analog angular frequency is = T .
when Nyquist theorem is satisfied,
1
j
G (e )
H a ( j), ( )
T
If H a ( j) is not band-limited, G (e j ) obtained by
this method is overlapped in frequency-domain.
Ak
H a (s)
k 1 s sk
(Re( sk ) max 0)
Ak
G( z)
s k T 1
1
e
z
k 1
Proof:
G ( z )
k 1
k 1
g[n]z n Ak (e sk T z 1 ) n Ak (e sk T z 1 ) n
n 0 k 1
k 1
n0
TAk
G( z)
s k T 1
z
k 1 1 e
From
equation:
G (e
1
)
H a ( j), ( )
T
Example:
If
H a ( s)
Then:
2
2
s 3s 2
2
2
H a (s)
s 1 s 2
s1 1, s 2 2
1 (e 2T e T ) z 1 e 3T z 2
When T=1
0.4651z 1
G( z)
1
2
1 0.5032 z 0.04979 z
j
G
(
e
)
Note
domain.
G ( e j )
H a ( j )
Transformation theory:
For conquering the effect of multi-value
mapping from s to z-plane, we want to find a
new mapping:
j
s-plane
j1
j Im[z ]
/T
1
/T
s1 -plane
-1
z-plane
Re[z ]
2 1 z
s
1
T 1 z
G ( z ) H a ( s) |
2 1 z 1
s (
)
1
T 1 z
Discussion:
1 s
z
1 s
(1+ 0 ) j0
(1+ 0 )
2
z=
| z |
2
(1- 0 ) j0
(1- 0 )
2
Thus, 0= 0 |z| = 1
0< 0 |z| < 1
0> 0 |z| > 1
2
0
2
0
This mapping
also satisfies the
essential
properties.
j 1 e j
1 e
So, = tan(/2)
e j / 2 ( e j / 2 e j / 2 )
j / 2 j / 2 j / 2
e
(e
e
)
j 2 sin( / 2)
j tan( / 2)
2 cos( / 2)
This introduces a
distortion in
frequency axis called
frequency wrapping.
Example Consider:
c
H a (s)
s c
G ( z ) H a ( s ) s 1 z 1
1 z 1
c (1 z 1 )
1
1
(1 z ) c (1 z )
G ( z ) 1 1 z 1
2 1 z
where
1 c 1 tan(c / 2)
1 c 1 tan(c / 2)
Then
G ( z ) H a ( s ) s 1 z
1 z 1
(1 o2 ) 2(1 o2 ) z 1 (1 o2 ) z 2
(1 o2 B) 2(1 o2 ) z 1 (1 o2 B) z 2
1
1 2 z 1 z 2
2 1 2 (1 ) z 1 z 2
where
1 o2 B 1 tan( B / 2)
2
1 o B 1 tan( B / 2)
1 o2 1 tan 2 (o / 2)
cos o
2
2
1 o 1 tan (o / 2)
= 0.90993
= 0.587785
Thus
1
1 2 z 1 z 2
G( z)
1
2
2 1 2 (1 ) z z
1
1 1.1226287 z 1 0.90993 z 2
The gain and phase responses are shown below
20 log10 G (e
j 0.25
20 log10 G (e
j 0.55
) 15dB, s 15dB
0.1220185
2
A 31.622777
2
Using Eq.(4.31),(4.32),
s 1.1708496
k
2.8266809
p 0.4142136
k1
15.841979
A2 1
2.6586997
log10 (1 / k ) log10 (2.8266814)
The least order of Butterworth LPF is:
N=3
P 1.419915( P ) 0.588148
) H an (
0.588148
1 z 1
1 z 1
0.0662272(1 z 1 ) 3
s
1
H a ( s ) H an ( )
s
s 2
s 3
c
1 2
2( ) ( )
c
c
c
We can get the poles and represent it as
H a (s)
( s c )( s c e
3
c
2
j
3
)( s c e
2
3
s c s c (1 j 3) / 2 s c (1 j 3) / 2
c 1
c (1 j 3 ) / 2 1
1 e z
1 e
z
1 e c (1 j 3 ) / 2 z 1
C / 4
0.785398
0.785398 0.604884 z 1
G( z)
1
1 0.455938 z
1 1.0500756 z 1 0.455938 z 2
Finally,
0.13825 z 1 0.08230 z 2
G( z)
1
2
3
1 1.50601z 0.93471z 0.20788 z
Discussion:
Magnitude and gain responses of G(z) derived by
The Impulse Invariance Method and The
Bilinear Translation Method are shown
below:
6
T 250 10 10 3
4
f c 1 kHz .
3
3
c
10
10
4
4
2
Prewarping frequency to find the equivalent analog cutoff
frequency
c
c tan
tan
1
2
4
Choose the analog prototype filter
H a (S )
1
S 3
S 2
S
(
) 2(
) 2(
) 1
c
c
c
1
S 3 2S 2 2S 1
Determine the transfer function of the desired digital filter using the
bilinear transformation
G(Z ) H a (S )
1 Z 1
S
1 Z 1
1 1 3Z 1 3Z 2 Z 3
1 2
6
1 Z
3
-1/3
Z 1
1/6
y[n]
Example 9.3
p tan( p / 2) 1.9626105
s tan(s / 2) 1.0
p
p
Using
we get s = 1.962105
Example:
Design a IIR lowpass filter:
Sampling frequency:4000Hz
Passband frequency:300Hz
Stopband frequency:500Hz
Peak passband ripple:1dB
Minimum stopband attenuation:80dB
Homework:
9.2, 9.4, 9.9(a), 9.11, 9.12, 9.16
M9.1, M9.2, M9.10