<?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:m="http://www.w3.org/1998/Math/MathML" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="resamp">

  <name>Polyphase Resampling</name>

  <metadata>
  <md:version>2.8</md:version>
  <md:created>2002/01/09</md:created>
  <md:revised>2003/01/15</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>CD</md:keyword>
    <md:keyword>compact disc</md:keyword>
    <md:keyword>DAT</md:keyword>
    <md:keyword>digital audio tape</md:keyword>
    <md:keyword>polyphase</md:keyword>
    <md:keyword>resampling</md:keyword>
    <md:keyword>sample-rate conversion</md:keyword>
  </md:keywordlist>

  <md:abstract>Introduction to the concept of Polyphase Resampling.</md:abstract>
</metadata>



  <content>

    <section id="sec1">
      <name>Polyphase Resampling with a Rational Factor</name>

      <para id="para1.1">
Recall that resampling by rational rate <m:math><m:apply><m:divide/>
<m:ci>L</m:ci><m:ci>M</m:ci></m:apply></m:math> can be accomplished 
through the following three-stage process(see <cnxn target="fig1" strength="9"/>).
      </para>

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

      <para id="para1.2">
If we implemented the upsampler/LPF pair with a polyphase filterbank, we 
would still waste computations due to eventual downsampling by <m:math><m:ci>
M</m:ci></m:math>. Alternatively, if we implemented the LPF/downsampler pair 
with a polyphase filterbank, we would waste computations by feeding it the 
(mostly-zeros) upsampler output. Thus, we need to examine this problem in 
more detail.
      </para>

      <para id="para1.3">
Assume for the moment that we implemented the upsampler/LPF pair with a 
polyphase filterbank, giving the architecture in <cnxn target="fig2" strength="9"/>.
      </para>

      <figure id="fig2">
	<media type="image/png" src="m10443fig2.png"/>
      </figure>

      <para id="para1.4">
Keeping the "parallel-to-serial" interpretation of the upsampler/delay 
ladder in mind, the input sequence to the decimator <m:math><m:apply>
<m:ci type="fn" class="discrete">q</m:ci><m:ci>l</m:ci></m:apply></m:math> 
has the form as in <cnxn target="fig2.5" strength="9"/>

</para>

      <figure id="fig2.5">
	<media type="image/png" src="m10443fig2andahalf.png"/>
      </figure>

<para id="para1.45">

leading to the observation that


<m:math display="block">
  <m:apply>
  <m:eq/>
    <m:apply>
      <m:ci type="fn" class="discrete">q</m:ci>
      <m:ci>l</m:ci>
    </m:apply>
    <m:apply>
        <m:ci type="fn" class="discrete">
        <m:msub>
          <m:mi>v</m:mi>
<m:mrow>
    <m:msub>
      <m:mfenced open="〈" close="〉">
      <m:mi>l</m:mi>
      </m:mfenced>
      <m:mi>L</m:mi>
    </m:msub>
  </m:mrow>
        </m:msub> 
       </m:ci>
      <m:apply>
      <m:floor/>
        <m:apply>
        <m:divide/>
          <m:ci>l</m:ci>
          <m:ci>L</m:ci>
        </m:apply>
      </m:apply>
    </m:apply>
  </m:apply>
</m:math>

<equation id="equ1">
<m:math>
  <m:apply>
  <m:eq/>
    <m:apply>
      <m:ci type="fn" class="discrete">y</m:ci>
      <m:ci>m</m:ci>
    </m:apply>

    <m:apply>
      <m:ci type="fn" class="discrete">q</m:ci>
      <m:apply>
      <m:times/>
        <m:ci>m</m:ci>
        <m:ci>M</m:ci>
      </m:apply>
    </m:apply>

    <m:apply>
        <m:ci type="fn" class="discrete">
        <m:msub>
          <m:mi>v</m:mi>
  <m:mrow>
    <m:msub>
      <m:mfenced open="〈" close="〉">
        <m:apply>
        <m:times/>
          <m:mi>m</m:mi>
          <m:mi>M</m:mi>
        </m:apply>
      </m:mfenced>
      <m:mi>L</m:mi>
    </m:msub>
  </m:mrow>
        </m:msub> 
       </m:ci>
      <m:apply>
      <m:floor/>
        <m:apply>
        <m:divide/>
          <m:apply>
          <m:times/>
            <m:ci>m</m:ci>
            <m:ci>M</m:ci>
          </m:apply>
          <m:ci>L</m:ci>
        </m:apply>
      </m:apply>
    </m:apply>

   <m:apply>
   <m:sum/>
    <m:bvar><m:ci>k</m:ci></m:bvar>
    <m:condition><m:ci>k</m:ci></m:condition>
    <m:apply>
    <m:times/>
        <m:apply>
        <m:ci type="fn" class="discrete">
        <m:msub>
          <m:mi>h</m:mi>
  <m:mrow>
    <m:msub>
      <m:mfenced open="〈" close="〉">
        <m:apply>
        <m:times/>
          <m:mi>m</m:mi>
          <m:mi>M</m:mi>
        </m:apply>
      </m:mfenced>
      <m:mi>L</m:mi>
    </m:msub>
  </m:mrow>
        </m:msub> 
       </m:ci>
       <m:ci>k</m:ci>
      </m:apply>
      <m:apply>
      <m:ci type="fn" class="discrete">x</m:ci>
        <m:apply>
        <m:minus/>
          <m:apply>
          <m:floor/>
            <m:apply>
            <m:divide/>
              <m:apply>
              <m:times/>
                <m:ci>m</m:ci>
                <m:ci>M</m:ci>
              </m:apply>
              <m:ci>L</m:ci>
            </m:apply>
          </m:apply>
          <m:ci>k</m:ci>
        </m:apply>
      </m:apply>
    </m:apply>
  </m:apply>
  </m:apply>
</m:math>
</equation>

      </para>

<para id="para1.5">
Thus, to calculate the resampled output at output index <m:math><m:ci>m</m:ci></m:math>, 
we should calculate only the output of branch number
<m:math>
<m:apply>
<m:rem/>
<m:apply>
<m:times/>
<m:ci>m</m:ci>
<m:ci>M</m:ci>
</m:apply>
<m:ci>L</m:ci>
</m:apply>
</m:math>
<!--<m:math>
  <m:ci>
    <m:msub>
      <m:mfenced open='&lang;' close='&rang;'>
        <m:apply>
        <m:times/>
          <m:mi>m</m:mi>
          <m:mi>M</m:mi>
        </m:apply>
      </m:mfenced>
      <m:mi>L</m:mi>
    </m:msub>
  </m:ci>
</m:math>-->

at input index <m:math><m:apply><m:floor/><m:apply><m:divide/><m:apply><m:times/><m:ci>m</m:ci>
<m:ci>M</m:ci></m:apply><m:ci>L</m:ci></m:apply></m:apply></m:math>. No other branch outputs are 
calculated, so that no computations are wasted. The resulting structure is depicted in <cnxn target="fig1.5" strength="9"/>.
</para>

      <figure id="fig1.5">
	<media type="image/png" src="m10443fig3.png"/>
	<caption>
	</caption>
      </figure>

<para id="para1.6">

An equally-efficient structure could be obtained if we implemented the LPF/downsampler 
using the <m:math><m:ci>M</m:ci></m:math>-branch polyphase decimator which was fed with 
the proper sequence of input samples. However, this structure is not as elegant: 
rather than computing the output of <emphasis>one</emphasis> particular polyphase 
branch per output sample, we would need to add <emphasis>all</emphasis> branch outputs, 
but where each branch output was calculated using a particular <emphasis>subset</emphasis> 
of polyphase taps.

</para>


    </section>


   



  </content>
</document>
