<?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/" xmlns:m="http://www.w3.org/1998/Math/MathML" id="None">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Spatial Frequency Analysis</name>
	<content xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
		<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="s40">
			<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Aliasing in the Spatial Frequency Domain</name>
			<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="p40"><name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Avoiding Spatial Aliasing</name>As we saw was the case in the time domain, a phenomenon known as <link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" src="http://cnx.rice.edu/content/m10793/latest/">aliasing</link> can occur in the frequency domain if signals are not sampled at high enough rate.  We have the same sort of considerations to take into account when we want to analyze the spectrum of the spatial frequency as well.  As was discussed in the <link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" src="http://cnx.rice.edu/content/m12561/latest/">introduction</link>, the Nyquest equivalent of the sampling rate is 1/2 of the <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">minimum</emphasis> wavelength.  This comes about from the relationship between speed, frequency and wavelength, which was discussed in the introduction as well.  The figure below demonstrates the effects of aliasing in the spatial domain; it looks identical to filtering the time domain except that instead of the x-axis being related to pi/T it is now pi/d, where d is the distance between sensors.  So, if we bandlimit our signal in temporal frequency, so that we can sample as two times the maximum <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">temporal</emphasis> frequency, and if we design the sensors so that half of the minimum wavelength is greater than distance between sensors, we can avoid aliasing in both time and space! <figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="fig1">
					<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpeg" src="aliasing.jpg"/>
					<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Spatial Aliasing</caption>
				</figure></para>
		</section>
		<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="s41">
			<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Spatial Frequency Transform</name>
			<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="p41"><name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Introduction to the Spatial Frequency Transform</name>Analogous to the <link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" src="http://cnx.rice.edu/content/m10249/latest/">DFT</link>, is the sampled and windowed spatial equivalent, which is what we used to be able to filter our signal in frequency.  The reason we want the information in the spatial frequency or wavenumber domain is because it is directly correlated to the angle the signal is coming from relative to the ULA.  The spatial DFT is computed as the FFT of the first FFT.  The first FFT represents the time domain frequency response and the second FFT represents the wavenumber response.  This seems strange this would work, but let's explore this a little more fully.  Let's look at theoretical example.</para>
			<example xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="e41">
				<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/"> Mentally Visualizing the Spatial Frequency Transform</name>
				<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="p42"><name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">The 2-D Transform</name>Consider a box filled with numbers.  The box is labeled on one edge time and on the other edge space.  The first FFT we are taking is to obtain the temporal frequencies, so this would be like looking at a row along the box and taking the FFT of the numbers going across, while the spatial FFT would be calculated by looking at the numbers going down the columns.  This is done repeatedly on each row and column, so the first FFT would go across each row, while the 2nd one would go down each column.  This is easier to comprehend with a picture like the one below.<figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="fig2">
						<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/gif" src="2d_fft.gif"/>
						<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Visualization of mapping a signal into Spatial &amp; Temporal Frequencies</caption>
					</figure></para>
			</example>
		</section>
		<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="p43"><name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SFT with Sinusoids</name>Since we were interested in detecting sinusoids, it would be interesting to consider what this kind of "double" Fourier Transform would do to a sinusoid.  From our list of <link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" src="http://cnx.rice.edu/content/m10099/latest">Fourier Transforms</link> we know that the FFT of a sinusoid will give us a delta function shifted by the frequency of the sinusoid.  We then see that the FFT of a delta function is 1, which would mean that we get the equivalent of white noise in spatial frequency!  Fortunately, this is not exactly how the spatial FFT works.  We are basically taking the FFT across one set of  vectors followed by the FFT down the columns of those vectors, we are NOT taking the FFT(FFT(f(x,t)).  So, when we accomplish this sort of arrangement on our signal, f(x,t), we get:<figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="f43">
				<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpeg" src="graphafterspatialfft.JPG"/>
				<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Spatial FFT of a Sinusoid</caption>
			</figure></para>
		<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="p44">                                                                                                                                           A sinc function!</para>
		<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="s42">
			<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Spatial Domain Filtering</name>
			<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="p45">Just as we are able to filter signals in <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">temporal</emphasis> frequency, we can filter signals in <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">spatial </emphasis>frequency.  In fact, the way we accomplished the direction detecting algorithm in labview used a graph very similiar as the one above and then looking for the largest magnitude part of the signal.  Once, this value is known, quick computation can then find the angle that signal came from!  Ta da!  We're done!  Well, sort of.</para>
		</section>
	</content>
</document>
