document4

44
1 Digital Signal Processing A.S.Kayhan DIGITAL SIGNAL PROCESSING Part 3 Digital Signal Processing A.S.Kayhan IIR Filters: Infinite impulse response (IIR) filters have rational transfer functions as N k k k M k k k z a z b z H 0 0 ) ( Some IIR filter types are: Butterworth, Chebyshev, Elliptical. IIR filters have to be stable. IIR filters may not have linear-phase.

Upload: fikret

Post on 11-Nov-2015

223 views

Category:

Documents


7 download

TRANSCRIPT

  • 1Digital Signal Processing A.S.Kayhan

    DIGITAL SIGNAL

    PROCESSING

    Part 3

    Digital Signal Processing A.S.Kayhan

    IIR Filters:Infinite impulse response (IIR) filters have rational transfer functions as

    N

    k

    kk

    M

    k

    kk

    za

    zbzH

    0

    0)(

    Some IIR filter types are: Butterworth, Chebyshev, Elliptical. IIR filters have to be stable. IIR filters may not have linear-phase.

  • 2Digital Signal Processing A.S.Kayhan

    Filter Specifications (Low-pass):

    )(log20 10

    Design analog filter transform to Digital filter

    Digital Signal Processing A.S.Kayhan

    Analog Butterworth Filters:Approximate ideal LPF with magnitude-squared response

    c

    cKH,0

    ,)(

    2

    by the following rational function:

    0,11

    )(22

    1

    221

    212

    nn

    n

    nn b

    bb

    aaKH

    |H()|2 must be even function of , and denominator degree must be higher than degree of numerator (lowpass).

  • 3Digital Signal Processing A.S.Kayhan

    .1,,2,1, niba ii

    .1)( 22

    nnb

    KH

    Then, we have

    For maximal flatness at the origin, =0, The first 2n-1 derivatives of |H()|2 must be zero. This requires

    Maximal flatness also at , =, requires

    0,11

    )(22

    1

    221

    212

    nn

    n

    nn b

    bb

    bbKH

    .1,,2,1,0 niba ii

    Digital Signal Processing A.S.Kayhan

    .

    1

    1)( 2

    2

    n

    o

    H

    Then, we have the Butterworth response

    Let |H(=0)|2 = 1. Then

    At the half-power frequency

    n

    onn

    on

    bb

    H

    2

    2

    2 1

    1

    1

    2

    1)(

    .11

    )(2

    2

    nnb

    H

  • 4Digital Signal Processing A.S.Kayhan

    Consider the filter specifications:

    .dB)(log20 10 H

    .dB1log10

    2

    10

    n

    o

    n

    o

    2

    10/ 110 no 2/110/ 110

    Using max and pn

    o

    p

    2

    10/ 110 max

    Using min and sn

    o

    s

    2

    10/ 110 min

    To find n:

    Digital Signal Processing A.S.Kayhan

    Dividing these equations

    n

    p

    s

    2

    10/

    10/

    110

    110max

    min

    Taking logarithm, we get the filter order as:

    p

    s

    nlog2

    110

    110log 10/

    10/

    max

    min

  • 5Digital Signal Processing A.S.Kayhan

    then, set the denominator to zero

    We can normalize the frequency so that o = 1. Then

    To find the filter poles, we let =s/j,

    nnn sjssHsH

    22 )1(1

    1

    )/(1

    1)()(

    .11

    )(2

    2

    nH

    1)1(0)1(1 22 nnnn ss

    If n is even, then

    .12,...,1,0,

    .12,...,1,0,1

    )2

    21(

    )2(2

    nkes

    nkes

    n

    kj

    k

    kjn

    Digital Signal Processing A.S.Kayhan

    If n is odd, then

    .12,...,1,0,

    .12,...,1,0,1 22

    nkes

    nkes

    n

    kj

    k

    kjn

    Note that all the poles lie on a circle with radius 1, because the frequency is normalized. (If we want to design analog filter we need to correct this). Also, choose the poles in the left-half plane to get a stable filter.

  • 6Digital Signal Processing A.S.Kayhan

    Example: Design specs. for a Butterworth LP filter:At f = 2000 Hz, max= 3dBAt f = 3000 Hz, min= 10dBThen, the filter order n isn 2.7154 n = 3.Poles are at

    .5,...,1,0,3 kesk

    j

    k

    .

    ))23

    21

    ())(23

    21

    ()(1(

    1

    )1)(1(

    1)(

    2

    jsjss

    ssssH

    Digital Signal Processing A.S.Kayhan

    Analog Chebyshev Filters:We can generalize Butterworth response as:

    .)(11

    )(1

    1)(

    22

    2

    nn F

    H

    Fn() is a function of . Now, consider:

    ))(coscos()cos(

    )(cos)cos(1

    1

    xnny

    xx

    n

    This is the Chebyshev polynomial of order n. When

    ))(coshcosh()(,1 1 xnxCx n

    When x 1 , Cn(x) 0.

  • 7Digital Signal Processing A.S.Kayhan

    Cn(x) has zeros in -1< x < 1 :

    -1 0 1-1

    0

    1

    x

    C1(x)

    -1 0 1-1

    0

    1

    x

    C2(x)

    -1 0 1-1

    0

    1

    x

    C3(x)

    -1 0 1-1

    0

    1

    x

    C4(x)

    -1 0 1-1

    0

    1

    x

    C5(x)

    .)(,1)(

    ),()(2)(

    1

    11

    xxCxC

    xCxCxxC

    o

    nnn

    Digital Signal Processing A.S.Kayhan

    Use Cn(.) in :

    )(1

    1)(

    22

    2

    nCH

    ))(coscos()(,1

    ))(coshcosh()(,11

    1

    nC

    nC

    n

    n

    2 1 , is known as the ripple factor.

  • 8Digital Signal Processing A.S.Kayhan

    Behaviour at =0:

    even isn if,)1(

    1)0(,1)(

    odd isn if,1)0(,0)(

    2

    22

    22

    HC

    HC

    n

    n

    Behaviour at =1:

    )1(

    1)1(

    n allfor ,1)(

    2

    2

    2

    H

    C n

    Digital Signal Processing A.S.Kayhan

    110)(1log10 10max/22 nCThe attenuation is

    When .dB01.31)(22 nC

    This defines the half-power frequency (3dB cut-off) hp.Then,

    ).1()).1

    (cosh1

    cosh(

    )1

    (cosh1

    )(cosh

    ))(coshcosh(1

    )(

    1

    11

    1

    hphp

    hp

    hphpn

    n

    n

    nC

  • 9Digital Signal Processing A.S.Kayhan

    The specifications for a Chebyshev filter are max, min, s(p=1). Bandpass is between 0 1 rad/s.To find n:

    )(110

    )(1log102210/

    22min

    minsn

    sn

    C

    C

    With 110 10max/2

    110

    110))(coshcosh(

    10/

    10/1

    max

    min

    sn

    Finally,

    )(cosh

    110110cosh

    1

    10/

    10/1

    max

    min

    s

    n

    Digital Signal Processing A.S.Kayhan

    To find the filter poles, we let =s/j,

    )/(1

    1)()(

    22 jsCsHsH

    n

    then

    1

    )/(0)/(1 22 jjsCjsC nn

    Letjsjvuw /)cos()cos(

    wjs )/(cos 1

    With

    )sinh()sin()cosh()cos()/(

    )cos())/(coscos()/( 1

    nvnujnvnujsC

    nwjsnjsC

    n

    n

    )cosh(2

    )cos(,2

    )cos( xee

    jxee

    xxxjxjx

  • 10

    Digital Signal Processing A.S.Kayhan

    With

    1

    )/( jjsC n then

    1

    )sinh()sin(

    0)cosh()cos(

    nvnu

    nvnu

    cosh(nv) can never be zero, therefore cos(nu) must be zero. It is possible for

    .12,,1,0),12(2

    ,2

    5,

    2

    3,

    2

    nkkn

    u

    nnnu

    k

    k

    Digital Signal Processing A.S.Kayhan

    For these values of u, sin(nu) = 1, then

    .)1

    (sinh1 1 an

    v k

    Remember that

    jvuwjs )/(cos 1then

    jakn

    jwjs kk 122cos)cos(

    The poles are :12,,1,0, nkjs kkk

    )cosh()2

    12cos(

    )sinh()2

    12sin(

    an

    k

    an

    k

    k

    k

    Choose left half poles.

  • 11

    Digital Signal Processing A.S.Kayhan

    Discrete Time Filter Design(IIR):There are 3 approches:1-Sampling (Impulse invariance)2-Bilinear transformation3-Optimal procedures

    Impulse invariance method:We can sample the impulse response hc(t) of an analog filter with desired specifications as (Td is sampling interval):

    .][ dcd nThTnh then

    ).2

    ()( kTT

    HHdk d

    c

    Digital Signal Processing A.S.Kayhan

    If dc TH /,0)( then

    .),()(

    d

    c THH

    Analog and digital frequencies have a linear relation: . dT

    Consider the transfer function of a system expressed as

    ,)(1

    N

    k k

    kc ss

    AsH

    Then, the impulse response is

    .0,)(1

    teAthN

    k

    tskc

    k

  • 12

    Digital Signal Processing A.S.Kayhan

    The impulse response of the discrete time filter is

    .)(

    )(

    1

    1

    nueATnh

    nueATnThTnh

    N

    k

    nTskd

    N

    k

    nTskddcd

    dk

    dk

    Transfer (or system) function of the discrete time filter is

    .1

    )(1

    1

    N

    kTs

    kd

    ze

    ATzH

    dk

    Poles are .dk Tsk ezss

    If Hc(s) is stable (k < 0), then H(z) is also stable (|z| < 1).

    Digital Signal Processing A.S.Kayhan

    Example: Transfer function of analog filter is

    .

    )23

    21

    (

    12

    121

    )23

    21

    (

    12

    121

    1

    1

    )1)(1(

    1)(

    2

    js

    j

    js

    j

    s

    ssssH c

    then

    .

    1

    )12

    121

    (

    1

    )12

    121

    (

    1)(

    )2

    3

    2

    1(1)2

    3

    2

    1(1

    1

    jT

    d

    jT

    d

    Td

    dd

    d

    ez

    jT

    ez

    jT

    ez

    TzH

  • 13

    Digital Signal Processing A.S.Kayhan

    Bilinear Transformation:Transformation needed to convert an analog filter to a discrete time filter must have following properties:1- j axis of the s-plane must be mapped onto the unit circle of the z-plane,2- stable analog filters must be tranformed into stable discrete time filters (left hand plane of the s-plane must be mapped into inside the unit circle of the z-plane).Following BT satisfies these conditions:

    ./1

    /1

    1

    11

    1

    Ks

    Ksz

    z

    zKs

    Digital Signal Processing A.S.Kayhan

    Let jrezjs ,

    then

    .)/()/1(

    )/()/1(22

    222

    KK

    KKr

    Therefore

    )u.c. theinside(1)planeLH(0 r

    )u.c. the(1)axis (0 rj

    )u.c. theoutside(1)planeRH(0 r

  • 14

    Digital Signal Processing A.S.Kayhan

    Digital Signal Processing A.S.Kayhan

    Now, let jezjs ,

    then.

    )(

    )(

    1

    12/2/2/

    2/2/2/

    jjj

    jjj

    j

    j

    eee

    eeeK

    e

    eKj

    ).2/tan()2/cos(

    )2/sin(

    jKKjj

    or).2/tan( K

  • 15

    Digital Signal Processing A.S.Kayhan

    Observations:1- According to Taylor series expansion of tan(), for small

    .2/24/2/ 3 KK 2- For high frequencies, the relation is nonlinear causing a distortion called warping effect. Therefore, BT is usually used for the design of LPF to avoid this.

    Digital Signal Processing A.S.Kayhan

    Discrete Butterworth Filter Design:

    We convert a frequency normalized analog Butterworth filterto a discrete filter using the BT.

    Normalized half power frequecy HP=1 is mapped into the discrete half power frequency HP. To do that, we set K to

    ).2/cot()2/tan(/)1( HPHPHPbK

  • 16

    Digital Signal Processing A.S.Kayhan

    Then, we use ).5.0tan(/)5.0tan()5.0tan( HPbK

    in nnH 2

    2

    1

    1)(

    And get the discrete Butterworth Low Pass Filter as:

    n

    HP

    nH 22

    )5.0tan()5.0tan(

    1

    1)(

    Using the design specifications, we find the filter order as

    )5.0tan()5.0tan(log2

    110110log 10/

    10/

    max

    min

    p

    s

    n

    Digital Signal Processing A.S.Kayhan

    The half-power freq. is

    npHP 2/110/

    1

    110

    )5.0tan(tan2

    max

    ).5.0cot( HPbK

    Example: Consider the second order analog filter

    )12(

    1)(

    22

    sssH

    Applying the BT, we get (Kb = 1)

    2929.0)1716.0(

    )1()(

    2

    2

    2

    z

    zzH

  • 17

    Digital Signal Processing A.S.Kayhan

    Remarks:1- Given the specs.:

    a) find the filter order nb) obtain the analog filter H(s)(using LHP poles)c) calculate HP and Kbd) use biliear transformation to find H(z).

    2- H(z) is BIBO stable, because H(s) is stable.3- Applying the BT to high order filters may be tedious. Therefore, first express H(s) as product or some of first and second order functions, then apply the BT.

    Digital Signal Processing A.S.Kayhan

    Example: Design specs. for a LP digital Butterworth filter:At f = 0 Hz, 1= 18dBAt f = 2250 Hz, 2= 21dBAt f = 2500 Hz, 3= 27dBSampling freq. fsmp= 9000 Hz(ej0)= 18dBmax = 2 1=3dBmin = 3 1=9dB smp

    ss

    smp

    pp f

    f

    f

    f 2,2

    Filter order n 5.52,n = 6, Kb = 1 and a gain G for = 18dB

    )02.0.0)(17.0)(59.0(

    )1(0037.0)(

    222

    6

    6

    zzz

    zzH

  • 18

    Digital Signal Processing A.S.Kayhan

    Discrete Chebyshev Filter Design:

    We find the constant K by transforming (normalized passband freq.) P=1 into the discrete passband frequency P. We get

    )5.0tan(/)5.0tan()5.0tan(/1 PPcK

    And get the discrete Chebyshev Low Pass Filter as:

    ))5.0tan(/)5.0(tan(1

    1)(

    22

    2

    pnCH

    Digital Signal Processing A.S.Kayhan

    Using C1(1)=1, we let max, p

    110

    1log10

    10/

    2max

    min

    Also using min, sWe find the filter order

    )]5.0tan(/)5.0[tan(cosh

    110110cosh

    1

    10/

    10/1

    max

    min

    ps

    n

  • 19

    Digital Signal Processing A.S.Kayhan

    Example: Design specs. for a LP digital Chebyshev filter:At f = 0 Hz, 1= 0dBAt f = 2250 Hz, max= 3dBAt f = 2500 Hz, min= 10dBSampling freq. fsmp= 9000 Hz

    Filter order n = 3, Kc = 1

    )54.0)(72.015.0(

    )1(09.0)(

    2

    3

    3

    zzz

    zzH

    smp

    ss

    smp

    pp f

    f

    f

    f 2,2

    Digital Signal Processing A.S.Kayhan

    Example: Design specs. for a LP digital Chebyshev filter:At = 2/5 rad, max= 1dBAt = /2 rad, min= 9dB

    Filter order n = 3

    )472.0)(619.0505.0(

    )1(736.0)(

    2

    3

    3

    zzz

    zzH

    Example: Design specs. for a LP digital Butterworth filter:At = /2 rad, max= 3dB = 0 rad, = 0dBAt = 5/9 rad, min= 10dB

    Filter order n = 7, Kb = 1

    )052.0)(232.0)(636.0(

    )1(01656.0)(

    222

    7

    7

    zzzz

    zzH

  • 20

    Digital Signal Processing A.S.Kayhan

    Frequency Transformations:

    The objective is to obtain transfer functions of other types of dicrete filters from already available prototype Low Pass Filters using tranformation functions g(z) as

    ))(()( zgHzH LP

    Example: Design specs. for a LP digital Chebyshev filter:At f = 0 Hz, = 0dBAt f = 2250 Hz, 2= 21dBAt f = 2500 Hz, 3= 27dBSampling freq. fsmp= 9000 Hz

    Digital Signal Processing A.S.Kayhan

    39.0802.0691.0

    )1(09.0)(

    23

    3

    zzz

    zzH LPF

  • 21

    Digital Signal Processing A.S.Kayhan

    Now, we want a HPF with cutt-off at 3.6kHz, we use following transformation

    )5095.01(

    )5095.0(1

    11

    z

    zz

    6884.0102.2361.2

    )133(0066.0)(

    23

    23

    zzz

    zzzzH HPF

    Digital Signal Processing A.S.Kayhan

    Design of FIR Filters by Windowing:

    Ideal frequency response and corresponding impulse response functions are .),( nheH djd

    Generally hd[n] is infinitely long. To obtain a causal practical FIR filter, we can truncate it as

    otherwise.,0

    0, Mnnhnh d

    In a general form we can write it as nwnhnh d

    Where w[n] is window function.

  • 22

    Digital Signal Processing A.S.Kayhan

    In frequency domain, we have

    .)()(2

    1)(

    deWeHeH jjdj

    Digital Signal Processing A.S.Kayhan

    Some commonly used window functions are Rectangular, Bartlett, Hamming, Hanning, Blackman, Kaiser.

    Some important factors in choosing windows are: Main lobe width and Peak side lobe level. For rectangular:

  • 23

    Digital Signal Processing A.S.Kayhan

    Main lobe width and transition region; Peak side lobe level and oscillations of filter are related.

    Digital Signal Processing A.S.Kayhan

  • 24

    Digital Signal Processing A.S.Kayhan

    Digital Signal Processing A.S.Kayhan

  • 25

    Digital Signal Processing A.S.Kayhan

    Discrete Time Fourier Series (DTFS):

    Consider a periodic sequence with period N:

    .][11

    0

    2~~

    N

    k

    nkN

    jekX

    Nnx

    Which can be represented by a Fourier series as:

    .][21

    0

    ~~ nkN

    jN

    n

    enxkX

    The DTFS coefficients are obtained as:

    .~~

    Nnxnx

    nx~

    Digital Signal Processing A.S.Kayhan

    Let NjN eW

    2

    The DTFS analysis and synthesis equations are:

    .][1

    0

    ~~nk

    N

    N

    n

    WnxkX

    .][11

    0

    ~~

    N

    k

    nkNWkXN

    nx

    Example: Consider the periodic impulse train:

    r

    rNnnx ][~

    The DTFS

    . allfor 1][1

    0

    ~

    kWnkX nkNN

    n

  • 26

    Digital Signal Processing A.S.Kayhan

    Similarly, ][~~

    lkXnxW nlN

    Properties: 1- Linearity: It is linear.2- Shift of a sequence: If ][

    ~~

    kXnx

    then ][~~

    kXWmnx kmN

    3- Periodic convolution: Consider two periodic sequences with period N

    ][~

    1

    ~

    1 kXnx ][~

    2

    ~

    2 kXnx

    Then,

    ][][][~

    2

    ~

    1

    ~

    3 kXkXkX .][][1

    0

    ~

    2

    ~

    13

    ~

    N

    m

    mxmnxnx

    Digital Signal Processing A.S.Kayhan

    Example: Consider periodic convolution of two sequences:

  • 27

    Digital Signal Processing A.S.Kayhan

    Sampling the Fourier Transform:

    Consider signal x[n] with DTFT X() and assume by sampling X() , we get

    kN

    XXkXk

    N

    2|)(][ 2

    ~

    ][~

    kX could be the sequence of DTFS coefficients of a periodic signal which may be obtained as

    .][11

    0

    ~~

    N

    k

    nkNWkXN

    nx

    Digital Signal Processing A.S.Kayhan

    Substituting,

    k

    Nm

    mj XkXemxX 2

    ~

    |)(,

    .*~

    rr

    rNnxrNnnxnx then,

  • 28

    Digital Signal Processing A.S.Kayhan

    If N is too small, then aliasing occurs in the time domain.

    If there is no aliasing, we can recover x[n].

    Digital Signal Processing A.S.Kayhan

    Discrete Fourier Tranform (DFT):

    DFT is obtained by taking samples of the DTFT. Remember DTFT is defined as:

    n

    njj enxeX ][)(

    We take samples of X(ej) at uniform intervals as:

    .1,1,0,)(][ 2

    NkeXkXk

    N

    j

    We define: N

    j

    N eW2

  • 29

    Digital Signal Processing A.S.Kayhan

    Then the DFT is defined as (analysis equation):

    N

    n

    knNWnxkX

    0

    ][][

    for k=0,1,...,N-1. The inverse DFT is defined as (synthesis equation):

    N

    n

    knNWkXN

    nx0

    ][1

    ][

    for n=0,1,...,N-1.

    Digital Signal Processing A.S.Kayhan

    Example:N=5

  • 30

    Digital Signal Processing A.S.Kayhan

    N=10

    Digital Signal Processing A.S.Kayhan

    Properties:1- Linearity: DFT is a linear operation.2- Circular shift:

    ].[10,2

    kXeNnmnxkm

    Nj

    N

  • 31

    Digital Signal Processing A.S.Kayhan

    3- Circular convolution:

    kXkXkX

    mxmnxnxnxnxN

    mN

    213

    1

    021213 ][][

    Example:

    Digital Signal Processing A.S.Kayhan

    Example: N=L

  • 32

    Digital Signal Processing A.S.Kayhan

    N=2L

    Digital Signal Processing A.S.Kayhan

    4- Multiplication(Modulation):

    .213213 kXkXkXnxnxnx

    Linear Convolution Using the DFT:

    Since there are efficient algorithms to take DFT, like FFT, we can use it instead of direct convolution as:

    1. Compute N point DFTs, 2. Multiply them to get 3. Compute the inverse DFT, to get:

    . and 21 kXkX .213 kXkXkX

    nxnxnx 213

  • 33

    Digital Signal Processing A.S.Kayhan

    Linear Convolution of Finite Length Signals:Consider two sequences x1[n] of length L and x2[n] of

    length P, and x3[n] = x1[n]* x2[n].Observe that x3[n] will be of length (L+P-1).

    Circular Convolution as Linear Convolution with Aliasing :

    Consider again x1[n] of length L and x2[n] of length P, and x3[n] = x1[n]* x2[n].

    )()()( 213 jjj eXeXeX

    Digital Signal Processing A.S.Kayhan

    Taking N samples .213 kXkXkX

    Now, taking the inverse DFT, we have

    otherwise.,0

    10,33

    NnrNnxnx

    rp

    nxnxnx p 213

    This circular convolution is identical to the linear convolution corresponding to X1(ej) X2(ej), if N (L+P-1).

  • 34

    Digital Signal Processing A.S.Kayhan

    Example:

    Digital Signal Processing A.S.Kayhan

    Example:

  • 35

    Digital Signal Processing A.S.Kayhan

    Digital Signal Processing A.S.Kayhan

    LTI Systems Using the DFT :Consider x[n] of length L and h[n] of length P, and y[n] =

    x[n]* h[n] will be of length (L+P-1).To obtain the result of linear convolution using the DFT,

    we must use N ( (L+P-1))-point DFTs. For that x[n] and h[n] must be augmented with zeros (zero-padding).

    Overlap-Add Method :Consider h[n] of length P, and length of x[n] is much

    grater than P.We can write x[n] as combination of length L segments:

    ,otherwise,0

    10,

    LnrLnx

    nx r

    r

    r rLnxnx

  • 36

    Digital Signal Processing A.S.Kayhan

    Since the system is LTI then

    nhnxnyrLnyny rrr

    r *,

    Each output segment yr[n] can be obtained using (L+P-1) point DFT.

    Example:

    Digital Signal Processing A.S.Kayhan

  • 37

    Digital Signal Processing A.S.Kayhan

    Overlap-Save Method :Consider again h[n] of length P, and length of x[n] is much

    grater than P.In this method L-point circular convolution (or DFT) is

    used. Since the first (P-1) points will be incorrect, input segments must overlap.

    We can write each L sample segment of x[n] as :

    10,)1()1( LnPPLrnxnx r

    11,

    ,)1()1(

    LnPnyny

    PPLrnyny

    rpr

    rr

    Digital Signal Processing A.S.Kayhan

    Example:

  • 38

    Digital Signal Processing A.S.Kayhan

    Efficient Computation of the DFT :Remember the definition of the DFT and inverse DFT

    1

    0

    ][][N

    n

    knNWkXnx

    1

    0

    ][][N

    n

    knNWnxkX

    N2 comlex multiplications and N(N-1) additions or 4N2 real mult. and 4N(N-2) real additions necessary:

    N

    n

    knN

    knN

    knN

    knN

    Wnx

    Wnxj

    Wnx

    Wnx

    kX0

    }Re{}][Im{

    }Im{}][Re{

    }Im{}][Im{

    }Re{}][Re{

    ][

    Digital Signal Processing A.S.Kayhan

    To improve the efficiency, we can use some properties as:

    nNkN

    knN

    nNkN

    knN

    knN

    nNkN

    WWW

    WWW)()(

    *)(

    )2

    )()1

    }.Re{}][Re{}][Re{}Re{}][Re{}Re{}][Re{ )(

    knN

    nNkN

    knN

    WnNxnx

    WnNxWnx

    Example:

  • 39

    Digital Signal Processing A.S.Kayhan

    Fast Fourier Transform(FFT):Fast Fourier Transform algorithms are used to implement DFT efficiently to reduce the number of multiplication and addition operations.Two main algorithms are:Decimation in time and Decimation in frequency. Both these algorithms require that N=2m.The number of operations using either of these will require (N/2)log2N complex multiplications and Nlog2Nadditions.Direct implementation of DFT requires N2 complex multiplications and additions. For N=1024= 210

    N2=1048576 but Nlog2N=10240.

    Digital Signal Processing A.S.Kayhan

    Decimation in time FFT Algorithm:Assume N=2m

    1,,1,0,][][1

    0

    NkWnxkXN

    n

    knN

    Which can be written as

    oddn

    knN

    evenn

    knN WnxWnxkX ][][][

    With n = 2r (even) and n = 2r+1 (odd)

    .

    ]12[)(]2[

    )(]12[)(]2[][

    12/

    02/

    12/

    02/

    12/

    0

    212/

    0

    2

    kHWkG

    WrxWWrx

    WrxWWrxkX

    kN

    N

    rN

    kN

    N

    rN

    N

    r

    rkN

    kN

    N

    r

    rkN

    rkrk

  • 40

    Digital Signal Processing A.S.Kayhan

    .][ kHWkGkX kN

    Requires N+2(N/2)2 multiplications

    Digital Signal Processing A.S.Kayhan

    Since G[k] and H[k] requires 2(m-1)-point DFTs, each one can be similarly decomposed until we reach 2-point DFTs.

  • 41

    Digital Signal Processing A.S.Kayhan

    Digital Signal Processing A.S.Kayhan

    Butterfly:(in place comp.)

    Bit reversed order

  • 42

    Digital Signal Processing A.S.Kayhan

    Decimation in frequency FFT Algorithm:Again assume N=2m

    1,,1,0,][][1

    0

    NkWnxkXN

    n

    knN

    then)12/(,,1,0,][]2[

    1

    0

    2

    NrWnxrXN

    n

    rnN

    1

    2/

    212/

    0

    2 ][][]2[N

    Nn

    rnN

    N

    n

    rnN WnxWnxrX

    12/

    0

    )2/(212/

    0

    2 ]2/[][]2[N

    n

    NnrN

    N

    n

    rnN WNnxWnxrX

    12/

    0

    12/

    02/2/ ][])2/[][(]2[

    N

    n

    N

    n

    rnN

    rnN WngWNnxnxrX

    Digital Signal Processing A.S.Kayhan

    Similarly for

    .][

    ])2/[][(]12[

    12/

    02/

    12/

    02/

    N

    n

    rnN

    nN

    N

    n

    rnN

    nN

    WWnh

    WWNnxnxrX

    )12/(0 Nr

  • 43

    Digital Signal Processing A.S.Kayhan

    Procedure is repeated until 2-point DFTs

    Digital Signal Processing A.S.Kayhan

    Computation of Inverse DFT:

    1,,1,0,][1

    ][0

    NnWkXN

    nxN

    n

    knN

    1,,1,0,][][0

    NkWnxkXN

    n

    knN

    ][DFT1][1][ *0

    ** kXN

    WkXN

    nxN

    n

    knN

    ** ][DFT1][ kXN

    nx

  • 44

    Digital Signal Processing A.S.Kayhan

    End of Part 3