This example shows how to calculate and visualize signal strength between a transmitter and multiple receivers. The visualizations include an area coverage map and colored communication links. The example also shows selection of a directional antenna in order to achieve a communication link to a specific location.
% Define transmitter site at MathWorks (3 Apple Hill Dr, Natick, MA) fq = 6e9; % 6 GHz tx = txsite('Name','MathWorks', ... 'Latitude',42.3001, ... 'Longitude',-71.3504, ... 'Antenna',design(dipole,fq), ... 'AntennaHeight',60, ... % Units: meters 'TransmitterFrequency',fq, ... % Units: Hz 'TransmitterPower',15); % Units: Watts
% Define receiver sites in several surrounding towns and cities rxNames = {... 'Boston, MA','Lexington, MA','Concord, MA','Marlborough, MA', ... 'Hopkinton, MA','Holliston, MA','Foxborough, MA','Quincy, MA'}; rxLocations = [... 42.3601 -71.0589; ... % Boston 42.4430 -71.2290; ... % Lexington 42.4604 -71.3489; ... % Concord 42.3459 -71.5523; ... % Marlborough 42.2287 -71.5226; ... % Hopkinton 42.2001 -71.4245; ... % Holliston 42.0654 -71.2478; ... % Foxborough 42.2529 -71.0023]; % Quincy % Define receiver sensitivity. Sensitivity is the minimum signal strength in % power that is necessary for the receiver to accurately detect the signal. rxSensitivity = -90; % Units: dBm rxs = rxsite('Name',rxNames, ... 'Latitude',rxLocations(:,1), ... 'Longitude',rxLocations(:,2), ... 'Antenna',design(dipole,tx.TransmitterFrequency), ... 'ReceiverSensitivity',rxSensitivity); % Units: dBm
Show transmitter and receiver sites on a map. Site markers may be clicked to display site information.
viewer = siteviewer; show(tx) show(rxs)
Set the map imagery using the Basemap
property. Alternatively, open the map imagery picker in Site Viewer by clicking the second button from the right. Select "Topographic" to see topography, streets, and labels on the map. Rotate the view to show an overhead perspective.
viewer.Basemap = "topographic";
Display coverage map. A coverage map shows the geographic area where a receiver will obtain good reception, which is where transmitted signal strength meets or exceeds the receiver's sensitivity. Transmitted signal strength in power (dBm) is computed using a free-space propagation model, which disregards terrain, obstacles, and atmospheric effects. As a result, the coverage map shows idealized coverage area in the absence of any path loss impairments beyond free space loss.
coverage(tx,'freespace', ... 'SignalStrengths',rxSensitivity)
Plot communication links on the map. Red links appear where the receiver is outside of the coverage zone, and green links appear where the receiver is within the coverage zone. Link lines may be clicked to display link statistics.
link(rxs,tx,'freespace')
Update coverage map and links to include path loss due to rain. Note how Boston, MA is no longer inside the coverage zone.
coverage(tx,'rain','SignalStrengths', rxSensitivity) link(rxs,tx,'rain')
The dipole antenna transmitter results in a few receiver sites outside of the coverage zone, including the receiver in Boston, MA. Now assume a requirement of the transmitter is to achieve a communication link with Boston. Define a directional antenna that can increase antenna gain in that direction.
% Define Yagi-Uda antenna designed for transmitter frequency yagiAnt = design(yagiUda,tx.TransmitterFrequency); % Tilt antenna to direct radiation in XY-plane (i.e. geographic azimuth) yagiAnt.Tilt = 90; yagiAnt.TiltAxis = 'y'; f = figure; % Show directivity pattern patternAzimuth(yagiAnt,tx.TransmitterFrequency)
%Close the previous figure if (isvalid(f)) close(f); end
Update the coverage map and links. Boston is now within the coverage zone, but communication links with receivers in other directions are lost.
% Update transmitter antenna tx.Antenna = yagiAnt; % Point main beam toward Boston, MA by assigning azimuth angle between % transmitter location and Boston receiver location tx.AntennaAngle = angle(tx, rxs(1)); % Update visualizations, using 'rain' propagation model coverage(tx,'rain','SignalStrengths',rxSensitivity) link(rxs,tx,'rain')
When a single signal strength is specified, the coverage map is green for the coverage region. Specify multiple signal strengths to generate a coverage map with contours for different signal levels.
% Define signal strengths from sensitivity to -60 dB sigStrengths = rxSensitivity:5:-60; % Update coverage map coverage(tx,'rain','SignalStrengths',sigStrengths)