<?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="m10251"> 
  
  <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/">Discrete-Time Systems in the Time-Domain</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.22</md:version>
  <md:created xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2001/08/08</md:created>
  <md:revised xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2007/05/31 10:13:54.096 GMT-5</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="dhj">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Don</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Johnson</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">dhj@rice.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="dhj">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Don</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Johnson</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">dhj@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="seejaie">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">CJ</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Ganier</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">seejaie@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="jac3">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">John</md:firstname>
      <md:othername xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Austin</md:othername>
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Cottrell</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">jac3@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="mhutch">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Matthew</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Hutchinson</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">mhutch@rice.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/">difference equation</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">digital signal processing</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">discrete-time systems</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">DSP</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">shift-invariant systems</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">superposition</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">time domain</md:keyword>
  </md:keywordlist>

  <md:abstract xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Discrete-time systems allow for mathematically specified processes like the difference equation.</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/">
    
    <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="p1">
      A discrete-time signal 
      <m:math>
	<m:apply>
	  <m:ci type="fn">s</m:ci><m:ci>n</m:ci>
	</m:apply>
      </m:math>
      
      is <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/">delayed</emphasis> by 
      <m:math>
	<m:ci><m:msub><m:mi>n</m:mi><m:mn>0</m:mn></m:msub></m:ci>
      </m:math>
      
      samples when we write 
      <m:math>
	<m:apply>
	  <m:ci type="fn">s</m:ci>
	  <m:apply>
	    <m:minus/>
	    <m:ci>n</m:ci>
	    <m:ci><m:msub><m:mi>n</m:mi><m:mn>0</m:mn></m:msub></m:ci>
	  </m:apply>
	</m:apply>
      </m:math>, with
      
      <m:math>
	<m:apply>
	  <m:gt/>
	  <m:ci><m:msub><m:mi>n</m:mi><m:mn>0</m:mn></m:msub></m:ci>
	  <m:cn>0</m:cn>
	</m:apply>
      </m:math>.  Choosing

      <m:math>
	<m:ci><m:msub><m:mi>n</m:mi><m:mn>0</m:mn></m:msub></m:ci>
      </m:math>

      to be negative advances the signal along the integers. As
      opposed to <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" document="m0006" target="delay">analog
      delays</cnxn>, discrete-time delays can
      <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/">only</emphasis> be integer valued. In the frequency
      domain, delaying a signal corresponds to a linear phase shift of
      the signal's discrete-time Fourier transform:

      <m:math>
	<m:apply>
	  <m:ci><m:mo>↔</m:mo></m:ci>
	  <m:apply>
	    <m:ci type="fn">s</m:ci>
	    <m:apply>
	      <m:minus/>
	      <m:ci>n</m:ci>
	      <m:ci><m:msub><m:mi>n</m:mi><m:mn>0</m:mn></m:msub></m:ci>
	    </m:apply> 
	  </m:apply>
	  <m:apply>
	    <m:times/>
	    <m:apply>
	      <m:exp/>
	      <m:apply>
		<m:minus/>
		<m:apply>
		  <m:times/>
		  <m:imaginaryi/><m:cn>2</m:cn><m:pi/><m:ci>f</m:ci>
		  <m:ci><m:msub><m:mi>n</m:mi><m:mn>0</m:mn></m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:ci type="fn">S</m:ci>
	      <m:apply>
		<m:exp/>
		<m:apply>
		  <m:times/>
		  <m:imaginaryi/><m:cn>2</m:cn><m:pi/><m:ci>f</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>.
    </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="p2"> 
      <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/">Linear</emphasis> discrete-time systems have the
      superposition property.  

      <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="eq1">
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci type="fn">S</m:ci>
	      <m:apply>
		<m:plus/>
		<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"><m:msub>
			<m:mi>x</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		    <m:ci>n</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:ci type="fn"><m:msub>
			<m:mi>x</m:mi>
			<m:mn>2</m:mn>
		      </m:msub></m:ci>
		    <m:ci>n</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:plus/>
	      <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">S</m:ci>
		  <m:apply>
		    <m:ci type="fn"><m:msub>
			<m:mi>x</m:mi>
			<m:mn>1</m:mn>
		      </m:msub></m:ci>
		    <m:ci>n</m:ci>
		  </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">S</m:ci>
		  <m:apply>
		    <m:ci type="fn"><m:msub>
			<m:mi>x</m:mi>
			<m:mn>2</m:mn>
		      </m:msub></m:ci>
		    <m:ci>n</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
      </equation>

      A discrete-time system is called <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">shift-invariant</term>
      (analogous to <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" document="m0006" target="para4wra">time-invariant analog systems</cnxn>) if
      delaying the input delays the corresponding output.
       If 
      <m:math>
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:ci type="fn">S</m:ci>
	    <m:apply>
	      <m:ci type="fn">x</m:ci>
	      <m:ci>n</m:ci>
	    </m:apply>
	  </m:apply>
	  <m:apply>
	    <m:ci type="fn">y</m:ci>
	    <m:ci>n</m:ci>
	  </m:apply>
	</m:apply>
      </m:math>, then a shift-invariant system has the property

      <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="eq2">
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci type="fn">S</m:ci>
	      <m:apply>
		<m:ci type="fn">x</m:ci>
		<m:apply>
		  <m:minus/>
		  <m:ci>n</m:ci>
		  <m:ci><m:msub><m:mi>n</m:mi><m:mn>0</m:mn></m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:ci type="fn">y</m:ci>
	      <m:apply>
		<m:minus/>
		<m:ci>n</m:ci>
		<m:ci><m:msub><m:mi>n</m:mi><m:mn>0</m:mn></m:msub></m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math> 
      </equation>

      We use the term shift-invariant to emphasize that delays can only have
      integer values in discrete-time, while in analog signals, delays can
      be arbitrarily valued.  
    </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="p3">
      We want to concentrate on systems that are both linear and
      shift-invariant. It will be these that allow us the full power of
      frequency-domain analysis and implementations.  Because we have no
      physical constraints in "constructing" such systems, we
      need only a mathematical specification. In analog systems, the
      differential equation specifies the input-output relationship in the
      time-domain. The corresponding discrete-time specification is the
      <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">difference equation</term>.  

      <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="eq3"> 
	<m:math>
	  <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: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:ci>…</m:ci>
	      <m:apply>
		<m:times/>
		<m:ci><m:msub><m:mi>a</m:mi><m:mi>p</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>p</m:ci>
		  </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:ci>n</m:ci></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>q</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>q</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
      </equation>

      Here, the output signal 
      <m:math>
	<m:apply><m:ci type="fn">y</m:ci><m:ci>n</m:ci></m:apply>
      </m:math> 
      is related to its <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/">past</emphasis> values 
      
      <m:math>
	<m:apply>
	  <m:ci type="fn">y</m:ci>
	  <m:apply><m:minus/><m:ci>n</m:ci><m:ci>l</m:ci></m:apply>
	</m:apply>
      </m:math>, 
      
      <m:math>
	<m:apply>
	  <m:eq/>
	  <m:ci>l</m:ci>
	  <m:set>
	    <m:cn>1</m:cn>
	    <m:ci>…</m:ci>
	    <m:ci>p</m:ci></m:set>
	</m:apply>
      </m:math>, and to the current and past values of the input signal
      
      <m:math>
	<m:apply>
	  <m:ci type="fn">x</m:ci><m:ci>n</m:ci>
	</m:apply>
      </m:math>.
      
      The system's characteristics are determined by the choices for the
      number of coefficients <m:math><m:ci>p</m:ci></m:math> and 
      <m:math><m:ci>q</m:ci></m:math> and the coefficients' values
      <m:math>
	<m:set>
	  <m:ci><m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub></m:ci>
	  <m:ci>…</m:ci>
	  <m:ci><m:msub><m:mi>a</m:mi><m:mi>p</m:mi></m:msub></m:ci>
	</m:set>
      </m:math> 

      and

      <m:math>
	<m:set>
	  <m:ci><m:msub><m:mi>b</m:mi><m:mn>0</m:mn></m:msub></m:ci>
	  <m:ci><m:msub><m:mi>b</m:mi><m:mn>1</m:mn></m:msub></m:ci>
	  <m:ci>…</m:ci>
	  <m:ci><m:msub><m:mi>b</m:mi><m:mi>q</m:mi></m:msub></m:ci>
	</m:set>
      </m:math>.
      
      <note 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="aside">There is an asymmetry in the coefficients:
	where is
        <m:math display="inline">
           <m:ci><m:msub><m:mi>a</m:mi><m:mn>0</m:mn></m:msub></m:ci>
        </m:math>?  This coefficient would multiply the
        <m:math display="inline">
	    <m:apply>
	      <m:ci type="fn">y</m:ci><m:ci>n</m:ci>
	    </m:apply>
         </m:math>
        term in <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" strength="5" target="eq3"/>. We have essentially
	divided the equation by it, which does not change the
	input-output relationship. We have thus created the convention
	that
        <m:math>
           <m:ci><m:msub><m:mi>a</m:mi><m:mn>0</m:mn></m:msub></m:ci>
        </m:math> is always one.
      </note>
    </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="p4">
      As opposed to differential equations, which only provide an
      <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/">implicit</emphasis> description of a system (we must somehow
      solve the differential equation), difference equations provide an
      <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/">explicit</emphasis> way of computing the output for any
      input. We simply express the difference equation by a program that
      calculates each output from the previous output values, and the
      current and previous inputs.
    </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="intro">
      Difference equations are usually expressed in software with
      <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/">for</emphasis> loops.  A MATLAB program that would
      compute the first 1000 values of the output has the form 
    
    <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">
      for n=1:1000
          y(n) = sum(a.*y(n-1:-1:n-p)) + sum(b.*x(n:-1:n-q));
      end
    </code>
      An important detail emerges when we consider making this program
      work; in fact, as written it has (at least) two bugs. What input
      and output values enter into the computation of
      <m:math display="inline">
      	  <m:apply>
	    <m:ci type="fn">y</m:ci><m:cn>1</m:cn>
	  </m:apply>
      </m:math>?  We need values for
      <m:math display="inline">
      	  <m:apply>
	    <m:ci type="fn">y</m:ci><m:cn>0</m:cn>
	  </m:apply>
      </m:math>,
      <m:math display="inline">
      	  <m:apply>
	    <m:ci type="fn">y</m:ci><m:cn>-1</m:cn>
	  </m:apply>
      </m:math>, ..., values we have not yet computed.  To compute
      them, we would need more previous values of the output, which we
      have not yet computed.  To compute these values, we would need
      even earlier values, ad infinitum.  The way out of this
      predicament is to specify the system's <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">initial
      conditions</term>: we must provide the
      <m:math><m:ci>p</m:ci></m:math> output values that
      occurred before the input started.  These values can be
      arbitrary, but the choice does impact how the system responds to
      a given input.  <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/">One</emphasis> choice gives rise to a
      linear system: Make the initial conditions zero.  The reason
      lies in the definition of a <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" document="m0006" target="linearsys" strength="8">linear system</cnxn>: The only
      way that the output to a sum of signals can be the sum of the
      individual outputs occurs when the initial conditions in each
      case are zero.
    </para>

    
    <exercise 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="exer1">
      <problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<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="prob1">
	  The initial condition issue resolves making sense of the
	  difference equation for inputs that start at some index.
	  However, the program will not work because of a programming,
	  not conceptual, error.  What is it?  How can it be "fixed?" 
	</para>
      </problem>

      <solution xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<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="soln1">
	  The indices can be negative, and this condition is not
	  allowed in  MATLAB.  To fix it, we must start the signals
	  later in the array. 
	</para>
      </solution>
    </exercise>

    <example 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="p0">
      <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="exp1">
	Let's consider the simple system having 
	<m:math>
	  <m:apply><m:eq/><m:ci>p</m:ci><m:cn>1</m:cn></m:apply>
	</m:math> 
	and 
	<m:math>
	  <m:apply><m:eq/><m:ci>q</m:ci><m:cn>0</m:cn></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="eq1b"> 
	  <m:math>
	    <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:times/>
		       <m:ci>a</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:times/>
		       <m:ci>b</m:ci>
		       <m:apply>
		         <m:ci type="fn">x</m:ci><m:ci>n</m:ci>
		       </m:apply>
	           </m:apply>
	         </m:apply>
              </m:apply>
	  </m:math>
	</equation>
      </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="p1b"> 
	To compute the output at some index, this difference equation
	says we need to know what the previous output 
	<m:math>
	  <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:math> 
	
	and what the input signal is at that moment of time. In more
	detail, let's compute this system's output to a unit-sample
	input:
	
	<m:math>
	  <m:apply><m:eq/>
	    <m:apply><m:ci type="fn">x</m:ci><m:ci>n</m:ci></m:apply>
	    <m:apply><m:ci type="fn">δ</m:ci><m:ci>n</m:ci></m:apply>
	  </m:apply>
	</m:math>.  Because the input is zero for negative indices, we
	start by trying to compute the output at
        <m:math>
          <m:apply>
             <m:eq/>
               <m:ci>n</m:ci>
               <m:cn>0</m:cn>
          </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="eq2b">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply><m:ci type="fn">y</m:ci><m:cn>0</m:cn></m:apply>
	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:times/>
		  <m:ci>a</m:ci>
		  <m:apply>
		    <m:ci type="fn">y</m:ci>
		    <m:cn>-1</m:cn>
		  </m:apply>
		</m:apply>
		<m:ci>b</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>
	
	What is the value of
        <m:math>
         <m:apply>
           <m:ci type="fn">y</m:ci>
           <m:apply><m:minus/><m:cn>1</m:cn></m:apply>
         </m:apply>
        </m:math>?  Because we have used an input that is zero for all
	negative indices, it is reasonable to assume that the output
	is also zero. Certainly, the difference equation would not
	describe a <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" strength="5" document="m0006" target="linearsys">linear system</cnxn> if the input that is
	zero for <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/">all</emphasis> time did not produce a zero
	output. With this assumption,

	<m:math> 
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci type="fn">y</m:ci>
	      <m:cn>-1</m:cn>
	    </m:apply>
	    <m:cn>0</m:cn>
	  </m:apply>
	</m:math>, leaving

	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:apply><m:ci type="fn">y</m:ci><m:cn>0</m:cn></m:apply>
	    <m:ci>b</m:ci>
	  </m:apply>
	</m:math>.  For
      <m:math>
	<m:apply>
	  <m:gt/>
	  <m:ci>n</m:ci>
	  <m:cn>0</m:cn>
	</m:apply>
	</m:math>, the input unit-sample is zero, which leaves us with
	the difference equation

	<m:math>
	  <m:apply>
	    <m:forall/>
	    <m:bvar><m:ci>n</m:ci></m:bvar>
	    <m:condition>
	      <m:apply><m:gt/><m:ci>n</m:ci><m:cn>0</m:cn></m:apply>
	    </m:condition>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn">y</m:ci><m:ci>n</m:ci>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:ci>a</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:math>.  We can envision how the filter responds to this
	input by making a table.

	<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="eq3b">
	  <m:math>
	    <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:times/>
		  <m:ci>a</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:times/>
		  <m:ci>b</m:ci>
		  <m:apply>
		  <m:ci type="fn">δ</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>
      </para>


      <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/" orient="vertical" id="fig1000">
	<table xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" frame="all" id="table1">
	  <tgroup xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" cols="3" align="left" colsep="1" rowsep="1">
	    <thead xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" valign="top">
	      <row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math><m:ci>n</m:ci></m:math>
		</entry>
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math>
		  <m:apply>
		    <m:ci type="fn">x</m:ci>
		    <m:ci>n</m:ci>
		  </m:apply>
		</m:math>
		</entry>
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math>
		  <m:apply>
		    <m:ci type="fn">y</m:ci>
		    <m:ci>n</m:ci>
		  </m:apply></m:math>
		</entry>
	      </row>
	    </thead>
	    <tbody xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" valign="top">
	      <row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math><m:apply><m:minus/><m:cn>1</m:cn></m:apply></m:math>
		</entry>
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math><m:cn>0</m:cn></m:math>
		</entry>
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math><m:cn>0</m:cn></m:math>
		</entry>
	      </row>
	      <row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math><m:cn>0</m:cn></m:math>
		</entry>
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math><m:cn>1</m:cn></m:math>
		</entry>
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math><m:ci>b</m:ci></m:math>
		</entry>
	      </row>
	      <row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math><m:cn>1</m:cn></m:math>
		</entry>
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math><m:cn>0</m:cn></m:math>
		</entry>
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math>
                   <m:apply><m:times/><m:ci>b</m:ci><m:ci>a</m:ci></m:apply>
                  </m:math>
		</entry>
	      </row>
	      <row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math><m:cn>2</m:cn></m:math>
		</entry>
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math><m:cn>0</m:cn></m:math>
		</entry>
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math><m:apply>
		      <m:times/>
		      <m:ci>b</m:ci>
		      <m:apply><m:power/><m:ci>a</m:ci><m:cn>2</m:cn></m:apply>
		    </m:apply>
		  </m:math>
		</entry>
	      </row>
	      <row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  :
		</entry>
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math><m:cn>0</m:cn></m:math>
		</entry>
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  :
		</entry>
	      </row>
	      <row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math><m:ci>n</m:ci></m:math>
		</entry>
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math><m:cn>0</m:cn></m:math>
		</entry>
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
		  <m:math> 
		    <m:apply><m:times/>
		      <m:ci>b</m:ci>
		      <m:apply><m:power/><m:ci>a</m:ci><m:ci>n</m:ci></m:apply>
		    </m:apply>
		  </m:math>
		</entry>
	      </row>
	    </tbody>
	  </tgroup>
	</table>
      </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="p15">
	Coefficient values determine how the output behaves. The
	parameter <m:math><m:ci>b</m:ci></m:math> can be any value,
	and serves as a gain. The effect of the parameter
	<m:math><m:ci>a</m:ci></m:math> is more complicated (<cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig1000" strength="5"/>).  If it equals zero, the
	output simply equals the input times the gain
	<m:math><m:ci>b</m:ci></m:math>.  For all non-zero values of
	<m:math><m:ci>a</m:ci></m:math>, the output lasts forever;
	such systems are said to be <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">IIR</term>
	(<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/">I</emphasis>nfinite <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/">I</emphasis>mpulse
	<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/">R</emphasis>esponse). The reason for this
	terminology is that the unit sample also known as the impulse
	(especially in analog situations), and the system's response
	to the "impulse" lasts forever. If
	<m:math><m:ci>a</m:ci></m:math> is positive and less than one,
	the output is a decaying exponential. When
	<m:math>
	<m:apply>
	  <m:eq/>
	  <m:ci>a</m:ci>
	  <m:cn>1</m:cn>
	</m:apply>
      </m:math>, the output is a unit step. If
	<m:math><m:ci>a</m:ci></m:math> is negative and greater than
	<m:math><m:apply><m:minus/><m:cn>1</m:cn></m:apply></m:math>,
	the output oscillates while decaying exponentially. When
	<m:math>
	  <m:apply>
	  <m:eq/>
	  <m:ci>a</m:ci>
	  <m:apply>
	    <m:minus/>
	    <m:cn>1</m:cn>
	  </m:apply>
	</m:apply>
	</m:math>, the output changes sign forever, alternating
	between <m:math><m:ci>b</m:ci></m:math> and
	<m:math><m:apply><m:minus/><m:ci>b</m:ci></m:apply></m:math>.
	More dramatic effects when
	<m:math>
	  <m:apply>
	  <m:gt/>
	  <m:apply>
	    <m:abs/>
	    <m:ci>a</m:ci>
	  </m:apply>
	  <m:cn>1</m:cn>
	</m:apply>
	</m:math>; 
	whether positive or negative, the output signal becomes larger
	and larger, <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/">growing</emphasis> exponentially.  
      </para>

      <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="fig1001">
	<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="sig21.png"/>
	<caption 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 input to the simple example system, a unit sample, is
	  shown at the top, with the outputs for several system
	  parameter values shown below.
	</caption>
      </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="p25">
	Positive values of <m:math><m:ci>a</m:ci></m:math> are used in
	population models to describe how population size increases
	over time. Here, <m:math><m:ci>n</m:ci></m:math> might
	correspond to generation. The difference equation says that
	the number in the next generation is some multiple of the
	previous one. If this multiple is less than one, the
	population becomes extinct; if greater than one, the
	population flourishes. The same difference equation also
	describes the effect of compound interest on deposits. Here,
	<m:math><m:ci>n</m:ci></m:math> indexes the times at which
	compounding occurs (daily, monthly, etc.),
	<m:math><m:ci>a</m:ci></m:math> equals the compound interest
	rate plusone, and
	<m:math>
	  <m:apply><m:eq/><m:ci>b</m:ci><m:cn>1</m:cn></m:apply>
	</m:math> 
	(the bank provides no gain). In signal processing
	applications, we typically require that the output remain bounded for
	any input. For our example, that means that we restrict 
	<m:math>
	  <m:apply><m:eq/>
	  <m:apply><m:abs/>
	    <m:ci>a</m:ci>
	  </m:apply>
	  <m:cn>1</m:cn>
	</m:apply>
	</m:math> 
	and chose values for it and the gain according to the application. 
      </para>
    </example>
    

    <exercise 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="exer1b">
      <problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> 
	<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="probpara1">
	  Note that the <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" strength="5" target="eq3">difference
	  equation</cnxn>,
	  
	    <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: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:ci>…</m:ci>
		  <m:apply>
		    <m:times/>
		    <m:ci><m:msub><m:mi>a</m:mi><m:mi>p</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>p</m:ci>
		      </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:ci>n</m:ci></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:mn>q</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:ci>q</m:ci>
		      </m:apply>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  
	  does not involve terms like 
	  
	  <m:math>
	    <m:apply>
	      <m:ci type="fn">y</m:ci>
	      <m:apply>
		<m:plus/><m:ci>n</m:ci><m:cn>1</m:cn>
	      </m:apply>
	    </m:apply>
	  </m:math> 

	  or 
	  <m:math>
	    <m:apply>
	      <m:ci type="fn">x</m:ci>
	      <m:apply>
		<m:plus/><m:ci>n</m:ci><m:cn>1</m:cn>
	      </m:apply>
	    </m:apply>
	  </m:math> on the equation's right side. Can such terms also
	  be included? Why or why not?
	</para>
      </problem>

      <solution xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	<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="solp1">
	  Such terms would require the system to know what future
	  input or output values would be before the current value was
	  computed. Thus, such terms can cause difficulties.
	</para>
      </solution>
    </exercise>


    <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="fig1002">
      <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="sig22.png"/> 
      <caption 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 plot shows the unit-sample response of a length-5
	boxcar filter.</caption>
    </figure>                                    

    <example 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="ex2001"> 
      <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="para1"> 
	A somewhat different system has no "<m:math><m:ci>a</m:ci></m:math>"
        coefficients. Consider the difference 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="eq0003"> 
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:ci type="fn">y</m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:divide/>
		  <m:cn>1</m:cn>
		  <m:ci>q</m:ci>
		</m:apply>
		<m:apply>
		  <m:plus/>
		  <m:apply>
		    <m:ci type="fn">x</m:ci>
		    <m:ci>n</m:ci>
		  </m:apply>
		  <m:ci>…</m:ci>
		  <m:apply>
		    <m:ci type="fn">x</m:ci>
		    <m:apply>
		      <m:plus/>
		      <m:apply>
			<m:minus/>
			<m:ci>n</m:ci>
			<m:ci>q</m:ci>
		      </m:apply>
		      <m:cn>1</m:cn>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math> 
	</equation>

	Because this system's output depends only on current and previous
	input values, we need not be concerned with initial conditions. When
	the input is a unit-sample, the output equals 
	
	<m:math>
	  <m:apply>
	    <m:divide/><m:cn>1</m:cn><m:ci>q</m:ci>
	  </m:apply>
	</m:math> 
	for 
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:ci>n</m:ci>
	    <m:set>
	      <m:cn>0</m:cn>
	      <m:ci>…</m:ci>
	      <m:apply>
		<m:minus/> <m:ci>q</m:ci> <m:cn>1</m:cn>
	      </m:apply>
	    </m:set>
	  </m:apply>
	</m:math>, then equals zero thereafter. Such systems are said
	to be <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">FIR</term> (<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/">F</emphasis>inite
	<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/">I</emphasis>mpulse <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/">R</emphasis>esponse)
	because their unit sample responses have finite
	duration. Plotting this response (<cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig1002" strength="9"/>) shows that the unit-sample response is a pulse
	of width <m:math><m:ci>q</m:ci></m:math> and height
	
	<m:math>
	  <m:apply>
	    <m:divide/> <m:cn>1</m:cn> <m:ci>q</m:ci>
	  </m:apply>
	</m:math>. 
	
	This waveform is also known as a boxcar, hence the name
	<term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">boxcar filter</term> given to this system. We'll derive
	its frequency response and develop its filtering
	interpretation in the next section. For now, note that the
	difference equation says that each output value equals 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/">average</emphasis> of the input's current and
	previous values. Thus, the output equals the running average
	of input's previous <m:math><m:ci>q</m:ci></m:math>
	values. Such a system could be used to produce the average
	weekly temperature (<m:math>
	  <m:apply>
	    <m:eq/> <m:ci>q</m:ci> <m:cn>7</m:cn>
	  </m:apply>
	</m:math>) that could be updated daily.  
      </para>
    </example><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="element-913"><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="application/x-labviewrpvi80" src="DiscreteTimeSys.llb">
		<param name="lvfppviname" value="Discrete Time System.vi"/>
		<param name="width" value="375"/>
		<param name="height" value="625"/>
	</media>
</para>   


  </content>
</document>
