This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Basic Radar Using Phase-Coded Waveform

Instead of the rectangular waveform used in the End-to-End Radar System example, you can use a phase-coded waveform instead of a rectangular waveform. To do so, replace the phased.RectangularWaveform System object™ with phased.PhaseCodedWaveform .

Note: This example runs only in R2016b or later. If you are using an earlier release, replace each call to the function with the equivalent step syntax. For example, replace myObject(x) with step(myObject,x).

waveform = phased.PhaseCodedWaveform('Code','Frank','NumChips',4,...

Then, redefine the pulse width, tau , using the properties of the new waveform.

tau = waveform.ChipWidth*waveform.NumChips;

The remainder of the code is almost identical to the code in the original examples and is presented here without comments. For a detailed explanation of how the code works, see the original End-to-End Radar System example.

antenna = phased.IsotropicAntennaElement('FrequencyRange',[1e9 10e9]);
target = phased.RadarTarget('Model','Nonfluctuating',...
transmitterplatform = phased.Platform('InitialPosition',[0;0;0],...
targetplatform = phased.Platform('InitialPosition',[7000; 5000; 0],...
[tgtrng,tgtang] = rangeangle(targetplatform.InitialPosition,...

Pd = 0.9;
Pfa = 1e-6;
numpulses = 10;
SNR = albersheim(Pd,Pfa,10);
maxrange = 1.5e4;
lambda = physconst('LightSpeed')/4e9;
Pt = radareqpow(lambda,maxrange,SNR,tau,'RCS',0.5,'Gain',20);
transmitter = phased.Transmitter('PeakPower',50e3,'Gain',20,...
radiator = phased.Radiator('Sensor',antenna,...
collector = phased.Collector('Sensor',antenna,...
receiver = phased.ReceiverPreamp('Gain',20,'NoiseFigure',2,...
channel = phased.FreeSpace(...
T = 1/waveform.PRF;
txpos = transmitterplatform.InitialPosition;
rxsig = zeros(waveform.SampleRate*T,numpulses);
for n = 1:numpulses
    [tgtpos,tgtvel] = targetplatform(T);
    [tgtrng,tgtang] = rangeangle(tgtpos,txpos);
    sig = waveform();
    [sig,txstatus] = transmitter(sig);
    sig = radiator(sig,tgtang);
    sig = channel(sig,txpos,tgtpos,[0;0;0],tgtvel);
    sig = target(sig);
    sig = channel(sig,tgtpos,txpos,tgtvel,[0;0;0]);
    sig = collector(sig,tgtang);
    rxsig(:,n) = receiver(sig,~txstatus);
rxsig = pulsint(rxsig,'noncoherent');
t = unigrid(0,1/receiver.SampleRate,T,'[)');
rangegates = (physconst('LightSpeed')*t)/2;
hold on
xlabel('Meters'); ylabel('Power')
ylim = get(gca,'YLim');
plot([tgtrng,tgtrng],[0 ylim(2)],'r')
hold off