Forums

sound source localization using electret microphone array

Started by matar770 July 21, 2014
i want to use an electret microphone array to locate a sound sorce
(actually its the direction of arrival) , im using  Steered Response Power
- Phase Transform (SRP-PHAT) algorithm, and i'm confused about a few
things:

1.my array consists of five microphones but i dont know which configuration
is easier to use to obtain the DOA in 3D, the tetrahydron or the square
pyramid ? 

2.its my first hardware project, i dont know how to connect them to the
Raspberry Pi im using and i dont know also if i need amplification to their
signals before the ADC or not?





	 

_____________________________		
Posted through www.DSPRelated.com
On Mon, 21 Jul 2014 10:07:20 -0500, matar770 wrote:

> i want to use an electret microphone array to locate a sound sorce > (actually its the direction of arrival) , im using Steered Response > Power - Phase Transform (SRP-PHAT) algorithm, and i'm confused about a > few things: > > 1.my array consists of five microphones but i dont know which > configuration is easier to use to obtain the DOA in 3D, the tetrahydron > or the square pyramid ? > > 2.its my first hardware project, i dont know how to connect them to the > Raspberry Pi im using and i dont know also if i need amplification to > their signals before the ADC or not?
1: Well, a tetrahedron leaves you with the problem of where to put the fifth microphone, since it only has four vertexes. Do you mean a triangular bipyramid? I suspect that if you have the freedom to arrange the points as you wish, that it's a six of one, half dozen of the other sort of answer. 2: sci.electronics.basics is a good place to ask this question. It depends on the requirements of the Raspberry Pi analog inputs, but I suspect that you need to power the microphones through a resistor, then capacitively couple them to the ADC inputs, possibly with a bias network on the inputs to hold them at mid range when there's no audio. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
On 7/21/14 1:56 PM, Tim Wescott wrote:
> On Mon, 21 Jul 2014 10:07:20 -0500, matar770 wrote: > >> i want to use an electret microphone array to locate a sound sorce >> (actually its the direction of arrival) , im using Steered Response >> Power - Phase Transform (SRP-PHAT) algorithm, and i'm confused about a >> few things: >> >> 1.my array consists of five microphones but i dont know which >> configuration is easier to use to obtain the DOA in 3D, the tetrahydron >> or the square pyramid ? >> >> 2.its my first hardware project, i dont know how to connect them to the >> Raspberry Pi im using and i dont know also if i need amplification to >> their signals before the ADC or not?
well, that is what spec sheets are for. find out what the voltages your A/D (or whatever the input to the Raspberry Pi is), what voltages and impedance come from your electret mics. a preamp or instrumentation amp is not hard to design and build outa op-amps.
> > 1: Well, a tetrahedron leaves you with the problem of where to put the > fifth microphone, since it only has four vertexes.
the 5th microphone is redundant. 4 mics, in a tetrahedron suffice to localize a source in all 3 dimensions.
>
-- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Mon, 21 Jul 2014 10:07:20 -0500, "matar770"
<100892@dsprelated> wrote:

>i want to use an electret microphone array to locate a sound sorce >(actually its the direction of arrival) , im using Steered Response Power >- Phase Transform (SRP-PHAT) algorithm, and i'm confused about a few >things: > >1.my array consists of five microphones but i dont know which configuration >is easier to use to obtain the DOA in 3D, the tetrahydron or the square >pyramid ? > >2.its my first hardware project, i dont know how to connect them to the >Raspberry Pi im using and i dont know also if i need amplification to their >signals before the ADC or not?
I've never used a Raspberry Pi, but I understand that it does not include an A/D. The examples I see on the Web that use a separate A/D are all for "slow" things like temperature. Are you sure you can sample 5 channels fast enough? I haven't examined everything that's out there, but note that most multi-channel A/Ds use multiplexed inputs to a single hardware A/D. They will have definite limits on how fast you can sample 5 separate channels. That could likewise limit your ability to measure sound source direction. At a minimum, you'd need to correct your phased array for the inter-channel lag. I think the lag would need to be much less than one cycle of the source frequency for this to work at all. Best regards, Bob Masta DAQARTA v7.60 Data AcQuisition And Real-Time Analysis www.daqarta.com Scope, Spectrum, Spectrogram, Sound Level Meter Frequency Counter, Pitch Track, Pitch-to-MIDI FREE Signal Generator, DaqMusiq generator Science with your sound card!
On Tue, 22 Jul 2014 00:56:41 -0400, robert bristow-johnson wrote:

> On 7/21/14 1:56 PM, Tim Wescott wrote: >> On Mon, 21 Jul 2014 10:07:20 -0500, matar770 wrote: >> >>> i want to use an electret microphone array to locate a sound sorce >>> (actually its the direction of arrival) , im using Steered Response >>> Power - Phase Transform (SRP-PHAT) algorithm, and i'm confused about a >>> few things: >>> >>> 1.my array consists of five microphones but i dont know which >>> configuration is easier to use to obtain the DOA in 3D, the >>> tetrahydron or the square pyramid ? >>> >>> 2.its my first hardware project, i dont know how to connect them to >>> the Raspberry Pi im using and i dont know also if i need amplification >>> to their signals before the ADC or not? > > well, that is what spec sheets are for. find out what the voltages your > A/D (or whatever the input to the Raspberry Pi is), what voltages and > impedance come from your electret mics. a preamp or instrumentation amp > is not hard to design and build outa op-amps. > > >> 1: Well, a tetrahedron leaves you with the problem of where to put the >> fifth microphone, since it only has four vertexes. > > the 5th microphone is redundant. 4 mics, in a tetrahedron suffice to > localize a source in all 3 dimensions.
Sometimes redundant information is good. I have no idea if that's the case here, but I suspect that if there's noise or distortion it may be -- assuming you know what to do about it. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
On 7/22/14 5:47 PM, Tim Wescott wrote:
> On Tue, 22 Jul 2014 00:56:41 -0400, robert bristow-johnson wrote: > >> On 7/21/14 1:56 PM, Tim Wescott wrote: >>> On Mon, 21 Jul 2014 10:07:20 -0500, matar770 wrote: >>> >>>> i want to use an electret microphone array to locate a sound sorce >>>> (actually its the direction of arrival) , im using Steered Response >>>> Power - Phase Transform (SRP-PHAT) algorithm, and i'm confused about a >>>> few things: >>>> >>>> 1.my array consists of five microphones but i don't know which >>>> configuration is easier to use to obtain the DOA in 3D, the >>>> tetrahydron or the square pyramid ? >>>> >>>> 2.its my first hardware project, i dont know how to connect them to >>>> the Raspberry Pi im using and i dont know also if i need amplification >>>> to their signals before the ADC or not? >> >> well, that is what spec sheets are for. find out what the voltages your >> A/D (or whatever the input to the Raspberry Pi is), what voltages and >> impedance come from your electret mics. a preamp or instrumentation amp >> is not hard to design and build outa op-amps. >> >> >>> 1: Well, a tetrahedron leaves you with the problem of where to put the >>> fifth microphone, since it only has four vertexes. >> >> the 5th microphone is redundant. 4 mics, in a tetrahedron suffice to >> localize a source in all 3 dimensions. > > Sometimes redundant information is good. I have no idea if that's the > case here, but I suspect that if there's noise or distortion it may be -- > assuming you know what to do about it. >
sometimes it is. but it's solving 4 equations for 3 unknowns. you need to make a best fit somehow. i think MATLAB does that with their "\" operator. dunno how they do it. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Tue, 22 Jul 2014 21:29:06 -0400, robert bristow-johnson wrote:

> On 7/22/14 5:47 PM, Tim Wescott wrote: >> On Tue, 22 Jul 2014 00:56:41 -0400, robert bristow-johnson wrote: >> >>> On 7/21/14 1:56 PM, Tim Wescott wrote: >>>> On Mon, 21 Jul 2014 10:07:20 -0500, matar770 wrote: >>>> >>>>> i want to use an electret microphone array to locate a sound sorce >>>>> (actually its the direction of arrival) , im using Steered Response >>>>> Power - Phase Transform (SRP-PHAT) algorithm, and i'm confused about >>>>> a few things: >>>>> >>>>> 1.my array consists of five microphones but i don't know which >>>>> configuration is easier to use to obtain the DOA in 3D, the >>>>> tetrahydron or the square pyramid ? >>>>> >>>>> 2.its my first hardware project, i dont know how to connect them to >>>>> the Raspberry Pi im using and i dont know also if i need >>>>> amplification to their signals before the ADC or not? >>> >>> well, that is what spec sheets are for. find out what the voltages >>> your A/D (or whatever the input to the Raspberry Pi is), what voltages >>> and impedance come from your electret mics. a preamp or >>> instrumentation amp is not hard to design and build outa op-amps. >>> >>> >>>> 1: Well, a tetrahedron leaves you with the problem of where to put >>>> the fifth microphone, since it only has four vertexes. >>> >>> the 5th microphone is redundant. 4 mics, in a tetrahedron suffice to >>> localize a source in all 3 dimensions. >> >> Sometimes redundant information is good. I have no idea if that's the >> case here, but I suspect that if there's noise or distortion it may be >> -- >> assuming you know what to do about it. >> >> > sometimes it is. but it's solving 4 equations for 3 unknowns. you need > to make a best fit somehow. i think MATLAB does that with their "\" > operator. dunno how they do it.
I don't know how Scilab does it, but it works reasonably well. Sometimes I can do better using singular value decomposition. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
>> i think MATLAB does that with their "\" operator. dunno how they do
it. Should give the same as the Moore-Penrose pseudoinverse. I usually use "pinv()" instead. I remember the magic backslash has some added functionality when the linear equation system is underdetermined, but that is not the case here. _____________________________ Posted through www.DSPRelated.com
On Wednesday, July 23, 2014 6:49:11 AM UTC-4, mnentwig wrote:
> >> i think MATLAB does that with their "\" operator. dunno how they do > it. > > Should give the same as the Moore-Penrose pseudoinverse. I usually use > "pinv()" instead. > I remember the magic backslash has some added functionality when the linear > equation system is underdetermined, but that is not the case here. > > Posted through www.DSPRelated.com
In matlab the \ operator as in x=A\b gives the solution to Ax=b in a least squares sense - for under-determined systems the solution vector will have at most K non-zero entires, where rank(A) =K. pinv = is the pseudo inverse and is based on the SVD. Dave
On Tuesday, July 22, 2014 3:07:20 AM UTC+12, matar770 wrote:
> i want to use an electret microphone array to locate a sound sorce > > (actually its the direction of arrival) , im using Steered Response Power > > - Phase Transform (SRP-PHAT) algorithm, and i'm confused about a few > > things: > > > > 1.my array consists of five microphones but i dont know which configuration > > is easier to use to obtain the DOA in 3D, the tetrahydron or the square > > pyramid ? > > > > 2.its my first hardware project, i dont know how to connect them to the > > Raspberry Pi im using and i dont know also if i need amplification to their > > signals before the ADC or not? > > > > > > > > > > > > > > > > _____________________________ > > Posted through www.DSPRelated.com
Phat algorithm is ok but it only gives you the delays. What algorithm are you using to find the location. There are a great many in the literature and rely on non-linear least squares and the like. Your system is over-determined with 5 mics of course, you only need 4 for x,y,z. I wonder if a Pi is fast enough even. I suppose it need not be in real time.