I am using an array of 4 microphones in a square formation. My goal is to estimate the direction (azimuth only) of incoming speech sound.

The array looks like this:

(I'm really sorry you had to see this)

I have recordings from the array to test my code with.

To estimate the delays between two microphone signals, I use cross-correlation method. This step is working for me and I've tested it somewhat thoroughly.

I am currently using delay values between $x1$ and $x2$, $x2$ and $x3$, and $x3$ and $x4$.

(Sorry again)

From the delays in samples, I calculate the azimuth angles of incoming sound between two microphones each using the arcus sine and the distance between the microphones. I get angles between $\pm\frac{\pi}{2}$. I am somewhat certain this step is working correctly too.

The next thing I do is mirroring the angles of either the first ($x1,x2$) or the third ($x3,x4$) combination based on whether the second angle (from $x2,x3$) is positive or negative.

(really sorry)

From this, I should have the directions of the incoming sound, relative to the direction of $x2,x3$ being the front (right side of array in the picture).

To get the result of my DoA estimation, i add 90 degrees or $\pi/2$ to the second and 180 degrees or $\pi$ to the third angle. Now, all angles should point somewhat into the same direction, in my opinion, but it is not working.

Where is my mistake? I would really appreciate if someone could point out my error(s).

  • $\begingroup$ Can I please ask if you are you looking for DoA generally or DoA in this specific way? $\endgroup$
    – A_A
    Commented Mar 13, 2018 at 16:42
  • $\begingroup$ I'd rather use this specific way, but I am also open for new ideas ;) $\endgroup$ Commented Mar 13, 2018 at 16:45
  • 1
    $\begingroup$ @JonasSchwarz, just realized there's a blindingly simple solution to this, check out my edit. $\endgroup$
    – Guest
    Commented Mar 25, 2018 at 12:32
  • $\begingroup$ Wow, that is really cool! Thanks for letting me know! $\endgroup$ Commented Mar 26, 2018 at 14:23

1 Answer 1


The mistake could be in assuming you know which angle $a$ to use when you don't know if the source is in front of or behind the array yet. In other words, you need to solve the same problem for $a$ that you're solving for $b$.

For your approach to work, you need to make sure side $a$ is the closest side to the source. You could find the closest side by finding the pair of mics where the maximum arrival time of the pair is less than the minimum arrival time of the opposite pair. This beam points outward, and the beam on the opposite side points inward. Only one pair of mics will meet those conditions at a time.

Also note that your approach for choosing which angle to use for $b$ only works if you consider the whole array as a single point (the distance between the mics relative to the distance to the source is vanishingly small). Otherwise, if the source is between the middle of side $a$ and one of $a$'s mics on the same axis as side $a$, angle $b$ will point the wrong way.

Instead of doing it like that, you might look at solutions using more than two mics at once.

An approach recently suggested here uses three equidistant mics and takes the cross product of the vectors pointing from one mic to another, with vectors having an additional component for the time difference.

Here's a really simple solution based on that, using axis-aligned diagonal mic pairs. Set your mics up like this:

    1   2

The time delta between mics 1 and 2 is the X component of a vector towards the source, and the time delta between mics 3 and 4 is the Y component. Check it out here.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.