From f067d984822ef48f868dccd87e88ad6680dee930 Mon Sep 17 00:00:00 2001 From: ismagom Date: Tue, 16 Dec 2014 15:15:03 +0000 Subject: [PATCH] Fine tune in cell measurement --- lte/examples/cell_measurement.c | 4 ++-- lte/examples/pdsch_ue.c | 3 ++- lte/phy/lib/ue/src/ue_mib.c | 2 ++ lte/phy/lib/ue/src/ue_sync.c | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lte/examples/cell_measurement.c b/lte/examples/cell_measurement.c index 42614f38d..c9f19a0c6 100644 --- a/lte/examples/cell_measurement.c +++ b/lte/examples/cell_measurement.c @@ -42,12 +42,12 @@ #include "cuhd_utils.h" #define B210_DEFAULT_GAIN 40.0 -#define B210_DEFAULT_GAIN_CORREC 80.0 // Gain of the Rx chain when the gain is set to 40 +#define B210_DEFAULT_GAIN_CORREC 110.0 // Gain of the Rx chain when the gain is set to 40 float gain_offset = B210_DEFAULT_GAIN_CORREC; cell_search_cfg_t cell_detect_config = { - 500, // maximum number of frames to receive for MIB decoding + 5000, // maximum number of frames to receive for MIB decoding 50, // maximum number of frames to receive for PSS correlation 9.0 // early-stops cell detection if mean PSR is above this value }; diff --git a/lte/examples/pdsch_ue.c b/lte/examples/pdsch_ue.c index 01f4196bd..afa0dfed2 100644 --- a/lte/examples/pdsch_ue.c +++ b/lte/examples/pdsch_ue.c @@ -48,12 +48,13 @@ void do_plots(ue_dl_t *q, uint32_t sf_idx, ue_sync_t *qs); #define B210_DEFAULT_GAIN 40.0 -#define B210_DEFAULT_GAIN_CORREC 80.0 // Gain of the Rx chain when the gain is set to 40 +#define B210_DEFAULT_GAIN_CORREC 110.0 // Gain of the Rx chain when the gain is set to 40 float gain_offset = B210_DEFAULT_GAIN_CORREC; cell_search_cfg_t cell_detect_config = { + 5000, 100, // nof_frames_total 4.0 // threshold }; diff --git a/lte/phy/lib/ue/src/ue_mib.c b/lte/phy/lib/ue/src/ue_mib.c index 239b6b91f..644b4289a 100644 --- a/lte/phy/lib/ue/src/ue_mib.c +++ b/lte/phy/lib/ue/src/ue_mib.c @@ -214,7 +214,9 @@ int ue_mib_sync_decode(ue_mib_sync_t * q, break; } else if (ue_sync_get_sfidx(&q->ue_sync) == 0) { if (ret == 1) { + ue_mib_reset(&q->ue_mib); mib_ret = ue_mib_decode(&q->ue_mib, sf_buffer, bch_payload, nof_tx_ports, sfn_offset); + } else { INFO("Resetting PBCH decoder after %d frames\n", q->ue_mib.frame_cnt); ue_mib_reset(&q->ue_mib); diff --git a/lte/phy/lib/ue/src/ue_sync.c b/lte/phy/lib/ue/src/ue_sync.c index 9370056e0..9a6ec8b0a 100644 --- a/lte/phy/lib/ue/src/ue_sync.c +++ b/lte/phy/lib/ue/src/ue_sync.c @@ -42,7 +42,7 @@ cf_t dummy[MAX_TIME_OFFSET]; #define TRACK_MAX_LOST 10 #define TRACK_FRAME_SIZE 32 -#define FIND_NOF_AVG_FRAMES 4 +#define FIND_NOF_AVG_FRAMES 2 int ue_sync_init(ue_sync_t *q, lte_cell_t cell, @@ -119,7 +119,7 @@ int ue_sync_init(ue_sync_t *q, sync_set_em_alpha(&q->sfind, 1); q->nof_avg_find_frames = 1; sync_set_threshold(&q->sfind, 2.0); - sync_set_threshold(&q->strack, 1.4); + sync_set_threshold(&q->strack, 1.2); /* Correct CFO in the find state but not in the track state, since is called only * 1 every 5 subframes. Will do it in the ue_sync_get_buffer() function.