<?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="new20">
  <name>IIR Filter Structures</name>
  <metadata>
  <md:version>1.1</md:version>
  <md:created>2003/07/14 13:42:25 GMT-5</md:created>
  <md:revised>2004/12/27 07:52:30.216 US/Central</md:revised>
  <md:authorlist>
      <md:author id="dljones">
      <md:firstname>Douglas</md:firstname>
      <md:othername>L.</md:othername>
      <md:surname>Jones</md:surname>
      <md:email>dl-jones@uiuc.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="dljones">
      <md:firstname>Douglas</md:firstname>
      <md:othername>L.</md:othername>
      <md:surname>Jones</md:surname>
      <md:email>dl-jones@uiuc.edu</md:email>
    </md:maintainer>
    <md:maintainer id="kclarks">
      <md:firstname>Kyle</md:firstname>
      
      <md:surname>Clarkson</md:surname>
      <md:email>kclarks@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>cascade form</md:keyword>
    <md:keyword>direct form</md:keyword>
    <md:keyword>IIR Filters</md:keyword>
    <md:keyword>parallel form</md:keyword>
    <md:keyword>structures</md:keyword>
    <md:keyword>transpose form</md:keyword>
  </md:keywordlist>

  <md:abstract>The Direct Forms I and II, the Transpose Form, Parallel Form, and Cascade Form are the most common basic structures for implementing IIR filters.</md:abstract>
</metadata>

  <content>
    <para id="delete_me">
      IIR (Infinite Impulse Response) filter structures must be recursive
      (use feedback); an infinite number of coefficients could not otherwise
       be realized with a finite number of computations per sample.
      <m:math display="block">
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:ci type="fn">H</m:ci>
	    <m:ci>z</m:ci>
	  </m:apply>
	  <m:apply>
	    <m:divide/>
	    <m:apply>
	      <m:ci type="fn">N</m:ci>
	      <m:ci>z</m:ci>
	    </m:apply>
	    <m:apply>
	      <m:ci type="fn">D</m:ci>
	      <m:ci>z</m:ci>
	    </m:apply>
	  </m:apply>
	  <m:apply>
	    <m:divide/>
	    <m:apply>
	      <m:plus/>
	      <m:ci>
		<m:msub>
		  <m:mi>b</m:mi>
		  <m:mn>0</m:mn>
		</m:msub>
	      </m:ci>
	      <m:apply>
		<m:times/>
		<m:ci>
		  <m:msub>
		    <m:mi>b</m:mi>
		    <m:mn>1</m:mn>
		  </m:msub>
		</m:ci>
		<m:apply>
		  <m:inverse/>
		  <m:ci>z</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:ci>
		  <m:msub>
		    <m:mi>b</m:mi>
		    <m:mn>2</m:mn>
		  </m:msub>
		</m:ci>
		<m:apply>
		  <m:power/>
		  <m:ci>z</m:ci>
		  <m:cn>-2</m:cn>
		</m:apply>
	      </m:apply>
	      <m:ci>…</m:ci>
	      <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:power/>
		  <m:ci>z</m:ci>
		  <m:apply>
		    <m:minus/>
		    <m:ci>M</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:plus/>
	      <m:cn>1</m:cn>
	      <m:apply>
		<m:times/>
		<m:ci>
		  <m:msub>
		    <m:mi>a</m:mi>
		    <m:mn>1</m:mn>
		  </m:msub>
		</m:ci>
		<m:apply>
		  <m:inverse/>
		  <m:ci>z</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:ci>
		  <m:msub>
		    <m:mi>a</m:mi>
		    <m:mn>2</m:mn>
		  </m:msub>
		</m:ci>
		<m:apply>
		  <m:power/>
		  <m:ci>z</m:ci>
		  <m:cn>-2</m:cn>
		</m:apply>
	      </m:apply>
	      <m:ci>…</m:ci>
	      <m:apply>
		<m:times/>
		<m:ci>
		  <m:msub>
		    <m:mi>a</m:mi>
		    <m:mi>N</m:mi>
		  </m:msub>
		</m:ci>
		<m:apply>
		  <m:power/>
		  <m:ci>z</m:ci>
		  <m:apply>
		    <m:minus/>
		    <m:ci>N</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>
       The corresponding time-domain difference equation is
      <m:math display="block">
	<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:minus/>
	      <m:apply>
		<m:minus/>
		<m:apply>
		    <m:times/>
		    <m:ci>
		      <m:msub>
			<m:mi>a</m:mi>
			<m:mn>1</m:mn>
		      </m:msub>
		    </m:ci>
		    <m:apply>
		      <m:ci type="fn">y</m:ci>
		      <m:apply>
			<m:minus/>
			<m:ci>n</m:ci>
			<m:cn>1</m:cn>
		      </m:apply>
		    </m:apply>
		  </m:apply>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:ci>
		  <m:msub>
		    <m:mi>a</m:mi>
		    <m:mn>2</m:mn>
		  </m:msub>
		</m:ci>
		<m:apply>
		  <m:ci type="fn">y</m:ci>
		  <m:apply>
		    <m:minus/>
		    <m:ci>n</m:ci>
		    <m:cn>2</m:cn>
		  </m:apply>
		</m:apply>
	      </m:apply>
            </m:apply>
	    <m:apply>
	      <m:minus/>
	      <m:ci>…</m:ci>
	      <m:apply>
		<m:times/>
		<m:ci>
		  <m:msub>
		    <m:mi>a</m:mi>
		    <m:mi>N</m:mi>
		  </m:msub>
		</m:ci>
		<m:apply>
		  <m:ci type="fn">y</m:ci>
		  <m:apply>
		    <m:minus/>
		    <m:ci>n</m:ci>
		    <m:ci>N</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <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:cn>0</m:cn>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:times/>
	      <m:ci>
		<m:msub>
		  <m:mi>b</m:mi>
		  <m:mn>1</m:mn>
		</m:msub>
	      </m:ci>
	      <m:apply>
		<m:ci type="fn">x</m:ci>
		<m:apply>
		  <m:minus/>
		  <m:ci>n</m:ci>
		  <m:cn>1</m:cn>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:ci>…</m:ci>
	    <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>
    </para>   
    <section id="section1">
      <name>Direct-form I IIR Filter Structure</name>
      
      <para id="para1.5">
        The difference equation above is implemented directly as written by the
        Direct-Form I IIR Filter Structure.
      </para>
      <figure id="figure1">
	<media type="image/png" src="fig1IIRFilterStruct.png"/>
      </figure>
     
      <para id="para2">
	Note that this is a cascade of two systems, 
	<m:math>
	  <m:apply>
	    <m:ci type="fn">N</m:ci>
	    <m:ci>z</m:ci>
	  </m:apply>
	</m:math> and 
	<m:math>
	  <m:apply>
	    <m:divide/>
	    <m:cn>1</m:cn>
	    <m:apply>
	      <m:ci type="fn">D</m:ci>
	      <m:ci>z</m:ci>
	    </m:apply>
	  </m:apply>
	</m:math>. If we reverse the order of the filters, the overall
	system is unchanged: The memory elements appear in the middle
	and store identical values, so they can be combined, to form
	the Direct-Form II IIR Filter Structure.
      </para>
    </section>
    <section id="section3">
      <name>Direct-Form II IIR Filter Structure</name>
      
      <figure id="figure2">
	<media type="image/png" src="fig2IIRFilterStruct.png"/>
      </figure>
     
      <para id="para4">
	This structure is <term>canonic</term>: (i.e., it requires
	the minimum number of memory elements).
      </para>
      <para id="para5">
	Flowgraph reversal gives the
      </para>
    </section>
    <section id="section4">
      <name>Transpose-Form IIR Filter Structure</name>
      
      <figure id="figure3">
	<media type="image/png" src="fig3IIRFilterStruct.png"/>
      </figure>
      
      <para id="para6">
	Usually we design IIR filters with 
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:ci>N</m:ci>
	    <m:ci>M</m:ci>
	  </m:apply>
	</m:math>, but not always.
      </para>
      <para id="para7">
	Obviously, since all these structures have identical
	frequency response, filter structures are not unique. We
	consider many different structures because
	<list id="list1" type="enumerated">
	  <item>Depending on the technology or application, one
	    might be more convenient than another</item> 
	  
	  <item>The response in a practical realization, in which the
	    data and coefficients must be <term>quantized</term>,
	    may differ substantially, and some
	    structures behave much better than others with quantization.
	  </item>
	</list>
        The Cascade-Form IIR filter structure is one of the least sensitive
        to quantization, which is why it is the most commonly used IIR filter
        structure.
      </para>
    </section>
    <section id="section6">
      <name>IIR Cascade Form</name>
      <para id="para8">
	The numerator and denominator polynomials can be factored 
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci type="fn">H</m:ci>
	      <m:ci>z</m:ci>
	    </m:apply>
	    <m:apply>
		<m:divide/>
		<m:apply>
		  <m:plus/>
		  <m:ci>
		    <m:msub>
		      <m:mi>b</m:mi>
		      <m:mn>0</m:mn>
		    </m:msub>
		  </m:ci>
		  <m:apply>
		    <m:times/>
		    <m:ci>
		      <m:msub>
			<m:mi>b</m:mi>
			<m:mn>1</m:mn>
		      </m:msub>
		    </m:ci>
		    <m:apply>
		      <m:inverse/>
		      <m:ci>z</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>M</m:mi>
		      </m:msub>
		    </m:ci>
		    <m:apply>
		      <m:power/>
		      <m:ci>z</m:ci>
		      <m:apply>
			<m:minus/>
			<m:ci>m</m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:plus/>
		  <m:cn>1</m:cn>
		  <m:apply>
		    <m:times/>
		    <m:ci>
		      <m:msub>
			<m:mi>a</m:mi>
			<m:mn>1</m:mn>
		      </m:msub>
		    </m:ci>
		    <m:apply>
		      <m:inverse/>
		      <m:ci>z</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:ci>…</m:ci>
		  <m:apply>
		    <m:times/>
		    <m:ci>
		      <m:msub>
			<m:mi>a</m:mi>
			<m:mi>N</m:mi>
		      </m:msub>
		    </m:ci>
		    <m:apply>
		      <m:power/>
		      <m:ci>z</m:ci>
		      <m:apply>
			<m:minus/>
			<m:ci>N</m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    <m:apply>
		<m:divide/>
		<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:product/>
		    <m:bvar>
		      <m:ci>k</m:ci>
		    </m:bvar>
		    <m:lowlimit>
		      <m:cn>1</m:cn>
		    </m:lowlimit>
		    <m:uplimit>
		      <m:ci>M</m:ci>
		    </m:uplimit>
		    <m:apply>
		      <m:minus/>
		      <m:ci>z</m:ci>
		      <m:ci>
			<m:msub>
			  <m:mi>z</m:mi>
			  <m:mi>k</m:mi>
			</m:msub>
		      </m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:power/>
		    <m:ci>z</m:ci>
		    <m:apply>
		      <m:minus/>
		      <m:ci>M</m:ci>
		      <m:ci>N</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:product/>
		    <m:bvar>
		      <m:ci>i</m:ci>
		    </m:bvar>
		    <m:lowlimit>
		      <m:cn>1</m:cn>
		    </m:lowlimit>
		    <m:uplimit>
		      <m:ci>N</m:ci>
		    </m:uplimit>
		    <m:apply>
		      <m:minus/>
		      <m:ci>z</m:ci>
		      <m:ci>
			<m:msub>
			  <m:mi>p</m:mi>
			  <m:mi>k</m:mi>
			</m:msub>
		      </m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	  </m:apply>
	</m:math>
	and implemented as a cascade of short IIR filters.
	
	<figure id="figure4">
	  <media type="image/png" src="fig4IIRFilterStruct.png"/>
	</figure>
	Since the filter coefficients are usually real yet the roots are
        mostly complex, we
	actually implement these as second-order sections, where
	comple-conjugate pole and zero pairs are combined into
	second-order sections with real coefficients.
        The second-order sections are usually implemented with either
        the Direct-Form II or Transpose-Form structure.
      </para>
    </section>
    <section id="section20">
      <name>Parallel form</name>
      <para id="para20">
	A rational transfer function can also be written as
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:divide/>
	      <m:apply>
		<m:plus/>
		<m:ci>
		  <m:msub>
		    <m:mi>b</m:mi>
		    <m:mn>0</m:mn>
		  </m:msub>
		</m:ci>
		<m:apply>
		  <m:times/>
		  <m:ci>
		    <m:msub>
		      <m:mi>b</m:mi>
		      <m:mn>1</m:mn>
		    </m:msub>
		  </m:ci>
		  <m:apply>
		    <m:inverse/>
		    <m:ci>z</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>M</m:mi>
		    </m:msub>
		  </m:ci>
		  <m:apply>
		    <m:power/>
		    <m:ci>z</m:ci>
		    <m:apply>
		      <m:minus/>
		      <m:ci>m</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>		       
	      </m:apply>
	      <m:apply>
		<m:plus/>
		<m:cn>1</m:cn>
		<m:apply>
		  <m:times/>
		  <m:ci>
		    <m:msub>
		      <m:mi>a</m:mi>
		      <m:mn>1</m:mn>
		    </m:msub>
		  </m:ci>
		  <m:apply>
		    <m:inverse/>
		    <m:ci>z</m:ci>
		  </m:apply>
		</m:apply>
		<m:ci>…</m:ci>
		<m:apply>
		  <m:times/>
		  <m:ci>
		    <m:msub>
		      <m:mi>a</m:mi>
		      <m:mi>N</m:mi>
		    </m:msub>
		  </m:ci>
		  <m:apply>
		    <m:power/>
		    <m:ci>z</m:ci>
		    <m:apply>
		      <m:minus/>
		      <m:ci>N</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:plus/>
	      <m:apply>
		<m:diff/>
		<m:ci>
		  <m:msub>
		    <m:mi>c</m:mi>
		    <m:mn>0</m:mn>
		  </m:msub>
		</m:ci>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:diff/>
		  <m:ci>
		    <m:msub>
		      <m:mi>c</m:mi>
		      <m:mn>1</m:mn>
		    </m:msub>
		  </m:ci>
		</m:apply>
		<m:apply>
		  <m:inverse/>
		  <m:ci>z</m:ci>
		</m:apply>
	      </m:apply>
	      <m:ci>…</m:ci>
	      <m:apply>
		<m:divide/>
		<m:ci>
		  <m:msub>
		    <m:mi>A</m:mi>
		    <m:mn>1</m:mn>
		  </m:msub>
		</m:ci>
		<m:apply>
		  <m:minus/>
		  <m:ci>z</m:ci>
		  <m:ci>
		    <m:msub>
		      <m:mi>p</m:mi>
		      <m:mn>1</m:mn>
		    </m:msub>
		  </m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:divide/>
		<m:ci>
		  <m:msub>
		    <m:mi>A</m:mi>
		    <m:mn>2</m:mn>
		  </m:msub>
		</m:ci>
		<m:apply>
		  <m:minus/>
		  <m:ci>z</m:ci>
		  <m:ci>
		    <m:msub>
		      <m:mi>p</m:mi>
		      <m:mn>2</m:mn>
		    </m:msub>
		  </m:ci>
		</m:apply>
	      </m:apply>
	      <m:ci>…</m:ci>
	      <m:apply>
		<m:divide/>
		<m:ci>
		  <m:msub>
		    <m:mi>A</m:mi>
		    <m:mi>N</m:mi>
		  </m:msub>
		</m:ci>
		<m:apply>
		  <m:minus/>
		  <m:ci>z</m:ci>
		  <m:ci>
		    <m:msub>
		      <m:mi>p</m:mi>
		      <m:mi>N</m:mi>
		    </m:msub>
		  </m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math> which by linearity can be implemented as
	<figure id="figure5">
	  <media type="image/png" src="fig5IIRFilterStruct.png"/>
	</figure>
	
	As before, we combine complex-conjugate pole pairs into
	second-order sections with real coefficients.
      </para>
      <para id="para30">
	The cascade and parallel forms are of interest because they
	are much less sensitive to coefficient quantization than
	higher-order structures, as analyzed in later modules in this course.
      </para>
    </section>
    <section id="sect30">
      <name>Other forms</name> 
      <para id="para31">
	There are many other structures for IIR filters,
        such as wave digital filter
	structures, lattice-ladder, all-pass-based forms, and so forth.
        These are the result of extensive research to find structures
	which are computationally efficient <emphasis>and</emphasis>
	insensitive to quantization error. They all represent various
	tradeoffs; the best choice in a given context is not yet fully
	understood, and may never be.
      </para>
    </section>


  </content>
  
</document>
