elg6163 fir

Upload: abdul-rahim

Post on 04-Jun-2018

230 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Elg6163 Fir

    1/38

    1Copyright 2001, S. K. Mitra

    FIR filters

    ELG6163

    Miodrag Bolic

  • 8/13/2019 Elg6163 Fir

    2/38

    2Copyright 2001, S. K. Mitra

    Outline

    FIR filters Structures

    Polyphase FIR filters

    Parallel polyphase FIR

    Decimated FIR

    Implementations of FIR filters

  • 8/13/2019 Elg6163 Fir

    3/38

    3Copyright 2001, S. K. Mitra

    Canonic andCanonic and NoncanonicNoncanonicStructuresStructures

    A digital filter structure is said to be

    canonic if the number of delays in the block

    diagram representation is equal to the orderof the transfer function

    Otherwise, it is anoncanonic structure

  • 8/13/2019 Elg6163 Fir

    4/38

    4Copyright 2001, S. K. Mitra

    Canonic andCanonic and NoncanonicNoncanonic

    StructuresStructures

    The structure shown below is noncanonic asit employs two delays to realize a first-order

    difference equation

    ]1[][]1[][ 101 ++= nxpnxpnydny

  • 8/13/2019 Elg6163 Fir

    5/38

    5Copyright 2001, S. K. Mitra

    Basic FIR Digital FilterBasic FIR Digital Filter

    StructuresStructures

    A causal FIR filter of order Nis characterizedby a transfer function H(z) given by

    which is a polynomial in

    In the time-domain the input-output relation

    of the above FIR filter is given by

    =

    = N

    n

    nznhzH0

    ][)(1

    = = Nk

    knxkhny0

    ][][][

  • 8/13/2019 Elg6163 Fir

    6/38

    6Copyright 2001, S. K. Mitra

    Direct Form FIR Digital FilterDirect Form FIR Digital Filter

    StructuresStructures

    An FIR filter of order Nis characterized byN+1 coefficients and, in general, require

    N+1 multipliers and Ntwo-input adders

    Structures in which the multiplier

    coefficients are precisely the coefficients of

    the transfer function are calleddirect formstructures

  • 8/13/2019 Elg6163 Fir

    7/38

    7Copyright 2001, S. K. Mitra

    Direct Form FIR Digital FilterDirect Form FIR Digital Filter

    StructuresStructures

    A direct form realization of an FIR filter canbe readily developed from the convolution

    sum description as indicated below for N= 4

  • 8/13/2019 Elg6163 Fir

    8/38

    8Copyright 2001, S. K. Mitra

    Direct Form FIR Digital FilterDirect Form FIR Digital Filter

    StructuresStructures

    The transpose of the direct form structureshown earlier is indicated below

    Both direct form structures are canonic with

    respect to delays

  • 8/13/2019 Elg6163 Fir

    9/38

    9Copyright 2001, S. K. Mitra

    Cascade Form FIR DigitalCascade Form FIR Digital

    Filter StructuresFilter Structures A higher-order FIR transfer function can

    also be realized as a cascade of second-orderFIR sections and possibly a first-order

    section To this end we express H(z) as

    where if Nis even, and if N

    is odd, with

    =

    ++=

    K

    k kk zzhzH

    1

    2

    2

    1

    110 )(][)(

    2NK=

    2

    1+= NK

    02 =K

  • 8/13/2019 Elg6163 Fir

    10/38

    10Copyright 2001, S. K. Mitra

    Cascade Form FIR DigitalCascade Form FIR Digital

    Filter StructuresFilter Structures A cascade realization for N= 6 is shown

    below

    Each second-order section in the abovestructure can also be realized in the

    transposed direct form

  • 8/13/2019 Elg6163 Fir

    11/38

    11Copyright 2001, S. K. Mitra

    LinearLinear--Phase FIR StructuresPhase FIR Structures The symmetry (or antisymmetry) property of a

    linear-phase FIR filter can be exploited toreduce the number of multipliers into almost

    half of that in the direct form implementations Consider a length-7 Type 1 FIR transfer

    function with a symmetric impulse response:321 3210 +++= zhzhzhhzH ][][][][)(

    654 012 +++ zhzhzh ][][][

  • 8/13/2019 Elg6163 Fir

    12/38

    12Copyright 2001, S. K. Mitra

    LinearLinear--Phase FIR StructuresPhase FIR Structures Rewriting H(z) in the form

    we obtain the realization shown below

    )]([)]([)( 516 110 +++= zzhzhzH342 32 +++ zhzzh ][)]([

  • 8/13/2019 Elg6163 Fir

    13/38

    13Copyright 2001, S. K. Mitra

    LinearLinear--Phase FIR StructuresPhase FIR Structures

    A similar decomposition can be applied to aType 2 FIR transfer function

    For example, a length-8 Type 2 FIR transfer

    function can be expressed as

    The corresponding realization is shown on

    the next slide

    )]([)]([)( 617 110 +++= zzhzhzH

    )]([)]([ 4352 32 ++++ zzhzzh

  • 8/13/2019 Elg6163 Fir

    14/38

    14Copyright 2001, S. K. Mitra

    LinearLinear--Phase FIR StructuresPhase FIR Structures

    Note: The Type 1 linear-phase structure for a

    length-7 FIR filter requires 4 multipliers,

    whereas a direct form realization requires 7

    multipliers

  • 8/13/2019 Elg6163 Fir

    15/38

    15Copyright 2001, S. K. Mitra

    LinearLinear--Phase FIR StructuresPhase FIR Structures

    Note: The Type 2 linear-phase structure fora length-8 FIR filter requires 4 multipliers,

    whereas a direct form realization requires 8

    multipliers

    Similar savings occurs in the realization of

    Type 3 and Type 4 linear-phase FIR filterswith antisymmetric impulse responses

  • 8/13/2019 Elg6163 Fir

    16/38

    16Copyright 2001, S. K. Mitra

    PolyphasePolyphase FIR StructuresFIR Structures

    The polyphase decomposition of H(z) leadsto a parallel form structure

    To illustrate this approach, consider a causal

    FIR transfer function H(z) with N= 8:4321 43210 ++++= zhzhzhzhhzH ][][][][][)(

    8765 8765 ++++ zhzhzhzh ][][][][

  • 8/13/2019 Elg6163 Fir

    17/38

    17Copyright 2001, S. K. Mitra

    PolyphasePolyphase FIR StructuresFIR Structures H(z) can be expressed as a sum of two

    terms, with one term containing the even-indexed coefficients and the other

    containing the odd-indexed coefficients:)][][][][][()( 8642 86420 ++++= zhzhzhzhhzH

    )][][][][(7531

    7531

    ++++ zhzhzhzh)][][][][][( 8642 86420 ++++= zhzhzhzhh

    )][][][][(6421

    7531

    ++++ zhzhzhhz

  • 8/13/2019 Elg6163 Fir

    18/38

    18Copyright 2001, S. K. Mitra

    PolyphasePolyphase FIR StructuresFIR Structures

    By using the notation

    we can express H(z) as

    321

    1 7531

    +++= zhzhzhhzE ][][][][)(

    3210 86420

    4++++= zhzhzhzhhzE ][][][][][)(

    )()()(

    2

    1

    12

    0 zEzzEzH

    +=

  • 8/13/2019 Elg6163 Fir

    19/38

    19Copyright 2001, S. K. Mitra

    PolyphasePolyphase FIR StructuresFIR Structures

    In a similar manner, by grouping the termsin the original expression for H(z), we can

    re-express it in the form

    where now

    )()()()( 3223

    113

    0 zEzzEzzEzH ++=

    210 630 ++= zhzhhzE ][][][)(21

    1 741 ++= zhzhhzE ][][][)(

    21

    2 852

    ++= zhzhhzE ][][][)(

  • 8/13/2019 Elg6163 Fir

    20/38

    20Copyright 2001, S. K. Mitra

    PolyphasePolyphase FIR StructuresFIR Structures

    The decomposition of H(z) in the form

    or

    is more commonly known as thepolyphase

    decomposition

    )()()()( 3223

    113

    0 zEzzEzzEzH ++=

    )()()( 2112

    0 zEzzEzH

    +=

  • 8/13/2019 Elg6163 Fir

    21/38

    21Copyright 2001, S. K. Mitra

    PolyphasePolyphase FIR StructuresFIR Structures

    In the general case, an L-branch polyphasedecomposition of an FIR transfer function of

    order Nis of the form

    where

    with h[n]=0 for n > N

    )()( LmLm

    m zEzzH == 1

    0

    +

    =

    +=

    LN

    n

    mm zmLnhzE

    /)(][)(

    1

    0

  • 8/13/2019 Elg6163 Fir

    22/38

    22Copyright 2001, S. K. Mitra

    PolyphasePolyphase FIR StructuresFIR Structures Figures below show the4-branch, 3-

    branch, and 2-branch polyphase

    realization of a transfer function H(z)

    Note: The expression for the polyphase

    components are different in each case)(zEm

  • 8/13/2019 Elg6163 Fir

    23/38

    23Copyright 2001, S. K. Mitra

    PolyphasePolyphase FIR StructuresFIR Structures

    The subfilters in the polyphaserealization of an FIR transfer function are

    also FIR filters and can be realized using

    any methods described so far

    However, to obtain a canonic realization of

    the overall structure, the delays in allsubfilters must be shared

    )(

    L

    m zE

  • 8/13/2019 Elg6163 Fir

    24/38

    24Copyright 2001, S. K. Mitra

    PolyphasePolyphase FIR StructuresFIR Structures Figure below shows a canonic realization of

    a length-9 FIR transfer function obtained

    using delay sharing

  • 8/13/2019 Elg6163 Fir

    25/38

    25Copyright 2001, S. K. Mitra

    FIR Filter Structures Based onFIR Filter Structures Based on

    PolyphasePolyphase DecompositionDecomposition

    We shall demonstrate later that a parallelrealization of an FIR transfer functionH(z)

    based on the polyphase decomposition can

    often result in computationally efficientmultirate structures

    Consider theM-branch Type I polyphasedecomposition ofH(z):

    )()(1

    0M

    kkk

    zEzzH

    =

    =

  • 8/13/2019 Elg6163 Fir

    26/38

    26Copyright 2001, S. K. Mitra

    FIR Filter Structures Based onFIR Filter Structures Based on

    PolyphasePolyphase DecompositionDecomposition

    A direct realization ofH(z)based on theType I polyphase decomposition is shown

    below

  • 8/13/2019 Elg6163 Fir

    27/38

    27Copyright 2001, S. K. Mitra

    FIR Filter Structures Based onFIR Filter Structures Based on

    PolyphasePolyphase DecompositionDecomposition

    The transpose of the Type I polyphase FIRfilter structure is indicated below

  • 8/13/2019 Elg6163 Fir

    28/38

    28Copyright 2001, S. K. Mitra

    Computationally EfficientComputationally Efficient

    DecimatorsDecimators

    Consider first the single-stage factor-of-Mdecimator structure shown below

    We realize the lowpass filterH(z) using the

    Type I polyphase structure as shown on thenext slide

    M][nx )(zH ][nyv[n]

    Computationally EfficientComputationally Efficient

  • 8/13/2019 Elg6163 Fir

    29/38

    29Copyright 2001, S. K. Mitra

    Computationally EfficientComputationally Efficient

    DecimatorsDecimators Using the cascade equivalence #1 we arrive

    at the computationally efficient decimatorstructure shown below on the right

    Decimator structure based on Type I polyphase decomposition

    y[n] y[n]x[n]x[n]

    ][nv

  • 8/13/2019 Elg6163 Fir

    30/38

    30Copyright 2001, S. K. Mitra

    Computationally EfficientComputationally Efficient

    DecimatorsDecimators

    To illustrate the computational efficiency ofthe modified decimator structure, assume

    H(z) to be a length-Nstructure and the input

    sampling period to beT= 1

    Now the decimator outputy[n] in the

    original structure is obtained by down-sampling the filter outputv[n]by a factor of

    M

  • 8/13/2019 Elg6163 Fir

    31/38

    31Copyright 2001, S. K. Mitra

    Computationally EfficientComputationally Efficient

    DecimatorsDecimators

    It is thus necessary to computev[n] at

    Computational requirements are thereforeN

    multiplications and additions per

    output sample being computed

    However, asn increases, stored signals inthe delay registers change

    ...,2,,0,,2,...n =

    )1( N

  • 8/13/2019 Elg6163 Fir

    32/38

    32Copyright 2001, S. K. Mitra

    Computationally EfficientComputationally Efficient

    DecimatorsDecimators

    Hence, all computations need to becompleted in one sampling period, and for

    the following sampling periods the

    arithmetic units remain idle

    The modified decimator structure also

    requiresNmultiplications andadditions per output sample being computed

    )1( N

    )1(

  • 8/13/2019 Elg6163 Fir

    33/38

    33Copyright 2001, S. K. Mitra

    Computationally EfficientComputationally Efficient

    Decimators and InterpolatorsDecimators and Interpolators

    However, here the arithmetic units areoperative at all instants of the output

    sampling period which is 1/Mtimes that of

    the input sampling period

    Similar savings are also obtained in the case

    of the interpolator structure developed usingthe polyphase decomposition

    Comp tationall EfficientComputationally Efficient

  • 8/13/2019 Elg6163 Fir

    34/38

    34Copyright 2001, S. K. Mitra

    Computationally EfficientComputationally Efficient

    InterpolatorsInterpolators Figures below show the computationally

    efficient interpolator structures

    Interpolator based onType I polyphase decomposition

  • 8/13/2019 Elg6163 Fir

    35/38

    35Copyright 2001, S. K. Mitra

    Computationally EfficientComputationally Efficient

    Decimators and InterpolatorsDecimators and Interpolators

    More efficient interpolator and decimator

    structures can be realized by exploiting the

    symmetry of filter coefficients in the case of

    linear-phase filtersH(z)

    Consider for example the realization of a

    factor-of-3 (M= 3) decimator using alength-12 Type 1 linear-phase FIR lowpass

    filter

  • 8/13/2019 Elg6163 Fir

    36/38

    36Copyright 2001, S. K. Mitra

    Computationally EfficientComputationally Efficient

    Decimators and InterpolatorsDecimators and Interpolators

    The corresponding transfer function is

    A conventional polyphase decomposition of

    H(z) yields the following subfilters:

    54321 ]5[]4[]3[]2[]1[]0[)( +++++= zhzhzhzhzhhzH

    109876 ]0[]1[]2[]3[]4[]5[ 11 ++++++ zhzhzhzhzhzh

    3210 ]2[]5[]3[]0[)( +++= zhzhzhhzE

    3211 ]1[]4[]4[]1[)(

    +++= zhzhzhhzE

    3212 ]0[]3[]5[]2[)( +++= zhzhzhhzE

  • 8/13/2019 Elg6163 Fir

    37/38

    37Copyright 2001, S. K. Mitra

    Computationally EfficientComputationally Efficient

    Decimators and InterpolatorsDecimators and Interpolators

    Note that still has a symmetric

    impulse response, whereas is the

    mirror image of

    These relations can be made use of in

    developing a computationally efficient

    realization using only 6 multipliers and11two-input adders as shown on the next slide

    )(1 zE

    )(0 zE

    )(2 zE

  • 8/13/2019 Elg6163 Fir

    38/38

    38Copyright 2001, S. K. Mitra

    Computationally EfficientComputationally Efficient

    Decimators and InterpolatorsDecimators and Interpolators

    Factor-of-3 decimator with a linear-phase

    decimation filter