ch7-1 rtentitivity

download ch7-1 rtentitivity

of 55

Transcript of ch7-1 rtentitivity

  • 8/11/2019 ch7-1 rtentitivity

    1/55

    1Copyright 2001, S. K. Mitra

    Digital Filter DesignDigital Filter Design

    Objective- Determination of a realizable

    transfer function G(z)approximating agiven 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)

  • 8/11/2019 ch7-1 rtentitivity

    2/55

    2Copyright 2001, S. K. Mitra

    Digital Filter SpecificationsDigital Filter Specifications

    Usually, either the magnitudeand/or the

    phase(delay) response is specified for the

    design of digital filter for most applications

    In some situations, the unit sample response

    or the step responsemay be specified

    In most practical applications, the problem

    of interest is the development of a realizableapproximation to a given magnitude

    response specification

  • 8/11/2019 ch7-1 rtentitivity

    3/55

    3Copyright 2001, S. K. Mitra

    Digital Filter SpecificationsDigital Filter Specifications We discuss in this course only the

    magnitude approximation problem

    There are four basic types of ideal filterswith magnitude responses as shown below

    1

    0 c

    c

    HLP(ej )

    0 c

    c

    1

    HHP(ej )

    11

    c1 c1 c2 c2

    HBP (ej )

    1

    c1 c1 c2 c2

    HBS(ej )

  • 8/11/2019 ch7-1 rtentitivity

    4/55

    4Copyright 2001, S. K. Mitra

    Digital Filter SpecificationsDigital Filter Specifications

    As the impulse response corresponding to

    each of these ideal filters is noncausal and

    of infinite length, these filters are notrealizable

    In practice, the magnitude responsespecifications of a digital filter in the

    passband and in the stopband are given with

    some acceptable tolerances

    In addition, a transition band is specified

    between the passband and stopband

  • 8/11/2019 ch7-1 rtentitivity

    5/55

    5Copyright 2001, S. K. Mitra

    Digital Filter SpecificationsDigital Filter Specifications For example, the magnitude response

    of a digital lowpass filter may be given as

    indicated below

    )( !jeG

  • 8/11/2019 ch7-1 rtentitivity

    6/55

    6Copyright 2001, S. K. Mitra

    Digital Filter SpecificationsDigital Filter Specifications

    As indicated in the figure, in the passband,

    defined by , we require that

    with an error , i.e.,

    In the stopband, defined by , we

    require that with an error ,i.e.,

    1)( "!jeG

    0)( "

    !j

    eG s#

    p#$

    p!%!%0

    &%!%!s

    ppj

    p eG !%!#'%%#( ! ,1)(1

    &%!%!#%! ssjeG ,)(

  • 8/11/2019 ch7-1 rtentitivity

    7/55

    7Copyright 2001, S. K. Mitra

    Digital Filter SpecificationsDigital Filter Specifications

    - passband edge frequency

    - stopband edge frequency - peak ripple valuein thepassband

    - peak ripple valuein the stopband Since is a periodic function of !,

    and of a real-coefficient digital

    filter is an even function of ! As a result, filter specifications are given

    only for the frequency range

    p!

    s!

    s#

    p#

    )( !jeG)( !jeG

    &%!%0

  • 8/11/2019 ch7-1 rtentitivity

    8/55

    8Copyright 2001, S. K. Mitra

    Digital Filter SpecificationsDigital Filter Specifications

    Specifications are often given in terms ofloss function A in

    dB

    Peak passband ripple

    dB

    Minimum stopband attenuation

    dB

    )(log20)( 10!()! jeG

    )1(log20 10 pp #(()*

    )(log20 10 ss #()*

  • 8/11/2019 ch7-1 rtentitivity

    9/55

    9Copyright 2001, S. K. Mitra

    Digital Filter SpecificationsDigital Filter Specifications Magnitude specifications may alternately be

    given in a normalized form as indicated

    below

  • 8/11/2019 ch7-1 rtentitivity

    10/55

    10Copyright 2001, S. K. Mitra

    Digital Filter SpecificationsDigital Filter Specifications

    Here,the maximum value of the magnitude

    in the passband is assumed to be unity

    - Maximum passband deviation,

    given by the minimum value of the

    magnitude in the passband

    - Maximum stopband magnitudeA1

    21/1 +'

  • 8/11/2019 ch7-1 rtentitivity

    11/55

    11Copyright 2001, S. K. Mitra

    Digital Filter SpecificationsDigital Filter Specifications

    For the normalized specification, maximumvalue of the gain function or the minimum

    value of the loss function is0 dB

    Maximum passband attenuation-

    dB

    For , it can be shown that

    dB

    210max 1log20 +')*

    1..#p)21(log20 10max p#(("*

  • 8/11/2019 ch7-1 rtentitivity

    12/55

    12Copyright 2001, S. K. Mitra

    Digital Filter SpecificationsDigital Filter Specifications In practice, passband edge frequency

    and stopband edge frequency are

    specified in Hz For digital filter design, normalized

    bandedge frequencies need to be computed

    from specifications in Hz using

    TFF

    F

    F pT

    p

    T

    p

    p &)

    &

    )

    /

    )! 2

    2

    TF

    F

    F

    F s

    T

    s

    T

    ss &)

    &)

    /)! 2

    2

    sFpF

  • 8/11/2019 ch7-1 rtentitivity

    13/55

    13Copyright 2001, S. K. Mitra

    Digital Filter SpecificationsDigital Filter Specifications

    Example- Let kHz, kHz, andkHz

    Then

    7)pF 3)sF25)TF

    &)00&)! 56.01025

    )107(23

    3

    p

    &)0

    0&)! 24.0

    1025

    )103(23

    3

    s

  • 8/11/2019 ch7-1 rtentitivity

    14/55

    14Copyright 2001, S. K. Mitra

    The transfer function H(z)meeting thefrequency response specifications should be

    a causal transfer function For IIR digital filter design, the IIR transfer

    function is a real rational function of :

    H(z) must be a stable transfer function and

    must be of lowest order Nfor reduced

    computational complexity

    Selection of Filter TypeSelection of Filter Type

    1(z

    NM

    zdzdzdd

    zpzpzppzH

    N

    N

    M %

    ''''

    '''') (((

    (((,)(

    2

    2

    1

    10

    22

    110

    !

    !

  • 8/11/2019 ch7-1 rtentitivity

    15/55

    15Copyright 2001, S. K. Mitra

    Selection of Filter TypeSelection of Filter Type

    For FIR digital filter design, the FIRtransfer function is a polynomial inwith real coefficients:

    For reduced computational complexity,degree Nof H(z)must be as small as

    possible If a linear phase is desired, the filter

    coefficients must satisfy the constraint:

    1))

    (

    n

    nznhzH0

    ][)(

    ][][ nNhnh ($)

    1(z

  • 8/11/2019 ch7-1 rtentitivity

    16/55

    16Copyright 2001, S. K. Mitra

    Selection of Filter TypeSelection of Filter Type

    Advantages in using an FIR filter-

    (1) Can be designed with exact linear phase,

    (2) Filter structure always stable withquantized coefficients

    Disadvantages in using an FIR filter- Orderof an FIR filter, in most cases, is

    considerably higher than the order of an

    equivalent IIR filter meeting the same

    specifications, and FIR filter has thus higher

    computational complexity

  • 8/11/2019 ch7-1 rtentitivity

    17/55

    17Copyright 2001, S. K. Mitra

    Digital Filter Design:Digital Filter Design:

    Basic ApproachesBasic Approaches

    Most common approach to IIR filter design-(1) Convert the digital filter specifications

    into an analog prototype lowpass filter

    specifications

    (2) Determine the analog lowpass filter

    transfer function (3) Transform into the desired digital

    transfer function

    )(sa

    )(zG

    )(sHa

    Di it l Filt D i

  • 8/11/2019 ch7-1 rtentitivity

    18/55

    18Copyright 2001, S. K. Mitra

    Digital Filter Design:Digital Filter Design:

    Basic ApproachesBasic Approaches This approach has been widely used for the

    following reasons:

    (1) Analog approximation techniques arehighly advanced

    (2) They usually yield closed-formsolutions

    (3) Extensive tables are available foranalog filter design

    (4) Many applications require digital

    simulation of analog systems

  • 8/11/2019 ch7-1 rtentitivity

    19/55

    19Copyright 2001, S. K. Mitra

    Digital Filter Design:Digital Filter Design:

    Basic ApproachesBasic Approaches An analog transfer function to be denoted as

    where the subscript a specificallyindicates the analog domain

    A digital transfer function derived fromshall be denoted as

    )()()(sDsPsH

    a

    aa )

    )(

    )()(

    zD

    zPzG )

    )(sa

    Digital Filter DesignDigital Filter Design:

  • 8/11/2019 ch7-1 rtentitivity

    20/55

    20Copyright 2001, S. K. Mitra

    Digital Filter Design:Digital Filter Design:

    Basic ApproachesBasic Approaches Basic idea behind the conversion of

    into is to apply a mapping from the

    s-domain to the z-domain so that essential

    properties of the analog frequency response

    are preserved

    Thus mapping function should be such that

    Imaginary ( ) axis in the s-plane bemapped onto the unit circle of the z-plane

    A stable analog transfer function be mapped

    into a stable digital transfer function

    )(sHa)(zG

    /j

  • 8/11/2019 ch7-1 rtentitivity

    21/55

  • 8/11/2019 ch7-1 rtentitivity

    22/55

    22Copyright 2001, S. K. Mitra

    Digital Filter Design:Digital Filter Design:

    Basic ApproachesBasic Approaches

    Three commonly used approaches to FIRfilter design-

    (1)Windowed Fourier series approach(2)Frequency sampling approach

    (3) Computer-based optimization methods

    IIR Di it l Filt D i BiliIIR Di it l Filt D i Bili

  • 8/11/2019 ch7-1 rtentitivity

    23/55

    23Copyright 2001, S. K. Mitra

    IIR Digital Filter Design: BilinearIIR Digital Filter Design: Bilinear

    Transformation MethodTransformation Method Bilinear transformation-

    Above transformation maps a single pointin the s-plane to a unique point in the

    z-plane and vice-versa

    Relation between G(z)and is then

    given by

    4467789 '() (

    (

    1

    1

    112

    zz

    Ts

    )(sa

    446

    778

    9

    ('

    (

    ())

    11

    1

    12)()(

    zzTsa

    sHzG

  • 8/11/2019 ch7-1 rtentitivity

    24/55

    24Copyright 2001, S. K. Mitra

    Bilinear TransformationBilinear Transformation

    Digital filter design consists of 3 steps:

    (1) Develop the specifications of byapplying the inverse bilinear transformation

    to specifications ofG(z)

    (2) Design

    (3) Determine G(z)by applying bilinear

    transformation to As a result, the parameter Thas no effect on

    G(z)and T= 2is chosen for convenience

    )(sa

    )(sa

    )(sa

  • 8/11/2019 ch7-1 rtentitivity

    25/55

    25Copyright 2001, S. K. Mitra

    Bilinear TransformationBilinear Transformation Inverse bilinear transformation for T= 2is

    For

    Thus,

    s

    sz

    (

    ')1

    1

    oo js /':)

    22

    222

    )1(

    )1()1()1(

    oo

    oo

    oo

    oo zjjz

    /':(/':');

    /(:(/':')

    10 )

  • 8/11/2019 ch7-1 rtentitivity

    26/55

    26Copyright 2001, S. K. Mitra

    Bilinear TransformationBilinear Transformation

    Mapping of s-plane into the z-plane

  • 8/11/2019 ch7-1 rtentitivity

    27/55

    27Copyright 2001, S. K. Mitra

    Bilinear TransformationBilinear Transformation For with T= 2we have

    or

    )(

    )(

    1

    1

    2/2/2/

    2/2/2/

    !(!!(

    !(!!(

    !(

    !(

    '

    ()

    '

    ()/jjj

    jjj

    j

    j

    eee

    eee

    e

    ej

    !) jez

    )2/tan(!)/

    )2/tan(2

    )2/cos(2

    )2/sin(2!)

    !

    !) jj

  • 8/11/2019 ch7-1 rtentitivity

    28/55

    28Copyright 2001, S. K. Mitra

    Bilinear TransformationBilinear Transformation

    Mapping is highly nonlinear

    Complete negative imaginary axis in thes-

    plane from to is mapped into

    the lower half of the unit circle in the z-plane

    from to Complete positive imaginary axis in the s-

    plane from to is mapped into theupper half of the unit circle in the z-plane

    from to

    (>)/ 0)/

    0)/ >)/

    1()z 1)z

    1)z 1()z

  • 8/11/2019 ch7-1 rtentitivity

    29/55

    29Copyright 2001, S. K. Mitra

    Bilinear TransformationBilinear Transformation

    Nonlinear mapping introduces a distortionin the frequency axis called frequency

    warping Effect of warping shown below

    Bili T f tiBili T f ti

  • 8/11/2019 ch7-1 rtentitivity

    30/55

    30Copyright 2001, S. K. Mitra

    Bilinear TransformationBilinear Transformation

    Steps in the design of a digital filter-(1) Prewarp to find their analogequivalents

    (2) Design the analog filter

    (3) Design the digital filter G(z)by applying

    bilinear transformation to Transformation can be used only to design

    digital filters with prescribed magnituderesponse with piecewise constant values

    Transformation does not preserve phase

    response of analog filter

    ),( sp !!),(

    sp//

    )(sa

    )(sa

    IIR Digital Filter Design UsingIIR Digital Filter Design Using

  • 8/11/2019 ch7-1 rtentitivity

    31/55

    31Copyright 2001, S. K. Mitra

    IIR Digital Filter Design UsingIIR Digital Filter Design Using

    Bilinear TransformationBilinear Transformation Example- Consider

    Applying bilinear transformation to the above

    we get the transfer function of a first-order

    digital lowpass Butterworth filter

    c

    cassH /'

    /))(

    )1()1(

    )1()()(

    11

    1

    11

    11 ((

    (

    ('

    (() '/'('/

    ))zz

    zsHzG

    c

    c

    z

    zsa

  • 8/11/2019 ch7-1 rtentitivity

    32/55

    32Copyright 2001, S. K. Mitra

    IIR Digital Filter Design UsingIIR Digital Filter Design Using

    Bilinear TransformationBilinear Transformation

    Rearranging terms we get

    where

    1

    1

    1

    12

    1)( (

    (

    (

    '?()

    z

    zzG

    *

    *

    )2/tan(1

    )2/tan(1

    1

    1

    cc

    cc !'

    !()/'

    /()*

    IIR Digital Filter Design UsingIIR Digital Filter Design Using

  • 8/11/2019 ch7-1 rtentitivity

    33/55

    33Copyright 2001, S. K. Mitra

    IIR Digital Filter Design UsingIIR Digital Filter Design Using

    Bilinear TransformationBilinear Transformation Example- Consider the second-order analognotch transfer function

    for which

    is called the notch frequency

    If then

    is the 3-dB notch bandwidth

    22

    22

    )(o

    oa

    sBs

    ssH

    /''/')

    0)( )/oa jH

    1)()0( )>) jj aao/

    2/1)()( 12 )/)/ jHjH aa12 /(/)B

    IIR Digital Filter Design UsingIIR Digital Filter Design Using

  • 8/11/2019 ch7-1 rtentitivity

    34/55

    34Copyright 2001, S. K. Mitra

    IIR Digital Filter Design UsingIIR Digital Filter Design Using

    Bilinear TransformationBilinear Transformation Then

    where

    1

    1

    11)()(

    (

    (

    '()

    )zzsa

    sHzG

    22122

    22122

    )1()1(2)1()1()1(2)1(

    ((((

    (/''/(('/'/''/((/')

    zBzBzz

    ooo

    ooo

    21

    21

    )1(2121

    21

    ((

    ((

    ''('(?')

    zzzz

    **@@*

    o

    o

    o !)/'/()@ cos

    11

    2

    2)2/tan(1)2/tan(1

    11

    2

    2

    w

    w

    o

    o

    BB

    BB

    '()

    '/'(/')*

    IIR Digital Filter Design UsingIIR Digital Filter Design Using

  • 8/11/2019 ch7-1 rtentitivity

    35/55

    35Copyright 2001, S. K. Mitra

    IIR Digital Filter Design UsingIIR Digital Filter Design Using

    Bilinear TransformationBilinear Transformation Example- Design a 2nd-order digital notchfilter operating at a sampling rate of 400 Hz

    with a notch frequency at 60 Hz, 3-dBnotch

    bandwidth of 6 Hz

    Thus

    From the above values we get

    &)&)! 3.0)400/60(2o&)&) 03.0)400/6(2wB

    90993.0)*

    587785.0)@

    IIR Digital Filter Design UsingIIR Digital Filter Design Using

  • 8/11/2019 ch7-1 rtentitivity

    36/55

    36Copyright 2001, S. K. Mitra

    IIR Digital Filter Design Usingg a e es g Us g

    Bilinear TransformationBilinear Transformation Thus

    The gain and phase responses are shown below

    21

    21

    90993.01226287.11954965.01226287.1954965.0)( ((

    ((

    '( '() zzzzzG

    0 50 100 150 200-40

    -30

    -20

    -10

    0

    Frequency, Hz

    Gain,

    dB

    0 50 100 150 200-2

    -1

    0

    1

    2

    Frequency, Hz

    Phase,radians

  • 8/11/2019 ch7-1 rtentitivity

    37/55

  • 8/11/2019 ch7-1 rtentitivity

    38/55

    IIRIIR LowpassLowpass Digital Filter DesignDigital Filter Design

  • 8/11/2019 ch7-1 rtentitivity

    39/55

    39Copyright 2001, S. K. Mitra

    IIRIIRLowpassLowpassDigital Filter DesignDigital Filter Design

    Using Bilinear TransformationUsing Bilinear Transformation

    Thus

    We chooseN= 3

    To determine we use

    6586997.2)/1(log

    )/1(log

    10

    110 ))k

    kN

    c/

    22

    2

    11

    )/(11)( +')//')/ Ncp

    pa jH

    IIRIIR LowpassLowpass Digital Filter DesignDigital Filter Design

  • 8/11/2019 ch7-1 rtentitivity

    40/55

    40Copyright 2001, S. K. Mitra

    IIRIIRLowpassLowpassDigital Filter DesignDigital Filter Design

    Using Bilinear TransformationUsing Bilinear Transformation We then get

    3rd-order lowpass Butterworth transfer

    function for is

    Denormalizing to get we

    arrive at

    588148.0)(419915.1 )/)/ pc

    1)/c

    )1)(1(

    1)(

    2 ''')

    ssssHan

    4

    6

    78

    9

    ) 588148.0)( s

    HsH ana

    588148.0)/c

    IIRIIRLowpassLowpassDigital Filter DesignDigital Filter Design

  • 8/11/2019 ch7-1 rtentitivity

    41/55

    41Copyright 2001, S. K. Mitra

    pp g gg g

    Using Bilinear TransformationUsing Bilinear Transformation

    Applying bilinear transformation to

    we get the desired digital transfer function

    Magnitude and gain responses of G(z)shown

    below:

    )(sHa

    1

    1

    11)()(

    (

    (

    '())zzsa szG

    0 0.2 0.4 0.6 0.8 10

    0.2

    0.4

    0.6

    0.8

    1

    !/&

    Magnitud

    e

    0 0.2 0.4 0.6 0.8 1-40

    -30

    -20

    -10

    0

    !/&

    Gain,dB

    Design of IIRDesign of IIR HighpassHighpass,, BandpassBandpass,,

  • 8/11/2019 ch7-1 rtentitivity

    42/55

    42Copyright 2001, S. K. Mitra

    es g og g passg p ,, a dpassp ,,

    andand BandstopBandstopDigital FiltersDigital Filters First Approach-

    (1) Prewarp digital frequency specificationsof desired digital filter to arrive at

    frequency specifications of analog filter

    of same type

    (2) Convert frequency specifications of

    into that of prototype analog lowpass filter

    (3) Design analog lowpass filter

    )(zGD)(sD

    )(sHD

    )(sLP

    )(sLP

  • 8/11/2019 ch7-1 rtentitivity

    43/55

    D i f IIRD i f IIR Hi hHi h B dB d

  • 8/11/2019 ch7-1 rtentitivity

    44/55

    44Copyright 2001, S. K. Mitra

    Design of IIRDesign of IIRHighpassHighpass,,BandpassBandpass,,

    andandBandstopBandstopDigital FiltersDigital Filters

    Second Approach-

    (1) Prewarp digital frequency specifications

    of desired digital filter to arrive at

    frequency specifications of analog filterof same type

    (2) Convert frequency specifications ofinto that of prototype analog lowpass filter

    )(zGD)(sD

    )(sLP

    )(sD

    D i f IIRD i f IIR Hi hHi h B dB d

  • 8/11/2019 ch7-1 rtentitivity

    45/55

    45Copyright 2001, S. K. Mitra

    Design of IIRDesign of IIRHighpassHighpass,,BandpassBandpass,,

    andandBandstopBandstopDigital FiltersDigital Filters

    (3) Design analog lowpass filter

    (4) Convert into an IIR digital

    transfer function using bilinear

    transformation

    (5) Transform into the desired

    digital transfer function We illustrate the first approach

    )(sLP

    )(sLP)(zGLP

    )(zGLP

    )(zGD

    IIRIIR HighpassHighpass Digital Filter DesignDigital Filter Design

  • 8/11/2019 ch7-1 rtentitivity

    46/55

    46Copyright 2001, S. K. Mitra

    IIRIIRHighpassHighpassDigital Filter DesignDigital Filter Design

    Design of a Type 1 Chebyshev IIR digitalhighpass filter

    Specifications: Hz, Hz, dB, dB, kHz

    Normalized angular bandedge frequencies

    700)pF 500)sF2)TF1)*p 32)*s

    &)0&

    )&

    )! 7.02000

    70022

    T

    pp

    F

    F

    &)0&

    )&

    )! 5.0

    2000

    50022

    T

    ss

    F

    F

  • 8/11/2019 ch7-1 rtentitivity

    47/55

    IIRIIR HighpassHighpass Digital Filter DesignDigital Filter Design

  • 8/11/2019 ch7-1 rtentitivity

    48/55

    48Copyright 2001, S. K. Mitra

    IIRHighpassg p Digital Filter Designg g

    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);

    0 0.2 0.4 0.6 0.8 1-50

    -40

    -30

    -20

    -10

    0

    !/&

    Gain,

    dB

    IIRIIR BandpassBandpass Digital Filter DesignDigital Filter Design

  • 8/11/2019 ch7-1 rtentitivity

    49/55

    49Copyright 2001, S. K. Mitra

    IIRIIR BandpassBandpassDigital Filter DesignDigital Filter Design

    Design of a Butterworth IIR digital bandpassfilter

    Specifications: , , , , dB, dB

    Prewarping we get

    &)! 45.01p &)! 65.02p&)! 75.02s&)! 3.01s 1)*p 40)*s

    8540807.0)2/tan( 11 )!)/ pp

    6318517.1)2/tan( 22 )!)/ pp

    41421356.2)2/tan( 22 )!)/ ss

    5095254.0)2/tan( 11 )!)/ ss

    IIRIIR BandpassBandpass Digital Filter DesignDigital Filter Design

  • 8/11/2019 ch7-1 rtentitivity

    50/55

    50Copyright 2001, S. K. Mitra

    pp g gg g

    Width of passband

    We therefore modify so that and

    exhibit geometric symmetry withrespect to

    We set For the prototype analog lowpass filter we

    choose

    777771.0 12 )/(/) ppwB

    393733.1 212 )//)/ ppo

    221

    23010325.1 oss /B)//

    1s/

    2 s/

    1s/

    2o/

    5773031.0 1)/s

    1)/p

    IIRIIRBandpassBandpassDigital Filter DesignDigital Filter Design

  • 8/11/2019 ch7-1 rtentitivity

    51/55

    51Copyright 2001, S. K. Mitra

    pp g gg g

    Using we get

    Specifications of prototype analog

    Butterworth lowpass filter:

    , , dB,

    dB

    w

    op

    B//(//()/

    22

    3617627.2777771.05773031.0

    3332788.0393733.1)

    0()/s

    1)/p 3617627.2)/s 1)*p40)*s

    IIRIIRBandpassBandpassDigital Filter DesignDigital Filter Design

  • 8/11/2019 ch7-1 rtentitivity

    52/55

    52Copyright 2001, S. K. Mitra

    p g g

    MATLAB code fragments used for the design[N, Wn] = buttord(1, 2.3617627, 1, 40, s)

    [B, A] = butter(N, Wn, s);[BT, AT] = lp2bp(B, A, 1.1805647, 0.777771);

    [num, den] = bilinear(BT, AT, 0.5);

    0 0.2 0.4 0.6 0.8 1-50

    -40

    -30

    -20

    -10

    0

    !/&

    Gain,

    dB

    IIRIIR BandstopBandstopDigital Filter DesignDigital Filter Design

  • 8/11/2019 ch7-1 rtentitivity

    53/55

    53Copyright 2001, S. K. Mitra

    pp g gg g

    Design of an elliptic IIR digital bandstop filter Specifications: , ,

    , , dB, dB Prewarping we get

    Width of stopband

    &)! 45.01s &)! 65.02s

    &)! 75.02p&)! 3.01p 1)*p 40)*s

    ,8540806.0 1)/s ,6318517.1 2)/s,5095254.0 1)/p 4142136.2 2)/p

    777771.0 12 )/(/) sswB393733.1 12

    2 )//)/ sso

    212 230103.1 opp /B)//

    IIRIIR BandstopBandstop Digital Filter DesignDigital Filter Design

  • 8/11/2019 ch7-1 rtentitivity

    54/55

    54Copyright 2001, S. K. Mitra

    IIRIIRBandstopBandstopDigital Filter DesignDigital Filter Design

    We therefore modify so that andexhibit geometric symmetry with respect to

    We set

    For the prototype analog lowpass filter wechoose

    Using we get

    1 p/ 1 p/ 2 p/

    2

    o/577303.0 1)/p

    1)/s

    22

    /(/

    /

    /)/ o

    w

    s

    B

    0.42341263332787.0393733.1

    777771.05095254.0)

    (

    0)/

    p

    IIRIIRBandstopBandstopDigital Filter DesignDigital Filter Design

  • 8/11/2019 ch7-1 rtentitivity

    55/55

    55Copyright 2001, S. K. Mitra

    pp g gg g

    MATLAB code fragments used for the design[N, Wn] = ellipord(0.4234126, 1, 1, 40, s);

    [B, A] = ellip(N, 1, 40, Wn, s);[BT, AT] = lp2bs(B, A, 1.1805647, 0.777771);

    [num, den] = bilinear(BT, AT, 0.5);

    0 0.2 0.4 0.6 0.8 1-50

    -40

    -30-20

    -10

    0

    !/&

    Gain,

    dB