Skip to content

Commit

Permalink
deactivate STF de-boost at RX
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpenner committed Dec 18, 2024
1 parent 0bcce8c commit 250c55c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,16 @@
N_OCC_0 = N_OCC_l/4;
samples_antenna_sto_cfo(1:STF_in_samples,:) = sqrt(N_OCC_0)/N_b_DFT*samples_antenna_sto_cfo(1:STF_in_samples,:);

% !!!!!!!!!!! NOT STANDARD COMPLIANT !!!!!!!!!!!
% !!!!!!!!!!! NOT STANDARD COMPLIANT !!!!!!!!!!!
% !!!!!!!!!!! NOT STANDARD COMPLIANT !!!!!!!!!!!
% !!!!!!!!!!! NOT STANDARD COMPLIANT !!!!!!!!!!!
% we boosted the stf, remove this boost
samples_antenna_sto_cfo(1:STF_in_samples,:) = 1/sqrt(N_eff_TX)*samples_antenna_sto_cfo(1:STF_in_samples,:);
%samples_antenna_sto_cfo(1:STF_in_samples,:) = 1/sqrt(N_eff_TX)*samples_antenna_sto_cfo(1:STF_in_samples,:);
% !!!!!!!!!!! NOT STANDARD COMPLIANT !!!!!!!!!!!
% !!!!!!!!!!! NOT STANDARD COMPLIANT !!!!!!!!!!!
% !!!!!!!!!!! NOT STANDARD COMPLIANT !!!!!!!!!!!
% !!!!!!!!!!! NOT STANDARD COMPLIANT !!!!!!!!!!!

% we need to add some zeros to make it a multiple of N_b_DFT
GI_length_in_samples = N_b_CP + N_b_DFT;
Expand Down Expand Up @@ -77,8 +85,16 @@
N_OCC_0 = N_OCC_l/4;
samples_antenna_sto_cfo(1:STF_in_samples,:) = sqrt(N_OCC_0)/N_b_DFT*samples_antenna_sto_cfo(1:STF_in_samples,:);

% !!!!!!!!!!! NOT STANDARD COMPLIANT !!!!!!!!!!!
% !!!!!!!!!!! NOT STANDARD COMPLIANT !!!!!!!!!!!
% !!!!!!!!!!! NOT STANDARD COMPLIANT !!!!!!!!!!!
% !!!!!!!!!!! NOT STANDARD COMPLIANT !!!!!!!!!!!
% we boosted the stf, remove this boost
samples_antenna_sto_cfo(1:STF_in_samples,:) = 1/sqrt(N_eff_TX)*samples_antenna_sto_cfo(1:STF_in_samples,:);
%samples_antenna_sto_cfo(1:STF_in_samples,:) = 1/sqrt(N_eff_TX)*samples_antenna_sto_cfo(1:STF_in_samples,:);
% !!!!!!!!!!! NOT STANDARD COMPLIANT !!!!!!!!!!!
% !!!!!!!!!!! NOT STANDARD COMPLIANT !!!!!!!!!!!
% !!!!!!!!!!! NOT STANDARD COMPLIANT !!!!!!!!!!!
% !!!!!!!!!!! NOT STANDARD COMPLIANT !!!!!!!!!!!

% ofdm demodulation, switch back to frequency domain
demod = comm.OFDMDemodulator ('FFTLength',N_b_DFT,...
Expand Down
4 changes: 2 additions & 2 deletions +lib_rx/sync_STF.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
% the step must be small enough to find every STF at every SNR
for k = 1 : sto_config.threshold.step : numel(metric)

% determine the metric at this samples index
% determine the metric at this sample index
metric(k) = lib_rx.sync_STO_coarse_metric(samples_antenna_single(k : k + n_samples_STF_os - 1), M, L, sto_config.minimum_power_threshold);

% the threshold must be small enough to find every STF at every SNR
Expand All @@ -68,7 +68,7 @@

% In a real receiver, we will start the rest of the synchronization algorithm once we hit a preamble at ANY antenna.
% This corresponds in our case to finding the smallest index across all antennas.
% If we didn't find any preamble at all, assume index 1, which will lead to a incorrect decoding if STO is sufficiently large.
% If we didn't find any preamble at all, assume index 1, which will lead to a incorrect decoding if the STO is sufficiently large.
if isempty(coarse_threshold_crossing_idx) == true
coarse_threshold_crossing_idx = 1;
else
Expand Down
2 changes: 1 addition & 1 deletion main_BER_PER_over_MCS_plot_PCC.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
clear all;
close all;

% This scripts plots the results generated with main_BER_PER_over_MCS.m, main_BER_PER_over_MCS_convergence.m or main_BER_PER_over_MCS_convergence_full.m.
% This scripts plots the results generated with main_BER_PER_over_MCS.m.

load('results/var_all.mat');

Expand Down
2 changes: 1 addition & 1 deletion main_BER_PER_over_MCS_plot_PDC.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
clear all;
close all;

% This scripts plots the results generated with main_BER_PER_over_MCS.m, main_BER_PER_over_MCS_convergence.m or main_BER_PER_over_MCS_convergence_full.m.
% This scripts plots the results generated with main_BER_PER_over_MCS.m.

load('results/var_all.mat');

Expand Down

0 comments on commit 250c55c

Please sign in to comment.