P_pusch#

pycraf.pathprof.P_pusch(P_cmax, M_pusch, P_0_pusch, alpha, PL)[source]#

Calculate power output level after UE power control.

See ITU-R Rec. M.2101-0 Section 4.1.

Parameters:
P_cmaxQuantity

Maximum transmit power [dBm]

M_puschnumpy.ndarray, int

Number of allocated resource blocks (RBs)

Is this the bandwidth per carrier divided by the RB bandwidth ( typically 180 kHz) and number of UE devices associated to each carrier?

P_0_puschnumpy.ndarray

Initial receive target UE power level per RB [dBm]

alphaQuantity

Balancing factor for UEs with bad channel and UEs with good channel

PLQuantity

Path loss between UE and its associated BS [dB] One should use one of the functions imt_rural_macro_losses, imt_urban_macro_losses, or imt_urban_micro_losses to determine PL for the required scenario.

Note: Antenna gains should be included, so this is rather the coupling loss than the path loss, unlike what is stated in ITU-R Rec. M.2101-0.

Returns:
P_puschQuantity

Transmit power of the terminal [dBm]

Examples

A typical usage 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 = 6.65 * u.GHz
>>> h_bs, h_ue = 10 * u.m, 1.5 * u.m
>>> distances = [20, 100, 500, 1000] * u.m  # 2D distances

>>> PL_los, PL_nlos, los_prob = pathprof.imt_urban_micro_losses(
...     freq, distances, h_bs=h_bs, h_ue=h_ue
...     )

>>> # 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
>>> PL = np.where(
...     los_type, PL_los.to_value(cnv.dB), PL_nlos.to_value(cnv.dB)
...     ) * cnv.dB
>>> PL  
<Decibel [ 76.935, 110.581, 135.202, 145.827] dB>

>>> # Assume some antenna gains:
>>> G_bs, G_ue = 20 * cnv.dBi, 5 * cnv.dBi
>>> CL = (
...     PL.to_value(cnv.dB) -
...     G_bs.to_value(cnv.dBi) -
...     G_ue.to_value(cnv.dBi)
...     ) * cnv.dB

>>> bw_carrier = 100 * u.MHz
>>> bw_rb = 180 * u.kHz  # resource block bandwidth
>>> num_ue = 3  # 3 UEs per BS sector and carrier
>>> M_pusch = int(bw_carrier / bw_rb / num_ue)
>>> M_pusch
185

>>> P_cmax = 23 * cnv.dBm
>>> P_0_pusch = -95.5 * cnv.dBm
>>> alpha = 0.8 * cnv.dimless

>>> P_pusch = pathprof.P_pusch(
...     P_cmax, M_pusch, P_0_pusch, alpha, CL
...     )
>>> P_pusch.to(cnv.dBm)  
<Decibel [-31.28 ,  -4.363,  15.333,  23.          ] dB(mW)>