before new database
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
% === DSP settings ===
|
||||
dsp_options = struct();
|
||||
dsp_options.mode = "run_id";
|
||||
dsp_options.recipe = @mpi_recipe_dev;
|
||||
dsp_options.recipe = @mpi_recipe;
|
||||
dsp_options.append_to_db = false;
|
||||
dsp_options.start_occurence = 1;
|
||||
dsp_options.max_occurences = 15;
|
||||
|
||||
@@ -27,13 +27,13 @@ db = DBHandler("dataBase", [dsp_options.dataBase],...
|
||||
|
||||
fp = QueryFilter();
|
||||
fp.where('Runs','run_id','GREATER_EQUAL',3153);
|
||||
fp.where('Runs', 'symbolrate', 'EQUALS', 72e9); % 72 96 112
|
||||
fp.where('Runs', 'symbolrate', 'EQUALS', 112e9); % 72 96 112
|
||||
fp.where('Runs', 'fiber_length', 'EQUALS', 0);
|
||||
fp.where('Runs', 'interference_path_length', 'EQUALS', 1000);
|
||||
% fp.where('Runs', 'sir', 'LESS_EQUAL', 50);
|
||||
fp.where('Runs', 'db_mode', 'EQUALS', '"no_db"');
|
||||
% fp.where('Runs', 'is_mpi', 'EQUALS', 1);
|
||||
fp.where('Runs', 'pam_level', 'EQUALS', 8);
|
||||
fp.where('Runs', 'pam_level', 'EQUALS', 4);
|
||||
% fp.where('Runs', 'v_bias', 'EQUALS', 2.65);
|
||||
|
||||
[dataTable,~] = db.queryDB(fp, db.getTableFieldNames('Runs'));
|
||||
@@ -47,7 +47,7 @@ dataTable = dataTable(sortIdx, :);
|
||||
run_ids = dataTable.run_id;
|
||||
%%
|
||||
|
||||
wh_ = load("C:\Users\Silas\Documents\MATLAB\imdd_simulation\projects\Diss\MPI_revisit\parallelization_analysis\wh_block_update_pam8_combined.mat");
|
||||
wh_ = load("C:\Users\Silas\Documents\MATLAB\imdd_simulation\projects\Diss\MPI_revisit\parallelization_analysis\wh_block_update_pam4_combined.mat");
|
||||
wh = wh_.wh;
|
||||
|
||||
% wh_ = load("C:\Users\Silas\Documents\MATLAB\imdd_simulation\projects\Diss\MPI_revisit\parallelization_analysis\wh_block_update_pam4_short_blocks.mat");
|
||||
@@ -59,6 +59,7 @@ wh = wh_.wh;
|
||||
|
||||
|
||||
storageNames = fieldnames(wh.sto);
|
||||
storageNames = storageNames([1,2,3,5]);
|
||||
ber_by_storage = struct();
|
||||
ber_mat_by_storage = struct();
|
||||
|
||||
@@ -73,7 +74,10 @@ else
|
||||
curve_colors = lines(max(numel(storageNames),1));
|
||||
end
|
||||
|
||||
fec_ber_threshold = 2e-2;%3.8e-3;
|
||||
useBoundedLines = true;
|
||||
usePolyfit = true;
|
||||
polyfitOrderMax = 4;
|
||||
fec_ber_threshold = 3.8e-3;%3.8e-3;
|
||||
fit_coeff_by_storage = struct();
|
||||
required_sir_fec_by_storage = struct();
|
||||
for storage_idx = 1:numel(storageNames)
|
||||
@@ -124,12 +128,19 @@ for block_idx = 1:numel(block_updates)
|
||||
ber_mat(1:numel(ber_all{k}),k) = ber_all{k};
|
||||
end
|
||||
|
||||
% Replace outliers in ber_mat with NaN (operate column-wise).
|
||||
% Match the BER-over-SIR plot cleanup: remove high BER points and outliers per SIR.
|
||||
for col = 1:size(ber_mat,2)
|
||||
colData = ber_mat(:,col);
|
||||
if all(isnan(colData)); continue; end
|
||||
mask = isoutlier(colData);
|
||||
ber_mat(mask,col) = NaN;
|
||||
colData(~isfinite(colData) | colData >= 0.1) = NaN;
|
||||
validColData = colData(isfinite(colData));
|
||||
if isempty(validColData)
|
||||
ber_mat(:,col) = NaN;
|
||||
continue
|
||||
end
|
||||
outliers = isoutlier(validColData);
|
||||
validColData(outliers) = NaN;
|
||||
colData(isfinite(colData)) = validColData;
|
||||
ber_mat(:,col) = colData;
|
||||
end
|
||||
|
||||
ber = mean(ber_mat,1,"omitnan");
|
||||
@@ -153,38 +164,50 @@ for block_idx = 1:numel(block_updates)
|
||||
ber_by_storage.(storageName){block_idx} = ber;
|
||||
ber_mat_by_storage.(storageName){block_idx} = ber_mat;
|
||||
|
||||
y_lower = max(ber - ber_min,0);
|
||||
y_upper = max(ber_max - ber,0);
|
||||
y_bounds = [y_lower(:), y_upper(:)];
|
||||
|
||||
[hl, hp] = boundedline(x(:),ber(:),y_bounds, ...
|
||||
'alpha', 'transparency', 0.1, ...
|
||||
'cmap', curve_color, ...
|
||||
'nan', 'fill', ...
|
||||
'orientation', 'vert');
|
||||
set(hl, ...
|
||||
'LineWidth',1.4, ...
|
||||
'LineStyle','none', ...
|
||||
'Marker','o', ...
|
||||
'Markersize',5,...
|
||||
'Color',curve_color, ...
|
||||
'DisplayName',storageName);
|
||||
set(hp, ...
|
||||
'HandleVisibility','off', ...
|
||||
'LineStyle','none');
|
||||
|
||||
for k = 1:numel(x)
|
||||
scatter(repmat(x(k),maxPackages,1),ber_mat(:,k), ...
|
||||
16, ...
|
||||
30, ...
|
||||
'Marker','.', ...
|
||||
'MarkerEdgeColor',curve_color, ...
|
||||
'MarkerFaceColor',curve_color, ...
|
||||
'HandleVisibility','off');
|
||||
end
|
||||
|
||||
fit_mask = isfinite(x) & isfinite(ber) & ber > 0;
|
||||
if nnz(fit_mask) >= 2
|
||||
fit_order = min(3,nnz(fit_mask)-1);
|
||||
valid = isfinite(x) & isfinite(ber);
|
||||
if ~any(valid)
|
||||
continue
|
||||
end
|
||||
|
||||
% if useBoundedLines && exist("boundedline","file")
|
||||
% y_lower = max(ber - ber_min,0);
|
||||
% y_upper = max(ber_max - ber,0);
|
||||
% y_bounds = [y_lower(:), y_upper(:)];
|
||||
%
|
||||
% [hl, hp] = boundedline(x(valid).',ber(valid).',y_bounds(valid,:), ...
|
||||
% 'alpha', 'transparency', 0.08, ...
|
||||
% 'cmap', curve_color, ...
|
||||
% 'nan', 'fill', ...
|
||||
% 'orientation', 'vert');
|
||||
% set(hl, ...
|
||||
% 'LineStyle','none', ...
|
||||
% 'Marker','none', ...
|
||||
% 'HandleVisibility','off');
|
||||
% set(hp, ...
|
||||
% 'HandleVisibility','off', ...
|
||||
% 'LineStyle','none');
|
||||
% end
|
||||
|
||||
scatter(x(valid),ber(valid), ...
|
||||
20, ...
|
||||
'Marker','o', ...
|
||||
'MarkerEdgeColor',curve_color, ...
|
||||
'MarkerFaceColor',curve_color, ...
|
||||
'LineWidth',1, ...
|
||||
'DisplayName',storageName);
|
||||
|
||||
fit_mask = valid & ber > 0;
|
||||
if usePolyfit && nnz(fit_mask) >= 2
|
||||
fit_order = min(polyfitOrderMax,nnz(fit_mask)-1);
|
||||
fit_coeff = polyfit(x(fit_mask),log10(ber(fit_mask)),fit_order);
|
||||
x_fit = linspace(min(x(fit_mask)),max(x(fit_mask)),300);
|
||||
y_fit = 10.^polyval(fit_coeff,x_fit);
|
||||
@@ -210,9 +233,8 @@ for block_idx = 1:numel(block_updates)
|
||||
required_sir_fec_by_storage.(storageName)(block_idx) = sir_req;
|
||||
|
||||
plot(x_fit,y_fit, ...
|
||||
'LineWidth',1.2, ...
|
||||
'LineWidth',1.1, ...
|
||||
'LineStyle','--', ...
|
||||
'Marker','none', ...
|
||||
'Color',curve_color, ...
|
||||
'HandleVisibility','off');
|
||||
end
|
||||
@@ -221,10 +243,17 @@ for block_idx = 1:numel(block_updates)
|
||||
title(sprintf("BER over SIR, block update = %g",block_update));
|
||||
xlabel("SIR (dB)");
|
||||
ylabel("BER");
|
||||
xlim([15 35]);
|
||||
|
||||
beautifyBERplot("logscale",true,"setcolors",false,"setmarkers",false);
|
||||
legend("Location","best","Interpreter","none");
|
||||
yline(2.2e-4, 'LineWidth', 1, 'LineStyle', '--', 'HandleVisibility', 'off');
|
||||
yline(3.8e-3, 'LineWidth', 1, 'LineStyle', '--', 'HandleVisibility', 'off');
|
||||
yline(2e-2, 'LineWidth', 1, 'LineStyle', '--', 'HandleVisibility', 'off');
|
||||
ylim([9e-5, 0.1]);
|
||||
|
||||
set(gca, "YScale", "log");
|
||||
xlim([15,45]);
|
||||
grid on;
|
||||
box on;
|
||||
legend("Location", "best", "Interpreter", "none");
|
||||
end
|
||||
|
||||
%% Required SIR to reach FEC over parallelization
|
||||
|
||||
Reference in New Issue
Block a user