Compute noise in all subframes

master
Ismael Gomez 9 years ago
parent 3519e2f15a
commit 50cfec8829

@ -6,7 +6,7 @@ clear
plot_noise_estimation_only=false; plot_noise_estimation_only=false;
SNR_values_db=linspace(0,30,5); SNR_values_db=linspace(0,10,5);
Nrealizations=10; Nrealizations=10;
w1=0.1; w1=0.1;
@ -26,11 +26,11 @@ P=K/6;
cfg.Seed = 0; % Random channel seed cfg.Seed = 0; % Random channel seed
cfg.InitTime = 0; cfg.InitTime = 0;
cfg.NRxAnts = 1; % 1 receive antenna cfg.NRxAnts = 1; % 1 receive antenna
cfg.DelayProfile = 'EPA'; cfg.DelayProfile = 'ETU';
% doppler 5, 70 300 % doppler 5, 70 300
cfg.DopplerFreq = 5; % 120Hz Doppler frequency cfg.DopplerFreq = 70; % 120Hz Doppler frequency
cfg.MIMOCorrelation = 'Low'; % Low (no) MIMO correlation cfg.MIMOCorrelation = 'Low'; % Low (no) MIMO correlation
cfg.NTerms = 16; % Oscillators used in fading model cfg.NTerms = 16; % Oscillators used in fading model
cfg.ModelType = 'GMEDS'; % Rayleigh fading model type cfg.ModelType = 'GMEDS'; % Rayleigh fading model type

@ -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); interpolate_pilots(q, q->pilot_estimates_average, ce, port_id);
/* If averaging, compute noise from difference between received and averaged estimates */ /* 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 { } else {
interpolate_pilots(q, q->pilot_estimates, ce, port_id); interpolate_pilots(q, q->pilot_estimates, ce, port_id);
/* If not averaging, compute noise from empty subcarriers */ /* If not averaging, compute noise from empty subcarriers */
if (sf_idx == 0 || sf_idx == 5) {
#ifdef ESTIMATE_NOISE_LS_PSS #ifdef ESTIMATE_NOISE_LS_PSS
if (sf_idx == 0 || sf_idx == 5) {
q->noise_estimate[port_id] = estimate_noise_pss(q, input, ce); q->noise_estimate[port_id] = estimate_noise_pss(q, input, ce);
}
#else #else
q->noise_estimate[port_id] = estimate_noise_empty_sc(q, input); q->noise_estimate[port_id] = estimate_noise_empty_sc(q, input);
#endif #endif
}
} }
} }

Loading…
Cancel
Save