diff --git a/lib/src/phy/ch_estimation/dmrs_pucch.c b/lib/src/phy/ch_estimation/dmrs_pucch.c index 7a045c325..cae4cac58 100644 --- a/lib/src/phy/ch_estimation/dmrs_pucch.c +++ b/lib/src/phy/ch_estimation/dmrs_pucch.c @@ -238,7 +238,7 @@ int srsran_dmrs_pucch_format1_estimate(const srsran_pucch_nr_t* q, res->rsrp_dBfs = srsran_convert_power_to_dB(rsrp); res->epre = epre; res->epre_dBfs = srsran_convert_power_to_dB(epre); - res->noise_estimate = epre - rsrp; + res->noise_estimate = SRSRAN_MAX(epre - rsrp, 1e-6f); res->noise_estimate_dbm = srsran_convert_power_to_dB(res->noise_estimate); res->snr = rsrp / res->noise_estimate; res->snr_db = srsran_convert_power_to_dB(res->snr); @@ -398,7 +398,7 @@ int srsran_dmrs_pucch_format2_estimate(const srsran_pucch_nr_t* q, res->rsrp_dBfs = srsran_convert_power_to_dB(rsrp); res->epre = epre; res->epre_dBfs = srsran_convert_power_to_dB(epre); - res->noise_estimate = epre - rsrp; + res->noise_estimate = SRSRAN_MAX(epre - rsrp, 1e-6f); res->noise_estimate_dbm = srsran_convert_power_to_dB(res->noise_estimate); res->snr = rsrp / res->noise_estimate; res->snr_db = srsran_convert_power_to_dB(res->snr);