Friday, January 14, 2011

Algorithm Overview

The first step in detecting a signal is to input it into the system. Since we are using an audio signal, a microphone is the obvious choice. However, the desired control signal is not the only sound in the room. There is also the music that is being played through the speakers as well as outside noise. Unfortunately, there is not much that can be done about the random noise that is present in the room. However, there are tools available that allow us to minimize the interference caused by the music. Specifically, we can use an adaptive filter to mimic the room’s effect on the output of the sound card, providing us with an estimate of the music’s contribution to the signal received by the microphone. We can subtract the microphone’s signal from this estimate in order to obtain—hopefully—only the whistle.
Figure 1 shows the block diagram of our system. All of these components fall into four main categories:
  1. Signal acquisition
  2. Whistle isolation
  3. Whistle frequency analysis
  4. iTunes interface
The acquisition phase is the top portion of the diagram, the whistle isolation system is represented by the ĥ box and the band pass filter, the rest of the diagram (except for the Java controller) comprise the whistle analysis phase, and the Java controller is the iTunes interface.
Figure 1: In our system, the sound is output through the speaker, and the microphone receives the music and whistles while the sound card receives the audio without the room affecting it. We then remove the music and process the whistle.
Our System's Block Diagram
Our System's Block Diagram (graphics1.png)
After isolating the whistle, we apply a band pass filter whose pass band corresponds to common whistle frequencies in order to remove extraneous noise outside of these whistle frequencies.
We then take the Short Time Fourier Transform in order see how the frequency components of the whistle change over time. If the frequency of the whistle is increasing iTunes should advance to the next track, and a decreasing frequency will skip to the previous track. To accomplish this, we examine the frequency with maximum power (the argmax in the figure below) and accumulate several readings of this frequency. In order to see if this function is increasing or decreasing we take the derivative and examine its average value. If the average value is positive, the function must have been increasing and the whistle must have been from high to low frequencies.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

java

Popular java Topics