Changed the way we detect out-of-sync

master
Ismael Gomez 7 years ago
parent fd9f847d2d
commit f8655f3260

@ -67,13 +67,11 @@ public:
float avg_rsrp;
float avg_rsrp_cqi;
float avg_rsrp_dbm;
float avg_rsrp_sync_dbm;
float avg_rsrq_db;
float avg_rssi_dbm;
float last_radio_rssi;
float rx_gain_offset;
float avg_snr_db_cqi;
float avg_snr_db_sync;
float avg_noise;
uint32_t pcell_report_period;

@ -343,7 +343,6 @@ void phch_common::reset() {
sr_last_tx_tti = -1;
cur_pusch_power = 0;
avg_snr_db_cqi = 0;
avg_snr_db_sync = 0;
avg_rsrp = 0;
avg_rsrp_cqi = 0;
avg_rsrp_dbm = 0;

@ -407,13 +407,13 @@ void phch_worker::work_imp()
update_measurements();
if (chest_ok) {
if (phy->avg_rsrp_sync_dbm > -130.0 && phy->avg_snr_db_sync > -10.0) {
if (phy->avg_rsrp_dbm > -130.0 && phy->avg_snr_db_cqi > 0.0) {
log_h->debug("SNR=%.1f dB, RSRP=%.1f dBm sync=in-sync from channel estimator\n",
phy->avg_snr_db_sync, phy->avg_rsrp_sync_dbm);
phy->avg_snr_db_cqi, phy->avg_rsrp_dbm);
chest_loop->in_sync();
} else {
log_h->warning("SNR=%.1f dB RSRP=%.1f dBm, sync=out-of-sync from channel estimator\n",
phy->avg_snr_db_sync, phy->avg_rsrp_sync_dbm);
phy->avg_snr_db_cqi, phy->avg_rsrp_dbm);
chest_loop->out_of_sync();
}
}
@ -1482,19 +1482,8 @@ void phch_worker::update_measurements()
phy->avg_rsrp_cqi = rsrp_lin_cqi;
}
}
float rsrp_sync_dbm = 10*log10(rsrp_lin_cqi) + 30 - phy->rx_gain_offset;
if (isnormal(rsrp_sync_dbm)) {
if (!phy->avg_rsrp_sync_dbm) {
phy->avg_rsrp_sync_dbm = rsrp_sync_dbm;
} else {
phy->avg_rsrp_sync_dbm = SRSLTE_VEC_EMA(rsrp_sync_dbm, phy->avg_rsrp_sync_dbm, snr_ema_coeff);
}
}
// We compute 2 SNR metrics, 1 for deciding in-sync/out-of-sync and another for CQI measurements
phy->avg_snr_db_cqi = 10*log10(phy->avg_rsrp_cqi/phy->avg_noise); // this for CQI
phy->avg_snr_db_sync = 10*log10(phy->avg_rsrp/phy->avg_noise); // this for sync
phy->avg_snr_db_cqi = 10*log10(phy->avg_rsrp_cqi/phy->avg_noise);
// Store metrics
dl_metrics.n = phy->avg_noise;

Loading…
Cancel
Save