Skip to content
This repository was archived by the owner on Jun 27, 2020. It is now read-only.

Commit e046d6f

Browse files
committed
Revert "matlab: fix quantization error calculation"
Just not sure what to do here, but the old way works much better. How to fix, how to fix... This reverts commit 441b9f67bfd46adc2bd845f2b4ac94a4cddb54cf.
1 parent bf5b95e commit e046d6f

File tree

2 files changed

+9
-28
lines changed

2 files changed

+9
-28
lines changed

matlab/get_quant_err.m

Lines changed: 0 additions & 25 deletions
This file was deleted.

matlab/get_scaled_csi.m

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,15 @@
2323
end
2424
thermal_noise_pwr = dbinv(noise_db);
2525

26-
% Take two: quantization error power can't ever be lower than ADC_BITS
27-
% below RSSI
28-
quant_error_pwr = dbinv(get_quant_err(csi_st, 6));
26+
% Quantization error: the coefficients in the matrices are
27+
% 8-bit signed numbers, max 127/-128 to min 0/1. Given that Intel
28+
% only uses a 6-bit ADC, I expect every entry to be off by about
29+
% +/- 1 (total across real & complex parts) per entry.
30+
%
31+
% The total power is then 1^2 = 1 per entry, and there are
32+
% Nrx*Ntx entries per carrier. We only want one carrier's worth of
33+
% error, since we only computed one carrier's worth of signal above.
34+
quant_error_pwr = scale * (csi_st.Nrx * csi_st.Ntx);
2935

3036
% Total noise and error power
3137
total_noise_pwr = thermal_noise_pwr + quant_error_pwr;

0 commit comments

Comments
 (0)