I want to simulate using matlab a scenario where an acoustic sound source is localize using 2 microphones using triangulation. I have read there are so many ways of doing this, so I would like to know if anyone has experience in the mathematics involved in solving this.
If you really mean to triangulate, then three mic's are needed.
In case there are echoes, then perhaps two mic's can capture them. Then you might apply sophisticated algorithms, and get some kind of information regarding distance, etc.
I have been reading some literature on IEEE about this and I believe they are more advance algorithms than I actually need for now. Do you have any links for the math that is involved in doing a simple triangulation with 3 microphones. My aim is to simulate using matlab.
For two mic's you would measure the time difference, then plot all possible sources which could generate that difference.
The grid is 100 x 100. Every point was examined. Its distance to mic B was compared to its distance to mic A. This represents the time delay.
If the time delay was a certain amount, the point was plotted.
The plot forms a curve known as a parabola. (In Grapher which comes with Mac OS, the equation is r=1-x.)
Do the same thing for mic A-C and B-C. Find the point where all three plots intersect. That is the source.
There are probably mathematical routes to do the same thing, using sines, tangents, etc. It would need fuzzy logic, I imagine. It seemed easier the way I did it, programming in BASIC.
If you have two directive mics you can locate the source. First rotate the mic1 to get the maximum received amplitude, the rotate mic2 to do the same. Now knowing the angle of both mics with respect to an arbitrary, but common, reference line you can estimate the position of the source as the intersection between the two lines having angular coefficient given by the measured angle and direction equal of that of the maximum gain of the mic.