introduction to radar scenario clutter simulation -凯发k8网页登录
this example shows how to generate monostatic surface clutter signals and detections in a radar scenario. clutter detections will be generated with a monostatic radardatagenerator
, and clutter return signals will be generated with a radartransceiver,
using both homogenous surfaces and real terrain data from a dted file. theaterplot
is used to visualize the scenario surface and clutter generation.
configure scenario for clutter generation
configuration of a radar scenario to simulate surface clutter involves creating a radarscenario
object, adding platforms with mounted radars, adding surface objects that define the physical properties of the scenario surface, and enabling clutter generation for a specific radar in the scene.
select a radar model
clutter generation is performed as part of the scenario detect
and receive
methods. these methods are used to generate simulated radar detections and iq signals, respectively. for detections, which consist of measurement-level data along with useful metadata, use the radardatagenerator
. for raw iq signals, use the radartransceiver
.
this section begins with a radardatagenerator
. define some typical medium-prf pulse-doppler parameters for a side-looking airborne radar. use a -90 degree mounting yaw angle so the radar faces to the right of the platform and a 10 degree depression angle so the radar is pointed towards the surface. the mounting roll angle can be 0 to indicate no rotation about the antenna boresight. use a center frequency of 4 ghz, range resolution of 80 m, and a 12 khz prf with 128 pulses per coherent processing interval (cpi).
mountang = [-90 10 0]; fc = 4e9; rngres = 80; prf = 12e3; numpulses = 128;
the radardatagenerator
is a statistical model that does not directly emulate an antenna pattern. instead, it has properties that define the field of view and angular resolution. use 10 degrees for the field of view and angular resolution in each direction. this configuration is comparable to simulating a single mainlobe with no angle estimation.
fov = [10 10]; angres = fov;
construct a radardatagenerator
from these parameters. the radar updates once per cpi. the mounting angles point the radar in a broadside direction. let the field of view and angular resolution equal the beamwidth. set detectioncoordinates
to 'scenario'
to output detections in scenario coordinates for easier inspection of the results. calculate the unambiguous range and radial speed and enable range and range-rate ambiguities for the radar. the ambiguities can be calculated with the time2range
and dop2speed
functions.
c = physconst('lightspeed'); lambda = freq2wavelen(fc); rangerateres = lambda/2*prf/numpulses; unambrange = time2range(1/prf); unambradialspd = dop2speed(prf/4,lambda); cpitime = numpulses/prf; rdr = radardatagenerator(1,'no scanning','updaterate',1/cpitime,'mountingangles',mountang,... 'detectioncoordinates','scenario','hasins',true,'haselevation',true,'hasfalsealarms',false, ... 'hasrangerate',true,'hasrangeambiguities',true,'hasrangerateambiguities',true, ... 'maxunambiguousradialspeed',unambradialspd,'maxunambiguousrange',unambrange,'centerfrequency',fc, ... 'fieldofview',fov,'azimuthresolution',angres(1),'elevationresolution',angres(2), ... 'rangeresolution',rngres,'rangerateresolution',rangerateres);
create a scenario
the radarscenario
object is the top-level manager for the simulation. a radar scenario may be earth-centered, where the wgs84 earth model is used, or it may be flat. use a flat-earth scenario to enable use of simple kinematic trajectories for the platforms. set updaterate
to 0 to let the scenario derive an update rate from the objects in the scenario.
scenario = radarscenario('updaterate',0,'isearthcentered',false);
add a radar platform to the scenario. use a straight-line kinematic trajectory starting 1.5 km up, and moving in the y direction at 70 m/s, at a dive angle of 10 degrees. orient the platform so the platform-frame x direction is the direction of motion. use the sensors
property to mount the radar.
rdralt = 1.5e3; rdrspd = 70; rdrdiveang = 10; rdrpos = [0 0 rdralt]; rdrvel = rdrspd*[0 cosd(rdrdiveang) -sind(rdrdiveang)]; rdrorient = rotz(90).'; rdrtraj = kinematictrajectory('position',rdrpos,'velocity',rdrvel,'orientation',rdrorient); rdrplat = platform(scenario,'sensors',rdr,'trajectory',rdrtraj);
define the scenario surface
physical properties of the scenario surface can be specified by using the scenario landsurface
and seasurface
methods to define regions of land and sea surface types. each surface added to the scene is a rectangular region with an associated radar reflectivity model and reference height. land surfaces may additionally have associated static terrain data, and sea surfaces may have an associated spectral motion model. if no terrain data or spectral model is used, a surface may be unbounded, allowing for homogeneous clutter generation.
create a simple unbounded land surface with a constant-gamma reflectivity model. use the surfacereflectivityland
function to create a reflectivity model and attach the reflectivity model to the surface with the radarreflectivity
parameter. use a gamma value of -20 db.
refl = surfacereflectivityland('model','constantgamma','gamma',-20); srf = landsurface(scenario,'radarreflectivity',refl)
srf = landsurface with properties: radarreflectivity: [1x1 surfacereflectivityland] reflectivitymap: 1 referenceheight: 0 boundary: [2x2 double] terrain: []
the referenceheight
property gives the constant height of the surface when no terrain is specified, or the origin height to which terrain is referenced if terrain is specified. the reflectivitymap
property is relevant only when a custom reflectivity model is used, and allows different reflectivity curves to be associated to different parts of the surface. the boundary
property gives the rectangular boundary of the surface in two-point form. elements of boundary
can be /-inf to indicate the surface is unbounded in one or more directions. check the boundary of the surface created above to see that it is unbounded in all directions.
srf.boundary
ans = 2×2
-inf inf
-inf inf
access the surfacemanager
property of the scenario to see the surface objects that have been added, as well as any additional options related to the scenario surface.
scenario.surfacemanager
ans = surfacemanager with properties: useocclusion: 1 surfaces: [1x1 radar.scenario.landsurface]
the useocclusion
property can be set false to disable line-of-sight occlusions by the surface, such as by terrain.
enable clutter generation
clutter generator
monostatic clutter generation is enabled for a specific radar by using the scenario cluttergenerator
method. this method accepts parameter name-value pairs to configure clutter generation. this configuration is performed on a radar-by-radar basis so that multiple radars can be simulated simultaneously with clutter generation settings appropriate for each radar. the cluttergenerator
method will return a handle to the cluttergenerator
object.
reflections from large continuous surfaces are approximated by a set of point scatterers. by default, the cluttergenerator
operates in "uniform" scatterer distribution mode. in this mode, scatterers are placed randomly with a uniform density on the surface. this is a flexible mode that can be used for any surface and radar configuration. see the section below titled "simulate smooth surface clutter for a range-doppler radar" for a demonstration of a different scatterer distribution mode that can adapt to range-doppler resolution cells under some scenario constraints. when operating in uniform scatterer distribution mode, the resolution
property specifies the nominal spacing of clutter scatterers used to represent the surface reflection.
the usebeam
property is a logical scalar indicating whether or not automatic mainlobe clutter generation should be used (see the next section titled "clutter regions" for more details). the rangelimit
property is used to place an upper bound on the range of clutter generation, which is important for cases when mainlobe clutter generation is being used and has an unbounded footprint.
create a cluttergenerator
object, enabling clutter generation for the radar created above. use a resolution
of half the radar's range resolution in order to get a couple of clutter scatterers per range sample. set usebeam
to true to enable automatic clutter generation within the field of view of the radar. use a rangelimit
of 12 km, which is just shorter than the unambiguous range.
clutres = rngres/2; clutrnglimit = 12e3; clut = cluttergenerator(scenario,rdr,'resolution',clutres,'usebeam',true,'rangelimit',clutrnglimit)
clut = cluttergenerator with properties: scattererdistribution: "uniform" resolution: 40 regions: [1x0 radar.scenario.ringclutterregion] usebeam: 1 useshadowing: 1 rangelimit: 12000 radar: [1x1 radardatagenerator] seedsource: "auto"
the useshadowing
property is a logical scalar used to enable/disable shadowing (surface self-occlusion). shadowing is only relevant for surfaces with terrain data or a spectral model.
the clutter generator has two read-only properties. the radar
property stores a handle to the associated radar object, which was passed to the cluttergenerator
method. the regions
property contains the set of user-defined "clutter regions".
clutter regions
surface clutter is distributed over the entire range interval starting from the radar altitude and extending to the horizon range (or if using a flat-earth scenario). it is distributed in elevation angle from -90 degrees up to the horizon elevation angle, and over all 360 degrees of azimuth. finally, surface clutter is distributed in doppler as a result of platform motion.
there are two options available to designate regions of the surface for clutter generation. the first is automatic mainlobe clutter, which generates clutter inside the footprint of the mainlobe of the radar antenna. this is only possible when the radar being used has a well-defined beam with azimuth and elevation two-sided beamwidths less than 180 degrees. for the radardatagenerator
, the "beam" is actually the field of view defined by the fieldofview
property, the footprint of which consists of contours of constant azimuth and elevation angle. for the radartransceiver
, a conical or fan-shaped beam is assumed based on the array type, and the beam is considered out to 3 db below the peak gain.
the second option is to use the ringclutterregion
method of the clutter generator to specify a ring-shaped region of the scenario surface within which clutter is to be generated. this type of region is defined by a minimum and maximum ground range (relative to the radar nadir point) and an extent and center angle in azimuth. this region type is useful for capturing sidelobe and backlobe clutter return, mainlobe clutter return outside the 3 db width, or to generate clutter from any other region of interest, such as at the location of a target platform.
the figure below illustrates these two region types. the beam footprint region is displayed as a magenta ellipse where the beam intersects the ground. two ring regions are shown, one directly underneath the radar for capturing altitude return, and another for capturing some backlobe clutter return.
to demonstrate the utility of the customizable ring-shaped regions at capturing clutter return from arbitrary lobes of the antenna pattern, the above geometry is shown again below in a top-down view, with a gain pattern projected onto the ground. note that a significant backlobe has been encompassed by a ring region. a circular region (which can be achieved by setting the minimum ground range to 0) can be used to capture altitude return. an additional region encompassing the mainlobe is also shown to demonstrate how this can be used to capture more of the mainlobe return, such as from null to null.
the radardatagenerator
is a statistics-based detectability simulator, and only simulates mainlobe detections within the field of view. as such, having usebeam
of the cluttergenerator
set to true is sufficient to completely capture the effect of clutter interference on the detectability of target platforms when using a radardatagenerator
.
visualize and run scenario
theater plotter
the theaterplot
object can be used along with a variety of theater plotters to create customizable visual representations of the scenario. start by creating the theater plot.
tp = theaterplot;
now create plotter objects for the scenario surface, clutter regions, and resulting radar detections. the values specified for the displayname
properties are used for the legend entries.
surfplotter = surfaceplotter(tp,'displayname','scenario surface'); clutplotter = clutterregionplotter(tp,'displayname','clutter region'); detplotter = detectionplotter(tp,'displayname','radar detections','marker','.','markeredgecolor','magenta','markersize',4);
now that the scenario, clutter generator, and plotters are configured, use the detect
method on the scenario to simulate a single frame and collect detections.
dets = detect(scenario);
plot the clutter region, which in this case is simply the beam footprint, along with the detection positions. since the land surface used here is unbounded, the plotsurface
call should come last so that the surface plot extends over the appropriate axis limits. the clutterregiondata
method on the clutter generator is used to get plot data for the clutter region plotter. similarly, for the surface plotter, the surfaceplotterdata
method on the scenario surface manager is used.
plotclutterregion(clutplotter,clutterregiondata(clut))
detpos = cell2mat(cellfun(@(t) t.measurement(1:3).',dets,'uniformoutput',0));
plotdetection(detplotter,detpos)
plotsurface(surfplotter,surfaceplotterdata(scenario.surfacemanager))
the detection positions can be seen arranged along radial lines corresponding to the radar's azimuth and doppler resolution bins. the radardatagenerator
adds noise to the positions of detections, so may return detections with positions that fall outside the beam footprint.
simulate clutter iq signals
now you will create a radartransceiver
with similar radar system parameters and simulate clutter at the signal level. the function helpermaketransceiver
is provided to quickly create a transceiver with the desired system parameters.
define the desired beamwidth. for comparison to the above scenario, simply let the beamwidth equal the field of view that was used.
beamwidth3db = fov;
the resulting radartransceiver
will use a phased.customantennaelement
to approximate a uniform rectangular array with the specified beamwidth, which is recommended to speed up simulations when only a sum beam is needed.
usecustomelem = true; rdriq = helpermaketransceiver(beamwidth3db,fc,rngres,prf,usecustomelem);
use the same mounting angles and number of pulses as before.
rdriq.mountingangles = mountang; rdriq.numrepetitions = numpulses;
re-create the same scenario, using this new radar model. start by calling release
on system objects that will be re-used.
release(rdrtraj) scenario = radarscenario('updaterate',0,'isearthcentered',false); platform(scenario,'sensors',rdriq,'trajectory',rdrtraj); landsurface(scenario,'radarreflectivity',refl);
enable clutter generation for the radar. this time, disable the beam footprint clutter region in favor of a custom ring-shaped region.
cluttergenerator(scenario,rdriq,'resolution',clutres,'usebeam',false,'rangelimit',clutrnglimit);
if the cluttergenerator
method was called without any output argument, as above, the handle to the constructed cluttergenerator
may still be found with the scenario getcluttergenerator
method by passing in a handle to the associated radar.
clut = getcluttergenerator(scenario,rdriq);
after creating the cluttergenerator
, you can use the ringclutterregion
method to create a null-to-null footprint region for clutter generation. use a simple estimate of the null-to-null beamwidth as about 2.5 times the 3 db beamwidth, then find the minimum elevation angle to encompass the near edge of the beam, and finally convert that to a minimum ground range for the region.
beamwidthnn = 2.5*beamwidth3db; minel = -mountang(2) - beamwidthnn(2)/2; minrad = -rdralt/tand(minel);
for the max radius parameter, simply find the ground range corresponding to the clutter range limit specified earlier.
maxrad = sqrt(clut.rangelimit^2 - rdralt^2);
the azimuth span will equal the null-to-null beamwidth, and the azimuth center will be 0 degrees since the beam is pointing along the x direction in scenario coordinates.
azspan = beamwidthnn(1); azc = 0; ringclutterregion(clut,minrad,maxrad,azspan,azc)
ans = ringclutterregion with properties: minradius: 3.6213e 03 maxradius: 1.1906e 04 azimuthspan: 25 azimuthcenter: 0
using the provided helper function, plot the ground-projected antenna pattern along with the ring clutter region you just created. the ring region created above nicely encompasses the entire mainlobe.
helperplotgroundprojectedpattern(clut)
run the simulation again for one frame, this time using the scenario receive
method to simulate iq signals.
iqsig = receive(scenario); ph = iqsig{1};
since the radartransceiver
used a single custom element, the resulting signal will be formatted with fast-time samples along the first dimension and pulse index (slow time) along the second dimension. this is the phase history (ph) matrix. plot a dc-centered range-doppler map (rdm) using the helperplotrdm
function.
figure helperplotrdm(ph,rngres,prf,numpulses)
use the provided helper function to re-create the theater plot visualization and view the ring clutter region.
helpertheaterplot(clut)
simulate surface range profiles for a scanning radar
the automatic mainlobe clutter option supports scanning radars. in this section you will re-create the scenario to use a stationary scanning linear array that collects a single pulse per scan position. you will add a few stationary surface targets and view the resulting range profiles.
start by re-creating the radar object. this time, only pass the azimuth beamwidth to the helper function, which indicates a linear array should be used. the custom element cannot be used for a linear array if the automatic mainlobe clutter option is being used, so that the cluttergenerator
has knowledge of the array geometry. reduce the range resolution to 40 meters to reduce the clutter power in gate.
usecustomelem = false; rngres = 40; rdriq = helpermaketransceiver(beamwidth3db(1),fc,rngres,prf,usecustomelem);
set the same mounting angles as used earlier, and configure the transceiver for 1 repetition, which indicates a single pulse per scan position.
numpulses = 1; rdriq.mountingangles = mountang; rdriq.numrepetitions = numpulses;
now configure an electronic sector scan. set the scanning limits to cover 30 degrees in azimuth, with no elevation scanning. setting the scan rate to the prf indicates a single pulse per scan position.
rdriq.electronicscanmode = 'sector';
rdriq.electronicscanlimits = [-15 15;0 0];
rdriq.electronicscanrate = [prf; 0];
re-create the scenario and platform. set the scenario stop time to run 1 full scan. use a homogeneous unbounded land surface with the same reflectivity model as used earlier.
scenario = radarscenario('updaterate',0,'isearthcentered',false,'stoptime',30/prf); platform(scenario,'sensors',rdriq,'position',rdrpos,'orientation',rotz(90).'); landsurface(scenario,'radarreflectivity',refl);
enable clutter generation, using only the 3 db beam footprint for clutter generation.
cluttergenerator(scenario,rdriq,'resolution',clutres,'usebeam',true,'rangelimit',clutrnglimit);
add three bright point targets spaced 2 km apart along the cross-range direction at a down-range of 8 km.
tgtrcs = 40; % dbsm platform(scenario,'position',[8e3 -2e3 0],'signatures',rcssignature('pattern',tgtrcs)); platform(scenario,'position',[8e3 0 0],'signatures',rcssignature('pattern',tgtrcs)); platform(scenario,'position',[8e3 2e3 0],'signatures',rcssignature('pattern',tgtrcs));
run the simulation, collecting the range profile at each scan position, and plotting with a scenario overview. use the info
output from receive
to record the look angle used by the radar on each frame.
rangegates = 0:rngres:(unambrange-rngres); frame = 0; while advance(scenario) frame = frame 1; [iqsig,info] = receive(scenario); lookang(:,frame) = info.electronicangle; rangeprofiles(:,frame) = 20*log10(abs(sum(iqsig{1},2))); if frame == 1 % initial plotting ax(1) = subplot(1,2,1); helperplotclutterscenario(scenario,[],[],ax(1)) ax(2) = subplot(1,2,2); rphndl = plot(ax(2),rangegates/1e3,rangeprofiles(:,frame)); thndl=title(sprintf('frame: %d, azimuth: %.1f deg',frame,lookang(1,frame))); grid on xlabel('range (km)') ylabel('range profile (dbw)') else % update plots helperplotclutterscenario(scenario,[],[],ax(1)) rphndl.ydata = rangeprofiles(:,frame); thndl.string = sprintf('frame: %d, azimuth: %.1f deg',frame,lookang(1,frame)); end drawnow limitrate nocallbacks end
plot the range profiles against range and azimuth scan angle.
figure imagesc(lookang(1,:),rangegates/1e3,rangeprofiles); set(gca,'ydir','normal') xlabel('azimuth scan angle (deg)') ylabel('range (km)') title('clutter range profiles (dbw)') colorbar
the three target signals are barely visible around 8 km range.
simulate smooth surface clutter for a range-doppler radar
up till now you have simulated surface clutter using the "uniform" scatterer distribution mode. for flat-earth scenarios, the radartransceiver
radar model, and smooth surfaces (no terrain or spectral model associated with the surface), a faster range-doppler-adaptive mode is available which uses a minimal number of clutter scatterers and a more accurate calculation of the clutter power in each range-doppler resolution cell.
re-create the radartransceiver, again with a linear array. the automatic mainlobe region will not be used in this section, so use a custom element to speed things up.
usecustomelem = true; rdriq = helpermaketransceiver(beamwidth3db(1),fc,rngres,prf,usecustomelem);
this time, instead of scanning, you will just simulate a single frame with 128 pulses, and perform doppler processing. the numrepetitions
property, along with the specified prf, determines the doppler resolution of the adaptive scatterers.
numpulses = 128; rdriq.mountingangles = mountang; rdriq.numrepetitions = numpulses;
create the scenario as before with the simple homogenous surface.
scenario = radarscenario('updaterate',0,'isearthcentered',false); landsurface(scenario,'radarreflectivity',refl);
the radar is again flying in the y direction while facing in the x direction.
release(rdrtraj) platform(scenario,'sensors',rdriq,'trajectory',rdrtraj);
enable clutter generation. to use the range-doppler-adaptive scatterers, specify "rangedopplercells"
for the scattererdistribution
property. to encompass the three targets, use a ring-shaped region with 60 degrees of azimuth span, and the same min/max radius used earlier.
clut = cluttergenerator(scenario,rdriq,'scattererdistribution','rangedopplercells','usebeam',false,'rangelimit',clutrnglimit); ringclutterregion(clut,minrad,maxrad,60,0);
add the same three bright targets.
platform(scenario,'position',[8e3 -2e3 0],'signatures',rcssignature('pattern',tgtrcs)); platform(scenario,'position',[8e3 0 0],'signatures',rcssignature('pattern',tgtrcs)); platform(scenario,'position',[8e3 2e3 0],'signatures',rcssignature('pattern',tgtrcs));
run the simulation for a single frame, form the sum beam, and plot the rdm.
iqsig = receive(scenario); ph = iqsig{1}; helperplotrdm(ph,rngres,prf,numpulses);
the targets are more visible than in the range-angle case thanks to the doppler spreading of clutter. with such a large clutter region, the same scenario could be expected to take upwards of 35x longer to simulate with the uniform scatterer distribution.
clutter from terrain data
in the previous sections, you simulated homogeneous clutter from an unbounded flat surface. in this section, you will use a dted file to simulate clutter return from real terrain data in an earth-centered scenario. you will collect two frames of clutter return - one with shadowing enabled and one without shadowing, and compare the results.
start by creating the scenario, this time setting the isearthcentered
flag to true in order to use a dted file, which consists of surface height samples over a latitude/longitude grid.
scenario = radarscenario('updaterate',0,'isearthcentered',true);
again use the landsurface
method, passing in the name of the desired dted file for the value of the terrain
parameter. the boundary
parameter can be used to constrain the domain of the loaded data. in general, as little of the terrain data should be loaded as needed for the specific application. in this case, you will use a 0.15-by-0.15 degree section of dted that is referenced to a given latitude-longitude coordinate.
reflla = [39.43; -105.84]; bdry = reflla [0 1;-1/2 1/2]*0.15;
continue using the same constant-gamma reflectivity model. use an output argument to get a handle to the created surface object.
srf = landsurface(scenario,'terrain','n39_w106_3arc_v2.dt1','boundary',bdry,'radarreflectivity',refl);
use the surface height
method to place the platform above the reference point at the altitude specified earlier.
srfheight = height(srf,reflla); rdralt = srfheight rdralt; rdrpos1 = [reflla; rdralt];
in this scenario, the radar will travel in a straight line west at the same speed used earlier.
rdrvelwest = [-rdrspd 0 0];
earth-centered scenarios require trajectory information to be specified with waypoints in latitude/longitude/altitude (lla) format using the geotrajectory
object. set the referenceframe
to enu, and use the enu2lla function to find the second waypoint corresponding to the desired velocity vector. if the orientation of the platform is not specified, it will be set automatically such that the platform x direction corresponds to the direction of motion (west). as such, the -90 degree mounting yaw angle will point the radar north.
toa = [0;1]; % times of arrival at each waypoint rdrpos2 = enu2lla(rdrvelwest,rdrpos1.','ellipsoid').'; rdrtrajgeo = geotrajectory('waypoints',[rdrpos1, rdrpos2].','timeofarrival',toa,'referenceframe','enu'); platform(scenario,'sensors',rdriq,'trajectory',rdrtrajgeo);
create the clutter generator. surface shadowing is enabled by default.
clut = cluttergenerator(scenario,rdriq,'resolution',clutres,'usebeam',false,'rangelimit',clutrnglimit);
create a ring-shaped region with the same parameters as earlier. for earth-centered scenarios, azimuth angles in scenario coordinates are referenced clockwise from north, so an azimuth center of 0 here still coincides with the radar's look direction.
ringclutterregion(clut,minrad,maxrad,azspan,azc);
simulate clutter return for one frame and save the resulting phase history.
iqsig = receive(scenario); ph_withshadowing = iqsig{1};
the theater plot does not support visualizations of earth-centered scenarios, so use the provided helper function to show a scenario overview in a local enu frame. this time, the terrain is plotted along with the radar frame and clutter patches. notice the shadowed region can be seen in the plot as a gap in the clutter patches (cyan). those patches are obstructed by other parts of the terrain that are closer to the radar.
helperplotclutterscenario(scenario)
title('clutter patches - with terrain shadowing')
to see the difference when shadowing is not used, turn shadowing off, run the simulation for another frame, and save the result.
clut.useshadowing = false; iqsig = receive(scenario); ph_noshadowing = iqsig{1};
plot the scenario overview and notice that some of the clutter region has been filled in with clutter patches. notice there are still some gaps visible. this is because clutter patches that are facing away from the radar, such as if they are on the other side of a hill, will never be visible, regardless of the value of the useshadowing
property.
helperplotclutterscenario(scenario)
title('clutter patches - without terrain shadowing')
now to see the effect of shadowing in the rdm, plot the clutter return signals recorded previously side-by-side.
figure subplot(1,2,1) helperplotrdm(ph_withshadowing,rngres,prf,numpulses) title('rdm - with terrain shadowing') subplot(1,2,2) helperplotrdm(ph_noshadowing,rngres,prf,numpulses) title('rdm - without terrain shadowing') set(gcf,'position',get(gcf,'position') [0 0 560 0])
while both cases have "blank" regions due to hills that slope away from the radar, there is also a significant amount of surface return that is visible in the right figure and not visible in the left due to shadowing.
shadowing is an important phenomenon when simulating clutter return from real surfaces, but it may be disabled for analysis purposes or if not needed.
conclusion
in this example, you saw how to configure a radar scenario to include clutter return as part of the detect
and receive
methods, generating clutter detections and iq signals with the radardatagenerator
and radartransceiver
, respectively. you saw how to define a region of the scenario surface with an associated reflectivity model, and how to specify regions of interest for clutter generation. surface shadowing is simulated when generating clutter returns from surfaces with terrain, and a faster range-doppler-adaptive mode can be used for flat-earth scenarios with smooth surfaces.
supporting functions
helpertheaterplot
function helpertheaterplot(clut,params) arguments clut params.parent = [] params.detections = [] params.showpatches = false end if isempty(params.parent) % make new figure for theater plot figure tp = theaterplot('parent',gca); else % use specified axes cla(params.parent) tp = theaterplot('parent',params.parent); end % find targets tgts = clut.scenario.platforms(2:end); if ~isempty(tgts) tgtpos = cell2mat(cellfun(@(t) t.position,tgts.','uniformoutput',0)); end % get detection positions if ~isempty(params.detections) detpos = cell2mat(cellfun(@(t) t.measurement(1:3).',params.detections,'uniformoutput',0)); end % make plotters if ~isempty(tgts) platplotter = platformplotter(tp,'displayname','target','marker',' ','markeredgecolor','r'); end if ~isempty(params.detections) detplotter = detectionplotter(tp,'displayname','radar detections','marker','.','markeredgecolor','magenta','markersize',4); end clutplotter = clutterregionplotter(tp,'displayname','clutter region','showpatchcenters',params.showpatches); surfplotter = surfaceplotter(tp,'displayname','scenario surface'); % do plotting if ~isempty(tgts) plotplatform(platplotter,tgtpos); end plotheight = 1; plotclutterregion(clutplotter,clutterregiondata(clut,plotheight)) if ~isempty(params.detections) plotdetection(detplotter,detpos) end plotsurface(surfplotter,surfaceplotterdata(clut.scenario.surfacemanager)) end
helpermaketransceiver
function rdr = helpermaketransceiver( bw,fc,rangeres,prf,usecustomelem ) % this helper function creates a radartransceiver from some basic system % parameters. c = physconst('lightspeed'); rdr = radartransceiver; rdr.transmitantenna.operatingfrequency = fc; rdr.receiveantenna.operatingfrequency = fc; rdr.waveform.prf = prf; 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; if isempty(bw) % use an isotropic element rdr.transmitantenna.sensor = phased.isotropicantennaelement; rdr.receiveantenna.sensor = phased.isotropicantennaelement; else % get the number of elements required to meet the specified beamwidth sinc3db = 0.8859; n = round(sinc3db*2./(bw(:).'*pi/180)); n = flip(n); lambda = freq2wavelen(fc,c); if numel(n) == 1 % use a back-baffled ula array = phased.ula(n,lambda/2); array.element.backbaffled = true; else % use ura array = phased.ura(n,lambda/2); end if usecustomelem % use a custom element corresponding to the sum beam 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; else rdr.transmitantenna.sensor = array; rdr.receiveantenna.sensor = array; end end end
helperplotgroundprojectedpattern
function helperplotgroundprojectedpattern( clut ) % input a cluttergenerator that has an associated radartransceiver. plots % the clutter regions and ground-projected gain pattern. assumes a flat % infinite ground plane at z=0. naz = 360*4; nel = 90*4; % force update the patch generator sensor data clut.patchgenerator.updatesensordata(clut.platform,clut.radar,clut.scenario.simulationtime,clut.usebeam); pos = clut.patchgenerator.sensordata.position; fc = clut.patchgenerator.sensordata.centerfrequency; b = clut.patchgenerator.sensordata.sensorframe; maxgndrng = clut.rangelimit; % get azimuth/elevation grid in scenario coordinates azscen = linspace(-180,180,naz); maxel = -atand(pos(3)/maxgndrng); elscen = linspace(-90,maxel,nel); % convert az/el to sensor frame [losxscen,losyscen,loszscen] = sph2cart(azscen*pi/180,elscen.'*pi/180,1); r = b.'; losx = r(1,1)*losxscen r(1,2)*losyscen r(1,3)*loszscen; losy = r(2,1)*losxscen r(2,2)*losyscen r(2,3)*loszscen; losz = r(3,1)*losxscen r(3,2)*losyscen r(3,3)*loszscen; [az,el,~] = cart2sph(losx,losy,losz); az = az*180/pi; el = el*180/pi; % get gain pattern sensor = clut.radar.transmitantenna.sensor; g = sensor(fc,[az(:) el(:)].'); g = reshape(g,size(az)); g = g/max(g(:)); rtg = -pos(3)./loszscen; surf(losxscen.*rtg,losyscen.*rtg,zeros(size(az)),20*log10(abs(g))) axis equal shading flat view(0,90) clim([-60 0]) hold on for reg = clut.regions helperplotclutterregion(reg,pos); end hold off end
helperplotrdm
function helperplotrdm( ph,rangeres,prf,numpulses ) % this helper function forms and plots an rdm from a phase history matrix c = physconst('lightspeed'); % form dc-centered rdm and convert to dbw rdm = fftshift(fft(ph,[],2),2); rdm = 20*log10(abs(rdm)); % range and doppler bins rngbins = 0:rangeres:c/(2*prf); dopbins = -prf/2:prf/numpulses:prf/2-prf/numpulses; % plot imagesc(dopbins,rngbins/1e3,rdm); set(gca,'ydir','normal') xlabel('doppler (hz)') ylabel('range (km)') mx = max(rdm(:)); if ~isinf(mx) clim([mx-60 mx]); end colorbar end