Skip to content

Correct PRACH preamble tx power calculation.

Bartosz Podrygajlo requested to merge nr-prach-tx-power-fix into develop

Attempting to fix PRACH tx power calculation.

According to 38.213 7.4:

image.png

Current state:

int16_t get_prach_tx_power(NR_UE_MAC_INST_t *mac)
{
  RA_config_t *ra = &mac->ra;
  int16_t pathloss = compute_nr_SSB_PL(mac, mac->ssb_measurements.ssb_rsrp_dBm);
  int16_t ra_preamble_rx_power = (int16_t)(ra->prach_resources.ra_PREAMBLE_RECEIVED_TARGET_POWER - pathloss + 30);
  return min(ra->prach_resources.RA_PCMAX, ra_preamble_rx_power);
}
  • There is an extra 30 added to the calculation cannot explain it so I've removed it - I think this was an attempt to convert from dB to dBm, however this is not necessary here as ra_PREAMBLE_RECEIVED_POWER is in dBm
  • pathloss has incorrect sign - power should increase with pathloss, but pathloss is positive here (gNB ssb tx power - UE ssb rsrp dbm) which resulted in reduced tx power.
Edited by Bartosz Podrygajlo

Merge request reports