generate clutter and target returns for mti radar -凯发k8网页登录
this example shows how to generate surface clutter and target returns for the simulation of a moving target indicator (mti) radar in a radarscenario
. mti filtering is performed and the resulting range profiles and doppler spectra are examined. the effects of platform geometry are demonstrated by looking at both broadside and squinted trajectories, and at target placement within the radar antenna mainlobe.
rng default
mti radar basics
mti is a clutter mitigation method for pulsed radar that involves a slow-time filter and produces a time series of range profiles where returns from stationary objects have been filtered out. this is a simpler alternative to pulse-doppler processing which does not yield a velocity estimate for targets, though direction-of-arrival estimation can still be performed on target detections.
mti filter
an mti filter is a notch filter that is configured to remove the signal component at the doppler frequency of surface clutter. derivative filters are commonly used for their simplicity, with first- and second-order differences being the most common. this example will use the three-pulse canceller, which is a derivative filter of order 2 and length 3, and uses central differences. such a filter is simple to implement and, since the order is 1 less than the length, it has only one null per doppler ambiguity. in general, a balance can be found for a particular application between the width of the passband, attenuation, and the number of null frequencies.
the figure below shows the filter response for pulse cancellers of length 2 through 5 and a prf of 5 khz. note that they all attenuate signals close to 0 hz, with varying degrees of passband width and rolloff. this nominal filter type is appropriate for broadside trajectories, where clutter return is centered about 0 hz. if using a squinted trajectory, the filter can be offset in frequency to notch out the expected frequency of the clutter centroid.
note that spectral components of the received signals wrap at the prf, so signals at any integer multiple of the prf fall in the nulls of the filter. radials speeds that impart a doppler frequency close to these integer multiples are referred to as blind speeds because, even though the target may be in motion, its doppler frequency is congruent to that of the clutter return. note also that the nominal filter response is symmetric about 0 hz, positive and negative range rates of the same magnitude are filtered similarly. the figure below shows the length-3 filter response for all doppler frequencies between -3 and 3 multiples of the 5 khz prf, with the dopplers corresponding to blind speeds indicated by vertical lines.
for a target to be detectable with range-only measurements, the target signal power must exceed that of the total clutter signal power in the target's range gate. the goal of mti filtering is to reduce as much of the clutter signal power as possible, while preserving most of the target signal power.
beam and platform geometry
surface clutter is distributed over 360 degrees of azimuth, almost 90 degrees of elevation angle, and is bounded in range only by the horizon. when illuminated by a conical beam, the presentation of surface clutter depends on the geometry of the beam (shape and pointing direction), and on the motion of the radar platform. the detectability of a surface target with mti processing is dependent on this clutter presentation as well as the radial speed of the target, which is defined by the absolute speed and direction of the target motion. the required positive or negative range rate for detection can depend on the location of the target within the mainlobe. a target that is located towards the high-doppler edge of clutter might be detectable if it is moving towards the radar, but not be detectable if it is moving away from the radar at the same speed. there is thus an asymmetry in the detectable velocities for targets in all cases except for that of a broadside trajectory with the target located along the boresight vector.
the diagram below illustrates how the endoclutter region in range/cross-range changes with target speed when the target velocity is fixed in the uprange direction. in the first two subplots, the example target falls in the endoclutter region and is not detectable with mti processing. in the 3rd subplot, the target is moving quickly enough to fall in the exoclutter region and should be detectable with mti processing.
this next diagram illustrates how the direction of target motion affects the radial speed and thus detectability of a target. in this scenario, the target is located close to the high-doppler edge of the beam footprint and has a constant speed of 10 m/s. since the target is already close to the high-doppler edge of the beam, there is a large span of directions of motion that place the target in the exoclutter region at a higher doppler than clutter, while there is only a small span of directions of motion that place the target at a lower doppler than clutter.
an analytical treatment is further complicated by the asymmetric beamwidth that results from any steering off broadside with a phased array, and from any rolling of the sensor frame about boresight. a physical simulation that supports such arbitrary platform geometries can be important for estimating the real-world performance of an mti system.
performance metrics
while an exact solution for the detectability of a target under mti processing is complex in general, a couple useful metrics may be computed with relative simplicity. the most commonly referenced is the minimum detectable velocity (mdv), the radial speed at which a target becomes detectable. this metric typically uses the simplifying assumption that the target lies exactly along the radar boresight. for broadside trajectories, which are the most common, this also means that the detectable velocity is symmetric about positive and negative range rates. the actual required velocity for detection is also affected by any broadening of the clutter spectrum for doppler sidelobe control. in general, a balance must be found between broadening of the clutter spectrum and sidelobe levels required to detect the target.
another useful metric is the mti improvement factor, which relates the signal-to-clutter ratio (scr) before and after mti processing. an example demonstrating the effect of system parameters on the improvement factor is available here: mti improvement factor for land-based radar.
broadside mti simulation
in this section, you will see how to configure a radar scenario to simulate clutter and target returns using a basic broadside trajectory. you will inspect the resulting range profiles for the case of a target that lies along the radar boresight, both above and below the mdv, then see what happens when the target is offset in the cross-range direction.
scenario configuration
a simulation involving radar clutter may be configured in four steps:
create a radar model and define system parameters and physical mounting angles
create a scenario container and define the earth type, surface information, and simulation stop time
create scenario platforms, defining their trajectories and mounting sensors
create a clutter generator, defining clutter generation parameters for each radar
configure radar
the radartransceiver
object is used to simulate signal-level radar returns. this radar model contains sub-objects to handle various components of a monostatic radar system. start by defining the desired system parameters, then use the provided helper function to construct the radar. use parameters appropriate for an x-band side-looking airborne mti radar that is configured to detect surface targets moving between about 20 to 40 mph. the antenna will be a symmetric uniform rectangular array (ura).
fc = 10e9; prf = 7e3; rangeres = 20; beamwidth = 5; rdr = helpermaketransceiver(beamwidth,fc,rangeres,prf);
set the radar mounting parameters. the radar will face out the left side of the platform (90 degree yaw), and down at the specified depression angle, with no roll about boresight.
depressionangle = 18; rdr.mountingangles = [90 depressionangle 0];
the total number of pulses collected on each activation of the radar model is defined by the numrepetitions
property. with range-only mti processing, the pulses will be integrated noncoherently. set the number of pulses to 64.
numpulses = 64; rdr.numrepetitions = numpulses;
calculate the wavelength, doppler and range-rate resolutions, and range gate centers for later use. the range swath extends from 0 out to the unambiguous range.
[lambda,c] = freq2wavelen(fc); dopres = prf/numpulses; rangerateres = dop2speed(dopres,lambda)/2; unambrange = time2range(1/prf); rangegates = 0:rangeres:(unambrange-rangeres/2);
configure scenario
create a radarscenario
object. use a flat earth and set the update rate to 0 to indicate that the update rate should be derived from sensors in the scene.
scene = radarscenario('isearthcentered',false,'updaterate',0);
the scenario landsurface
method can be used to define a homogeneous, static surface with an associated reflectivity model. create a constant-gamma reflectivity model with the surfacereflectivityland
function, and use a gamma value of -10 dbsm.
gamma = -10; refl = surfacereflectivityland('model','constantgamma','gamma',gamma); landsurface(scene,'radarreflectivity',refl);
configure platforms
create the radar platform. let the platform fly a straight-line trajectory at the specified altitude and speed. the platform will move in the x direction at 180 m/s.
altitude = 2e3; rdrspd = 180; rdrtraj = kinematictrajectory('position',[0 0 altitude],'velocity',[rdrspd 0 0]); rdrplat = platform(scene,'sensors',rdr,'trajectory',rdrtraj);
create a target platform that lies on the surface along the antenna boresight, and give it a velocity vector such that the return signal will be separated from clutter in doppler. start by calculating the expected spread of clutter in doppler. for broadside geometries and a symmetric beam, the two-sided extent of clutter in doppler, , can be calculated with a simple equation:
where is the wavelength, is the radar speed, and is the two-sided beamwidth. in reality, doppler sidelobes will extend beyond this width, and this width may be increased by slow-time windowing. the mdv may be seen as a function of this width and of the mti filter response. calculate the doppler width of clutter.
wd = 4/lambda*rdrspd*sind(beamwidth/2);
to place the target along the antenna boresight, calculate the required ground range from the radar altitude and boresight depression angle. recall that the radar is pointed in the y direction.
gndrng = altitude/tand(depressionangle); tgtrng = sqrt(gndrng^2 altitude^2); bspos = [0 gndrng 0];
calculate a closing rate that places the target at 500 hz greater than the high-doppler clutter edge. use the helper function to calculate the required speed for a target moving in the -y direction, and create a kinematic trajectory.
tgtclosingrate = (wd/2 500)*lambda/2; tgtvel = helpertargetvelocityfromclosing(rdrplat.position,rdrplat.trajectory.velocity,bspos,tgtclosingrate); tgttraj = kinematictrajectory('position',bspos,'velocity',tgtvel);
in order to understand the effect of the mti filter on detectability, express the target rcs in terms of the expected clutter rcs. the nrcs can be found using the reflectivity model created earlier, and cluttersurfacercs
can be used to approximate the total rcs of clutter in the range gate containing the target and within the span of the mainlobe. express the rcs in dbsm.
clutternrcs = refl(depressionangle,fc); clutterrcs = cluttersurfacercs(clutternrcs,tgtrng,beamwidth,beamwidth,depressionangle,rdr.waveform.pulsewidth,c); clutterrcs = 10*log10(clutterrcs);
set the target rcs to be 8 dbsm less than the clutter rcs. without any processing, the target will not be detectable.
tgtrcs = clutterrcs - 8; % dbsm tgtplat = platform(scene,'trajectory',tgttraj,'signatures',rcssignature('pattern',tgtrcs));
the figure below shows the beam footprint with this scenario, and the location and velocity vector of the target.
configure clutter generation
finally, create a cluttergenerator
and specify clutter generation settings. set the clutter resolution to one half of the radar range resolution to ensure multiple clutter patches per resolution cell (the range resolution is smaller than the cross-range resolution with this radar configuration). set usebeam
to true to generate mainlobe clutter.
cluttergenerator(scene,rdr,'resolution',rangeres/2,'usebeam',true);
simulate clutter and target return signals
use the scenario receive
method to collect one interval of pulse data. the result is formatted as fast time-by-slow time, and is referred to as a phase history (ph) matrix. this sum beam is an accumulation of the typical radar data cube across channels. the output will be a cell array, with one cell for each radartransceiver
in the scene. this scenario has only one radar, so unpack ph into a matrix by accessing the first element.
ph = receive(scene); ph = ph{1};
process the ph data with the mti filter using the provided helper function. the resulting matrix will be formatted similarly to the original ph matrix, except it has been filtered along the slow-time dimension and has 2 fewer pulses of data to omit the invalid initial filter outputs. the filter has been normalized by the expected noise gain for easier comparison of the results.
ph_mti = helpermtifilter(ph);
plot the original phase history matrix alongside the filtered matrix.
helperplotphasehistory(ph,ph_mti,rangegates)
in the filtered phase history, the target return is visible above clutter on most pulses.
to average out the small fluctuations in clutter and target power, mti systems will often perform a noncoherent integration of the filtered pulses to form a final range profile. use the pulsint
function to form range profiles from the original ph matrix and the filtered ph matrix. use the provided helper function to plot the range profiles along with the filter response and annotations indicating the target range and radial speed. the doppler spectra before and after filtering are also shown. these spectra are computed by accumulating the power in each doppler bin over all range gates.
rangeprofile = pulsint(ph); rangeprofile_mti = pulsint(ph_mti); helperplotmti(rdrplat,tgtplat,rangeprofile,rangeprofile_mti,rangegates,prf,lambda,ph,ph_mti)
in the original range profile, the target return is not detectable over clutter. in the filtered range profile, a peak at the target range is clearly visible.
the target was separated from the edge of clutter by 500 hz. the signal component at the doppler frequency of the target saw an attenuation by about 10 db while clutter was attenuated by about 21 db at the high-doppler edge, which is the minimum attenuation seen by the mainlobe clutter signal (not including doppler sidelobes). after filtering, the total clutter power in a range bin is dominated by the least-attenuated component of the signal, so the total gain in scr is at least 21-10=11 db. since the clutter rcs was only 8 dbsm greater than the target rcs, this gain in scr is sufficient to detect the target.
now adjust the target velocity to place it 50 hz lower than the high-doppler edge of the clutter return.
tgtclosingrate = (wd/2 - 50)*lambda/2; tgtvel = helpertargetvelocityfromclosing(rdrplat.position,rdrplat.trajectory.velocity,bspos,tgtclosingrate); tgttraj.velocity = tgtvel;
the figure below shows the beam footprint with this slow-moving target.
use the provided helper function to re-run the scenario and collect results.
[rangeprofile,rangeprofile_mti,ph,ph_mti] = helperrunmtiscenario(scene);
plot the resulting range profiles, filter response, and spectra.
helperplotmti(rdrplat,tgtplat,rangeprofile,rangeprofile_mti,rangegates,prf,lambda,ph,ph_mti)
in this case, the target signal is not benefitting from any gain over the clutter signal, and is not detectable.
offset target position
now, without changing the velocity vector, offset the target from the boresight-ground intersection point by 260 m in the x direction. because this is the direction of radar motion, the target is now close to the high-doppler edge of the clutter signal.
tgttraj.position = bspos [260 0 0];
the figure below shows this new geometry.
repeat the simulation and plot the results.
[rangeprofile,rangeprofile_mti,ph,ph_mti] = helperrunmtiscenario(scene); helperplotmti(rdrplat,tgtplat,rangeprofile,rangeprofile_mti,rangegates,prf,lambda,ph,ph_mti)
while not as prominent as in the case of the fast-moving target, a peak corresponding to the target range can be seen thanks to the off-broadside location of the target within the mainlobe.
now, with the target still offset towards the high-doppler edge of the clutter signal, reverse the direction of the target velocity vector.
tgttraj.velocity = -tgttraj.velocity;
[rangeprofile,rangeprofile_mti,ph,ph_mti] = helperrunmtiscenario(scene); helperplotmti(rdrplat,tgtplat,rangeprofile,rangeprofile_mti,rangegates,prf,lambda,ph,ph_mti)
the peak has again disappeared thanks to the opposing influence of the target position within the mainlobe and its velocity vector.
squinted mti simulation
in this section you will simulate mti filtering of squinted beam data in order to inspect the asymmetry in the detectable velocities across range. mainlobe clutter under a squinted beam will exhibit slant: a varying doppler centroid over range. if a single mti filter is used across all range gates, this means that the effectiveness of the filter could vary over range.
the radar mountingangles
property can be used to rotate the radar frame so that the boresight is pointed as desired. the depression angle will be kept constant. use a forward-squinted trajectory. release the radar and set the mounting angles.
azpointing = 10; release(rdr) rdr.mountingangles = [azpointing depressionangle 0];
get the antenna boresight direction, and a ground-projected boresight vector for placing targets on the ground along the same direction.
[bs(1),bs(2),bs(3)] = sph2cart(azpointing*pi/180,-depressionangle*pi/180,1); bsxy = [bs(1:2)/norm(bs(1:2)) 0];
calculate approximate range and doppler clutter centroids from the boresight vector. this will be used to place targets at ranges and dopplers relative to clutter.
centerrange = -altitude/bs(3); centerdop = 2/lambda*rdrspd*cosd(azpointing)*cosd(depressionangle);
select a closing rate that puts the targets 200 hz above the calculated clutter centroid.
tgtclosingrate = (centerdop 200)*lambda/2
tgtclosingrate = 171.5873
place the first target platform along the boresight vector (as in the last section), calculate the required velocity vector, and update the trajectory properties.
tgtrng1 = centerrange; tgtpos1 = sqrt(tgtrng1^2-altitude^2)*bsxy; tgtvel1 = helpertargetvelocityfromclosing(rdrplat.position,rdrplat.trajectory.velocity,tgtpos1,tgtclosingrate); tgttraj.position = tgtpos1; tgttraj.velocity = tgtvel1;
create a second platform and place it 800 m further along the boresight direction, and give it the same closing rate.
tgtrng2 = centerrange 800; tgtpos2 = sqrt(tgtrng2^2-altitude^2)*bsxy; tgtvel2 = helpertargetvelocityfromclosing(rdrplat.position,rdrplat.trajectory.velocity,tgtpos2,tgtclosingrate); tgttraj2 = kinematictrajectory('position',tgtpos2,'velocity',tgtvel2); tgtplat(2) = platform(scene,'trajectory',tgttraj2,'signatures',rcssignature('pattern',tgtrcs));
the figure below shows the location of the beam footprint, targets, and their velocity vectors.
run the simulation and plot the resulting range profiles, filter response, and spectra.
[rangeprofile,rangeprofile_mti,ph,ph_mti] = helperrunmtiscenario(scene,true,centerdop/prf); helperplotmti(rdrplat,tgtplat,rangeprofile,rangeprofile_mti,rangegates,prf,lambda,ph,ph_mti,centerdop)
the first important observation of the range profiles is the inflection point around the center range. the low- and high-range sides of the clutter return were offset from the doppler centroid by a larger amount than in the broadside case, and experienced lower attenuation than the attenuation at the centroid. as such, the target signal at that range is visible in the filtered data. the second target at a greater range is not visible because the clutter return at that range was not attenuated as well.
note that in this scenario, while the platforms are moving at speeds of about 18 and 7 m/s for targets 1 and 2 respectively, their closing rates are both large enough (about 172 m/s) to be ambiguous and appear as if they are moving away from the radar at about 40 m/s. this range-rate ambiguity would typically be resolved by using multiple prfs or by feeding measurements into a tracker.
to better see the range dependence on the clutter doppler spectra, plot the full range-doppler map (rdm) before and after filtering, using the provided helper function. the displayed region will be between 4 and 9 km range and -3.5 to -2 khz to see the data more clearly.
helperplotrdm(ph,ph_mti,rangegates,prf,lambda,rdrplat,tgtplat)
from the rdm it can be seen that much of the clutter signal at the range of the first target (about 6.5 km) has been attenuated below the target signal power, while the clutter signal at the range of the second target has not been as well attenuated.
conclusion
in this example you saw how to configure a radar scenario to generate target and clutter returns appropriate for simulation of mti performance. the effect of target placement and direction of motion with the mainlobe during both broadside and squinted collections was demonstrated.
supporting functions
helpermaketransceiver
function [rdr,bw] = helpermaketransceiver( bw,fc,rangeres,prf ) % this helper function creates a radartransceiver from some basic system % parameters. c = physconst('lightspeed'); rdr = radartransceiver; rdr.transmitantenna.operatingfrequency = fc; rdr.receiveantenna.operatingfrequency = fc; samplerate = c/(2*rangeres); samplerate = prf*round(samplerate/prf); % adjust to match constraint with prf rdr.receiver.samplerate = samplerate; rdr.waveform.samplerate = samplerate; rdr.waveform.pulsewidth = 2*rangeres/c; rdr.waveform.prf = prf; % create a rectangular array with a beamwidth close to the specification n = round(0.8859*2./(bw(:).'*pi/180)); bw = 0.8859*2./n*180/pi; % achieved beamwidth n = flip(n); lambda = freq2wavelen(fc,c); array = phased.ura(n,lambda/2); az = -180:.4:180; el = -90:.4:90; g = pattern(array,fc,az,el,'type','efield','normalize',false); m = 20*log10(abs(g)); p = angle(g); e = phased.customantennaelement('frequencyvector',[fc-1 fc 1],... 'azimuthangles',az,'elevationangles',el,'magnitudepattern',m,'phasepattern',p); rdr.transmitantenna.sensor = e; rdr.receiveantenna.sensor = e; end
helpertargetvelocityfromclosing
function vel = helpertargetvelocityfromclosing( rdrpos,rdrvel,tgtpos,tgtclosingrate ) % calculates the required speed in the -y direction for the target platform % to have the desired closing rate. los = rdrpos(:) - tgtpos(:); los = los/norm(los); spd = (tgtclosingrate dot(rdrvel(:),los))/los(2); vel = [0 spd 0]; end
helpermtifilter
function y = helpermtifilter( x,cdn ) % filter the input x across the second dimension using a second-order % central difference. % filter coefficients h = [1 -2 1]; % if non-zero center doppler, apply phase ramp to filter coefficients if nargin > 1 phi = 2*pi*cdn*(0:numel(h)-1); h = h.*exp(1i*phi); end % run filter and omit invalid output samples y = filter(h,1,x,[],2); y = y(:,numel(h):end); % normalize by the noise gain y = y/sqrt(sum(abs(h).^2)); end
helperplotphasehistory
function helperplotphasehistory( ph,ph_mti,rg ) % this function plots the phase history matrices from before and after mti % filtering figure; set(gcf,'position',get(gcf,'position') [0 0 560 0]) % limit displayed ranges to 10 km maxrange = 10e3; maxgate = find(rg <= maxrange,1,'last'); rg = rg(1:maxgate); ph = ph(1:maxgate,:); ph_mti = ph_mti(1:maxgate,:); numpulses = size(ph,2); subplot(1,2,1) imagesc(1:numpulses,rg/1e3,20*log10(abs(ph))) set(gca,'ydir','normal') cx = caxis; caxis([cx(2)-60 cx(2)]) colorbar xlabel('pulse index') ylabel('range (km)') title('original phase history') subplot(1,2,2) imagesc(3:numpulses,rg/1e3,20*log10(abs(ph_mti))) set(gca,'ydir','normal') cx = caxis; caxis([cx(2)-60 cx(2)]) colorbar xlabel('pulse index') ylabel('range (km)') title('filtered phase history') end
helperplotmti
function helperplotmti( rdrplat,tgtplat,rp,rp_mti,rg,prf,lambda,ph,ph_mti,centerdop ) % this function plots the range profiles from before and after mti % processing, and plots the filter response along with the clutter spectrum % and annotations. fh = figure; % calculate range/doppler to tgt for ind = 1:numel(tgtplat) tgtrng(ind) = norm(rdrplat.position - tgtplat(ind).position); los = (rdrplat.position-tgtplat(ind).position)/tgtrng(ind); tgtclosingrate(ind) = sum((tgtplat(ind).trajectory.velocity-rdrplat.trajectory.velocity).*los); tgtdop(ind) = 2/lambda*tgtclosingrate(ind); end % limit displayed ranges to 10 km maxrange = 10e3; maxgate = find(rg <= maxrange,1,'last'); rg = rg(1:maxgate); rp = rp(1:maxgate); rp_mti = rp_mti(1:maxgate); % range-power plots subplot(1,2,1) % plot range profiles hndls1(1) = plot(rg/1e3,20*log10(rp)); % original hold on hndls1(2) = plot(rg/1e3,20*log10(rp_mti)); % filtered % plot truth target ranges for ind = 1:numel(tgtrng) hndls1(3) = line([1 1]*tgtrng(ind)/1e3,ylim,'color','magenta','linestyle','--'); end hold off grid on xlabel('range (km)') ylabel('power (dbw)') set(gca,'children',flip(get(gca,'children'))) legend(hndls1,{'original','filtered','target range'},'location','northwest') % spectrum plots subplot(1,2,2) % plot filter response h = [1 -2 1]; if nargin > 9 phi = 2*pi*centerdop/prf*(0:numel(h)-1); h = h.*exp(1i*phi); end f = linspace(-prf/2,prf/2,1e3); rr = -lambda/2*f; hresp = freqz(h,1,f,prf); hresp = hresp/sqrt(sum(h.^2)); % normalize to keep noise floor constant hresp = 20*log10(abs(hresp)); hndls2(1) = plot(rr,hresp,'black','linewidth',1.2); mn = max(max(hresp)-60,min(hresp)); % limit to 60 db down ylim([mn max(hresp)]) hold on % plot annotation at tgt rr tgtdop = mod(tgtdop prf/2,prf)-prf/2; tgtrr = -tgtdop*lambda/2; for ind = 1:numel(tgtrr) hndls2(2) = line([1 1]*tgtrr(ind),ylim,'color','magenta','linestyle','--'); end xlabel('range rate (m/s)') ylabel('filter response (db)') % get before/after doppler spectra and plot numpulses = size(ph,2); rrbins = -(-prf/2:prf/numpulses:(prf/2-prf/numpulses))*lambda/2; rdm = fftshift(fft(ph,[],2),2); dopspec = sum(abs(rdm).^2,1); numpulses_mti = size(ph_mti,2); rrbins_mti = -(-prf/2:prf/numpulses_mti:(prf/2-prf/numpulses_mti))*lambda/2; rdm_mti = fftshift(fft(ph_mti,[],2),2); dopspec_mti = sum(abs(rdm_mti).^2,1); yyaxis right hndls2(3) = plot(rrbins,10*log10(abs(dopspec)),'color',hndls1(1).color,'linestyle','-'); hndls2(4) = plot(rrbins_mti,10*log10(abs(dopspec_mti)),'color',hndls1(2).color,'linestyle','-'); hold off grid on ylabel('power (dbw)') set(gca,'ycolor','black') legend(hndls2,{'filter response','target','original spectrum','filtered spectrum'},'location','best') set(fh,'position',get(fh,'position') [0 0 560 0]) end
helperrunmtiscenario
function [ rp,rp_mti,ph,ph_mti,rdm ] = helperrunmtiscenario( scene,dorestart,centerdopnorm ) if nargin < 2 dorestart = true; end if nargin < 3 centerdopnorm = 0; end if dorestart restart(scene) end % call scenario receive method ph = receive(scene); ph = ph{1}; % perform mti filtering ph_mti = helpermtifilter(ph,centerdopnorm); % generate before/after range profiles rp = pulsint(ph); rp_mti = pulsint(ph_mti); % perform doppler processing rdm = fftshift(fft(ph,[],2),2); end
helperplotrdm
function helperplotrdm( ph,ph_mti,rg,prf,lambda,rdrplat,tgtplat ) figure; set(gcf,'position',get(gcf,'position') [0 0 560 0]) % calculate range/doppler to tgt for ind = 1:numel(tgtplat) tgtrng(ind) = norm(rdrplat.position - tgtplat(ind).position); los = (rdrplat.position-tgtplat(ind).position)/tgtrng(ind); tgtclosingrate(ind) = sum((tgtplat(ind).trajectory.velocity-rdrplat.trajectory.velocity).*los); tgtdop(ind) = 2/lambda*tgtclosingrate(ind); end tgtdop = mod(tgtdop prf/2,prf)-prf/2; % limit displayed ranges to 3-10 km maxrange = 9e3; minrange = 4e3; maxgate = find(rg <= maxrange,1,'last'); mingate = find(rg >= minrange,1,'first'); rg = rg(mingate:maxgate); ph = ph(mingate:maxgate,:); ph_mti = ph_mti(mingate:maxgate,:); maxdop = -2e3; subplot(1,2,1) rdm = fftshift(fft(ph,[],2),2); numpulses = size(ph,2); dopbins = -prf/2:prf/numpulses:prf/2-prf/numpulses; maxdopbin = find(dopbins <= maxdop,1,'last'); imagesc(dopbins(1:maxdopbin),rg/1e3,20*log10(abs(rdm(:,1:maxdopbin)))) for ind = 1:numel(tgtplat) line(xlim,[1 1]*tgtrng(ind)/1e3,'color','magenta','linestyle','--') line([1 1]*tgtdop(ind),ylim,'color','magenta','linestyle','--') end set(gca,'ydir','normal') cx = caxis; caxis([cx(2)-60 cx(2)]) colorbar xlabel('doppler (hz)') ylabel('range (km)') title('original rdm') subplot(1,2,2) rdm_mti = fftshift(fft(ph_mti,[],2),2); numpulses_mti = size(ph_mti,2); dopbins_mti = -prf/2:prf/numpulses_mti:prf/2-prf/numpulses_mti; maxdopbin = find(dopbins_mti <= maxdop,1,'last'); imagesc(dopbins_mti(1:maxdopbin),rg/1e3,20*log10(abs(rdm_mti(:,1:maxdopbin)))) for ind = 1:numel(tgtplat) line(xlim,[1 1]*tgtrng(ind)/1e3,'color','magenta','linestyle','--') line([1 1]*tgtdop(ind),ylim,'color','magenta','linestyle','--') end set(gca,'ydir','normal') cx = caxis; caxis([cx(2)-60 cx(2)]) colorbar xlabel('doppler (hz)') ylabel('range (km)') title('filtered rdm') end