Directional characteristic of 4-mic Array
Show older comments
Hi,
I'm doing my thesis about sound recording using 4-Mic Array attached to UAV.
Since it didn't work out properly, my main part of job get into Matlab simulations.
I want to show a directional characteristic of 4-mic Array (squared).
Until this time I have figured out how to to it with linear, but know I'm stuck.
The code I'm using for linear array is shown below.
v=340; % sound speed [m/s]
l=0.03; % distance between mics [m]
N=4; % No. of mics
fg=8000; % max freq[Hz]
M=400; % graph resolution MxM
for m=1:M % change of freq
f(m)=m*fg/M; % freq vector
for p=1:M % change of phase
theta(p)=(pi*(p/M))-pi/2; % vector of phase
sum=0;
for k=0:N-1 % calculating matrix affection
sum=sum+exp(i*2*pi*f(m)*k*l*sin(theta(p))/v);
end
y(m,p)=abs(sum/N);
end
end
fr=linspace(0,fg,M);
ph=linspace(-90,90,M);
%surf(ph,fr,y); % plot 3D
pcolor(ph,fr,y); colorbar; % plot 2D

I know that i need to add additional degree, while looking for squared one.
I'm attaching also picture of the equations that should be implemented.

Can anyone help me with implementing it into matlab and then showing it on 3D plot?
Best regard, Jakub
Answers (0)
Categories
Find more on Subplots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!