DSP Digital Signal Processing MODULE III PART1

download DSP Digital Signal Processing MODULE III PART1

of 11

Transcript of DSP Digital Signal Processing MODULE III PART1

  • 8/14/2019 DSP Digital Signal Processing MODULE III PART1

    1/11

    NFINITE IMPULSE RESPONSE FILTER

    .1. Review of Analog Filter Design1.1. Introduction

    The theory of design of IIR digital filters depends on understandingontinuous-time (analog) filter design techniques. The design of a digital filter iseduced to ~i=inCT an a prouriate analo filter ana then pertormm the conversion:om H (3) to H (Z), that is, mapping from s-plane to z-p ane. So, we have to reVIeWe aesign IOrmUlas tor the standard types of analog fliters. Basically, there are fourportant types of analog filters. They are, '

    1) Butterworth filters~--~2) Chebyshev filters3) Bessel filters

    nd 4) Elliptic filters.It is known that the lowpass, highpass, bandbass, and bandstop filters can be

    btained from a normalIzed lowpass !lIter VIa speclllc transformatIOn ill the s-plane.o our discussiOn IS limited to lowpass fIlters. ~ubsequently, we descrIbe severalequency transformatIOns, that convert a lowpass prototype filter into either aighpass, bandpass or bandstop filter.Butterworth lowpass filters are characterized by the property that the magnitudehara'cterIstIc IS maxImally flat at the OrIgIn of the s-plane. Details of Butterworth

    lters and the design procedure are explairieii in the following three sections.hebyshev filters are characterized by the property that over a prescribed band ofequencies, the peale magnitude of the approximation error is minimized. The;gilltude error IS, ill tact, eqUlripple over the band of frequencies, that is, the errorcillates between maxima and mmIma of equal amplItude. lJependmg on whethere band frequencies over which the error is minimized is the passband or the

    the filter designs are called Type-I or Type-IT These detaIls are proVldecrSection 5.13.Bessellov.rpass filters are a class of all-pole filters that are characterized by the

    roperty that the group delay is maximally flat at the origin of the s-plane. \Ve noteat the Bessel fliter has a larger transition bandwidth, but its phase is linear withine. passband. The maximally flat group delay or the linear phase characteristics ofssel filters are destroyed by the methods of digitization to be discussedthis chapter.

  • 8/14/2019 DSP Digital Signal Processing MODULE III PART1

    2/11

    ~lliptic filters are characterized by a magnitude response that iseql!LIj~oth the passband and the stopband This class of filters ~~s both poles andero>;. The elliptic filters are optimum in theSeIiSetnat for a given order and foriven ri{>ple specifications no other filter achieves a &ster tran1?ition between theassband and stopband, that is, has a narrower transition bandv.'idth.

    As we are going to restrict our discussion to the properties and designrocedures for the analog Butterworth and Chebyshev filters, readers interested inhe other' two. types of filters may refer the books [2] and [4] by L.R.Rabiner &.Gold and L.C.Ludeman respectively..1.2. Butterworth Filters

    A linear time invariant analog filter can be characterized by its system function(s) or its corresponding frequency response H (j Q). The Butterworth filter of orderis described by the magnitude squared of its frequency response as follows.

    I HN (j 1'2) 12=11[1 + (1'2/ilc)2l'lJ (5.1)he ma/o,'llitude squared frequency response of the Butterworth filter is shown in Fig.1 for various values of N.

    I H, 01'2)12

    0.5N=100N=2N,=1

    0 ilc Q

    Fig. 5.1 The magnitude squared frequency response for a ButtelWorth filter.\Ve can observe the followmg properties of Butterworth filters:

    21. . HN(j U) I =1i ./u=o for all N.12 --~2. IHN(jQ) u=u,-2 for all finite N.

  • 8/14/2019 DSP Digital Signal Processing MODULE III PART1

    3/11

    .It means that, 1 HN (j il) I =v; =0.707and 20log iHN (j il) I =- 3.0103dB atcutoff frequency.

    3. : Hr-; (j il) 12 is a monotonically decreasing function of il.4. As N becomes larger, I HN (j il) 12 approaches an idealresponse.

    lowpass frequency

    5. : HN (j il) 12 is called maximally flat at the origin since all other derivaties existand are zero.For an analog system we remember that the frequency response is obtained by

    setting S =jilin the transfer function H (s). Therefore, replacement of !2 by S/j inEqn (5.1) resulis in the system transfer function. Setting ilc =1 in Eqn (5.1) givesIHx li il) i2 for the normalized filter as follows:. I

    I HNO!2J 12=HN(jU).HN(-jil)=I/(I+!22N)Therefore, HN (S) . HN ( - S) = 1/[1+ (S/j)2N]

    = 1/11 + (- S2)N] (1),2)The poles of HN (S) , HN ( - S) are given by the roots of the denominator. that is.

    2N1 + ( - S2)N =11 (S - SK) ~K=l

    where. Jei (2K - 1) 11/21\' for even N.SK = 1 pi 1~-1)1I/N for odd N

    Since! SK I =I, the poles of HN (S) , HI\' \ - S) are located on the unit-circleIS ' 1 .t ' IT ,,= WI Jl N sepr\ration.

    (f).3)

    For a stable and causal filter, the poles of HI\' IS) are selected to be those inthe left-half plane and the normalized transfer function HN (S) can be formed as,1HN(S)=N

    11 (S- Pi)i = 1where Pi are all the left half planet poles of HN (5) , HN( - 5). The denominatorBJ\' (S). can be shown to be a Butterworth polynomial of order N. Table ,5.1. givesthe first eight Butterworth polynomials in the real factored form.

    1BN(S) (5.4)

  • 8/14/2019 DSP Digital Signal Processing MODULE III PART1

    4/11

    Table 5.1. Butterworth polynomials in factored form and I}ormalizedLowpass Butterworth illter transfer functio~Order N Butterworth Polynomials BN (8)

    1. 8+12. 82 + v2 8 + 1.3. (82 + 8 + 1) (8 + 1)

    (82 + 0.76538 + 1) (82 + 1.8,17768 + 1).5. (S + 1) (S2 + 0.6180S + 1) (S2 + 1.6180S + 1)

    (S2... 0.5176S + 1) (S2 + \'2 S + 1) (82 + 1.93183 + 1).7. (S + 1) (82 + 0.44508 + 1) (82 + 1.24568 + 1) (82 + 1.80228 + 1)

    (S2 + 0.39868 + 1) (S2 + 1.11108 + 1) (S2 + 1.66308 + 1) (S2 + 1.9622S + 1).

    Normalized Lowpass Butterworth filters, H!\ (S) = 1/BN (S)The folJowing example illustrates the way of fmding the first and second order

    utterworth polynomials and corresponding lowpass transfer functionsI (S) and H2 (8). 'xample 5.1: Find the transfer function for normalized first and second orderutterworth filters.

    irst - Order Case:8ince N = 1, from Eqn (5.3), we have,

    S} = ~o = 1.and, 82=~ It =- 1.Therefore, PI = - 1 (the left half plane pole)Hence, the normalized transfer function of first order Butterworth filter is given by,H} (s) = 1/(S + 1)- Order Case:

    Since N = 2, from Eqn (5.3)we have,1 . 181,84 =:n:tJ:n'

  • 8/14/2019 DSP Digital Signal Processing MODULE III PART1

    5/11

    -1 . 1and S2' S3 = 72 :t J~

    -1 . 1Therefore,PI, P2=::r2:!:J ~ (the LHP poles)

    Hrooo,H, (S)=[( S+t,-j t,J( S+t,+jt, J]1

    [(s+iJ-(jiJJ1=(8'2+ --.f2S+ 1)

    is the normalized transfer function of the second-order Butterworth filter.5.1.3. Analog. to - Analog Transformations

    From the one radian, normalized lowpass Buttterworth filters, othernon-normalized Butterworth filter could be derived by transformational methods, thatis, using a normalized lov.:pass filter as the prototype filter, we can achieve the othertypes.

    If we replace S of H (8), the system function for a normalizd lowpass filter, by~ ' :e get a new transfer function H' (S), given by, - ---1.u

    H' (8) = H (S) I =H (~ l.->s/uu ilu )If we evaluate the magnitude of the transfer function H' (8) at 8 = j il to get thefrequency response we have,

    IH' (j il) I = iH (j il/ilu) IAt the value a =au , we have,I H' (j nu) I =IH (j1) I

    That is, the frequency response for the new transfer func:tion evaluated at il =au isequal to the value of the normalized transfer function at a =1. It means, the cutoff. frequency is moved from 1 rad/sec to the new cutoff frequency au rad/sec and thereis a scaling of frequency axis which leads to non-normalized lowpass filter with cutofffrequency 11" rad/sec. Similarly, transformations can be achieved for taking lowpass

  • 8/14/2019 DSP Digital Signal Processing MODULE III PART1

    6/11

    nsfer function to highpass, bandpass and bandstop transfer functions. Thesensformations along with design equations are presented here.wpass to Lowpass:

    S ~ ~where au is the new upper cutoff frequency.0 0

    log IHon)1-

    the critical frequenCY or

    .Q,. n,'K2 t ~..- K,.L J...

    n, aProto type Transformed

    and K2 are passband and stopband gains in dB. Qr ispband edge frequency.

    If the transformation S ~ ~is applied to the lowpass structure as shown, theitical frequency Or will be transformed into .Q'r which is ilr time Qu' that is,

    O'r=n...iluw pass - to -Highpass:

    S ~ ~I where ill is the lower cutoff frequency of the desired high-pass filter.Here, the stopband edge (critical) frequency ilr will be transformed intoQI

    r Qr -to -Bandpass:2S + QIu

    S ~ S a,. where 1 and Ou are the lower and upper cutoff frequencies o( - ,)e desired bandpass filter.

  • 8/14/2019 DSP Digital Signal Processing MODULE III PART1

    7/11

    0

    20 log IH00)1

    ~ t ~...11, 0 0,11, a. 0,

    Proto type TransformedHere, we have two new critical frequencies, say 01 and 02 which are defined asfollows:

    av =(Cu- 01)/222 1/201 = (Or Oav+ 01 u) - Oava.2 2 1/2and 02 = (Or Oav+ Or u) + Oava..

    Lowpass. to . Bandstop:s (Ou- 01)S -+ 2 leads to transformation from lowpass to bandstop filters where,S+~Cu .the two new critical frequencies, nl and n2, that is, the two stopband edge frequenciesare given by,

    01 = [(Oav/Or)2 + nl CuJ1/2- Oavo.and 02 = [(nav/o.)2 +01CuJl/2+ avo..where, Oav = (Ou - 01)/25.1.4. Design of Lowpass Butterworth Filters

    The Butterworth LP frequency response is characterized by the order N andthe cutoff frequency nc as seen in Eqn (5;1). That is,1

    HN (j n) = ~1 + (01nc>2NThe fllter specificationsare generally given in terms of the critical frequenciesandgains in the passband and the stopband say, nl, 02 andKl'~' as shown in Fig 5.2for the lowpass response.

  • 8/14/2019 DSP Digital Signal Processing MODULE III PART1

    8/11

    dB

    0

    20 log IHun)1K2 'HHHH" '

    n, n2 n rad/sec.

    Fig. 5.2. Lowpass filter specifications.common set of conditions for the lowpass response are,

    0 ~ 20 log i H (j il) i ~ Kl for all il::; ill 120 log I H (j il) i ::;K2 for all il ~ il2 J

    w(' replace H (j il) in Eqn (5.51 by the Butterworth magnitude squared functiond when equalities hold,

    (5.5)

    have,10 100'[

    1]1 + (ill/ilc)2N =Kl'

    10 log [1

    ]+ (J:22/J:2c)2N = K2'andich yields,

    (ill/Q/N = 10-0.1K]- 11\and (il2/P-c)2N = 10- 0.1 K2 - 1 I

    We now have an expression to relate ill' D.2' Kl' K2 and N as follows.

    (5.6)

    2N

    (D.l

    )= 10-0.l~I-1il2 10-0.l~-1

    simple closed form expression for N is easily obtained as,

  • 8/14/2019 DSP Digital Signal Processing MODULE III PART1

    9/11

    log10 [(10- 0.1 Kl - 1)/(10- 0.1 IS - 1)]N2 10glO (.0.1/.0.2) (5.7)

    If N is an integer we use that value, otherwise we use the next larger integer. 801et us rewrite Eqn (5.7) as,log10 [(10- 0.1Kl - 1)/(10- 0.1~ - 1)]N>- 2 10glO(.0.1/.0.2) (5.8)From Eqn (5.6), it is clear that the selected value of N results in two different valuesfor .o.c. If we are particular about our exact requirement at .0.1,we use,

    .o.c= .0.1/(10- 0.1K,- 1)1I2N (5.9)which yields better than our requirement at .0.2' Otherwise, we use,

    .o.c= .0.2/(10- 0.1IS - 1)1I2N (5.10)which results in our exact requirement at .0.2 and exceeds our requirement at .0.]. Avalue of nc in between these values, gives an H (j .0.) that exceeds both requirements.

    Let us illustrate the above procedure to design a lowpass Butterworth filterthrough an example.

    Example 5.2: Design an analog Butterworth filter that has,0 ~ 20 log IH (j .0.)"1~ - 2dB for all.o. S;20 rad/sec20 log 1 H (j .0.) 1 S;- 10 dB for all .0.~ 30 rad/sec

    Solution: Using Eqn (5.8), we have,log10[(10.2- 1)/(10 - l)j

    N ~ 2 log10 (20/30) =3.3709We choose the next larger integer, that is, N = 4.Next, using Eqn '(5.9), to exactly satisfy the - 2 dB requirement, we obtain,

    .o.c= 20/(10.2 - 1)1/8 = 21.3868.The normalized transfer function of loy/pass Butterworth filter (.o.c=1) for N =4 isgiven by,

    H4 (8) = 1/[(S2 + 0.76536S + 1) (S2 + 1.847768 + 1)]

    Now, applying a lowpass - to - lowpass transformation, that is, 8 -- ~ ' withc.o.c= 21.3868, yields the desired transfer function.

  • 8/14/2019 DSP Digital Signal Processing MODULE III PART1

    10/11

    154 INFINITE IMPULSE RESPONSE FILTER

    H (8) = H4 (8) 18-+ 8/21.38681= [(8/21.3868)2 + 0.76536 (8n1.3868) + 1]

    1x [(8/21.3868)2 + 1.84776 (8/21.3868) + 1]0.209210 x 106

    - (82 + 16.38688 + 457.395) (82 + 39.5178 + 457.395)

    The procedure for designing other types of filters like highpass, bandpass andbandstop filters, to satisfy the given set of specification is also composed in two steps.'First, design the prototype lowpass filter with determined N value and then, applythe lowpass to required band transformation using the desired ill for HPF, andUI and ilu for BPF and B8F filters.

    The formulas for finding the N value from given specifications of other types of~ters are provided belowHighpass filters:

    K,,....................Gain indB

    K ,..............il, il, il

    loglO[(10-0.1KI- 1)/(10- 0.1K,- l)JN>- 2 loglO(il2/fll)where, Kl - passband gain.

    K2 - stopband gainnl - passband critical frequency.

    and il2 - stopband critical frequency.

  • 8/14/2019 DSP Digital Signal Processing MODULE III PART1

    11/11

    andpass filters:

    Gain indBK,'"''''''''''

    n, n, n,u

    N ~ log10 [(10- 0.1Kj - 1)/(10- 0.1~ - 1)],A =(- QI -rill nu)/[il1 (ilu - ill)]B=(il~ - ill ilu)/[il2 (ilu - ill)]

    !2Jand Qu are passband critical frequencies.ill and il2 are stopband critical frequencies.

    ndstop filters:

    Gain indB

    ~I i...

    Q, Q1 ~ Qu

    n

    Q