Added option to ue.conf to configure CFO EMA (set default to 0.4)

master
Ismael Gomez 7 years ago
parent b0157cb4f8
commit 85571c47cd

@ -446,6 +446,7 @@ typedef struct {
std::string snr_estim_alg; std::string snr_estim_alg;
bool cfo_integer_enabled; bool cfo_integer_enabled;
float cfo_correct_tol_hz; float cfo_correct_tol_hz;
float cfo_ema;
int time_correct_period; int time_correct_period;
bool sfo_correct_disable; bool sfo_correct_disable;
std::string sss_algorithm; std::string sss_algorithm;

@ -187,6 +187,9 @@ SRSLTE_API void srslte_ue_sync_set_cfo_tol(srslte_ue_sync_t *q,
SRSLTE_API void srslte_ue_sync_set_cfo(srslte_ue_sync_t *q, SRSLTE_API void srslte_ue_sync_set_cfo(srslte_ue_sync_t *q,
float cfo); float cfo);
SRSLTE_API void srslte_ue_sync_set_cfo_ema(srslte_ue_sync_t *q,
float ema);
SRSLTE_API void srslte_ue_sync_cfo_i_detec_en(srslte_ue_sync_t *q, SRSLTE_API void srslte_ue_sync_cfo_i_detec_en(srslte_ue_sync_t *q,
bool enable); bool enable);

@ -359,6 +359,11 @@ uint32_t srslte_ue_sync_peak_idx(srslte_ue_sync_t *q) {
return q->peak_idx; return q->peak_idx;
} }
void srslte_ue_sync_set_cfo_ema(srslte_ue_sync_t *q, float ema) {
srslte_sync_set_cfo_ema_alpha(&q->sfind, ema);
srslte_sync_set_cfo_ema_alpha(&q->strack, ema);
}
srslte_ue_sync_state_t srslte_ue_sync_get_state(srslte_ue_sync_t *q) { srslte_ue_sync_state_t srslte_ue_sync_get_state(srslte_ue_sync_t *q) {
return q->state; return q->state;
} }

@ -202,6 +202,11 @@ void parse_args(all_args_t *args, int argc, char *argv[]) {
bpo::value<float>(&args->expert.phy.cfo_correct_tol_hz)->default_value(50.0), bpo::value<float>(&args->expert.phy.cfo_correct_tol_hz)->default_value(50.0),
"Tolerance (in Hz) for digial CFO compensation.") "Tolerance (in Hz) for digial CFO compensation.")
("expert.cfo_ema",
bpo::value<float>(&args->expert.phy.cfo_ema)->default_value(0.4),
"CFO Exponential Moving Average coefficient. Lower makes it more robust to noise "
"but vulnerable to periodic interruptions due to VCO corrections.")
("expert.time_correct_period", ("expert.time_correct_period",
bpo::value<int>(&args->expert.phy.time_correct_period)->default_value(5), bpo::value<int>(&args->expert.phy.time_correct_period)->default_value(5),
"Period for sampling time offset correction.") "Period for sampling time offset correction.")

@ -209,6 +209,7 @@ void phch_recv::set_ue_sync_opts(srslte_ue_sync_t *q) {
srslte_ue_sync_cfo_i_detec_en(q, true); srslte_ue_sync_cfo_i_detec_en(q, true);
} }
srslte_ue_sync_set_cfo_ema(q, worker_com->args->cfo_ema);
srslte_ue_sync_set_cfo_tol(q, worker_com->args->cfo_correct_tol_hz); srslte_ue_sync_set_cfo_tol(q, worker_com->args->cfo_correct_tol_hz);
int time_correct_period = worker_com->args->time_correct_period; int time_correct_period = worker_com->args->time_correct_period;

@ -98,7 +98,10 @@ enable = false
##################################################################### #####################################################################
# Expert configuration options # Expert configuration options
# #
# ue_category: Sets UE category (range 1-5). Default: 4
# ip_netmask: Netmask of the tun_srsue device. Default: 255.255.255.0 # ip_netmask: Netmask of the tun_srsue device. Default: 255.255.255.0
# rssi_sensor_enabled: Enable or disable RF frontend RSSI sensor. Required for RSRP metrics but
# can cause UHD instability for long-duration testing. Default true.
# ue_category: Sets UE category (range 1-5). Default: 4 # ue_category: Sets UE category (range 1-5). Default: 4
# #
# prach_gain: PRACH gain (dB). If defined, forces a gain for the tranmsission of PRACH only., # prach_gain: PRACH gain (dB). If defined, forces a gain for the tranmsission of PRACH only.,
@ -117,6 +120,8 @@ enable = false
# equalizer_mode: Selects equalizer mode. Valid modes are: "mmse", "zf" or any # equalizer_mode: Selects equalizer mode. Valid modes are: "mmse", "zf" or any
# non-negative real number to indicate a regularized zf coefficient. # non-negative real number to indicate a regularized zf coefficient.
# Default is MMSE. # Default is MMSE.
# cfo_ema: CFO Exponential Moving Average coefficient. Lower makes it more robust to noise
# but vulnerable to periodic interruptions due to VCO corrections.
# cfo_integer_enabled: Enables integer CFO estimation and correction. This needs improvement # cfo_integer_enabled: Enables integer CFO estimation and correction. This needs improvement
# and may lead to incorrect synchronization. Use with caution. # and may lead to incorrect synchronization. Use with caution.
# cfo_correct_tol_hz: Tolerance (in Hz) for digial CFO compensation. Lower tolerance means that # cfo_correct_tol_hz: Tolerance (in Hz) for digial CFO compensation. Lower tolerance means that
@ -140,6 +145,7 @@ enable = false
##################################################################### #####################################################################
[expert] [expert]
#ip_netmask = 255.255.255.0 #ip_netmask = 255.255.255.0
#rssi_sensor_enabled = false
#ue_category = 4 #ue_category = 4
#prach_gain = 30 #prach_gain = 30
#cqi_max = 15 #cqi_max = 15
@ -150,6 +156,7 @@ enable = false
#attach_enable_64qam = false #attach_enable_64qam = false
#nof_phy_threads = 2 #nof_phy_threads = 2
#equalizer_mode = mmse #equalizer_mode = mmse
#cfo_ema = 0.4
#cfo_integer_enabled = false #cfo_integer_enabled = false
#cfo_correct_tol_hz = 50 #cfo_correct_tol_hz = 50
#time_correct_period = 5 #time_correct_period = 5

Loading…
Cancel
Save