Calibrated noise estimation using matlab for length 3 filters. Fixed compilation of volk for MEX.

This commit is contained in:
Ismael Gomez 2016-05-11 21:00:12 +01:00
parent 24926ed648
commit 3519e2f15a
3 changed files with 12 additions and 9 deletions

View File

@ -7,10 +7,10 @@ clear
plot_noise_estimation_only=false;
SNR_values_db=linspace(0,30,5);
Nrealizations=4;
Nrealizations=10;
w1=0.1;
w2=0.2;
w2=0.3;
enb.NDLRB = 50; % Number of resource blocks
@ -26,7 +26,7 @@ P=K/6;
cfg.Seed = 0; % Random channel seed
cfg.InitTime = 0;
cfg.NRxAnts = 1; % 1 receive antenna
cfg.DelayProfile = 'EVA';
cfg.DelayProfile = 'EPA';
% doppler 5, 70 300
@ -203,7 +203,6 @@ end
%% Plot a single realization
if (length(SNR_values_db) == 1)
subplot(2,1,1)
sym=1;
ref_idx=1:P;
ref_idx_x=[1:6:K];% (292:6:360)-216];% 577:6:648];
@ -227,9 +226,6 @@ if (length(SNR_values_db) == 1)
fprintf('Mean MMSE Robust %.2f dB\n', 10*log10(MSE(4,nreal,snr_idx)))
fprintf('Mean MMSE matlab %.2f dB\n', 10*log10(MSE(1,nreal,snr_idx)))
subplot(2,1,2)
plot(1:P,abs(W3(P/2,:)))
end

View File

@ -92,6 +92,7 @@ endif(RF_FOUND)
if(VOLK_FOUND)
target_link_libraries(srslte ${VOLK_LIBRARIES})
target_link_libraries(srslte_static ${VOLK_LIBRARIES})
endif(VOLK_FOUND)
INSTALL(TARGETS srslte DESTINATION ${LIBRARY_DIR})

View File

@ -178,8 +178,14 @@ static float estimate_noise_pilots(srslte_chest_dl_t *q, uint32_t port_id)
srslte_vec_fprint_f(stdout, q->snr_vector, nref);
#endif
/* Compute average power */
float power = (1/q->smooth_filter[0])*q->cell.nof_ports*srslte_vec_avg_power_cf(q->tmp_noise, nref);
/* Compute average power. Normalized for filter len 3 using matlab */
float norm = 1;
if (q->smooth_filter_len == 3) {
float a = q->smooth_filter[0];
float norm3 = 6.143*a*a+0.04859*a-0.002774;
norm /= norm3;
}
float power = norm*q->cell.nof_ports*srslte_vec_avg_power_cf(q->tmp_noise, nref);
return power;
}