Compute noise in all subframes

This commit is contained in:
Ismael Gomez 2016-05-11 21:07:26 +01:00
parent 3519e2f15a
commit 50cfec8829
2 changed files with 8 additions and 10 deletions

View File

@ -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

View File

@ -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
}
}