<?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="None">
  <name>Beamforming Theory</name>
  <metadata>
  <md:version>**new**</md:version>
  <md:created>2004/12/15 09:58:58.027 US/Central</md:created>
  <md:revised>2004/12/15 10:00:02.082 US/Central</md:revised>
  <md:authorlist>
      <md:author id="lizzardg">
      <md:firstname>Elizabeth</md:firstname>
      
      <md:surname>Gregory</md:surname>
      <md:email>lizzardg@rice.edu</md:email>
    </md:author>
      <md:author id="joecole">
      <md:firstname>Joseph</md:firstname>
      
      <md:surname>Cole</md:surname>
      <md:email>joecole@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="lizzardg">
      <md:firstname>Elizabeth</md:firstname>
      
      <md:surname>Gregory</md:surname>
      <md:email>lizzardg@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="joecole">
      <md:firstname>Joseph</md:firstname>
      
      <md:surname>Cole</md:surname>
      <md:email>joecole@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>beamforming</md:keyword>
    <md:keyword>digital signal processing</md:keyword>
    <md:keyword>DSP</md:keyword>
    <md:keyword>real-time</md:keyword>
  </md:keywordlist>

  <md:abstract>In this section, we will summarize the aspects of beamforming theory we use for our project.</md:abstract>
</metadata>

  <content>
    
      <figure id="f1">
	<name>The Geometry</name>
	<media type="image/jpg" src="figure4.jpg"/>
      </figure>

    <para id="p1">
      We used delay-and-sum beamforming in order to determine the
      direction of origin for our 500 Hz test signal.  Beamforming
      takes advantage of the fact that the distance from the source to
      each microphone in the array is different, which means that the
      signal recorded by each microphone will be phase-shifted
      replicas of each other.  The amount of phase-shift at each
      microphone in the array can be calculated by thinking about the
      geometry of the situation, shown in <cnxn target="f1"/>.  In our
      case, we are assuming that the source is in the far-field, which
      means that the source is far enough away that its spherical
      wavefront appears planar at our array.  The geometry is much
      simplier with that assumption, and <cnxn target="e1"/> shows the
      calculation for the extra time it takes to reach each microphone
      in the array relative to the array center.  <cnxn target="f2"/>
      shows an example of the out of phase signals that might be
      recorded by a three microphone array.
      <equation id="e1">
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:ci><m:msub>
		<m:mi>Δ</m:mi>
		<m:mi>m</m:mi>
	      </m:msub></m:ci>
	    <m:apply>
	      <m:divide/>
	      <m:apply>
		<m:times/>
		<m:ci><m:msub>
		    <m:mi>x</m:mi>
		    <m:mi>m</m:mi>
		  </m:msub></m:ci>
		<m:apply>
		  <m:cos/>
		  <m:ci>θ</m:ci>
		</m:apply>
	      </m:apply>
	      <m:ci>c</m:ci>
	    </m:apply>
	  </m:apply>
	</m:math>
      </equation>
      <figure id="f2">
	<name>Out of Phase Signals As Seen by a 3-Microphone Array</name>
	<media type="image/jpg" src="figure2.jpg"/>
      </figure>
    </para>
    <para id="p2">
      In order to determine the direction of origin of a signal, we
      have to add a time delay to the recorded signal from microphone
      that is equal and opposite of the delay caused by the extra
      travel time.  That will result in signals that are perfectly
      in-phase with each other.  Summing these in-phase signals will
      result in constructive interference that will amplify the result
      by the number of microphones in the array.  The question is how
      to know what time delay to add that will produce the desired
      constructive interference.  The only solution is to iteritively
      test time delays for all possible directions.  If the guess is
      wrong, the signal will destructively interfere resulting in an
      diminished output signal, but the correct guess will result in
      the signal amplification described above.
    </para>
    <figure id="f3">
      <media type="image/jpg" src="figure6.jpg"/> 

      <caption>The beampattern for a signal arrive from pi/2, as seen
      by a two-microphone array.</caption>
    </figure>
    <para id="p3">
      We can plot the resulting output amplitudes as a function of
      test angles to produce a beampattern for the array.  A typical
      beampattern for a signal arriving from the 
      <m:math>
	<m:apply>
	  <m:divide/>
	  <m:pi/>
	  <m:cn>2</m:cn>
	</m:apply>
      </m:math> direction is shown in <cnxn target="f3"/> for a two
      microphone array.  Naturally, the peak is located at <m:math>
	<m:apply>
	  <m:divide/>
	  <m:pi/>
	  <m:cn>2</m:cn>
	</m:apply>
      </m:math> because time delays from that region produced the most
      constructive interference.  Test values further from the true
      angle resulted in diminished output signals.  If the source
      originates from a different direction, such as <m:math>
	<m:apply>
	  <m:divide/>
	  <m:pi/>
	  <m:cn>3</m:cn>
	</m:apply>
      </m:math> as shown in <cnxn target="f4"/>, the peak moves to the
      new location.
    </para>
    <figure id="f4">
      <media type="image/jpg" src="figure10.jpg"/> 

      <caption>The comparison of a beampattern for a two-microphone
      array when at pi/3.</caption>
    </figure>
    <para id="p4">
      The peak width is partially determined by the spacing of the
      microphones in the array.  <cnxn target="f5"/> shows that as the
      spacing is increased, the peak width decreases.  That trend will
      continue until the array length reaches the optimal length for
      the source frequency used.  This length is half the wavelength
      of the source signal as shown in the <cnxn document="">Design
      Decisions</cnxn> section.
    </para>
    <figure id="f5">
      <media type="image/jpg" src="figure7.jpg"/>
      <caption>Beampattern with an increased array spacing.</caption>
    </figure>
    <para id="p5">
      <cnxn target="f6"/> shows the affect of adding more microphones
      to the array.  The most interesting feature is the appearance of
      side lobes in the beampattern.  However, the global peak value
      is still located at the true origination angle.
    </para>
    <figure id="f6">
      <media type="image/jpg" src="figure8.jpg"/>
      <caption>Beampattern with more microphones</caption>
    </figure>
  </content>
  
</document>
