SlideShare a Scribd company logo
1 of 84
EXPERT SYSTEMS AND SOLUTIONS
     Email: expertsyssol@gmail.com
        expertsyssol@yahoo.com
          Cell: 9952749533
     www.researchprojects.info
    PAIYANOOR, OMR, CHENNAI
 Call For Research Projects          Final
 year students of B.E in EEE, ECE,
    EI, M.E (Power Systems), M.E
  (Applied Electronics), M.E (Power
              Electronics)
  Ph.D Electrical and Electronics.
Students can assemble their hardware in our
 Research labs. Experts will be guiding the
                 projects.
Discrete Fourier Transform
            &
 Fast Fourier Transform
Review
   The DTFT provides the frequency-domain (w)
    representation for absolutely summable sequences.
   The z-transform provides a generalized frequency-
    domain (z) representation for arbitrary sequences.
   Two features in common:
       Defined for infinite-length sequences
       Functions of continuous variable (w or z)
       From the numerical computation viewpoint, these two
        features are troublesome because one has to evaluate
        infinite sums at uncountably infinite frequencies.
Review
   To use Matlab, we have to truncate sequences and
    then evaluate the expression at finitely many points.
   The evaluation were obviously approximations to the
    exact calculations.
   In other words, the DTFT and the z-transform are not
    numerically computable transform.
Introduction
   Therefore we turn our attention to a numerically computable
    transform.
   It is obtained by sampling the DTFT transform in the
    frequency domain (or the z-transform on the unit circle).
   We develop this transform by analyzing periodic sequences.
   From FT analysis we know that a periodic function can
    always be represented by a linear combination of
    harmonically related complex exponentials (which is form of
    sampling).
   This give us the Discrete Fourier Series representation.
   We extend the DFS to finite-duration sequences, which leads
    to a new transform, called the Discrete Fourier Transform.
Introduction
   The DFT avoids the two problems mentioned above
    and is a numerically computable transform that is
    suitable for computer implementation.
   The numerical computation of the DFT for long
    sequences is prohibitively time consuming.
   Therefore several algorithms have been developed to
    efficiently compute the DFT.
   These are collectively called fast Fourier transform
    (or FFT) algorithms.
The Discrete Fourier Series
   Definition: Periodic sequence
     ~ (n) = ~ (n + kN ), ∀n, k
     x       x
   N: the fundamental period of the sequences
   From FT analysis we know that the periodic functions can be
    synthesized as a linear combination of complex exponentials
    whose frequencies are multiples (or harmonics) of the
    fundamental frequency (2pi/N).
   From the frequency-domain periodicity of the DTFT, we
    conclude that there are a finite number of harmonics; the
    frequencies are {2pi/N*k,k=0,1,…,N-1}.
The Discrete Fourier Series
   A periodic sequence can be expressed as
                    N −1
       ~ ( n) = 1     ~
                    ∑ X (k )e , n = 0,±1,
                                π
                             j 2N kn
       x
                N   k =0

      ~
    { X ( K ), k = 0,±1, } called the discrete Fourier series
                          are
coefficients, which are given by
                 N −1
        ~             ~ (n)e − j 2Nπ kn , k = 0,±1, 
        X (k ) = ∑ x
                 n =0


The discrete Fourier series representation of periodic sequences
The Discrete Fourier Series
   X(k) is itself a (complex-valued) periodic
    sequence with fundamental period equal to N.
                           π
                      − j 2N
         Let WN = e
                               N −1
         ~             ~ (n)] = ~ (n)W nk
         X (k ) = DFS[ x       ∑x     N
                               n =0
                                      N −1
         ~ (n) = IDFS[ X (k )] = 1
                       ~                ~
         x
                                 N
                                      ∑        −
                                        X (k )WN nk
                                      k =0


     Example 5.1
DFT :           DEFINATION

   To perform frequency analysis on a discrete-time signal, x(n),
    need to convert the time-domain to an equivalent frequency-domain
    representation. In order to this, need to use a powerful computational
    tool to perform frequency analysis called
    Discrete Fourier Transform or DFT.
   The continuous Fourier Transform is defined as below:




   However, this integral equation of Fourier Transform is not suitable to
    perform frequency analysis due to this 2 reasons:
   Continuous nature can be handled by Computer
   The limits of integration cannot be from minus infinity to infinity.
    There should be a finite length sequences that can be handled by
    computer.
DFT :         DEFINATION

   Let x(n) be a finite length sequences.
    Thus, the N-point DFT of x(n) defined as X(k) is :
                    N −1

          X(k) = ∑ x(n) e-j2πnk/N, k = 0,1, …, N-1
                    n =0


   k represent the harmonic number of the transform
    component.
   n is the finite length sequence interval defined as
        0 ≤ n ≤ N-1, N is the sequence length

   Thus X(k) being complex and has real & imaginary
    component, so that the kth harmonic of X(k) is:
        X(k) = R(k) + jI(k)
DFT :             PROPERTIES


    The are 4 properties of DFT:
    1. Periodicity
       If X(k) is the N-point DFT of x(k),
       x(n+N) = x(n), for all n
        X(k+N) = X(k), for all k
       It shows that DFT is periodic with period N, also known
       as Cyclic property of the DFT

    2. Linearity
       If X1(k) and X2(k) are the N-point DFT
       of x1(n) and x2(n),
        ax1(n) + bx2(n)    DFT
                               aX1(k) + bX2(k)
3. Circular Shifting
  Let x(n) be a sequence of length N and X(k) is N
                                                 ,
  -point DFT, thus the sequence, x (n) obtained from
  x(n) by shifting x(n) cyclically by m units. Then,
            ,
        x (n)          DFT
                               X(k)e-j2πkm/N

4. Parseval’s Theorem
    if x(n)              DFT
                                X(k) and
        y(n)    N −1
                             DFT
                                 Y(k)          N −1

    thus,       ∑ x(*n)
                  y (n)         = 1/N          ∑X(
                                               Y0*(k)k )
                                               k=
                n=0
DFT :             RELATIONSHIP WITH z-TRANSFORM



   The z-transform of the sequence, x(n) is given by:
                  ∞
     X(z) =      ∑ x ( n) z
                n = −∞
                              -n
                                   , ROC include unit circle

    by defining zk = ej2πk/N, k = 0, 1, 2, …, N-1

    X(k) = X(z)| zk = ej2πk/N , k = 0,1,2, …, N-1
                 ∞

         =      ∑ x ( n )e
               n = −∞
                            -j2πnk/N




    where ωk = 2πk/N, k = 0,1,2,…,N-1
DFT :                          EXAMPLES

  EXAMPLE 1:
Find the DFT for the following finite length sequence,
  x(n) = { ¼, ¼, ¼ }
 Solution :
 1. Determine the sequence length, N
    N = 3, k = 0,1,2
 2. Use DFT formula to determine X(k)

            N −1

X(k) =      ∑ x ( n) e
            n =0
                         -j2πnk/N
                                    , k = 0, 1, 2

    X(0) = ¼ + ¼ + ¼ = ¾
     X(1) = ¼ + ¼e-j2π/3 + ¼e-j4π/3
           = ¼ + ¼ [cos (2π/3) – jsin(2π/3) + ¼ [cos (4π/3) –jsin(4π/3)
           = ¼ + ¼ [-0.5 – j0.866] + ¼ [ -0.5 + j0.866]
           = ¼ + ¼ [-1] = 0
   Continued from Examples 1:

    X(2) = ¼ + ¼ e-j4π/3 + ¼ e-j8π/3
        = ¼ + ¼ [cos (4π/3) – jsin(4π/3)] +
          ¼ [cos (8π/3) – jsin(8π/3)]
        = ¼ + ¼ [-0.5 +j0.866] + ¼[-0.5 –
          j0.866]
        =0

      Thus,

       X(k) = { ¾, 0, 0}
     Examples 2:
     Given the following the finite length sequences,
    x(n) = {1,1,2,2,3,3}
     Perform DFT for this sequences.
     Solution :
     1. Determine the sequence length, N = 6.
     2. Use DFT formula to determine X(k).

             N −1
    X(k) =   ∑ x ( n) e
             n =0
                          -j2πnk/N
                                     , k = 0,1,2,3,4,5

     X(0) = 12, X(1) = -1.5 + j2.598
     X(2) = -1.5 + j0.866, X(3) = 0
     X(4) = -1.5 – j0.866, X(5) = -1.5 – j2.598
     Thus,
     X(k) = {12, -1.5 + j2.598, -1.5 + j0.866, 0, -1.5 – j0.866,
             -1.5 – j2.598}
     Examples 3:
    Find the DFT for the convolution of 2 sequences :
    x1(n) = {2, 1, 2, 1} & x2(n) = {1, 2, 3, 4}

    Solution :
    1. Determine the sequence length for each
       sequence, N = 4. Thus, k = 0,1,2,3
    2. Perform DFT for each sequences,
       (i) X1(0) = 6, X1(1) = 0, X1(2) = 2, X2(3) = 0
           X1(k) = {6,0,2,0}

      (ii) X2(0) = 10, X2(1) = -2+j2, X2(2) = -2, X2(3) = -2-j2
          X2(k) = {10,-2+j2,-2,-2-j2}

    3. Perform Convolution by :
       X3(k) = X1(k) X2(k)
            = {60, 0, -4, 0}
IDFT :           DEFINATION



   IDFT is the inverse Discrete Fourier Transform.
   The finite length sequence can be obtained from the Discrete Fourier
    Transform by performing IDFT.
   The IDFT is defined as :
                               N −1
                   x(n) = 1/N∑ X (k ) e-j2πnk/N,
                             k =0
                                                where n = 0,1, …, N-1
    EXAMPLES 4:
    Determine the IDFT for the following DFT sequence,
    X(k) = {1, 2, 3, 4}
    SOLUTION :
    1. Determine the length of the sequence, N = 4
    2. Calculate the IDFT by the IDFT formula:
                    3
       x(n) = 1/4∑ X (k ) e
                  k =0
                                     ,
                              -j2πnk/4




       x(0) = ¼(1 + 2 + 3 + 4) = 5/2
       x(1) = -0.5 – j0.5, x(2) = -0.5
        x(3) = -0.5 + j0.5
    3. Thus the finite length sequence, x(n) is:
      x(n) = {2.5, -0.5-j0.5, -0.5, -0.5+j0.5}
IDFT : EXAMPLES

    EXAMPLES 5:
    Obtain the finite length sequence, x(n) from the DFT sequence in
     Example 3.
    Solution :
    1. The sequence in Example 3 is :
       X3(k) = {60, 0, -4, 0}
    2. Use IDFT formula to obtain x(n):
                     3

      x3(n) = 1/4   ∑ X (k )e
                    k =0
                                       ,
                                -j2πnk/4



       x3(0) = 14, x3(1) = 16, x3(2) = 14, x3(3) = 16

       Thus the finite length sequences are :

        x3(k) = {14, 16, 14, 16}
DFT & IDFT :                             COMPLEXITY OF DFT


   A Large number of multiplications and additions are required to compute
    DFT.
   To compute the 8-point of DFT of the sequence, x(n),

    The X(k) will be the summation of x(0)e-j2π(0)k/8 until x(7)e-j2π(7)k/8 For the eight
    terms, there will be 64 multiplication (82) and 56 addition (8 x (8-1))

    Hence, for N-point DFT, there will be N 2 multiplication and N(N-1)
    addition.
    Thus, need one algorithm to reduce the number of calculation and
     speeds up the computation of DFT. The algorithm is called Fast
     Fourier Transform (FFT). It utilizes special properties of the DFT to
     construct a computational procedure that requires Nlog 2N complex

     multiplication and Nlog2N complex addition to carry out N-point DFT.
    The MATLAB command use to perform DFT & IDFT is:

    1. fft2 () - for DFT

    2. ifft2 () - for IDFT
FFT : DEFINATION


    FFT is the algorithm that efficiently computes the
     DFT.
    In applying FFT, the DFT expression can be
     written as :
          N −1
    X(k) =∑ x(n)W
          n =0
                      N
                       nk
                            , k = 0, 1,…,N-1

    where, WN = e-j2π/N
IFFT :        DEFINATION



   The FFT for IDFT can be defined as:
                N −1
    x(n) = 1/N∑ X (k )WNnk
                k =0


   WN2 = (e-j2π/N)2 = e-j2π2/N = WN/2
DFT & IDFT :          SUMMARY


   The DFT & IDFT can be summarized below:
   1. It is a powerful method to perform frequency
      analysis which are used widely in digital
      image processing including blurring and enhancing.
   2. Since the DFT & IDFT will become tedious
      when the length of the sequence become
      big, one algorithm is develop to overcome
      this problem.
   3. The algorithm can be found in MATLAB. The function
       are :
      1. FFT2 = to perform DFT
      2. IFFT2 = to perform IDFT
Ex5.2 DFS of square wave seq.
                 L, k = 0,± N ,±2 N ,
       ~        
       X (k ) =  − jπ ( L −1) / N sin(πkL / N )
                e
                                   sin(πk / N )
   Note
1.   Envelope like the sinc function;
2.   Zeros occur at N/L (reciprocal of duty cycle);
3.   Relation of N to density of freq. Samples;
Relation to the z-transform
             Nonzero, 0 ≤ n ≤ N − 1           N −1
   x ( n) =                         X ( z ) = ∑ x ( n) z − n
             0,        elsewhere              n =0



            ~ (n), 0 ≤ n ≤ N − 1 ~
  x ( n) = 
             x                              N −1
                                  X ( k ) = ∑ x ( n) e [ ]π
                                                       j 2N k   −n


            0,      elsewhere              n =0

   ~
   X (k ) = X ( z ) |       j 2π k
                        z =e N

The DFS X(k) represents N evenly spaced samples of the
z-transform X(z) around the unit circle.
Relation to the DTFT
                       N −1                   N −1
         X (e ) = ∑ x ( n ) e
                jw                  − jwn      ~ (n)e − jwn
                                            = ∑x
                       n =0                   n =0
         ~
         X ( k ) = X (e ) | w = 2 π k
                       jw
                                    N

                     2π                  2π
         Let w1 =         , and wk =        k = kw1
                      N                   N
         X (k ) = X (e jwk ) = X (e jkw1 )

The DFS is obtained by evenly sampling the DTFT at w1 intervals.
The interval w1 is the sampling interval in the frequency domain. It is called
frequency resolution because it tells us how close are the frequency samples.
Sampling and construction in the
      z-domain
                  ~
                  X (k ) = X ( z ) |       j 2π k
                                                    , k = 0,±1,±2, 
DFS & z-                               z =e N
                       +∞                            +∞
transform
                       ∑ x ( m)e                     ∑
                                        π
                                   − j 2N km
                  =                            =            km
                                                       x(m)WN
                      m = −∞                        m = −∞



     ~ ( n) = 1     ~     N −1
                                       1 N −1  +∞           km 
IDFS x         ∑    X (k )WN = ∑  ∑ x(m)WN WN kn
                           − kn

                                       N k =0 m = −∞
                                                                  −

              Nk =0                                             
        +∞
                  1 N −1 − k ( n − m )     +∞           +∞
      = ∑ x ( m ) ∑ WN                 = ∑ x(m) ∑ δ (n − m − rN )
       m = −∞     N k =0                 m = −∞       r = −∞
           +∞     +∞                                          +∞
      =    ∑ ∑ x(m)δ (n − m − rN ) = ∑ x(n − rN )
          m = −∞ r = −∞                                      r = −∞
Comments
   When we sample X(z) on the unit circle, we
    obtain a periodic sequence in the time domain.
   This sequence is a linear combination of the
    original x(n) and its infinite replicas, each
    shifted by multiples of N or –N.
   If x(n)=0 for n<0 and n>=N, then there will be
    no overlap or aliasing in the time domain.
Comments
          x(n) = ~ (n) for 0 ≤ n ≤ N − 1
                 x
                  ~ (n) R (n) = ~ (n)1 0 ≤ n ≤ N − 1
          x (n) = x             x 
                         N
                                     0     else

RN(n) is called a rectangular window of length N.
THEOREM1: Frequency Sampling
If x(n) is time-limited (finite duration) to [0,N-1], then N
samples of X(z) on the unit circle determine X(z) for all z.
Reconstruction Formula
Let x(n) be time-limited to [0,N-1]. Then from Theorem 1 we should be able
to recover the z-transform X(z) using its samples X~(k).

                                     ~ ( n) z − n =  1                − 
                 N −1             N −1             N −1    N −1
                                                                ~
       X ( z ) = ∑ x ( n) z = ∑ x
                            −n
                                                   ∑N ∑        X (k )WN kn  z − n
                 n =0           n =0               n =0   k =0             
         1 N −1 ~  N −1 − kn − n  1 N −1 ~  N −1 − k −1 n 
       = ∑ X ( k )  ∑ W N z  = ∑ X ( k )  ∑ WN z 
         N k =0
                                                                (         )
                        n =0           N k =0            n=0            
         1 N −1 ~ 1 − WN kN z − N 
                              −
       = ∑ X (k )              − k −1                 WN-kN=1
         N k =0         1 − WN z 
                                   − N N −1    ~
                           1− z               X (k )
                  X ( z) =
                             N
                                         ∑ 1 − W −k z −1
                                         k =0    N
The DTFT Interpolation Formula
                                 ~
         1 − e − jwN   N −1
                                 X (k )             N −1
                                                      ~             1 − e − jwN
X (e ) =
    jw

             N
                       ∑ 1 − e j 2πk / N e − jw   = ∑ X (k )
                                                               N (1 − e j 2πk / N e − jw )
                       k =0                         k =0


         sin ( wN ) − jw ( N2−1 )            An interpolation polynomial
Φ ( w) =        2
                     e
         N sin ( 2 )
                  w


             N −1
             ~                               This is the DTFT interpolation
  X (e ) = ∑ X (k )Φ ( w − 2Nk )
       jw                   π
                                             formula to reconstruct X(ejw) from
             k =0                            its samples X~(k)


Since Φ (0) = 1, we have that X(ej2pik/N)=X~(k), which means
that the interpolation is exact at sampling points.
The Discrete Fourier Transform
   The discrete Fourier series provided us a mechanism
    for numerically computing the discrete-time Fourier
    transform.
   It also alert us to a potential problem of aliasing in the
    time domain.
   Mathematics dictates that the sampling of the discrete-
    time Fourier transform result in a periodic sequences
    x~(n).
   But most of the signals in practice are not periodic.
    They are likely to be of finite duration.
The Discrete Fourier Transform
   Theoretically, we can take care of this problem by
    defining a periodic signal whose primary shape is that
    of the finite duration signal and then using the DFS on
    this periodic signal.
   Practically, we define a new transform called the
    Discrete Fourier Transform (DFT), which is the
    primary period of the DFS.
   This DFT is the ultimate numerically computable
    Fourier transform for arbitrary finite duration
    sequences.
The Discrete Fourier Transform
    First we define a finite-duration sequence x(n) that has N
     samples over 0<=n<=N as an N-point sequence
                     +∞                              ∆
         ~ ( n) =
         x          ∑ x(n − rN ) ~(n) = x(n mod N ) = x((n)) N
                                 x
                    r = −∞

     The compact relationships between x(n) and x~(n) are
               ~ (n) = x((n))
               x                ( Periodic extension)
                              N

               x(n) = ~ (n) R (n) (Window operation)
                       x       N



The function rem(n,N) can be used to implement our
modulo-N operation.
The Discrete Fourier Transform
   The Discrete Fourier Transform of an N-point sequence is
    given by                    ~
                                      X (k ) 0 ≤ k ≤ N − 1 ~
              X (k ) = DFT [ x(n)] =                      = X ( k ) RN ( n)
                                      0           else
                      N −1
              X (k ) = ∑ x(n)WN , 0 ≤ k ≤ N − 1
                              nk

                      n =0

Note that the DFT X(k) is also an N-point sequence, that is, it is not
defined outside of 0<=n<=N-1.
DFT X(k) is the primary interval of X~(k).
                                                N −1
                            ~ ( n) R ( n) = 1
    x(n) = IDFT [ X (k )] = x       N
                                            N
                                                ∑ X (k )WN−kn ,0 ≤ n ≤ N − 1
                                                k =0
Matlab Implementation
                   X = WN x
                      1 *
                   x = WN X
                      N
                              1   1               1    
                              1 W 1         WN N −1) 
                                                (

     [
W N = WN
       kn
                           ]
            0 ≤ k, n ≤ N −1 = 
                                 
                                    N

                                                 
                                                         
                                              ( N −1) 2 
                              1 WN N −1)
                                  (
                                             WN         
   Zero-padding is an operation in which more zeros are appended
    to the original sequence. The resulting longer DFT provides
    closely spaced samples of the discrete-times Fourier transform
    of the original sequence.
   The zero-padding gives us a high-density spectrum and
    provides a better displayed version for plotting. But it does not
    give us a high-resolution spectrum because no new information
    is added to the signal; only additional zeros are added in the
    data.
   To get high-resolution spectrum, one has to obtain more data
    from the experiment or observations.
Properties of the DFT

1. Linearity: DFT[ax1(n)+bx2(n)]=aDFT[x1(n)]+bDFT[x2(n)]
                                   N3=max(N1,N2): N3-point DFT
2. Circular folding:
                         x(0)       k =0
           x((− n)) N = 
                         x( N − k ) 1 ≤ k ≤ N − 1
                                               X ( 0)     k =0
           DFT [ x((−n)) N ] = X ((− k )) N = 
                                               X (N − k ) 1 ≤ k ≤ N −1

   Matlab: x=x(mod(-n,N)+1)
Properties of the DFT
3. Conjugation: DFT [ x* (n)] = X * ((− k )) N

4. Symmetry properties for real sequences:
Let x(n) be a real-valued N-point sequence
                 X (k ) = X * ((−k )) N
       Re[ X (k )] = Re[ X ((−k )) N ] : circular − even sequence
       Im[ X (k )] = − Im[ X (( N − k )) N ] : circular − odd sequence
       | X (k ) |=| X ((− k )) N |
       ∠X (k ) = −∠X ((− k )) N
Comments:
    Circular symmetry
    Periodic conjugate symmetry
    About 50% savings in computation as well as in storage.
    X(0) is a real number: the DC frequency
    X(N/2)(N is even) is also real-valued: Nyquist component
    Circular-even and circular-odd components:
             1
    xec (n) = [ x(n) + x((−n)) N ]   DFT [ xec (n)] = Re[ X (k )] = Re[ X ((−k )) N ]
             2
             1
    xoc (n) = [ x(n) − x((−n)) N ]   DFT [ xoc (n)] = Im[ X (k )] = Im[ X ((−k )) N ]
             2

          The real-valued signals                   Function, p143
Properties
5. Circular shift of a sequence
   DFT [ x((n − m)) N RN (n)] = WN X (k )
                                 km


6. Circular shift in the frequency domain
          −
    DFT [WN ln x(n)] = X ((k − l )) N RN (k )
7. Circular convolution**
                         N −1
     x1 (n) ⊗ x2 (n) =   ∑ x1 (m) x2 ((n − m)) N , 0 ≤ n ≤N − 1
                         m=0


          DFT [ x1 (n) ⊗ x2 (n)] = X 1 (k ) X 2 (k )
Properties
                                                 1
8. Multiplication:      DFT [ x1 ( n) ⋅ x2 (n)] = X 1 (k ) ⊗ X 2 (k )
                                                 N
9. Parseval’s relation:
                     N −1                    N −1
                                  1
              E x = ∑ | x (n) | = 2
                                             ∑ | X ( k ) |2
                    n =0          N          k =0


   Energy spectrum            | X ( k ) |2
                                  N
   Power spectrum              X (k )
                                        2


                                N
Linear convolution using the DFT
In general, the circular convolution is an aliased version of the
linear convolution.
If we make both x1(n) and x2(n) N=N1+N2-1 point sequences by
padding an appropriate number of zeros, then the circular
convolution is identical to the linear convolution.
                                      N −1                       
          x4 (n) = x1 (n) ⊗ x2 (n) =  ∑ x1 (k ) x2 ((n − k )) N  RN (n)
                                     m =0                        
             N −1          +∞
                                            
          =  ∑ x1 (k ) ∑ x2 (n − k − rN ) RN (n)
            m =0         r = −∞            
             +∞ N1 −1                                   +∞             
          =  ∑ ∑ x1 (k ) x2 (n − k − rN ) RN (n) =  ∑ x3 (n − rN ) RN (n)
             r = −∞ m =0                                r = −∞         
Error Analysis
   When N=max(N1,N2) is chosen for circular convolution, then
    the first (M-1) samples are in error, where M=min(N1,N2).
                        +∞            
      e(n) = x4 − x3 =  ∑ x3 (n − rN ) RN (n) − x3 (n)
                        r = −∞        
                        
      = ∑ x3 (n − rN ) RN (n) N ≥ max( N1 , N 2 )
        r ≠0            
      e(n) = [ x3 (n − N ) + x3 (n + N )]RN (n)
      = x3 (n + N ) 0 ≤ n ≤ N − 1
                                    n=0,1,…(N1+N2-1)-N
    X3(n) is also causal
Block Convolution
   Segment the infinite-length input sequence into smaller sections (or blocks),
    process each section using the DFT, and finally assemble the output
    sequence from the outputs of each section. This procedure is called a block
    convolution operation.
   Let us assume that the sequence x(n) is sectioned into N-point sequence and
    that the impulse response of the filter is an M-point sequence, where M<N.
   We partition x(n) into sections, each overlapping with the previous one by
    exactly (M-1) samples, save at last (N-M+1) output samples, and finally
    concatenate these outputs into sequence.
   To correct for the first (M-1) samples in the first output block, we set the
    first (M-1) samples in the first input blocks to zero.
The Fast Fourier Transform
   Although the DFT is computable transform, the
    straightforward implementation is very inefficient,
    especially when the sequence length N is large.
   In 1965, Cooley and Tukey showed the a procedure to
    substantially reduce the amount of computations
    involved in the DFT.
   This led to the explosion of applications of the DFT.
   All these efficient algorithms are collectively known
    as fast Fourier transform (FFT) algorithms.
The FFT
   Using the Matrix-vector multiplication to
    implement DFT:
   X=WNx (WN: N*N, x: 1*N, X: 1*N)
    takes N×N multiplications and (N-1)×N
    additions of complex number.
     Number of complex mult. CN=O(N2)
   A complex multiplication requires 4 real
    multiplications and 2 real additions.
Goal of an Efficient computation
   The total number of computations should be linear
    rather than quadratic with respect to N.
   Most of the computations can be eliminated using the
    symmetry and periodicity properties
                            k ( n+ N )        (k + N )n
              W   kn
                  N    =W   N            =W   N

              WN + N / 2 = −WN
               kn            kn


     CN=N×log2N
     If N=2^10, CN=will reduce to 1/100 times.
Decimation-in-time: DIT-FFT, decimation-in-frequency: DIF-FFT
4-point DFT→FFT example
          3
X (k ) = ∑ x(n)W4nk , 0 ≤ k ≤ 3; W4 = e − j 2π / 4 = − j
         n =0

Efficient         W40 = W44 = 1; W41 = W49 = − j
Approach          W42 = W46 = −1; W43 = j
   X=Wx
   X(0) = x(0)+x(2) + x(1)+x(3) = g1 + g2
   X(1) = x(0)-x(2) – j(x(1)-x(3)) = h1 - jh2
   X(2) = x(0)+x(2) - x(1)+x(3) = g1 - g2
   X(3) = x(0)-x(2) + j(x(1)-x(3)) = h1 + jh2
   It requires only 2 complex multiplications.
   Signal flowgraph
A 4-point DFT→FFT example
 X (0) X (1)   g1 g 2             1 1  g1 g 2 
 X (2) X (3) =  h − jh  *W2 = 1 − j  . *  h h  *W2
               1         2             1 2
       1 1             x(0) x(1) 
     =        . *W2 *  x(2) x(3) *W2
       1 − j                     
           W2 0*0 W2 0*1  1 1 
where W2 =               =
              1*0
           W2 W2  1*1     1 − 1
                                  
                         
so W2 * A or A *W2 no multiplic ation needed
Divide-and-combine approach
   To reduce the DFT computation’s quadratic dependence on N,
    one must choose a composite number N=LM since L2+M2<<N2
    for large N.
   Now divide the sequence into M smaller sequences of length L,
    take M smaller L-point DFTs, and combine these into a large
    DFT using L smaller M-point DFTs. This is the essence of the
    divide-and-combine approach.

           n = Ml + m, 0 ≤ l ≤ L − 1, 0 ≤ m ≤ M − 1
           k = p + Lq, 0 ≤ p ≤ L − 1, 0 ≤ q ≤ M − 1
Divide-and-combine approach
                                M −1L −1
                 X ( p, q ) =   ∑∑ x(l , m)WN Ml + m )( p + Lq )
                                            (

                                m=0 l =0
                   M −1
                        mp  L −1    Mlp  
                 = ∑ WN ∑ x(l , m)WN  WNLmq
                   m=0      l =0        
                                            
                   M −1                      mq
                        mp  L −1      lp  
Twiddle factor   = ∑ WN ∑ x(l , m)WL  WM
                   m=0      l =   
                            0         
                       
                        L −int DFT   
                                    
                                   po
                   
                                  M − po int DFT


  Three-step procedure: P155
Divide-and-combine approach
   The total number of complex multiplications
    for this approach can now be given by
   CN=ML2+N+LM2<o(N2)
   This procedure can be further repeat if M or L
    are composite numbers.
   When N=Rv, then such algorithms are called
    radix-R FFT algorithms.
A 8-point DFT→FFT example
   1. two 4-point DFT for m=1,2
             1   pm  3        mq
            ∑           ∑  pl
X ( p, q) = W8  W4 x(l , m) W2
                      l=0    
           m= 0 
                            
                      W4 0× 0 W4 0×1 W4 0× 2 W4 0× 3  x(0,0) x(0,1)
                                                                    
             3  W41× 0 W41×1 W41× 2 W41× 3   x(1,0) x(1,1) 
             ∑
F ( p, m) =   =                                    *             
             l = 0  W4 2× 0 W4 2×1 W4 2× 2 W4 2× 3   x(2,0) x(2,1)
             
                       3× 0 3×1 3× 2 3× 3   x(3,0) x(3,1) 
                      W4 W4 W4 W4  
                                                     
                                                                       
pm
2. G ( p, m) = W8              F ( p, m)
is a 4 × 2 matrix dot mult. of 8 cplx multns
3. 2 − poi nt DFTX with

             ∑ [W8                   ]
              1
                     pm                    mq
( p, q ) =                F ( p, m) W2
             m =0

   G (0,0) G (0,1) 
   G (1,0) G (1,1)  W 0×0 W 0×1 
 =                 * 2     2
                                   
   G (2,0) G (2,1) W 1×0 W 1×1 
                     2     2    
   G (3,0) G (3,1) 
Number of multiplications
   A 4-point DFT is divided into two 2-point
    DFTs, with one intermedium matrix mult.
     number of multiplications=
     4×4cplx→ 2 ×1+ 1 ×4 cplx 16 →6
   A 8-point DFT is divided into two 4-point
    DFTs, with one intermedium matrix mult.
       8×8→2 ×6 + 2×4      64 →20
   For 16-point DFT:
       16×16→2 ×20 + 2×8     256 →56
Radix-2 FFT Algorithms
   Let N=2v; then we choose M=2 and L=N/2 and divide x(n) into
    two N/2-point sequence.
   This procedure can be repeated again and again. At each stage
    the sequences are decimated and the smaller DFTs combined.
    This decimation ands after v stages when we have N one-point
    sequences, which are also one-point DFTs.
   The resulting procedure is called the decimation-in-time FFT
    (DIF-FFT) algorithm, for which the total number of complex
    multiplications is: CN=Nv= N*log2N;
   using additional symmetries: CN=Nv= N/2*log2N
   Signal flowgraph in Figure 5.19
Decimation-in-frequency FFT
   In an alternate approach we choose L=2, M=N/2 and
    follow the steps in (5.49).
   We can get the decimation-frequency FFT (DIF-FFT)
    algorithm.
   Its signal flowgraph is a transposed structure of the
    DIT-FFT structure.
   Its computational complexity is also equal to CN=Nv=
    N/2*log2N
Matlab Implementation
   Function: X = fft(x,N)
       If length(x)<N, x is padded with zeros.
       If the argument N is omitted, N=length(x)
       If x is matrix, fft computes the N-point DFT of each
        column of x
       It is written in machine languag and not use the
        Matlab command. Therefore, it executes very fast.
       It is written as a mixed-radix algorithm.
         
             N=2v; N=prime number, it is reduced to the raw DFT.
Fast Convolutions
   Use the circular convolution to implement the linear
    convolution and the FFT to implement the circular
    convolution.
   The resulting algorithm is called a fast convolution algorithm.
   If we choose N=2v and implement the radix-2 FFT, then the
    algorithm is called a high-speed convolution.
   If x1(n) is N1-point, x2(n) is N2-point, then
                          log 2 ( N1 + N 2 −1) 
                  N =2
   Compare the linear convolution and the high-speed conv.
High-speed Block Convolution
   Overlap-and-save method
   We can now replace the DFT by the radix-2
    FFT algorithm to obtain a high-speed overlap-
    and-save algorithm.
Discrete Fourier transform
    x0 , x1 ,..., x N −1
                           Maps a set of input
                           points to another
                           set of output points.
           DFT             The operation is
          N −1       2π    reversible.
                  − j ik
   X k = ∑ xi e      N

          i =0



  X 0 , X 1 ,..., X N −1
Roots of the unity
• What are the Nth roots of unity?                 (0, j) imaginary
  If N = 8 then we have
          2π              2π
      j      0        j      1
  e        8
                 ,e        8

          2π              2π
      j      2        j      3                                           real
  e        8
                 ,e        8

        2π             2π                (-1, 0)                      (1, 0)
      j    4          j 5
  e      8
                 ,e     8

          2π              2π
      j      6        j      7
  e        8
                 ,e        8

                                    2π                   (0, -j)
                                 −j
 Define          WN = e             N
Calculating the DFT
                 N −1          2π       N −1
                          −j      ik
        X k = ∑ xi e           N
                                       = ∑ xiW N     ik

                 i =0                    i =0

    X0   1    1       1       1          ...    1  x0 
    X   1 W1         WN 2
                                WN 3
                                            ...     N −1
                                                          
                                                  WN  x1 
                                                                
    1          N

    X 2   1 WN  2
                        WN 4
                                WN 6
                                            ...   WNN − 2  x2 
         =                                       N −3
                                                              
    X 3   1 WN  3
                        WN 6
                                WN 9
                                            ...   WN  x3 
    ...   ...                                           . 
   X                                                       
    N −1   1 WNN −1 WNN − 2 WNN −3
                                           ...    W  x N −1 
                                                              
How many arithmetic (+ and *) operations do we need to
calculate the DFT?
Computing the DFT using the FFT
   How can we do better? Fast Fourier Transform (FFT)
                                             N −1               2π
                                                          −j       ik
                                 X k = ∑ xi e                   N

                                              i =0
            N / 2 −1               2π ( 2 i ) k    N / 2 −1                       2π ( 2 i +1) k
                                −j                                           −j
Xk     =     ∑
             i =0
                       x2 i e         N
                                                 +    ∑i =0
                                                                x2i +1e                N


            N / 2 −1                  2πik       N / 2 −1                    2πik    2πk
                                 −j                                     −j        −j
Xk      =      ∑
               i =0
                        x2 i e        N /2
                                             +    ∑
                                                  i =0
                                                         x2i +1e             N /2
                                                                                   e  N


                N / 2 −1                 2πik            N / 2 −1                       2πik
                                    −j                                             −j
Xk         =    ∑i =0
                           x2 i e        N /2
                                                +WN
                                                  k
                                                          ∑   i =0
                                                                     x2i +1e            N /2



X k = X ke + WN X ko
              k                         The sum of N point DFT
                     DFT of odd indices has been broken into
      DFT of even indices               two N/2 point DFTs
Example when N=8
Objective: Compute X0, X1, … X7 given x0, x1, …, x7
                      e
  x0               X0                                 X0
                                        W80
  x2         magic X 1e                               X1
                                            W81
  x4          box X 2 e
                                                      X2
                                        W82
  x6               X 3e                               X3
                                        W83

  x1                    o               W84
                   X    0                             X4
                                              5
                        o               W
  x3         magic X
                                             8
                        1                             X5
                                        W86
  x5          box X     o
                        2                             X6
                                              7
  x7                    o               W
                    X   3
                                             8
                                                      X7


                    Note
                         WN + N / 2 = −WN
                          k             k
                    that
Now let’s apply the idea recursively
                             e
          ee              X0
x0     X0                                  X0
                 W40      X 1e    W80
x4     X 1ee                               X1
                 W41      X2 e
                                  W81
x2        eo
       X 0 W42                             X2
                          X   e   W82
x6     X 1eo          3
                              3
                                       3
                                           X3
                 W   4            W   8
                             o
                          X0      W84
x1     X0 oe
                                           X4
                 W40      X 1o    W 5

x5     X 1oe                       8
                 W41       o
                          X2               X5
                                  W86
x3     X0 oo
                                           X6
               W42            o
x7                        X       W 7
       X 1oo                  3    8
                                           X7
                 W43
One more time
                 ee
     x0         X0                       X0 e

                                                              X0
      x4        X   ee
                    1
                                W40      X 1e    W80
                     eo         W41      X2 e
                                                 W81          X1
      x2        X   0
                          W42                                 X2
      x6                                 X   e   W82
                                             3
                    eo                                        X3
               X   1            W 4
                                   3
                                                 W   8
                                                      3

                   oe                       o
      x1       X   0                     X0      W84
                                                              X4
      x5       X   oe
                   1
                                W40      X 1o    W8
                                                   5


               X   oo           W41       o
                                         X2                   X5
      x3           0                             W86
                            W42                               X6
      x7                                 X   o
                                                 W 7
                                             3
                   oo                3
                                                  8
                                                              X7
               X   1
                            W       4
• How many operations do we need now?
• What is the execution time on a general purpose CPU?
• What is the execution time on a FPGA? How many resources u need?
Another way to visualize FFT computations
How can we determine the order of the first inputs?

   x0                                    Butte        X0
            Butte        Butte
                                                      X4
   x4         r            r               r
   x2        fly          fly
                         Butte            fly
                                         Butte        X2
            Butte
   x6                       r               r         X6
              r
             fly           fly             fly
   x1
            Butte         Butte          Butte        X1
   x5         r             r              r          X5
   x3        fly           fly            fly
            Butte         Butte          Butte        X3
   x7         r              r              r         X7
             fly            fly            fly
Savings so far …
   We have split the DFT computation into two halves:
                   N −1
          X[k] =   ∑      x[n]WN nk
                    k =0
                  ( N/ 2)−1                    ( N/ 2)−1
              =      ∑            rk       k
                            x[2r]WN / 2 + WN      ∑              rk
                                                       x[2r + 1]WN / 2
                    n=0                          n=0
   Have we gained anything? Consider the nominal number of multiplications
    for N = 8
      Original form produces 8 2 = 64 multiplications
                              2
      New form produces 2(4 ) + 8 = 40    multiplications
      So we’re already ahead ….. Let’s keep going!!
Signal flowgraph notation
   In generalizing this formulation, it is most convenient to adopt a graphic
    approach …
   Signal flowgraph notation describes the three basic DSP operations:
      Addition
                     x[n]
                                                   x[n]+y[n]
                    y[n]
        Multiplication by a constant                  a
                                        x[n]                          ax[n]
         Delay
                                                      z-1
     


                                        x[n]                         x[n-1]
Signal flowgraph representation
of 8-point DFT
                                                        k
                                         X[k] = G[k] + WN H[k]
   Recall that the DFT is now of the form
   The DFT in (partial) flowgraph notation:
Continuing with the
decomposition …
   So why not break up into additional DFTs? Let’s take the
    upper 4-point DFT and break it up into two 2-point DFTs:
The complete decomposition into
2-point DFTs
Now let’s take a closer look at
the 2-point DFT
   The expression for the 2-point DFT is:
                  1                  1
        X[k] =   ∑     x[n]W2nk =   ∑     x[n]e − j 2πnk / 2
                 n=0                n=0
   Evaluating for k = 0,1 we obtain

which in signal flowgraph notation looks like          ...
        X[0] = x[0] + x[1]
         X[1] = x[0] + e − j 2π1 / 2 x[1] = x[0] − x[1]

                            This topology is referred to as the
                                      basic butterfly
The complete 8-point
decimation-in-time FFT
Number of multiplys for N-point
FFTs




    N = 2ν where ν = log 2 (N)
     Let
     (log2(N) columns)(N/2 butterflys/column)(2 mults/butterfly)
      or ~ N log 2 (N) multiplys
Comparing processing with and
        without FFTs
   “Slow” DFT requires N mults; FFT requires N log2(N) mults
   Filtering using FFTs requires 3(N log2(N))+2N mults
        α1 = N log2 (N) / N 2 ; α 2 = [3(N log2 (N)) + N] / N 2
   Let
        N            α1            α2
                                              Note: 1024-point FFTs
        16           .25         .8124        accomplish speedups of 100
        32          .156           .50        for filtering, 30 for DFTs!
        64         .0935          .297
       128          .055          .171
       256          .031          .097
      1024         .0097         .0302
Additional timesavers: reducing
multiplications in the basic butterfly
   As we derived it, the basic butterfly is of the form
                                          r
                                         WN



                                   WN N / 2
                                    r+
             N /2
   Since WN = −1 we can reducing computation by 2 by
    premultiplying by
                     r
                    WN                     1


                     r
                    WN                −1
Bit reversal of the input
   first stages of the 8-point FFT:
                 Consider the binary representation of the
                 indices of the input:

                 0   000    If these binary indices are
                 4   100    time reversed, we get the
                 2   010    binary sequence representing
                 6   110           0,1,2,3,4,5,6,7
                 1   001
                            Hence the indices of the FFT
                 5   101    inputs are said to be in
                 3   011    bit-reversed order
                 7   111
Some comments on bit reversal
   In the implementation of the FFT that we discussed, the input is bit
    reversed and the output is developed in natural order
   Some other implementations of the FFT have the input in natural order
    and the output bit reversed (to be described Thursday)
   In some situations it is convenient to implement filtering applications
    by
      Use FFTs with input in natural order, output in bit-reversed order

      Multiply frequency coefficients together (in bit-reversed order)

      Use inverse FFTs with input in bit-reversed order, output in

        natural order
   Computing in this fashion means we never have to compute bit
    reversal explicitly

More Related Content

What's hot

Computing DFT using Matrix method
Computing DFT using Matrix methodComputing DFT using Matrix method
Computing DFT using Matrix methodSarang Joshi
 
Presentation on fourier transformation
Presentation on fourier transformationPresentation on fourier transformation
Presentation on fourier transformationWasim Shah
 
Dft and its applications
Dft and its applicationsDft and its applications
Dft and its applicationsAgam Goel
 
Discrete fourier transform
Discrete fourier transformDiscrete fourier transform
Discrete fourier transformMOHAMMAD AKRAM
 
Signal Processing Introduction using Fourier Transforms
Signal Processing Introduction using Fourier TransformsSignal Processing Introduction using Fourier Transforms
Signal Processing Introduction using Fourier TransformsArvind Devaraj
 
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and SystemsDSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and SystemsAmr E. Mohamed
 
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformAmr E. Mohamed
 
The discrete fourier transform (dsp) 4
The discrete fourier transform  (dsp) 4The discrete fourier transform  (dsp) 4
The discrete fourier transform (dsp) 4HIMANSHU DIWAKAR
 
Overlap Add, Overlap Save(digital signal processing)
Overlap Add, Overlap Save(digital signal processing)Overlap Add, Overlap Save(digital signal processing)
Overlap Add, Overlap Save(digital signal processing)Gourab Ghosh
 
Nec 602 unit ii Random Variables and Random process
Nec 602 unit ii Random Variables and Random processNec 602 unit ii Random Variables and Random process
Nec 602 unit ii Random Variables and Random processDr Naim R Kidwai
 
Basics of Digital Filters
Basics of Digital FiltersBasics of Digital Filters
Basics of Digital Filtersop205
 
Fourier transforms
Fourier transformsFourier transforms
Fourier transformsIffat Anjum
 
Structures for FIR systems
Structures for FIR systemsStructures for FIR systems
Structures for FIR systemsChandan Taluja
 
Digital Signal Processing[ECEG-3171]-Ch1_L02
Digital Signal Processing[ECEG-3171]-Ch1_L02Digital Signal Processing[ECEG-3171]-Ch1_L02
Digital Signal Processing[ECEG-3171]-Ch1_L02Rediet Moges
 
Digital Signal Processing Tutorial:Chapt 3 frequency analysis
Digital Signal Processing Tutorial:Chapt 3 frequency analysisDigital Signal Processing Tutorial:Chapt 3 frequency analysis
Digital Signal Processing Tutorial:Chapt 3 frequency analysisChandrashekhar Padole
 
Fourier series and applications of fourier transform
Fourier series and applications of fourier transformFourier series and applications of fourier transform
Fourier series and applications of fourier transformKrishna Jangid
 
Angle modulation
Angle modulationAngle modulation
Angle modulationUmang Gupta
 

What's hot (20)

Computing DFT using Matrix method
Computing DFT using Matrix methodComputing DFT using Matrix method
Computing DFT using Matrix method
 
Presentation on fourier transformation
Presentation on fourier transformationPresentation on fourier transformation
Presentation on fourier transformation
 
Dft and its applications
Dft and its applicationsDft and its applications
Dft and its applications
 
Discrete fourier transform
Discrete fourier transformDiscrete fourier transform
Discrete fourier transform
 
Signal Processing Introduction using Fourier Transforms
Signal Processing Introduction using Fourier TransformsSignal Processing Introduction using Fourier Transforms
Signal Processing Introduction using Fourier Transforms
 
Multirate DSP
Multirate DSPMultirate DSP
Multirate DSP
 
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and SystemsDSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
 
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
 
The discrete fourier transform (dsp) 4
The discrete fourier transform  (dsp) 4The discrete fourier transform  (dsp) 4
The discrete fourier transform (dsp) 4
 
Overlap Add, Overlap Save(digital signal processing)
Overlap Add, Overlap Save(digital signal processing)Overlap Add, Overlap Save(digital signal processing)
Overlap Add, Overlap Save(digital signal processing)
 
Nec 602 unit ii Random Variables and Random process
Nec 602 unit ii Random Variables and Random processNec 602 unit ii Random Variables and Random process
Nec 602 unit ii Random Variables and Random process
 
Basics of Digital Filters
Basics of Digital FiltersBasics of Digital Filters
Basics of Digital Filters
 
Fourier transforms
Fourier transformsFourier transforms
Fourier transforms
 
Discrete Fourier Series | Discrete Fourier Transform | Discrete Time Fourier ...
Discrete Fourier Series | Discrete Fourier Transform | Discrete Time Fourier ...Discrete Fourier Series | Discrete Fourier Transform | Discrete Time Fourier ...
Discrete Fourier Series | Discrete Fourier Transform | Discrete Time Fourier ...
 
Structures for FIR systems
Structures for FIR systemsStructures for FIR systems
Structures for FIR systems
 
Digital Signal Processing[ECEG-3171]-Ch1_L02
Digital Signal Processing[ECEG-3171]-Ch1_L02Digital Signal Processing[ECEG-3171]-Ch1_L02
Digital Signal Processing[ECEG-3171]-Ch1_L02
 
Dc unit 2
Dc unit 2Dc unit 2
Dc unit 2
 
Digital Signal Processing Tutorial:Chapt 3 frequency analysis
Digital Signal Processing Tutorial:Chapt 3 frequency analysisDigital Signal Processing Tutorial:Chapt 3 frequency analysis
Digital Signal Processing Tutorial:Chapt 3 frequency analysis
 
Fourier series and applications of fourier transform
Fourier series and applications of fourier transformFourier series and applications of fourier transform
Fourier series and applications of fourier transform
 
Angle modulation
Angle modulationAngle modulation
Angle modulation
 

Viewers also liked

Miljoenennota 2005
Miljoenennota 2005Miljoenennota 2005
Miljoenennota 2005pgvanderpoel
 
Estudo Comercial Pense Menos, Ame Mais - 2015
Estudo Comercial Pense Menos, Ame Mais - 2015Estudo Comercial Pense Menos, Ame Mais - 2015
Estudo Comercial Pense Menos, Ame Mais - 2015Bianca Fabianowicz
 
Fossil Fuel Divestment
Fossil Fuel DivestmentFossil Fuel Divestment
Fossil Fuel DivestmentJeff Spencer
 
STRATEGIC MANAGEMENT - DRGORAD
STRATEGIC MANAGEMENT - DRGORADSTRATEGIC MANAGEMENT - DRGORAD
STRATEGIC MANAGEMENT - DRGORADDeepak R Gorad
 
Timbul Karya - a junior chef story
Timbul Karya - a junior chef storyTimbul Karya - a junior chef story
Timbul Karya - a junior chef storygastronomy service
 
Podacst presentation
Podacst presentationPodacst presentation
Podacst presentationNoah Hambayi
 
Become our Bella Ragazza Hats Model for Collection 2014
Become our Bella Ragazza Hats Model for Collection 2014Become our Bella Ragazza Hats Model for Collection 2014
Become our Bella Ragazza Hats Model for Collection 2014BellaRagazzaHats
 
Новый Бонус(Коучинг бонус) первого и второго уровня.
Новый Бонус(Коучинг бонус) первого и второго уровня.Новый Бонус(Коучинг бонус) первого и второго уровня.
Новый Бонус(Коучинг бонус) первого и второго уровня.onlinesarabotok
 
Leigh lillis medical TW resume 8 2016
Leigh lillis medical TW resume 8 2016Leigh lillis medical TW resume 8 2016
Leigh lillis medical TW resume 8 2016Leigh Ellen Lillis
 
Carteles y Obra de Cassandre
Carteles y Obra de CassandreCarteles y Obra de Cassandre
Carteles y Obra de CassandreBrian Lurex
 

Viewers also liked (18)

Mcs DRGORAD
Mcs DRGORADMcs DRGORAD
Mcs DRGORAD
 
Miljoenennota 2005
Miljoenennota 2005Miljoenennota 2005
Miljoenennota 2005
 
Drgorad.RM
Drgorad.RM Drgorad.RM
Drgorad.RM
 
Estudo Comercial Pense Menos, Ame Mais - 2015
Estudo Comercial Pense Menos, Ame Mais - 2015Estudo Comercial Pense Menos, Ame Mais - 2015
Estudo Comercial Pense Menos, Ame Mais - 2015
 
Fossil Fuel Divestment
Fossil Fuel DivestmentFossil Fuel Divestment
Fossil Fuel Divestment
 
Classroom management
Classroom managementClassroom management
Classroom management
 
Derma
DermaDerma
Derma
 
STRATEGIC MANAGEMENT - DRGORAD
STRATEGIC MANAGEMENT - DRGORADSTRATEGIC MANAGEMENT - DRGORAD
STRATEGIC MANAGEMENT - DRGORAD
 
Leigh lillis resume 7 2016
Leigh lillis resume 7 2016Leigh lillis resume 7 2016
Leigh lillis resume 7 2016
 
Timbul Karya - a junior chef story
Timbul Karya - a junior chef storyTimbul Karya - a junior chef story
Timbul Karya - a junior chef story
 
Podacst presentation
Podacst presentationPodacst presentation
Podacst presentation
 
Become our Bella Ragazza Hats Model for Collection 2014
Become our Bella Ragazza Hats Model for Collection 2014Become our Bella Ragazza Hats Model for Collection 2014
Become our Bella Ragazza Hats Model for Collection 2014
 
Finale
FinaleFinale
Finale
 
Ib deepak r gorad
Ib deepak r goradIb deepak r gorad
Ib deepak r gorad
 
Qualidade em Sac 2.0
Qualidade em Sac 2.0Qualidade em Sac 2.0
Qualidade em Sac 2.0
 
Новый Бонус(Коучинг бонус) первого и второго уровня.
Новый Бонус(Коучинг бонус) первого и второго уровня.Новый Бонус(Коучинг бонус) первого и второго уровня.
Новый Бонус(Коучинг бонус) первого и второго уровня.
 
Leigh lillis medical TW resume 8 2016
Leigh lillis medical TW resume 8 2016Leigh lillis medical TW resume 8 2016
Leigh lillis medical TW resume 8 2016
 
Carteles y Obra de Cassandre
Carteles y Obra de CassandreCarteles y Obra de Cassandre
Carteles y Obra de Cassandre
 

Similar to Dft

Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier TransformAbhishek Choksi
 
DSP_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_FOEHU - Lec 08 - The Discrete Fourier TransformAmr E. Mohamed
 
Speech signal time frequency representation
Speech signal time frequency representationSpeech signal time frequency representation
Speech signal time frequency representationNikolay Karpov
 
Dsp U Lec10 DFT And FFT
Dsp U   Lec10  DFT And  FFTDsp U   Lec10  DFT And  FFT
Dsp U Lec10 DFT And FFTtaha25
 
Fast Fourier Transform (FFT) Algorithms in DSP
Fast Fourier Transform (FFT) Algorithms in DSPFast Fourier Transform (FFT) Algorithms in DSP
Fast Fourier Transform (FFT) Algorithms in DSProykousik2020
 
Circular conv_7767038.ppt
Circular conv_7767038.pptCircular conv_7767038.ppt
Circular conv_7767038.pptASMZahidKausar
 
FourierTransform detailed power point presentation
FourierTransform detailed power point presentationFourierTransform detailed power point presentation
FourierTransform detailed power point presentationssuseracb8ba
 
EC8553 Discrete time signal processing
EC8553 Discrete time signal processing EC8553 Discrete time signal processing
EC8553 Discrete time signal processing ssuser2797e4
 
Low rank tensor approximation of probability density and characteristic funct...
Low rank tensor approximation of probability density and characteristic funct...Low rank tensor approximation of probability density and characteristic funct...
Low rank tensor approximation of probability density and characteristic funct...Alexander Litvinenko
 
Time Series Analysis
Time Series AnalysisTime Series Analysis
Time Series AnalysisAmit Ghosh
 
Fourier supplementals
Fourier supplementalsFourier supplementals
Fourier supplementalsPartha_bappa
 
Solutions_Chapter3.pdf
Solutions_Chapter3.pdfSolutions_Chapter3.pdf
Solutions_Chapter3.pdfTessydee
 
Lecture 04 Adaptive filter.pptx
Lecture 04 Adaptive filter.pptxLecture 04 Adaptive filter.pptx
Lecture 04 Adaptive filter.pptxZainULABIDIN496386
 

Similar to Dft (20)

Properties of dft
Properties of dftProperties of dft
Properties of dft
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier Transform
 
DSP_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_FOEHU - Lec 08 - The Discrete Fourier Transform
 
Speech signal time frequency representation
Speech signal time frequency representationSpeech signal time frequency representation
Speech signal time frequency representation
 
Dsp U Lec10 DFT And FFT
Dsp U   Lec10  DFT And  FFTDsp U   Lec10  DFT And  FFT
Dsp U Lec10 DFT And FFT
 
Fast Fourier Transform (FFT) Algorithms in DSP
Fast Fourier Transform (FFT) Algorithms in DSPFast Fourier Transform (FFT) Algorithms in DSP
Fast Fourier Transform (FFT) Algorithms in DSP
 
Wave diffraction
Wave diffractionWave diffraction
Wave diffraction
 
Unit ii
Unit iiUnit ii
Unit ii
 
Circular conv_7767038.ppt
Circular conv_7767038.pptCircular conv_7767038.ppt
Circular conv_7767038.ppt
 
UIT1504-DSP-II-U9_LMS.pdf
UIT1504-DSP-II-U9_LMS.pdfUIT1504-DSP-II-U9_LMS.pdf
UIT1504-DSP-II-U9_LMS.pdf
 
lec07_DFT.pdf
lec07_DFT.pdflec07_DFT.pdf
lec07_DFT.pdf
 
FourierTransform detailed power point presentation
FourierTransform detailed power point presentationFourierTransform detailed power point presentation
FourierTransform detailed power point presentation
 
EC8553 Discrete time signal processing
EC8553 Discrete time signal processing EC8553 Discrete time signal processing
EC8553 Discrete time signal processing
 
Low rank tensor approximation of probability density and characteristic funct...
Low rank tensor approximation of probability density and characteristic funct...Low rank tensor approximation of probability density and characteristic funct...
Low rank tensor approximation of probability density and characteristic funct...
 
Time Series Analysis
Time Series AnalysisTime Series Analysis
Time Series Analysis
 
Fourier supplementals
Fourier supplementalsFourier supplementals
Fourier supplementals
 
Solutions_Chapter3.pdf
Solutions_Chapter3.pdfSolutions_Chapter3.pdf
Solutions_Chapter3.pdf
 
Lecture 04 Adaptive filter.pptx
Lecture 04 Adaptive filter.pptxLecture 04 Adaptive filter.pptx
Lecture 04 Adaptive filter.pptx
 
03 image transform
03 image transform03 image transform
03 image transform
 
ch3-2
ch3-2ch3-2
ch3-2
 

Recently uploaded

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 

Recently uploaded (20)

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 

Dft

  • 1. EXPERT SYSTEMS AND SOLUTIONS Email: expertsyssol@gmail.com expertsyssol@yahoo.com Cell: 9952749533 www.researchprojects.info PAIYANOOR, OMR, CHENNAI Call For Research Projects Final year students of B.E in EEE, ECE, EI, M.E (Power Systems), M.E (Applied Electronics), M.E (Power Electronics) Ph.D Electrical and Electronics. Students can assemble their hardware in our Research labs. Experts will be guiding the projects.
  • 2. Discrete Fourier Transform & Fast Fourier Transform
  • 3. Review  The DTFT provides the frequency-domain (w) representation for absolutely summable sequences.  The z-transform provides a generalized frequency- domain (z) representation for arbitrary sequences.  Two features in common:  Defined for infinite-length sequences  Functions of continuous variable (w or z)  From the numerical computation viewpoint, these two features are troublesome because one has to evaluate infinite sums at uncountably infinite frequencies.
  • 4. Review  To use Matlab, we have to truncate sequences and then evaluate the expression at finitely many points.  The evaluation were obviously approximations to the exact calculations.  In other words, the DTFT and the z-transform are not numerically computable transform.
  • 5. Introduction  Therefore we turn our attention to a numerically computable transform.  It is obtained by sampling the DTFT transform in the frequency domain (or the z-transform on the unit circle).  We develop this transform by analyzing periodic sequences.  From FT analysis we know that a periodic function can always be represented by a linear combination of harmonically related complex exponentials (which is form of sampling).  This give us the Discrete Fourier Series representation.  We extend the DFS to finite-duration sequences, which leads to a new transform, called the Discrete Fourier Transform.
  • 6. Introduction  The DFT avoids the two problems mentioned above and is a numerically computable transform that is suitable for computer implementation.  The numerical computation of the DFT for long sequences is prohibitively time consuming.  Therefore several algorithms have been developed to efficiently compute the DFT.  These are collectively called fast Fourier transform (or FFT) algorithms.
  • 7. The Discrete Fourier Series  Definition: Periodic sequence ~ (n) = ~ (n + kN ), ∀n, k x x  N: the fundamental period of the sequences  From FT analysis we know that the periodic functions can be synthesized as a linear combination of complex exponentials whose frequencies are multiples (or harmonics) of the fundamental frequency (2pi/N).  From the frequency-domain periodicity of the DTFT, we conclude that there are a finite number of harmonics; the frequencies are {2pi/N*k,k=0,1,…,N-1}.
  • 8. The Discrete Fourier Series  A periodic sequence can be expressed as N −1 ~ ( n) = 1 ~ ∑ X (k )e , n = 0,±1, π j 2N kn x N k =0 ~ { X ( K ), k = 0,±1, } called the discrete Fourier series are coefficients, which are given by N −1 ~ ~ (n)e − j 2Nπ kn , k = 0,±1,  X (k ) = ∑ x n =0 The discrete Fourier series representation of periodic sequences
  • 9. The Discrete Fourier Series  X(k) is itself a (complex-valued) periodic sequence with fundamental period equal to N. π − j 2N Let WN = e N −1 ~ ~ (n)] = ~ (n)W nk X (k ) = DFS[ x ∑x N n =0 N −1 ~ (n) = IDFS[ X (k )] = 1 ~ ~ x N ∑ − X (k )WN nk k =0 Example 5.1
  • 10. DFT : DEFINATION  To perform frequency analysis on a discrete-time signal, x(n), need to convert the time-domain to an equivalent frequency-domain representation. In order to this, need to use a powerful computational tool to perform frequency analysis called Discrete Fourier Transform or DFT.  The continuous Fourier Transform is defined as below:  However, this integral equation of Fourier Transform is not suitable to perform frequency analysis due to this 2 reasons:  Continuous nature can be handled by Computer  The limits of integration cannot be from minus infinity to infinity. There should be a finite length sequences that can be handled by computer.
  • 11. DFT : DEFINATION  Let x(n) be a finite length sequences. Thus, the N-point DFT of x(n) defined as X(k) is : N −1 X(k) = ∑ x(n) e-j2πnk/N, k = 0,1, …, N-1 n =0  k represent the harmonic number of the transform component.  n is the finite length sequence interval defined as 0 ≤ n ≤ N-1, N is the sequence length  Thus X(k) being complex and has real & imaginary component, so that the kth harmonic of X(k) is: X(k) = R(k) + jI(k)
  • 12. DFT : PROPERTIES  The are 4 properties of DFT: 1. Periodicity If X(k) is the N-point DFT of x(k), x(n+N) = x(n), for all n X(k+N) = X(k), for all k It shows that DFT is periodic with period N, also known as Cyclic property of the DFT 2. Linearity If X1(k) and X2(k) are the N-point DFT of x1(n) and x2(n), ax1(n) + bx2(n) DFT aX1(k) + bX2(k)
  • 13. 3. Circular Shifting Let x(n) be a sequence of length N and X(k) is N , -point DFT, thus the sequence, x (n) obtained from x(n) by shifting x(n) cyclically by m units. Then, , x (n) DFT X(k)e-j2πkm/N 4. Parseval’s Theorem if x(n) DFT X(k) and y(n) N −1 DFT Y(k) N −1 thus, ∑ x(*n) y (n) = 1/N ∑X( Y0*(k)k ) k= n=0
  • 14. DFT : RELATIONSHIP WITH z-TRANSFORM  The z-transform of the sequence, x(n) is given by: ∞ X(z) = ∑ x ( n) z n = −∞ -n , ROC include unit circle by defining zk = ej2πk/N, k = 0, 1, 2, …, N-1 X(k) = X(z)| zk = ej2πk/N , k = 0,1,2, …, N-1 ∞ = ∑ x ( n )e n = −∞ -j2πnk/N where ωk = 2πk/N, k = 0,1,2,…,N-1
  • 15. DFT : EXAMPLES  EXAMPLE 1: Find the DFT for the following finite length sequence, x(n) = { ¼, ¼, ¼ } Solution : 1. Determine the sequence length, N N = 3, k = 0,1,2 2. Use DFT formula to determine X(k) N −1 X(k) = ∑ x ( n) e n =0 -j2πnk/N , k = 0, 1, 2 X(0) = ¼ + ¼ + ¼ = ¾ X(1) = ¼ + ¼e-j2π/3 + ¼e-j4π/3 = ¼ + ¼ [cos (2π/3) – jsin(2π/3) + ¼ [cos (4π/3) –jsin(4π/3) = ¼ + ¼ [-0.5 – j0.866] + ¼ [ -0.5 + j0.866] = ¼ + ¼ [-1] = 0
  • 16. Continued from Examples 1: X(2) = ¼ + ¼ e-j4π/3 + ¼ e-j8π/3 = ¼ + ¼ [cos (4π/3) – jsin(4π/3)] + ¼ [cos (8π/3) – jsin(8π/3)] = ¼ + ¼ [-0.5 +j0.866] + ¼[-0.5 – j0.866] =0 Thus, X(k) = { ¾, 0, 0}
  • 17. Examples 2: Given the following the finite length sequences, x(n) = {1,1,2,2,3,3} Perform DFT for this sequences. Solution : 1. Determine the sequence length, N = 6. 2. Use DFT formula to determine X(k). N −1 X(k) = ∑ x ( n) e n =0 -j2πnk/N , k = 0,1,2,3,4,5 X(0) = 12, X(1) = -1.5 + j2.598 X(2) = -1.5 + j0.866, X(3) = 0 X(4) = -1.5 – j0.866, X(5) = -1.5 – j2.598 Thus, X(k) = {12, -1.5 + j2.598, -1.5 + j0.866, 0, -1.5 – j0.866, -1.5 – j2.598}
  • 18. Examples 3: Find the DFT for the convolution of 2 sequences : x1(n) = {2, 1, 2, 1} & x2(n) = {1, 2, 3, 4} Solution : 1. Determine the sequence length for each sequence, N = 4. Thus, k = 0,1,2,3 2. Perform DFT for each sequences, (i) X1(0) = 6, X1(1) = 0, X1(2) = 2, X2(3) = 0 X1(k) = {6,0,2,0} (ii) X2(0) = 10, X2(1) = -2+j2, X2(2) = -2, X2(3) = -2-j2 X2(k) = {10,-2+j2,-2,-2-j2} 3. Perform Convolution by : X3(k) = X1(k) X2(k) = {60, 0, -4, 0}
  • 19. IDFT : DEFINATION  IDFT is the inverse Discrete Fourier Transform.  The finite length sequence can be obtained from the Discrete Fourier Transform by performing IDFT.  The IDFT is defined as : N −1 x(n) = 1/N∑ X (k ) e-j2πnk/N, k =0 where n = 0,1, …, N-1
  • 20. EXAMPLES 4: Determine the IDFT for the following DFT sequence, X(k) = {1, 2, 3, 4} SOLUTION : 1. Determine the length of the sequence, N = 4 2. Calculate the IDFT by the IDFT formula: 3 x(n) = 1/4∑ X (k ) e k =0 , -j2πnk/4 x(0) = ¼(1 + 2 + 3 + 4) = 5/2 x(1) = -0.5 – j0.5, x(2) = -0.5 x(3) = -0.5 + j0.5 3. Thus the finite length sequence, x(n) is: x(n) = {2.5, -0.5-j0.5, -0.5, -0.5+j0.5}
  • 21. IDFT : EXAMPLES  EXAMPLES 5: Obtain the finite length sequence, x(n) from the DFT sequence in Example 3. Solution : 1. The sequence in Example 3 is : X3(k) = {60, 0, -4, 0} 2. Use IDFT formula to obtain x(n): 3 x3(n) = 1/4 ∑ X (k )e k =0 , -j2πnk/4 x3(0) = 14, x3(1) = 16, x3(2) = 14, x3(3) = 16 Thus the finite length sequences are : x3(k) = {14, 16, 14, 16}
  • 22. DFT & IDFT : COMPLEXITY OF DFT  A Large number of multiplications and additions are required to compute DFT.  To compute the 8-point of DFT of the sequence, x(n), The X(k) will be the summation of x(0)e-j2π(0)k/8 until x(7)e-j2π(7)k/8 For the eight terms, there will be 64 multiplication (82) and 56 addition (8 x (8-1)) Hence, for N-point DFT, there will be N 2 multiplication and N(N-1) addition.
  • 23. Thus, need one algorithm to reduce the number of calculation and speeds up the computation of DFT. The algorithm is called Fast Fourier Transform (FFT). It utilizes special properties of the DFT to construct a computational procedure that requires Nlog 2N complex multiplication and Nlog2N complex addition to carry out N-point DFT.  The MATLAB command use to perform DFT & IDFT is: 1. fft2 () - for DFT 2. ifft2 () - for IDFT
  • 24. FFT : DEFINATION  FFT is the algorithm that efficiently computes the DFT.  In applying FFT, the DFT expression can be written as : N −1 X(k) =∑ x(n)W n =0 N nk , k = 0, 1,…,N-1 where, WN = e-j2π/N
  • 25. IFFT : DEFINATION  The FFT for IDFT can be defined as: N −1 x(n) = 1/N∑ X (k )WNnk k =0  WN2 = (e-j2π/N)2 = e-j2π2/N = WN/2
  • 26. DFT & IDFT : SUMMARY  The DFT & IDFT can be summarized below:  1. It is a powerful method to perform frequency analysis which are used widely in digital image processing including blurring and enhancing.  2. Since the DFT & IDFT will become tedious when the length of the sequence become big, one algorithm is develop to overcome this problem.  3. The algorithm can be found in MATLAB. The function are : 1. FFT2 = to perform DFT 2. IFFT2 = to perform IDFT
  • 27. Ex5.2 DFS of square wave seq.  L, k = 0,± N ,±2 N , ~  X (k ) =  − jπ ( L −1) / N sin(πkL / N ) e  sin(πk / N ) Note 1. Envelope like the sinc function; 2. Zeros occur at N/L (reciprocal of duty cycle); 3. Relation of N to density of freq. Samples;
  • 28. Relation to the z-transform  Nonzero, 0 ≤ n ≤ N − 1 N −1 x ( n) =  X ( z ) = ∑ x ( n) z − n  0, elsewhere n =0  ~ (n), 0 ≤ n ≤ N − 1 ~ x ( n) =  x N −1 X ( k ) = ∑ x ( n) e [ ]π j 2N k −n  0, elsewhere n =0 ~ X (k ) = X ( z ) | j 2π k z =e N The DFS X(k) represents N evenly spaced samples of the z-transform X(z) around the unit circle.
  • 29. Relation to the DTFT N −1 N −1 X (e ) = ∑ x ( n ) e jw − jwn ~ (n)e − jwn = ∑x n =0 n =0 ~ X ( k ) = X (e ) | w = 2 π k jw N 2π 2π Let w1 = , and wk = k = kw1 N N X (k ) = X (e jwk ) = X (e jkw1 ) The DFS is obtained by evenly sampling the DTFT at w1 intervals. The interval w1 is the sampling interval in the frequency domain. It is called frequency resolution because it tells us how close are the frequency samples.
  • 30. Sampling and construction in the z-domain ~ X (k ) = X ( z ) | j 2π k , k = 0,±1,±2,  DFS & z- z =e N +∞ +∞ transform ∑ x ( m)e ∑ π − j 2N km = = km x(m)WN m = −∞ m = −∞ ~ ( n) = 1 ~ N −1 1 N −1  +∞ km  IDFS x ∑ X (k )WN = ∑  ∑ x(m)WN WN kn − kn N k =0 m = −∞ − Nk =0  +∞ 1 N −1 − k ( n − m ) +∞ +∞ = ∑ x ( m ) ∑ WN = ∑ x(m) ∑ δ (n − m − rN ) m = −∞ N k =0 m = −∞ r = −∞ +∞ +∞ +∞ = ∑ ∑ x(m)δ (n − m − rN ) = ∑ x(n − rN ) m = −∞ r = −∞ r = −∞
  • 31. Comments  When we sample X(z) on the unit circle, we obtain a periodic sequence in the time domain.  This sequence is a linear combination of the original x(n) and its infinite replicas, each shifted by multiples of N or –N.  If x(n)=0 for n<0 and n>=N, then there will be no overlap or aliasing in the time domain.
  • 32. Comments x(n) = ~ (n) for 0 ≤ n ≤ N − 1 x ~ (n) R (n) = ~ (n)1 0 ≤ n ≤ N − 1 x (n) = x x  N 0 else RN(n) is called a rectangular window of length N. THEOREM1: Frequency Sampling If x(n) is time-limited (finite duration) to [0,N-1], then N samples of X(z) on the unit circle determine X(z) for all z.
  • 33. Reconstruction Formula Let x(n) be time-limited to [0,N-1]. Then from Theorem 1 we should be able to recover the z-transform X(z) using its samples X~(k). ~ ( n) z − n =  1 −  N −1 N −1 N −1 N −1 ~ X ( z ) = ∑ x ( n) z = ∑ x −n ∑N ∑ X (k )WN kn  z − n n =0 n =0 n =0  k =0  1 N −1 ~  N −1 − kn − n  1 N −1 ~  N −1 − k −1 n  = ∑ X ( k )  ∑ W N z  = ∑ X ( k )  ∑ WN z  N k =0 ( )  n =0  N k =0  n=0  1 N −1 ~ 1 − WN kN z − N  − = ∑ X (k ) − k −1  WN-kN=1 N k =0  1 − WN z  − N N −1 ~ 1− z X (k ) X ( z) = N ∑ 1 − W −k z −1 k =0 N
  • 34. The DTFT Interpolation Formula ~ 1 − e − jwN N −1 X (k ) N −1 ~ 1 − e − jwN X (e ) = jw N ∑ 1 − e j 2πk / N e − jw = ∑ X (k ) N (1 − e j 2πk / N e − jw ) k =0 k =0 sin ( wN ) − jw ( N2−1 ) An interpolation polynomial Φ ( w) = 2 e N sin ( 2 ) w N −1 ~ This is the DTFT interpolation X (e ) = ∑ X (k )Φ ( w − 2Nk ) jw π formula to reconstruct X(ejw) from k =0 its samples X~(k) Since Φ (0) = 1, we have that X(ej2pik/N)=X~(k), which means that the interpolation is exact at sampling points.
  • 35. The Discrete Fourier Transform  The discrete Fourier series provided us a mechanism for numerically computing the discrete-time Fourier transform.  It also alert us to a potential problem of aliasing in the time domain.  Mathematics dictates that the sampling of the discrete- time Fourier transform result in a periodic sequences x~(n).  But most of the signals in practice are not periodic. They are likely to be of finite duration.
  • 36. The Discrete Fourier Transform  Theoretically, we can take care of this problem by defining a periodic signal whose primary shape is that of the finite duration signal and then using the DFS on this periodic signal.  Practically, we define a new transform called the Discrete Fourier Transform (DFT), which is the primary period of the DFS.  This DFT is the ultimate numerically computable Fourier transform for arbitrary finite duration sequences.
  • 37. The Discrete Fourier Transform  First we define a finite-duration sequence x(n) that has N samples over 0<=n<=N as an N-point sequence +∞ ∆ ~ ( n) = x ∑ x(n − rN ) ~(n) = x(n mod N ) = x((n)) N x r = −∞ The compact relationships between x(n) and x~(n) are ~ (n) = x((n)) x ( Periodic extension) N x(n) = ~ (n) R (n) (Window operation) x N The function rem(n,N) can be used to implement our modulo-N operation.
  • 38. The Discrete Fourier Transform  The Discrete Fourier Transform of an N-point sequence is given by ~  X (k ) 0 ≤ k ≤ N − 1 ~ X (k ) = DFT [ x(n)] =  = X ( k ) RN ( n)  0 else N −1 X (k ) = ∑ x(n)WN , 0 ≤ k ≤ N − 1 nk n =0 Note that the DFT X(k) is also an N-point sequence, that is, it is not defined outside of 0<=n<=N-1. DFT X(k) is the primary interval of X~(k). N −1 ~ ( n) R ( n) = 1 x(n) = IDFT [ X (k )] = x N N ∑ X (k )WN−kn ,0 ≤ n ≤ N − 1 k =0
  • 39. Matlab Implementation X = WN x 1 * x = WN X N 1 1  1  1 W 1  WN N −1)  ( [ W N = WN kn ] 0 ≤ k, n ≤ N −1 =    N      ( N −1) 2  1 WN N −1) (  WN 
  • 40. Zero-padding is an operation in which more zeros are appended to the original sequence. The resulting longer DFT provides closely spaced samples of the discrete-times Fourier transform of the original sequence.  The zero-padding gives us a high-density spectrum and provides a better displayed version for plotting. But it does not give us a high-resolution spectrum because no new information is added to the signal; only additional zeros are added in the data.  To get high-resolution spectrum, one has to obtain more data from the experiment or observations.
  • 41. Properties of the DFT 1. Linearity: DFT[ax1(n)+bx2(n)]=aDFT[x1(n)]+bDFT[x2(n)] N3=max(N1,N2): N3-point DFT 2. Circular folding:  x(0) k =0 x((− n)) N =   x( N − k ) 1 ≤ k ≤ N − 1  X ( 0) k =0 DFT [ x((−n)) N ] = X ((− k )) N =   X (N − k ) 1 ≤ k ≤ N −1 Matlab: x=x(mod(-n,N)+1)
  • 42. Properties of the DFT 3. Conjugation: DFT [ x* (n)] = X * ((− k )) N 4. Symmetry properties for real sequences: Let x(n) be a real-valued N-point sequence X (k ) = X * ((−k )) N Re[ X (k )] = Re[ X ((−k )) N ] : circular − even sequence Im[ X (k )] = − Im[ X (( N − k )) N ] : circular − odd sequence | X (k ) |=| X ((− k )) N | ∠X (k ) = −∠X ((− k )) N
  • 43. Comments:  Circular symmetry  Periodic conjugate symmetry  About 50% savings in computation as well as in storage.  X(0) is a real number: the DC frequency  X(N/2)(N is even) is also real-valued: Nyquist component  Circular-even and circular-odd components: 1 xec (n) = [ x(n) + x((−n)) N ] DFT [ xec (n)] = Re[ X (k )] = Re[ X ((−k )) N ] 2 1 xoc (n) = [ x(n) − x((−n)) N ] DFT [ xoc (n)] = Im[ X (k )] = Im[ X ((−k )) N ] 2 The real-valued signals Function, p143
  • 44. Properties 5. Circular shift of a sequence DFT [ x((n − m)) N RN (n)] = WN X (k ) km 6. Circular shift in the frequency domain − DFT [WN ln x(n)] = X ((k − l )) N RN (k ) 7. Circular convolution** N −1 x1 (n) ⊗ x2 (n) = ∑ x1 (m) x2 ((n − m)) N , 0 ≤ n ≤N − 1 m=0 DFT [ x1 (n) ⊗ x2 (n)] = X 1 (k ) X 2 (k )
  • 45. Properties 1 8. Multiplication: DFT [ x1 ( n) ⋅ x2 (n)] = X 1 (k ) ⊗ X 2 (k ) N 9. Parseval’s relation: N −1 N −1 1 E x = ∑ | x (n) | = 2 ∑ | X ( k ) |2 n =0 N k =0 Energy spectrum | X ( k ) |2 N Power spectrum X (k ) 2 N
  • 46. Linear convolution using the DFT In general, the circular convolution is an aliased version of the linear convolution. If we make both x1(n) and x2(n) N=N1+N2-1 point sequences by padding an appropriate number of zeros, then the circular convolution is identical to the linear convolution.  N −1  x4 (n) = x1 (n) ⊗ x2 (n) =  ∑ x1 (k ) x2 ((n − k )) N  RN (n) m =0   N −1 +∞  =  ∑ x1 (k ) ∑ x2 (n − k − rN ) RN (n) m =0 r = −∞   +∞ N1 −1   +∞  =  ∑ ∑ x1 (k ) x2 (n − k − rN ) RN (n) =  ∑ x3 (n − rN ) RN (n)  r = −∞ m =0   r = −∞ 
  • 47. Error Analysis  When N=max(N1,N2) is chosen for circular convolution, then the first (M-1) samples are in error, where M=min(N1,N2).  +∞  e(n) = x4 − x3 =  ∑ x3 (n − rN ) RN (n) − x3 (n)  r = −∞    = ∑ x3 (n − rN ) RN (n) N ≥ max( N1 , N 2 ) r ≠0  e(n) = [ x3 (n − N ) + x3 (n + N )]RN (n) = x3 (n + N ) 0 ≤ n ≤ N − 1 n=0,1,…(N1+N2-1)-N X3(n) is also causal
  • 48. Block Convolution  Segment the infinite-length input sequence into smaller sections (or blocks), process each section using the DFT, and finally assemble the output sequence from the outputs of each section. This procedure is called a block convolution operation.  Let us assume that the sequence x(n) is sectioned into N-point sequence and that the impulse response of the filter is an M-point sequence, where M<N.  We partition x(n) into sections, each overlapping with the previous one by exactly (M-1) samples, save at last (N-M+1) output samples, and finally concatenate these outputs into sequence.  To correct for the first (M-1) samples in the first output block, we set the first (M-1) samples in the first input blocks to zero.
  • 49. The Fast Fourier Transform  Although the DFT is computable transform, the straightforward implementation is very inefficient, especially when the sequence length N is large.  In 1965, Cooley and Tukey showed the a procedure to substantially reduce the amount of computations involved in the DFT.  This led to the explosion of applications of the DFT.  All these efficient algorithms are collectively known as fast Fourier transform (FFT) algorithms.
  • 50. The FFT  Using the Matrix-vector multiplication to implement DFT:  X=WNx (WN: N*N, x: 1*N, X: 1*N)  takes N×N multiplications and (N-1)×N additions of complex number. Number of complex mult. CN=O(N2)  A complex multiplication requires 4 real multiplications and 2 real additions.
  • 51. Goal of an Efficient computation  The total number of computations should be linear rather than quadratic with respect to N.  Most of the computations can be eliminated using the symmetry and periodicity properties k ( n+ N ) (k + N )n W kn N =W N =W N WN + N / 2 = −WN kn kn CN=N×log2N If N=2^10, CN=will reduce to 1/100 times. Decimation-in-time: DIT-FFT, decimation-in-frequency: DIF-FFT
  • 52. 4-point DFT→FFT example 3 X (k ) = ∑ x(n)W4nk , 0 ≤ k ≤ 3; W4 = e − j 2π / 4 = − j n =0 Efficient W40 = W44 = 1; W41 = W49 = − j Approach W42 = W46 = −1; W43 = j  X=Wx  X(0) = x(0)+x(2) + x(1)+x(3) = g1 + g2  X(1) = x(0)-x(2) – j(x(1)-x(3)) = h1 - jh2  X(2) = x(0)+x(2) - x(1)+x(3) = g1 - g2  X(3) = x(0)-x(2) + j(x(1)-x(3)) = h1 + jh2  It requires only 2 complex multiplications.  Signal flowgraph
  • 53. A 4-point DFT→FFT example  X (0) X (1)   g1 g 2  1 1  g1 g 2   X (2) X (3) =  h − jh  *W2 = 1 − j  . *  h h  *W2    1 2    1 2 1 1  x(0) x(1)  =  . *W2 *  x(2) x(3) *W2 1 − j    W2 0*0 W2 0*1  1 1  where W2 =  = 1*0 W2 W2  1*1 1 − 1    so W2 * A or A *W2 no multiplic ation needed
  • 54. Divide-and-combine approach  To reduce the DFT computation’s quadratic dependence on N, one must choose a composite number N=LM since L2+M2<<N2 for large N.  Now divide the sequence into M smaller sequences of length L, take M smaller L-point DFTs, and combine these into a large DFT using L smaller M-point DFTs. This is the essence of the divide-and-combine approach. n = Ml + m, 0 ≤ l ≤ L − 1, 0 ≤ m ≤ M − 1 k = p + Lq, 0 ≤ p ≤ L − 1, 0 ≤ q ≤ M − 1
  • 55. Divide-and-combine approach M −1L −1 X ( p, q ) = ∑∑ x(l , m)WN Ml + m )( p + Lq ) ( m=0 l =0 M −1  mp  L −1 Mlp   = ∑ WN ∑ x(l , m)WN  WNLmq m=0   l =0    M −1  mq  mp  L −1 lp   Twiddle factor = ∑ WN ∑ x(l , m)WL  WM m=0   l =    0     L −int DFT       po  M − po int DFT Three-step procedure: P155
  • 56. Divide-and-combine approach  The total number of complex multiplications for this approach can now be given by  CN=ML2+N+LM2<o(N2)  This procedure can be further repeat if M or L are composite numbers.  When N=Rv, then such algorithms are called radix-R FFT algorithms.
  • 57. A 8-point DFT→FFT example  1. two 4-point DFT for m=1,2 1  pm  3   mq ∑ ∑ pl X ( p, q) = W8  W4 x(l , m) W2  l=0  m= 0     W4 0× 0 W4 0×1 W4 0× 2 W4 0× 3  x(0,0) x(0,1)      3  W41× 0 W41×1 W41× 2 W41× 3   x(1,0) x(1,1)  ∑ F ( p, m) =   =   *   l = 0  W4 2× 0 W4 2×1 W4 2× 2 W4 2× 3   x(2,0) x(2,1)    3× 0 3×1 3× 2 3× 3   x(3,0) x(3,1)  W4 W4 W4 W4     
  • 58. pm 2. G ( p, m) = W8 F ( p, m) is a 4 × 2 matrix dot mult. of 8 cplx multns 3. 2 − poi nt DFTX with ∑ [W8 ] 1 pm mq ( p, q ) = F ( p, m) W2 m =0 G (0,0) G (0,1)  G (1,0) G (1,1)  W 0×0 W 0×1  =  * 2 2  G (2,0) G (2,1) W 1×0 W 1×1     2 2  G (3,0) G (3,1) 
  • 59. Number of multiplications  A 4-point DFT is divided into two 2-point DFTs, with one intermedium matrix mult.  number of multiplications= 4×4cplx→ 2 ×1+ 1 ×4 cplx 16 →6  A 8-point DFT is divided into two 4-point DFTs, with one intermedium matrix mult.  8×8→2 ×6 + 2×4 64 →20  For 16-point DFT:  16×16→2 ×20 + 2×8 256 →56
  • 60. Radix-2 FFT Algorithms  Let N=2v; then we choose M=2 and L=N/2 and divide x(n) into two N/2-point sequence.  This procedure can be repeated again and again. At each stage the sequences are decimated and the smaller DFTs combined. This decimation ands after v stages when we have N one-point sequences, which are also one-point DFTs.  The resulting procedure is called the decimation-in-time FFT (DIF-FFT) algorithm, for which the total number of complex multiplications is: CN=Nv= N*log2N;  using additional symmetries: CN=Nv= N/2*log2N  Signal flowgraph in Figure 5.19
  • 61. Decimation-in-frequency FFT  In an alternate approach we choose L=2, M=N/2 and follow the steps in (5.49).  We can get the decimation-frequency FFT (DIF-FFT) algorithm.  Its signal flowgraph is a transposed structure of the DIT-FFT structure.  Its computational complexity is also equal to CN=Nv= N/2*log2N
  • 62. Matlab Implementation  Function: X = fft(x,N)  If length(x)<N, x is padded with zeros.  If the argument N is omitted, N=length(x)  If x is matrix, fft computes the N-point DFT of each column of x  It is written in machine languag and not use the Matlab command. Therefore, it executes very fast.  It is written as a mixed-radix algorithm.  N=2v; N=prime number, it is reduced to the raw DFT.
  • 63. Fast Convolutions  Use the circular convolution to implement the linear convolution and the FFT to implement the circular convolution.  The resulting algorithm is called a fast convolution algorithm.  If we choose N=2v and implement the radix-2 FFT, then the algorithm is called a high-speed convolution.  If x1(n) is N1-point, x2(n) is N2-point, then  log 2 ( N1 + N 2 −1)  N =2  Compare the linear convolution and the high-speed conv.
  • 64. High-speed Block Convolution  Overlap-and-save method  We can now replace the DFT by the radix-2 FFT algorithm to obtain a high-speed overlap- and-save algorithm.
  • 65. Discrete Fourier transform x0 , x1 ,..., x N −1 Maps a set of input points to another set of output points. DFT The operation is N −1 2π reversible. − j ik X k = ∑ xi e N i =0 X 0 , X 1 ,..., X N −1
  • 66. Roots of the unity • What are the Nth roots of unity? (0, j) imaginary If N = 8 then we have 2π 2π j 0 j 1 e 8 ,e 8 2π 2π j 2 j 3 real e 8 ,e 8 2π 2π (-1, 0) (1, 0) j 4 j 5 e 8 ,e 8 2π 2π j 6 j 7 e 8 ,e 8 2π (0, -j) −j Define WN = e N
  • 67. Calculating the DFT N −1 2π N −1 −j ik X k = ∑ xi e N = ∑ xiW N ik i =0 i =0  X0   1 1 1 1 ... 1  x0   X   1 W1 WN 2 WN 3 ... N −1  WN  x1    1   N  X 2   1 WN 2 WN 4 WN 6 ... WNN − 2  x2   = N −3    X 3   1 WN 3 WN 6 WN 9 ... WN  x3   ...   ...  .  X      N −1   1 WNN −1 WNN − 2 WNN −3  ... W  x N −1    How many arithmetic (+ and *) operations do we need to calculate the DFT?
  • 68. Computing the DFT using the FFT  How can we do better? Fast Fourier Transform (FFT) N −1 2π −j ik X k = ∑ xi e N i =0 N / 2 −1 2π ( 2 i ) k N / 2 −1 2π ( 2 i +1) k −j −j Xk = ∑ i =0 x2 i e N + ∑i =0 x2i +1e N N / 2 −1 2πik N / 2 −1 2πik 2πk −j −j −j Xk = ∑ i =0 x2 i e N /2 + ∑ i =0 x2i +1e N /2 e N N / 2 −1 2πik N / 2 −1 2πik −j −j Xk = ∑i =0 x2 i e N /2 +WN k ∑ i =0 x2i +1e N /2 X k = X ke + WN X ko k The sum of N point DFT DFT of odd indices has been broken into DFT of even indices two N/2 point DFTs
  • 69. Example when N=8 Objective: Compute X0, X1, … X7 given x0, x1, …, x7 e x0 X0 X0 W80 x2 magic X 1e X1 W81 x4 box X 2 e X2 W82 x6 X 3e X3 W83 x1 o W84 X 0 X4 5 o W x3 magic X 8 1 X5 W86 x5 box X o 2 X6 7 x7 o W X 3 8 X7 Note WN + N / 2 = −WN k k that
  • 70. Now let’s apply the idea recursively e ee X0 x0 X0 X0 W40 X 1e W80 x4 X 1ee X1 W41 X2 e W81 x2 eo X 0 W42 X2 X e W82 x6 X 1eo 3 3 3 X3 W 4 W 8 o X0 W84 x1 X0 oe X4 W40 X 1o W 5 x5 X 1oe 8 W41 o X2 X5 W86 x3 X0 oo X6 W42 o x7 X W 7 X 1oo 3 8 X7 W43
  • 71. One more time ee x0 X0 X0 e X0 x4 X ee 1 W40 X 1e W80 eo W41 X2 e W81 X1 x2 X 0 W42 X2 x6 X e W82 3 eo X3 X 1 W 4 3 W 8 3 oe o x1 X 0 X0 W84 X4 x5 X oe 1 W40 X 1o W8 5 X oo W41 o X2 X5 x3 0 W86 W42 X6 x7 X o W 7 3 oo 3 8 X7 X 1 W 4 • How many operations do we need now? • What is the execution time on a general purpose CPU? • What is the execution time on a FPGA? How many resources u need?
  • 72. Another way to visualize FFT computations How can we determine the order of the first inputs? x0 Butte X0 Butte Butte X4 x4 r r r x2 fly fly Butte fly Butte X2 Butte x6 r r X6 r fly fly fly x1 Butte Butte Butte X1 x5 r r r X5 x3 fly fly fly Butte Butte Butte X3 x7 r r r X7 fly fly fly
  • 73. Savings so far …  We have split the DFT computation into two halves: N −1 X[k] = ∑ x[n]WN nk k =0 ( N/ 2)−1 ( N/ 2)−1 = ∑ rk k x[2r]WN / 2 + WN ∑ rk x[2r + 1]WN / 2 n=0 n=0  Have we gained anything? Consider the nominal number of multiplications for N = 8  Original form produces 8 2 = 64 multiplications 2  New form produces 2(4 ) + 8 = 40 multiplications  So we’re already ahead ….. Let’s keep going!!
  • 74. Signal flowgraph notation  In generalizing this formulation, it is most convenient to adopt a graphic approach …  Signal flowgraph notation describes the three basic DSP operations:  Addition x[n] x[n]+y[n] y[n]  Multiplication by a constant a x[n] ax[n] Delay z-1  x[n] x[n-1]
  • 75. Signal flowgraph representation of 8-point DFT k X[k] = G[k] + WN H[k]  Recall that the DFT is now of the form  The DFT in (partial) flowgraph notation:
  • 76. Continuing with the decomposition …  So why not break up into additional DFTs? Let’s take the upper 4-point DFT and break it up into two 2-point DFTs:
  • 77. The complete decomposition into 2-point DFTs
  • 78. Now let’s take a closer look at the 2-point DFT  The expression for the 2-point DFT is: 1 1 X[k] = ∑ x[n]W2nk = ∑ x[n]e − j 2πnk / 2 n=0 n=0  Evaluating for k = 0,1 we obtain which in signal flowgraph notation looks like ... X[0] = x[0] + x[1] X[1] = x[0] + e − j 2π1 / 2 x[1] = x[0] − x[1] This topology is referred to as the basic butterfly
  • 80. Number of multiplys for N-point FFTs N = 2ν where ν = log 2 (N)  Let  (log2(N) columns)(N/2 butterflys/column)(2 mults/butterfly) or ~ N log 2 (N) multiplys
  • 81. Comparing processing with and without FFTs  “Slow” DFT requires N mults; FFT requires N log2(N) mults  Filtering using FFTs requires 3(N log2(N))+2N mults α1 = N log2 (N) / N 2 ; α 2 = [3(N log2 (N)) + N] / N 2  Let N α1 α2 Note: 1024-point FFTs 16 .25 .8124 accomplish speedups of 100 32 .156 .50 for filtering, 30 for DFTs! 64 .0935 .297 128 .055 .171 256 .031 .097 1024 .0097 .0302
  • 82. Additional timesavers: reducing multiplications in the basic butterfly  As we derived it, the basic butterfly is of the form r WN WN N / 2 r+ N /2  Since WN = −1 we can reducing computation by 2 by premultiplying by r WN 1 r WN −1
  • 83. Bit reversal of the input  first stages of the 8-point FFT: Consider the binary representation of the indices of the input: 0 000 If these binary indices are 4 100 time reversed, we get the 2 010 binary sequence representing 6 110 0,1,2,3,4,5,6,7 1 001 Hence the indices of the FFT 5 101 inputs are said to be in 3 011 bit-reversed order 7 111
  • 84. Some comments on bit reversal  In the implementation of the FFT that we discussed, the input is bit reversed and the output is developed in natural order  Some other implementations of the FFT have the input in natural order and the output bit reversed (to be described Thursday)  In some situations it is convenient to implement filtering applications by  Use FFTs with input in natural order, output in bit-reversed order  Multiply frequency coefficients together (in bit-reversed order)  Use inverse FFTs with input in bit-reversed order, output in natural order  Computing in this fashion means we never have to compute bit reversal explicitly