<?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-11.4728">
  <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Spectrum Analysis Using the Discrete Fourier Transform</name>
  <metadata xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
  <md:version xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">1.6</md:version>
  <md:created xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2004/05/11 15:47:28 GMT-5</md:created>
  <md:revised xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2006/09/07 14:10:32.764 GMT-5</md:revised>
  <md:authorlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
      <md:author xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="dljones">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Douglas</md:firstname>
      <md:othername xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">L.</md:othername>
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Jones</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">dl-jones@uiuc.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="dljones">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Douglas</md:firstname>
      <md:othername xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">L.</md:othername>
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Jones</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">dl-jones@uiuc.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="kclarks">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Kyle</md:firstname>
      <md:othername xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Evan</md:othername>
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Clarkson</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">kclarks@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">DFT</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">DTFT</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Fourier</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">IDFT</md:keyword>
  </md:keywordlist>

  <md:abstract xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">The discrete Fourier transform (DFT) maps a finite number of discrete time-domain samples to the same number of discrete Fourier-domain samples.
Being practical to compute, it is the primary transform applied to real-world sampled data in digital signal processing.
The DFT has special relationships with the discrete-time Fourier transform and the continuous-time Fourier transform that let it be used as a practical approximation of them through truncation and windowing of an infinite-length signal.
Different window functions make various tradeoffs in the spectral distortions and
artifacts introduced by DFT-based spectrum
analysis.</md:abstract>
</metadata>

  <content xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <section 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="DTFT">
    <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Discrete-Time Fourier Transform</name>
    <para 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="para1">The <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" document="m10247">Discrete-Time Fourier Transform (DTFT)</cnxn>
      is the primary theoretical tool for understanding the frequency content
      of a discrete-time (sampled) signal.
      The <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" document="m10247">DTFT</cnxn> is defined as
      <equation 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="DTFTequation">
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci>X</m:ci>
	      <m:ci>ω</m:ci>
	    </m:apply>
	    <m:apply>
	      <m:sum/>
	      <m:bvar>
		<m:ci>n</m:ci>
	      </m:bvar>
	      <m:lowlimit>
		<m:apply>
		  <m:minus/>
		  <m:infinity/>
		</m:apply>
	      </m:lowlimit>
	      <m:uplimit>
		<m:infinity/>
	      </m:uplimit>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:ci>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:ci>ω</m:ci>
		      <m:ci>n</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
      </equation>
    The inverse DTFT (IDTFT) is defined by an integral formula, because it operates on a continuous-frequency DTFT spectrum:
      <equation 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="IDTFTequation"><m:math>
	      <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:apply>
		      <m:times/>
		      <m:cn>2</m:cn>
		      <m:pi/>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:int/>
		    <m:bvar>
		      <m:ci>ω</m:ci>
		    </m:bvar>
		    <m:uplimit>
		      <m:pi/>
		    </m:uplimit>
		    <m:lowlimit>
		      <m:apply>
			<m:minus/>
			<m:pi/>
		      </m:apply>
		    </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:ci>ω</m:ci>
			  <m:ci>n</m:ci>
			</m:apply>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
		
	      </m:apply>
	    </m:math>
      </equation></para> 
    <para 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="para2">The DTFT is very useful for theory and analysis, but is not practical for
      numerically computing a spectrum digitally, because 
      <list 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="list1" type="enumerated"><item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">infinite time samples means
	  <list 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="list2" type="bulleted"><item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">infinite computation</item>
	    <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">infinite delay</item>
	  </list>
	</item>
	<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">The transform is continuous in the discrete-time frequency, ω</item>
      </list>
    </para>
    <para 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="para3">For practical computation of the frequency content of real-world signals,
      the Discrete Fourier Transform (DFT) is used.
    </para>
    </section>
    <section 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="DFT">
    <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Discrete Fourier Transform</name>
    <para 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="paraDFT">The DFT transforms <m:math><m:ci>N</m:ci></m:math> samples of a discrete-time 
      signal to the same number of discrete frequency samples, and is defined as
      <equation 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="DFTequation"><m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci>X</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>x</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
		<m:apply>
		  <m:exp/>
		  <m:apply>
		    <m:minus/>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:imaginaryi/>
			<m:cn>2</m:cn>
			<m:ci>π</m:ci>
			<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:math>
      </equation>
      The DFT is invertible by the inverse discrete Fourier transform (IDFT):
      <equation 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="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:ci>1</m:ci>
		<m:cn>N</m:cn>
	      </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:ci>0</m:ci>
		</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:plus/>
		      <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:apply>
	</m:math>
      </equation>
      The <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="DFTequation">DFT</cnxn> and <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="IDFTequation">IDFT</cnxn> are a self-contained,
      one-to-one transform pair for a
      length-<m:math><m:ci>N</m:ci></m:math> discrete-time
      signal. (That is, the <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="DFTequation">DFT</cnxn> is not
      <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">merely</emphasis> an approximation to the
      <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="DTFTequation">DTFT</cnxn> as discussed next.)
      However, the <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="DFTequation">DFT</cnxn> is very often used as a
      practical approximation to the <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="DTFTequation">DTFT</cnxn>.
	    
    </para>
    </section>
    <section 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="section1">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Relationships Between DFT and DTFT</name>
        <section 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="DFTandDFSsect">
        <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">DFT and Discrete Fourier Series</name>
	<para 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="para5">The <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="DFTequation">DFT</cnxn> gives the discrete-time
	  Fourier series coefficients of a periodic sequence
	  (<m:math>
	    <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>)
          of period <m:math><m:ci>N</m:ci></m:math> samples, or
        <equation 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="DFTandDFS">
	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn">X</m:ci>
		<m:ci>ω</m:ci>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:times/>
		    <m:cn>2</m:cn>
		    <m:pi/>
		  </m:apply>
		  <m:ci>N</m:ci>
		</m:apply>
		<m:apply>
		  <m:sum/>
		  <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">δ</m:ci>
		      <m:apply>
			<m:minus/>
			<m:ci>ω</m:ci>
			<m:apply>
			  <m:divide/>
			  <m:apply>
			    <m:times/>
			    <m:cn>2</m:cn>
			    <m:pi/>
			    <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>
	  as can easily be confirmed by computing the inverse DTFT of the corresponding line spectrum:
	</para>
	  <equation 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="eq1"><m:math>
	      <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:apply>
		      <m:times/>
		      <m:cn>2</m:cn>
		      <m:pi/>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:int/>
		    <m:bvar>
		      <m:ci>ω</m:ci>
		    </m:bvar>
		    <m:uplimit>
		      <m:pi/>
		    </m:uplimit>
		    <m:lowlimit>
		      <m:apply>
			<m:minus/>
			<m:pi/>
		      </m:apply>
		    </m:lowlimit>
		    <m:apply>
		      <m:times/>
		      <m:apply>
			<m:times/>
			<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:times/>
		    <m:cn>2</m:cn>
		    <m:pi/>
		  </m:apply>
		  <m:ci>N</m:ci>
		</m:apply>
			<m:apply>
		  <m:sum/>
		  <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">δ</m:ci>
		      <m:apply>
			<m:minus/>
			<m:ci>ω</m:ci>
			<m:apply>
			  <m:divide/>
			  <m:apply>
			    <m:times/>
			    <m:cn>2</m:cn>
			    <m:pi/>
			    <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:exp/>
			<m:apply>
			  <m:times/>
			  <m:imaginaryi/>
			  <m:ci>ω</m:ci>
			  <m:ci>n</m:ci>
			</m:apply>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:divide/>
		    <m:ci>1</m:ci>
		    <m:cn>N</m:cn>
		  </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:ci>0</m:ci>
		    </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:plus/>
			  <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:apply>
		  <m:ci type="fn">IDFT</m:ci>
		  <m:apply>
		    <m:ci type="fn">X</m:ci>
		    <m:ci>k</m:ci>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:ci type="fn">x</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
	      </m:apply>
	    </m:math>
	</equation><para 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="element-8">The DFT can thus be used to <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">exactly</emphasis> compute the relative values of the
<m:math><m:ci>N</m:ci></m:math> line spectral components of the DTFT of any periodic discrete-time sequence with an integer-length period.</para>
      </section>
      <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">DFT and DTFT of finite-length data</name>
        <para 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="element-938">When a discrete-time sequence happens to equal zero for all samples except for those between <m:math><m:ci>0</m:ci></m:math> and <m:math><m:apply><m:minus/><m:ci>N</m:ci><m:ci>1</m:ci></m:apply></m:math>,
the infinite sum in the <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="DTFTequation">DTFT</cnxn> equation becomes the same as the finite sum from <m:math><m:ci>0</m:ci></m:math> to <m:math><m:apply><m:minus/><m:ci>N</m:ci><m:ci>1</m:ci></m:apply></m:math>
in the <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="DFTequation">DFT</cnxn> equation.
By matching the arguments in the exponential terms, we observe that the
DFT values <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">exactly</emphasis> equal the DTFT for specific DTFT frequencies
<m:math>
<m:apply>
		  <m:eq/>
		  <m:ci>
		    <m:msub>
		      <m:mi>ω</m:mi>
		      <m:mi>k</m:mi>
		    </m:msub>
		  </m:ci>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:times/>
		      <m:cn>2</m:cn>
		      <m:pi/>
		      <m:ci>k</m:ci>
		    </m:apply>
		    <m:ci>N</m:ci>
		  </m:apply>
		</m:apply>
</m:math>
.
That is, the DFT computes exact samples of the DTFT at <m:math><m:ci>N</m:ci></m:math> equally spaced frequencies
<m:math>
<m:apply>
		  <m:eq/>
		  <m:ci>
		    <m:msub>
		      <m:mi>ω</m:mi>
		      <m:mi>k</m:mi>
		    </m:msub>
		  </m:ci>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:times/>
		      <m:cn>2</m:cn>
		      <m:pi/>
		      <m:ci>k</m:ci>
		    </m:apply>
		    <m:ci>N</m:ci>
		  </m:apply>
		</m:apply>
</m:math>,
or</para><para 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="para6f"><m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn">
		    <m:mi>X</m:mi>
		</m:ci>
		<m:apply>
		  <m:eq/>
		  <m:ci>
		    <m:msub>
		      <m:mi>ω</m:mi>
		      <m:mi>k</m:mi>
		    </m:msub>
		  </m:ci>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:times/>
		      <m:cn>2</m:cn>
		      <m:pi/>
		      <m:ci>k</m:ci>
		    </m:apply>
		    <m:ci>N</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:sum/>
		<m:bvar>
		  <m:ci>n</m:ci>
		</m:bvar>
		<m:uplimit>
                  <m:ci>∞</m:ci>
		</m:uplimit>
		<m:lowlimit>
		  <m:apply>
		    <m:minus/>
		    <m:ci>∞</m:ci>
		  </m:apply>
		</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:ci>
			  <m:msub>
			    <m:mi>ω</m:mi>
			    <m:mi>k</m:mi>
			  </m:msub>
			</m:ci>
			<m:ci>n</m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </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>x</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
		<m:apply>
		  <m:exp/>
		  <m:apply>
		    <m:minus/>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:imaginaryi/>
			<m:cn>2</m:cn>
			<m:ci>π</m:ci>
			<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:ci type="fn">X</m:ci>
		<m:ci>k</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>
   </para>
      </section>
      <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">DFT as a DTFT approximation</name>
	<para 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="para7">In most cases, the signal is neither exactly periodic nor truly of finite length;
          in such cases, the DFT of a finite block of <m:math><m:ci>N</m:ci></m:math>
          consecutive discrete-time samples does <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">not</emphasis> exactly equal
          samples of the DTFT at specific frequencies.
          Instead, the <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="DFTequation">DFT</cnxn> gives frequency
	  samples of a windowed (truncated) <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="DTFTequation">DTFT</cnxn>
	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn">
		  <m:mover>
		    <m:mi>X</m:mi>
		    <m:mi>^</m:mi>
		  </m:mover>
		</m:ci>
		<m:apply>
		  <m:eq/>
		  <m:ci>
		    <m:msub>
		      <m:mi>ω</m:mi>
		      <m:mi>k</m:mi>
		    </m:msub>
		  </m:ci>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:times/>
		      <m:cn>2</m:cn>
		      <m:pi/>
		      <m:ci>k</m:ci>
		    </m:apply>
		    <m:ci>N</m:ci>
		  </m:apply>
		</m:apply>
	      </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:ci>
			  <m:msub>
			    <m:mi>ω</m:mi>
			    <m:mi>k</m:mi>
			  </m:msub>
			</m:ci>
			<m:ci>n</m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:sum/>
		<m:bvar>
		  <m:ci>n</m:ci>
		</m:bvar>
		<m:uplimit>
		  <m:ci>∞</m:ci>
		</m:uplimit>
		<m:lowlimit>
		  <m:apply>
		    <m:minus/>
		    <m:ci>∞</m:ci>
		  </m:apply>
		</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:ci type="fn">w</m:ci>
		    <m:ci>n</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:exp/>
		    <m:apply>
		      <m:minus/>
		      <m:apply>
			<m:times/>
			<m:imaginaryi/>
			<m:ci>
			  <m:msub>
			    <m:mi>ω</m:mi>
			    <m:mi>k</m:mi>
			  </m:msub>
			</m:ci>
			<m:ci>n</m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:ci type="fn">X</m:ci>
		<m:ci>k</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  where
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn">w</m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	      <m:piecewise>
		<m:piece>
		  <m:cn>1</m:cn>
		  <m:apply>
		    <m:leq/>
		    <m:cn>0</m:cn>
		    <m:apply>
		      <m:lt/>
		      <m:ci>n</m:ci>
		      <m:ci>N</m:ci>
		    </m:apply>
		  </m:apply>
		</m:piece>
		<m:piece>
		  <m:cn>0</m:cn>
		  <m:mtext>else</m:mtext>
		</m:piece>
	      </m:piecewise>
	    </m:apply>
	  </m:math>
          Once again, 
	  <m:math>
	    <m:apply>
	      <m:ci type="fn">X</m:ci>
	      <m:ci>k</m:ci>
	    </m:apply>
	  </m:math>
	  <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">exactly</emphasis> equals 
	  <m:math>
	    <m:apply>
	      <m:ci type="fn">X</m:ci>
	      <m:ci>
		<m:msub>
		  <m:mi>ω</m:mi>
		  <m:mi>k</m:mi>
		</m:msub>
	      </m:ci>
	    </m:apply>
	  </m:math> a DTFT frequency sample only when
	  <m:math>
	    <m:apply>
	      <m:forall/>
	      <m:bvar>
		<m:ci>n</m:ci>
	      </m:bvar>
	      <m:condition>
		<m:apply>
		  <m:notin/>
		  <m:ci>n</m:ci>
		  <m:interval>
		    <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:condition>
	      <m:apply>
		<m:eq/>		 
		<m:apply>
		  <m:ci type="fn">x</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
		<m:cn>0</m:cn>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</para>
      </section>
    </section>
    <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Relationship between continuous-time FT and DFT</name>
      <para 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="element-780">The goal of spectrum analysis is often to determine the frequency content of an analog (continuous-time) signal; very often, as in most modern spectrum analyzers, this is actually accomplished by sampling the analog signal, windowing (truncating)
the data, and computing and plotting the magnitude of its DFT.
It is thus essential to relate the DFT frequency samples back to the original analog frequency.
Assuming that the analog signal is bandlimited and the sampling frequency exceeds twice that limit so that no frequency aliasing occurs, the relationship between
the continuous-time Fourier frequency <m:math><m:ci>Ω</m:ci></m:math> (in radians) and the
DTFT frequency <m:math><m:ci>ω</m:ci></m:math> imposed by sampling is
<m:math>
  <m:apply>
    <m:eq/>
    <m:ci>ω</m:ci>
    <m:apply>
      <m:times/>
	<m:ci>Ω</m:ci>
	<m:ci>T</m:ci>
    </m:apply>
    
  </m:apply>
</m:math>
where <m:math><m:ci>T</m:ci></m:math> is the sampling period.
Through the relationship
<m:math>
<m:apply>
		  <m:eq/>
		  <m:ci>
		    <m:msub>
		      <m:mi>ω</m:mi>
		      <m:mi>k</m:mi>
		    </m:msub>
		  </m:ci>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:times/>
		      <m:cn>2</m:cn>
		      <m:pi/>
		      <m:ci>k</m:ci>
		    </m:apply>
		    <m:ci>N</m:ci>
		  </m:apply>
		</m:apply>
</m:math>
 between the DTFT frequency <m:math><m:ci>ω</m:ci></m:math>
and the DFT frequency index <m:math><m:ci>k</m:ci></m:math>, the correspondence between the DFT frequency index and the original analog frequency can be found:
<m:math display="block">
  <m:apply>
    <m:eq/>
      <m:ci>Ω</m:ci>
      <m:apply>
	<m:divide/>
	  <m:apply>
	    <m:times/>
	      <m:cn>2</m:cn>
	      <m:pi/>
	      <m:ci>k</m:ci>
	  </m:apply>
	  <m:apply>
	    <m:times/>
	      <m:ci>N</m:ci>
	      <m:ci>T</m:ci>
	  </m:apply>
	</m:apply>
  </m:apply>
</m:math>
or in terms of analog frequency <m:math><m:ci>f</m:ci></m:math> in Hertz
(cycles per second rather than radians)
<m:math display="block">
  <m:apply>
    <m:eq/>
      <m:ci>f</m:ci>
      <m:apply>
	<m:divide/>
	  <m:apply>
	    <m:times/>
	      <m:ci>k</m:ci>
	  </m:apply>
	  <m:apply>
	    <m:times/>
	      <m:ci>N</m:ci>
	      <m:ci>T</m:ci>
	  </m:apply>
	</m:apply>
  </m:apply>
</m:math>
for <m:math><m:ci>k</m:ci></m:math> in the range
<m:math><m:ci>k</m:ci></m:math>
between <m:math><m:cn>0</m:cn></m:math> and
<m:math>
  <m:apply>
    <m:divide/>
    <m:ci>N</m:ci>
    <m:cn>2</m:cn>
  </m:apply>
</m:math>.
It is important to note that 
<m:math>
             <m:apply>
	      <m:condition>
		<m:apply>
		  <m:in/>
		  <m:ci>k</m:ci>
		  <m:apply>
		    <m:interval>
                      <m:apply>
                        <m:plus/>
                          <m:apply>
                            <m:divide/>
                              <m:ci>N</m:ci>
                              <m:cn>2</m:cn>
                          </m:apply>
                        <m:cn>1</m:cn>
                      </m:apply>
		      <m:apply>
			<m:minus/>
			<m:ci>N</m:ci>
			<m:cn>1</m:cn>
		      </m:apply>
		    </m:interval>
		  </m:apply>
		</m:apply>
	      </m:condition>
             </m:apply>
</m:math>
correspond to <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">negative</emphasis>
frequencies due to the periodicity of the DTFT and the DFT.</para>
      <exercise 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="ex1"><problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">    
	  <para 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="para8">In general, will DFT frequency values
<m:math>
  <m:apply>
    <m:ci type="fn">X</m:ci>
    <m:ci>k</m:ci>
  </m:apply>
</m:math>
 <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">exactly</emphasis> equal samples
of the analog Fourier transform
<m:math>
  <m:apply>
    <m:ci type="fn">
      <m:msub>
	<m:mi>X</m:mi>
	<m:mi>a</m:mi>
      </m:msub>
    </m:ci>
  </m:apply>
</m:math>
at the corresponding frequencies?
That is, will
	    <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:ci type="fn">
		  <m:msub>
		    <m:mi>X</m:mi>
		    <m:mi>a</m:mi>
		  </m:msub>
		</m:ci>
		<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:times/>
		    <m:cn>2</m:cn>
		    <m:pi/>
		    <m:ci>k</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		    <m:ci>N</m:ci>
		    <m:ci>T</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      </m:apply>
	    </m:math>?
	  </para>
	</problem>
        <solution xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
          <para 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="s1">In general, <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">NO</emphasis>.
          The DTFT exactly corresponds to the continuous-time Fourier transform only when the signal is bandlimited and sampled at more than twice its highest frequency.
The DFT frequency values exactly correspond to frequency samples of the DTFT
only when the discrete-time signal is time-limited.
However, a bandlimited continuous-time signal cannot be time-limited, so in
general these conditions cannot both be satisfied.
</para>
<para 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="s2">It can, however, be true for a small class of analog signals which are not time-limited
but happen to exactly equal zero at all <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">sample times</emphasis> outside of the interval
<m:math>
             <m:apply>
	      <m:condition>
		<m:apply>
		  <m:in/>
		  <m:ci>n</m:ci>
		  <m:apply>
		    <m:interval>
		      <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:apply>
	      </m:condition>
             </m:apply>
</m:math>.
The sinc function with a bandwidth equal to the Nyquist frequency and centered at
<m:math>
<m:apply>
    <m:eq/>
      <m:ci>t</m:ci>
      <m:ci>0</m:ci>
  </m:apply>
</m:math>
is an example.</para>
        </solution></exercise>
    </section>
    
    <section 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="zeropad">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Zero-Padding</name>
      <para 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="para6">If more than <m:math><m:ci>N</m:ci></m:math> equally spaced frequency samples of
a length-<m:math><m:ci>N</m:ci></m:math> signal are desired, they can easily be obtained
by <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">zero-padding</term> the discrete-time signal and computing a DFT of the
longer length.
In particular, if
        <m:math>
          <m:apply><m:times/><m:ci>L</m:ci><m:ci>N</m:ci></m:apply>
        </m:math>
        <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="DTFTequation">DTFT</cnxn> samples are desired
	of a length-<m:math><m:ci>N</m:ci></m:math> sequence, one can compute the length-<m:math>
          <m:apply><m:times/><m:ci>L</m:ci><m:ci>N</m:ci></m:apply>
        </m:math>
	<cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="DFTequation">DFT</cnxn> of a
length-<m:math>
          <m:apply><m:times/><m:ci>L</m:ci><m:ci>N</m:ci></m:apply>
        </m:math> zero-padded
	sequence
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci type="fn">z</m:ci>
	      <m:ci>n</m:ci>
	    </m:apply>
	    <m:piecewise>
	      <m:piece>
		<m:apply>
		  <m:ci type="fn">x</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
		<m:apply>
		  <m:leq/>
		  <m:cn>0</m:cn>
		  <m:ci>n</m:ci>
		  <m:apply>
		    <m:minus/>
		    <m:ci>N</m:ci>
		    <m:cn>1</m:cn>
		  </m:apply>
		</m:apply>
	      </m:piece>
	      <m:piece>
		<m:cn>0</m:cn>
		<m:apply>
		  <m:leq/>
		  <m:ci>N</m:ci>
		  <m:ci>n</m:ci>
		  <m:apply>
		    <m:minus/>
		    <m:apply>
		      <m:times/>
		      <m:ci>L</m:ci>
		      <m:ci>N</m:ci>
		    </m:apply>
		    <m:cn>1</m:cn>
		  </m:apply>
		</m:apply>
	      </m:piece>
	    </m:piecewise>
	  </m:apply>
	</m:math>
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci type="fn">X</m:ci>
	      <m:apply>
		<m:eq/>
		<m:ci>
		  <m:msub>
		    <m:mi>w</m:mi>
		    <m:mi>k</m:mi>
		  </m:msub>
		</m:ci>
		<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:times/>
		    <m:cn>2</m:cn>
		    <m:pi/>
		    <m:ci>k</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		    <m:ci>L</m:ci>
		    <m:ci>N</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </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>k</m:ci>
			  <m:ci>n</m:ci>
			</m:apply>
			<m:apply>
			  <m:times/>
			  <m:ci>L</m:ci>
			  <m:ci>N</m:ci>
			</m:apply>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:sum/>
	      <m:bvar>
		<m:ci>n</m:ci>
	      </m:bvar>
	      <m:uplimit>
		<m:apply>
		  <m:minus/>
		  <m:apply>
		    <m:times/>
		    <m:ci>L</m:ci>
		    <m:ci>N</m:ci>
		  </m:apply>
		  <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">z</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>k</m:ci>
			  <m:ci>n</m:ci>
			</m:apply>
			<m:apply>
			  <m:times/>
			  <m:ci>L</m:ci>
			  <m:ci>N</m:ci>
			</m:apply>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:ci type="fn" class="discrete">
		<m:msub>
		  <m:mi>DFT</m:mi>
		  <m:mrow>
		    <m:mi>L</m:mi>
		    <m:mi>N</m:mi>
		  </m:mrow>
		</m:msub>
	      </m:ci>
	      <m:apply>
		<m:ci type="fn" class="discrete">z</m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
        Note that
	zero-padding <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">interpolates</emphasis> the spectrum.  One
	should always zero-pad (by about at least a factor of 4) when
	using the <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="DFTequation">DFT</cnxn> to approximate
	the <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="DTFTequation">DTFT</cnxn> to get a clear
	picture of the <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="DTFTequation">DTFT</cnxn>.
        While performing computations on zeros may at first seem inefficient,
        using <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" document="m12026">FFT</cnxn> algorithms, which generally
        expect the same number of input and output samples, actually makes this
        approach very efficient.</para>
      <para 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="s64"><cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig:1"/> shows the magnitude of the DFT values corresponding to the
        non-negative frequencies of a real-valued length-64 DFT of a length-64 signal,
        both in a "stem" format to emphasize the discrete nature of the DFT frequency samples,
        and as a line plot to emphasize its use as an approximation to the 
        continuous-in-frequency DTFT.
        From this figure, it appears that the signal has a single dominant
        frequency component.
      <figure 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="fig:1" orient="vertical"><name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Spectrum without zero-padding</name>
      <subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Stem plot</name>
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="zpstem64.png"/>
      </subfigure>
      <subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Line Plot</name>
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="zpline64.png"/>
      </subfigure>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Magnitude DFT spectrum of 64 samples
        of a signal with a length-64 DFT (no zero padding)
      </caption>
      </figure>
      Zero-padding by a factor of two by appending 64 zero values to the
      signal and computing a length-128 DFT yields <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig:2"/>.
      It can now be seen that the signal consists of at least two narrowband
      frequency components; the gap between them fell between DFT samples
      in <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig:1"/>, resulting in a misleading picture of the
      signal's spectral content.
      This is sometimes called the <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">picket-fence effect</term>, and
      is a result of insufficient sampling in frequency.
      While zero-padding by a factor of two has revealed more structure,
      it is unclear whether the peak magnitudes are reliably rendered, and
      the jagged linear interpolation in the line graph does not yet reflect
      the smooth, continuously-differentiable spectrum of the DTFT
      of a finite-length truncated signal.
      Errors in the apparent peak magnitude due to insufficient frequency sampling
      is sometimes referred to as <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">scalloping loss</term>.
      <figure 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="fig:2" orient="vertical"><name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Spectrum with factor-of-two zero-padding</name>
      <subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Stem plot</name>
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="zpstem128.png"/>
      </subfigure>
      <subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Line Plot</name>
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="zpline128.png"/>
      </subfigure>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Magnitude DFT spectrum of 64 samples
        of a signal with a length-128 DFT (double-length zero-padding)
      </caption>
      </figure>
      Zero-padding to four times the length of the signal,
      as shown in <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig:3"/>,
      clearly shows the spectral structure and reveals that the magnitude of
      the two spectral lines are nearly identical.
      The line graph is still a bit rough and the peak magnitudes and frequencies
      may not be precisely captured, but the spectral characteristics of the
      truncated signal are now clear.
      <figure 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="fig:3" orient="vertical"><name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Spectrum with factor-of-four zero-padding</name>
      <subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Stem plot</name>
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="zpstem256.png"/>
      </subfigure>
      <subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Line Plot</name>
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="zpline256.png"/>
      </subfigure>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Magnitude DFT spectrum of 64 samples
        of a signal with a length-256 zero-padded DFT (four times zero-padding)
      </caption>
      </figure>
      Zero-padding to a length of 1024, as shown in <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig:4"/>
      yields a spectrum that is smooth and continuous to the resolution of the
      computer screen, and produces a very accurate rendition of the DTFT of
      the <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">truncated</emphasis> signal.
      <figure 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="fig:4" orient="vertical"><name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Spectrum with factor-of-sixteen zero-padding</name>
      <subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Stem plot</name>
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="zpstem1024.png"/>
      </subfigure>
      <subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Line Plot</name>
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="zpline1024.png"/>
      </subfigure>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Magnitude DFT spectrum of 64 samples
        of a signal with a length-1024 zero-padded DFT.
        The spectrum now looks smooth and continuous and reveals all the
        structure of the DTFT of a truncated signal.
      </caption>
      </figure>
      The signal used in this example actually consisted of two pure sinusoids of
      equal magnitude.
      The slight difference in magnitude of the two dominant peaks, the breadth
      of the peaks, and the sinc-like lesser
      <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">side lobe</term> peaks throughout frequency are artifacts of the
      truncation, or windowing, process used to practically approximate the DFT.
      These problems and partial solutions to them are discussed in the following section.</para>
      
    </section>

    <section 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="windowing">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Effects of Windowing</name>
      <para 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="para9">Applying the DTFT multiplication property
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#estimate"/>
	      <m:apply>
		<m:ci type="fn">X</m:ci>
		<m:ci>
		  <m:msub>
		    <m:mi>ω</m:mi>
		    <m:mi>k</m:mi>
		  </m:msub>
		</m:ci>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:sum/>
	      <m:bvar>
		<m:ci>n</m:ci>
	      </m:bvar>
	      <m:uplimit>
		<m:ci>∞</m:ci>
	      </m:uplimit>
	      <m:lowlimit>
		<m:apply>
		  <m:minus/>
		  <m:ci>∞</m:ci>
		</m:apply>
	      </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:ci type="fn">w</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
		<m:apply>
		  <m:exp/>
		  <m:apply>
		    <m:minus/>
		    <m:apply>
		      <m:times/>
		      <m:imaginaryi/>
		      <m:ci>
			<m:msub>
			  <m:mi>ω</m:mi>
			  <m:mi>k</m:mi>
			</m:msub>
		      </m:ci>
                      <m:ci>n</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:times/>
	      <m:apply>
		<m:divide/>
		<m:cn>1</m:cn>
		<m:apply>
		  <m:times/>
		  <m:cn>2</m:cn>
		  <m:pi/>
		</m:apply>
	      </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>
		    <m:msub>
		      <m:mi>ω</m:mi>
		      <m:mi>k</m:mi>
		    </m:msub>
		  </m:ci>
		</m:apply>
		<m:apply>
		  <m:ci type="fn">W</m:ci>
		  <m:ci>
		    <m:msub>
		      <m:mi>ω</m:mi>
		      <m:mi>k</m:mi>
		  </m:msub>
		  </m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
	we find that the <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="DFTequation">DFT</cnxn>
        of the windowed (truncated) signal produces
	samples not of the true (desired)  DTFT spectrum
	<m:math>
	  <m:apply>
	    <m:ci type="fn">X</m:ci>
	    <m:ci>ω</m:ci>
	  </m:apply>
	</m:math>, but of a <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">smoothed</emphasis> verson
	<m:math>
	  <m:apply>
	    <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#convolve"/>
	    <m:apply>
	      <m:ci type="fn">X</m:ci>
	      <m:ci>ω</m:ci>
	    </m:apply>
	    <m:apply>
	      <m:ci type="fn">W</m:ci>
	      <m:ci>ω</m:ci>
	    </m:apply>
	  </m:apply>
	</m:math>. We want this to resemble
	<m:math>
	  <m:apply>
	    <m:ci type="fn">X</m:ci>
	    <m:ci>ω</m:ci>
	  </m:apply>
	</m:math> as closely as possible, so 
	<m:math>
	  <m:apply>
	    <m:ci type="fn">W</m:ci>
	    <m:ci>ω</m:ci>
	  </m:apply>
	</m:math> should be as close to an impulse as possible.
        The <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">window</term>
        <m:math>
          <m:apply>
            <m:ci type="fn">w</m:ci>
	    <m:ci>n</m:ci>
	  </m:apply>
	</m:math>
        need not be a simple <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">truncation</term> (or 
        <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">rectangle</term>, or <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">boxcar</term>) window; other shapes
        can also be used as long as they limit the sequence to at most
        <m:math><m:ci>N</m:ci></m:math> consecutive nonzero samples.
        All good windows are impulse-like, and represent various tradeoffs
	between three criteria:
	<list 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="list4" type="enumerated"><item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    main lobe width: (limits resolution of closely-spaced peaks
	    of equal height)
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    height of first sidelobe: (limits ability to see a small peak near a big peak)
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    slope of sidelobe drop-off: (limits ability to see small peaks further away from a big peak)
	  </item>
	</list>
      </para><para 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="element-320">Many different <link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" src="http://en.wikipedia.org/wiki/Window_function">window functions</link> have been
developed for truncating and shaping a length-<m:math><m:ci>N</m:ci></m:math> signal segment for
spectral analysis.
The simple <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">truncation</term> window has a periodic sinc DTFT, as shown in <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig:boxcar"/>.
It has the narrowest main-lobe width,
<m:math>
  <m:apply>
    <m:divide/>
      <m:apply>
        <m:times/>
          <m:cn>2</m:cn>
          <m:pi/>
       </m:apply>
       <m:ci>N</m:ci>
  </m:apply>
</m:math>
at the -3 dB level and
<m:math>
  <m:apply>
    <m:divide/>
      <m:apply>
        <m:times/>
          <m:cn>4</m:cn>
          <m:pi/>
       </m:apply>
       <m:ci>N</m:ci>
  </m:apply>
</m:math>
between the two zeros surrounding the main lobe,
of the common window functions, but also the largest side-lobe peak, at about -13 dB.
The side-lobes also taper off relatively slowly.
</para>
      <figure 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="fig:boxcar" orient="vertical"><name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"/>
      <subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Rectangular window</name>
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="boxcar64.png"/>
      </subfigure>
      <subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Magnitude of boxcar window spectrum</name>
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="boxcarfreq.png"/>
      </subfigure>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Length-64 truncation (boxcar) window and its magnitude DFT spectrum
      </caption>
      </figure>
      <para 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="element-653">The <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Hann window</term> (sometimes also called the <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">hanning</term> window),
illustrated in <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig:hann"/>,
takes the form
<m:math>
  <m:apply>
  <m:eq/>
    <m:apply>
      <m:ci type="fn" class="discrete">w</m:ci>
      <m:ci>n</m:ci>
    </m:apply>
    <m:apply>
      <m:minus/>
      <m:cn>0.5</m:cn>
      <m:apply>
        <m:times/>
        <m:cn>0.5</m:cn>
        <m:apply>
          <m:cos/>
          <m:apply>
            <m:divide/>
            <m:apply>
              <m:times/>
                <m:cn>2</m:cn>
                <m:pi/>
                <m:ci>n</m:ci>
            </m:apply>
            <m:apply>
              <m:minus/>
              <m:ci>N</m:ci>
              <m:cn>1</m:cn>
            </m:apply>
          </m:apply>
        </m:apply>
      </m:apply>
    </m:apply>
  </m:apply>
</m:math>
for <m:math><m:cn>n</m:cn></m:math> between <m:math><m:cn>0</m:cn></m:math> and 
<m:math>
  <m:apply>
    <m:minus/>
    <m:ci>N</m:ci>
    <m:cn>1</m:cn>
  </m:apply>
</m:math>.

It has a main-lobe width (about
<m:math>
  <m:apply>
    <m:divide/>
      <m:apply>
        <m:times/>
          <m:cn>3</m:cn>
          <m:pi/>
       </m:apply>
       <m:ci>N</m:ci>
  </m:apply>
</m:math>
at the -3 dB level and
<m:math>
  <m:apply>
    <m:divide/>
      <m:apply>
        <m:times/>
          <m:cn>8</m:cn>
          <m:pi/>
       </m:apply>
       <m:ci>N</m:ci>
  </m:apply>
</m:math>
between the two zeros surrounding the main lobe) considerably larger than the
rectangular window,
but the largest side-lobe peak is much lower, at about -31.5 dB.
The side-lobes also taper off much faster.
For a given length, this window is worse than the boxcar window at separating
closely-spaced spectral components of similar magnitude, but better for identifying
smaller-magnitude components at a greater distance from the larger components.
</para><figure 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="fig:hann" orient="vertical"><name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"/>
      <subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Hann window</name>
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="hann64.png"/>
      </subfigure>
      <subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Magnitude of Hann window spectrum</name>
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="hannfreq.png"/>
      </subfigure>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Length-64 Hann window and its magnitude DFT spectrum
      </caption></figure><para 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="element-645">The <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Hamming window</term>,
illustrated in <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig:hamming"/>,
has a form similar to the Hann window but with slightly different constants:
<m:math>
  <m:apply>
  <m:eq/>
    <m:apply>
      <m:ci type="fn" class="discrete">w</m:ci>
      <m:ci>n</m:ci>
    </m:apply>
    <m:apply>
      <m:minus/>
      <m:cn>0.538</m:cn>
      <m:apply>
        <m:times/>
        <m:cn>0.462</m:cn>
        <m:apply>
          <m:cos/>
          <m:apply>
            <m:divide/>
            <m:apply>
              <m:times/>
                <m:cn>2</m:cn>
                <m:pi/>
                <m:ci>n</m:ci>
            </m:apply>
            <m:apply>
              <m:minus/>
              <m:ci>N</m:ci>
              <m:cn>1</m:cn>
            </m:apply>
          </m:apply>
        </m:apply>
      </m:apply>
    </m:apply>
  </m:apply>
</m:math>
for <m:math><m:cn>n</m:cn></m:math> between <m:math><m:cn>0</m:cn></m:math> and 
<m:math>
  <m:apply>
    <m:minus/>
    <m:ci>N</m:ci>
    <m:cn>1</m:cn>
  </m:apply>
</m:math>.

Since it is composed of the same Fourier series harmonics as the Hann window,
it has a similar main-lobe width (a bit less than
<m:math>
  <m:apply>
    <m:divide/>
      <m:apply>
        <m:times/>
          <m:cn>3</m:cn>
          <m:pi/>
       </m:apply>
       <m:ci>N</m:ci>
  </m:apply>
</m:math>
at the -3 dB level and
<m:math>
  <m:apply>
    <m:divide/>
      <m:apply>
        <m:times/>
          <m:cn>8</m:cn>
          <m:pi/>
       </m:apply>
       <m:ci>N</m:ci>
  </m:apply>
</m:math>
between the two zeros surrounding the main lobe),
but the largest side-lobe peak is much lower, at about -42.5 dB.
However, the side-lobes also taper off much more slowly than with the Hann window.
For a given length, the Hamming window is better than the Hann (and of course
the boxcar) windows at separating a small component relatively near to a large
component, but worse than the Hann for identifying very small components at
considerable frequency separation.
Due to their shape and form, the Hann and Hamming windows are also known as
<term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">raised-cosine windows</term>.</para><figure 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="fig:hamming" orient="vertical"><name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"/>
      <subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Hamming window</name>
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="hamming64.png"/>
      </subfigure>
      <subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Magnitude of Hamming window spectrum</name>
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="hammingfreq.png"/>
      </subfigure>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Length-64 Hamming window and its magnitude DFT spectrum
      </caption></figure><note xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Standard even-length windows are symmetric around a point halfway between the window
samples
<m:math>
  <m:apply>
    <m:minus/>
    <m:apply>
       <m:divide/>
       <m:ci>N</m:ci>
       <m:cn>2</m:cn>
    </m:apply>
    <m:cn>1</m:cn>
  </m:apply>
</m:math>
and
<m:math>
  <m:apply>
    <m:divide/>
    <m:ci>N</m:ci>
    <m:cn>2</m:cn>
  </m:apply>
</m:math>.
For some applications such as <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" document="m10570">time-frequency analysis</cnxn>,
it may be important to align the window perfectly to a sample.
In such cases, a <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">DFT-symmetric</term> window that is symmetric around
the
<m:math>
  <m:apply>
    <m:divide/>
    <m:ci>N</m:ci>
    <m:cn>2</m:cn>
  </m:apply>
</m:math>-th
sample can be used.
For example, the DFT-symmetric Hamming window is
<m:math>
  <m:apply>
  <m:eq/>
    <m:apply>
      <m:ci type="fn" class="discrete">w</m:ci>
      <m:ci>n</m:ci>
    </m:apply>
    <m:apply>
      <m:minus/>
      <m:cn>0.538</m:cn>
      <m:apply>
        <m:times/>
        <m:cn>0.462</m:cn>
        <m:apply>
          <m:cos/>
          <m:apply>
            <m:divide/>
            <m:apply>
              <m:times/>
                <m:cn>2</m:cn>
                <m:pi/>
                <m:ci>n</m:ci>
            </m:apply>
            <m:ci>N</m:ci>
          </m:apply>
        </m:apply>
      </m:apply>
    </m:apply>
  </m:apply>
</m:math>.
A DFT-symmetric window has a purely real-valued DFT and DTFT.
DFT-symmetric versions of windows,
such as the Hamming and Hann windows, composed of few discrete Fourier series terms
of period <m:math><m:ci>N</m:ci></m:math>,
have few non-zero DFT terms (only when <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">not</emphasis> zero-padded)
and can be used efficiently in <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" document="m12029">running FFTs</cnxn>.</note><para 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="element-231">The main-lobe width of a window is an inverse function of the window-length
<m:math>
  <m:ci>N</m:ci>
</m:math>;
for any type of window, a longer window will always provide better resolution.
</para><para 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="element-253">Many other windows exist that make various other tradeoffs between main-lobe width,
height of largest side-lobe, and side-lobe rolloff rate.
The <link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" src="http://en.wikipedia.org/wiki/Kaiser_window">Kaiser window</link> family, based on a modified Bessel function, has an adjustable parameter that
allows the user to tune the tradeoff over a continuous range.
The Kaiser window has near-optimal time-frequency resolution and is widely used.
A list of many different windows can be found <link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" src="http://en.wikipedia.org/wiki/Window_function">here</link>.
</para>

<example 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="element-511">
  <para 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="element-975"><cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig:examplesig"/> shows 64 samples of a real-valued signal composed of several sinusoids
    of various frequencies and amplitudes.
      <figure 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="fig:examplesig"><name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"/>
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="examplesig.png"/>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">64 samples of an unknown signal
      </caption>
      </figure>
    <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig:boxcarspec"/> shows the magnitude (in dB) of the
    positive frequencies of a length-1024 zero-padded DFT of this signal
    (that is, using a simple truncation, or rectangular, window).
      <figure 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="fig:boxcarspec"><name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"/>
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="boxcarspec.png"/>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Magnitude (in dB) of the zero-padded DFT spectrum of the signal in <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig:examplesig"/>
        using a simple length-64 rectangular window
      </caption>
      </figure>
     From this spectrum, it is clear that the signal has two large, nearby
     frequency components with frequencies near 1 radian of essentially the same magnitude.
     </para>
     <para 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="hammingex"><cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig:hammingspec"/> shows the spectral estimate produced using
     a length-64 Hamming window applied to the same signal shown in <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig:examplesig"/>.
      <figure 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="fig:hammingspec"><name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"/>
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="hammingspec.png"/>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Magnitude (in dB) of the zero-padded DFT spectrum of the signal in <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig:examplesig"/>
        using a length-64 Hamming window
      </caption>
      </figure>
    The two large spectral peaks can no longer be resolved; they blur into a
    single broad peak due to the reduced spectral resolution of the broader main
    lobe of the Hamming window.
    However, the lower side-lobes reveal a third component at a frequency of
    about 0.7 radians at about 35 dB lower magnitude than the larger components.
    This component was entirely buried under the side-lobes when the
    rectangular window was used, but now stands out well above the much lower
    nearby side-lobes of the Hamming window.
    </para>
    <para 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="hannex">
     <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig:hannspec"/> shows the spectral estimate produced using
     a length-64 Hann window applied to the same signal shown in <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig:examplesig"/>.
      <figure 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="fig:hannspec"><name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"/>
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="hannspec.png"/>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Magnitude (in dB) of the zero-padded DFT spectrum of the signal in <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig:examplesig"/>
        using a length-64 Hann window
      </caption>
      </figure>
    The two large components again merge into a single peak, and the smaller
    component observed with the Hamming window is largely lost under the higher
    nearby side-lobes of the Hann window.
    However, due to the much faster side-lobe rolloff of the Hann window's spectrum,
    a fourth component at a frequency of about 2.5 radians with a magnitude
    about 65 dB below that of the main peaks is now clearly visible.</para><para 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="element-86">This example illustrates that no single window is best for all spectrum analyses.
The best window depends on the nature of the signal, and different windows may
be better for different components of the same signal.
A skilled spectrum analysist may apply several different windows to a signal to
gain a fuller understanding of the data.</para>
</example>
    </section>
    
	    
  </content>
  
</document>
