How to plot array beampattern with Frost beamformer weights?
조회 수: 12 (최근 30일)
이전 댓글 표시
I am trying to plot beampattern of an array after using Frost Beamforming algorithm to adapt weights. Below is sample code for frost beamformer.
clear; close all; clc;
h = phased.URA('Size',[4 4],'ElementSpacing',[1 0.6]);
h.Element.FrequencyRange = [20 20000];
fs = 8e3;
t = 0:1/fs:0.3;
x = chirp(t,0,1,500);
c = 340;
collector = phased.WidebandCollector('Sensor',h,...
'PropagationSpeed',c,'SampleRate',fs,...
'ModulatedInput',false,'NumSubbands',8192);
incidentAngle = [-50;30];
x = step(collector,x.',incidentAngle);
noise = 0.2*randn(size(x));
rx = x + noise;
beamformer = phased.FrostBeamformer('SensorArray',h,...
'PropagationSpeed',c,'SampleRate',fs,...
'Direction',incidentAngle,'FilterLength',5,...
'WeightsOutputPort',true);
[y,yweights] = step(beamformer,rx);
plot(t,rx(:,6),'r:',t,y)
xlabel('Time')
ylabel('Amplitude')
legend('Original','Beamformed')
How do I use pattern and yweights to plot the beampattern?
댓글 수: 0
채택된 답변
Honglei Chen
2017년 3월 30일
편집: Honglei Chen
2017년 3월 30일
You can consider translating the weights to frequency domain to obtain the appropriate frequency response. Then you can compute the pattern at the given frequency.
% plot pattern
% consider 16 bands and pick the band corresponding to 2 kHz
M = 16;
wfreq = fft(reshape(yweights,16,[]).',M);
freqvec = [0:7 -8:-1]*fs/M;
bandidx = 5; % corresponding to 2kHz
freqbin = 2e3;
hstv = phased.SteeringVector('SensorArray',h,'PropagationSpeed',c);
sv = step(hstv,freqbin,incidentAngle);
figure
pattern(h,freqbin,-180:180,0,'PropagationSpeed',c,'Weights',sv.*wfreq(bandidx,:).',...
'CoordinateSystem','polar','Type','powerdb');
HTH
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Signal Radiation, Collection, and Reflection에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!