<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="Module.2004-05-13.4204">
  <name>DFT Definition and Properties</name>
  <metadata>
  <md:version>1.5</md:version>
  <md:created>2004/05/25 13:32:16 GMT-5</md:created>
  <md:revised>2006/08/27 20:23:05.300 GMT-5</md:revised>
  <md:authorlist>
      <md:author id="dljones">
      <md:firstname>Douglas</md:firstname>
      <md:othername>L.</md:othername>
      <md:surname>Jones</md:surname>
      <md:email>dl-jones@uiuc.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="dljones">
      <md:firstname>Douglas</md:firstname>
      <md:othername>L.</md:othername>
      <md:surname>Jones</md:surname>
      <md:email>dl-jones@uiuc.edu</md:email>
    </md:maintainer>
    <md:maintainer id="kclarks">
      <md:firstname>Kyle</md:firstname>
      <md:othername>Evan</md:othername>
      <md:surname>Clarkson</md:surname>
      <md:email>kclarks@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>circular convolution</md:keyword>
    <md:keyword>convolution property</md:keyword>
    <md:keyword>DFT</md:keyword>
    <md:keyword>DFT properties</md:keyword>
    <md:keyword>DFT symmetry</md:keyword>
    <md:keyword>discrete Fourier transform</md:keyword>
    <md:keyword>Parseval's theorem</md:keyword>
    <md:keyword>shift property</md:keyword>
    <md:keyword>time reversal</md:keyword>
  </md:keywordlist>

  <md:abstract>The discrete Fourier transform (DFT) and its inverse (IDFT) are the primary numerical transforms relating time and frequency in digital signal processing.
The DFT has a number of important properties relating time and frequency, including shift, circular convolution, multiplication, time-reversal and conjugation properties, as  well as Parseval's theorem equating time and frequency energy.</md:abstract>
</metadata>

  <content>
    <section>
      <name>DFT</name>
      <para id="element-54">The <cnxn document="m10992">discrete Fourier transform (DFT)</cnxn> is the primary transform used for numerical computation in digital signal processing.
It is very widely used for <cnxn document="m12032">spectrum analysis</cnxn>,
<cnxn document="m12022">fast convolution</cnxn>, and many other applications.
The DFT transforms <m:math><m:ci>N</m:ci></m:math> discrete-time samples to the same number of discrete frequency samples, and is defined as
        <equation id="DFTequation"><m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci type="fn">X</m:ci>
	      <m:ci>k</m:ci>
	    </m:apply>
	    <m:apply>
	      <m:sum/>
	      <m:bvar>
		<m:ci>n</m:ci>
	      </m:bvar>
	      <m:uplimit>
		<m:apply>
		  <m:minus/>
		  <m:ci>N</m:ci>
		  <m:cn>1</m:cn>
		</m:apply>
	      </m:uplimit>
	      <m:lowlimit>
	      <m:cn>0</m:cn>
	      </m:lowlimit>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:ci type="fn">x</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
		<m:apply>
		  <m:exp/>
		  <m:apply>
		    <m:minus/>
		    <m:apply>
		      <m:times/>
		      <m:imaginaryi/>
		      <m:apply>
			<m:divide/>
			<m:apply>
			  <m:times/>
			  <m:cn>2</m:cn>
			  <m:pi/>
			  <m:ci>n</m:ci>
			  <m:ci>k</m:ci>
			</m:apply>
			<m:ci>N</m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
      </equation>
      The DFT is widely used in part because it can be computed very efficiently using <cnxn document="col10281">fast Fourier transform (FFT)</cnxn> algorithms.</para>
    </section>
    <section>
      <name>IDFT</name>
      <para id="element-32">The inverse DFT (IDFT) transforms <m:math><m:ci>N</m:ci></m:math> discrete-frequency samples to the same number of discrete-time samples.
The IDFT has a form very similar to the DFT,
        <equation id="IDFTequation">
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci type="fn">x</m:ci>
	      <m:ci>n</m:ci>
	    </m:apply>
	    <m:apply>
	      <m:times/>
	      <m:apply>
		<m:divide/>
		<m:cn>1</m:cn>
		<m:ci>N</m:ci>
	      </m:apply>
	      <m:apply>
		<m:sum/>
		<m:bvar>
		  <m:ci>k</m:ci>
		</m:bvar>
		<m:uplimit>
		  <m:apply>
		    <m:minus/>
		    <m:ci>N</m:ci>
		    <m:cn>1</m:cn>
		  </m:apply>
		</m:uplimit>
		<m:lowlimit>
		  <m:cn>0</m:cn>
		</m:lowlimit>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:ci type="fn">X</m:ci>
		    <m:ci>k</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:exp/>
		    <m:apply>
		      <m:times/>
		      <m:imaginaryi/>
		      <m:apply>
			<m:divide/>
			<m:apply>
			  <m:times/>
			  <m:cn>2</m:cn>
			  <m:pi/>
			  <m:ci>n</m:ci>
			  <m:ci>k</m:ci>
			</m:apply>
			<m:ci>N</m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
        </equation>
      and can thus also be computed efficiently using <cnxn document="col10281">FFTs</cnxn>.</para>
    </section>
  <section>
    <name>DFT and IDFT properties</name>
    <section>
      <name>Periodicity</name>
      <para id="element-38">Due to the <m:math><m:ci>N</m:ci></m:math>-sample periodicity of the complex exponential basis functions
                <m:math>
                  <m:apply>
		    <m:exp/>
		    <m:apply>
		      <m:times/>
		      <m:imaginaryi/>
		      <m:apply>
			<m:divide/>
			<m:apply>
			  <m:times/>
			  <m:cn>2</m:cn>
			  <m:pi/>
			  <m:ci>n</m:ci>
			  <m:ci>k</m:ci>
			</m:apply>
			<m:ci>N</m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
                </m:math>
in the DFT and IDFT, the resulting transforms are also periodic with <m:math><m:ci>N</m:ci></m:math> samples.</para><para id="para3">
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci type="fn">X</m:ci>
	      <m:apply>
		<m:plus/>
		<m:ci>k</m:ci>
		<m:ci>N</m:ci>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:ci type="fn">X</m:ci>
	      <m:ci>k</m:ci>
	    </m:apply>
	  </m:apply>
	</m:math>
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci type="fn">x</m:ci>
	      <m:ci>n</m:ci>
	    </m:apply>
	    <m:apply>
	      <m:ci type="fn">x</m:ci>
	      <m:apply>
		<m:plus/>
		<m:ci>n</m:ci>
		<m:ci>N</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
      </para>
    </section>
    <section>
      <name>Circular Shift</name>
      <para id="element-337">A shift in time corresponds to a phase shift that is linear in frequency.
Because of the periodicity induced by the DFT and IDFT, the shift is <emphasis>circular</emphasis>, or modulo <m:math><m:ci>N</m:ci></m:math> samples.</para><para id="para4"><m:math display="block">
	  <m:apply>
	    <m:mo></m:mo>
	    <m:apply>
	      <m:ci type="fn">x</m:ci>
	      <m:apply>
		<m:rem/>
		<m:apply>
		  <m:minus/>
		  <m:ci>n</m:ci>
		  <m:ci>m</m:ci>
		</m:apply>
		<m:ci>N</m:ci>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:times/>
	      <m:apply>
		<m:ci type="fn">X</m:ci>
		<m:ci>k</m:ci>
	      </m:apply>
	      <m:apply>
		<m:exp/>
		<m:apply>
		  <m:minus/>
		  <m:apply>
		    <m:times/>
		    <m:imaginaryi/>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:cn>2</m:cn>
			<m:pi/>
			<m:ci>k</m:ci>
			<m:ci>m</m:ci>
		      </m:apply>
		      <m:ci>N</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
	The modulus operator
	<m:math>
	  <m:apply>
	    <m:rem/>
	    <m:ci>p</m:ci>
	    <m:ci>N</m:ci>
	  </m:apply>
	</m:math> means the <emphasis>remainder</emphasis> of
	<m:math><m:ci>p</m:ci></m:math> when divided by
	<m:math><m:ci>N</m:ci></m:math>.
        For example,
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:rem/>
	      <m:cn>9</m:cn>
	      <m:cn>5</m:cn>
	    </m:apply>
	    <m:cn>4</m:cn>
	  </m:apply>
	</m:math>
        and
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:rem/>
	      <m:cn>-1</m:cn>
	      <m:cn>5</m:cn>
	    </m:apply>
	    <m:cn>4</m:cn>
	  </m:apply>
	</m:math>
      </para>
    </section>
    <section>
      <name>Time Reversal</name>
      <para id="para5"><m:math display="block">
	  <m:apply>
	    <m:mo></m:mo>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn">x</m:ci>
		<m:apply>
		  <m:rem/>
		  <m:apply>
		    <m:minus/>
		    <m:ci>n</m:ci>
		  </m:apply>
		  <m:ci>N</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:ci type="fn">x</m:ci>
		<m:apply>
		  <m:rem/>
		  <m:apply>
		    <m:minus/>
		    <m:ci>N</m:ci>
		    <m:ci>n</m:ci>
		  </m:apply>
		  <m:ci>N</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn">X</m:ci>
		<m:apply>
		  <m:rem/>
		  <m:apply>
		    <m:minus/>
		    <m:ci>N</m:ci>
		    <m:ci>k</m:ci>
		  </m:apply>
		  <m:ci>N</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:ci type="fn">X</m:ci>
		<m:apply>
		  <m:rem/>
		  <m:apply>
		    <m:minus/>
		    <m:ci>k</m:ci>
		  </m:apply>
		  <m:ci>N</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
	Note: time-reversal maps
	<m:math>
	  <m:apply>
	    <m:mo></m:mo>
	    <m:cn>0</m:cn>
	    <m:cn>0</m:cn>
	  </m:apply>
	</m:math>,
	<m:math>
	  <m:apply>
	    <m:mo></m:mo>
	    <m:cn>1</m:cn>
	    <m:apply>
	      <m:minus/>
	      <m:ci>N</m:ci>
	      <m:cn>1</m:cn>
	    </m:apply>
	  </m:apply>
	</m:math>,
	<m:math>
	  <m:apply>
	    <m:mo></m:mo>
	    <m:cn>2</m:cn>
	    <m:apply>
	      <m:minus/>
	      <m:ci>N</m:ci>
	      <m:cn>2</m:cn>
	    </m:apply>
	  </m:apply>
	</m:math>, etc. as illustrated in the figure below.
      </para>
      <figure id="fig1" orient="horizontal"><subfigure>
          <media type="application/postscript" src="DFTPropfig1.eps">
	    <media type="image/png" src="image1.png"/>
          </media>
        <caption>Original signal</caption>
	</subfigure>
	<subfigure>
          <media type="application/postscript" src="DFTPropfig2.eps">
	    <media type="image/png" src="image2.png"/>
          </media>
        <caption>Time-reversed</caption>
	</subfigure>
      <caption>Illustration of circular time-reversal</caption></figure>
    </section>

    <section>
      <name>Complex Conjugate</name>
      <para id="para6">
	<m:math display="block">
	  <m:apply>
	    <m:mo></m:mo>
	    <m:apply>
	      <m:conjugate/>
	      <m:apply>
		<m:ci type="fn">x</m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:conjugate/>
	      <m:apply>
		<m:ci type="fn">X</m:ci>
		<m:apply>
		  <m:rem/>
		  <m:apply>
		    <m:minus/>
		    <m:ci>k</m:ci>
		  </m:apply>
		  <m:ci>N</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
      </para>
    </section>

    <section>
      <name>Circular Convolution Property</name>
      <para id="para8">
        Circular convolution is defined as
	<m:math display="block">
	  <m:apply>
	    <m:mo>≐</m:mo>
	    <m:apply>
	      <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#convolve"/>
	      <m:apply>
		<m:ci type="fn">x</m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	      <m:apply>
		<m:ci type="fn">h</m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:sum/>
	      <m:bvar>
		<m:ci>m</m:ci>
	      </m:bvar>
	      <m:uplimit>
		<m:apply>
		  <m:minus/>
		  <m:ci>N</m:ci>
		  <m:cn>1</m:cn>
		</m:apply>
	      </m:uplimit>
	      <m:lowlimit>
		<m:cn>0</m:cn>
	      </m:lowlimit>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:ci type="fn">x</m:ci>
		  <m:ci>m</m:ci>
		</m:apply>
		<m:apply>
		  <m:ci type="fn">x</m:ci>
		  <m:apply>
		    <m:rem/>
		    <m:apply>
		      <m:minus/>
		      <m:ci>n</m:ci>
		      <m:ci>m</m:ci>
		    </m:apply>
		    <m:ci>N</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
      </para>
      <para id="para10">
      Circular convolution of two discrete-time signals corresponds
      to multiplication of their DFTs:
	<m:math display="block">
	  <m:apply>
	    <m:mo></m:mo>
	    <m:apply>
	      <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#convolve"/>
	      <m:apply>
		<m:ci type="fn">x</m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	      <m:apply>
		<m:ci type="fn">h</m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:times/>
	      <m:apply>
		<m:ci type="fn">X</m:ci>
		<m:ci>k</m:ci>
	      </m:apply>
	      <m:apply>
		<m:ci type="fn">H</m:ci>
		<m:ci>k</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
      </para>
    </section>
    <section>
      <name>Multiplication Property</name>
      <para id="para11">
        A similar property relates multiplication in time to circular convolution in frequency.
	<m:math display="block">
	  <m:apply>
	    <m:mo></m:mo>
	    <m:apply>
	      <m:times/>
	      <m:apply>
		<m:ci type="fn">x</m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	      <m:apply>
		<m:ci type="fn">h</m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:times/>
	      <m:apply>
		<m:divide/>
		<m:cn>1</m:cn>
		<m:ci>N</m:ci>
	      </m:apply>
	      <m:apply>
		<m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#convolve"/>
		<m:apply>
		  <m:ci type="fn">X</m:ci>
		  <m:ci>k</m:ci>
		</m:apply>
		<m:apply>
		  <m:ci type="fn">H</m:ci>
		  <m:ci>k</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
      </para>
    </section>

    <section>
      <name>Parseval's Theorem</name>
      <para id="para11a">Parseval's theorem relates the energy of a length-<m:math><m:ci>N</m:ci></m:math> discrete-time signal (or one period) to the energy of its DFT.
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:sum/>
	      <m:bvar>
		<m:ci>n</m:ci>
	      </m:bvar>
	      <m:uplimit>
		<m:apply>
		  <m:minus/>
		  <m:ci>N</m:ci>
		  <m:cn>1</m:cn>
		</m:apply>
	      </m:uplimit>
	      <m:lowlimit>
		<m:cn>0</m:cn>
	      </m:lowlimit>
	      <m:apply>
		<m:power/>
		<m:apply>
		  <m:abs/>
		  <m:apply>
		    <m:ci type="fn">x</m:ci>
		    <m:ci>n</m:ci>
		  </m:apply>
		</m:apply>
		<m:cn>2</m:cn>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:times/>
	      <m:apply>
		<m:divide/>
		<m:cn>1</m:cn>
		<m:ci>N</m:ci>
	      </m:apply>
	      <m:apply>
		<m:sum/>
              <m:bvar>
		<m:ci>k</m:ci>
	      </m:bvar>
	      <m:uplimit>
		<m:apply>
		  <m:minus/>
		  <m:ci>N</m:ci>
		  <m:cn>1</m:cn>
		</m:apply>
	      </m:uplimit>
	      <m:lowlimit>
		<m:cn>0</m:cn>
	      </m:lowlimit>
		<m:apply>
		  <m:power/>
		  <m:apply>
		    <m:abs/>
		    <m:apply>
		      <m:ci type="fn">X</m:ci>
		      <m:ci>k</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:cn>2</m:cn>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
      </para>
    </section>

    <section>
      <name>Symmetry</name>
      <para id="para12">
	The <cnxn document="m10098">continuous-time Fourier transform</cnxn>,
        the <cnxn document="m12032" target="DTFTequation">DTFT</cnxn>,
        and <cnxn document="m12032" target="DFTequation">DFT</cnxn> are all
        defined as transforms of complex-valued
	data to complex-valued spectra.  However, in practice signals are
	often real-valued.
        The DFT of a real-valued discrete-time signal has a special symmetry,
        in which the real part of the transform values are
        <term>DFT even symmetric</term> and the imaginary part is
        <term>DFT odd symmetric</term>, as illustrated in the equation and 
        figure below.
      </para>
      <para id="para13"><m:math>
	  <m:apply>
	    <m:ci type="fn">x</m:ci>
	    <m:ci>n</m:ci>
	  </m:apply>
	</m:math> real 
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci type="fn">X</m:ci>
	      <m:ci>k</m:ci>
	    </m:apply>
	    <m:apply>
	      <m:conjugate/>
	      <m:apply>
		<m:ci type="fn">X</m:ci>
		<m:apply>
		  <m:rem/>
		  <m:apply>
		    <m:minus/>
		    <m:ci>N</m:ci>
		    <m:ci>k</m:ci>
		  </m:apply>
		  <m:ci>N</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math> 
	(This implies 
	<m:math>
	  <m:apply>
	    <m:ci type="fn">X</m:ci>
	    <m:cn>0</m:cn>
	  </m:apply>
	</m:math>,
	<m:math>
	  <m:apply>
	    <m:ci type="fn">X</m:ci>
	    <m:apply>
	      <m:divide/>
	      <m:ci>N</m:ci>
	      <m:cn>2</m:cn>
	    </m:apply>
	  </m:apply>
	</m:math> are real-valued.)
      </para>
      <figure id="fig2" orient="vertical">
	<subfigure>
	  <name>Real part of X(k) is even</name>
          <media type="application/postscript" src="DFTPropfig3.eps">
	    <media type="image/png" src="image3.png"/>
          </media>
	  <caption>Even-symmetry in DFT sense</caption>
	</subfigure>
	<subfigure>
	  <name>Imaginary part of X(k) is odd</name>
	  <media type="application/postscript" src="DFTPropfig4.eps">
            <media type="image/png" src="image4.png"/>
          </media>
	  <caption>Odd-symmetry in DFT sense</caption>
	</subfigure>
        <caption>DFT symmetry of real-valued signal</caption>
      </figure>
	  
    </section>
  </section>
  </content>
  
</document>
