<?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="m11527">
  <name>Discrete vs Analog</name>
  <metadata>
  <md:version>1.10</md:version>
  <md:created>2003/07/25 14:46:24 GMT-5</md:created>
  <md:revised>2003/11/06 14:35:16.163 US/Central</md:revised>
  <md:authorlist>
    <md:author id="Anders">
      <md:firstname>Anders</md:firstname>
      
      <md:surname>Gjendemsjo</md:surname>
      <md:email>gjendems@NO-SPAM.tele.ntnu.no</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="Anders">
      <md:firstname>Anders</md:firstname>
      
      <md:surname>Gjendemsjo</md:surname>
      <md:email>gjendems@NO-SPAM.tele.ntnu.no</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  

  <md:abstract/>
</metadata>

    <content>

    <para id="s0p1">
	When comparing analog vs discrete time, we find that there
	are many similarities. Often we only need to substitute the varible
	t with n and integration with summation. Still there are some
	important differences that we need to know.
	As the complex exponential signal is truly central to signal processing
	we will study that in more detail.
    </para>
    <section id="s1">
	<name>Analog</name>
	<para id="s1p1">
	    The complex exponential function is defined:
	    <m:math>
		<m:apply>
		    <m:eq/>
		    <m:apply>
			<m:ci>x</m:ci>
			<m:ci>t</m:ci>
		    </m:apply>
		    <m:apply>
		        <m:exp/>
			<m:apply>
			    <m:times/>
			    <m:imaginaryi/>
			    <m:ci>Ω</m:ci>
			    <m:ci>t</m:ci>
		        </m:apply>
		    </m:apply>
		</m:apply>
	    </m:math>.
	    If Ω(rad/second) is increased the rate of oscillation will increase continuously.
	    The complex exponential function is also periodic for <emphasis>any</emphasis>
	    value of Ω. In figure <cnxn target="f1"/> we have plotted
	    <m:math>
		<m:apply>
		    <m:exp/>
		    <m:apply>
		        <m:times/>
			<m:imaginaryi/>
			<m:pi/>
			<m:ci>t</m:ci>
		    </m:apply>
	        </m:apply>
	    </m:math> and
	    <m:math>
		<m:apply>
		    <m:exp/>
		    <m:apply>
		        <m:times/>
			<m:imaginaryi/>
			<m:cn>3</m:cn>
			<m:pi/>
			<m:ci>t</m:ci>
		    </m:apply>
	        </m:apply>
	    </m:math> (the real parts only). In <cnxn target="f1"/> we see that
	    the red plot, corresponding to a higher value of Ω, has a higher rate
	    of oscillation.
	    <figure id="f1">
	        <media type="image/png" src="analog_complex_exp.png"/>
		<caption>Real parts of complex exponentials.</caption>
	    </figure>
	
	</para>
		

    </section>

    <section id="s2">
	<name>Discrete time</name>
	<para id="s2p1">
	    The discrete time complex exponential function is defined:
	    <m:math>
		<m:apply>
		    <m:eq/>
		    <m:apply>
			<m:ci>x</m:ci>
			<m:ci>n</m:ci>
		    </m:apply>
		    <m:apply>
		        <m:exp/>
			<m:apply>
			    <m:times/>
			    <m:imaginaryi/>
			    <m:ci>ω</m:ci>
			    <m:ci>n</m:ci>
		        </m:apply>
		    </m:apply>
		</m:apply>
	    </m:math>.
	</para>
	<para id="s2p2">
	        If we increase ω (rad/sample) the rate of oscillation
		will increase and decrease periodically.

		The reason is:
		<m:math>
		    <m:apply>
		        <m:eq/>
			<m:apply>
			    <m:exp/>
			    <m:apply>
				<m:times/>
				<m:imaginaryi/>
				<m:apply>
				    <m:plus/>
				    <m:ci>ω</m:ci>
				    <m:apply>
				        <m:times/>
					<m:cn>2</m:cn>
					<m:pi/>
					<m:ci>k</m:ci>
				    </m:apply>
				</m:apply>
				<m:ci>n</m:ci>
			    </m:apply>
			</m:apply>
			<m:apply>
			    <m:times/>
			    <m:apply>
				<m:exp/>
				<m:apply>
				    <m:times/>
				    <m:imaginaryi/>
				    <m:ci>ω</m:ci>
				    <m:ci>n</m:ci>
				</m:apply>
			    </m:apply>
			    <m:apply>
				<m:exp/>
				<m:apply>
				    <m:times/>
				    <m:imaginaryi/>
				    <m:cn>2</m:cn>
				    <m:pi/>
				    <m:ci>k</m:ci>
				    <m:ci>n</m:ci>
				</m:apply>
			    </m:apply>
		        </m:apply>
			<m:apply>
			    <m:exp/>
			    <m:apply>
			        <m:times/>
				    <m:imaginaryi/>
				    <m:ci>ω</m:ci>
				    <m:ci>n</m:ci>
			    </m:apply>
			</m:apply>
		    </m:apply>
	        </m:math>, where
                <m:math>
                   <m:apply>
                     <m:in/>
                     <m:cn type="integer">n,k</m:cn>
                     <m:integers/>
                   </m:apply>
                 </m:math>.
		
	    </para><!-- End para s2s1p1-->
	    <para id="s2s1p2">
	        This implies that the complex exponential with digital
		angular frequency ω is identical to
		a complex exponential with
		<m:math>
		    <m:apply>
		        <m:eq/>
			<m:ci><m:msub><m:mi>ω</m:mi><m:mn>1</m:mn></m:msub></m:ci>
			<m:apply>
			    <m:plus/>
			    <m:ci>ω</m:ci>
			    <m:apply>
			        <m:times/>
				<m:cn>2</m:cn>
				<m:pi/>
			    </m:apply>
			</m:apply>			
		    </m:apply>
		</m:math>, see <cnxn target="f2"/>
		<figure id="f2">
		     <media type="image/png" src="discrete_complex_exp2.png"/>
		    <caption>Two discrete exponentials that are identical</caption>
		</figure>

		The rate of oscillation will increase until
		<m:math>
		    <m:apply>
		        <m:eq/>
			<m:ci>ω</m:ci>
			<m:pi/>
		    </m:apply>
		</m:math>, then it decreases and repeats after 2π. In <cnxn target="f3"/>
		we see that as we increase the angular frequency towards π the rate of
		oscillation increases. If you download the Matlab files included at the
		end of this module you can adjust the parameters and see that the rate
		of oscillation will decrease when exceeding π (but less than 2π).
		<figure id="f3">
		    <media type="image/png" src="discrete_complex_exp1.png"/>
		    <caption>Two discrete exponentials with different frequency.</caption>
		</figure>

		<note type="consequence">
		    We need to consider discrete time exponentials at an (digital angular) frequency interval of 2π only.
		</note>
		Low (digital angular) frequencies will correspond to ω near even multiplies of π.
		High (digital angular) frequencies will correspond to ω near odd multiplies of π.
		
	    </para>
        
    </section><!-- End section s2 -->
    <section id="s3">
        <name>Matlab files</name>
	<para id="s3p1">
	    <link src="http://cnx.rice.edu/content/m11527/latest/complex_exponential.m">complex_exponential.m</link>
	</para>
    </section>
   <section id="s5">
	<para id="s5p1">
	    Take a look at
	    <list id="l1" type="inline">
		   <item><cnxn document="m11479">Introduction</cnxn></item>
	           <item><cnxn document="m11476">Discrete time signals</cnxn></item>
	           <item><cnxn document="m11478">Analog signals</cnxn></item>
		   <item><cnxn document="m11477">Frequency definitions and periodicity</cnxn></item>
	           <item><cnxn document="m11526">Energy &amp; Power</cnxn></item>
	           <item><cnxn document="m11428">Exercises</cnxn></item>
	   </list> ?
      </para>
      </section>
    

</content>
  
</document>
