Main Content

nrPathLoss

Path loss and shadow fading between BS and UE

Description

example

[pathloss,shadowfading] = nrPathLoss(pathlossconf,freq,los,bs,ue) returns the path loss, pathloss, between the base station (BS) and the user equipment (UE) for frequency freq. The function also returns the associated shadow fading standard deviation, shadowfading, as defined in TR 38.901 Section 7.4.1 [1]. pathlossconf specifies the scenario characteristics and the path loss model. bs and ue specify the Cartesian coordinates of the BS and UE, respectively. los specifies the presence or lack of line of sight (LOS) between the BS and UE. The function supports multiple BSs and multiple UEs.

Examples

collapse all

Create a path loss configuration object. Set the characteristics such that they correspond to a rural macrocell scenario with an average building height of 7 m and street width of 25 m.

pathlossconf = nrPathLossConfig;
pathlossconf.Scenario = "RMa"; 
pathlossconf.BuildingHeight = 7;
pathlossconf.StreetWidth = 25;

Specify the carrier frequency, LOS condition, and BS and UE coordinates.

freq = 3.5e9;
los = true;
bs = [0;0;30];
ue = [1e3;1e3;1.5];

Calculate the path loss between the BS and UE.

pathloss = nrPathLoss(pathlossconf,freq,los,bs,ue)
pathloss = 110.1615

Create a path loss configuration object. Set the characteristics such that they correspond to a rural macrocell scenario with an average building height of 7 m and street width of 25 m.

pathlossconf = nrPathLossConfig;
pathlossconf.Scenario = "RMa"; 
pathlossconf.BuildingHeight = 7;
pathlossconf.StreetWidth = 25;

Specify the carrier frequency in Hz.

freq = 3.5e9;

Specify the coordinates of two BSs and ten UEs. The BSs are 1 km apart. The UEs are randomly placed inside a 2 km-by-2 km square region at elevations between 1 m and 2 m.

bs = [-500 500; 0 0; 30 50];
nbs = size(bs,2);
nue = 10;
ue = zeros(3,nue);
ue(1:2,:) = 2e3*(rand(2,nue)-0.5);
ue(3,:) = 1 + rand(1,nue);

Specify the LOS condition between each BS and UE pair.

los = randi([0 1],nbs,nue);

Calculate the path loss between each BS and UE pair.

pathloss = nrPathLoss(pathlossconf,freq,los,bs,ue)
pathloss = 2×10

  109.9708  131.3512  133.6539   85.0968  112.2626  131.3747  110.1649  137.4889  130.5121  110.2199
  123.4839  134.9305  104.4709  125.2657  126.9743  133.3612   97.4411  121.9781  106.9546  105.4779

Input Arguments

collapse all

Path loss configuration, specified as an nrPathLossConfig object. This input specifies the scenario characteristics and the path loss model.

Carrier frequency, specified as a positive numeric scalar.

Data Types: double

LOS between the BS and UE, specified as one of these options.

  • 1 (true) — Specifies the presence of LOS between the BS and UE

  • 0 (false) — Specifies the lack of LOS between the BS and UE (NLOS)

  • Logical matrix of size NBS-by-NUE — Specifies the existence or lack of LOS between each BS and UE pair. NBS is the number of BSs. NUE is the number of UEs.

Data Types: double | logical

Cartesian coordinates of the BS, specified as a numeric matrix of size 3-by-NBS. NBS is the number of BSs. The first two rows of the matrix specify the 2-D position of the BS. The third row of the matrix specifies the height of the BS.

Data Types: double

Cartesian coordinates of the UE, specified as a numeric matrix of size 3-by-NUE. NUE is the number of UEs. The first two rows of the matrix specify the 2-D position of the UE. The third row of the matrix specifies the height of the UE.

Data Types: double

Output Arguments

collapse all

Path loss between the BS and UE, returned as a numeric matrix of size NBS-by-NUE. NBS is the number of BSs. NUE is the number of UEs.

Note

Because the input arguments are not restricted to the value ranges defined in TR 38.901, the function warns when the resulting path loss is not a positive number.

Data Types: double

Shadow fading standard deviation in dB, returned as a numeric matrix of size NBS-by-NUE. NBS is the number of BSs. NUE is the number of UEs.

Data Types: double

References

[1] 3GPP TR 38.901. “Study on channel model for frequencies from 0.5 to 100 GHz.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced in R2021b