Waveform-Level Simulation of Land Clutter for Curved-Earth Scenarios
R2026bThis example shows how to simulate detections of aerial targets in the presence of land surface clutter. First, you will learn how to set up a curved-Earth radar scenario with surface clutter and define targets of interest. Then, you will configure a waveform-level radar model to detect the targets. Finally, you will analyze the range-Doppler response of the radar.
Create a Scenario with a Land Surface
Create a curved Earth radarScenario by setting IsEarthCentered to true to enable an Earth-centered reference frame based on the WGS84 ellipsoid model. Platform trajectories in the scenario are relative to the ellipsoid in geodetic latitude, longitude, and altitude coordinates. You need to use this workflow when Earth's curvature is relevant to the simulation, for instance when the scenario covers tens of kilometers.
scnro = radarScenario(IsEarthCentered=true);
Next, add a land surface to the scenario. You can load in digital elevation terrain data to model the terrain for the land surface. This example loads the region around the Denali mountain in Alaska.
The loaded height map is derived from the GMTED2010 global digital elevation model. You should note that the vertical accuracy of this model degrades significantly at higher latitudes due to sensor limitations in polar regions. For analyses requiring high-fidelity topography, the implementation of localized regional surveys is recommended over generalized global datasets. However, because the workflow of this example is independent of terrain precision, these high-latitude variances do not alter the presented results.
layers = wmsfind("mathworks",SearchFields="serverurl"); elevation = refine(layers,"elevation"); [H,R] = wmsread(elevation,Latlim=[62 64],Lonlim=[-152.5 -148.5],ImageFormat="image/bil");
The elevation map contains orthometric heights referenced to the EGM96 geoid, H, which refer to the height between a given terrain and the EGM96 geoid model. You need to convert these heights to ellipsoidal heights referenced to the WGS84 ellipsoid model. For more information about obtaining ellipsoidal height from orthometric height, see Find Ellipsoidal Height from Orthometric Height (Mapping Toolbox).
N = egm96geoid(R); h = double(H) + N;
Set the land surface reflectivity to match a mountainous land type and include speckle so that clutter returns have variability.
refl = surfaceReflectivityLand(LandType="Mountains",Speckle="Weibull");
Add the land surface to radarScenario using the height map and reflectivity you created.
srf = landSurface(scnro,Terrain=flipud(h).', ... Boundary = [R.LatitudeLimits;R.LongitudeLimits], ... RadarReflectivity = refl);
Visualize the scenario using theaterPlot. Use the center of the height map as the ENU origin for the theaterPlot. Selecting the center of the map as reference compared to an edge reduces the average curvature error because most of the map points are closer to the reference.
% Get the height map grid [lts,lns] = geographicGrid(R); % Convert from geodetic coordinates to ENU refENU = [mean(R.LatitudeLimits) mean(R.LongitudeLimits) 0]; earth = wgs84Ellipsoid; [xEast,yNorth,zUp] = geodetic2enu(lts,lns,h,refENU(1),refENU(2),refENU(3),earth); % Create the theaterPlot and add the land surface height map with two views [tpTop,tpSide] = theaterPlotLandSurfaceHeightMap(xEast,yNorth,zUp,H);

Add a Radar Platform to the Scenario
Add an airborne radar flying to the north along the east side of the scenario. The platform will be placed at a constant altitude of 8 km above the WGS84 ellipsoid Earth model with a 150 kts velocity. For Earth-centered scenarios, you need to specify platform trajectories in geodetic coordinates using geotrajectory. Start by specifying the platform location in meters relative to a reference point in ENU and then covert the ENU coordinates to geodetic coordinates.
% set the radar waypoints in ENU coordinates wptsRadarENU = [60 -5 0; ... 60 75 0]*1e3; % Convert ENU coordinates to geodetic coordinates [lat,long,alt] = enu2geodetic(wptsRadarENU(:,1),wptsRadarENU(:,2),wptsRadarENU(:,3), ... refENU(1),refENU(2),refENU(3),earth); wptsRadarGeodetic = [lat long alt]; % Set the aircraft altitude above the WGS84 ellipsoid wptsRadarGeodetic(:,3) = 8e3; % Set the speed to 150 kts spdKtsR = 150; kts2mps = unitsratio("meter","nautical mile")/3600; spdMps = spdKtsR*kts2mps;
Compute the travel time between the waypoints at this speed.
dist = norm(diff(wptsRadarENU));
toa = dist/spdMps % stoa = 1.0367e+03
Create a a geographic trajectory using these waypoints and arrival time for the radar platform. The reference frame on geoTrajectory is set to ENU so that the body frame's orientation follows an ENU convention instead of defaulting to NED convention.
traj = geoTrajectory(wptsRadarGeodetic,[0;toa],ReferenceFrame="ENU");Add the radar platform to the scenario using this trajectory.
rdrPlat = platform(scnro,Trajectory=traj)
rdrPlat =
Platform with properties:
PlatformID: 1
ClassID: 0
Position: [62.9502 -149.3179 8000]
Orientation: [88.9202 0 0]
Dimensions: [1×1 struct]
Trajectory: [1×1 geoTrajectory]
PoseEstimator: [1×1 insSensor]
Emitters: {}
Sensors: {}
Signatures: {[1×1 rcsSignature]}
Create a plotter to plot the position and orientation of the radar platform in the scenario theater plot.
clrs = colororder(tpTop.Parent); rdrPlatPltr = orientationPlotter(tpTop,DisplayName="Radar Platform", ... LocalAxesLength=30e3,Marker=">",MarkerFaceColor=clrs(1,:));
Warning: Graphics acceleration hardware is unavailable. Graphics quality and performance might be diminished. See <a href="https://www.mathworks.com/support/requirements/matlab-system-requirements.html">MATLAB System Requirements</a>.
rdrPlatPltrSide = orientationPlotter(tpSide,DisplayName="Radar Platform",... LocalAxesLength=1.5e3,Marker=">",MarkerFaceColor=clrs(1,:));
Use platformPoses to get the initial pose of the radar platform in the scenario.
p = platformPoses(scnro);
Convert the platform position to the ENU coordinates used by the theaterPlot. Here, a helper function is defined to plot the platform's pose in the theaterPlot's ENU coordinates so that it can be easily reused in this example.
plotPose(rdrPlatPltr,p,refENU,earth,[0,90]) plotPose(rdrPlatPltrSide,p,refENU,earth,[0,0])
Add a Waveform-Level Radar Model to the Radar Platform
Use radarTransceiver to model a waveform-level radar. Configure it to mechanically scan a sector starting from the west and sweeping towards the targets; adjust the sector limits to encompass the target area. Every target should be detected once it falls in the scanned sector. Since this example is modeling a long-range airborne radar, a low carrier frequency of 300 MHz is chosen.
radar = radarTransceiver(MechanicalScanMode="Sector", ... MechanicalScanLimits= 90 + [-10 10], ... InitialMechanicalScanAngle= 90 - 10)
radar =
radarTransceiver with properties:
Waveform: [1×1 phased.RectangularWaveform]
Transmitter: [1×1 phased.Transmitter]
TransmitAntenna: [1×1 phased.Radiator]
ReceiveAntenna: [1×1 phased.Collector]
Receiver: [1×1 phased.ReceiverPreamp]
MechanicalScanMode: 'Sector'
InitialMechanicalScanAngle: 80
MechanicalScanLimits: [80 100]
MechanicalScanRate: 10
ElectronicScanMode: 'None'
MountingLocation: [0 0 0]
MountingAngles: [0 0 0]
NumRepetitionsSource: 'Property'
NumRepetitions: 1
RangeLimitsSource: 'Property'
RangeLimits: [0 Inf]
RangeOutputPort: false
TimeOutputPort: false
radar.ReceiveAntenna.OperatingFrequency = 3e8; radar.ReceiveAntenna.SensorGainMeasure = "dBi"; radar.TransmitAntenna.OperatingFrequency= radar.ReceiveAntenna.OperatingFrequency; radar.TransmitAntenna.SensorGainMeasure = "dBi"; radar.Transmitter.Gain = 0; radar.Transmitter.LossFactor = 3; radar.Receiver.Gain = 0; radar.Receiver.LossFactor = 2; radar.Receiver.NoiseFigure = 3.5;
Set the PRF of the radar's waveform so that its max unambiguous range is beyond the range of the anticipated targets.
rgUnambig = 160e3; prf = 1/range2time(rgUnambig);
Choose the bandwidth of the waveform to support a 100 m range resolution.
rgRes = 100; bw = rangeres2bw(rgRes)
bw = 1.4990e+06
Select a linear frequency modulated waveform with a 5% duty cycle. Set the sampling frequency to match the bandwidth and make sure that the pulse repetition interval (PRI) and pulse width are integer multiples of the sample time. This ensures that you account for the exact period of your waveform when computing the matched filter gain and the required peak power using the radar range equation.
% Start by selecting the desired PRF that matches the desired bandwidth % assuming that the sampling frequency is set equal to the bandwidth fs = bw; Ts = 1/fs; prf = fs/round(fs/prf)
prf = 936.8514
% Choose a 5% dutycycle for the pulse width dc = 0.05; pw = dc/prf; % Make sure that the PRI and pulse width are integer multiples pw = round(pw*fs)/fs
pw = 5.3370e-05
% Setup the linear frequency modulated waveform radar.Waveform = phased.LinearFMWaveform( ... PRF=prf, ... PulseWidth=pw, ... SampleRate=fs, ... SweepBandwidth=bw);
Set the sample rate on the receiver to match the waveform sample rate.
radar.Receiver.SampleRate = radar.Waveform.SampleRate;
Specify a coherent processing interval (CPI) of 32 by setting the number of repetitions.
radar.NumRepetitions = 32;
Use a single sinc response antenna for both transmit and receive. Setup the antenna to have 5 degree azimuth and elevation beamwidths.
bwAz = 5; bwEl = 5; ant = phased.SincAntennaElement(Beamwidth=[bwAz bwEl]); radar.TransmitAntenna.Sensor = ant; radar.ReceiveAntenna.Sensor = ant;
Set the scan rate so that the azimuth beamwidth covers the entire scan area for the entire CPI. When the mechanical scan mode in radarTransceiver is set to "Sector", the antenna rotates after processing each transmitted and received pulse. Therefore, as a first step, you should calculate the maximum supported mechanical scan rate that satisfies the condition above before selecting the final value. Choose a final scan rate that is less than the maximum supported value for better detection consistency. In this example, 25% of the maximum supported scan rate is selected.
cpiDur = radar.NumRepetitions/radar.Waveform.PRF % scpiDur = 0.0342
maxMechScanRate = bwAz/cpiDur % deg / smaxMechScanRate = 146.3830
radar.MechanicalScanRate = 0.25 * maxMechScanRate;
Adjust the radarScenario update rate so that you can advance the scenario exactly to the next CPI in every simulation loop.
scnro.UpdateRate = 1/cpiDur;
Setup the transmit power of the radar so that it is able to detect a target with the specified RCS profile at its maximum unambiguous range with a probability of 90% using a detection threshold set for a false alarm rate of 1e-6. When selecting your desired SNR, make sure to account for the preprocessing gain from both matched filtering and CPI.
As a first step, compute the desired postprocessing signal-to-noise ratio (SNR) to achieve the above requirements using a single transmitted pulse. You will account for the energy gain from all pulses in the CPI using radareqpow.
reqPd = 0.9; reqPfa = 1e-6; % Generic azimuth and elevation angles are selected to extract the RCS as % you are using here a symmetric model rcsObj = rcsSignature(Pattern=5); % Anticipated target RCS rcsdBsm = rcsObj.value(0,0,radar.TransmitAntenna.OperatingFrequency); % Compute the SNR for a single transmitted pulse figure rocpfa(reqPfa, NumPulses=1, SignalType="NonfluctuatingNoncoherent") reqSNRdB = detectability(reqPd,reqPfa,1,"Swerling0")
reqSNRdB = 13.1217
hold on scatter(reqSNRdB,reqPd,50,"filled")

Now compute the matched filter and Doppler processing gains.
% Matched filter gain
Gmf = pow2db(pw*fs)Gmf = 19.0309
% Doppler filter gain
Gdp = pow2db(radar.NumRepetitions)Gdp = 15.0515
Compute antenna directivity at the edges of the supported azimuth and elevation beamwidths, and use the obtained value in the calculation of the desired peak power for your transmitter.
txAntennaDirectivity = directivity(radar.TransmitAntenna.Sensor, ... radar.TransmitAntenna.OperatingFrequency, [bwAz/2;bwEl/2]); rxAntennaDirectivity = directivity(radar.ReceiveAntenna.Sensor, ... radar.ReceiveAntenna.OperatingFrequency, [bwAz/2;bwEl/2]); integratedPulseWidth = pw * radar.NumRepetitions; lambda = freq2wavelen(radar.TransmitAntenna.OperatingFrequency); pt = radareqpow(lambda,rgUnambig,reqSNRdB,integratedPulseWidth, ... RCS = db2pow(rcsdBsm), ... Ts = systemp(radar.Receiver.NoiseFigure,radar.Receiver.ReferenceTemperature), ... Gain = [radar.Transmitter.Gain + txAntennaDirectivity, ... radar.Receiver.Gain + rxAntennaDirectivity], ... Loss = radar.Transmitter.LossFactor + radar.Receiver.LossFactor)
pt = 1.3056e+03
radar.Transmitter.PeakPower = pt;
Attach the configured radarTransceiver to the radar platform so that it can be present in the scenario. Attaching the radar to a platform enables the receive method on the scenario to return the I/Q data simulated by the radar. This I/Q data will include the targets that have been added to the scenario.
rdrPlat.Sensors = radar;
Add a coverage plotter to the theaterPlot to visualize the radar's beam location.
rdrCovPltr = coveragePlotter(tpTop, DisplayName="Radar Coverage",Color=clrs(1,:)); rdrCovPltrSide = coveragePlotter(tpSide,DisplayName="Radar Coverage",Color=clrs(1,:)); % Define coverageConfig function to compute the coverage configuration struct for the radarTransceiver cfg = coverageConfig(radar,rdrPlat,refENU,earth)
cfg = struct with fields:
Index: 1
LookAngle: [2×1 double]
FieldOfView: [2×1 double]
ScanLimits: [80 100]
Range: 160000
Position: [6.0072e+04 -5.0060e+03 7.7162e+03]
Orientation: [1×1 quaternion]
plotCoverage(rdrCovPltr,cfg); plotCoverage(rdrCovPltrSide,cfg);

Add Two Targets to the Scenario
Now that the radar platform has been added, targets can be introduced into the scenario following similar steps. This example, has two targets flying from west to east with velocities of 100 and 120 kts, respectively, at constant altitudes of 9 km and 7 km above the WGS84 ellipsoid Earth model.
Trajectories of targets 1 and 2 are generated similarly to how the trajectory of airborne radar was; starting with the target ENU coordinates and then moving to geodetic coordinates before generating the actual trajectory.
% Set the targets' ENU coordinates wptsENU1 = [-80 5 0; ... 20 5 0]*1e3; wptsENU2 = [0 5 0; ... 20 5 0]*1e3; % Assign altitudes above the WGS84 ellipsoid altitude1 = 9e3; altitude2 = 7e3; % Speed (kts) spdKts1 = 100; spdKts2 = 120; % Create trajectories traj1 = createTargetTrajectory(wptsENU1, refENU, earth, altitude1, spdKts1); traj2 = createTargetTrajectory(wptsENU2, refENU, earth, altitude2, spdKts2);
Add the targets to the scenario.
tgtPlat1 = platform(scnro,Trajectory=traj1,Signatures=rcsObj)
tgtPlat1 =
Platform with properties:
PlatformID: 2
ClassID: 0
Position: [63.0360 -152.0808 9000]
Orientation: [0.5283 0 0]
Dimensions: [1×1 struct]
Trajectory: [1×1 geoTrajectory]
PoseEstimator: [1×1 insSensor]
Emitters: {}
Sensors: {}
Signatures: {[1×1 rcsSignature]}
tgtPlat2 = platform(scnro,Trajectory=traj2,Signatures=rcsObj)
tgtPlat2 =
Platform with properties:
PlatformID: 3
ClassID: 0
Position: [63.0449 -150.5000 7000]
Orientation: [-0.1762 0 0]
Dimensions: [1×1 struct]
Trajectory: [1×1 geoTrajectory]
PoseEstimator: [1×1 insSensor]
Emitters: {}
Sensors: {}
Signatures: {[1×1 rcsSignature]}
Create a plotter for the target platforms in the theaterPlot.
tgtPlatPltr1 = orientationPlotter(tpTop,DisplayName="Target Platform 1", LocalAxesLength=30e3, Marker="o",MarkerFaceColor=clrs(2,:)); tgtPlatPltr2 = orientationPlotter(tpTop,DisplayName="Target Platform 2", LocalAxesLength=30e3, Marker="o",MarkerFaceColor=clrs(3,:)); tgtPlatPltrSide1 = orientationPlotter(tpSide,DisplayName="Target Platform 1",LocalAxesLength=1.5e3,Marker="o",MarkerFaceColor=clrs(2,:)); tgtPlatPltrSide2 = orientationPlotter(tpSide,DisplayName="Target Platform 2",LocalAxesLength=1.5e3,Marker="o",MarkerFaceColor=clrs(3,:));
Use platformPoses to get the initial pose for the target platforms.
p = platformPoses(scnro)
p = 3×1 struct array with fields:
PlatformID
ClassID
Position
Velocity
Acceleration
Orientation
AngularVelocity
Get the pose corresponding to the target platforms.
tgt1 = p(tgtPlat1.PlatformID==[p.PlatformID]); tgt2 = p(tgtPlat2.PlatformID==[p.PlatformID]);
Add the initial pose of each target platform to the earlier plot.
plotPose(tgtPlatPltr1, tgt1,refENU,earth,[0,90]) plotPose(tgtPlatPltr2, tgt2,refENU,earth,[0,90]) plotPose(tgtPlatPltrSide1,tgt1,refENU,earth,[0,0]) plotPose(tgtPlatPltrSide2,tgt2,refENU,earth,[0,0]) % Remove unnecessary legend items to declutter the figure set(findobj(tpTop.Parent,Type='line',Marker='none'),HandleVisibility='off'); set(findobj(tpTop.Parent,Type='surface'),HandleVisibility='off'); set(findobj(tpTop.Parent,Type='patch'),HandleVisibility='off'); legend(tpTop.Parent,'show')

Add clutter to the Radar Model and Scenario
Create a clutter generator for the radarTransceiver model. The clutter generator enables the clutter regions and spacing of the clutter patches to be configured for the radar model. Without a clutter generator, no clutter would be generated for the waveform-level radar model even though a land surface with a height map has been added to the scenario. If additional radars are added to the scenario, a clutter generator will need to be added for each of the radar models that need to include clutter. This allows each radar model to configure different clutter regions and resolution based on each radar's specific configuration.
The resolution on the clutter generator should be set to include a statistically significant number of clutter patches for each resolution bin of the radar projected onto the Earth's surface. Typically, this is considered to be at least eight clutter patches per range resolution bin.
The simulation time is proportional to the number of clutter patches. Therefore, to speed up the simulation, you can choose only one clutter patch per range resolution. This reduction in clutter patches will not result in a statistically accurate sampling of the clutter, but will speed up the simulation for demonstration purposes.
In addition, clutter power decreases rapidly with range. Again, to speed up the simulation, you can decide to compute clutter patches up to a fraction of the radar's maximum unambiguous range.
includeClutter =true; % Enable/disable clutter in the simulated data if includeClutter clutterResolution =
100; clutterRangeLimit =
160000; cltrGen = clutterGenerator(scnro,radar, ... Resolution=clutterResolution, ... RangeLimit=clutterRangeLimit);
The clutter generator will use the land surface's height map and reflectivity along with the radar platform's current position and scan angle to compute clutter returns in the simulated I/Q data. Add a clutter region plotter to the theaterPlot to help visualize the clutter region and/or clutter patches used to model the clutter for the radarTransceiver. Clutter regions show the area that is being considered for clutter generation, whereas clutter patches show the actual patches that the radar is processing.
Clutter regions are selected at the start of each CPI. If a large CPI is paired with a high steering rate, the rapid mechanical scanning can cause the radar beam to shift away from these pre-selected patches before the final pulses are processed.
cltrPltr = clutterRegionPlotter(tpTop,DisplayName='Clutter',RegionFaceColor='None',RegionEdgeColor='None',... ShowPatchCenters=true,PatchMarkerEdgeColor='k',PatchMarkerFaceColor='m',PatchMarkerSize=10); cltrPltrSide = clutterRegionPlotter(tpSide,DisplayName='Clutter',RegionFaceColor='None',RegionEdgeColor='None',... ShowPatchCenters=true,PatchMarkerEdgeColor='k',PatchMarkerFaceColor='m',PatchMarkerSize=10); end
The method plotClutterRegion will be used later in the simulation to plot the actual clutter region in every iteration.
Create Signal Processing Chain
Use phased.RangeDopplerResponse to process the I/Q data simulated by the radarTransceiver.
sigProc = phased.RangeDopplerResponse( ... SampleRate=radar.Receiver.SampleRate, ... DopplerOutput="Range rate", ... OperatingFrequency=radar.ReceiveAntenna.OperatingFrequency);
Get the matched filter for the radar's waveform.
mf = getMatchedFilter(radar.Waveform);
Compute the radar receiver's noise floor.
noiseFloordB = pow2db(noisepow(radar.Receiver.SampleRate,radar.Receiver.NoiseFigure,radar.Receiver.ReferenceTemperature))
noiseFloordB = -138.7173
Compute the noise floor after the matched filter and Doppler processing gains.
noiseFloordB = noiseFloordB + Gmf + Gdp
noiseFloordB = -104.6349
Compute the receiver's detection threshold to achieve the required false alarm rate.
threshdB = npwgnthresh(reqPfa,1,'noncoherent')threshdB = 11.4037
Simulate the Scenario and Generate Synthetic I/Q Data
Click the button below to step the simulation forward one CPI at a time. This updates the theater plot and the range-Doppler map with the processed radar data for that interval. Note that processing a CPI can take a few minutes when clutter is included.
maxCPINum =1; % Initialize some of the variables allIqData = cell(1,maxCPINum); allExpectedTargetRange = cell(1,maxCPINum); allExpectedTargetRangeRate = cell(1,maxCPINum); hRDM = []; for cpiNum = 1:maxCPINum simulationAdvanced = advance(scnro); % Update the locations of the radar and target platforms in the theater plot % Update top view plotters p = platformPoses(scnro); plotPose(rdrPlatPltr, p(rdrPlat.PlatformID ==[p.PlatformID]),refENU,earth,[0,90]); plotPose(tgtPlatPltr1,p(tgtPlat1.PlatformID==[p.PlatformID]),refENU,earth,[0,90]); plotPose(tgtPlatPltr2,p(tgtPlat2.PlatformID==[p.PlatformID]),refENU,earth,[0,90]); % Update side view plotters plotPose(rdrPlatPltrSide, p(rdrPlat.PlatformID ==[p.PlatformID]),refENU,earth,[0,0]); plotPose(tgtPlatPltrSide1,p(tgtPlat1.PlatformID==[p.PlatformID]),refENU,earth,[0,0]); plotPose(tgtPlatPltrSide2,p(tgtPlat2.PlatformID==[p.PlatformID]),refENU,earth,[0,0]); % Simulate the I/Q data for the radar and store all CPI data [iqData,iqInfo] = receive(scnro); allIqData{cpiNum} = iqData{1}; % Update the coverage plotter for the radar, which points at the % location of the last processed radar pulse cfg = coverageConfig(iqInfo,rdrPlat,refENU,earth); plotCoverage(rdrCovPltr,cfg); plotCoverage(rdrCovPltrSide,cfg); if includeClutter % Update the clutter region plotter for the radar estimatedClutterHeight = 5.5e3; % Choose an estimated average terrain height value cltrData = clutterRegionData(cltrGen,estimatedClutterHeight); % Convert clutter regions to theater plot's ENU coordinates east = cltrData.X; north = cltrData.Y; up = cltrData.RegionPlotHeight*ones(size(east)); [lt,ln,ht] = enu2geodetic(east,north,up,rdrPlat.Position(1),rdrPlat.Position(2),rdrPlat.Position(3),earth); [east,north] = geodetic2enu(lt,ln,ht,refENU(1),refENU(2),refENU(3),earth); cltrData.X(:) = east; cltrData.Y(:) = north; % Convert clutter patch centers to theater plot's ENU coordinates [east,north,up] = geodetic2enu(cltrData.PatchCenters(1,:),cltrData.PatchCenters(2,:), ... cltrData.PatchCenters(3,:),refENU(1),refENU(2),refENU(3),earth); cltrData.PatchCenters(1,:) = east; cltrData.PatchCenters(2,:) = north; cltrData.PatchCenters(3,:) = up; % Plot clutter region and/or patches plotClutterRegion(cltrPltr,cltrData); plotClutterRegion(cltrPltrSide,cltrData); end % Calculate expected target range and range rate targetRangeVec = p(1).Position - reshape([p(2:end).Position],3,[]).'; targetVelocityVec = p(1).Velocity - reshape([p(2:end).Velocity],3,[]).'; allExpectedTargetRange{cpiNum} = vecnorm(targetRangeVec,2,2); allExpectedTargetRangeRate{cpiNum} = dot(targetVelocityVec,targetRangeVec./allExpectedTargetRange{cpiNum},2); % Plot the range Doppler map of the current CPI along with the % anticipated target range and range rate [rdMap,rgBins,rrBins] = sigProc(allIqData{cpiNum},mf); hRDM = plotRangeDopplerMap(hRDM, rdMap, rgBins, rrBins, noiseFloordB, ... allExpectedTargetRange{cpiNum}, allExpectedTargetRangeRate{cpiNum}, threshdB); drawnow end


In this scenario, an airborne radar scans from 80 to 100 degrees relative to its heading using an antenna with a 5 degrees beamwidth in both azimuth and elevation. During the scan, three return clusters are observed: two from aerial targets and one from mountain peak clutter. The targets are located approximately 60 km and 140 km from the radar, with relative radial velocities of -73.6 and -56.9 m/s respectively. For the clutter, the first processed CPI yields an average patch distance of roughly 86 km; because the mountain is stationary, its relative radial velocity of -12.7 m/s purely reflects the aircraft's own motion. On the resulting range-Doppler map, antenna and waveform sidelobes cause elevated pixel values near the true target and clutter coordinates. While reducing transmit power or adjusting detection thresholds can suppress these sidelobes in the processed data, doing so risks missing weaker, authentic detections.
Due to the high density of plotted range pixels, you may need to zoom in to view the SNR values for the target's range and range rate, particularly for distant targets. To facilitate target identification, circle markers indicate the anticipated target locations. Additionally, point markers highlight all pixels on the range-Doppler map with SNR values exceeding the threshold required for the desired false-alarm probability.
Summary
This example shows you how to simulate waveform-level (I/Q) radar detections of aerial targets in the presence of land surface clutter for curved-Earth scenarios. You set up an earth-centered radar scenario with digital elevation terrain data, configure an airborne waveform-level radar model, and define targets of interest. You then process the received signals using matched filtering and Doppler processing to generate range-Doppler maps and analyze how clutter affects target detectability in a realistic long-range surveillance scenario.
Helper Functions
function [tpTop,tpSide] = theaterPlotLandSurfaceHeightMap(x,y,z,H) % Create the theaterPlot with two views: top view and side view fig = figure(Name="theaterPlot"); tl = tiledlayout(fig,3,1); % Top view (looking down) ax1 = nexttile(tl,[2,1]); xlim(ax1,"tight") ylim(ax1,"tight") tpTop = theaterPlot(Parent=ax1,AxesUnits=["km" "km" "m"]); grid(ax1,"on") ax1.Layer = "top"; surf(ax1,x,y,z,H,EdgeColor="none") xlim(ax1,"tight") ylim(ax1,"tight") demcmap(H) xlabel(ax1,"East (km)") ylabel(ax1,"North (km)") zlabel(ax1,"Up (m)") ylabel(colorbar(ax1),"Orthometric height (m)") view(ax1,0,90) title(ax1,"Top View") % Side view (looking from south) ax2 = nexttile(tl); tpSide = theaterPlot(Parent=ax2,AxesUnits=["km" "km" "m"]); grid(ax2,"on") ax2.Layer = "top"; surf(ax2,x,y,z,H,EdgeColor="none") xlim(ax2,"tight") ylim(ax2,"tight") tpSide.ZLimits = [0 10e3]; xlabel(ax2,"East (km)") ylabel(ax2,"North (km)") zlabel(ax2,"Up (m)") view(ax2,0,0) title(ax2,"Side View") end
function plotPose(pltr,pose,refENU,earth,viewAngle) % Add the radar pose to the theater plot [x,y,z] = ecef2enu(pose.Position(1),pose.Position(2),pose.Position(3), ... refENU(1),refENU(2),refENU(3),earth); posENU = [x y z]; % Convert the platform orientation to ENU coordinates. First convert its % orientation from a quaternion to a direction cosines matrix (DCM) % referenced to ECEF laxes = rotmat(pose.Orientation,"frame").'; % Now convert the DCM to ENU [ux,uy,uz] = ecef2enuv(laxes(1,:),laxes(2,:),laxes(3,:),refENU(1),refENU(2)); laxesENU = [ux; uy; uz]; % Now convert the DCM back to a quaternion, now referenced to the ENU % coordinates used by the theaterPlot qENU = quaternion(laxesENU.',"rotmat","frame"); % Now use the position in orientation in ENU to plot the platform's initial % pose in the theaterPlot plotOrientation(pltr,qENU,posENU); % The theaterPlot will default to an NED convention by reversing the direction % of the Y and Z axes. Since you are using ENU, set the direction of the axes to % "normal" so that they are not reversed. ax = pltr.ParentPlot.Parent; set(ax,XDir="normal",YDir="normal",ZDir="normal"); % Set the view angle on the plotter's axes after plotting the pose view(ax,viewAngle); end
function traj = createTargetTrajectory(wptsENU, refENU, earth, altitude, speed) % Create target geodetic trajectory from ENU coordinates % Start with the target's ENU coordinates as it is more convenient to % specify the platform locations in meters relative to a reference point. % Convert ENU coordinates to geodetic coordinates since this is what % geoTrajectory takes as input. geoTrajectory is needed to specify % platform's trajectory in earth-centered radar scenarios. [lat,long,alt] = enu2geodetic(wptsENU(:,1),wptsENU(:,2),wptsENU(:,3),refENU(1),refENU(2),refENU(3),earth); wptsGeodetic = [lat long alt]; % Set the aircraft to fly at the desired altitude above the WGS84 ellipsoid wptsGeodetic(:,3) = altitude; % Set the speed. Convert the kts input to mps spdKts = speed; kts2mps = unitsratio("meter","nautical mile")/3600; spdMps = spdKts*kts2mps; % Compute the travel time between the waypoints at this speed dist = norm(diff(wptsENU)); toa = dist/spdMps; % sec % Create the target's trajectory. traj = geoTrajectory(wptsGeodetic,[0;toa],ReferenceFrame="ENU"); end
function cfg = coverageConfig(rdr,plat,ref,earth) % Custom coverage Configuration for radarTransceiver if isstruct(rdr) bwAz = beamwidth(rdr.Sensor.ReceiveAntenna.Sensor,rdr.Sensor.ReceiveAntenna.OperatingFrequency,Cut="azimuth"); bwEl = beamwidth(rdr.Sensor.ReceiveAntenna.Sensor,rdr.Sensor.ReceiveAntenna.OperatingFrequency,Cut="elevation"); cfg = struct( ... Index = 1, ... LookAngle = [rdr.MechanicalAngle;0], ... FieldOfView = [bwAz;bwEl], ... ScanLimits = rdr.Sensor.MechanicalScanLimits, ... Range = time2range(1/rdr.Sensor.Waveform.PRF), ... Position = rdr.OriginPosition(:).', ... Orientation = quaternion.ones ... ); else bwAz = beamwidth(rdr.ReceiveAntenna.Sensor,rdr.ReceiveAntenna.OperatingFrequency,Cut="azimuth"); bwEl = beamwidth(rdr.ReceiveAntenna.Sensor,rdr.ReceiveAntenna.OperatingFrequency,Cut="elevation"); cfg = struct( ... Index = 1, ... LookAngle = [rdr.InitialMechanicalScanAngle;0], ... FieldOfView = [bwAz;bwEl], ... ScanLimits = rdr.MechanicalScanLimits, ... Range = time2range(1/rdr.Waveform.PRF), ... Position = rdr.MountingLocation, ... Orientation = quaternion(rdr.MountingAngles,"eulerd","ZYX","frame") ... ); end % Convert to ECEF coordinates laxes = rotmat(cfg.Orientation,"frame").'; p = truePose(plat); rot = rotmat(p.Orientation,"frame").'; pos = laxes*cfg.Position(:) + p.Position(:); laxes = rot*laxes; % Now convert to ENU coordinates for the theaterPlot [x,y,z] = ecef2enu(pos(1),pos(2),pos(3),ref(1),ref(2),ref(3),earth); cfg.Position(:) = [x y z]; [ux,uy,uz] = ecef2enuv(laxes(1,:),laxes(2,:),laxes(3,:),ref(1),ref(2)); laxes = [ux;uy;uz]; cfg.Orientation(:) = quaternion(laxes.',"rotmat","frame"); end
function hRDM = plotRangeDopplerMap(... hRDM, rdMap, rgBins, rrBins, noiseFloordB,targetRange, targetRangeRate, threshdB) % Plot the range Doppler map along with the anticipated target locations if isempty(hRDM) fig = figure(Name="RDM",Tag="rdmFromExample"); axRDM = axes(fig); hold(axRDM,"on") xlabel(axRDM,"Range-rate (m/s)") ylabel(axRDM,"Range (km)") title(axRDM,"Range-Doppler Map") grid(axRDM,"on") grid(axRDM,"minor") axRDM.Layer = "top"; axis(axRDM,"tight"); ylabel(colorbar(axRDM),"SNR (dB)") colormap(axRDM,jet); clim(axRDM,[0 40]); hRDM.img = imagesc(axRDM,-1:1,-1:1,zeros(3)); hRDM.scatTargets = scatter(axRDM,NaN,NaN,100,'g',LineWidth=1.5,DisplayName="Expected target location"); hRDM.scatThresh = scatter(axRDM,NaN,NaN,30,'.m',LineWidth=1,DisplayName="SNR above threshold"); legend(axRDM,[hRDM.scatTargets hRDM.scatThresh]) end if rrBins(1)>rrBins(2) rrBins(:) = rrBins(end:-1:1); rdMap = fliplr(rdMap); end % Convert the range-Doppler to power relative to the receiver's noise % floor. This represents the SNR. snrMapdB = mag2db(abs(rdMap)) - noiseFloordB; rrBinsLabel = rrBins; rgBinsLabel = rgBins/1e3; set(hRDM.img,CData=snrMapdB,XData=rrBinsLabel,YData=rgBinsLabel); % Update expected target locations set(hRDM.scatTargets,XData=targetRangeRate,YData=targetRange./1e3); % Update markers for all SNR values higher than the required threshold to % achieve the desired probability of false alarm threshIdx = find(snrMapdB>=threshdB); [threshLocRange, threshLocRangeRate] = ind2sub(size(snrMapdB),threshIdx); set(hRDM.scatThresh,XData=rrBinsLabel(threshLocRangeRate),YData=rgBinsLabel(threshLocRange)); end



