<?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="new0">
  <name>Aliasing Applet</name>
  <metadata>
  <md:version>1.14</md:version>
  <md:created>2003/07/14 06:15:57 GMT-5</md:created>
  <md:revised>2004/01/09 02:16:18.822 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:keywordlist>
    <md:keyword>Aliasing</md:keyword>
    <md:keyword>Applet</md:keyword>
    <md:keyword>Demonstration</md:keyword>
  </md:keywordlist>

  <md:abstract>Applet demonstrating the concept of aliasing</md:abstract>
</metadata>

 
  <content>
      <para id="s0p1">The applet is courtesy of the Digital Signal Processing tutorial at freeuk.com,
	  <cite>http://www.dsptutor.freeuk.com/</cite>. You can
          also have a look at the <link src="http://flowers.ofthenight.org/wagonWheel/lightWheel.html">Light Wheel
applet</link>.
      </para>
      <section id="s1">
	  <name>Introduction</name>
	   
          <para id="s1p1">
	      In this module we shall look at sampling a sinusoidal signal.
	      According to the <cnxn document="m11419" target="s4">sampling theorem</cnxn>, 
	      a sinusoidal signal can be exactly reconstructed from values sampled at 
	      discrete, uniform intervals as long as the signal frequency is less than half the sampling 
	      frequency. Any component of a sampled signal with a frequency above this 
	      limit, often referred to as the folding frequency, is subject to 
	      <cnxn document="m11443" target="s1ss2p2">aliasing</cnxn>.
	  </para>

	  <para id="s1p2">
	   The applet is based on a fixed sampling rate of 
	   <m:math>
	     <m:apply>
	       <m:eq/>
               <m:ci><m:msub><m:mi>F</m:mi><m:mi>s</m:mi></m:msub></m:ci>
	       <m:cn>8000 samples per second</m:cn>
	     </m:apply>
	   </m:math> (one sample every 0.125 milliseconds, i.e
	   <m:math>
	     <m:apply>
	       <m:eq/>
	       <m:ci><m:msub><m:mi>T</m:mi><m:mi>s</m:mi></m:msub></m:ci>
	       <m:apply>
	         <m:divide/>
	         <m:cn>1</m:cn>
	         <m:cn>8000</m:cn>
	       </m:apply>
	     </m:apply>
	   </m:math>).
	  </para>
      </section>

      <section id="s2">
	<name>Instructions</name>
	<para id="s2p1">
	Set the frequency of the sinusoidal signal, in Hz, in the "Input frequency" box, i.e
	choose an <m:math><m:ci>f</m:ci></m:math> in the following signal:
	<m:math>
	  <m:apply>
	    <m:sin/>
	    <m:apply>
	      <m:times/>
	      <m:cn>2</m:cn>
	      <m:pi/>
	      <m:ci>f</m:ci>
	      <m:ci>t</m:ci>
	    </m:apply>
	  </m:apply>
	</m:math>.
	When you click the "Plot" button, with "Input signal" checked, the input signal is plotted against 
	time. 
	</para>
	<para id="s2p2">
	  The "Grid" checkbox toggles on and off vertical gridlines 
	  indicating the instants at which the signal is sampled. 
	  The "Sample points", representing the sampled values 
	  of the input signal, can also be toggled. 
      </para>
      <para id="s2p3">
	Finally, the "Alias frequency" checkbox 
	(visible only when 
	<cnxn document="m11443" target="s1ss2p2">aliasing</cnxn> occurs)
	controls the plotting of the "reconstructed" sinusoidal signal, with
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:ci>f</m:ci>
	    <m:ci><m:msub><m:mi>f</m:mi><m:mi>alias</m:mi></m:msub></m:ci>
	  </m:apply>
	</m:math>.
      </para>
      </section>
    <section id="s3">
      <name>Overview of the process</name>
      <para id="s3p1">
	When using the applet it is important to
	have an understanding of where the different signals occur
	in a sampling system.
	<figure id="f1"> 
	  <media type="image/jpg" src="ideal_system.jpg"/>
	  <caption>Ideal sampling process</caption>
	</figure>
	Relating the applet signals to the figure we get
	<list id="l1">
	  <item>Input signal = 
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:ci>x</m:ci>
		  <m:ci>t</m:ci>
		</m:apply>
		<m:apply>
		  <m:sin/>
		  <m:apply>
		    <m:times/>
		    <m:cn>2</m:cn>
		    <m:pi/>
		    <m:ci>f</m:ci>
		    <m:ci>t</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>, where <m:math><m:ci>f</m:ci></m:math> is the input frequency chosen by the user.
	  </item>
	  <item>
	    The sampled signal =
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:ci><m:msub><m:mi>x</m:mi><m:mi>s</m:mi></m:msub></m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
		<m:apply>
		  <m:sin/>
		  <m:apply>
		    <m:times/>
		    <m:cn>2</m:cn>
		    <m:pi/>
		    <m:ci>f</m:ci>
		    <m:ci>n</m:ci>
		    <m:ci><m:msub><m:mi>T</m:mi><m:mi>s</m:mi></m:msub></m:ci>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:sin/>
		  <m:apply>
		    <m:times/>
		    <m:cn>2</m:cn>
		    <m:pi/>
		    <m:ci>f</m:ci>
		    <m:ci>n</m:ci>
		    <m:apply>
		      <m:divide/>
		      <m:cn>1</m:cn>
		      <m:cn>8000</m:cn>
		    </m:apply>
		  </m:apply>
		</m:apply>		
	      </m:apply>
	    </m:math>.
	  </item>
	  <item>
	    The reconstructed signal =  
	    <m:math>
	      <m:apply>
		<m:mover accent="true">
		  <m:mi>x</m:mi>
		  <m:mo>̂</m:mo>
		</m:mover>
		<m:ci>(t)</m:ci>
	      </m:apply>
	    </m:math>,
	    is shown as the original signal
	    if sampling is done fast enough, or as the aliased signal
	    if sampling is too slow.
	  </item>
	</list>
	(<m:math><m:apply><m:ci>h</m:ci><m:ci>t</m:ci></m:apply></m:math> 
	is an ideal reconstruction filter).
      </para>
    </section>

      <section id="s4">
	  <name>Aliasing demo applet</name>
	  <para id="s4p1">
	      <media type="application/x-java-applet" src="AliasingDemo.class">
		  <param name="height" value="200"/>
		  <param name="width" value="600"/>
		  <param name="ARCHIVE" value="Aliasing.jar"/>
	      </media>
	  </para>
      </section>
<!--      <section id='s4'>
      <para id='s4p1'>
	  Take a look at
	  <list id='l1' type='inline'>
	      <item><cnxn document='m11419'>Introduction</cnxn></item>
	      <item><cnxn document='m11423'>Proof</cnxn></item>
	      <item><cnxn document='m11443'>Illustrations</cnxn></item>
              <item><cnxn document='m11549'>Matlab Example</cnxn></item>
              <item><cnxn document='m11458'>Hold operation</cnxn></item>
              <item><cnxn document='m11465'>System view</cnxn></item>
	      <item><cnxn document='m11442'>Exercises</cnxn></item>	
	   </list> ?
      </para>
      </section>-->
  </content>
    
</document>
