MPI FFE with A1 and A2 algorithms

This commit is contained in:
Silas Oettinghaus
2026-07-10 09:14:34 +02:00
parent aa210e5352
commit a6cf742121
11 changed files with 863 additions and 229 deletions

View File

@@ -4,7 +4,7 @@ dsp_options.mode = "run_id";
dsp_options.recipe = @mpi_recipe_dev;
dsp_options.append_to_db = false;
dsp_options.start_occurence = 2;
dsp_options.max_occurences = 10;
dsp_options.max_occurences = 1;
dsp_options.debug_plots = false;
dsp_options.database_type = "mysql";
@@ -28,7 +28,7 @@ fp.where('Runs','run_id','GREATER_EQUAL',3153);
fp.where('Runs', 'symbolrate', 'EQUALS', 112e9);
fp.where('Runs', 'fiber_length', 'EQUALS', 0);
fp.where('Runs', 'interference_path_length', 'EQUALS', 1000);
fp.where('Runs', 'sir', 'LESS_EQUAL', 30);
fp.where('Runs', 'sir', 'LESS_EQUAL', 20);
fp.where('Runs', 'db_mode', 'EQUALS', '"no_db"');
% fp.where('Runs', 'is_mpi', 'EQUALS', 1);
fp.where('Runs', 'pam_level', 'EQUALS', 4);
@@ -41,6 +41,7 @@ fp.where('Runs', 'pam_level', 'EQUALS', 4);
[~, sortIdx] = sort(dataTable.sir, 'descend');
dataTable = dataTable(sortIdx, :);
dataTable = dataTable(1, :);
run_ids = dataTable.run_id;
if isempty(run_ids)
@@ -74,31 +75,43 @@ fprintf("-> [ %d run_id(s) × %d userParam combination(s) = %d parallel job(s) ]
%% Analyze
storageNames = fieldnames(wh.sto);
x_vars = run_ids;%dsp_options.userParameters.smoothing_length;
x_vars = reshape(x_vars,1,[]);
result = wh.sto.(storageNames{1});
result = result(:).';
figure(2026);hold on
for i = 1:numel(run_ids)
disp(run_ids(i))
result = wh.getStoValue(storageNames{1}, x_vars);
% Each cell in result is a cell array (packageCell) containing multiple packages.
% Extract BERs from all packages and, for example, average them per x_var.
ber_all = cellfun(@(packageCell) cellfun(@(pkg) pkg.metrics.BER, packageCell), result, 'UniformOutput', false);
% Convert to numeric matrix (rows = packages, cols = x_vars) by padding if needed
maxPackages = max(cellfun(@numel, ber_all));
ber_mat = nan(maxPackages, numel(ber_all));
for k = 1:numel(ber_all)
ber_mat(1:numel(ber_all{k}), k) = ber_all{k};
% Each stored entry is a package cell containing one or more occurrences.
ber_all = cell(1,numel(result));
for result_idx = 1:numel(result)
packageCell = result{result_idx};
if isempty(packageCell)
ber_all{result_idx} = NaN;
continue
end
% Choose aggregation: mean across packages (ignore NaNs)
ber = mean(ber_mat, 1, 'omitnan');
x = dataTable.sir;
y = ber;
plot(x,ber);
scatter(x,ber_mat)
beautifyBERplot("logscale",true,"setcolors",false,"setmarkers",true);
ber_values = nan(1,numel(packageCell));
for package_idx = 1:numel(packageCell)
if isstruct(packageCell{package_idx}) && isfield(packageCell{package_idx},"metrics")
ber_values(package_idx) = packageCell{package_idx}.metrics.BER;
end
end
ber_all{result_idx} = ber_values;
end
maxPackages = max(cellfun(@numel,ber_all));
ber_mat = nan(maxPackages,numel(ber_all));
for k = 1:numel(ber_all)
ber_mat(1:numel(ber_all{k}),k) = ber_all{k};
end
ber = mean(ber_mat,1,"omitnan");
x = dataTable.sir(:).';
if numel(x) ~= numel(ber)
x = 1:numel(ber);
end
figure(2026); clf; hold on
plot(x,ber);
for k = 1:numel(x)
scatter(repmat(x(k),maxPackages,1),ber_mat(:,k))
end
beautifyBERplot("logscale",true,"setcolors",false,"setmarkers",true);

Binary file not shown.