Skip to main content
Engineering LibreTexts

2.5: The FFT as a Recursive Evaluation of the DFT

  • Page ID
    1969
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    It is possible to formulate the DFT so a length-\(N\) DFT can be calculated in terms of two length-(\(N/2\)) DFTs.

    And, if \(N=2^{M}\) each of those length-(\(N/2\)) DFTs can be found in terms of length-(\(N/4\)) DFTs. This allows the DFT to be calculated by a recursive algorithm with \(M\) recursions, giving the familiar order \(N\log N\) arithmetic complexity.

    Calculate the even indexed DFT values from the equation by:

    \[C(2k)=\sum_{n=0}^{N-1}x(n)W_{N}^{2nk}=\sum_{n=0}^{N-1}x(n)W_{N/2}^{nk} \nonumber \]

    \[C(2k)=\sum_{n=0}^{N/2-1}x(n)W_{N}^{2nk}+\sum_{n=N/2}^{N-1}x(n)W_{N/2}^{nk} \nonumber \]

    \[C(2k)=\sum_{n=0}^{N/2-1}\left \{ x(n)+x(n+N/2)\right \}W_{N/2}^{nk} \nonumber \]

    and a similar argument gives the odd indexed values as:

    \[C(2k+1)=\sum_{n=0}^{N/2-1}\left \{ x(n)-x(n+N/2)\right \}W_{N}^{n}W_{N/2}^{nk} \nonumber \]

    Together, these are recursive DFT formulas expressing the length-N DFT of \(x(n)\) in terms of length-N/2 DFTs:

    \[C(2k)=DFT_{N/2}\left \{ x(n)+x(n+N/2)\right \} \nonumber \]

    \[C(2k+1)=DFT_{N/2}\left \{ [x(n)-x(n+N/2)]W_{N}^{n}\right \} \nonumber \]

    This is a “decimation-in-frequency" (DIF) version since it gives samples of the frequency domain representation in terms of blocks of the time domain signal.

    A recursive Matlab program which implements this is given by:

    Matlab1.png

    A DIT version can be derived in the form:

    \[C(k)=DFT_{N/2}\left \{ x(2n)\right \}+W_{N}^{k}DFT_{N/2}\left \{ x(2n+1)\right \} \nonumber \]

    \[C(k+N/2)=DFT_{N/2}\left \{ x(2n)\right \}-W_{N}^{k}DFT_{N/2}\left \{ x(2n+1)\right \} \nonumber \]

    which gives blocks of the frequency domain from samples of the signal.

    A recursive Matlab program which implements this is given by:

    Matlab2.png

    Similar recursive expressions can be developed for other radices and and algorithms. Most recursive programs do not execute as efficiently as looped or straight code, but some can be very efficient, e.g. parts of the FFTW.

    Note a length- \(2^M\) sequence will require \(M\) recursions, each of which will require \(N/2\) multiplications. This give the \(N\log N\) formula that the other approaches also derive.

    Contributor

    • ContribEEBurrus

    This page titled 2.5: The FFT as a Recursive Evaluation of the DFT is shared under a CC BY license and was authored, remixed, and/or curated by C. Sidney Burrus.

    • Was this article helpful?