<?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="m10870">
  <name>Digital Filter Design for Interpolation and Decimation</name>
  <metadata>
  <md:version>2.6</md:version>
  <md:created>2002/09/27</md:created>
  <md:revised>2005/09/20 20:44:27.297 GMT-5</md:revised>
  <md:authorlist>
      <md:author id="schniter">
      <md:firstname>Phil</md:firstname>
      
      <md:surname>Schniter</md:surname>
      <md:email>schniter@ee.eng.ohio-state.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="jago">
      <md:firstname>Adan</md:firstname>
      
      <md:surname>Galvan</md:surname>
      <md:email>jago@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="emaloney">
      <md:firstname>Erin</md:firstname>
      
      <md:surname>Maloney</md:surname>
      <md:email>emaloney@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="schniter">
      <md:firstname>Phil</md:firstname>
      
      <md:surname>Schniter</md:surname>
      <md:email>schniter@ee.eng.ohio-state.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>aliasing</md:keyword>
    <md:keyword>anti-aliasing</md:keyword>
    <md:keyword>decimation</md:keyword>
    <md:keyword>downsampling</md:keyword>
    <md:keyword>filter design</md:keyword>
    <md:keyword>interpolation</md:keyword>
    <md:keyword>upsampling</md:keyword>
  </md:keywordlist>

  <md:abstract>(Blank Abstract)</md:abstract>
</metadata>


  <content>
    <para id="para1">
      First we treat filter design for interpolation.
      Consider an input signal
      <m:math>
	<m:apply>
	  <m:ci type="fn" class="discrete">x</m:ci>
	  <m:ci>n</m:ci>
	</m:apply>
      </m:math>
      that is 
      <m:math>
	<m:ci>
	  <m:msub>
	    <m:mi>ω</m:mi>
	    <m:mn>0</m:mn>
	  </m:msub>
	</m:ci>
      </m:math>-bandlimited in the DTFT domain.
      If we upsample by factor <m:math><m:ci>
	  L</m:ci></m:math> to get
      <m:math>
	<m:apply>
	  <m:ci type="fn" class="discrete">v</m:ci>
	  <m:ci>m</m:ci>
	</m:apply>
      </m:math>, the desired portion of

      <m:math>
	<m:apply>
	  <m:ci type="fn">V</m:ci>
	  <m:apply>
	    <m:exp/>
	    <m:apply>
	      <m:times/>
	      <m:imaginaryi/>
	      <m:ci>ω</m:ci>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math> 
      is the spectrum in
      <m:math>
	<m:interval closure="closed-open">
	  <m:apply>
	    <m:divide/>
	    <m:apply>
	      <m:minus/>
	      <m:pi/>
	    </m:apply>
	    <m:ci>L</m:ci>
	  </m:apply>
	  <m:apply>
	    <m:divide/>
	    <m:pi/>
	    <m:ci>L</m:ci>
	  </m:apply>
	</m:interval>
      </m:math>, 
      while the undesired portion is the remainder of 
      <m:math>
	<m:interval closure="closed-open">
	  <m:apply>
	    <m:minus/>
	    <m:pi/>
	  </m:apply>
	  <m:pi/>
	</m:interval>
      </m:math>.
      Noting from <cnxn target="fig1" strength="1"/> that 
      <m:math>
	<m:apply>
	  <m:ci type="fn">V</m:ci>
	  <m:apply>
	    <m:exp/>
	    <m:apply>
	      <m:times/>
	      <m:imaginaryi/>
	      <m:ci>ω</m:ci>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math> has zero energy in the regions
      <equation id="eq1">
	<m:math display="block">
	  <m:mrow>
	    <m:interval closure="closed-open">
	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:plus/>
		  <m:apply>
		    <m:times/>
		    <m:cn>2</m:cn>
		    <m:ci>k</m:ci>
		    <m:pi/>
		  </m:apply>
		  <m:ci>
		    <m:msub>
		      <m:mi>ω</m:mi>
		      <m:mn>0</m:mn>
		    </m:msub>
		  </m:ci>
		</m:apply>
		<m:ci>L</m:ci>
	      </m:apply>
	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:minus/>
		  <m:apply>
		    <m:times/>
		    <m:cn>2</m:cn>
		    <m:apply>
		      <m:plus/>
		      <m:ci>k</m:ci>
		      <m:cn>1</m:cn>
		    </m:apply>
		    <m:pi/>
		  </m:apply>
		  <m:ci>
		    <m:msub>
		      <m:mi>ω</m:mi>
		      <m:mn>0</m:mn>
		    </m:msub>
		  </m:ci>
		</m:apply>
		<m:ci>L</m:ci>
	      </m:apply>
	    </m:interval>
	    <m:mo>,</m:mo>
	    <m:apply>
	      <m:in/>
	      <m:ci>k</m:ci>
	      <m:integers/>
	    </m:apply>
	  </m:mrow>
	</m:math>
      </equation>

      the anti-imaging filter can be designed with transition bands in
      these regions (rather than passbands or stopbands).  For a given
      number of taps, the additional degrees of freedom offered by
      these transition bands allows for better responses in the
      passbands and stopbands. The resulting filter design
      specifications are shown in the <cnxn target="fig1" strength="1">bottom subplot below</cnxn>.
    </para>

    <figure id="fig1">
      <media type="image/png" src="m10870fig1.png"/>
    </figure>

    <para id="para2">

      Next we treat filter design for decimation. Say that the
      <emphasis>desired</emphasis> spectral component of the input
      signal is bandlimited to
      <m:math>
	<m:apply>
	  <m:lt/>
	  <m:apply>
	    <m:divide/>
	    <m:ci><m:msub>
		<m:mi>ω</m:mi>
		<m:mn>0</m:mn>
	      </m:msub></m:ci>
	    <m:ci>M</m:ci>
	  </m:apply>
	  <m:apply>
	    <m:divide/>
	    <m:pi/>
	    <m:ci>M</m:ci>
	  </m:apply>
	</m:apply>
      </m:math>
      and we have decided to downsample by <m:math><m:ci>M</m:ci></m:math>.
      The goal is to minimally distort the input spectrum over 
      <m:math>
	<m:interval closure="closed-open">
	  <m:apply>
	    <m:divide/>
	    <m:apply>
	      <m:minus/>
	      <m:ci><m:msub>
		  <m:mi>ω</m:mi>
		  <m:mn>0</m:mn>
		</m:msub></m:ci>
	    </m:apply>
	    <m:ci>M</m:ci>
	  </m:apply>
	  <m:apply>
	    <m:divide/>
	    <m:ci><m:msub>
		<m:mi>ω</m:mi>
		<m:mn>0</m:mn>
	      </m:msub></m:ci>
	    <m:ci>M</m:ci>
	  </m:apply>
	</m:interval>
      </m:math>, <foreign>i.e.</foreign>, the post-decimation
      spectrum over 
      <m:math>
	<m:interval closure="closed-open">
	  <m:apply>
	    <m:minus/>
	    <m:ci><m:msub>
		<m:mi>ω</m:mi>
		<m:mn>0</m:mn>
	      </m:msub></m:ci>
	  </m:apply>
	  <m:ci><m:msub>
	      <m:mi>ω</m:mi>
	      <m:mn>0</m:mn>
	    </m:msub></m:ci>
	</m:interval>
      </m:math>. 
      Thus, we must not allow any aliased signals to enter
      <m:math>
	<m:interval closure="closed-open">
	  <m:apply>
	    <m:minus/>
	    <m:ci><m:msub>
		<m:mi>ω</m:mi>
		<m:mn>0</m:mn>
	      </m:msub></m:ci>
	  </m:apply>
	  <m:ci><m:msub>
	      <m:mi>ω</m:mi>
	      <m:mn>0</m:mn>
	    </m:msub></m:ci>
	</m:interval>
      </m:math>. 
      To allow for extra degrees of freedom in the filter design, 
      we <emphasis>do</emphasis> allow aliasing to enter the
      post-decimation spectrum outside of
      <m:math>
	<m:interval closure="closed-open">
	  <m:apply>
	    <m:minus/>
	    <m:ci><m:msub>
		<m:mi>ω</m:mi>
		<m:mn>0</m:mn>
	      </m:msub></m:ci>
	  </m:apply>
	  <m:ci><m:msub>
	      <m:mi>ω</m:mi>
	      <m:mn>0</m:mn>
	    </m:msub></m:ci>
	</m:interval>
      </m:math> within
      <m:math>
	<m:interval closure="closed-open">
	  <m:apply>
	    <m:minus/>
	    <m:pi/>
	  </m:apply>
	  <m:pi/>
	</m:interval>
      </m:math>. 
      Since the input spectral regions which alias outside of 
      <m:math>
	<m:interval closure="closed-open">
	  <m:apply>
	    <m:minus/>
	    <m:ci><m:msub>
		<m:mi>ω</m:mi>
		<m:mn>0</m:mn>
	      </m:msub></m:ci>
	  </m:apply>
	  <m:ci><m:msub>
	      <m:mi>ω</m:mi>
	      <m:mn>0</m:mn>
	    </m:msub></m:ci>
	</m:interval>
      </m:math> 
      are given by
      <equation id="eq2">
	<m:math display="block">
	  <m:interval closure="closed-open">
	    <m:apply>
	      <m:divide/>
	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:times/>
		  <m:cn>2</m:cn>
		  <m:ci>k</m:ci>
		  <m:pi/>
		</m:apply>
		<m:ci>
		  <m:msub>
		    <m:mi>ω</m:mi>
		    <m:mn>0</m:mn>
		  </m:msub>
		</m:ci>
	      </m:apply>
	      <m:ci>L</m:ci>
	    </m:apply>
	    <m:apply>
	      <m:divide/>
	      <m:apply>
		<m:minus/>
		<m:apply>
		  <m:times/>
		  <m:cn>2</m:cn>
		  <m:apply>
		    <m:plus/>
		    <m:ci>k</m:ci>
		    <m:cn>1</m:cn>
		  </m:apply>
		  <m:pi/>
		</m:apply>
		<m:ci>
		  <m:msub>
		    <m:mi>ω</m:mi>
		    <m:mn>0</m:mn>
		  </m:msub>
		</m:ci>
	      </m:apply>
	      <m:ci>L</m:ci>
	    </m:apply>
	  </m:interval>
	  <m:mo>,</m:mo>
	  <m:apply>
	    <m:in/>
	    <m:ci>k</m:ci>
	    <m:integers/>
	  </m:apply>
	</m:math>
      </equation>
      (as shown in <cnxn target="fig2" strength="9"/>), we can
      treat these regions as transition bands in the filter design.
      The resulting filter design specifications are illustrated in
      the middle subplot (<cnxn target="fig2" strength="9"/>).
    </para>

    <figure id="fig2">
      <media type="image/png" src="m10870fig2.png"/>
    </figure>
    
  </content>
  
</document>
