<?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:bib="http://bibtexml.sf.net/" xmlns:md="http://cnx.rice.edu/mdml/0.4" id="id2255528">
  <name>"Notes on the Design of Optimal FIR Filters" Appendix C</name>
  <metadata>
  <md:version>1.2</md:version>
  <md:created>2008/05/20 16:24:38 GMT-5</md:created>
  <md:revised>2008/10/15 11:04:02.971 GMT-5</md:revised>
  <md:authorlist>
      <md:author id="jrt">
      <md:firstname>John</md:firstname>
      <md:othername>R</md:othername>
      <md:surname>Treichler</md:surname>
      <md:email>jrt@appsig.com</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="jrt">
      <md:firstname>John</md:firstname>
      <md:othername>R</md:othername>
      <md:surname>Treichler</md:surname>
      <md:email>jrt@appsig.com</md:email>
    </md:maintainer>
    <md:maintainer id="dcwill">
      <md:firstname>Daniel</md:firstname>
      <md:othername>Collins</md:othername>
      <md:surname>Williamson</md:surname>
      <md:email>dcwill@cnx.org</md:email>
    </md:maintainer>
    <md:maintainer id="richb">
      <md:firstname>Richard</md:firstname>
      <md:othername>G.</md:othername>
      <md:surname>Baraniuk</md:surname>
      <md:email>richb@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="cburrus">
      <md:firstname>C.</md:firstname>
      <md:othername>Sidney</md:othername>
      <md:surname>Burrus</md:surname>
      <md:email>csb@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="rswagner">
      <md:firstname>Raymond</md:firstname>
      
      <md:surname>Wagner</md:surname>
      <md:email>rwagner@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  

  <md:abstract/>
</metadata>
  <content>
    <section id="uid1">
      <name>Using a Chebyshev Polynomial to Estimate <!--Math is not currently allowed in CNXML section title.--></name>
      <para id="id2255561">We desire that the oscillatory portion of the polynomial shown in

<cnxn document="m17234" target="uid7">Figure 1 in the module titled "Filter Sizing"</cnxn>

correspond to the
stopband region of the filter response and the <m:math overflow="scroll"><m:msup><m:mi>x</m:mi><m:mi>M</m:mi></m:msup></m:math> portion to correspond
to the transition from the stopband to the passband. This is achieved by
employing a change of variables from frequency <m:math overflow="scroll"><m:mi>f</m:mi></m:math> to the polynomial
argument <m:math overflow="scroll"><m:mi>x</m:mi></m:math>:</para>
      <equation id="uid2">
        <m:math mode="display" overflow="scroll">
          <m:mrow>
            <m:mi>x</m:mi>
            <m:mo>=</m:mo>
            <m:mrow>
              <m:mo>(</m:mo>
              <m:mfrac>
                <m:mrow>
                  <m:msub>
                    <m:mi>x</m:mi>
                    <m:mn>0</m:mn>
                  </m:msub>
                  <m:mo>+</m:mo>
                  <m:mn>1</m:mn>
                </m:mrow>
                <m:mn>2</m:mn>
              </m:mfrac>
              <m:mo>)</m:mo>
            </m:mrow>
            <m:mi>c</m:mi>
            <m:mi>o</m:mi>
            <m:mi>s</m:mi>
            <m:mrow>
              <m:mo>(</m:mo>
              <m:mfrac>
                <m:mrow>
                  <m:mn>2</m:mn>
                  <m:mi>π</m:mi>
                  <m:mi>f</m:mi>
                </m:mrow>
                <m:msub>
                  <m:mi>f</m:mi>
                  <m:mi>s</m:mi>
                </m:msub>
              </m:mfrac>
              <m:mo>)</m:mo>
            </m:mrow>
            <m:mo>+</m:mo>
            <m:mrow>
              <m:mo>(</m:mo>
              <m:mfrac>
                <m:mrow>
                  <m:msub>
                    <m:mi>x</m:mi>
                    <m:mn>0</m:mn>
                  </m:msub>
                  <m:mo>-</m:mo>
                  <m:mn>1</m:mn>
                </m:mrow>
                <m:mn>2</m:mn>
              </m:mfrac>
              <m:mo>)</m:mo>
            </m:mrow>
            <m:mo>.</m:mo>
          </m:mrow>
        </m:math>
      </equation>
      <para id="id2255706">While many different types of variable changes could be employed, this one
matches the boundary conditions (an obvious requirement) but happens to
employ the cosine function, a member of the same family used to define the
Chebyshev polynomials.</para>
      <para id="id2255714">With this change of variables we see that the transition band <m:math overflow="scroll"><m:mrow><m:mi>Δ</m:mi><m:mi>f</m:mi></m:mrow></m:math> is
defined by the difference between <m:math overflow="scroll"><m:mrow><m:mi>x</m:mi><m:mo>=</m:mo><m:mn>1</m:mn></m:mrow></m:math> and <m:math overflow="scroll"><m:mrow><m:mi>x</m:mi><m:mo>=</m:mo><m:msub><m:mi>x</m:mi><m:mi>p</m:mi></m:msub></m:mrow></m:math>. Using the closed, but
nonintuitive form of the K-th order Chebyshev polynomial, valid for
<m:math overflow="scroll"><m:mrow><m:mo>|</m:mo><m:mi>x</m:mi><m:mo>|</m:mo><m:mo>&gt;</m:mo><m:mn>1</m:mn></m:mrow></m:math>, we have that</para>
      <equation id="uid3">
        <m:math mode="display" overflow="scroll">
          <m:mrow>
            <m:msub>
              <m:mi>P</m:mi>
              <m:mi>K</m:mi>
            </m:msub>
            <m:mrow>
              <m:mo>(</m:mo>
              <m:mi>x</m:mi>
              <m:mo>)</m:mo>
            </m:mrow>
            <m:mo>=</m:mo>
            <m:mi>c</m:mi>
            <m:mi>o</m:mi>
            <m:mi>s</m:mi>
            <m:mi>h</m:mi>
            <m:mrow>
              <m:mo>(</m:mo>
              <m:mi>K</m:mi>
              <m:mo>·</m:mo>
              <m:mi>c</m:mi>
              <m:mi>o</m:mi>
              <m:mi>s</m:mi>
              <m:msup>
                <m:mi>h</m:mi>
                <m:mrow>
                  <m:mo>-</m:mo>
                  <m:mn>1</m:mn>
                </m:mrow>
              </m:msup>
              <m:mrow>
                <m:mo>(</m:mo>
                <m:mi>x</m:mi>
                <m:mo>)</m:mo>
              </m:mrow>
              <m:mo>)</m:mo>
            </m:mrow>
          </m:mrow>
        </m:math>
      </equation>
      <para id="id2256096">To synthesize the desired impulse response using this windowing technique we
multiply the resulting window function by the sampled sinc function. In this
case, however, we desire that the cutoff frequency be as low as possible,
limiting at zero Hz. The associated sinc function equals unity for all
non-zero
coefficients of the impulse response. Since the final impulse response is
the point-by-point product of the window and the sampled sinc function, in
this case the window itself is the resulting impulse response. It suffices then
to examine the properties of the N-th order
Chebyshev polynomial to see how the N-point optimal filter will behave.</para>
      <para id="id2256121">To find the relationship between the required filter order <m:math overflow="scroll"><m:mi>N</m:mi></m:math> and the
attainable transition band <m:math overflow="scroll"><m:mrow><m:mi>Δ</m:mi><m:mi>f</m:mi></m:mrow></m:math>, we first determine the proper
value of <m:math overflow="scroll"><m:mi>K</m:mi></m:math> and
then evaluate <cnxn target="uid3"/> at the known combinations of
<m:math overflow="scroll"><m:mi>x</m:mi></m:math> and <m:math overflow="scroll"><m:mrow><m:msub><m:mi>P</m:mi><m:mi>K</m:mi></m:msub><m:mrow><m:mo>(</m:mo><m:mi>x</m:mi><m:mo>)</m:mo></m:mrow></m:mrow></m:math>. To select <m:math overflow="scroll"><m:mi>K</m:mi></m:math> we note that all but one of the ripples in
the polynomial's response are used in the stopband and these are split
evenly between the positive and negative frequencies. Thus a filter and
window of order <m:math overflow="scroll"><m:mi>N</m:mi></m:math> implies a Chebyshev polynomial of order</para>
      <equation id="id2256213">
        <m:math mode="display" overflow="scroll">
          <m:mrow>
            <m:mi>K</m:mi>
            <m:mo>=</m:mo>
            <m:mfrac>
              <m:mrow>
                <m:mi>N</m:mi>
                <m:mo>-</m:mo>
                <m:mn>1</m:mn>
              </m:mrow>
              <m:mn>2</m:mn>
            </m:mfrac>
          </m:mrow>
        </m:math>
      </equation>
      <para id="id2256239">With this resolved we observe from <cnxn document="m17234" target="uid7">Figure 1 in the module titled "Filter Sizing"</cnxn>

that</para>
      <equation id="id2256248">
        <m:math mode="display" overflow="scroll">
          <m:mrow>
            <m:msub>
              <m:mi>P</m:mi>
              <m:mfrac>
                <m:mrow>
                  <m:mi>N</m:mi>
                  <m:mo>-</m:mo>
                  <m:mn>1</m:mn>
                </m:mrow>
                <m:mn>2</m:mn>
              </m:mfrac>
            </m:msub>
            <m:mrow>
              <m:mo>(</m:mo>
              <m:mn>1</m:mn>
              <m:mo>)</m:mo>
            </m:mrow>
            <m:mo>=</m:mo>
            <m:mn>1</m:mn>
          </m:mrow>
        </m:math>
      </equation>
      <equation id="id2256286">
        <m:math mode="display" overflow="scroll">
          <m:mrow>
            <m:msub>
              <m:mi>P</m:mi>
              <m:mfrac>
                <m:mrow>
                  <m:mi>N</m:mi>
                  <m:mo>-</m:mo>
                  <m:mn>1</m:mn>
                </m:mrow>
                <m:mn>2</m:mn>
              </m:mfrac>
            </m:msub>
            <m:mrow>
              <m:mo>(</m:mo>
              <m:msub>
                <m:mi>x</m:mi>
                <m:mi>p</m:mi>
              </m:msub>
              <m:mo>)</m:mo>
            </m:mrow>
            <m:mo>=</m:mo>
            <m:mfrac>
              <m:mrow>
                <m:mn>1</m:mn>
                <m:mo>-</m:mo>
                <m:msub>
                  <m:mi>δ</m:mi>
                  <m:mn>1</m:mn>
                </m:msub>
              </m:mrow>
              <m:msub>
                <m:mi>δ</m:mi>
                <m:mn>2</m:mn>
              </m:msub>
            </m:mfrac>
          </m:mrow>
        </m:math>
      </equation>
      <equation id="id2256350">
        <m:math mode="display" overflow="scroll">
          <m:mrow>
            <m:msub>
              <m:mi>P</m:mi>
              <m:mfrac>
                <m:mrow>
                  <m:mi>N</m:mi>
                  <m:mo>-</m:mo>
                  <m:mn>1</m:mn>
                </m:mrow>
                <m:mn>2</m:mn>
              </m:mfrac>
            </m:msub>
            <m:mrow>
              <m:mo>(</m:mo>
              <m:msub>
                <m:mi>x</m:mi>
                <m:mn>0</m:mn>
              </m:msub>
              <m:mo>)</m:mo>
            </m:mrow>
            <m:mo>=</m:mo>
            <m:mfrac>
              <m:mrow>
                <m:mn>1</m:mn>
                <m:mo>+</m:mo>
                <m:msub>
                  <m:mi>δ</m:mi>
                  <m:mn>1</m:mn>
                </m:msub>
              </m:mrow>
              <m:msub>
                <m:mi>δ</m:mi>
                <m:mn>2</m:mn>
              </m:msub>
            </m:mfrac>
          </m:mrow>
        </m:math>
      </equation>
      <para id="id2256414">These equations are manipulated to yield an expression for <m:math overflow="scroll"><m:msub><m:mi>x</m:mi><m:mi>p</m:mi></m:msub></m:math>.
<cnxn target="uid2"/> is then used to obtain values for <m:math overflow="scroll"><m:msub><m:mi>f</m:mi><m:mrow><m:mi>s</m:mi><m:mi>t</m:mi></m:mrow></m:msub></m:math>,
corresponding to <m:math overflow="scroll"><m:mrow><m:mi>x</m:mi><m:mo>=</m:mo><m:mn>1</m:mn></m:mrow></m:math>, and <m:math overflow="scroll"><m:msub><m:mi>f</m:mi><m:mi>c</m:mi></m:msub></m:math>, corresponding to <m:math overflow="scroll"><m:mrow><m:mi>x</m:mi><m:mo>=</m:mo><m:msub><m:mi>x</m:mi><m:mi>p</m:mi></m:msub></m:mrow></m:math>. Their
difference, defined earlier to be the transition band <m:math overflow="scroll"><m:mrow><m:mi>Δ</m:mi><m:mi>f</m:mi></m:mrow></m:math>, is then
given by</para>
      <equation id="uid4">
        <m:math mode="display" overflow="scroll">
          <m:mrow>
            <m:mi>Δ</m:mi>
            <m:mi>f</m:mi>
            <m:mo>=</m:mo>
            <m:mfrac>
              <m:msub>
                <m:mi>f</m:mi>
                <m:mi>s</m:mi>
              </m:msub>
              <m:mrow>
                <m:mi>π</m:mi>
                <m:mo>(</m:mo>
                <m:mi>N</m:mi>
                <m:mo>-</m:mo>
                <m:mn>1</m:mn>
                <m:mo>)</m:mo>
              </m:mrow>
            </m:mfrac>
            <m:mrow>
              <m:mo>[</m:mo>
              <m:mi>c</m:mi>
              <m:mi>o</m:mi>
              <m:mi>s</m:mi>
              <m:msup>
                <m:mi>h</m:mi>
                <m:mrow>
                  <m:mo>-</m:mo>
                  <m:mn>1</m:mn>
                </m:mrow>
              </m:msup>
              <m:mrow>
                <m:mo>(</m:mo>
                <m:mfrac>
                  <m:mrow>
                    <m:mn>1</m:mn>
                    <m:mo>+</m:mo>
                    <m:msub>
                      <m:mi>δ</m:mi>
                      <m:mn>1</m:mn>
                    </m:msub>
                  </m:mrow>
                  <m:msub>
                    <m:mi>δ</m:mi>
                    <m:mn>2</m:mn>
                  </m:msub>
                </m:mfrac>
                <m:mo>)</m:mo>
              </m:mrow>
              <m:mo>-</m:mo>
              <m:msup>
                <m:mrow>
                  <m:mo>{</m:mo>
                  <m:msup>
                    <m:mrow>
                      <m:mo>(</m:mo>
                      <m:mi>c</m:mi>
                      <m:mi>o</m:mi>
                      <m:mi>s</m:mi>
                      <m:msup>
                        <m:mi>h</m:mi>
                        <m:mrow>
                          <m:mo>-</m:mo>
                          <m:mn>1</m:mn>
                        </m:mrow>
                      </m:msup>
                      <m:mrow>
                        <m:mo>(</m:mo>
                        <m:mfrac>
                          <m:mrow>
                            <m:mn>1</m:mn>
                            <m:mo>+</m:mo>
                            <m:msub>
                              <m:mi>δ</m:mi>
                              <m:mn>1</m:mn>
                            </m:msub>
                          </m:mrow>
                          <m:msub>
                            <m:mi>δ</m:mi>
                            <m:mn>2</m:mn>
                          </m:msub>
                        </m:mfrac>
                        <m:mo>)</m:mo>
                      </m:mrow>
                      <m:mo>)</m:mo>
                    </m:mrow>
                    <m:mn>2</m:mn>
                  </m:msup>
                  <m:mo>-</m:mo>
                  <m:msup>
                    <m:mrow>
                      <m:mo>(</m:mo>
                      <m:mi>c</m:mi>
                      <m:mi>o</m:mi>
                      <m:mi>s</m:mi>
                      <m:msup>
                        <m:mi>h</m:mi>
                        <m:mrow>
                          <m:mo>-</m:mo>
                          <m:mn>1</m:mn>
                        </m:mrow>
                      </m:msup>
                      <m:mrow>
                        <m:mo>(</m:mo>
                        <m:mfrac>
                          <m:mrow>
                            <m:mn>1</m:mn>
                            <m:mo>-</m:mo>
                            <m:msub>
                              <m:mi>δ</m:mi>
                              <m:mn>1</m:mn>
                            </m:msub>
                          </m:mrow>
                          <m:msub>
                            <m:mi>δ</m:mi>
                            <m:mn>2</m:mn>
                          </m:msub>
                        </m:mfrac>
                        <m:mo>)</m:mo>
                      </m:mrow>
                      <m:mo>)</m:mo>
                    </m:mrow>
                    <m:mn>2</m:mn>
                  </m:msup>
                  <m:mo>}</m:mo>
                </m:mrow>
                <m:mfrac>
                  <m:mn>1</m:mn>
                  <m:mn>2</m:mn>
                </m:mfrac>
              </m:msup>
              <m:mo>]</m:mo>
            </m:mrow>
            <m:mo>.</m:mo>
          </m:mrow>
        </m:math>
      </equation>
      <para id="id2256743">Under suitable conditions this equation can be simplified considerably. For
example, in the limits of small <m:math overflow="scroll"><m:msub><m:mi>δ</m:mi><m:mn>1</m:mn></m:msub></m:math> and large <m:math overflow="scroll"><m:mi>N</m:mi></m:math>, <cnxn target="uid4"/> reduces to <cnxn document="m17234" target="uid8">
Equation 4 in the module titled "Filter Sizing"</cnxn>.</para>
    </section>
  </content>
</document>
