Changes from mwork PC.
PDP 2025 MPI analysis new focus on database and SQL
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
|
||||
% basePath = 'C:\Users\Silas\Documents\MATLAB\Datensätze\sioe_labor\';
|
||||
% db = DBHandler("pathToDB",[basePath,'silas_labor.db']);
|
||||
if 1
|
||||
|
||||
uloops = struct;
|
||||
uloops.precomp = [0,1];
|
||||
uloops.db_precode = [0,1];
|
||||
uloops.bitrate = [224,336,360,390,420,448].*1e9; %[300,330,360,390,420,450,480] [224,336,360,390,420,448] for MPI
|
||||
% uloops.laser_wavelength = [1293,1297.5,1302,1306.5,1310,1313.4,1318,1322.7,1327.4];
|
||||
uloops.laser_wavelength = [1310];
|
||||
uloops.M = [4,6,8];
|
||||
uloops.link_length = [1]; % 1,2,3,5,6,8,10
|
||||
wh = DataStorage(uloops);
|
||||
wh.addStorage("ber");
|
||||
|
||||
% wh = submit_simulations(wh,"parallel",0,"simulation_mode",0);
|
||||
wh = submit_handle(@dsp_mpi,wh,"parallel",1);
|
||||
|
||||
end
|
||||
|
||||
a = wh_mpi_112gbd.getStoValue('ber',uloops.precomp, uloops.db_precode, uloops.bitrate(1) , uloops.laser_wavelength, uloops.M, uloops.link_length);
|
||||
|
||||
%VNLE standalone
|
||||
try
|
||||
ber_vnle = cellfun(@(x) x.vnle_dfe_package{1,1}.ber_vnle, a);
|
||||
end
|
||||
%MLSE
|
||||
try
|
||||
ber_values_mlse = cellfun(@(s) cellfun(@(pkg) pkg.ber_mlse, s.vnle_pf_package, 'UniformOutput', false), a, 'UniformOutput', false);
|
||||
ber_values_mlse = cell2mat(ber_values_mlse{1});
|
||||
|
||||
end
|
||||
%DB
|
||||
try
|
||||
ber_values_db = cellfun(@(s) cellfun(@(pkg) pkg.ber, s.dbtgt_package, 'UniformOutput', false), a, 'UniformOutput', false);
|
||||
ber_values_db = cell2mat(ber_values_db{1});
|
||||
end
|
||||
|
||||
xax = [0
|
||||
3
|
||||
6
|
||||
9
|
||||
12
|
||||
15
|
||||
18
|
||||
21
|
||||
24
|
||||
27
|
||||
30
|
||||
45];
|
||||
cols = cbrewer2('Set1',8);
|
||||
|
||||
% Compute min, max, and mean for PAM 4 MLSE
|
||||
min_mlse = min(ber_values_mlse, [], 2);
|
||||
max_mlse = max(ber_values_mlse, [], 2);
|
||||
mean_mlse = mean(ber_values_mlse, 2);
|
||||
err_lower_mlse = mean_mlse - min_mlse;
|
||||
err_upper_mlse = max_mlse - mean_mlse;
|
||||
err_mlse = [err_lower_mlse, err_upper_mlse];
|
||||
|
||||
% Compute min, max, and mean for PAM 4 DB tgt.
|
||||
min_db = min(ber_values_db, [], 2);
|
||||
max_db = max(ber_values_db, [], 2);
|
||||
mean_db = mean(ber_values_db, 2);
|
||||
err_lower_db = mean_db - min_db;
|
||||
err_upper_db = max_db - mean_db;
|
||||
err_db = [err_lower_db, err_upper_db];
|
||||
|
||||
figure(1)
|
||||
hold on
|
||||
title('MPI');
|
||||
|
||||
% Plot the MLSE curve with bounded error using boundedline
|
||||
[hl_mlse, hp_mlse] = boundedline(xax, mean_mlse, err_mlse,'Color', cols(1,:));
|
||||
plot(xax,ber_values_mlse,'DisplayName','PAM 4 MLSE','Color',cols(1,:),'LineStyle','-','HandleVisibility','on','Marker','none','LineWidth',0.2);
|
||||
|
||||
% Plot the DB tgt. curve with bounded error using boundedline
|
||||
[hl_db, hp_db] = boundedline(xax, mean_db, err_db, 'Color', cols(2,:));
|
||||
plot(xax,ber_values_db,'DisplayName','PAM 4 MLSE','Color',cols(2,:),'LineStyle','-','HandleVisibility','on','Marker','none','LineWidth',0.2);
|
||||
|
||||
|
||||
% Format the plot
|
||||
xticks(xax);
|
||||
set(gca, 'YScale', 'log');
|
||||
ylim([5e-5 0.4]);
|
||||
xlim([min(xax) max(xax)]);
|
||||
yline([4.85e-3, 2e-2], 'HandleVisibility', 'off');
|
||||
legend
|
||||
% beautifyBERplot()
|
||||
xlabel('Interference Attenuation');
|
||||
ylabel('BER');
|
||||
Reference in New Issue
Block a user