<?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:m="http://www.w3.org/1998/Math/MathML" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="m0502"> 
  <name>Discrete Fourier Transform(DTFT)</name>

  <metadata>
  <md:version>2.4</md:version>
  <md:created>2000/07/17</md:created>
  <md:revised>2002/05/03 00:00:00.004 GMT-5</md:revised>
  <md:authorlist>
      <md:author id="dhj">
      <md:firstname>Don</md:firstname>
      
      <md:surname>Johnson</md:surname>
      <md:email>dhj@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="seejaie">
      <md:firstname>CJ</md:firstname>
      
      <md:surname>Ganier</md:surname>
      <md:email>seejaie@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="dhj">
      <md:firstname>Don</md:firstname>
      
      <md:surname>Johnson</md:surname>
      <md:email>dhj@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>DFT</md:keyword>
    <md:keyword>Discrete Fourier Transform</md:keyword>
  </md:keywordlist>

  <md:abstract>The Fourier transform can be computed in discrete-time despite the complications caused by a finite signal and continuous frequency.</md:abstract>
</metadata>

  <content>
    <para id="p1">
      The discrete-time Fourier transform (and the continuous-time
      transform as well) can be evaluated when we have an analytic
      expression for the signal.  Suppose we just have a signal, such
      as the speech signal used in the previous chapter.  You might be
      curious; how did we compute a spectrogram such as the one shown
      in the <cnxn document="m0089" target="spectrogram" strength="5">speech signal example</cnxn>?  The big difference
      between the continuous-time and discrete-time worlds is that we
      can <emphasis>exactly</emphasis> calculate spectra in
      discrete-time.  For analog-signal spectra, use must build special
      devices, which turn out in most cases to consist of A/D
      converters and discrete-time computations.  Certainly
      discrete-time spectral analysis is more flexible than in
      continuous-time.
    </para>

    <para id="p2">
      The formula for the <cnxn document="m0501" target="eqn1" strength="5">DTFT</cnxn> is a sum, which conceptually can be
      easily computed save for two issues.
    </para>

    <list id="l1"> 
      <item>
	<emphasis>Signal duration.</emphasis> The sum extends over the
	signal's duration, which must be finite to compute the
	signal's spectrum. It is exceedingly difficult to store an
	infinite-length signal in any case, so we'll assume that the
	signal extends over
	<m:math>
	  <m:apply>
	    <m:interval closure="closed">
	      <m:cn>0</m:cn>
	      <m:apply><m:minus/><m:ci>N</m:ci><m:cn>1</m:cn></m:apply>
	    </m:interval>
	  </m:apply>
	</m:math>.
      </item>
      
      <item>
	<emphasis>Continuous frequency.</emphasis> Subtler than the
	signal duration issue is the fact that the frequency variable
	is continuous: It may only need to span one period, like
	<m:math>
	  <m:apply>
	    <m:interval closure="closed">
	      <m:apply><m:minus/>
		<m:apply><m:divide/>
		  <m:cn>1</m:cn>
		  <m:cn>2</m:cn>
		</m:apply>
	      </m:apply>
	      <m:apply><m:divide/><m:cn>1</m:cn><m:cn>2</m:cn></m:apply>
	    </m:interval>
	  </m:apply>
	</m:math>
	or 
	<m:math>
	  <m:apply>
	    <m:interval closure="closed">
	      <m:cn>0</m:cn>
	      <m:cn>1</m:cn>
	    </m:interval>
	  </m:apply>
	</m:math>, but the DTFT formula as it stands requires
	evaluating the spectra at <emphasis>all</emphasis> frequencies
	within a period.  Let's compute the spectrum at a few
	frequencies; the most obvious ones are the equally spaced ones

	<m:math>
	  <m:apply>
	    <m:forall/>
	    <m:bvar><m:ci>k</m:ci></m:bvar>
	    <m:condition>
	      <m:apply><m:in/>
		<m:ci>k</m:ci>
		<m:set>
		  <m:ci>k</m:ci>
		  <m:ci>…</m:ci>
		  <m:apply><m:minus/><m:ci>K</m:ci><m:cn>1</m:cn></m:apply>
		</m:set>
	      </m:apply>
	    </m:condition>
	    <m:apply>
	      <m:eq/>
	      <m:ci>f</m:ci>
	      <m:apply><m:divide/><m:ci>k</m:ci><m:ci>K</m:ci></m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>.
      </item>
    </list>

    <para id="p3">
      We thus define the <term>discrete Fourier transform</term> (DFT)
      to be

      <equation id="eqn1">
	<name>Discrete Fourier transform</name>
	<m:math>
	  <m:apply>
	    <m:forall/>
	    <m:bvar><m:ci>k</m:ci></m:bvar>
	    <m:condition>
	      <m:apply>
		<m:in/>
		<m:ci>k</m:ci>
		<m:set>
		  <m:ci>k</m:ci>
		  <m:ci>…</m:ci>
		  <m:apply><m:minus/><m:ci>K</m:ci><m:cn>1</m:cn></m:apply>
		</m:set>
	      </m:apply>
	    </m:condition>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn">S</m:ci>
		<m:ci>k</m:ci>
	      </m:apply>
	      <m:apply>
		<m:sum/>
		<m:bvar><m:ci>n</m:ci></m:bvar>
		<m:lowlimit><m:cn>0</m:cn></m:lowlimit>
		<m:uplimit>
		  <m:apply>
		    <m:minus/>
		    <m:ci>N</m:ci>
		    <m:cn>1</m:cn>
		  </m:apply>
		</m:uplimit>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:ci type="fn">S</m:ci>
		    <m:ci>n</m:ci>
		  </m:apply>
		  <m:apply><m:exp/>
		    <m:apply><m:times/>
		      <m:apply><m:minus/><m:imaginaryi/></m:apply>
		      <m:cn>2</m:cn>
		      <m:pi/>
		      <m:ci>n</m:ci>
		      <m:apply><m:divide/>
			<m:ci>k</m:ci>
			<m:ci>K</m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
      </equation>
    </para>

    <para id="p4">
      Here, 
      <m:math>
	<m:apply>
	  <m:ci type="fn">S</m:ci>
	  <m:ci>k</m:ci>
	</m:apply>
      </m:math>
      is shorthand for 
      <m:math>
	<m:apply>
	  <m:ci type="fn">S</m:ci>
	  <m:apply>
	    <m:exp/>
	    <m:apply>
	      <m:times/>
	      <m:imaginaryi/>
	      <m:cn>2</m:cn>
	      <m:pi/>
	      <m:apply><m:divide/>
		<m:ci>k</m:ci>
		<m:ci>K</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>.  
    </para>

  </content>
</document>
