How can I determine sound direction using stereo signal phase shift?

In summary, the conversation discusses the process of building a sound direction localising subsystem for a robot using two microphones placed a distance apart. The two options mentioned are phase shift detection and a neural simulation of interaural time detection (ITD). The conversation delves into the technicalities of measuring sound arrival time difference and achieving this electronically. It also mentions the use of a specific IC and suggests reviewing the Blumlien stereo patents or using trigonometry to relate time difference (ITD) to azimuth direction. The conversation also mentions the use of a cross-correlation function and suggests comp.dsp as a good newsgroup for further discussion on this topic.
  • #1
keithmarsh
4
0
Hello everybody. I'm trying to build a sound direction localising subsystem for a robot.
I have two microphones placed a distance apart. I'm not worried about sounds behind or the distance, just the direction.

I see two choices. Phase shift detection or a neural sim of interaural time detection (ITD).

Because sound travels at a fairly slow speed, the difference that sound arrives between two mics can be measured. The phase of the sound at the furthest mic will lag behind the near one. By measuring the phase lag, the sound direction can be calculated. The italic bit is the fun bit.

Because we're not measuring a spike that can be easily measured, but a complex mish mash of frequencies, there's no landmark sound to trigger things. I guess I have to process the sound to its component frequencies, then look for the matching set to appear on the other channel constantly for a given time. And vice-versa. Eek. Lots of Fourier transforms and maths. Is anyone aware of an IC that's been produced to achieve this? Or a better way?

The second choice is to mimic how we do it. I'm reading a few papers on this at the moment, but none are really helping me get the basic physiology of animal aural processing. I think we use hairs as bandpass filters to roughly achieve the FTs as above, but I'm not sure of the time comparison process. And less sure of how I can electronically do this.

Soooo, this is one of those parts of a project that is proving a mountain to solve. If I can do it without loads of microcontroller code, great. I'm really hoping there's a blindingly obvious solution involving two 555s that'll do it, but I'm not holding my breath :-)

Any advice/references gratefully received.
 
Engineering news on Phys.org
  • #2
to relate time difference (ITD) to azimuth direction, you need to review the Blumlien stereo patents. (or just do a little trigonometry. assume no head shadowing, but that you know the inter-aural spacing.)

to get the ITD you want to compute the "cross-correlation" between the signals of the two microphones:

[tex] R_{lr}(\tau) = \int (x_l(t) x_r(t-\tau)) w(t) dt [/tex]

where [itex]w(t){/itex] is a window function.

if you're doing this with a DSP (or some other real-time processor), then the above integral is a summation and the signals are discrete-time. and the offset lag [itex]\tau[/itex] is also an integer number of samples.

if you like USENET, comp.dsp is a good newsgroup for this question.
 
  • #3
Many thanks for your response. I came across this [ oh can't post URLs ] analog.com/en/prod/0,,770_847_AD8302,00.html beasty in my search last night. Looks very interesting. When I get my hands on one too evaluate, I'll report back.
 
  • #4
rbj said:
to relate time difference (ITD) to azimuth direction, you need to review the Blumlien stereo patents. (or just do a little trigonometry. assume no head shadowing, but that you know the inter-aural spacing.)

to get the ITD you want to compute the "cross-correlation" between the signals of the two microphones:

[tex] R_{lr}(\tau) = \int (x_l(t) x_r(t-\tau)) w(t) dt [/tex]

where [itex]w(t)[/itex] is a window function.

if you're doing this with a DSP (or some other real-time processor), then the above integral is a summation and the signals are discrete-time. and the offset lag [itex]\tau[/itex] is also an integer number of samples.

if you like USENET, comp.dsp is a good newsgroup for this question.

i tried to fix this last night, by the PF server was acting very badly. above is what i meant.
 

1. What is stereo signal phase shift?

Stereo signal phase shift refers to the difference in timing between the left and right audio channels in a stereo sound system. It can be caused by various factors such as differences in cable length or electronic components in the system.

2. How does stereo signal phase shift affect audio quality?

If the phase shift is significant, it can cause the audio to sound out of balance and unnatural. This can result in a loss of clarity, depth, and overall quality of the sound.

3. How can I detect stereo signal phase shift?

You can detect stereo signal phase shift by using a phase meter or a stereo imaging tool, which will show the differences in timing between the two channels. You can also listen for any anomalies in the sound, such as a lack of stereo width or a thin, hollow sound.

4. Can stereo signal phase shift be corrected?

Yes, stereo signal phase shift can be corrected. One way is to adjust the phase of one of the channels using an audio processor or software. Alternatively, you can physically adjust the position of the speakers or components in the system to minimize the phase shift.

5. How can I prevent stereo signal phase shift?

To prevent stereo signal phase shift, it is important to use high-quality cables and components that are properly matched and have the same length. It is also important to regularly check and calibrate the system to ensure that everything is in proper working order.

Similar threads

  • Electrical Engineering
Replies
1
Views
969
Replies
6
Views
1K
  • Programming and Computer Science
Replies
4
Views
1K
  • Electrical Engineering
Replies
4
Views
2K
  • Electrical Engineering
Replies
1
Views
1K
Replies
20
Views
1K
  • Electrical Engineering
Replies
1
Views
5K
  • Electrical Engineering
Replies
15
Views
5K
  • Electrical Engineering
Replies
1
Views
3K
  • Introductory Physics Homework Help
Replies
3
Views
1K
Back
Top