# ITD algorithm equation for sound source localization

Started by May 1, 2007
```Hi
In the ITD algorithm for sound source localization,there is an equation
that needs to be solved for angle of arrival

a = d sin(theta) + d*theta

cover to reach distant ear(compared to the near ear).

My question is,if know 'a' and 'd',how we can implement the above equation
to have unique value of theta(angle of arrival).Any MATLAB tool for
implementing the equation as LSE etc?

Regards
Sylvia

_____________________________________
Do you know a company who employs DSP engineers?
Is it already listed at http://dsprelated.com/employers.php ?
```
```On 1 May, 14:51, "Sylvia" <sylvia.za...@gmail.com> wrote:
> Hi
> In the ITD algorithm for sound source localization,there is an equation
> that needs to be solved for angle of arrival
>
> a = d sin(theta) + d*theta
>
> cover to reach distant ear(compared to the near ear).
>
> My question is,if know 'a' and 'd',how we can implement the above equation
> to have unique value of theta(angle of arrival).

Eh... how did you derive your equation? As far as I can tell, the
d*sin(theta) term is the difference in slant range between the two
ears and a source in the far field. What is the d*theta term? A wave
propagating along the circumference of the head?

That confusion aside, it seems to me that your problem is somewhat
awkwardly posed. I can't really see how it is possible to know a and
d
without also knowing theta. If I am correct in this (but I am by no
means I am), you have one equation with two unknowns, a and theta.
Those sorts of things have never been easy to solve...

Rune

```
```>On 1 May, 14:51, "Sylvia" <sylvia.za...@gmail.com> wrote:
>> Hi
>> In the ITD algorithm for sound source localization,there is an
equation
>> that needs to be solved for angle of arrival
>>
>> a = d sin(theta) + d*theta
>>
to
>> cover to reach distant ear(compared to the near ear).
>>
>> My question is,if know 'a' and 'd',how we can implement the above
equation
>> to have unique value of theta(angle of arrival).
>
>Eh... how did you derive your equation? As far as I can tell, the
>d*sin(theta) term is the difference in slant range between the two
>ears and a source in the far field. What is the d*theta term? A wave
>propagating along the circumference of the head?
>
>That confusion aside, it seems to me that your problem is somewhat
>awkwardly posed. I can't really see how it is possible to know a and
>d
>without also knowing theta. If I am correct in this (but I am by no
>means I am), you have one equation with two unknowns, a and theta.
>Those sorts of things have never been easy to solve...
>
>Rune
>
>
Yes the d*theta is distance along the arc of the circle.
We calculate 'a' from the ITD as

a=c*ITD

ITD is the interaural time delay,which we calculate by correlating the two
microphone signals.
c is the speed of sound.

so there is only one unknown in the equation that is theta

_____________________________________
Do you know a company who employs DSP engineers?
Is it already listed at http://dsprelated.com/employers.php ?
```
```On May 2, 1:46 pm, Rune Allnor <all...@tele.ntnu.no> wrote:
> On 1 May, 14:51, "Sylvia" <sylvia.za...@gmail.com> wrote:
>
> > Hi
> > In the ITD algorithm for sound source localization,there is an equation
> > that needs to be solved for angle of arrival
>
> > a = d sin(theta) + d*theta
>
> > where d is radius of head and a is additional distance that sound has to
> > cover to reach distant ear(compared to the near ear).
>
> > My question is,if know 'a' and 'd',how we can implement the above equation
> > to have unique value of theta(angle of arrival).
>
> Eh... how did you derive your equation? As far as I can tell, the
> d*sin(theta) term is the difference in slant range between the two
> ears and a source in the far field. What is the d*theta term? A wave
>My question is,if know 'a' and 'd',how we can implement the above equation
>to have unique value of theta(angle of arrival).Any MATLAB tool for
>implementing the equation as LSE etc?

Hi,

You are not going to have a unique angle of arrival because this is a
line array, the angle of arrival will have an exact alias source at -
theta. In other words you to impose a physical limitation of the
source being located anywhere from 0 - 180 degress in order to have a
unique solution with line arrays.

If this is so, one way you can solve for this is using the expansion
of sine up to the degree of accuracy that you would like:

sin z= z- z^3/3! + z^5/5! - z^7/7! ...

using this and truncating it for a limited accuracy, you have

a/d = sin(theta) + theta = theta - theta^3/3! + theta^5/5! +theta =
2*theta - theta^3/3! + theta^5/5!

This polynomial can be written in a homogenous the form:

theta^5/5! - theta^3/3! + 2*theta  - a/d =0

or

x^5/5! - x^3/3! + 2*x  - a/d =0

So that the roots of this polynomial, which you can solve, corresponds
to your solution (see the matlab function ROOTS).
You should only consider roots that fall within the 0-pi/2 or a
multiple of it for valid solution given the requirement for uniqueness
of the angle of arrival...

There might be easier ways than that (ie, see MUSIC and beamforming),
but this is one way I can think that uses your equation....

```
```On May 1, 8:51 am, "Sylvia" <sylvia.za...@gmail.com> wrote:
>
> In the ITD algorithm for sound source localization,there is an equation
> that needs to be solved for angle of arrival
>
> a = d*sin(theta) + d*theta
>
> cover to reach distant ear (compared to the near ear).
>
> My question is,if know 'a' and 'd',how we can implement the above equation
> to have unique value of theta(angle of arrival).  Any MATLAB tool for
> implementing the equation as LSE etc?

so you want a mapping of theta as a function of 'a' (and 'd', but i
get the feeling that paratmeter might be fixed) ?  i've had to do icky
stuff like that.  and it's hard to get a decently low enough order
power series that will fit well over the entire ranges of 'a' and 'd'.

it think, especially that the inverses of odd-symmetry functions are
also odd symmetry.  so neither have even order terms.  i think, but
can't say for sure, that the Nth derivatives (at 'a' or 'theta') of
the two inverse functions (of each other) are reciprocals.  but i
think that's the case (wouldn't mind if someone checked that).

so you can construct a power series from that.  dunno how good it is.

r b-j

```