Problems with Matlab Projects? You may face many Problems, but do not worry we are ready to solve your Problems. All you need to do is just leave your Comments. We will assure you that you will find a solution to your project along with future tips. On Request we will Mail you Matlab Codes for Registered Members of this site only, at free service...Follow Me.

MATLAB Simulation of Audio Localization

Summary: In this section, we will go over the Matlab code we used to simulate our project, the various algorithms we tried, how we simulated "real-time", and how the matlab simulation dealt with real signals.



sin(ω(tτ2)+φ2)+sin(ω(tτ1)+φ1)=2sin(ωt+
φ1+φ2ω(τ1+τ2)
2
 
)
cos(
φ1φ2ω(τ1+τ2)
2
 
)
(1)
Equation 1 shows that the sum of two sinusoids that are out of phase is just another sinusoid with an amplitude directly related to the phase difference. Our goal is to adjust the phase difference by adding time delays to the incoming signals so as to maximize the amplitude of the output. The maximum occurs when the phase difference is zero, because the signals will add constructively. Once the maximum is found, the time delays used to achieve it tell us from which direction the signals originated.
Since we are working with discrete-time signals, the time delays we tried were limited by the sampling frequency of the DSP boards, which is 48 kHz. By dividing the desired time delay by that sampling period and rounding to the nearest integer, we converted our trial time delays into indices that could be used to select the correct sample out of the buffer.
So, the algorithm for delay-and-sum beamforming is straightforward, but there is room for a little bit of creativity in finding the amplitude of the summed sinusoids. We experimented with two methods to accomplish that task. We will call the first method "amplitude extraction," and the second "signal integration."
Figure 1
Amplitude Extraction Flow Diagram
Amplitude Extraction Flow Diagram (figure5.jpg)
A flow diagram for the amplitude extraction method is shown in Figure 1. We split the signal into two parts and multiply one part by sin(ωt) and the other by cos(ωt). By low-pass filtering the results, we obtain the DC part of the signal which contains the amplitude information. This algorithm has the obvious disadvantage that it is dependent on knowing the frequency of the incoming signal so that the correct w is used in the multiplication step. In spite of that, we were originally selected it for implementation on the DSP board because it showed extremely robust performance in the presence of loud noise. Adding gaussian white noise with a variance of 1 to a signal in the range [-1,1] had no affect on the performance of the beamformer in our Matlab simulation. Unfortunently, the algorithm is too slow to be used in real time. Evaluating two low-pass filters for every time delay combination tried was simply not practical.
The signal integration method is much simpler computationally, which made it a better choice for our final implementation. We only had to square the beamformer output to make all the numbers positive, and sum the results over approximately one cycle of the incoming signal. The sum is similar to an integral over one period of the signal, except that the samples aren't multiplied by the sampling period to make an "area." Our matlab simulation showed that the algorithm should work, but that it is somewhat more sensitive to noise than amplitude extraction.
We were unable to try either of our Matlab simulations with real signals recorded from our microphone array because we had difficulty making stereo recordings. The computers we used defaulted to recording from the microphone input (which is mono) instead of the line-in input, and we didn't have administrator access to change the settings.

0 comments:

Post a Comment

Recent Comments

Popular Matlab Topics

Share your knowledge - help others

Crazy over Matlab Projects ? - Join Now - Follow Me

Sites U Missed to Visit ?

Related Posts Plugin for WordPress, Blogger...

Latest Articles

Special Search For Matlab Projects

MATLAB PROJECTS

counter

Bharadwaj. Powered by Blogger.