Changes between Version 34 and Version 35 of Other/Summer/2020/FPGAspectrum


Ignore:
Timestamp:
Jul 30, 2020, 12:26:07 AM (4 years ago)
Author:
rgd51
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Other/Summer/2020/FPGAspectrum

    v34 v35  
    329329}}}
    330330
     331
     332== Matched Filter ==
     333{{{#!matlab
     334% Zhuohuan Li
     335% Sid Mandayam
     336
     337antenna = phased.IsotropicAntennaElement('FrequencyRange',[5e9 15e9]);
     338transmitter = phased.Transmitter('Gain',20,'InUseOutputPort',true);
     339fc = 10e9;
     340target = phased.RadarTarget('Model','Nonfluctuating',...
     341   'MeanRCS',1,'OperatingFrequency',fc);
     342txloc = [0;0;0];
     343tgtloc = [5000;5000;10];
     344transmitterplatform = phased.Platform('InitialPosition',txloc);
     345targetplatform = phased.Platform('InitialPosition',tgtloc);
     346[tgtrng,tgtang] = rangeangle(targetplatform.InitialPosition,...
     347   transmitterplatform.InitialPosition);waveform = phased.RectangularWaveform('PulseWidth',25e-6,...
     348   'OutputFormat','Pulses','PRF',10e3,'NumPulses',1);
     349c = physconst('LightSpeed');
     350maxrange = c/(2*waveform.PRF);
     351SNR = npwgnthresh(1e-6,1,'noncoherent');
     352Pt = radareqpow(c/fc,maxrange,SNR,...
     353   waveform.PulseWidth,'RCS',target.MeanRCS,'Gain',transmitter.Gain);transmitter.PeakPower = Pt;radiator = phased.Radiator('PropagationSpeed',c,...
     354   'OperatingFrequency',fc,'Sensor',antenna);
     355channel = phased.FreeSpace('PropagationSpeed',c,...
     356   'OperatingFrequency',fc,'TwoWayPropagation',false);
     357collector = phased.Collector('PropagationSpeed',c,...
     358   'OperatingFrequency',fc,'Sensor',antenna);
     359receiver = phased.ReceiverPreamp('NoiseFigure',0,...
     360   'EnableInputPort',true,'SeedSource','Property','Seed',2e3);
     361filter = phased.MatchedFilter(...
     362   'Coefficients',getMatchedFilter(waveform),...
     363   'GainOutputPort',true);wf = waveform();
     364[wf,txstatus] = transmitter(wf);
     365wf = radiator(wf,tgtang);
     366wf = channel(wf,txloc,tgtloc,[0;0;0],[0;0;0]);
     367wf = target(wf);
     368wf = channel(wf,tgtloc,txloc,[0;0;0],[0;0;0]);
     369wf = collector(wf,tgtang);
     370rx_puls = receiver(wf,~txstatus);
     371[mf_puls,mfgain] = filter(rx_puls);
     372Gd = length(filter.Coefficients)-1;mf_puls=[mf_puls(Gd+1:end); mf_puls(1:Gd)]; % main line of matched filter
     373subplot(2,1,1)
     374t = unigrid(0,1e-6,1e-4,'[)');
     375rangegates = c.*t;
     376rangegates = rangegates/2; % end with this lineplot(rangegates,abs(rx_puls))
     377title('Received Pulse')
     378xlabel('Meters')
     379ylabel('Amplitude')
     380hold on
     381plot([tgtrng, tgtrng], [0 max(abs(rx_puls))],'r')
     382subplot(2,1,2)
     383plot(rangegates,abs(mf_puls))
     384title('After Matched Filter')
     385xlabel('Meters')
     386ylabel('Amplitude')
     387hold on
     388plot([tgtrng, tgtrng], [0 max(abs(mf_puls))],'r')
     389hold off
     390}}}
     391