From 50cfec8829d4d442d2f38e52a3123c08b24b2026 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Wed, 11 May 2016 21:07:26 +0100 Subject: [PATCH] Compute noise in all subframes --- matlab/tests/equalizer_test.m | 6 +++--- srslte/lib/ch_estimation/chest_dl.c | 12 +++++------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/matlab/tests/equalizer_test.m b/matlab/tests/equalizer_test.m index e04a34028..fc6b18c66 100644 --- a/matlab/tests/equalizer_test.m +++ b/matlab/tests/equalizer_test.m @@ -6,7 +6,7 @@ clear plot_noise_estimation_only=false; -SNR_values_db=linspace(0,30,5); +SNR_values_db=linspace(0,10,5); Nrealizations=10; w1=0.1; @@ -26,11 +26,11 @@ P=K/6; cfg.Seed = 0; % Random channel seed cfg.InitTime = 0; cfg.NRxAnts = 1; % 1 receive antenna -cfg.DelayProfile = 'EPA'; +cfg.DelayProfile = 'ETU'; % doppler 5, 70 300 -cfg.DopplerFreq = 5; % 120Hz Doppler frequency +cfg.DopplerFreq = 70; % 120Hz Doppler frequency cfg.MIMOCorrelation = 'Low'; % Low (no) MIMO correlation cfg.NTerms = 16; % Oscillators used in fading model cfg.ModelType = 'GMEDS'; % Rayleigh fading model type diff --git a/srslte/lib/ch_estimation/chest_dl.c b/srslte/lib/ch_estimation/chest_dl.c index 0a23b73ec..05b15f841 100644 --- a/srslte/lib/ch_estimation/chest_dl.c +++ b/srslte/lib/ch_estimation/chest_dl.c @@ -326,20 +326,18 @@ int srslte_chest_dl_estimate_port(srslte_chest_dl_t *q, cf_t *input, cf_t *ce, u interpolate_pilots(q, q->pilot_estimates_average, ce, port_id); /* If averaging, compute noise from difference between received and averaged estimates */ - if (sf_idx == 0 || sf_idx == 5) { - q->noise_estimate[port_id] = estimate_noise_pilots(q, port_id); - } + q->noise_estimate[port_id] = estimate_noise_pilots(q, port_id); } else { interpolate_pilots(q, q->pilot_estimates, ce, port_id); /* If not averaging, compute noise from empty subcarriers */ - if (sf_idx == 0 || sf_idx == 5) { #ifdef ESTIMATE_NOISE_LS_PSS + if (sf_idx == 0 || sf_idx == 5) { q->noise_estimate[port_id] = estimate_noise_pss(q, input, ce); -#else - q->noise_estimate[port_id] = estimate_noise_empty_sc(q, input); -#endif } +#else + q->noise_estimate[port_id] = estimate_noise_empty_sc(q, input); +#endif } }