Estimating the direction of the sound

10 views (last 30 days)
Chris
Chris on 4 Jul 2022
Commented: Jonas on 6 Jul 2022
Hello
I have same wav files that i want to estimate roughly their direction.
Like read the wav files and due to the amplitude of each ear to estimate the direction that the sound in coming from exmp:(30 degrees,-30 degrees).
i want to import each binaural impulse response and roughly check what angle was the microphone positioned at and chech that the filename that i have given (angle) is correct in terms of the labelling.
if you guys have any related links or any ideas of how to implement let me know
  4 Comments
Jonas
Jonas on 4 Jul 2022
with Woodworth formula I mean e.g. this. The sound needs to travel longer to one ear compared to the other if the sound comes from the side.
the time difference can be read from the time difference which you can see if you plot both channels, this should be clearly visible if zoomed in. this time difference can the speed of sound can be used to calculate the angle of sound (or at least help with it :-) )
the functions finddelay() or xcorr() might be useful for this
if your files are too long, please cut a short part for us containing the onset and some following seconds
Jonas
Jonas on 6 Jul 2022
using level for estimation is more difficult, since the damping caused by the head is frequency dependent. Also the damping of air is frequency dependent, which adds up to the normal 1/r law. This all becomes more difficult when not beeing in the free field, when reflections are present. Thatsw why i guess using the ITD (interaural time difference) would be easier to start.
i want to import each binaural impulse response and roughly check what angle was the microphone positioned at and chech that the filename that i have given (angle) is correct in terms of the labelling.
do you have the binaural head impulse response of your head?

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 4 Jul 2022
I believe I made a demo for this in response to a similar question years ago. See attached demo.
% Uses fitnlm() to fit a non-linear model to determine likely location of an explosion.
% Here is the "polygon" - the place where artillery men perform their training. Let it have square form of 10x10 kilometres.
% Several seismic sensors are planted at the different points of this place. We know their coordinates exactly (they have built-in GPS).
% With this sensors it is possible to register the timestamp of all shell explosions occuring at the polygon.
% Since there is usually some distance between explosion point (let call it ground zero) and each of sensors, the timestamp registered by them is slighthly behind the time of the explosion itself. We assume that the "shake" of the ground travels (or propagates) with the constant (but unknown) speed through the soil.
% For example if the seismic wave made by the shell occured at 12:00:00.000 time and the speed of propagation is 1000 m/s then the sensor at 2.5km distance will register it at 12:00:02.500.
% The task is to determine the locations and times of explosions by the records from seismic sensors.
% Reference: https://www.mathworks.com/matlabcentral/answers/415424-find-shell-coordinates-and-time-of-explosion-in-polygon-10km-10km#answer_333356
% Requires the Statistics and Machine Learning Toolbox, which is where fitnlm() is contained.
  2 Comments
Chris
Chris on 5 Jul 2022
The thing is that i want to import in a for loop a lot of wav files and then locate where the sound i coming from for each one of this .wav and i think that the location of the sound can come by checking the amplitude of each channel but i am not sure.
Image Analyst
Image Analyst on 5 Jul 2022
If you had two channels in your wave file and you knew they were recorded by microphones separated by a known distance, and the sounds all emanated from a single point source then you could use triangulation to get the location of the point. I don't have the formula on the top of my head but knowing the attenuation of the sound with distance it's just geometry and algebra I think.

Sign in to comment.

Categories

Find more on Acoustics, Noise and Vibration in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!