<?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="m0532">

  <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/">Filtering in the Frequency Domain</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/">2.3</md:version>
  <md:created xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2000/08/10</md:created>
  <md:revised xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2004/08/09 13:35:25.843 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="dhj">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Don</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Johnson</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">dhj@rice.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="mselik">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Melissa</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Selik</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">mselik@alumni.rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="dhj">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Don</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Johnson</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">dhj@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/">difference equation</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">filtering</md:keyword>
  </md:keywordlist>

  <md:abstract xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Describes the use of the discrete Fourier transform for filtering signals in the frequency domain.
</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/">

    <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">
      Returning to the issue of how to use the DFT to perform
      filtering, we can analytically specify the frequency response,
      and derive the corresponding
      length-<m:math><m:ci>N</m:ci></m:math> DFT by sampling the
      frequency response.

      <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="eqn0001"><m:math>
	  <!-- For all k such that k={0 to N-1}, H(k)=H(e^(j2pi*k/n)). -->
	  <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:cn>0</m:cn>
		  <m:ci>…</m:ci>
		  <m:apply>
		    <m:minus/>
		    <m:ci>N</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">H</m:ci>
		<m:ci>k</m:ci>
	      </m:apply>
	      <m:apply>
		<m:ci type="fn">H</m:ci>
		<m:apply>
		  <m:exp/>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:times/>
		      <m:imaginaryi/>
		      <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:math>
      </equation>

      Computing the inverse DFT yields a
      length-<m:math><m:ci>N</m:ci></m:math> signal <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
      matter what the actual duration of the unit-sample response
      might be</emphasis>. If the unit-sample response has a duration
      less than or equal to <m:math><m:ci>N</m:ci></m:math> (it's a
      FIR filter), computing the inverse DFT of the sampled frequency
      response indeed yields the unit-sample response. If, however,
      the duration exceeds <m:math><m:ci>N</m:ci></m:math> , errors
      are encountered. The nature of these errors is easily explained
      by appealing to the Sampling Theorem. By sampling in the
      frequency domain, we have the potential for aliasing in the time
      domain (sampling in one domain, be it time or frequency, can
      result in aliasing in the other) unless we sample fast
      enough. Here, the duration of the unit-sample response
      determines the minimal sampling rate that prevents aliasing. For
      FIR systems — they by definition have finite-duration unit
      sample responses — the number of required DFT samples
      equals the unit-sample response's duration:
      <m:math>
	<m:apply>
	  <m:geq/>
	  <m:ci>N</m:ci>
	  <m:ci>q</m:ci>
	</m:apply>
      </m:math>.  
    </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="exer1">
      <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="exer1a">
	  Derive the minimal DFT length for a
	  length-<m:math><m:ci>q</m:ci></m:math> unit-sample response
	  using the Sampling Theorem.  Because sampling in the
	  frequency domain causes repetitions of the unit-sample
	  response in the time domain, sketch the time-domain result
	  for various choices of the DFT length
	  <m:math><m:ci>N</m:ci></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="exer1b">
	  In sampling a discrete-time signal's Fourier transform  
	  <m:math><m:ci>L</m:ci></m:math> times equally over
	  <m:math>
	    <m:interval closure="closed-open">
	      <m:cn>0</m:cn>
	      <m:apply>
		<m:times/>
		<m:cn>2</m:cn>
		<m:pi/>
	      </m:apply>
	    </m:interval>
	  </m:math>
	  to form the DFT, the corresponding signal equals the periodic
	  repetition of the original signal.
	  <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="eqn1">
	    <m:math>
	      <m:apply>
		<m:mo>↔</m:mo>
		<m:apply>
		  <m:ci type="fn">S</m:ci>
		  <m:ci>k</m:ci>
		</m:apply>
		<m:apply>
		  <m:sum/>
		  <m:bvar>
		    <m:ci>i</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:ci type="fn">s</m:ci>
		    <m:apply>
		      <m:minus/>
		      <m:ci>n</m:ci>
		      <m:apply>
			<m:times/>
			<m:ci>i</m:ci>
			<m:ci>L</m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>
	  To avoid aliasing (in the time domain), the transform length
	  must equal or exceed the signal's duration.
	</para>
      </solution>
    </exercise>  

    <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="exer2">
      <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="exer2a">
	  Express the unit-sample response of a FIR filter in terms of
	  difference equation coefficients. Note that the
	  corresponding question for IIR filters is far more difficult
	  to answer: Consider this <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="m0509" target="fig2000" strength="9">example</cnxn>.
	</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="exer2b">
	  The difference equation for an FIR filter has the form
	  <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="eqn2">
	    <m:math> 
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:ci type="fn">y</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
		<m:apply>
		  <m:sum/>
		  <m:bvar>
		    <m:ci>m</m:ci>
		  </m:bvar>
		  <m:lowlimit>
		    <m:cn>0</m:cn>
		  </m:lowlimit>
		  <m:uplimit>
		    <m:ci>q</m:ci>
		  </m:uplimit>
		  <m:apply>
		    <m:times/>
		    <m:ci><m:msub>
			<m:mi>b</m:mi>
			<m:mi>m</m:mi>
		      </m:msub></m:ci>
		    <m:apply>
		      <m:ci type="fn">x</m:ci>
		      <m:apply>
			<m:minus/>
			<m:ci>n</m:ci>
			<m:ci>m</m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>

	  The unit-sample response equals
	  <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="eqn3">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:ci type="fn">h</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
		<m:apply>
		  <m:sum/>
		  <m:bvar>
		    <m:ci>m</m:ci>
		  </m:bvar>
		  <m:lowlimit>
		    <m:cn>0</m:cn>
		  </m:lowlimit>
		  <m:uplimit>
		    <m:ci>q</m:ci>
		  </m:uplimit>
		  <m:apply>
		    <m:times/>
		    <m:ci><m:msub>
			<m:mi>b</m:mi>
			<m:mi>m</m:mi>
		      </m:msub></m:ci>
		    <m:apply>
		      <m:ci type="fn">δ</m:ci>
		      <m:apply>
			<m:minus/>
			<m:ci>n</m:ci>
			<m:ci>m</m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>
	  which corresponds to the representation described 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="exer1" document="m0523" strength="9">a problem</cnxn>
	  of a length
	  <m:math>
	    <m:apply>
	      <m:plus/>
	      <m:ci>q</m:ci>
	      <m:cn>1</m:cn>
	    </m:apply>
	  </m:math>
	</para>
      </solution>
    </exercise>

    <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">
      For IIR systems, we cannot use the DFT to find the system's
      unit-sample response: aliasing of the unit-sample response will
      <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/">always</emphasis> occur.  Consequently, we can only
      implement an IIR filter accurately in the time domain with the
      system's difference equation. Frequency-domain implementations
      are restricted to FIR filters.
    </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">
      Another issue arises in frequency-domain filtering that is
      related to time-domain aliasing, this time when we consider the
      output.  Assume we have an input signal having duration
      <m:math>
	<m:ci><m:msub>
	  <m:mi>N</m:mi>
	  <m:mi>x</m:mi>
	</m:msub></m:ci>
      </m:math>
      that we pass through a FIR filter having a length-
      <m:math>
	<m:apply>
	  <m:plus/>
	  <m:ci>q</m:ci>
	  <m:cn>1</m:cn>
	</m:apply>
      </m:math>
      unit-sample response.  What is the duration of the output
      signal?  The difference equation for this filter is

      <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="eqn0002">
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci type="fn">y</m:ci>
	      <m:ci>n</m:ci>
	    </m:apply>
	    <m:apply>
	      <m:plus/>
	      <m:apply>
		<m:times/>
		<m:ci><m:msub>
		    <m:mi>b</m:mi>
		    <m:mn>0</m:mn>
		  </m:msub></m:ci>
		<m:apply>
		  <m:ci type="fn">x</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
	      </m:apply>
	      <m:ci>…</m:ci>
	      <m:apply>
		<m:times/>
		<m:ci><m:msub>
		    <m:mi>b</m:mi>
		    <m:mi>q</m:mi>
		  </m:msub></m:ci>
		<m:apply>
		  <m:ci type="fn">x</m:ci>
		  <m:apply>
		    <m:minus/>
		    <m:ci>n</m:ci>
		    <m:ci>q</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
      </equation>

      This equation says that the output depends on current and past
      input values, with the input value
      <m:math><m:ci>q</m:ci></m:math> samples previous defining the
      extent of the filter's <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/">memory</emphasis>of past input
      values. For example, the output at index
      <m:math>
	<m:ci><m:msub>
	    <m:mi>N</m:mi>
	    <m:mi>x</m:mi>
	  </m:msub></m:ci>
      </m:math>
      depends on
      <m:math>
	<m:apply>
	  <m:ci type="fn">x</m:ci>
	  <m:ci><m:msub>
	      <m:mi>N</m:mi>
	      <m:mi>x</m:mi>
	    </m:msub></m:ci>
	</m:apply>
      </m:math>
      (which equals zero), 
      <m:math>
	<m:apply>
	  <m:ci type="fn">x</m:ci>
	  <m:apply>
	    <m:minus/>
	    <m:ci><m:msub>
		<m:mi>N</m:mi>
		<m:mi>x</m:mi>
	      </m:msub></m:ci>
	    <m:cn>1</m:cn>
	  </m:apply>
	</m:apply>
      </m:math>
      , through
      <m:math>
	<m:apply>
	  <m:ci type="fn">x</m:ci>
	  <m:apply>
	    <m:minus/>
	    <m:ci><m:msub>
		<m:mi>N</m:mi>
		<m:mi>x</m:mi>
	      </m:msub></m:ci>
	    <m:ci>q</m:ci>
	  </m:apply>
	</m:apply>
      </m:math>

      .  Thus, the output returns to zero only after the last input
      value passes through the filter's memory.  As the input signal's
      last value occurs at index
      <m:math>
	<m:apply>
	  <m:minus/>
	  <m:ci><m:msub>
	      <m:mi>N</m:mi>
	      <m:mi>x</m:mi>
	    </m:msub></m:ci>
	  <m:cn>1</m:cn>
	</m:apply>
      </m:math>
      , the last nonzero output value occurs when
      <m:math>
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:minus/>
	    <m:ci>n</m:ci>
	    <m:ci>q</m:ci>
	  </m:apply>
	  <m:apply>
	    <m:minus/>
	    <m:ci><m:msub>
		<m:mi>N</m:mi>
		<m:mi>x</m:mi>
	      </m:msub></m:ci>
	    <m:cn>1</m:cn>
	  </m:apply>
	</m:apply>
      </m:math>
      or
      <m:math>
	<m:apply>
	  <m:ci>n</m:ci>
	  <m:apply>
	    <m:plus/>
	    <m:ci>q</m:ci>
	    <m:apply>
	      <m:minus/>
	      <m:ci><m:msub>
		  <m:mi>N</m:mi>
		  <m:mi>x</m:mi>
		</m:msub></m:ci>
	      <m:cn>1</m:cn>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>
      .  Thus, the output signal's duration equals
      <m:math>
	<m:apply>
	  <m:plus/>
	  <m:ci>q</m:ci>
	  <m:ci><m:msub>
	      <m:mi>N</m:mi>
	      <m:mi>x</m:mi>
	    </m:msub></m:ci>
	</m:apply>
      </m:math>
      .
    </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="exer3">
      <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="exer3a">
	  In words, we express this result as "The output's duration
	  equals the input's duration plus the filter's duration minus
	  one."  Demonstrate the accuracy of this statement.
	</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="exer3b">
	  The unit-sample response's duration is 
	  <m:math>
	    <m:apply>
	      <m:plus/>
	      <m:ci>q</m:ci>
	      <m:cn>1</m:cn>
	    </m:apply>
	  </m:math>
	  and the signal's
	  <m:math>
	    <m:ci><m:msub>
		<m:mi>N</m:mi>
		<m:mi>x</m:mi>
	      </m:msub></m:ci>
	  </m:math>
	  . Thus the statement is correct.
	</para>
      </solution>
    </exercise>

    <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="para4">
      The main theme of this result is that a filter's output extends
      longer than either its input or its unit-sample response.  Thus,
      to avoid aliasing when we use DFTs, the dominant factor is not
      the duration of input or of the unit-sample response, but of the
      output.  Thus, the number of values at which we must evaluate the
      frequency response's DFT must be at least
      <m:math>
	<m:apply>
	  <m:plus/>
	  <m:ci>q</m:ci>
	  <m:ci><m:msub>
	      <m:mi>N</m:mi>
	      <m:mi>x</m:mi>
	    </m:msub></m:ci>
	</m:apply>
      </m:math>
      and we must compute the same length DFT of the input.  To
      accommodate a shorter signal than DFT length, we simply
      <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-pad</term> the input:  Ensure that for indices
      extending beyond the signal's duration that the signal is
      zero.  Frequency-domain filtering, diagrammed 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="fig1001" strength="9"/>, is accomplished by storing the
      filter's frequency response as the DFT
      <m:math>
	<m:apply>
	  <m:ci type="fn">H</m:ci>
	  <m:ci>k</m:ci>
	</m:apply>
      </m:math>
      , computing the input's DFT 
      <m:math>
	<m:apply>
	  <m:ci type="fn">X</m:ci>
	  <m:ci>k</m:ci>
	</m:apply>
      </m:math>
      , multiplying them to create the output's DFT
      <m:math>
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:ci type="fn">Y</m:ci>
	    <m:ci>k</m:ci>
	  </m:apply>
	  <m:apply>
	    <m:times/>
	    <m:apply>
	      <m:ci type="fn">H</m:ci>
	      <m:ci>k</m:ci>
	    </m:apply>
	    <m:apply>
	      <m:ci type="fn">X</m:ci>
	      <m:ci>k</m:ci>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>
      , and computing the inverse DFT of the result to yield
      <m:math>
	<m:apply>
	  <m:ci type="fn">y</m:ci>
	  <m:ci>n</m:ci>
	</m:apply>
      </m:math>
      .
    </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="fig1001">
      <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="sys13.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/">
	To filter a signal in the frequency domain, first compute the
	DFT of the input, multiply the result by the sampled frequency
	response, and finally compute the inverse DFT of the
	product.  The DFT's length <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/">must</emphasis> be at
	least the sum of the input's and unit-sample response's
	duration minus one.  We calculate these discrete Fourier
	transforms using the fast Fourier transform algorithm, of
	course.
      </caption>
    </figure>

  </content>
</document>
