<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5//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:bib="http://bibtexml.sf.net/" id="Module.2003-12-10.1516">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">DMT: A/D &amp; D/A Conversion</name>
	<metadata xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
  <md:version xmlns:bib="http://bibtexml.sf.net/">1.3</md:version>
  <md:created xmlns:bib="http://bibtexml.sf.net/">2003/12/10 23:15:16 US/Central</md:created>
  <md:revised xmlns:bib="http://bibtexml.sf.net/">2003/12/17 14:58:14.391 US/Central</md:revised>
  <md:authorlist xmlns:bib="http://bibtexml.sf.net/">
    <md:author xmlns:bib="http://bibtexml.sf.net/" id="egarza">
      <md:firstname xmlns:bib="http://bibtexml.sf.net/">Cosme</md:firstname>
      <md:othername xmlns:bib="http://bibtexml.sf.net/">Eric</md:othername>
      <md:surname xmlns:bib="http://bibtexml.sf.net/">Garza</md:surname>
      <md:email xmlns:bib="http://bibtexml.sf.net/">egarza@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist xmlns:bib="http://bibtexml.sf.net/">
    <md:maintainer xmlns:bib="http://bibtexml.sf.net/" id="egarza">
      <md:firstname xmlns:bib="http://bibtexml.sf.net/">Cosme</md:firstname>
      <md:othername xmlns:bib="http://bibtexml.sf.net/">Eric</md:othername>
      <md:surname xmlns:bib="http://bibtexml.sf.net/">Garza</md:surname>
      <md:email xmlns:bib="http://bibtexml.sf.net/">egarza@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  

  <md:abstract xmlns:bib="http://bibtexml.sf.net/">Gives details about the A/D and D/A converters used in our  DMT project.</md:abstract>
</metadata>
	<content xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
		<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="ad1">Why, you might ask, did we implement our system by using a sampled analog waveform as the input rather than an arbitrary bit stream?  First, it allowed us to actaully see and hear the errors introduced by a noisy channel, rather than just having a tally of the bit errors.  Second, we found it motivational to have a visible goal (i.e. the input waveform) to shoot for as we watched our results improved with every version of our code.  Finally, it gave us more experience coding and lets us put these nifty plots in this module, which helps constrast the encoded time-domain plots seen in other subsystems with a real speech signal.   </para>
		<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="sec1">
			<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Analog-to-Digital (A/D)</name>
			<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="ad2">The A/D converter in our system takes in a MATLAB vector corresponding to a sampled analog signal and converts it to a bit stream.  This is a two step process: quantization and bit assignment.  In <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">quantization</term>, the amplitude axis of the input signal is broken up into <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">2^B</emphasis> levels and each sample is rounded to the nearest level.  Each level is assigned a <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">B</emphasis>-bit binary number, so the length <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Q</emphasis> input vector of samples is mapped to a length <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">BQ </emphasis>bitstream.  Below are figures of the input and quantized input waveforms.    </para>
		</section>
		<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="delete_me"><figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" orient="vertical" id="fig1">
				<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Input sampled waveform</name>
				<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="speechin.jpg"/>
				<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">The input waveform used was the 'Handel' sound file built into MATLAB</caption>
			</figure><figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" orient="vertical" id="fig2">
				<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Quantized input waveform</name>
				<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="quantin.jpg"/>
				<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Quantized version of 'Handel'</caption>
			</figure></para>
		<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="sec2">
			<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Digital-to-Analog (D/A)</name>
			<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="ad3">The D/A converter in our system performs the inverse operation of the A/D converter: it takes in a MATLAB bitsream and converts it to sampled analog signal.  Here, it is only a one step process: since we performed <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">B</emphasis>-bit A/D conversion, we assign each block of <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">B</emphasis> bits the original associated quantization level.  There is an implicit error induced in D/A conversion due to quantization: since we originally rounded the sampled points to the nearest level, the information regarding their exact values is lost.  This is called <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">quantization error</term>.  However, with a speech waveform, a 4-bit (16 quantization level) approximation of the signal sounds reasonably close to the real thing.  To actually see how well our output signal matched up with our input, we compared it with a quantized version of the input waveform.<emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/"/><emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/"/><emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/"/><emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/"/></para>
			<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="ad4">Other sources for information about A/D conversion: <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" src="/content/m0051/latest/">Amplitude Quantization</term></para>
			<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="ad5">Our related MATLAB functions: <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline"><link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" src="/content/m11721/latest/a2d.m">a2d.m</link></code>, <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline"><link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" src="/content/m11721/latest/d2a.m">d2a.m</link></code></para>
			<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="ad6"><link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" src="/content/m11710/latest">Home</link>   |   Previous: <link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" src="/m11721/latest">Implementation</link>   |   Next:  <link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" src="/content/m11723/latest">Serial/Parallel, Parallel/Serial</link></para>
		</section>
	</content>
</document>
