I need some help with a simple delay and sum linear array beamforming code
Afficher commentaires plus anciens
This is my code so far. I need it to work for beam steering. What should I do?
clc close all
ANGLE_RESOLUTION= 500; % // Number of angle points to calculate
numElements = 4; %// Number of array elements
spacing = 0.2; %// Element separation in metres
freq = 1000.0; %// Signal frequency in Hz
%Fs=40000;
%f=freq/Fs;
speedSound = 343.0; %// m/s
array=[];
for a=1:ANGLE_RESOLUTION
angle = -90 + 180.0 * a / (ANGLE_RESOLUTION-1);
angleRad = pi * angle / 180;
realSum = 0;
% imagSum = 0;
for i=1 : numElements
position = i * spacing;
delay = position * sin(angleRad) / speedSound;
realSum =realSum+ cos(2.0 * pi * freq * delay);
% imagSum =imagSum+ sin(2.0 * pi * freq * delay);
end;
output = sqrt(realSum * realSum ) / numElements;
logOutput(a) = 20 * log10(output);
if (logOutput < -50)
logOutput = -50;
end;
array=[array logOutput(a)];
end;
Réponses (1)
deepthy sivan
le 27 Fév 2019
0 votes
angle = -90 + 180.0 * a / (ANGLE_RESOLUTION-1);
why doing this?
Catégories
En savoir plus sur Array Geometries and Analysis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!