How to use beamformer in matlab 2016a using step()
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Luuk Muris
am 11 Jun. 2018
Beantwortet: Honglei Chen
am 11 Jun. 2018
Hi,
For an assignment I have to construct an ultrasound image from rawdata to an actual image showing a word. To construct this image I need to use beamforming, but I have the 2016a version which requires you to use the step() function. When I use this I get an error message: 'Error using phased.PhaseShiftBeamformer/step Not enough input arguments; expected 2 (in addition to the object handle), got 1.'
Does anybody know how to use beamforming and step()? My code is shown below.
Thanks in advance!
if true
load('Lab2_BMD_course_Data.mat')
RFData=double(RFData);
Pitch = 0.3; % pitch
c0 = 1500; % speed of sound
fs = 25e6; % sample frquency
fc=6.25e6;
dt=1/fc; % time between each sample
limits=[min(RFData(:)) max(RFData(:))];
depth = [0:c0*dt/2:(size(RFData,1)-1)*c0*dt/2];
D=RFData(:,64);
Dabs=abs(D);
for i=1:128
[env1 env2]=envelope(RFData(:,i));
totenv(:,i)=env1;
end
% Definition Elementposition
ElementPos =0:Pitch:127*Pitch;
ElementPos = ElementPos-mean(ElementPos);
% Preallocation of image
x=-20:0.1:20;
z=0:0.1:50;
N=128; % number elements
Image =zeros(length(z),length(x));
df=2e6;
lambda=c0/fc;
array=phased.ULA('NumElements',128,'ElementSpacing',Pitch);
array.Element.FrequencyRange=[fc-df fc+df];
beamformer=phased.PhaseShiftBeamformer;
beamformer.SensorArray=array;
beamformer.DirectionSource='Input port';
beamformer.WeightsOutputPort=true;
beamformer.WeightsNormalization='Preserve power';
beamformer.PropagationSpeed=c0;
beamformer.OperatingFrequency=fs;
% Y=step(beamformer,totenv);
test=totenv(:,64);
figure(4)
[y w]=step(beamformer,totenv);
end
0 Kommentare
Akzeptierte Antwort
Honglei Chen
am 11 Jun. 2018
You need to pass in an extra input representing the desired beamforming direction because you set the DirectionSource to 'Input port'.
HTH
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Beamforming finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!