# 0.3 Matlab simulation of audio localization

 Page 1 / 1
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})=2\sin (t+\frac{{}_{1}+{}_{2}-({}_{1}+{}_{2})}{2})\cos \left(\frac{{}_{1}-{}_{2}-({}_{1}+{}_{2})}{2}\right)$
shows that the sum of two sinusoids that are out of phase is just another sinusoid with an amplitudedirectly related to the phase difference. Our goal is to adjust the phase difference by adding time delays to theincoming 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 fromwhich direction the signals originated.

Since we are working with discrete-time signals, the time delays we tried were limited by the sampling frequency of theDSP boards, which is 48 kHz. By dividing the desired time delay by that sampling period and rounding to the nearestinteger, 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 ofcreativity in finding the amplitude of the summed sinusoids. We experimented with two methods to accomplish that task. Wewill call the first method "amplitude extraction," and the second "signal integration."

A flow diagram for the amplitude extraction method is shown in . 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 amplitudeinformation. This algorithm has the obvious disadvantage that it is dependent on knowing the frequency of the incomingsignal so that the correct w is used in the multiplication step. In spite of that, we were originally selected it forimplementation on the DSP board because it showed extremely robust performance in the presence of loud noise. Addinggaussian white noise with a variance of 1 to a signal in the range $\left[-1 , 1\right]$ had no affect on the performance of the beamformer in our Matlab simulation. Unfortunently, the algorithm is tooslow to be used in real time. Evaluating two low-pass filters for every time delay combination tried was simply notpractical.

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 onecycle of the incoming signal. The sum is similar to an integral over one period of the signal, except that thesamples aren't multiplied by the sampling period to make an "area." Our matlab simulation showed that the algorithm shouldwork, 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 useddefaulted to recording from the microphone input (which is mono) instead of the line-in input, and we didn't haveadministrator access to change the settings.

how can chip be made from sand
are nano particles real
yeah
Joseph
Hello, if I study Physics teacher in bachelor, can I study Nanotechnology in master?
no can't
Lohitha
where we get a research paper on Nano chemistry....?
nanopartical of organic/inorganic / physical chemistry , pdf / thesis / review
Ali
what are the products of Nano chemistry?
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
learn
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
learn
da
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Bhagvanji
hey
Giriraj
Preparation and Applications of Nanomaterial for Drug Delivery
revolt
da
Application of nanotechnology in medicine
has a lot of application modern world
Kamaluddeen
yes
narayan
what is variations in raman spectra for nanomaterials
ya I also want to know the raman spectra
Bhagvanji
I only see partial conversation and what's the question here!
what about nanotechnology for water purification
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
Nasa has use it in the 60's, copper as water purification in the moon travel.
Alexandre
nanocopper obvius
Alexandre
what is the stm
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
Hafiz
what is Nano technology ?
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!