Ch9_IIR Digital Filter Design
description
Transcript of Ch9_IIR Digital Filter Design
![Page 1: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/1.jpg)
Chapter 9 IIR Digital Filter Design
Preliminary Consideration
IIR Digital Filter Design Methods
MATLAB Functions in IIR Filter Design
![Page 2: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/2.jpg)
Filter Design Objective Objective - Determination of a realizable
transfer function G(z) approximating a given frequency response specification is an important step in the development of a digital filter.
If an IIR filter is desired, G(z) should be a stable real rational function.
Digital filter design is the process of deriving the transfer function G(z).
![Page 3: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/3.jpg)
9.1 Preliminary Considerations
These are two issues that need to be answered before one can develop the digital transfer function G(z).
The first and foremost issue is the develop-ment of a reasonable filter frequency response specification.
The second issue is to determine whether an FIR or an IIR digital filter is to be designed.
![Page 4: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/4.jpg)
9.1.1 Digital Filter Specifications
Usually, either the magnitude and/or the phase response is specified for the design of digital filter for most applications;
In most practical applications, the problem of interest is the development of a realizable approximation to a given magnitude response specification.
We restrict to the magnitude approximation problem in this chapter.
There are four basic types of ideal filters with magnitude responses.
![Page 5: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/5.jpg)
Digital Filter Specifications
The magnitude response |G(ej)| of a digital lowpass filter may be given as indicated below:
p - passband edge frequency.
s - stopband edge frequency.
p - peak ripple in the passband.
s - peak ripple in the stopband.
![Page 6: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/6.jpg)
As indicated in the figure, in the passband, defined by 0p, we require that |G(ej)|1 with an error p, i.e.,
1- p |G(ej)| 1+ p, | | p
In the stopband, defined by s , we require that |G(ej)|0 with an error s , i.e.,
|G(ej)| s, s || Since G(ej) is a periodic function of ω, and |G(ej
)| of a real-coefficient digital filter is an even function of ω.
As a result, filter specifications are given only for the frequency range 0 ||.
![Page 7: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/7.jpg)
Digital Filter Specifications
Specifications are often given in terms of loss function:
A()= -20log10 |G(ej)| dB Peak passband ripple:
p= -20log10 (1- p ) dB Minimum stopband attenuation:
s= -20log10 (s ) dB
![Page 8: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/8.jpg)
Digital Filter Specifications
Magnitude specifications may alternately be given in a normalized form as indicated below:
![Page 9: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/9.jpg)
Digital Filter Specifications
Here, the maximum value of the magnitude in the passband is assumed to be unity.
1/(1+2) - Maximum passband deviation, given by the minimum value of the magnitude in the passband.
1/A - Maximum stopband magnitude;Minimum stopband attenuation is: 20log10(A) dB.
![Page 10: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/10.jpg)
Digital Filter Specifications
For the normalized specification, maximum value of the gain function or the minimum value of the loss function is 0 dB.
Maximum passband attenuation:
210max 1log20 dB
• For p<<1, it can be shown that:
)21(log20 10max p dB
![Page 11: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/11.jpg)
Digital Filter Specifications In practice, passband edge frequency Fp and stop
band edge frequency Fs are specified in Hz. For digital filter design, normalized angular edge
frequencies need to be computed from specifications in radians using:
TFF
F
F pT
p
T
pp
2
2
TFFF
F sT
s
T
ss 2
2
![Page 12: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/12.jpg)
Digital Filter Specifications
Example:
Let Fp=7 kHz, Fs= 3 kHz, and FT=25 kHz Then
3
p 3
2 (7 10 )0.56
25 10
3
3
2 (3 10 )0.24
25 10s
![Page 13: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/13.jpg)
9.1.2 Selection of the Filter Type
The objective of digital filter design is to develop a casual, stable transfer function G(z) which meets the FR specifications.
Whether IIR or FIR should be selected?• IIR: lower order to reduce computational
complexity; but must be stable.• FIR: linear phase; always stable; but
higher order.
![Page 14: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/14.jpg)
9.1.3 Basic Approach to IIR Digital Filter Design Most common approach to IIR filter design:
Transform it into the desired digital filter transfer function G(z).
Convert the digital filter specifications into analog lowpass prototype one.
Determine the analog lowpass filter Ha(s) meeting these specifications.
![Page 15: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/15.jpg)
Basic Approach to IIR Digital Filter Design Why this approach has been widely used:
(1) Analog approximation techniques are highly advanced.(2) They usually yield closed-form solutions.(3) Extensive tables are available for analog filter design.(4) Many applications require digital simulation of analog systems.
![Page 16: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/16.jpg)
Basic Approach to IIR Digital Filter Design
The basic idea is to apply a mapping from s-domain 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.
![Page 17: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/17.jpg)
9.1.4 Estimation of the Filter Order After the type of the digital filter has been select
ed, the next step in the filter design process is to estimate the filter order N.
For the design of IIR LPF, the order of Ha(s) is estimated from its specifications using the appropriate formula given in Eq.(4.35),(4.43), or (4.54), depending on which approximation desired.
Then the order of G(z) can be determined automatically from the transformation being used to convert Ha(s) into G(z).
![Page 18: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/18.jpg)
4.4 Analog Filter Design --Review
Butterworth approximation Chebyshev approximation
Type1 Type2 Elliptic approximation Linear-phase approximation
![Page 19: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/19.jpg)
Analog Filter Design Butterworth Approximation
The magnitude-square response of an N-th order analog lowpass Butterworth filter is given by:
Nc
a jH 22
)/(1
1)(
The Butterworth lowpass filter thus is said to have a maximally-flat magnitude at = 0.
![Page 20: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/20.jpg)
Butterworth Approximation Gain in dB is: G()=10l
og10|Ha(j)|2 As G(0)=0 and
G(c)=10log10(0.5) -3 dB c is called 3-dB
cutoff frequency. Typical magnitude respo
nses with c =1 are shown in right.
0 1 2 30
0.2
0.4
0.6
0.8
1
Mag
nitu
de
Butterworth Filter
N = 2N = 4N = 10
![Page 21: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/21.jpg)
Butterworth Approximation
Two parameters completely characterizing a Butterworth lowpass filter are c and N.
These are determined from the specified bandedges p and s , and minimum passband magnitude 1/(1 + 2) , and maximum stopband ripple 1/A.
![Page 22: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/22.jpg)
Butterworth Approximation Ωc and N are thus determined from:
2a 2 2
1 1| H ( ) |
1 ( / )s Ns c
jA
2a 2 2
1 1| H ( ) |
1 ( / ) 1p Np c
j
Solving the above, we get:2 2
10 10 1
10 10
log [(A 1) / ] log (1/ )1N=
2 log ( / ) log (1/ )s p
k
k
![Page 23: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/23.jpg)
Butterworth Approximation
Transfer function of an analog Butterworth lowpass filter is given by:
1
0 1
( )( )
( )
N Nc c
a N NN lN
l ll l
CH s
D s s d s s p
Where:
[ ( 2 1) / 2 ] , 1j N l Nl cp e l N
Denominator DN(s) is known as the Butterworth polynomial of order N.
![Page 24: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/24.jpg)
Example: Determine the lowest order of a Butterworth lowp
ass filter with a 1-dB cutoff frequency at 1 kHz and minimum attenuation of 40 dB at 5 kHz.
Now, 10log10[1/(1+ε2)]= -1, Which yields ε2=0.25895;
And 10log10(1/A2)=-40, Which yields A2=10000;
Therefore 1/k1=√(A2-1)/ε=196.51334And 1/k=Ωs/Ωp=5Hence N=log10(1/k1)/log10(1/k)=3.2811Choose N=4.
![Page 25: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/25.jpg)
Analog Filter Design
Chebyshev ApproximationThe magnitude-square response of an N-th order analog lowpass Type 1 Chebyshev filter is given by:
)/(1
1)( 22
2
pNa
TsH
where TN() is the Chebyshev polynomial of order N:
1),coshcosh(
1),coscos()(
1
1
N
NTN
![Page 26: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/26.jpg)
Chebyshev Approximation
Typical magnitude response plots of the analog lowpass Type 1 Chebyshev filter are shown below:
![Page 27: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/27.jpg)
Chebyshev Approximation
If at = s the magnitude is equal to 1/A, then
2222 1
)/(11)(
ATjH
psNsa
)/1(cosh)/1(cosh
)/(cosh)/1(cosh
11
1
1
21
kkA
Nps
• Order N is chosen as the nearest integer greater than or equal to the above value.
Solving the above we get:
![Page 28: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/28.jpg)
Chebyshev Approximation
The magnitude-square response of an N-th order analog lowpass Type 2 Chebyshev (also called inverse Chebyshev) filter is given by:
22
2
)/(
)/(1
1)(
sN
psNa
T
TjH
where TN() is the Chebyshev polynomial of order N.
![Page 29: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/29.jpg)
Chebyshev Approximation Typical magnitude response plots of the analog lo
wpass Type 2 Chebyshev filter are shown below:
![Page 30: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/30.jpg)
Chebyshev Approximation The order N of the Type 2 Chebyshev filter is det
ermined from given , s, and A using:
)/1(cosh)/1(cosh
)/(cosh)/1(cosh
11
1
1
21
kkA
Nps
6059.2)/1(cosh
)/1(cosh1
11
k
kN
Example - Determine the lowest order of a Chebyshev lowpass filter with a 1-dB cutoff frequency at 1 kHz and a minimum attenuation of 40 dB at 5 kHz.
![Page 31: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/31.jpg)
Analog Filter Design Elliptic Approximation
The square-magnitude response of an elliptic lowpass filter is given by:
)/(1
1)( 22
2
pNa
RjH
where RN() is a rational function of order N satisfying RN(1/)=1/ RN() , with the roots of its numerator lying in the interval 0< <1 and the roots of its denominator lying in the interval 1< < .
![Page 32: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/32.jpg)
Elliptic Approximation
Typical magnitude response plots are shown below:
![Page 33: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/33.jpg)
Elliptic ApproximationFor given p, s, , and A, the filter order can be estimated using:
)/1(log)/4(log2
10
110
k
N
21' kk
)'1(2'1
0 kk
130
90
500 )(150)(15)(2
where
![Page 34: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/34.jpg)
Elliptic ApproximationExample Determine the lowest order of a elliptic lowpass f
ilter with a 1-dB cutoff frequency at 1 kHz and a minimum attenuation of 40 dB at 5 kHz.
Note: k = 0.2 and 1/k1=196.5134Substituting these values we get:
k’=0.979796, 0=0.00255135, =0.0025513525
hence N = 2.23308Choose N = 3.
![Page 35: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/35.jpg)
9.2 The Design Methods of IIR Filter
The core idea of design this kind of filter is to convert an analog transfer function H
a(s) into a digital one G(z). There are two common methods:(1) The impulse invariance method
(Problem9.6—P.517)(2) The bilinear transformation method
(9.2—P.494)
![Page 36: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/36.jpg)
Supplement: The Impulse Invariance Method
The Main Ideal:
If a prototype causal analog transfer function Ha(s) is wanted, and its impulse response is ha(t), the impulse response of the digital transfer function G(z) satisfies:
)()( nTxnx a )()( nTyny a)(][ nThng a
)(txa )(tya)(tha
[ ] ( )ag n h nT n=0,1,2,…
![Page 37: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/37.jpg)
The Relationship Between ZT and LT
LT-used in continuous signal analysis
ZT- used in discrete signal analysis
^ ^
( ) [ ( )]
( ) [ ( )]
a a
a a
X s L x t
X s L x t
^
( ) ( ) | ( ) ( )a a t nT an
x t x t x nT t nT
^
( )ax t
Given continuous signal xa(t) , sampled signal , their LT are:
![Page 38: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/38.jpg)
^
( ) ( ) ( ) sta a
n
X s x nT t nT e dt
n
sta dtenTtnTx )()(
n
nsTa enTx )(
n
nznxzX ][)(
sTz eSo we can see: when , ZT=LT.
The relationship between them is a kind of mapping from s-plane to z-plane.
)()( nTxnx aThe ZT of the sampled sequence
![Page 39: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/39.jpg)
sTez
z-Planej
Tjj ee
The unit circle
T/
T/
s-Plane
kaez
aaa
TjkSH
TzG
nThngthLSH
sT )2
(1
|)(
),(][)),(()(,if
k
aj
TjkjH
TeG )
2(
1)(
ka T
kjH
T)
2(
1
![Page 40: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/40.jpg)
Discussion: The mapping satisfies the essential properties ( jΩ-ax
is mapped onto the unit circle, stable region in s-plane 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,
If is not band-limited, obtained by this method is overlapped in frequency-domain.
)(),(1
)( jHT
eG aj
)( jH a )( jeG
![Page 41: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/41.jpg)
The Design Steps:
(1)Expand Ha(s) into partial-fractional:
N
k k
ka ss
AsH
1
)( )0)(Re( max ks
N
kTsk
ze
AzG
k1
11)(
N
k
tskaa teAsHLth k
1
1 )()]([)( 1
[ ] ( ) [ ]k
Ns nT
a kk
g n h nT A e n
1 1
0 1 1 0
( ) [ ] ( ) ( )k k
N Ns T s Tn n n
k kn n k k n
G z g n z A e z A e z
)()( nThng a(2)Based on , we can get:
Proof:
![Page 42: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/42.jpg)
∵From equation:
[ ] ( )ag n Th nT
N
kTsk
ze
TAzG
k1
11)(
We can see the frequency response is inverse proportion of T. So we should amend it by:
)(),(1
)( jHT
eG aj
(3)Usually, we scale T to , and get:( )G z
![Page 43: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/43.jpg)
Discussion: Ha(s) and G(z)
The single pole sk in s-plane mapping into the single pole z=eskT in z-plane.
They both have the same coefficients Ak .
If the analog filter is stable, that is Re[sk]<0 , then after conversion, the poles meet:|eskT|<1, so the digital filter is stable.
The impulse invariance method only ensure relationship of the poles between s and z-plane; but for zeros, they don’t exist.
![Page 44: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/44.jpg)
Using the impulse invariace method,
we get:
2,1 21 ss
1 2 1
2 2( )
1 1T TG z T T
e z e z
2 1
2 1 3 2
2 ( )
1 ( )
T T
T T T
T e e z
e e z e z
2
2
1
2)(
sssH a
Example:
If , the sampling period is T.
Then:
23
2)(
2
sssH a
![Page 45: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/45.jpg)
Note : is overlapped in the frequncy-domain. )( jeG
)( jH a
c
)( jeG
2
21
1
04979.05032.01
4651.0)(
zz
zzG
When T=1 ,
![Page 46: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/46.jpg)
9.2.1 The Bilinear Transformation Method
Transformation theory:For conquering the effect of multi-value mapping from s to z-plane, we want to find a new mapping:
0
j
1j
1
]Im[zj
]Re[z0 0
T/
T/-1 1
s-plane -plane z-plane1s
![Page 47: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/47.jpg)
The Bilinear Transformation Method
The bilinear transformation from s to z-plane:
1
1
1
12
z
z
Ts
So, The relation between G(z) and Ha(s) is :
)1
1(
21
1|)()(
z
z
Ts
a sHzG
Note: the parameter T has no effect on the expression for G(z), and we can choose T=2 to simplify the design procedure.
![Page 48: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/48.jpg)
Discussion:
Inverse bilinear transformation for T=2 is:
2 220 0 0 0
2 20 0 0 0
(1+ ) (1+ )z= | |
(1- ) (1- )
jz
j
For s=σ 0+jΩ0
Thus, σ0= 0 → |z| = 1
σ0< 0 → |z| < 1
σ0> 0 → |z| > 1
s
sz
1
1
This mapping also satisfies the essential properties.
![Page 49: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/49.jpg)
For z=ej with T = 2 we have:
)(
)(
11
2/2/2/
2/2/2/
jjj
jjj
j
j
eee
eee
eej
)2/tan()2/cos(2
)2/sin(2
jj
So, = tan(/2)
This introduces a distortion in frequency axis called frequency wrapping.
![Page 50: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/50.jpg)
sp
sp
Thus, we must first prewarp the critical bandedge frequencies and to find their analog equivalents and by using following equation:
= tan(/2)
![Page 51: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/51.jpg)
The design steps:
(1) Prewarp (p, s) to find their analog equivalents (p, s);
(2) Design the analog filter Ha(s);(3) Design the digital filter G(z) by applying bilinear transformation to Ha(s);
Bilinear transformation preserves the magnitude response of analog filter only if piecewise constant magnitude.
Bilinear transformation does not preserve phase response of analog filter.
![Page 52: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/52.jpg)
9.2.2 Design of Low-Order Digital Filters
• Example – Consider:
c
ca ssH
)(
Applying bilinear transformation to the above we get the transfer function of a first-order digital lowpass Butterworth filter
)1()1()1(
)()( 11
1
11
11
zzz
sHzGc
c
z
zsa
![Page 53: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/53.jpg)
Design of Low-Order Digital Filters
Rearranging terms we get:
1
1
11
21)(
zzzG
)2/tan(1)2/tan(1
11
c
c
c
c
where
![Page 54: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/54.jpg)
Design of Low-Order Digital Filters
where |Ha(j0)| = 1 and |Ha(j0)| = |Ha(j)| = 0
0 is called the notch frequency
If |Ha(j2)| = |Ha(j1)| =1/2 then B = 2 - 1 is the 3-dB notch bandwidth
22
22
)(o
oa
sBs
ssH
Consider the second-order analog notch transfer function:
![Page 55: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/55.jpg)
Then1
1
11)()(
zzsa sHzG
22122
22122
)1()1(2)1(
)1()1(2)1(
zBzB
zz
ooo
ooo
21
21
)1(21
21
2
1
zz
zz
2
2
1 1 tan( / 2)
1 1 tan( / 2)o
o
B B
B B
oo
o
o
o cos
)2/(tan1
)2/(tan1
1
12
2
2
2
where
![Page 56: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/56.jpg)
Example - Design a 2nd-order digital notch filter operating at a sampling rate of 400 Hz with a notch frequency at 60 Hz, 3-dB notch bandwidth of 6 Hz Thus 0 = 2(60/400) = 0.3
Bw = 2(6/400) = 0.03 From the above values we get: = 0.90993
= 0.587785
![Page 57: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/57.jpg)
The gain and phase responses are shown below
21
21
21
21
90993.01226287.11
954965.01226287.1954965.0
)1(21
21
2
1)(
zz
zz
zz
zzzG
Thus
![Page 58: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/58.jpg)
9.3 Design of Lowpass IIR Digital Filters
dBdBeG j 5.0,5.0)(log20 max25.0
10
dBdBeG sj 15,15)(log20 55.0
10
S
55.0S
25.0p
Consider G(z) with a maximally flat magnitude , with a passband ripple not exceeding 0.5dB; , with the minimum stopband attenuation at the stopband edge frequency is 15dB.
1)( 0 jeGBase on this requirement, if we get:
![Page 59: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/59.jpg)
(1) Prewarpping:
4142136.0)2
25.0tan()
2tan(
PP
1708496.1)2
55.0tan()
2tan(
SS
1. The Bilinear Translation Method
(2) Design the parent analog filter Ha(s)
1220185.02
622777.312 Astopband attenuation 15dB
passband ripple 0.5dB
![Page 60: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/60.jpg)
Using Eq.(4.31),(4.32),
841979.15121
A
k
8266809.24142136.0
1708496.1
p
sk
6586997.2)8266814.2(log
)841979.15(log
)/1(log
)/1(log
10
10
10
110 k
kN
The least order of Butterworth LPF is: N=3
![Page 61: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/61.jpg)
Using Eq.(4.34a) we get the 3-dB
cutoff frequency:
588148.0)(419915.1)(1
PPN
c
)588148.0
()()(s
Hs
HsH anc
ana
122
1
)1)(1(
1)(
232
sssssssH an
Then the denormalized lowpass Butterworth TF is:
The third-order normalized lowpass Butterworth transfer function with c=1:
![Page 62: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/62.jpg)
1
1
1
1|)()(
z
zs
a sHzG
)3917468.06762858.01)(2593284.01(
)1(0662272.0211
31
zzz
z
KHzff SP
c 102
Note: If this digital filter is used to process an analog signal, it has the equivalent cutoff frequency at:
KHzfS 40Where sampling frequency
(3) Design the digital filter G(z) by applying bilinear transformation to Ha(s):
![Page 63: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/63.jpg)
2. The Impulse Invariance Method
The third-order lowpass Butterworth transfer function which has 3-dB frequency at .
c
3
2 2
3 3
( )
( )( )( )
ca
j j
c c c
H s
s s e s e
We can get the poles and represent it as
2 3
1( ) ( )
1 2 2( ) ( )a an
c
c c c
sH s H
s s s
![Page 64: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/64.jpg)
/ 6 / 6( / 3) ( / 3)( )
(1 3) / 2 (1 3) / 2
j jc c c
ac c c
e eH s
s s j s j
It is partial-fractional expressed as:
Then we get digital transfer function as:/ 6 / 6
1 (1 3) / 2 (1 3) / 21 1
( / 3) ( / 3)( )
1 1 1c c c
j jc c c
j j
e eG z
e z e z e z
/ 4C 1
1 1 2
0.785398 0.785398 0.604884( )
1 0.455938 1 1.0500756 0.455938
zG z
z z z
![Page 65: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/65.jpg)
1 2
1 2 3
0.13825 0.08230( )
1 1.50601 0.93471 0.20788
z zG z
z z z
Finally,
Discussion: Magnitude and gain responses of G(z) derived by The Impulse Invariance Method and The Bilinear Translation Method are shown below:
![Page 66: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/66.jpg)
The Impulse Invariance Method
The Bilinear Translation Method
![Page 67: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/67.jpg)
Ex: Use a IIR digital filter to implement a Butterworth 3rd-order LPF with sampling interval cutoff frequency:
. 1kHzfc , 250 sT
① Determine normalized frequency
36 104
10250
T
② Determine normalized cutoff frequency
210
4
10210
4
2 33
3
cc
f
③ Prewarping frequency to find the equivalent analog cutoff frequency
14
tan2
tan c
c
④ Choose the analog prototype filter
122
1
1)(2)(2)(
1)(
2323
SSSSSS
SH
ccc
a
![Page 68: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/68.jpg)
⑤ Determine the transfer function of the desired digital filter using the bilinear transformation
2
321
1
1
31
1
331
6
1)()(
1
1
Z
ZZZSHZG
Z
ZS
a
⑥ Choose filter structure
1Z
1Z
1Z
x[n] y[n]
1/6
-1/3
3
3
![Page 69: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/69.jpg)
9.4 Design of Highpass, Bandpass and Bandstop IIR Digital Filters
There are two approaches can be followed:
(1)Design other type analog filters firstly, then transform it into digital ones : Step1Step5
(2)Design digital lowpass filter firstly, then transform it into other type digital filters: Step1Step5
Please look at P.501 the detailed design procedure and examples.
![Page 70: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/70.jpg)
9.5 Spectral Transformations of IIR filters
Solving:to modify the characteristics of a filter to meet the new specifications without repeating the filter design procedure.
There are several conditions:
(1)Lowpass-to-lowpass transformation.
(2)Other transformation.
Please look at P.505 the detailed design procedure and examples.
![Page 71: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/71.jpg)
Design of a Type 1 Chebyshev IIR digital highpass filter, Specifications:
Fp=700Hz, Fs = 500Hz,
p=1 dB, s=32dB, FT=2 kHz Normalized angular bandedge frequencies
p =2Fp/ FT= 2700/2000=0.7 s = 2Fs/ FT= 2500/2000=0.5
Example 9.3
![Page 72: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/72.jpg)
Analog lowpass filter specifications:
p = 1, s = 1.926105 , p=1 dB, s=32 dB
9626105.1)2/tan(ˆ pp
0.1)2/tan(ˆ ss
Prewarping these frequencies we get
For the prototype analog lowpass filter choose
p = 1
ˆ
ˆppUsing we get s = 1.962105
![Page 73: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/73.jpg)
MATLAB code fragments used for the design[N, Wn] = cheb1ord(1, 1.9626105, 1, 32, ’s’)[B, A] = cheby1(N, 1, Wn, ’s’);[BT, AT] = lp2hp(B, A, 1.9626105);[num, den] = bilinear(BT, AT, 0.5);
![Page 74: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/74.jpg)
9.6 IIR Digital Filter Design Using MATLAB
Order Estimation:
buttord, cheb1ord, cheb2ord, ellipord. Filter Design
butter, cheby1, cheby2, ellip. Filter Test
freqz.
![Page 75: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/75.jpg)
[ N, Wn ] = buttord ( Wp, Ws, Rp, Rs )
[ N, Wn ] = cheb1ord ( Wp, Ws, Rp, Rs )
[ N, Wn ] = cheb2ord ( Wp, Ws, Rp, Rs ) [ N, Wn ] = ellipord ( Wp, Ws, Rp, Rs )
⑴ Determine filter order N , frequency scaling factor Wn.
![Page 76: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/76.jpg)
[ b, a ] = cheby1 ( N, Rp, Wn )
[ b, a ] = cheby2 ( N, Rs, Wn )
[ b, a ] = ellip ( N, Rp, Rs, Wn )
⑵ Determine the coefficients of the transfer function.
[ b, a ] = butter ( N, Wn )
![Page 77: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/77.jpg)
Example:
Design a IIR lowpass filter:
Sampling frequency:4000Hz
Passband frequency:300Hz
Stopband frequency:500Hz
Peak passband ripple:1dB
Minimum stopband attenuation:80dB
![Page 78: Ch9_IIR Digital Filter Design](https://reader036.fdocuments.in/reader036/viewer/2022081504/563dbb9c550346aa9aaeaadc/html5/thumbnails/78.jpg)
Homework:
9.2, 9.4, 9.9(a), 9.11, 9.12, 9.16
M9.1, M9.2, M9.10