PhanLeSon03 / Mic_Array

software for microphone array board
43 stars 23 forks source link

The microphone geometry #1

Open jingxuan9862 opened 7 years ago

jingxuan9862 commented 7 years ago

hello ! could you tell me the microphone geometry that used and how can i get the const float DOA[8][4] in C_DOA_BF ?

PhanLeSon03 commented 7 years ago
circle

Hi,

It is circle with diameter 52 mm.

DOA map are just the delay in sample for 4 couples (mic1, mic2) (mic3, mic4) (mic5, mic6) (mic7, mic8) in different angle. It is calculated offline to reduce the computation effort in real-time.

jingxuan9862 commented 7 years ago

thanks for your answer ! but I want to ask how can I calculate the DOA map offline? the angel is unknow.

PhanLeSon03 commented 7 years ago

If we want to know 8 directions only (0, 45,...,315 degree) we can calculate in advance the delay for 8 directions and make a map. Once, we have 4 couples delay from mic-array, we can search in the map for the closest pattern. I have the simple matlab code for get the MAP: c = 343; % m/s D = 52 ; % mm fs = 16; % sampling frequency KHz numDir = 8; % number of direction Angle = linspace(0,2pi-2pi/numDir,numDir); theta = linspace(0,pi/2,4); Map = zeros(numDir,4); %Map = zeros(3numDir,4); %for i = 1:3 % Map(i:3:end,1) = -(Dfs/c)sin(pi/2 -Angle)sin(theta(5-i)); %end Map(:,1) = -(Dfs/c)sin(pi/2 -Angle); Map(:,2) = circshift(Map(:,1),1); Map(:,3) = circshift(Map(:,2),1); Map(:,4) = circshift(Map(:,3),1); display(Map)

jingxuan9862 commented 7 years ago

thanks for your answer ! you assume that the sound wave is the plane wave and don't care the pitching angle ? If I have six micrphones ( uniform distribution) , how can I transplant your project to this case ?