fftlec

Upload: nizar-ayub

Post on 03-Jun-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/11/2019 fftlec

    1/13

    Fast Fourier Transforms

    Quote of the Day

    On two occasions I have been asked, Pray, Mr.

    Babbage, if you put into the machine wrong figures,will the right answers come out? I am not ablerightly to apprehend the kind of confusion of ideas

    that could provoke such a question.

    Charles Babbage

    Content and Figures are from Discrete-Time Signal Processing, 2e by Oppenheim, Shafer, and Buck, 1999-2000 Prentice HallInc.

  • 8/11/2019 fftlec

    2/13

    Copyright (C) 2005 Gner Arslan 351M Digital Signal Processing 2

    Discrete Fourier Transform

    The DFT pair was given as

    Baseline for computational complexity:

    Each DFT coefficient requires

    N complex multiplications

    N-1 complex additions

    All N DFT coefficients require N2complex multiplications

    N(N-1) complex additions

    Complexity in terms of real operations 4N2real multiplications

    2N(N-1) real additions

    Most fast methods are based on symmetry properties

    Conjugate symmetry

    Periodicity in n and k

    1N

    0k

    knN/2jekX

    N

    1]n[x

    1N

    0n

    knN/2je]n[xkX

    knN/2jnkN/2jkNN/2jnNkN/2j eeee nNkN/2jNnkN/2jknN/2j eee

  • 8/11/2019 fftlec

    3/13

    Copyright (C) 2005 Gner Arslan 351M Digital Signal Processing 3

    The Goertzel Algorithm

    Makes use of the periodicity

    Multiply DFT equation with this factor

    Define

    With this definition and using x[n]=0 for nN-1

    X[k] can be viewed as the output of a filter to the input x[n]

    Impulse response of filter:

    X[k] is the output of the filter at time n=N

    1ee k2jNkN/2j

    1N

    0r

    nNrN/2j1N

    0r

    rnN/2jkNN/2j e]r[xe]r[xekX

    r

    rnkN/2jk rnue]r[xny

    Nnk

    nykX

    nue knN/2j

  • 8/11/2019 fftlec

    4/13

    Copyright (C) 2005 Gner Arslan 351M Digital Signal Processing 4

    The Goertzel Filter

    Goertzel Filter

    Computational complexity

    4N real multiplications

    2N real additions

    Slightly less efficient than the direct method

    Multiply both numerator and denominator

    1kN2

    jk

    ze1

    1

    zH

    21

    1k

    N

    2j

    1k

    N

    2j

    1k

    N

    2j

    1k

    N

    2j

    k

    zzN

    k2cos21

    ze1

    ze1ze1

    ze1zH

  • 8/11/2019 fftlec

    5/13

    Copyright (C) 2005 Gner Arslan 351M Digital Signal Processing 5

    Second Order Goertzel Filter

    Second order Goertzel Filter

    Complexity for one DFT coefficient Poles: 2N real multiplications and 4N real additions

    Zeros: Need to be implement only once 4 real multiplications and 4 real additions

    Complexity for all DFT coefficients Each pole is used for two DFT coefficients

    Approximately N2real multiplications and 2N2real additions

    Do not need to evaluate all N DFT coefficients Goertzel Algorithm is more efficient than FFT if

    less than M DFT coefficients are needed

    M < log2N

    21

    1k

    N

    2j

    k

    zzN

    k2cos21

    ze1zH

  • 8/11/2019 fftlec

    6/13

    Copyright (C) 2005 Gner Arslan 351M Digital Signal Processing 6

    Decimation-In-Time FFT Algorithms

    Makes use of both symmetry and periodicity

    Consider special case of N an integer power of 2

    Separate x[n] into two sequence of length N/2 Even indexed samples in the first sequence

    Odd indexed samples in the other sequence

    Substitute variables n=2r for n even and n=2r+1 for odd

    G[k] and H[k] are the N/2-point DFTs of each subsequence

    1N

    oddn

    knN/2j1N

    evenn

    knN/2j1N

    0n

    knN/2j e]n[xe]n[xe]n[xkX

    kHWkG

    W]1r2[xWW]r2[x

    W]1r2[xW]r2[xkX

    kN

    12/N

    0r

    rk2/N

    kN

    12/N

    0r

    rk2/N

    12/N

    0r

    k1r2N

    12/N

    0r

    rk2N

  • 8/11/2019 fftlec

    7/13

    Copyright (C) 2005 Gner Arslan 351M Digital Signal Processing 7

    Decimation In Time

    8-point DFT example usingdecimation-in-time

    Two N/2-point DFTs

    2(N/2)2complex multiplications

    2(N/2)2complex additions

    Combining the DFT outputs

    N complex multiplications

    N complex additions

    Total complexity

    N2/2+N complex multiplications

    N2/2+N complex additions

    More efficient than direct DFT

    Repeat same process

    Divide N/2-point DFTs into Two N/4-point DFTs

    Combine outputs

  • 8/11/2019 fftlec

    8/13

    Copyright (C) 2005 Gner Arslan 351M Digital Signal Processing 8

    Decimation In Time Contd

    After two steps of decimation in time

    Repeat until were left with two-point DFTs

  • 8/11/2019 fftlec

    9/13

    Copyright (C) 2005 Gner Arslan 351M Digital Signal Processing 9

    Decimation-In-Time FFT Algorithm

    Final flow graph for 8-point decimation in time

    Complexity:

    Nlog2N complex multiplications and additions

  • 8/11/2019 fftlec

    10/13

    Copyright (C) 2005 Gner Arslan 351M Digital Signal Processing 10

    Butterfly Computation

    Flow graph constitutes of butterflies

    We can implement each butterfly with one multiplication

    Final complexity for decimation-in-time FFT

    (N/2)log2N complex multiplications and additions

  • 8/11/2019 fftlec

    11/13

    Copyright (C) 2005 Gner Arslan 351M Digital Signal Processing 11

    In-Place Computation

    Decimation-in-time flow graphs require two sets of registers

    Input and output for each stage

    Note the arrangement of the input indices Bit reversed indexing

    111x111X7x7X011x110X3x6X

    101x101X5x5X

    001x100X1x4X

    110x011X6x3X010x010X2x2X

    100x001X4x1X

    000x000X0x0X

    00

    00

    00

    00

    00

    00

    00

    00

  • 8/11/2019 fftlec

    12/13

    Copyright (C) 2005 Gner Arslan 351M Digital Signal Processing 12

    Decimation-In-Frequency FFT Algorithm

    The DFT equation

    Split the DFT equation into even and odd frequency indexes

    Substitute variables to get

    Similarly for odd-numbered frequencies

    1N

    0n

    nkNW]n[xkX

    1N

    2/Nn

    r2nN

    12/N

    0n

    r2nN

    1N

    0n

    r2nN W]n[xW]n[xW]n[xr2X

    12/N

    0n

    nr2/N

    12/N

    0n

    r22/NnN

    12/N

    0n

    r2nN W]2/Nn[x]n[xW]2/Nn[xW]n[xr2X

    12/N

    0n

    1r2n2/NW]2/Nn[x]n[x1r2X

  • 8/11/2019 fftlec

    13/13

    Copyright (C) 2005 Gner Arslan 351M Digital Signal Processing 13

    Decimation-In-Frequency FFT Algorithm

    Final flow graph for 8-point decimation in frequency