Started by February 17, 2009
```As part of my college engineering thesis, I have been assigned the task of
identifying and locating sounds using MATLAB. So far, all I have is a
two-microphone set-up, which comprises the audio signal for analysis. This
is split up into two vectors in matlab, and using the time delay
information, I need to be able to locate the sound. I've done a fairly
basic frequency analysis just to get some background information on the
sound, but now I need to output the distance and angle as answers! Any
information would be greatly appreciated, as all of the resources on the
internet tend to go into advanced acoustic theory which is way over my

```
```staplep wrote:
> As part of my college engineering thesis, I have been assigned the task of
> identifying and locating sounds using MATLAB. So far, all I have is a
> two-microphone set-up, which comprises the audio signal for analysis. This
> is split up into two vectors in matlab, and using the time delay
> information, I need to be able to locate the sound. I've done a fairly
> basic frequency analysis just to get some background information on the
> sound, but now I need to output the distance and angle as answers! Any
> information would be greatly appreciated, as all of the resources on the
> internet tend to go into advanced acoustic theory which is way over my

Location is usually accomplished by measuring the difference between the
delays of pairs of signals. Barring reflections that will create
difficulties in practice, a particular delay between the two microphone
signals locates the source along a hyperbola. (Each microphone is a
focus) Usually, at least three microphones are employed so that at least
two pairs can be used and tow (or more) hyperbolas can be calculated.
the source is at the intersection of the hyperbolas.

Do you have control over the sound? If so, you can also measure absolute
delay, which defines two arcs, either of which can serve as the
intersecting curve. Using both and comparing the results can be
fruitful. At best, the curves intersect at a point. Usually, they define
a triangular region. If all measurements are equally accurate, the "best
guess" is the centroid of that region.

Note that all these curved coordinate systems have two intersections.
With three microphones it is sometimes possible to resolve the resulting
ambiguity.

How did you come to be assigned this project in ignorance of these basics?

Jerry
--
Engineering is the art of making what you want from things you can get.
&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
```
```On Tue, 17 Feb 2009 08:24:06 -0600, staplep wrote:

> As part of my college engineering thesis, I have been assigned the task
> of identifying and locating sounds using MATLAB. So far, all I have is a
> two-microphone set-up, which comprises the audio signal for analysis.
> This is split up into two vectors in matlab, and using the time delay
> information, I need to be able to locate the sound. I've done a fairly
> basic frequency analysis just to get some background information on the
> sound, but now I need to output the distance and angle as answers! Any
> information would be greatly appreciated, as all of the resources on the
> internet tend to go into advanced acoustic theory which is way over my

"Thesis" implies that you have to do some independent research, possibly
in areas that you have not yet been trained up in.  They're asking you to
do this because that's what you have to do in the real world of
engineering -- take everything you know, learn unfamiliar new stuff that
you didn't know before, and put it all together into something that works.

So it could be that part of what's expected of you is to know how to
research the necessary acoustic theory on your own, and to know just how
much you really need to learn to get the job done.

Not knowing how much care your university puts into this I can't know how
four likely possibilities of what may happen: one, he or she is waiting
guidance); two, he or she is severely overworked, and can't help (in
which case you picked the wrong school, and we'll try to help); three, he
or she isn't interested in doing his/her job and _won't_ help (in which
case you or your school picked the wrong prof, and you may be able to
switch); finally, you're being too needy, and your prof is trying to push
you out of your comfort zone so you'll succeed in the real world (this
friends, and review my comment about the word "thesis").

Have you tried just starting from the speed of sound in air and the
assumption that you don't have to worry about reflections from walls, and
see if you can work it out for yourself?  Even if you're expected to make
it work in a small room with bad echoes, starting with making it work in
a no-reflection environment would be a very good warm up exercise.

As to your search for information on acoustics on the web:  Go to your
university library.  As a warm up exercise, look up the word "irony" in
the reference section.  Then head up to the engineering floor, and look
for the section on acoustics -- if your school even remotely supports its
thesis students, you'll find enough information there to choke Einstein
-- your job will be to find a basic text (perhaps even a section of a
physics book) and learn enough to get the task done.

--
http://www.wescottdesign.com
```
```Tim Wescott wrote:
> On Tue, 17 Feb 2009 08:24:06 -0600, staplep wrote:
>
>> As part of my college engineering thesis, I have been assigned the task
>> of identifying and locating sounds using MATLAB. So far, all I have is a
>> two-microphone set-up, which comprises the audio signal for analysis.
>> This is split up into two vectors in matlab, and using the time delay
>> information, I need to be able to locate the sound. I've done a fairly
>> basic frequency analysis just to get some background information on the
>> sound, but now I need to output the distance and angle as answers! Any
>> information would be greatly appreciated, as all of the resources on the
>> internet tend to go into advanced acoustic theory which is way over my
>
> "Thesis" implies that you have to do some independent research, possibly
> in areas that you have not yet been trained up in.  They're asking you to
> do this because that's what you have to do in the real world of
> engineering -- take everything you know, learn unfamiliar new stuff that
> you didn't know before, and put it all together into something that works.

...

> As to your search for information on acoustics on the web:  Go to your
> university library.  As a warm up exercise, look up the word "irony" in
> the reference section.  Then head up to the engineering floor, and look
> for the section on acoustics -- if your school even remotely supports its
> thesis students, you'll find enough information there to choke Einstein
> -- your job will be to find a basic text (perhaps even a section of a
> physics book) and learn enough to get the task done.

Keep in mind that the problem as stated (no mention was made of
controlling the sound) can't be solved with only two microphones.

Jerry
--
Engineering is the art of making what you want from things you can get.
&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
```
```On 17 Feb, 19:35, Jerry Avins <j...@ieee.org> wrote:
> Tim Wescott wrote:
> > On Tue, 17 Feb 2009 08:24:06 -0600, staplep wrote:
>
> >> As part of my college engineering thesis, I have been assigned the task
> >> of identifying and locating sounds using MATLAB. So far, all I have is a
> >> two-microphone set-up, which comprises the audio signal for analysis.
> >> This is split up into two vectors in matlab, and using the time delay
> >> information, I need to be able to locate the sound. I've done a fairly
> >> basic frequency analysis just to get some background information on the
> >> sound, but now I need to output the distance and angle as answers! Any
> >> information would be greatly appreciated, as all of the resources on the
> >> internet tend to go into advanced acoustic theory which is way over my

> > "Thesis" implies that you have to do some independent research, possibly
> > in areas that you have not yet been trained up in. &#2013266080;They're asking you to
> > do this because that's what you have to do in the real world of
> > engineering -- take everything you know, learn unfamiliar new stuff that
> > you didn't know before, and put it all together into something that works.
>
> &#2013266080; &#2013266080;...
>
> > As to your search for information on acoustics on the web: &#2013266080;Go to your
> > university library. &#2013266080;As a warm up exercise, look up the word "irony" in
> > the reference section. &#2013266080;Then head up to the engineering floor, and look
> > for the section on acoustics -- if your school even remotely supports its
> > thesis students, you'll find enough information there to choke Einstein
> > -- your job will be to find a basic text (perhaps even a section of a
> > physics book) and learn enough to get the task done.
>
> Keep in mind that the problem as stated (no mention was made of
> controlling the sound) can't be solved with only two microphones.

But this would fit nicely into Tim's framework: The OP needs
to find out the limitations of the tools at hand, and either
confine the problem to what can be dealt with with these tools,
or find out what tools are needed to get the stated job done.

Not entirely unfamiliar questions in the world outside academia...

Rune
```
```Rune Allnor wrote:
> On 17 Feb, 19:35, Jerry Avins <j...@ieee.org> wrote:
>> Tim Wescott wrote:
>>> On Tue, 17 Feb 2009 08:24:06 -0600, staplep wrote:
>>>> As part of my college engineering thesis, I have been assigned the task
>>>> of identifying and locating sounds using MATLAB. So far, all I have is a
>>>> two-microphone set-up, which comprises the audio signal for analysis.
>>>> This is split up into two vectors in matlab, and using the time delay
>>>> information, I need to be able to locate the sound. I've done a fairly
>>>> basic frequency analysis just to get some background information on the
>>>> sound, but now I need to output the distance and angle as answers! Any
>>>> information would be greatly appreciated, as all of the resources on the
>>>> internet tend to go into advanced acoustic theory which is way over my
>
>>> "Thesis" implies that you have to do some independent research, possibly
>>> in areas that you have not yet been trained up in.  They're asking you to
>>> do this because that's what you have to do in the real world of
>>> engineering -- take everything you know, learn unfamiliar new stuff that
>>> you didn't know before, and put it all together into something that works.
>>    ...
>>
>>> As to your search for information on acoustics on the web:  Go to your
>>> university library.  As a warm up exercise, look up the word "irony" in
>>> the reference section.  Then head up to the engineering floor, and look
>>> for the section on acoustics -- if your school even remotely supports its
>>> thesis students, you'll find enough information there to choke Einstein
>>> -- your job will be to find a basic text (perhaps even a section of a
>>> physics book) and learn enough to get the task done.
>> Keep in mind that the problem as stated (no mention was made of
>> controlling the sound) can't be solved with only two microphones.
>
> But this would fit nicely into Tim's framework: The OP needs
> to find out the limitations of the tools at hand, and either
> confine the problem to what can be dealt with with these tools,
> or find out what tools are needed to get the stated job done.
>
> Not entirely unfamiliar questions in the world outside academia...

If the OP was directed to accomplish the task, then it's reasonable to
expect him to determine what tools he needs. If his problem statement is
accurate, he was in fact, directed to do it with two microphones. I
think it is reasonable to expect him to waste time trying. Is that
appropriate?

Jerry
--
Engineering is the art of making what you want from things you can get.
&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
```
```On 17 Feb, 21:24, Jerry Avins <j...@ieee.org> wrote:
> Rune Allnor wrote:
> > On 17 Feb, 19:35, Jerry Avins <j...@ieee.org> wrote:
> >> Tim Wescott wrote:
> >>> On Tue, 17 Feb 2009 08:24:06 -0600, staplep wrote:
> >>>> As part of my college engineering thesis, I have been assigned the task
> >>>> of identifying and locating sounds using MATLAB. So far, all I have is a
> >>>> two-microphone set-up, which comprises the audio signal for analysis.
> >>>> This is split up into two vectors in matlab, and using the time delay
> >>>> information, I need to be able to locate the sound. I've done a fairly
> >>>> basic frequency analysis just to get some background information on the
> >>>> sound, but now I need to output the distance and angle as answers! Any
> >>>> information would be greatly appreciated, as all of the resources on the
> >>>> internet tend to go into advanced acoustic theory which is way over my
>
> >>> "Thesis" implies that you have to do some independent research, possibly
> >>> in areas that you have not yet been trained up in. &#2013266080;They're asking you to
> >>> do this because that's what you have to do in the real world of
> >>> engineering -- take everything you know, learn unfamiliar new stuff that
> >>> you didn't know before, and put it all together into something that works.
> >> &#2013266080; &#2013266080;...
>
> >>> As to your search for information on acoustics on the web: &#2013266080;Go to your
> >>> university library. &#2013266080;As a warm up exercise, look up the word "irony" in
> >>> the reference section. &#2013266080;Then head up to the engineering floor, and look
> >>> for the section on acoustics -- if your school even remotely supports its
> >>> thesis students, you'll find enough information there to choke Einstein
> >>> -- your job will be to find a basic text (perhaps even a section of a
> >>> physics book) and learn enough to get the task done.
> >> Keep in mind that the problem as stated (no mention was made of
> >> controlling the sound) can't be solved with only two microphones.
>
> > But this would fit nicely into Tim's framework: The OP needs
> > to find out the limitations of the tools at hand, and either
> > confine the problem to what can be dealt with with these tools,
> > or find out what tools are needed to get the stated job done.
>
> > Not entirely unfamiliar questions in the world outside academia...
>
> If the OP was directed to accomplish the task, then it's reasonable to
> expect him to determine what tools he needs. If his problem statement is
> accurate, he was in fact, directed to do it with two microphones. I
> think it is reasonable to expect him to waste time trying. Is that
> appropriate?

You can get *something* done with the available kit.
True, not everything as stated, but a little. I don't
think we ever got the scope of the thesis. Is this a
term project? MSc? PhD? Scope decides scale.

Rune
```
```This is an example of *HOW* to ask "homework question"
The OP:
1. stated that it was 'homework'
The OP then

Yepp - I tilt at windmills also/frequently ;)

staplep wrote:

> As part of my college engineering thesis, I have been assigned the task of
> identifying and locating sounds using MATLAB. So far, all I have is a
> two-microphone set-up, which comprises the audio signal for analysis. This
> is split up into two vectors in matlab, and using the time delay
> information, I need to be able to locate the sound. I've done a fairly
> basic frequency analysis just to get some background information on the
> sound, but now I need to output the distance and angle as answers! Any
> information would be greatly appreciated, as all of the resources on the
> internet tend to go into advanced acoustic theory which is way over my
>
>
```
```Tim Wescott wrote:
(snip)

> I can think of
> four likely possibilities of what may happen: one, he or she is waiting
> guidance); two, he or she is severely overworked, and can't help (in
> which case you picked the wrong school, and we'll try to help); three, he
> or she isn't interested in doing his/her job and _won't_ help (in which
> case you or your school picked the wrong prof, and you may be able to
> switch); finally, you're being too needy, and your prof is trying to push
> you out of your comfort zone so you'll succeed in the real world (this
> friends, and review my comment about the word "thesis").

There is also five:

Prof doesn't know, but would find the answer useful in his research.
(I will guess that women wouldn't try this.)  When they get the answer,
it will end up in a published paper with his name on it.

I have heard that this happens much more often that it should.

-- glen

```
```On Tue, 17 Feb 2009 14:15:31 -0700, Glen Herrmannsfeldt wrote:

> Tim Wescott wrote:
> (snip)
>
>> I can think of
>> four likely possibilities of what may happen: one, he or she is waiting
>> guidance); two, he or she is severely overworked, and can't help (in
>> which case you picked the wrong school, and we'll try to help); three,
>> he or she isn't interested in doing his/her job and _won't_ help (in
>> which case you or your school picked the wrong prof, and you may be
>> able to switch); finally, you're being too needy, and your prof is
>> trying to push you out of your comfort zone so you'll succeed in the
>> real world (this can be hard to tell from three from inside your own
>> "thesis").
>
> There is also five:
>
> Prof doesn't know, but would find the answer useful in his research. (I
> will guess that women wouldn't try this.)  When they get the answer, it
> will end up in a published paper with his name on it.
>
> I have heard that this happens much more often that it should.
>
> -- glen

(A) Oh yes she would.  They may put different faces on it, but I have no
doubt that women pull all the same dirty tricks as men.

(B) My (master's) thesis advisor was a guy, and that's exactly what _he_
did -- but he was entirely up front about it (and rather surprised when I
not only did what he asked, but did it with a 100% fresh design, instead
of the mostly-copy of a design he already had, that he wanted me to do).

--
http://www.wescottdesign.com
```