<?xml version="1.0" encoding="utf-8"?>
<!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="m0533">

  <name>Frequency Domain Filtering</name>

  <metadata>
  <md:version>2.5</md:version>
  <md:created>2000/08/10</md:created>
  <md:revised>2004/08/09 16:44:03.412 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="mselik">
      <md:firstname>Melissa</md:firstname>
      
      <md:surname>Selik</md:surname>
      <md:email>mselik@alumni.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>Fourier Transform</md:keyword>
    <md:keyword>DFT</md:keyword>
    <md:keyword>filter</md:keyword>
    <md:keyword>Frequency-Domain</md:keyword>
  </md:keywordlist>

  <md:abstract>Explains the complication of dealing with both continuous and discrete frequency.
</md:abstract>
</metadata>

  <content>

    <para id="para1">
      Before detailing this procedure, let's clarify why so many new
      issues arose in trying to develop a frequency-domain
      implementation of linear filtering.  The <cnxn document="m0510" target="fig0003" strength="9"> frequency-domain
      relationship</cnxn> between a filter's input and output is
      <emphasis>always</emphasis> true:
      <m:math>
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:ci type="fn">Y</m:ci>
	    <m:apply>
	      <m:exp/>
	      <m:apply>
		<m:times/>
		<m:imaginaryi/>
		<m:cn>2</m:cn>
		<m:pi/>
		<m:ci>f</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	  <m:apply>
	    <m:times/>
	    <m:apply>
	      <m:ci type="fn">H</m:ci>
	      <m:apply>
		<m:exp/>
		<m:apply>
		  <m:times/>
		  <m:imaginaryi/>
		  <m:cn>2</m:cn>
		  <m:pi/>
		  <m:ci>f</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:ci type="fn">X</m:ci>
	      <m:apply>
		<m:exp/>
		<m:apply>
		  <m:times/>
		  <m:imaginaryi/>
		  <m:cn>2</m:cn>
		  <m:pi/>
		  <m:ci>f</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>
      .  This Fourier transforms in this result are discrete-time Fourier
      transforms; for example,
      <m:math>
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:ci type="fn">X</m:ci>
	    <m:apply>
	      <m:exp/>
	      <m:apply>
		<m:times/>
		<m:imaginaryi/>
		<m:cn>2</m:cn>
		<m:pi/>
		<m:ci>f</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	  <m:apply>
	    <m:sum/>
	    <m:bvar><m:ci>n</m:ci></m:bvar>
	    <m:domainofapplication>
	      <m:ci>n</m:ci>
	    </m:domainofapplication>
	    <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:cn>2</m:cn>
		    <m:pi/>
		    <m:ci>f</m:ci>
		    <m:ci>n</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>
      .  Unfortunately, using this relationship to perform filtering
      is restricted to the situation when we have analytic formulas
      for the frequency response and the input signal. The reason why
      we had to "invent" the discrete Fourier transform (DFT) has the
      same origin: The spectrum resulting from the discrete-time
      Fourier transform depends on the <emphasis>continuous</emphasis>
      frequency variable <m:math><m:ci>f</m:ci></m:math>. That's fine
      for analytic calculation, but computationally we would have to
      make an uncountably infinite number of computations.
      <note type="note">
	Did you know that two kinds of infinities can be meaningfully
      defined? A <term>countably infinite</term> quantity means that
      it can be associated with a limiting process associated with
      integers.  An <term>uncountably infinite</term> quantity cannot
      be so associated.  The number of rational numbers is countably
      infinite (the numerator and denominator correspond to locating
      the rational by row and column; the total number so-located can
      be counted, voila!); the number of irrational numbers is
      uncountably infinite. Guess which is "bigger?"
      </note>
      The DFT computes the Fourier transform at a finite set of
      frequencies — samples the true spectrum — which can
      lead to aliasing in the time-domain unless we sample
      sufficiently fast. The sampling interval here is
      <m:math>
	<m:apply>
	  <m:divide/>
	  <m:cn>1</m:cn>
	  <m:ci>K</m:ci>
	</m:apply>
      </m:math>
      for a length-<m:math><m:ci>K</m:ci></m:math> DFT: faster
      sampling to avoid aliasing thus requires a longer transform
      calculation.  Since the longest signal among the input,
      unit-sample response and output is the output, it is that
      signal's duration that determines the transform length.  We
      simply extend the other two signals with zeros (zero-pad) to
      compute their DFTs.
    </para>

  </content>
</document>
