imt_rural_macro_losses#
- pycraf.pathprof.imt_rural_macro_losses(freq, dist_2d, h_bs=<Quantity 35. m>, h_ue=<Quantity 1.5 m>, W=<Quantity 20. m>, h=<Quantity 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:
- freq
Quantity
Frequency of radiation [GHz]
- dist_2d
Quantity
Distance on the ground between BS and UE device [m] Note: Well-defined only for distances between 10 m and 10 km.
- h_bs
Quantity
, optional Basestation height [m] (Default: 35 m)
- h_ue
Quantity
, optional User equipment height [m] (Default: 1.5 m)
- W
Quantity
, optional Average street width [m] (Default: 20 m)
- h
Quantity
, optional Average building height [m] (Default: 5 m)
- freq
- Returns:
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 = 35 * 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_rural_macro_losses( ... freq, distances, h_bs=h_bs, h_ue=h_ue ... ) >>> PL_los <Decibel [ nan, 64.381, 94.578, nan] dB> >>> PL_nlos <Decibel [ nan, 65.108, 119.543, nan] dB> >>> los_prob <Quantity [1.000e+00, 9.900e-01, 3.716e-01, 2.082e-09]> >>> # 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, 64.381, 119.543, nan] dB>