Scattered stuff from Silas during Dissertation
This commit is contained in:
@@ -11,25 +11,25 @@
|
||||
% -> FFE / DFE / VNLE+MLSE / DB target DSP branches
|
||||
% -> result packages stored in DataStorage
|
||||
|
||||
close all;
|
||||
% close all;
|
||||
|
||||
if 1
|
||||
|
||||
uloops = struct;
|
||||
uloops.precomp = [0];
|
||||
uloops.fsym = 180e9;
|
||||
% uloops.bitrate = 100e9;
|
||||
uloops.fsym = [152:8:212].*1e9;
|
||||
% uloops.bitrate = 380e9;
|
||||
% uloops.laser_wavelength = [1293,1297.5,1302,1306.5,1310,1313.4,1318,1322.7,1327.4];
|
||||
uloops.laser_wavelength = [1310];
|
||||
uloops.M = [2,4,6,8];
|
||||
uloops.link_length = 1;
|
||||
uloops.M = [4];
|
||||
uloops.link_length = 2;
|
||||
% uloops.link_length = [0:2:10]; % 1,2,3,5,6,8,10
|
||||
uloops.channel_alpha = [0.8];
|
||||
uloops.duob_mode = db_mode.no_db;
|
||||
uloops.decoding_mode = "memoryless";
|
||||
uloops.channel_mode = "awgn"; %awgn_alphad
|
||||
uloops.channel_alpha = [0.5];
|
||||
uloops.duob_mode = db_mode.db_precoded;
|
||||
uloops.decoding_mode = db_decoder.sequencedetection;
|
||||
uloops.channel_mode = channel_model.physical;
|
||||
uloops.channel_snr_dB = [20];
|
||||
uloops.rop = -6;
|
||||
uloops.rop = 0;
|
||||
|
||||
wh = DataStorage(uloops);
|
||||
wh.addStorage("ber");
|
||||
@@ -39,35 +39,119 @@ if 1
|
||||
end
|
||||
|
||||
%%
|
||||
figure
|
||||
|
||||
wh = load("C:\Users\Silas\Documents\MATLAB\Datensätze\Diss_400G\highspeed_loop.mat");
|
||||
wh = wh.wh;
|
||||
M = 6;
|
||||
rate = 212e9;
|
||||
precomp = wh.parameter.precomp.values(1);
|
||||
wavelength = wh.parameter.laser_wavelength.values(1);
|
||||
link_length = wh.parameter.link_length.values(1);
|
||||
alpha = wh.parameter.channel_alpha.values(1);
|
||||
duob_mode = wh.parameter.duob_mode.values(1);
|
||||
decoding_mode = wh.parameter.decoding_mode.values(1);
|
||||
channel_mode = wh.parameter.channel_mode.values(1);
|
||||
snr_dB = wh.parameter.channel_snr_dB.values(1);
|
||||
rop = wh.parameter.rop.values;
|
||||
fsym = wh.parameter.fsym.values;
|
||||
|
||||
%% get all ROP values for M = 4 and rate = 92e9:
|
||||
a = wh.getStoValue('ber',precomp, rate, wavelength, M, link_length,alpha,duob_mode,decoding_mode,channel_mode,snr_dB,rop);
|
||||
|
||||
ber_ffe = getResultBER(a, "ffe_results");
|
||||
ber_dfe = getResultBER(a, "dfe_results");
|
||||
ber_vnle = getResultBER(a, "vnle_results");
|
||||
ber_mlse = getResultBER(a, "mlse_results");
|
||||
ber_dbt = getResultBER(a, "dbt_results");
|
||||
|
||||
figure(44)
|
||||
clf
|
||||
hold on
|
||||
if isfield(uloops, 'fsym') && isfield(uloops, 'bitrate')
|
||||
error('Define only one of uloops.fsym or uloops.bitrate.');
|
||||
elseif isfield(uloops, 'fsym')
|
||||
rateLookup = uloops.fsym;
|
||||
elseif isfield(uloops, 'bitrate')
|
||||
rateLookup = uloops.bitrate;
|
||||
else
|
||||
error('Define either uloops.fsym or uloops.bitrate.');
|
||||
end
|
||||
|
||||
for alpha = uloops.channel_alpha
|
||||
a=wh.getStoValue('ber',0, rateLookup, uloops.laser_wavelength, uloops.M, uloops.link_length,alpha,uloops.duob_mode,uloops.decoding_mode,uloops.channel_mode,uloops.channel_snr_dB);
|
||||
gmi_ffe = cellfun(@(x) x.ffe_results.metrics.GMI, a);
|
||||
alpha_ffe = cellfun(@(x) x.ffe_results.metrics.Alpha, a);
|
||||
|
||||
gmi_mlse = cellfun(@(x) x.mlse_results.metrics.GMI, a);
|
||||
|
||||
plot(uloops.channel_snr_dB,gmi_ffe,'DisplayName',sprintf(''),'LineStyle','-','HandleVisibility','on');
|
||||
plot(uloops.channel_snr_dB,gmi_mlse,'DisplayName',sprintf(''),'LineStyle','-','HandleVisibility','on');
|
||||
end
|
||||
|
||||
set(gca, 'YScale', 'log');
|
||||
% ylim([5e-5 0.5]);
|
||||
% yline([3.8e-3, 2e-2],'HandleVisibility','off');
|
||||
legend
|
||||
plot(rop,ber_ffe,"LineWidth",0.5,"LineStyle","-","Marker",".","MarkerSize",15,"DisplayName","FFE");
|
||||
plot(rop,ber_dfe,"LineWidth",0.5,"LineStyle","-","Marker",".","MarkerSize",15,"DisplayName","DFE");
|
||||
plot(rop,ber_vnle,"LineWidth",0.5,"LineStyle","-","Marker",".","MarkerSize",15,"DisplayName","VNLE");
|
||||
plot(rop,ber_mlse,"LineWidth",0.5,"LineStyle","-","Marker",".","MarkerSize",15,"DisplayName","MLSE");
|
||||
plot(rop,ber_dbt,"LineWidth",0.5,"LineStyle","-","Marker",".","MarkerSize",15,"DisplayName","DB target");
|
||||
yline(3.8e-3,'DisplayName','HD-FEC','LineStyle','--','HandleVisibility','off');
|
||||
xlabel('Received Optical Power (dBm)');
|
||||
ylabel('Bit Error Rate (BER)');
|
||||
title(sprintf('BER vs. ROP | PAM %d | %.0f GBd',M,rate.*1e-9));
|
||||
set(gca,'yscale','log');
|
||||
set(gca,'Box','on');
|
||||
grid on;
|
||||
grid minor
|
||||
legend('Interpreter','none');
|
||||
beautifyBERplot()
|
||||
ylabel('BER');
|
||||
|
||||
%% get all baudrate values for M = 4 and fixed ROP:
|
||||
rop_ = -6;
|
||||
a = wh.getStoValue('ber',precomp, fsym, wavelength, M, link_length,alpha,duob_mode,decoding_mode,channel_mode,snr_dB,rop_);
|
||||
|
||||
ber_ffe = getResultBER(a, "ffe_results");
|
||||
ber_dfe = getResultBER(a, "dfe_results");
|
||||
ber_vnle = getResultBER(a, "vnle_results");
|
||||
ber_mlse = getResultBER(a, "mlse_results");
|
||||
ber_dbt = getResultBER(a, "dbt_results");
|
||||
|
||||
figure(45)
|
||||
clf
|
||||
hold on
|
||||
plot(fsym.*1e-9,ber_ffe,"LineWidth",0.5,"LineStyle","-","Marker",".","MarkerSize",15,"DisplayName","FFE");
|
||||
plot(fsym.*1e-9,ber_dfe,"LineWidth",0.5,"LineStyle","-","Marker",".","MarkerSize",15,"DisplayName","DFE");
|
||||
plot(fsym.*1e-9,ber_vnle,"LineWidth",0.5,"LineStyle","-","Marker",".","MarkerSize",15,"DisplayName","VNLE");
|
||||
plot(fsym.*1e-9,ber_mlse,"LineWidth",0.5,"LineStyle","-","Marker",".","MarkerSize",15,"DisplayName","MLSE");
|
||||
plot(fsym.*1e-9,ber_dbt,"LineWidth",0.5,"LineStyle","-","Marker",".","MarkerSize",15,"DisplayName","DB target");
|
||||
yline(3.8e-3,'DisplayName','HD-FEC','LineStyle','--','HandleVisibility','off');
|
||||
xlabel('Baudrate (GBd)');
|
||||
ylabel('Bit Error Rate (BER)');
|
||||
title(sprintf('BER vs. Baudrate | PAM %d | ROP %g dBm',M,rop_));
|
||||
set(gca,'yscale','log');
|
||||
set(gca,'Box','on');
|
||||
grid on;
|
||||
grid minor
|
||||
legend('Interpreter','none');
|
||||
beautifyBERplot()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
% figure
|
||||
% hold on
|
||||
% if isfield(uloops, 'fsym') && isfield(uloops, 'bitrate')
|
||||
% error('Define only one of uloops.fsym or uloops.bitrate.');
|
||||
% elseif isfield(uloops, 'fsym')
|
||||
% rateLookup = uloops.fsym;
|
||||
% elseif isfield(uloops, 'bitrate')
|
||||
% rateLookup = uloops.bitrate;
|
||||
% else
|
||||
% error('Define either uloops.fsym or uloops.bitrate.');
|
||||
% end
|
||||
|
||||
% for alpha = uloops.channel_alpha
|
||||
% a=wh.getStoValue('ber',0, rateLookup, uloops.laser_wavelength, uloops.M, uloops.link_length,alpha,uloops.duob_mode,uloops.decoding_mode,uloops.channel_mode,uloops.channel_snr_dB);
|
||||
% gmi_ffe = cellfun(@(x) x.ffe_results.metrics.GMI, a);
|
||||
% alpha_ffe = cellfun(@(x) x.ffe_results.metrics.Alpha, a);
|
||||
|
||||
% gmi_mlse = cellfun(@(x) x.mlse_results.metrics.GMI, a);
|
||||
|
||||
% plot(uloops.channel_snr_dB,gmi_ffe,'DisplayName',sprintf(''),'LineStyle','-','HandleVisibility','on');
|
||||
% plot(uloops.channel_snr_dB,gmi_mlse,'DisplayName',sprintf(''),'LineStyle','-','HandleVisibility','on');
|
||||
% end
|
||||
|
||||
% set(gca, 'YScale', 'log');
|
||||
% % ylim([5e-5 0.5]);
|
||||
% % yline([3.8e-3, 2e-2],'HandleVisibility','off');
|
||||
% legend
|
||||
% beautifyBERplot()
|
||||
% ylabel('BER');
|
||||
|
||||
|
||||
|
||||
@@ -585,3 +669,24 @@ ylabel('BER');
|
||||
%
|
||||
% beautifyBERplot();
|
||||
% legend('BER contour lines');
|
||||
|
||||
function ber = getResultBER(results, resultField)
|
||||
ber = nan(size(results));
|
||||
resultField = char(resultField);
|
||||
|
||||
for k = 1:numel(results)
|
||||
if isempty(results{k}) || ~isstruct(results{k}) || ~isfield(results{k}, resultField)
|
||||
continue
|
||||
end
|
||||
|
||||
branch = results{k}.(resultField);
|
||||
if isempty(branch) || ~isstruct(branch) || ~isfield(branch, 'metrics')
|
||||
continue
|
||||
end
|
||||
|
||||
val = branch.metrics.BER;
|
||||
if ~isempty(val)
|
||||
ber(k) = val(1);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user