imt_urban_micro_losses#
- pycraf.pathprof.imt_urban_micro_losses(freq, dist_2d, h_bs=<Quantity 10. 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:
- 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 = 10 * 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_micro_losses( ... freq, distances, h_bs=h_bs, h_ue=h_ue ... ) >>> PL_los <Decibel [ nan, 60.479, 118.534, nan] dB> >>> PL_nlos <Decibel [ nan, 69.599, 128.301, nan] dB> >>> los_prob <Quantity [1.000e+00, 9.574e-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.479, 128.301, nan] dB>