www.gusucode.com > phased 案例源码 matlab代码程序 > phased/Swerling1TargetExample.m
%% Swerling 1 Target Models % The example presents a scenario of a rotating monostatic radar and % a target having a radar cross-section described by a Swerling 1 model. In % this example, the radar and target are stationary. %% Swerling 1 versus Swerling 2 Models % In Swerling 1 and Swerling 2 target models, the total RCS arises from % many independent small scatterers of approximately equal individual RCS. The % total RCS may vary with every pulse in a scan (Swerling 2) or may be constant over % a complete scan consisting of multiple pulses (Swerling 1). In either % case, the statistics obey a chi-squared probability density function with % two degrees of freedom. % Copyright 2015 The MathWorks, Inc. %% Dwell Time and Radar Scan % For simplicity, start with a rotating radar having a rotation time of 5 % seconds corresponding to a rotation rate or scan rate of 72 degrees/sec. Trot = 5.0; rotrate = 360/Trot; %% % The radar has a main half-power beam width (HPBW) of 3.0 degrees. During % the time that a target is illuminated by the main beam, radar pulses % strike the target and reflect back to the radar. The time period during % which the target is illuminated is called the dwell time. This time period is % also called a scan. The example will process 3 scans of the target. HPBW = 3.0; Tdwell = HPBW/rotrate; Nscan = 3; %% % The number of pulses that arrive on target during the dwell time depends % upon the pulse repetition frequency (PRF). PRF is the inverse of the pulse repetition % interval (PRI). Assume 5000 pulses are transmitted per second. prf = 5000.0; pri = 1/prf; %% % The number of pulses in one dwell time is Np = floor(Tdwell*prf); %% Set up a Swerling 1 radar model % You create a Swerling 1 target by properly employing the |step| method of % the |RadarTarget| System object(TM). To effect a Swerling 1 model, set % the |Model| property of the |phased.RadarTarget| System object(TM) to % either |'Swerling1'| or |'Swerling2'|. Both are equivalent. Then, at the % first call to the |step| method at the beginning of the scan, set the % |updatercs| argument to |true|. Set |updatercs| to |false| for the % remaining calls to |step| during the scan. This means that the radar % cross section is only updated at the beginning of a scan and remains % constant for the remainder of the scan. %% % Set the target model to |'Swerling1'|. rng default tgtmodel = 'Swerling1'; %% Set up radar model System object(TM) components %% % Set up the radiating antenna. Assume the operating frequency of the % antenna is 1GHz. fc = 1e9; sAnt = phased.IsotropicAntennaElement('BackBaffled',true); SRad = phased.Radiator('OperatingFrequency',fc, ... 'Sensor',sAnt); %% % Specify the location of the stationary antenna. sRadar = phased.Platform('InitialPosition',[0;0;0]); %% % Specify the location of a stationary target. sTarget = phased.Platform('InitialPosition',[2000; 0; 0]); %% % The transmitted signal is a linear FM waveform. Transmit one pulse per % call to the |step| method. sWav = phased.LinearFMWaveform('PulseWidth',50e-6,... 'OutputFormat','Pulses','NumPulses',1); %% % Set up the transmitting amplifer. sTransmit = phased.Transmitter('PeakPower',1000.0,'Gain',40); %% % Set up the propagation environment to be free space. sFS = phased.FreeSpace('OperatingFrequency',fc,... 'TwoWayPropagation',true); %% % Specify the radar target to have a mean RCS of 1 m2 and be of the % Swerling model type 1 or 2. You can use Swerling 1 or 2 interchangeably. sTgt = phased.RadarTarget('MeanRCS',1,'OperatingFrequency',fc,... 'Model',tgtmodel); %% % Set up the radar collector. sColl = phased.Collector('OperatingFrequency',1e9,... 'Sensor',sAnt); %% % Define a matched filter to process the incoming signal. waveform = step(sWav); sMF = phased.MatchedFilter(... 'Coefficients',getMatchedFilter(sWav)); %% Processing loop for 3 scans of a Swerling 1 target % % # Generate waveform with unit amplitude % # Amplify the transmit waveform % # Radiate the waveform in the desired direction to the target % # Propagate the waveform to and from the radar rarget % # Reflect waveform from radar target. % # Collect radiation to create received signal % # Match filter received signal % %% % Provide memory for radar return amplitudes z = zeros(Nscan,Np); tp = zeros(Nscan,Np); %% % Enter the loop. Set |updatercs| to |true| only for the first pulse of the % scan. for m = 1:Nscan t0 = (m-1)*Trot; t = t0; for k = 1:Np if k == 1 updatercs = true; else updatercs = false; end t = t + pri; TXwaveform = step(sTransmit,waveform); %% % Find the radar and target positions [xradar,vradar] = step(sRadar,t); [xtgt,vtgt] = step(sTarget,t); %% % Radiate waveform to target [~,ang] = rangeangle(xtgt,xradar); WFrad = step(SRad,TXwaveform,ang); %% % Propagate waveform to and from the target WFprop = step(sFS,WFrad,sRadar.InitialPosition,... sTarget.InitialPosition,[0;0;0],[0;0;0]); %% % Reflect waveform from target. Set the |updatercs| flag. WFreflect = step(sTgt,WFprop,updatercs); %% % Collect the received waveform WFcol = step(sColl,WFreflect,ang); %% % Apply matched filter to incoming signal y = step(sMF,WFcol); z(m,k) = max(abs(y)); tp(m,k) = t; end end %% Plot the pulse amplitudes % Plot the amplitudes of the pulses for the scan as a function of time. plot(tp(:),z(:),'.') xlabel('Time (sec)') ylabel('Pulse Amplitudes') %% % Notice that the pulse amplitudes are constant within a scan.