<?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>DMT: A/D &amp; D/A Conversion</name>
	<metadata>
  <md:version>1.3</md:version>
  <md:created>2003/12/10 23:15:16 US/Central</md:created>
  <md:revised>2003/12/17 14:58:14.391 US/Central</md:revised>
  <md:authorlist>
    <md:author id="egarza">
      <md:firstname>Cosme</md:firstname>
      <md:othername>Eric</md:othername>
      <md:surname>Garza</md:surname>
      <md:email>egarza@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="egarza">
      <md:firstname>Cosme</md:firstname>
      <md:othername>Eric</md:othername>
      <md:surname>Garza</md:surname>
      <md:email>egarza@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  

  <md:abstract>Gives details about the A/D and D/A converters used in our  DMT project.</md:abstract>
</metadata>
	<content>
		<para 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 id="sec1">
			<name>Analog-to-Digital (A/D)</name>
			<para 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>quantization</term>, the amplitude axis of the input signal is broken up into <emphasis>2^B</emphasis> levels and each sample is rounded to the nearest level.  Each level is assigned a <emphasis>B</emphasis>-bit binary number, so the length <emphasis>Q</emphasis> input vector of samples is mapped to a length <emphasis>BQ </emphasis>bitstream.  Below are figures of the input and quantized input waveforms.    </para>
		</section>
		<para id="delete_me"><figure orient="vertical" id="fig1">
				<name>Input sampled waveform</name>
				<media type="image/jpg" src="speechin.jpg"/>
				<caption>The input waveform used was the 'Handel' sound file built into MATLAB</caption>
			</figure><figure orient="vertical" id="fig2">
				<name>Quantized input waveform</name>
				<media type="image/jpg" src="quantin.jpg"/>
				<caption>Quantized version of 'Handel'</caption>
			</figure></para>
		<section id="sec2">
			<name>Digital-to-Analog (D/A)</name>
			<para 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>B</emphasis>-bit A/D conversion, we assign each block of <emphasis>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>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/><emphasis/><emphasis/><emphasis/></para>
			<para id="ad4">Other sources for information about A/D conversion: <term src="/content/m0051/latest/">Amplitude Quantization</term></para>
			<para id="ad5">Our related MATLAB functions: <code type="inline"><link src="/content/m11721/latest/a2d.m">a2d.m</link></code>, <code type="inline"><link src="/content/m11721/latest/d2a.m">d2a.m</link></code></para>
			<para id="ad6"><link src="/content/m11710/latest">Home</link>   |   Previous: <link src="/m11721/latest">Implementation</link>   |   Next:  <link src="/content/m11723/latest">Serial/Parallel, Parallel/Serial</link></para>
		</section>
	</content>
</document>
