Clear Filters
Clear Filters

LinearFM Target Range Detection with Matched Filter Error

3 views (last 30 days)
I have been working on learning how matched filters can be used in radar systems to improve SNR and detect targets at some particular range.
Following the example from:, I can run and modify the "Matched Filtering to Improve SNR for Target Detection" without issue. However, when I try to replicate the result using a Linear FM Waveform, I cannot get the output figures to clearly show the same type of result as for the rectangular waveform.
I have tried varying bandwidths, pulse-widths, range resolution, prf, plot parameters, etc, but I am at a loss for what is going wrong at this point. Maybe there's something going on with the plot that I don't understand? When running the below, there is something that appears to be working, as there appears to be an unfilterd pulse at 1km, but that doesn't match up with the true range. The full .m file is below, and I greatly appreciate any help or suggestions that anyone can offer.
Running MATLAB Version: (R2017b)
clear all;
%Setting up radar/sim parameters
txloc = [0;0;0];
tgtloc = [2000;0000;10];
tgt_rcs = 1;
%tau = 1e-4;
%prf = 5e3;
c = physconst('LightSpeed');
%maxrange = c/(2*prf);
maxrange = 8000;
prf = c/(2*maxrange);
pfa = 1e-6;
SNR = npwgnthresh(pfa,1,'noncoherent');
Pg = 20; %Radar power gain
range_res = 50;
lambda = c/fc;
pulse_bw = c/(2*range_res);
tau = 20/pulse_bw;
fs = 2*pulse_bw;
minrng = c*tau/2;
%Select waveform type - here is a Linear FMWaveform being set up
waveform = phased.LinearFMWaveform(...
%Antenna and transmitter parameters - isotropic
antenna = phased.IsotropicAntennaElement('FrequencyRange',[5e9 15e9]);
transmitter = phased.Transmitter('Gain',Pg,'InUseOutputPort',true);
%Target rcs and rcs model parameter
target = phased.RadarTarget('Model','Nonfluctuating',...
%Calculate required transmit power to meet max range parameter
Pt = radareqpow(c/fc,maxrange,SNR,...
transmitter.PeakPower = Pt;
%Setting up initial transmitter and target locations and angle
transmitterplatform = phased.Platform('InitialPosition',txloc);
targetplatform = phased.Platform('InitialPosition',tgtloc);
[tgtrng,tgtang] = rangeangle(targetplatform.InitialPosition,...
%Set up radiator and collector objects operating at 10GHz
radiator = phased.Radiator('PropagationSpeed',c,...
collector = phased.Collector('PropagationSpeed',c,...
%Create free-space path for propogation of the pulse to and from the
channel = phased.FreeSpace('PropagationSpeed',c,...
%Create receiver
receiver = phased.ReceiverPreamp('NoiseFigure',0,...
'EnableInputPort',true,'SeedSource','Property','Seed',2e3, 'SampleRate',fs);
%Generate the waveform
wf = waveform();
%Transmit the waveform
[wf,txstatus] = transmitter(wf);
%Radiate pulse toward target
wf = radiator(wf,tgtang);
%Propogate pulse toward target
wf = channel(wf,txloc,tgtloc,[0;0;0],[0;0;0]);
%Reflect it off the target
wf = target(wf);
%Propagate the pulse back to transmitter
wf = channel(wf,tgtloc,txloc,[0;0;0],[0;0;0]);
%Collect the echo
wf = collector(wf,tgtang);
%Receive target echo
rx_puls = receiver(wf,~txstatus);
wav = getMatchedFilter(waveform);
filter = phased.MatchedFilter('Coefficients',wav,...
[mf_puls,mfgain] = filter(rx_puls);
%Group delay of matched filter
Gd = length(filter.Coefficients)-1;
matchingdelay = size(wav,1)-1;
%shift the matched filter output and plot
mf_puls=[mf_puls(Gd+1:end); mf_puls(1:Gd)];
t = unigrid(0,1/fs,1/prf,'[)');
rangegates = c.*t;
rangegates = rangegates/2;
%Plot graph
title('Received Pulse')
hold on
plot([tgtrng, tgtrng], [0 max(abs(rx_puls))],'r')
title('With Matched Filtering')
hold on
plot([tgtrng, tgtrng], [0 max(abs(mf_puls))],'r')
hold off

Accepted Answer

Honglei Chen
Honglei Chen on 31 Dec 2019
You forgot to set the sample rate in channel accordingly. Replace your channel definition as
channel = phased.FreeSpace('PropagationSpeed',c,...
and you will have expected result.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!