
 Introduction:This project was attempted on an Atmel Mega163 processor. Several limitations needed to be considered in our design and algorithms. Due to these limitations, we needed an appropriate code. Fourier analysis and digital filtering were considered, but they fell out of the practical scope of the processor. In addition, the signal amplitude was constantly varying (and normalization is computationally expensive), and there was a tremendous amount of radiated and conducted noise (most likely due to all the other crazy projects in progress in the class), not to mention noise introduced by our ADC (analog to digital converter). We needed an algorithm that could function under noisy condition, varying signal amplitude, and low computational requirements. We used correlation with some additional detection algorithms.
The formation of the algorithm:Crosscorrelation is nearly identical to timedomain convolution, except the signal being convolved is not folded about zero. Or crosscorrelation can be implemented as convolution if the correlation signal is folded about zero. So if x(n) and y(n) are input signals, and r_{xy}(n) is the crosscorrelation of x and y, r_{xy}(n) = x(n) <crosscorrelated with> y(n) or r_{xy}(n) = x(n) * y(n), where * is the convolution operation.
Crosscorrelation of the same signal is know as autocorrelation, or r_{xx}(n) = x(n) * x(n), where * is the convolution operation.
In our design, in conjunction of the equations above, we used some identities such as r_{xy}(l) = r_{yx}(l), where the index l is the (time) shift (or lag) parameter. These techniques allowed us to reduce the amount of computation. An algorithm to directly compute positive lag was used in our design. Then we computed information from the results of the crosscorrelation to determine if there was a signal match. This combination of code is shown to work in the Results section.
REFERENCE: Proakis, J., Manolakis, D. 1996. Digital Signals Processing, Prentice Hall, NJ.
Implementation:A audio capture circuit was created with amplification and filtering and found in the Electrical section. Detection and control code was written. The detection code is described above. The control code allows for a user to store a signal by playing the signal while pressing a "store" button. Additional control code was written to determine the direction of the signal (this required another audio capture circuit). The results are in the process of being tested. Due to memory issues discussed in the Limitations section, we do not expect much accuracy without modifying our hardware configuration. Some diagrams are listed on thee pages, others are excluded to keep this page comprehensible.

Send mail to zag2@cornell.edu with
questions or comments about this web site.
