# Range response for Ultrasound tissue

3 views (last 30 days)
Ashleigh Reid on 25 Jun 2021
Hi,
I'm using the MATLAB range response guide to plot a simualtion of pulses from different boundaries in human tissue. https://uk.mathworks.com/help/phased/ref/phased.rangeresponse-system-object.html
From this I'm trying to show each line is a diffrent boundary. So at 2cm is skin, 5cm is muscle and 11cm is bone. However, I can't seemed to get the image right. The code is shown below:
fc = 5e6; %Operating frequency
fs = 20e6; %Sampling frequency
propv = 1540; %propgataion velocity of soft tissue
propv1 = 1580; %propagation velocity of muscle;
propv2 = 1580; %propagation velocity of bone;
c = 1540;
pri = 100e-9; %pulse repetition interval;
prf = 1/pri;
Numtgts = 3;
tgtpos = zeros(Numtgts);
tgtpos(1,:) = [0.02 0.05 0.11];
tgtvel = zeros(3,Numtgts);
tgtvel(1,:) = [0 0 0];
tgtrcs = db2pow(10)*[1 1 1];
tgtmotion = phased.Platform(tgtpos,tgtvel);
txantenna = phased.IsotropicAntennaElement;
rxantenna = clone(txantenna);
bw = fs/2;
waveform = phased.LinearFMWaveform('SampleRate',fs, ...
'PRF',prf,'OutputFormat','Pulses','NumPulses',1,'SweepBandwidth',fs/2, ...
'DurationSpecification','Duty cycle','DutyCycle',0.02);
sig = waveform();
Nr = length(sig);
bwrms = bandwidth(waveform)/sqrt(12);
rngrms = c/bwrms;
peakpower = 20;
txgain = 40;
transmitter = phased.Transmitter( ...
'PeakPower',peakpower, ...
'Gain',txgain, ...
'InUseOutputPort',true);
'Sensor',txantenna, ...
'PropagationSpeed',c, ...
'OperatingFrequency',fc);
channel = phased.FreeSpace( ...
'SampleRate',fs, ...
'PropagationSpeed',c, ...
'OperatingFrequency',fc, ...
'TwoWayPropagation',true);
collector = phased.Collector( ...
'Sensor',rxantenna, ...
'PropagationSpeed',c, ...
'OperatingFrequency',fc);
rxgain = 40 ;
noisefig = 10;
'SampleRate',fs, ...
'Gain',rxgain, ...
'NoiseFigure',noisefig);
Np = 128; %Building the data cube
cube = zeros(Nr,Np);
for n = 1:Np
[tgtpos,tgtvel] = tgtmotion(pri);
[tgtrng,tgtang] = rangeangle(tgtpos,sensorpos);
sig = waveform();
[txsig,txstatus] = transmitter(sig);
txsig = channel(txsig,sensorpos,tgtpos,sensorvel,tgtvel);
tgtsig = target(txsig);
rxcol = collector(tgtsig,tgtang);
end
imagesc([0:(Np-1)]*pri*1e6,[0:(Nr-1)]/fs*1e6,abs(cube))
xlabel('Slow Time {\mu}s')
ylabel('Fast Time {\mu}s')
matchingcoeff = getMatchedFilter(waveform);
ndop = 128;
rangeresp = phased.RangeResponse('SampleRate',fs,'PropagationSpeed',c);
[resp,rnggrid] = rangeresp(cube,matchingcoeff);
imagesc([1:Np],rnggrid,abs(resp))
xlabel('Pulse')
ylabel('Range (cm)')

### Categories

Find more on Ultrasound Imaging 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!