imt_urban_macro_losses#

pycraf.pathprof.imt_urban_macro_losses(freq, dist_2d, h_bs=<Quantity 25. m>, h_ue=<Quantity 1.5 m>)[source]#

Calculate los/non-los propagation losses Rural-Macro IMT scenario.

The computation is in accordance with 3GPP TR 38.901 Table 7.4.1-1

Parameters:
freqQuantity

Frequency of radiation [GHz]

dist_2dQuantity

Distance on the ground between BS and UE device [m] Note: Well-defined only for distances between 10 m and 5 km.

h_bsQuantity, optional

Basestation height [m] (Default: 35 m)

h_ueQuantity, optional

User equipment height [m] (Default: 1.5 m) Note: in the pycraf implementation this is restricted to h_ue < 13 m. 3GPP TR 38.901 also has a model for heights up to 22.5 m, but this involves a h_e different from 1 m and is probabilistic, which would make the interface much more complicated.

Returns:
PL_losQuantity

Path loss for line-of-sight cases [dB]

PL_nlosQuantity

Path loss for non-line-of-sight cases [dB]

los_probQuantity

Probability for a path to be line-of-sight. [dimless] (see Notes and Examples)

Notes

  • In statistical simulations, the LoS and Non-LoS cases occur with certain probabilities. For sampling of path losses the return parameter los_prob can be used, which accounts for the likelihoods according to 3GPP TR 38.901 Table 7.4.2-1

Examples

A typical usage, which also accounts for the line-of-sight probabilities, would be:

>>> import numpy as np
>>> from pycraf import conversions as cnv
>>> from pycraf import pathprof
>>> from astropy import units as u
>>> from astropy.utils.misc import NumpyRNGContext

>>> freq = 1 * u.GHz
>>> h_bs, h_ue = 25 * u.m, 1.5 * u.m
>>> distances = [5, 20, 1000, 20000] * u.m  # 2D distances
>>> # Note: too small or large distances will lead to NaN values

>>> PL_los, PL_nlos, los_prob = pathprof.imt_urban_macro_losses(
...     freq, distances, h_bs=h_bs, h_ue=h_ue
...     )
>>> PL_los  
<Decibel [         nan,  60.766, 108.247,          nan] dB>
>>> PL_nlos  
<Decibel [         nan,  71.745, 130.785,          nan] dB>
>>> los_prob  
<Quantity [1.000e+00, 9.728e-01, 1.800e-02, 9.000e-04]>

>>> # randomly assign LOS or Non-LOS type to UE (according to above prob.)
>>> with NumpyRNGContext(0):
...     los_type = np.random.uniform(0, 1, distances.size) < los_prob
>>> # note: los_type == True : LOS
>>> #       los_type == False: Non-LOS
>>> los_type
array([ True,  True, False, False])
>>> PL = np.where(
...     los_type, PL_los.to_value(cnv.dB), PL_nlos.to_value(cnv.dB)
...     ) * cnv.dB
>>> PL  
<Decibel [         nan,  60.766, 130.785,          nan] dB>