Main Content

Urban Link and Coverage Analysis using Ray Tracing

This example shows how to use ray tracing to analyze communication links and coverage in an urban environment. Within the example:

  • Import and visualize 3-D buildings data into Site Viewer

  • Define a transmitter site and ray tracing propagation model corresponding to a 5G urban scenario

  • Visualize coverage for the urban environment

  • Analyze a link in non-line-of-sight conditions

  • Plot received power for points along a route

  • Optimize a non-line-of-sight link using beam steering and Phased Array System Toolbox™

This example additionally explores the impact of ray tracing parameters such as number of reflections and material types.

Import and Visualize Buildings Data

Import an OpenStreetMap (.osm) file corresponding to Canary Wharf in London, UK. The file was downloaded from, which provides access to crowd-sourced map data all over the world. The data is licensed under the Open Data Commons Open Database License (ODbL), The buildings information contained within the OpenStreetMap file is imported and visualized in Site Viewer.

viewer = siteviewer("Buildings","canarywharf.osm","Basemap","topographic");

Define Transmitter Site

Define a transmitter site to model a small cell scenario in a dense urban environment. The transmitter site represents a base station that is placed on a pole near a park with the purpose of servicing the park area. The transmitter operates at a carrier frequency of 28 GHz with 5 W of power and uses the default isotropic antenna.

tx = txsite("Name","Small cell transmitter", ...
    "Latitude",51.50375, ...
    "Longitude",-0.01843, ...
    "AntennaHeight",10, ...
    "TransmitterPower",5, ...

View Coverage Map for Line-of-Sight Propagation

Create a ray tracing propagation model using the method of images. This propagation model uses ray tracing analysis to compute propagation paths and their corresponding path losses. Path loss is calculated from free-space loss, reflection loss due to material, and antenna polarization loss. The ray tracing analysis uses the method of images, which includes surface reflections but does not include effects from refraction, diffraction, scattering, or transmission through buildings.

Set the MaxNumReflections property to 0 in order to limit the initial analysis to line-of-sight propagation paths only, and set material types to model perfect reflection.

rtpm = propagationModel("raytracing-image-method", ...
    "MaxNumReflections",0, ...
    "BuildingsMaterial","perfect-reflector", ...

View the corresponding coverage map for a maximum range of 250 meters from the base station. The coverage map shows received power for a receiver at each ground location but is not computed for building tops or sides.

coverage(tx,rtpm, ...
    "SignalStrengths",-120:-5, ...
    "MaxRange",250, ...
    "Resolution",3, ...

Define Receiver Site in Non-Line-of-Sight Location

The coverage map for line-of-sight propagation shows shadowing due to obstructions. Define a receiver site to model a mobile receiver in one such location. Plot the line-of-sight path, which shows a blockage.

rx = rxsite("Name","Small cell receiver", ...
    "Latitude",51.50216, ...
    "Longitude",-0.01769, ...


Plot Propagation Path using Ray Tracing

Adjust the ray tracing propagation model to include single-reflection paths, and plot the rays. The result shows signal propagation along a single-reflection path. The plotted path may be selected to view the corresponding propagation characteristics, including received power, phase change, distance, and angles of departure and arrival.

rtpm.MaxNumReflections = 1;

Analyze Signal Strength and Effect of Materials

Compute the received power using the propagation model which was previously configured to model perfect reflection. Then assign a more realistic material type and re-compute the received power. Update the rays shown in Site Viewer. The use of realistic material reflection results in about 8 dB of power loss compared to perfect reflection.

ss = sigstrength(rx,tx,rtpm);
disp("Received power using perfect reflection: " + ss + " dBm")
Received power using perfect reflection: -70.3925 dBm
rtpm.BuildingsMaterial = "concrete";
rtpm.TerrainMaterial = "concrete";

ss = sigstrength(rx,tx,rtpm);
disp("Received power using concrete materials: " + ss + " dBm")
Received power using concrete materials: -78.9451 dBm

Include Weather Loss

Add weather impairments to the propagation model and re-compute the received power, which results in another 1.5 dB of loss.

rtPlusWeather = rtpm + propagationModel("gas") + propagationModel("rain");

ss = sigstrength(rx,tx,rtPlusWeather);
disp("Received power including weather loss: " + ss + " dBm")
Received power including weather loss: -80.4625 dBm

View Coverage Map with Single-Reflection Paths

Re-generate a coverage map but include single-reflection paths and weather impairments by using the propagation model defined above. Load and visualize previously generated coverage results because otherwise the coverage analysis would take several minutes to complete. The resultant coverage map shows received power in the area around the non-line-of-site receiver analyzed above, but there are still some remaining regions where no signal appears to reach.


% Load coverage results and plot. Coverage results were generated using
% commented coverage call below, which takes several minutes to complete.
coverageResults = load("coverageSingleReflection.mat");
contour(coverageResults.pd, ...
    "Type","power", ...

% coverage(tx,rtPlusWeather, ...
%     "SignalStrengths",-120:-5, ...
%     "MaxRange", 250, ...
%     "Resolution",2, ...
%     "Transparency",0.6);

Plot Propagation Paths including Two Reflections

Expand the point-to-point analysis to include two-reflection paths. The visualization shows two clusters of propagation paths and the total received power is enhanced by about 3 dB as compared to just considering single-reflection paths.

rtTwoReflections = propagationModel("raytracing-image-method", ...
    "MaxNumReflections",2, ...
    "BuildingsMaterial","concrete", ...
rtTwoRefPlusWeather = rtTwoReflections + propagationModel("gas") + propagationModel("rain");

ss = sigstrength(rx, tx, rtTwoRefPlusWeather);
disp("Received power with two-reflection paths: " + ss + " dBm")
Received power with two-reflection paths: -77.1419 dBm

Plot Received Power Along a Route with Two-Reflection Analysis

The previous coverage map which included single-reflection paths showed some remaining holes in signal coverage. Define several locations along a route that travels through two of the holes in the coverage map. The coordinates for each location were obtained by right-clicking on the map and selecting "Show location". Compute the received power for each location using the ray tracing propagation model including two-reflection paths. This point-to-point analysis reveals some signal power reaching those locations.

Note that propagation with up to two reflections is limited to point-to-point analysis and is not available for coverage maps due to the time required to generate results.

latlons = [51.502366 -0.017633; ...
    51.502571 -0.017575; ...
    51.502647 -0.017659; ...
    51.502674 -0.017905; ...
    51.502717 -0.018229; ...
    51.502753 -0.018561; ...
    51.502793 -0.018935; ...
    51.502825 -0.019198; ...
    51.502846 -0.019464; ...
    51.502865 -0.019703;  ...
    51.502884 -0.019902; ...
    51.502953 -0.020048; ...
    51.503124 -0.019983; ...
    51.503288 -0.019917; ...
    51.503363 -0.020103; ...
    51.503570 -0.020013; ...
    51.503771 -0.019941; ...
    51.504001 -0.019864; ...
    51.504254 -0.019769; ...
    51.504535 -0.019681];
lats = latlons(:,1);
lons = latlons(:,2);

rxs = rxsite("Name","Small cell receiver", ...
    "Latitude",lats, ...
    "Longitude",lons, ...

ss = sigstrength(rxs,tx,rtTwoRefPlusWeather);

Plot the power at each location on the map, using the "streets-dark" basemap to emphasize the data. The propagationData object is used to plot the data, and this object could also be used to plot data imported from measurements files. The resultant plot shows low received power at the locations where there is neither line-of-sight nor single-reflection propagation.

viewer.Basemap = "streets-dark";

pd = propagationData(lats,lons,"ReceivedPower",ss);

Use Beam Steering to Enhance Received Power

Many modern communications systems use techniques to steer the transmitter antenna to achieve optimal link quality. This section uses Phased Array System Toolbox™ to optimally steer a beam to maximize received power for a non-line-of-sight link.

Define a custom antenna from Report ITU-R M.2412 [1] for evaluating 5G radio technologies. Create an 8-by-8 uniform rectangular array from the element pattern defined in Section 8.5 of the report, point it south, and view the radiation pattern.

tx.Antenna = helperM2412PhasedArray(tx.TransmitterFrequency);
tx.AntennaAngle = -90;


Call raytrace with an output to access the rays that were computed. The returned comm.Ray objects include both the geometric and propagation-related characteristics of each ray.

ray = raytrace(tx,rx,rtPlusWeather);
  Ray with properties:

      PathSpecification: 'Locations'
       CoordinateSystem: 'Geographic'
    TransmitterLocation: [3×1 double]
       ReceiverLocation: [3×1 double]
            LineOfSight: 0
    ReflectionLocations: [3×1 double]
              Frequency: 2.8000e+10
         PathLossSource: 'Custom'
               PathLoss: 117.4522
             PhaseShift: 4.0952

   Read-only properties:
       PropagationDelay: 6.6488e-07
    PropagationDistance: 199.3261
       AngleOfDeparture: [2×1 double]
         AngleOfArrival: [2×1 double]
         NumReflections: 1

Get the angle-of-departure for the single-reflection path and apply this angle to steer the antenna in the optimal direction to achieve higher received power. The angle-of-departure azimuth is offset by the physical antenna angle azimuth to convert it to the steering vector azimuth defined in the phased array antenna's local coordinate system.

aod = ray{1}.AngleOfDeparture;
steeringaz = wrapTo180(aod(1)-tx.AntennaAngle(1));
steeringVector = phased.SteeringVector("SensorArray",tx.Antenna);
sv = steeringVector(tx.TransmitterFrequency,[steeringaz;aod(2)]);
tx.Antenna.Taper = conj(sv);

Plot the radiation pattern to see how the antenna energy is directed along the propagation path. The new received power is enhanced by about 20 dB, corresponding to the peak gain of the antenna.

ss = sigstrength(rx, tx, rtPlusWeather);
disp("Received power with beam steering: " + ss + " dBm")
Received power with beam steering: -57.5028 dBm


This example used ray tracing for link and coverage analysis in an urban environment. The analysis revealed the following conclusions:

  • Ray tracing analysis can be used to predict signal strength for non-line-of-sight links where reflected propagation paths exist

  • Analysis with realistic materials can have a significant impact on the calculated path loss and received power

  • Analysis with higher number of reflections results in increased computation time but reveals additional areas of signal propagation

  • Usage of a directional antenna with beam steering can significantly increase the received power for receivers, even if they are in non-line-of-sight locations

This example analyzed received power and path loss for links and coverage. To see how to use ray tracing to configure a channel model for link-level simulation, see the Indoor MIMO-OFDM Communication Link using Ray Tracing example available in Communications Toolbox™.


[1] Report ITU-R M.2412, "Guidelines for evaluation of radio interface technologies for IMT-2020", 2017.