Beamforming with 4x4 Microphone Array
조회 수: 7 (최근 30일)
이전 댓글 표시
Hello,
I have assembled a 4x4 Microphone Array to collect heart sounds. This device collects 16 analog signals through an MCC DAQ. I would like to perform some sort of beamforming on these signals to steer the microphone towards the desired sounds.
What is the most efficient way to perform beamforming on my signals using the "Frost Beamformer" from the Phased Array Toolbox?
To simulate I am using sample heart sounds from a website and adding random noise. Assume
heart = [A A A A A A A A A A A A A A A A];
are the 16 signals collected from my hardware.
--------------------------------------------------------
Here is my code so far:
hmic=phased.OmnidirectionalMicrophoneElement;
ha=phased.URA([4 4],[0.0635 0.0635],'Element',hmic);
c=340;
rs = RandStream.create('mt19937ar','Seed',2008);
noisePwr = 1e-4; % noise power
fs=22257;
NSampPerFrame = 1000;
NTSample = 23000;
voice_dft = zeros(NTSample,1);
%DATA
A = data(1:23000,:);
heart = [A A A A A A A A A A A A A A A A];
for m = 1:NSampPerFrame:NTSample
sig_idx = m:m+NSampPerFrame-1;
x = A([sig_idx(1) sig_idx(end)]);
y = x + sqrt(noisePwr)*rand(rs,NSampPerFrame,16);
sigArray(sig_idx,:) = y;
voice_dft(sig_idx) = x1;
end
angSteer = [0;0];
%BEAMFORM
hsig=dsp.SignalReader('Signal',y,'SamplesPerFrame',NSampPerFrame);
bf=phased.FrostBeamformer('SensorArray',ha,'SampleRate',fs,...
'PropagationSpeed',c,'FilterLength',100,'DirectionSource','Input port');
frostout=zeros(NTSample,16);
for m=1:NSampPerFrame:NTSample
frostout(m:m+NSampPerFrame-1,:)=step(bf,step(hsig),angSteer);
end
%soundsc(frostout,fs,16)
wavwrite(frostout,'Frostbeamformed real data');
plot(t,frostout);
xlabel('Time (sec)'); ylabel ('Amplitude (V)');
title('Frost Beamformer Output');
Another note: I receive an error when I try to run the above code which I am also unsure about:
Error using +
Matrix dimensions must agree.
Error in frost (line 21)
y = x + sqrt(noisePwr)*rand(rs,NSampPerFrame,16);
댓글 수: 0
답변 (2개)
Honglei Chen
2013년 3월 18일
Not sure what the dimension is for your variable heart and A, but
x = A([sig_idx(1) sig_idx(end)]);
seems to suggest that x is just a length-2 vector. That's why it is does not match the noise which has 16 columns.
댓글 수: 0
Zeynep Ertekin
2017년 1월 22일
Hi,
I need a 2d or 3d sound source localization code with command load; can anyone please help me. Any help will be highly apprecited.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Array and Matrix Mathematics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!