IIRDesign
-
Upload
luong-nguyen-ba -
Category
Documents
-
view
215 -
download
0
Transcript of IIRDesign
-
8/6/2019 IIRDesign
1/6
IIR FILTER DESIGN EXAMPLE
These notes summarize the design procedure for IIR filters as discussed in class on November 2.
Introduction:
We are discussing how to design a discrete-time lowpass filter using both the impulse invariance methodand the bilinear transform method. The specs for the filter to be designed are
Passband cutoff frequency:
Stopband cutoff frequency:
Passband ripple1: dB,
Stopband attenuation: dB,
In terms of the parameters and , this means that
For convenience we define two new parameters and that are closely related to and as follows:
1. Note that the values of passband and stopband attenuation are given in dB. Ifx has the dimen-sions of amplitude or magnitude (as opposed to energy or power), the value ofx expressed in dBwould be
DSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-IDSP-I
Digital Signal Processing I (18-791)Fall Semester, 2005
!p 0.15"=
!s 0.35"=
3!dB! H ej!( ) 0# # ! !p#
20log10 x( )
H ej!
( ) 20# !s
! "# #
$1 $2
1 $1 103 20
0.7079= =
$2 1020 20/ 0.1= =
k1 k2 $1 $2
k11
1 $1( )
2---------------------- 1% 0.9953=
-
8/6/2019 IIRDesign
2/6
IIR filter design example -2- Fall, 2005
Finally, we are designing our filter by transforming the frequency response of a continuous-time Butter-worth filter. As you will recall, the Butterworth filter has the transfer function
The parameterN
specifies the number of poles in the prototype filter, and the parameter specifies the
critical cutoff frequency. Note that the magnitude response of the Butterworth filter decreases monotoni-cally with increasingN,
that the falloff in response as we transit from passband to stopband becomes
sharper asN
increases, and that equals when and when for all val-
ues ofN.
As you will recall from class, a Butterworthfi
lter with parametersNand hasN
poles that fall in the lefthalf of the s-
plane, in complex conjugate locations along a circle of radius separated by angles of
.
Design procedure using impulse invariance
Determining design parameters
Using the impulse invariance design procedure, we have noted that the relation between frequency in the
continuous-time and discrete-time domains is , where Tis merely a design parameter (and not
necessarily the sampling frequency). Leaving T
as an arbitrary constant for now, we obtain
At the passband edge frequency,
With a few algebraic manipulations we obtain
k21
$22
----- 1 99= =
H j&( ) 2 1
1&&c-------
' () * 2N+
----------------------------=
&c
H j&( )2
1.0 & 0= 1 2 & &c=
&c&c
" N
! &T=
&p !p T 0.47124 T= =
&s !s T 1.0996 T= =
H j&( )2 1
1&p
&c
-------' (+ ,) * 2N
+
---------------------------- 1 $1( )2
= =
&p&c-------
' (+ ,) * 2N 1
1 $1( )2
---------------------- 1 k1= =
-
8/6/2019 IIRDesign
3/6
IIR filter design example -3- Fall, 2005
Similarly, at the stopband edge frequency we have
which produces
Dividing, we obtain
or
Note that since , the design parameter Thas no effect at all on the value ofNthat is
needed. Furthermore, as expected, the value ofNspecified increases as either or decreases in mag-
nitude (which implies decreasing the ripple in the passband and/or stopband) or as the ratio
decreases (which implies a decrease in the width of the transition band).
Since the number of poles must be an integer, we round up to .
Matching the frequency response exactly at passband produces
or
(This value is slightly different from the one I gave in class.) If we were instead to match the frequencyresponse at stopband, we would obtain
or
In principle, any value of the critical frequency that satisfies would be valid. As dis-
cussed in class, we will choose the value that meets the passband spec exactly, because
this value leaves the greatest margin for error at the stopband edge. Since the impulse invariance procedurealways incurs a certain degree of aliasing, it will be expected that the actualresponse of the filter at thestopband edge will be larger than designed for. Hence, having the stopband edge response be overde-signed will leave more room for error to allow for the effects of aliasing.
H j&( )2 1
1&s
&c
-------' (+ ,) * 2N
+
---------------------------- $22
= =
&s&c-------
' (+ ,) * 2N 1
$22
----- 1 k2= =
&p &c( )2N
&s &c( )2N
-----------------------------k1
k2-----=
N1
2---
k2 k1( )log
&s &p( )log------------------------------- 2.7144= =
&s&p-------
!s T
!p T--------------
!s!p------= =
$1 $2
&s &p
N 3=
&p&c-------
' (+ ,) * 2N
k1= &c&p
k11 2N
--------------0.4716
T----------------= =
&s&c-------
' (+ ,) * 2N
k2= &c&s
k21 2N
--------------0.5112
T----------------= =
.4716
T--------------- &c0.5112
T----------------# #
&c 0.4716 T=
-
8/6/2019 IIRDesign
4/6
IIR filter design example -4- Fall, 2005
Prototype filter design
As noted above, the poles of a Butterworth filter lie in the left half of the s-plane on a circle of radius in
complex conjugate pairs separated by an angle of radians. Since there are three poles, this produces
a filter with the system function
Plugging in the value of , we obtain
and (with the help of MATLAB) we obtain numerically
Conversion to discrete-time form
Using partial fractions we can rewrite the system function of the continuous-time prototype filter as
where the parameters are the continuous-time residues of the poles .
Using the MATLAB routine residuewe find the residues for the three poles, producing the transferfunction
The corresponding discrete-time filter has the transfer function
Note that the poles of the continuous-time filter, are all of the form of a (generally complex) constant
divided by the parameter T. Since is multiplied by Twherever it appears in the equation for
above, the specific value chosen for has no effect at all on the discrete-time filter that results from the
design process. Hence we normally let for simplicity. This produces the transfer function
&c
" N
H s( )&c
3
s &cej"
( ) s &cej " " 3+( )
( ) s &cej " " 3( )
( )
-----------------------------------------------------------------------------------------------------------------------=
&c 0.4716 T=
H s( )&c
3
s &cej"
( ) s &cej " " 3+( )
( ) s &cej " " 3( )
( )
-----------------------------------------------------------------------------------------------------------------------=
H s( )0.4716 T( )3
s 0.4716 T+( ) s 0.236 0.408j+( ) T( ) s 0.236 0.408j( ) T( )------------------------------------------------------------------------------------------------------------------------------------------------------------------------=
H s( )Ak
s sk( )-----------------
k 1=
N
-=
Ak sk
H s( )0.4716
s 0.4716 T+--------------------------------
0.236 0.136j
s 0.236 0.408j+( ) T------------------------------------------------------------
0.236 0.136j+
s 0.236 0.408j( ) T------------------------------------------------------------+ +=
H z( )Ak
1 es
kTz
1' (
) *
--------------------------------
k 1=
N
-=
sk
sk H z( )
T
T 1=
-
8/6/2019 IIRDesign
5/6
IIR filter design example -5- Fall, 2005
or
Combing the second and third terms we obtain
This expression can be implemented easily using any of the techniques discussed in OSB Chapter 6.
Design procedure using bilinear transformation
Determining design parameters
Here we will convert from continuous-time to discrete-time form using the bilinear transform
This produces the nonlinear relationship between continuous-time frequency and discrete-time frequency
Converting the critical frequencies and to their continuous-time counterparts produces
We use again the design equation
Note that although we still need to have 3 poles, the actual fractional value ofN
smaller because of thegreater ratio of stopband to passband edge frequencies provided by the nonlinear frequency warping of thebilinear transform.
We will match the specs exactly in the passband, although there is no specific need to do so when we usethe bilinear transform. The equation for the critical frequency then becomes
H z( )0.4716
1 0.4716( )z1
exp
---------------------------------------------------0.236 0.136j
1 0.236 0.408j+( )z1
exp
-----------------------------------------------------------------------0.236 0.136j+
1 0.236 0.408j( )z1
exp
-----------------------------------------------------------------------+ +=
H z( )0.4716
1 0.624z 1
------------------------------0.236 0.136j
1 0.725 0.313j+( )z 1
---------------------------------------------------------0.236 0.136j+
1 0.725 0.313j( )z 1
--------------------------------------------------------+ +=
H z( )0.4716
1 0.624z1
------------------------------0.472 0.341z
1+
1 1.45z1
0.624z2
+
-------------------------------------------------------+=
s2
T---
1 z1
1 z1
+
-----------------=
&2
T--- ! 2( )tan=
!p !s
&p2
T--- !p 2( )tan 0.4802 T= =
&s2
T--- !s 2( )tan 1.226 T= =
N1
2---
k2 k1( )log
&s &p( )log------------------------------- 2.4546= =
&c&p
k11 2N
--------------0.4806
T----------------= =
-
8/6/2019 IIRDesign
6/6
IIR filter design example -6- Fall, 2005
Prototype filter design
As before, the transfer function for the Butterworth filter is
Using the MATLAB routine poly and the value for that we had obtained we find that the transfer
function of the prototype filter is
Conversion to discrete-time form
We can now substitute directly the bilinear transform relationship
Note that the design parameter Tappears in cubic form in the denominator of every term in numerator anddenominator. Hence its specific value does not matter and we can cancel it from the design equation. Thevalue of the Tparameter is frequently set to equal 2 to simplify the expression for the bilinear transform.
We also note that simplifying the expression above is an algebraic nightmare. Using the MATLAB routine
bilinearwith the poles and (null) zeros of as input parameters (and a value of 1 for the parameter
T), we obtain
H s( )&c
3
s &c
ej"
( ) s &c
ej " " 3+( )
( ) s &c
ej " " 3( )
( )
-----------------------------------------------------------------------------------------------------------------------=
&c
H s( )0.110 T
3
s3 0.9612s
2
T---------------------
0.4620s
T2
-------------------0.110
T3
-------------+ + +
-------------------------------------------------------------------------------=
s 2T--- 1 z
1
1 z1
+
-----------------=
H s( )0.110 T
3
2
T---
1 z1
1 z1
+
-----------------' (+ ,) * 3
0.96122
T---
1 z1
1 z1
+
-----------------' (+ ,) * 2
T----------------------------------------------
0.46202
T---
1 z1
1 z1
+
-----------------' (+ ,) *
T2
-------------------------------------------0.110
T3
-------------+ + +
--------------------------------------------------------------------------------------------------------------------------------------------------------=
H s( )
H z( )0.00854 1 3z
13z
2z
3+ + +( )
1 2.064z1
1.519z2
0.386z3
+
-------------------------------------------------------------------------------------=