Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find distance between two micro-array and sound source #243

Open
kehinde-elelu opened this issue Nov 26, 2021 · 3 comments
Open

find distance between two micro-array and sound source #243

kehinde-elelu opened this issue Nov 26, 2021 · 3 comments

Comments

@kehinde-elelu
Copy link

I will like to ask how to find the distance between two micro and source source

@fakufaku
Copy link
Collaborator

@ELELUABDULSALAM , do you mean you want to estimate the location of a source given acoustic measurements by a few microphones ? If yes, pyroomacoustics does not include such algorithms. Instead, you may checkout pylocus. Among other things there is an implementation of the SRLS algorithm found in the paper Exact and Approximate Solutions of Source Localization Problems that does what you want.

Note that using only two microphones may not give you very good results. You will likely need more measurements to accurately locate a source in practice.

@akhilvasvani
Copy link

akhilvasvani commented Nov 30, 2021

@fakufaku, I noticed for the SRLS algorithm, one of the required parameters in the SRLS method is w, the weights for the measurements (Nx1). I am a little unclear on using the 'w' parameter that I would like your help. Let me provide an example:

Say, we are in 3-d coordinate system (x, y, z) and I have a sound source at (3, 3, 3).
I have 5 microphones close to the the origin—(0, 0, 0), (1, 0, 0), (-1, 0, 0), (0, 1, 0), (0, -1, 0).

Using combinations of the 5 microphones, I run one of the DOA methods from pyroomacoustics library and generate a list of candidate locations: [[2, 1, 0], [3, 4, 2], [-2, 3, 2], [3, 2, 3], [-1, 4, 3]].

Now comes my questions:

  1. By weights, I am assuming that means I am assigning a value to each of my candidate locations—on a scale from 0,1—which can be interpreted as how likely that candidate location is as the true sound source location. Is that a fair assumption to make?
  2. If I did not know the true location of my sound source, how would I be able to assign a weight to each of the candidate locations?

@fakufaku
Copy link
Collaborator

fakufaku commented Dec 1, 2021

Hi @akhilvasvani , the weight allows to give more weights to some sensors than others. For example, we may know that some sensors are more reliable, or less noisy than others.

Now, I am not really sure of what you are describing above. There is one source and five microphones. You say you use some DOA algorithms in pyroomacoustics, which will give you some direction only.
Queston: How do you obtain the candidate locations in 3D from the DOA measurements ?

Then, there seems to be a misunderstanding of how SRLS works. SRLS does multi-lateration. The inputs are the locations of the sensors (anchors, a 5 x 3 numpy array with one sensor location in each row, in your case). The weights can be all ones if you don't have prior information. Finally, r2 is 5 x 1 numpy array that contains the estimated distance from the corresponding anchor to the source.
The output of the algorithm will be the estimated location of the source.

In your case, I don't think that you have distance estimates to the source. Actually, without distance estimates, you may need to use a time-difference of arrival (TDOA) technique. I don't think pylocus implements those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants