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

  <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/">Design of Linear-Phase FIR Filters by DFT-Based Interpolation</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.1</md:version>
  <md:created xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2002/06/28</md:created>
  <md:revised xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2002/07/01</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="selesi">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Ivan</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Selesnick</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">selesi@taco.poly.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="charlet">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Charlet</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Reedstrom</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">charlet@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="selesi">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Ivan</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Selesnick</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">selesi@taco.poly.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-based interpolation</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">FIR Filters</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">linear-phase</md:keyword>
  </md:keywordlist>

  <md:abstract xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">(Blank Abstract)</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="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/">
	DESIGN OF FIR FILTERS BY DFT-BASED INTERPOLATION
      </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="dftinterpolation">
	One approach to the design of FIR filters is to ask that
	<m:math>
	  <m:apply>
	    <m:ci type="fn">A</m:ci>
	    <m:ci>ω</m:ci>
	  </m:apply>
	</m:math> pass through a specified set of values.  If the
	number of specified interpolation points is the same as the
	number of filter parameters, then the filter is totally
	determined by the interpolation conditions, and the filter can
	be found by solving a system of linear equations.  When the
	interpolation points are equally spaced between 0 and
	<m:math>
	  <m:apply>
	    <m:times/>
	    <m:cn>2</m:cn>
	    <m:pi/>
	  </m:apply>
	</m:math>, then this interpolation problem can be solved very
	efficiently using the DFT.
      </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">
	To derive the DFT solution to the interpolation problem, recall
	the formula relating the samples of the frequency response to
	the DFT.  In the case we are interested here, the number of
	samples is to be 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/">same</emphasis> as the length of
	the filter (
	<m:math>
	  <m:apply>
	  <m:eq/>
	    <m:ci>L</m:ci>
	    <m:ci>N</m:ci>
	  </m:apply>
	</m:math>).  
	
	<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:eq/>
	      <m:apply>
		<m:ci type="fn">H</m:ci>
		<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:ci>k</m:ci>
		</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 type="fn">h</m:ci>
		    <m:ci>n</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:exp/>
		    <m:apply>
		      <m:times/>
		      <m:imaginaryi/>
		      <m:apply>
			<m:divide/>
			<m:apply>
			  <m:times/>
			  <m:cn>2</m:cn>
			  <m:pi/>
			</m:apply>
			<m:ci>N</m:ci>
		      </m:apply>
		      <m:ci>n</m:ci>
		      <m:ci>k</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:ci type="fn"><m:msub>
		    <m:mi>DFT</m:mi>
		    <m:mi>N</m:mi>
		</m:msub></m:ci>
		<m:apply>
		  <m:ci type="fn">h</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>
      </para>

      <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="subsec1">
	<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/">Types I and II</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="type12">
	  Recall the relation between 
	  <m:math>
	    <m:apply>
	      <m:ci type="fn">A</m:ci>
	      <m:ci>ω</m:ci>
	    </m:apply>
	  </m:math> and

	  <m:math>
	    <m:apply>
	      <m:ci type="fn"><m:msup>
		  <m:mi>H</m:mi>
		  <m:mi>f</m:mi>
		</m:msup></m:ci>
	      <m:ci>ω</m:ci>
	    </m:apply>
	  </m:math> for a Type I and II filter, to obtain

	  <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">A</m:ci>
		  <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:ci>k</m:ci>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:ci type="fn">H</m:ci>
		    <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:ci>k</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:exp/>
		    <m:apply>
		      <m:times/>
		      <m:imaginaryi/>
		      <m:ci>M</m:ci>
		      <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:ci>k</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:ci type="fn"><m:msub>
			<m:mi>DFT</m:mi>
			<m:mi>N</m:mi>
		      </m:msub></m:ci>
		    <m:apply>
		      <m:ci type="fn">h</m:ci>
		      <m:ci>n</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:ci><m:msubsup>
		      <m:mi>W</m:mi>
		      <m:mi>N</m:mi>
		      <m:mrow>
			<m:mi>M</m:mi>
			<m:mi>k</m:mi>
		      </m:mrow>
		    </m:msubsup></m:ci>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>

	  Now we can related the <m:math><m:ci>N</m:ci></m:math>-point
	  DFT of
	  <m:math>
	    <m:apply>
	      <m:ci type="fn">h</m:ci>
	      <m:ci>n</m:ci>
	    </m:apply>
	  </m:math> to the samples of
	  <m:math>
	    <m:apply>
	      <m:ci type="fn">A</m:ci>
	      <m:ci>ω</m:ci>
	    </m:apply>
	  </m:math>:

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn"><m:msub>
		    <m:mi>DFT</m:mi>
		    <m:mi>N</m:mi>
		  </m:msub></m:ci>
		<m:apply>
		  <m:ci type="fn">h</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:ci type="fn">A</m:ci>
		  <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:ci>k</m:ci>
		  </m:apply>
		</m:apply>
		<m:ci><m:msubsup>
		    <m:mi>W</m:mi>
		    <m:mi>N</m:mi>
		    <m:mrow>
		      <m:mo>−</m:mo>
		      <m:mi>M</m:mi>
		      <m:mi>k</m:mi>
		    </m:mrow>
		  </m:msubsup></m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>

	  Finally, we can solve for the filter coefficients 
	  <m:math>
	    <m:apply>
	      <m:ci type="fn">h</m:ci>
	      <m:ci>n</m:ci>
	    </m:apply>
	  </m:math>.  

	  <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:apply>
		    <m:inverse/>
		    <m:ci type="fn"><m:msub>
			<m:mi>DFT</m:mi>
			<m:mi>N</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		    <m:apply>
		      <m:ci type="fn">A</m:ci>
		      <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:ci>k</m:ci>
		      </m:apply>
		    </m:apply>
		    <m:ci><m:msubsup>
			<m:mi>W</m:mi>
			<m:mi>N</m:mi>
			<m:mrow>
			  <m:mo>−</m:mo>
			  <m:mi>M</m:mi>
			  <m:mi>k</m:mi>
			</m:mrow>
			</m:msubsup></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>
	  
	  Therefore, if the values 
	  <m:math>
	    <m:apply>
	      <m:ci type="fn">A</m:ci>
	      <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:ci>k</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>are specified, we can then obtain the filter
	  coefficients 
	  <m:math>
	    <m:apply>
	      <m:ci type="fn">h</m:ci>
	      <m:ci>n</m:ci>
	    </m:apply>
	  </m:math>that satisfies the interpolation conditions by
	  using the inverse DFT.  It is important to note however,
	  that the specified values
	  <m:math>
	    <m:apply>
	      <m:ci type="fn">A</m:ci>
	      <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:ci>k</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>must possess the appropriate symmetry in order for
	  the result of the inverse DFT to be a real Type I or II FIR
	  filter.
	</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="subsec2">
	<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/">Types III and IV</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="type34">
	  For Type III and IV filters, we have

	  <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="eqn4">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:ci type="fn">A</m:ci>
		  <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:ci>k</m:ci>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:minus/>
		    <m:imaginaryi/>
		  </m:apply>
		  <m:apply>
		    <m:ci type="fn">H</m:ci>
		    <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:ci>k</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:exp/>
		    <m:apply>
		      <m:times/>
		      <m:imaginaryi/>
		      <m:ci>M</m:ci>
		      <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:ci>k</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:minus/>
		    <m:imaginaryi/>
		  </m:apply>
		  <m:apply>
		    <m:ci type="fn"><m:msub>
			<m:mi>DFT</m:mi>
			<m:mi>N</m:mi>
		      </m:msub></m:ci>
		    <m:apply>
		      <m:ci type="fn">h</m:ci>
		      <m:ci>n</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:ci><m:msubsup>
		      <m:mi>W</m:mi>
		      <m:mi>N</m:mi>
		      <m:mrow>
			<m:mi>M</m:mi>
			<m:mi>k</m:mi>
		      </m:mrow>
		    </m:msubsup></m:ci>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>

	  Then we can related the
	  <m:math><m:ci>N</m:ci></m:math>-point DFT of

	  <m:math>
	    <m:apply>
	      <m:ci type="fn">h</m:ci>
	      <m:ci>n</m:ci>
	    </m:apply>
	  </m:math> to the samples of

	  <m:math>
	    <m:apply>
	      <m:ci type="fn">A</m:ci>
	      <m:ci>ω</m:ci>
	    </m:apply>
	  </m:math>:

	  <m:math display="block">
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn"><m:msub>
		    <m:mi>DFT</m:mi>
		    <m:mi>N</m:mi>
		  </m:msub></m:ci>
		<m:apply>
		  <m:ci type="fn">h</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:imaginaryi/>
		<m:apply>
		  <m:ci type="fn">A</m:ci>
		  <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:ci>k</m:ci>
		  </m:apply>
		</m:apply>
		<m:ci><m:msubsup>
		    <m:mi>W</m:mi>
		    <m:mi>N</m:mi>
		    <m:mrow>
		      <m:mi>M</m:mi>
		      <m:mi>k</m:mi>
		    </m:mrow>
		  </m:msubsup></m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>

	  Solving for the filter coefficients

	  <m:math>
	    <m:apply>
	      <m:ci type="fn">h</m:ci>
	      <m:ci>n</m:ci>
	    </m:apply>
	  </m:math> gives: 

	  <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="eqn5">
	    <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:apply>
		    <m:inverse/>
		    <m:ci type="fn"><m:msub>
			<m:mi>DFT</m:mi>
			<m:mi>N</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:apply>
		    <m:times/>
		    <m:imaginaryi/>
		    <m:apply>
		      <m:ci type="fn">A</m:ci>
		      <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:ci>k</m:ci>
		      </m:apply>
		    </m:apply>
		    <m:ci><m:msubsup>
			<m:mi>W</m:mi>
			<m:mi>N</m:mi>
			<m:mrow>
			  <m:mo>−</m:mo>
			  <m:mi>M</m:mi>
			  <m:mi>k</m:mi>
			</m:mrow>
			</m:msubsup></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>
	</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/" id="dftinterpexamples">
      <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/">EXAMPLE: DFT-INTERPOLATION (TYPE I)</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="extype1">
	The following Matlab code fragment illustrates how to use this
	approach to design a length 11 Type I FIR filter for which 
	<m:math display="inline">
	  <m:apply>
	    <m:forall/>
	    <m:bvar><m:ci>k</m:ci></m:bvar>
	    <m:condition>
	      <m:apply>
		<m:and/>
		<m:apply>
		  <m:leq/>
		  <m:cn>0</m:cn>
		  <m:ci>k</m:ci>
		  <m:apply>
		    <m:minus/>
		    <m:ci>N</m:ci>
		    <m:cn>1</m:cn>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:eq/>
		  <m:ci>N</m:ci>
		  <m:cn>11</m:cn>
		</m:apply>
	      </m:apply>
	    </m:condition>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn">A</m:ci>
		<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:ci>k</m:ci>
		</m:apply>
	      </m:apply>
	      <m:vector>
		<m:cn>1</m:cn>
		<m:cn>1</m:cn>
		<m:cn>1</m:cn>
		<m:cn>0</m:cn>
		<m:cn>0</m:cn>
		<m:cn>0</m:cn>
		<m:cn>0</m:cn>
		<m:cn>0</m:cn>
		<m:cn>0</m:cn>
		<m:cn>1</m:cn>
		<m:cn>1</m:cn>
	      </m:vector>
	    </m:apply>
	  </m:apply>
	</m:math>.
      </para>

      <code 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="block">

	&gt;&gt; N = 11;
	&gt;&gt; M = (N-1)/2;
	&gt;&gt; Ak = [1 1 1 0 0 0 0 0 0 1 1};   % samples of A(w)
	&gt;&gt; k = 0:N-1;
	&gt;&gt; W = exp(j*2*pi/N);
	&gt;&gt; h = ifft(Ak.*W.^(-M*k));
	&gt;&gt; h'

	ans = 

	   0.0694 - 0.0000i
	  -0.0540 - 0.0000i
	  -0.1094 + 0.0000i
	   0.0474 + 0.0000i
	   0.3194 + 0.0000i
	   0.4545 + 0.0000i
	   0.3194 + 0.0000i
	   0.0474 + 0.0000i
	  -0.1094 + 0.0000i
	  -0.0540 - 0.0000i
	   0.0694 - 0.0000i

      </code>

      <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="extype1b">
	Observe that the filter coefficients <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">h</code>
	are real and symmetric; that a Type I filter is obtained as
	desired.  The plot of
	<m:math>
	  <m:apply>
	    <m:ci type="fn">A</m:ci>
	    <m:ci>ω</m:ci>
	  </m:apply>
	</m:math> for this filter illustrates the interpolation
	points.
      </para>

      <code 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="block">

	L = 512;
	H = fft([h zeros(1,L-N)]);
	W = exp(j*2*pi/L);
	k = 0:L-1;
	A = H .* W.^(M*k);
	A = real(A);
	w = k*2*pi/L;
	plot(w/pi,A,2*[0:N-1]/N,Ak,'o')
	xlabel('\omega/\pi')
	title('A(\omega)')

      </code>

      <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="figtype1">
	<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="inter1.png"/>
      </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="extype1c">
	An exercise for the student: develop this DFT-based
	interpolation approach for Type II, III, and IV FIR filters.
	Modify the Matlab code above for each case.
      </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="summarydft">
      <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/">SUMMARY: IMPULSE AND AMP RESPONSE</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="summary">
	For an <m:math><m:ci>N</m:ci></m:math>-point linear-phase FIR
	filter
	  <m:math>
	    <m:apply>
	      <m:ci type="fn">h</m:ci>
	      <m:ci>n</m:ci>
	    </m:apply>
	  </m:math>, we summarize: 

	<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="sum" 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/">
	    The formulas for evaluating the amplitude response

	    <m:math>
	      <m:apply>
		<m:ci type="fn">A</m:ci>
		<m:ci>ω</m:ci>
	      </m:apply>
	    </m:math> at <m:math><m:ci>L</m:ci></m:math> equally
	    spaced points from 0 to 
	    <m:math>
	      <m:apply>
		<m:times/>
		<m:cn>2</m:cn>
		<m:pi/>
	      </m:apply>
	    </m:math> (
	    <m:math>
	      <m:apply>
		<m:geq/>
		<m:ci>L</m:ci>
		<m:ci>N</m:ci>
	      </m:apply>
	    </m:math>).
	  </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 formulas for the DFT-based interpolation design of 
	    <m:math>
	      <m:apply>
		<m:ci type="fn">h</m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	    </m:math>.
	  </item>
	</list>

	TYPE I and II:
	<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-2">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn">A</m:ci>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:times/>
		      <m:cn>2</m:cn>
		      <m:pi/>
		    </m:apply>
		    <m:ci>L</m:ci>
		  </m:apply>
		  <m:ci>k</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:ci type="fn"><m:msub>
		      <m:mi>DFT</m:mi>
		      <m:mi>L</m:mi>
		    </m:msub></m:ci>
		  <m:list>
		    <m:apply>
		      <m:ci type="fn">h</m:ci>
		      <m:ci>n</m:ci>
		    </m:apply>
		    <m:ci><m:msub>
			<m:mn>0</m:mn>
			<m:mrow>
			  <m:mi>L</m:mi>
			  <m:mo>-</m:mo>
			  <m:mi>N</m:mi>
			</m:mrow>
		      </m:msub></m:ci>
		  </m:list>
		</m:apply>
		<m:ci><m:msubsup>
		    <m:mi>W</m:mi>
		    <m:mi>L</m:mi>
		    <m:mrow>
		      <m:mi>M</m:mi>
		      <m:mi>k</m:mi>
		    </m:mrow>
		  </m:msubsup></m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>

	<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-2b">
	  <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:apply>
		  <m:inverse/>
		  <m:ci type="fn"><m:msub>
		      <m:mi>DFT</m:mi>
		      <m:mi>N</m:mi>
		    </m:msub></m:ci>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:ci type="fn">A</m:ci>
		    <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:ci>k</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:ci><m:msubsup>
		      <m:mi>W</m:mi>
		      <m:mi>N</m:mi>
		      <m:mrow>
			<m:mo>−</m:mo>
			<m:mi>M</m:mi>
			<m:mi>k</m:mi>
		      </m:mrow>
		    </m:msubsup></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>

	TYPE III and IV:

	<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-4">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn">A</m:ci>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:times/>
		      <m:cn>2</m:cn>
		      <m:pi/>
		    </m:apply>
		    <m:ci>L</m:ci>
		  </m:apply>
		  <m:ci>k</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:minus/>
		  <m:imaginaryi/>
		</m:apply>
		<m:apply>
		  <m:ci type="fn"><m:msub>
		      <m:mi>DFT</m:mi>
		      <m:mi>L</m:mi>
		    </m:msub></m:ci>
		  <m:list>
		    <m:apply>
		      <m:ci type="fn">h</m:ci>
		      <m:ci>n</m:ci>
		    </m:apply>
		    <m:ci><m:msub>
			<m:mn>0</m:mn>
			<m:mrow>
			  <m:mi>L</m:mi>
			  <m:mo>-</m:mo>
			  <m:mi>N</m:mi>
			</m:mrow>
		      </m:msub></m:ci>
		  </m:list>
		</m:apply>
		<m:ci><m:msubsup>
		    <m:mi>W</m:mi>
		    <m:mi>L</m:mi>
		    <m:mrow>
		      <m:mi>M</m:mi>
		      <m:mi>k</m:mi>
		    </m:mrow>
		  </m:msubsup></m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>

	<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-4b">
	  <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:apply>
		  <m:inverse/>
		  <m:ci type="fn"><m:msub>
		      <m:mi>DFT</m:mi>
		      <m:mi>N</m:mi>
		    </m:msub></m:ci>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:imaginaryi/>
		  <m:apply>
		    <m:ci type="fn">A</m:ci>
		    <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:ci>k</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:ci><m:msubsup>
		      <m:mi>W</m:mi>
		      <m:mi>N</m:mi>
		      <m:mrow>
			<m:mo>−</m:mo>
			<m:mi>M</m:mi>
			<m:mi>k</m:mi>
		      </m:mrow>
		    </m:msubsup></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>

      </para>
    </section>
  </content>
</document>
