Many changes here and there. I lost track... :-(

Current work is on MLSE and SD Decoding etc. MLSE is currently not 100% working, the scalings are maybe off?!
This commit is contained in:
Silas Oettinghaus
2025-08-11 07:42:04 +02:00
parent 09d9e5011c
commit 5dbc48abc0
37 changed files with 1506 additions and 570 deletions

View File

@@ -0,0 +1,111 @@
database_type = 'mysql';
dataBase = 'labor_highspeed';%'C:\Users\Silas\Documents\MATLAB\Datensätze\sioe_labor\silas_labor_newdsp_newstructure.db';
db = DBHandler("dataBase", [dataBase], "type", database_type);
fp = QueryFilter();
% fp.where('Runs', 'run_id','EQUALS', 987);
M = 6;
fp.where('Runs', 'pam_level','EQUALS', M);
baudrate = 162e9;
fp.where('Runs', 'symbolrate','EQUALS', baudrate);
% fp.where('Runs', 'fiber_length','EQUALS', 2);
fp.where('Runs', 'is_mpi','EQUALS', 0);
% fp.where('Runs', 'interference_path_length','EQUALS', 1000);
% fp.where('Runs', 'loop_id','GREATER_THAN', 11);
% fp.where('Runs', 'sir','EQUALS',18);
% fp.where('Runs', 'wavelength','EQUALS', 1310);
fp.where('Runs', 'db_mode','EQUALS', 1); % 0 == high preemphasis // 1 == low preemphasis
fp.where('Runs', 'rop_attenuation','EQUALS', 0);
fields = db.getTableFieldNames('power_state_info');
fields = [fields; db.getTableFieldNames('dashboard_ungrouped')];
[dataTable,~] = db.queryDB(fp, fields);
eqstructures = unique(dataTable.equalizer_structure);
fiber_len = unique(dataTable.fiber_length);
cnt = 1;
f=figure();
clf
hold on
markers = {'o', 's', 'd', '^', 'v', '>', '<', 'p', 'h'}; % Define marker styles
for fl = 1:numel(fiber_len)
fl_filtered = dataTable(dataTable.fiber_length == fiber_len(fl),:);
for eqs = [equalizer_structure.vnle_pf_mlse]
eq_choice = equalizer_structure(eqs);
if sum(eqstructures == eq_choice)~=1
disp(eq_choice)
continue
end
eq_filtered = fl_filtered(fl_filtered.equalizer_structure == eq_choice,:);
dispersion_sorted = sortrows(eq_filtered, {'accumulated_dispersion'}, 'ascend');
% dispersion_sorted = dispersion_sorted(dispersion_sorted.wavelength <= 1320,:);
% dispersion_sorted = dispersion_sorted(dispersion_sorted.BER < 0.02,:);
% pull out your vectors
accumulated_dispersion = dispersion_sorted.accumulated_dispersion;
ber = dispersion_sorted.BER;
% ber = dispersion_sorted.BER_precoded;
run_ids = dispersion_sorted.run_id; % <-- this is what we want in the datatip
len = dispersion_sorted.fiber_length;
lambda = dispersion_sorted.wavelength;
cols = cbrewer2('Set1',8);
% cols = flip(cbrewer2('RdYlGn',14));
cols = linspecer(8);
ber_wavelen_grouped = groupsummary( ...
dispersion_sorted, ... % input table
"wavelength", ... % grouping variable
"min", ... % which summary statistic
"BER_precoded");
dname = sprintf('%s; %d km',eq_choice, fiber_len(fl));
h1 = plot(ber_wavelen_grouped.wavelength, ber_wavelen_grouped.min_BER_precoded,'LineWidth', 2, 'MarkerSize', 5,'Marker',markers(cnt),'LineStyle','-','Color',cols(cnt,:),'MarkerEdgeColor','auto','MarkerFaceColor','white','DisplayName',dname);
plotallscatters=0;
if plotallscatters
% plot the two curves and capture their Line handles
dname = sprintf('%s; %d km',eq_choice, fiber_len(fl));
h1 = plot(lambda, ber,'LineWidth', 1.5, 'MarkerSize', 5,'Marker','o','LineStyle','none','Color',cols(cnt,:),'MarkerFaceColor',cols(cnt,:),'DisplayName',dname);
% Add run_id as a datatip row
% For each line, tell the datatip template where to find the run_id:
h1.DataTipTemplate.DataTipRows(end+1) = ...
dataTipTextRow('run\_id', run_ids);
h1.DataTipTemplate.DataTipRows(end+1) = ...
dataTipTextRow('len', len);
h1.DataTipTemplate.DataTipRows(end+1) = ...
dataTipTextRow('lambda', lambda);
end
xticks(sort(unique(lambda)));
xticklabels(sort(unique(lambda)));
grid on;
% Labels, scales, legend, etc.
xlabel('Wavelength in nm','FontSize',12);
ylabel('BER','FontSize',12);
tit = sprintf('%d GBd PAM-%d',baudrate.*1e-9, M);
title(tit,'FontSize',14,'FontWeight','bold');
set(gca, 'XScale','linear','YScale','log','FontSize',11);
legend
xlim([min(lambda)-2, max(lambda)+2]);
ylim([1e-4, 0.2]);
cnt = cnt+1;
end
end
yline([4.85e-3, 2e-2],'--','LineWidth',1,'HandleVisibility','off');
posH = get(f, 'Position'); % [left, bottom, width, height]
newPos = [posH(1), posH(2), 750, 300];
set(f, 'Position', newPos);

View File

@@ -0,0 +1,86 @@
database_type = 'mysql';
dataBase = 'labor_highspeed';%'C:\Users\Silas\Documents\MATLAB\Datensätze\sioe_labor\silas_labor_newdsp_newstructure.db';
db = DBHandler("dataBase", [dataBase], "type", database_type);
fp = QueryFilter();
% fp.where('Runs', 'run_id','EQUALS', 987);
M = 8;
fp.where('Runs', 'pam_level','EQUALS', M);
% fp.where('Runs', 'bitrate','LESS_THAN', 310e9);
fp.where('Runs', 'fiber_length','EQUALS', 2);
fp.where('Runs', 'is_mpi','EQUALS', 0);
% fp.where('Runs', 'interference_path_length','EQUALS', 1000);
% fp.where('Runs', 'loop_id','GREATER_THAN', 11);
% fp.where('Runs', 'sir','EQUALS',18);
fp.where('Runs', 'wavelength','EQUALS', 1310);
% fp.where('Runs', 'db_mode','EQUALS', 1);
fp.where('Runs', 'rop_attenuation','EQUALS', 0);
% [dataTable,~] = db.queryDB(fp, db.getTableFieldNames('dashboard'));
eqstructures = unique(dataTable.equalizer_structure);
% Create the figure
figure(10);
hold on
for pre_emph = [1]
dbmode_filtered = dataTable(dataTable.db_mode == ~pre_emph,:);
for eqs = [equalizer_structure.vnle, equalizer_structure.vnle_pf_mlse , equalizer_structure.vnle_db_mlse]
eq_choice = equalizer_structure(eqs);
if sum(eqstructures == eq_choice)~=1
disp(eq_choice)
continue
end
eq_filtered = dbmode_filtered(dbmode_filtered.equalizer_structure == eq_choice,:);
symbolrate_sorted = sortrows(eq_filtered,{'symbolrate','min_BER_precoded'}, 'ascend');
[~, ia] = unique(symbolrate_sorted.symbolrate, 'first');
symbolrate_sorted = symbolrate_sorted(ia, :);
% Example data (replace these with your real vectors)
symbolrate = symbolrate_sorted.symbolrate.*1e-9; % in baud
bitrate = symbolrate * floor(log2(M)*10)/10;
ber = symbolrate_sorted.min_BER; % BER
ber_precoded = symbolrate_sorted.min_BER_precoded; % BER
cols = cbrewer2('Paired',12);
cols = [0.4660 0.6740 0.1880 ; 0.9290 0.6940 0.1250 ; 0 0.4470 0.7410; 0.4940 0.1840 0.5560]; %VNLE; PF ; DFE ; DB tgt
dname = [char(eq_choice)];
if pre_emph
dname = [dname,' with pre-emph.'];
else
dname = [dname,' w/o pre-emph.'];
end
plot(bitrate, ber, 'LineWidth', 1.5, 'MarkerSize', 5,'Marker','o','LineStyle','-','Color',cols((2*eqs)+1+pre_emph,:),'MarkerEdgeColor',cols((2*eqs)+1+pre_emph,:),'MarkerFaceColor',[1,1,1],'DisplayName',[dname]);
plot(bitrate, ber_precoded, 'LineWidth', 1.5, 'MarkerSize', 5,'Marker','square','LineStyle',':','Color',cols((2*eqs)+1+pre_emph,:),'MarkerEdgeColor',cols((2*eqs)+1+pre_emph,:),'MarkerFaceColor',[1,1,1],'DisplayName',[dname,'; pre-coded']);
grid on;
% Axis labels and title
xlabel('Baud Rate GBaud', 'FontSize', 12);
ylabel('BER', 'FontSize', 12);
title('BER vs. Baud Rate', 'FontSize', 14, 'FontWeight', 'bold');
% Improve tick formatting
set(gca, 'XScale', 'linear', ...
'YScale', 'log', ...
'TickLabelInterpreter', 'latex', ...
'FontSize', 11);
legend
xticks(bitrate);
% Optional: tighten axis limits
xlim([min(bitrate), max(bitrate)]);
ylim([5e-5, 0.5]);
end
end
yline([4.85e-3, 2e-2],'LineWidth',1,'LineStyle','--','HandleVisibility','off'); beautifyBERplot();

View File

@@ -0,0 +1,117 @@
database_type = 'mysql';
dataBase = 'labor_highspeed';%'C:\Users\Silas\Documents\MATLAB\Datensätze\sioe_labor\silas_labor_newdsp_newstructure.db';
db = DBHandler("dataBase", [dataBase], "type", database_type);
fp = QueryFilter();
% fp.where('Runs', 'run_id','EQUALS', 987);
M = 8;
fp.where('Runs', 'pam_level','EQUALS', M);
% fp.where('Runs', 'bitrate','LESS_THAN', 310e9);
fp.where('Runs', 'fiber_length','EQUALS', 2);
fp.where('Runs', 'is_mpi','EQUALS', 0);
% fp.where('Runs', 'interference_path_length','EQUALS', 1000);
% fp.where('Runs', 'loop_id','GREATER_THAN', 11);
% fp.where('Runs', 'sir','EQUALS',18);
fp.where('Runs', 'wavelength','EQUALS', 1310);
% fp.where('Runs', 'db_mode','EQUALS', 1);
fp.where('Runs', 'rop_attenuation','EQUALS', 0);
[dataTable,~] = db.queryDB(fp, db.getTableFieldNames('dashboard'));
eqstructures = unique(dataTable.equalizer_structure);
% Create the figure
f=figure(4);
hold on
eqs = [equalizer_structure.vnle, equalizer_structure.vnle_pf_mlse , equalizer_structure.vnle_db_mlse];
cols = [0.4660 0.6740 0.1880 ; 0.9290 0.6940 0.1250 ; 0 0.4470 0.7410; 0.4940 0.1840 0.5560]; %VNLE; PF ; DFE ; DB tgt
eq_choice = equalizer_structure.vnle;
pre_emph = 1;
dbmode_filtered = dataTable(dataTable.db_mode == ~pre_emph,:);
eq_filtered = dbmode_filtered(dbmode_filtered.equalizer_structure == eq_choice,:);
symbolrate_sorted = sortrows(eq_filtered,{'symbolrate','min_BER_precoded'}, 'ascend');
[~, ia] = unique(symbolrate_sorted.symbolrate, 'first');
symbolrate_sorted = symbolrate_sorted(ia, :);
symbolrate = symbolrate_sorted.symbolrate.*1e-9; % in baud
bitrate = symbolrate * floor(log2(M)*10)/10;
ber = symbolrate_sorted.min_BER; % BER
ber_precoded = symbolrate_sorted.min_BER_precoded; % BER
plot(bitrate, ber, 'LineWidth', 1.5, 'MarkerSize', 5,'Marker','v','LineStyle',':','Color',cols(1,:),'MarkerEdgeColor',cols(1,:),'MarkerFaceColor',cols(1,:),'DisplayName',['Tx pre-emphasis + VNLE']);
eq_choice = equalizer_structure.vnle_pf_mlse;
pre_emph = 0;
dbmode_filtered = dataTable(dataTable.db_mode == ~pre_emph,:);
eq_filtered = dbmode_filtered(dbmode_filtered.equalizer_structure == eq_choice,:);
symbolrate_sorted = sortrows(eq_filtered,{'symbolrate','min_BER_precoded'}, 'ascend');
[~, ia] = unique(symbolrate_sorted.symbolrate, 'first');
symbolrate_sorted = symbolrate_sorted(ia, :);
symbolrate = symbolrate_sorted.symbolrate.*1e-9; % in baud
bitrate = symbolrate * floor(log2(M)*10)/10;
ber = symbolrate_sorted.min_BER; % BER
ber_precoded = symbolrate_sorted.min_BER_precoded; % BER
plot(bitrate, ber, 'LineWidth', 1.5, 'MarkerSize', 5,'Marker','diamond','LineStyle',':','Color',cols(2,:),'MarkerEdgeColor',cols(2,:),'MarkerFaceColor',cols(2,:),'DisplayName',['VNLE+2-tap post-filter+MLSE']);
% eq_choice = equalizer_structure.dfe;
% pre_emph = 1;
% dbmode_filtered = dataTable(dataTable.db_mode == ~pre_emph,:);
% eq_filtered = dbmode_filtered(dbmode_filtered.equalizer_structure == eq_choice,:);
% symbolrate_sorted = sortrows(eq_filtered,{'symbolrate','min_BER_precoded'}, 'ascend');
% [~, ia] = unique(symbolrate_sorted.symbolrate, 'first');
% symbolrate_sorted = symbolrate_sorted(ia, :);
% symbolrate = symbolrate_sorted.symbolrate.*1e-9; % in baud
% bitrate = symbolrate * floor(log2(M)*10)/10;
% ber = symbolrate_sorted.min_BER; % BER
% ber_precoded = symbolrate_sorted.min_BER_precoded; % BER
% plot(bitrate, ber, 'LineWidth', 1.5, 'MarkerSize', 5,'Marker','o','LineStyle','-','Color',cols(3,:),'MarkerEdgeColor',cols(3,:),'MarkerFaceColor',cols(3,:),'DisplayName',[char(eq_choice)]);
eq_choice = equalizer_structure.vnle_db_mlse;
pre_emph = 0;
dbmode_filtered = dataTable(dataTable.db_mode == ~pre_emph,:);
eq_filtered = dbmode_filtered(dbmode_filtered.equalizer_structure == eq_choice,:);
symbolrate_sorted = sortrows(eq_filtered,{'symbolrate','min_BER_precoded'}, 'ascend');
[~, ia] = unique(symbolrate_sorted.symbolrate, 'first');
symbolrate_sorted = symbolrate_sorted(ia, :);
symbolrate = symbolrate_sorted.symbolrate.*1e-9; % in baud
bitrate = symbolrate * floor(log2(M)*10)/10;
ber = symbolrate_sorted.min_BER; % BER
ber_precoded = symbolrate_sorted.min_BER_precoded; % BER
plot(bitrate, ber_precoded, 'LineWidth', 1.5, 'MarkerSize', 5,'Marker','square','LineStyle',':','Color',cols(4,:),'MarkerEdgeColor',cols(4,:),'MarkerFaceColor',cols(4,:),'DisplayName',['DB precoding + DB tgt. + MLSE']);
% Axis labels and title with Arial font
xlabel('Gross bitrate [Gb/s]', 'FontSize', 12, 'FontName', 'Arial', 'Interpreter', 'none');
ylabel('BER', 'FontSize', 12, 'FontName', 'Arial', 'Interpreter', 'none');
title('', 'FontSize', 14, 'FontWeight', 'bold', 'FontName', 'Arial', 'Interpreter', 'none');
% Improve tick formatting
set(gca, 'XScale', 'linear', ...
'YScale', 'log', ...
'TickLabelInterpreter', 'none', ...
'FontSize', 11, ...
'FontName', 'Arial');
% Legend with Arial font
% legend('FontName', 'Arial', 'Interpreter', 'none','Location','best');
xticks(bitrate);
% Optional: tighten axis limits
xlim([min(bitrate), max(bitrate)]);
ylim([5e-4, 0.05]);
yline([3.8e-3], 'LineWidth', 2, 'LineStyle', '--', ...
'HandleVisibility', 'off', 'LabelHorizontalAlignment', 'left');
posH = get(f, 'Position'); % [left, bottom, width, height]
newPos = [posH(1), posH(2), 350, 200];
set(f, 'Position', newPos);
annotation(f,'textbox',...
[0.398095238095238 0.273381294964029 0.491428571428572 0.140287769784173],...
'String',{'PAM-8; 2 km; 1293 nm'},...
'LineWidth',0.5,...
'FitBoxToText','off',...
'BackgroundColor',[1 1 1]);

View File

@@ -0,0 +1,84 @@
database_type = 'mysql';
dataBase = 'labor_highspeed';%'C:\Users\Silas\Documents\MATLAB\Datensätze\sioe_labor\silas_labor_newdsp_newstructure.db';
db = DBHandler("dataBase", [dataBase], "type", database_type);
M = 8;
fp = QueryFilter();
% fp.where('Runs', 'run_id','EQUALS', 987);
fp.where('Runs', 'pam_level','EQUALS', M);
% fp.where('Runs', 'symbolrate','EQUALS', 165e9);
fp.where('Runs', 'fiber_length','EQUALS', 2);
fp.where('Runs', 'is_mpi','EQUALS', 0);
% fp.where('Runs', 'interference_path_length','EQUALS', 1000);
% fp.where('Runs', 'loop_id','GREATER_THAN', 11);
% fp.where('Runs', 'sir','EQUALS',18);
fp.where('Runs', 'wavelength','EQUALS', 1310);
% fp.where('Runs', 'db_mode','EQUALS', 1); % 0 == high preemphasis // 1 == low preemphasis
fp.where('Runs', 'rop_attenuation','EQUALS', 0);
[dataTable,~] = db.queryDB(fp, db.getTableFieldNames('dashboard'));
eqstructures = unique(dataTable.equalizer_structure);
% Create the figure
figure(18);
hold on
for pre_emph = [0,1]
dbmode_filtered = dataTable(dataTable.db_mode == ~pre_emph,:);
for eqs = [equalizer_structure.vnle]
eq_choice = equalizer_structure(eqs);
if sum(eqstructures == eq_choice)~=1
disp(eq_choice)
continue
end
eq_filtered = dbmode_filtered(dbmode_filtered.equalizer_structure == eq_choice,:);
if eqs ==equalizer_structure.vnle_pf_mlse
eq_filtered = eq_filtered(eq_filtered.DIR == "1",:);
end
symbolrate_sorted = sortrows(eq_filtered,{'symbolrate'}, 'ascend');
% Example data (replace these with your real vectors)
symbolrate = symbolrate_sorted.symbolrate.*1e-9; % in baud
bitrate = symbolrate * 2;
gmi = symbolrate_sorted.max_GMI; % BER
snr = symbolrate_sorted.max_SNR; % BER
cols = cbrewer2('Paired',12);
dname = [char(eq_choice)];
dname = strrep(dname,'_','+');
if pre_emph
dname = [dname,'; w/ pre-emph.'];
else
dname = [dname,'; w/o pre-emph.'];
end
plot(symbolrate, snr, 'LineWidth', 1.5, 'MarkerSize', 5,'Marker','o','LineStyle','-','Color',cols((2*eqs)+1+pre_emph,:),'MarkerEdgeColor',cols((2*eqs)+1+pre_emph,:),'MarkerFaceColor',[1,1,1],'DisplayName',[dname]);
grid on;
% Axis labels and title
xlabel('Bit Rate Gbps', 'FontSize', 12);
ylabel('GMI', 'FontSize', 12);
title('GMI vs. Bit Rate', 'FontSize', 14, 'FontWeight', 'bold');
% Improve tick formatting
set(gca, 'XScale', 'linear', ...
'YScale', 'linear', ...
'TickLabelInterpreter', 'none', ...
'FontSize', 11);
legend
xticks(symbolrate);
% Optional: tighten axis limits
xlim([min(symbolrate), max(symbolrate)]);
% ylim([log2(M)-1, log2(M)]);
end
end

View File

@@ -0,0 +1,96 @@
database_type = 'mysql';
dataBase = 'labor_highspeed';%'C:\Users\Silas\Documents\MATLAB\Datensätze\sioe_labor\silas_labor_newdsp_newstructure.db';
db = DBHandler("dataBase", [dataBase], "type", database_type);
fp = QueryFilter();
fp.where('power_state_info', 'pam_level','EQUALS', 4);
fp.where('power_state_info', 'db_mode','EQUALS', 1);
% fp.where('power_state_info', 'fiber_length','EQUALS', 1);
fp.where('power_state_info', 'is_mpi','EQUALS', 0);
fields = db.getTableFieldNames('power_state_info');
% [dataTable,~] = db.queryDB(fp, fields);
fiber_len = unique(dataTable.fiber_length);
cnt = 0;
y_variable = 'power_mzm';
x_variable = "wavelength";
f = figure(3);
clf
hold on
for fl = 1:numel(fiber_len)
fl_filtered = dataTable(dataTable.fiber_length == fiber_len(fl),:);
[~, ia] = unique(fl_filtered.run_id, 'first');
fl_filtered = fl_filtered(ia, :);
fl_filtered_ = groupsummary( ...
fl_filtered, ... % input table
x_variable, ... % grouping variable
"mean", ... % which summary statistic
y_variable); % which column to average
wavelength_sorted = sortrows(fl_filtered, {'wavelength'}, 'ascend');
% pull out your vectors
lambda = wavelength_sorted.wavelength;
power_laser = wavelength_sorted.power_laser;
power_mzm = wavelength_sorted.power_mzm;
power_rop = wavelength_sorted.power_rop;
power_pd = wavelength_sorted.power_pd_in;
voa = wavelength_sorted.voa_atten;
len = wavelength_sorted.fiber_length;
run_ids = wavelength_sorted.run_id; % <-- this is what we want in the datatip
cols = linspecer(8);
% plot the two curves and capture their Line handles
% h1 = plot(lambda, power_laser,'LineWidth', 0.5, 'MarkerSize', 4,'Marker','o','LineStyle','none','Color',cols(fl,:),'MarkerFaceColor',cols(fl,:),'DisplayName','Laser Output');
% % Add run_id as a datatip row
% % For each line, tell the datatip template where to find the run_id:
% h1.DataTipTemplate.DataTipRows(end+1) = ...
% dataTipTextRow('run\_id', run_ids);
% h1.DataTipTemplate.DataTipRows(end+1) = ...
% dataTipTextRow('len', run_ids);
% h1.DataTipTemplate.DataTipRows(end+1) = ...
% dataTipTextRow('voaatten', voa);
%
dname = sprintf('%s; %d km',y_variable, fiber_len(fl));
h2 = plot(fl_filtered_.(x_variable), fl_filtered_.(['mean_',y_variable]), 'LineWidth', 1, 'MarkerSize', 4,'Marker','o','LineStyle','-','Color',cols(fl,:),'MarkerFaceColor',cols(fl,:),'DisplayName',dname);
h2.DataTipTemplate.DataTipRows(end+1) = ...
dataTipTextRow('run\_id', run_ids);
h2.DataTipTemplate.DataTipRows(end+1) = ...
dataTipTextRow('len', len);
h2.DataTipTemplate.DataTipRows(end+1) = ...
dataTipTextRow('voaatten', voa);
grid on;
xticks(sort(unique(lambda)));
xticklabels(sort(unique(lambda)));
% Labels, scales, legend, etc.
xlabel('Wavelength in nm','FontSize',12);
ylabel('Power in dB','FontSize',12);
title('Power ','FontSize',14,'FontWeight','bold');
set(gca, 'XScale','linear','YScale','linear','FontSize',11);
legend
xlim([min(lambda)-2, max(lambda)+2]);
ylim([floor(min(fl_filtered_.(['mean_',y_variable])))-1 12]);
ylim([-12 12]);
cnt = cnt+1;
yline(8,'HandleVisibility','off');
end
yline([4.85e-3, 2e-2],'--','LineWidth',1,'HandleVisibility','off');
posH = get(f, 'Position'); % [left, bottom, width, height]
newPos = [posH(1), posH(2), 750, 300];
set(f, 'Position', newPos);

View File

@@ -1,6 +1,6 @@
% === SETTINGS ===
dsp_options.append_to_db = 1;
dsp_options.max_occurences = 15;
dsp_options.append_to_db = 0;
dsp_options.max_occurences = 1;
experiment = "highspeed_2024";
dsp_options.mode = "load_run_id"; % 'simulate' & 'load_files'
@@ -41,14 +41,14 @@ end
fp = QueryFilter();
% fp.where('Runs', 'run_id','EQUALS', 987);
fp.where('Runs', 'pam_level','EQUALS', 4);
% fp.where('Runs', 'bitrate','LESS_THAN', 310e9);
% fp.where('Runs', 'fiber_length','EQUALS', 1);
fp.where('Runs', 'bitrate','EQUALS', 360e9);
fp.where('Runs', 'fiber_length','EQUALS', 2);
fp.where('Runs', 'is_mpi','EQUALS', 0);
% fp.where('Runs', 'interference_path_length','EQUALS', 1000);
% fp.where('Runs', 'loop_id','GREATER_THAN', 11);
% fp.where('Runs', 'sir','EQUALS',18);
% fp.where('Runs', 'wavelength','EQUALS', 1310);
% fp.where('Runs', 'db_mode','EQUALS', 1);
fp.where('Runs', 'wavelength','EQUALS', 1310);
fp.where('Runs', 'db_mode','EQUALS', 0);
fp.where('Runs', 'rop_attenuation','EQUALS', 0);
% fp.where('Runs', 'power_pd_in','GREATER_THAN', 7);
@@ -75,7 +75,7 @@ wh.addStorage("dbenc_package");
% === RUN IT ===
[results,wh] = submitJobs(dataTable.run_id(:), dsp_options, "parallel", 'wh', wh, 'waitbar', true);
[results,wh] = submitJobs(dataTable.run_id(:), dsp_options, "serial", 'wh', wh, 'waitbar', true);
% wh.getStoValue('ffe_package',0.005);

View File

@@ -0,0 +1,236 @@
precomp_mode = 0;
precomp_path = "C:\Users\Silas\Documents\MATLAB\imdd_simulation\projects\HighSpeedExperiment_2024\Auswertung_JLT";
precomp_fn = "precomp_simulated.mat";
% TX
M = 4;
fsym = 72e9;
f_nyquist = fsym/2;
apply_pulsef = 1;
fdac = 256e9;
fadc = 256e9;
% fdac = 2*fsym;
% fadc = 2*fsym;
random_key = 1;
duob_mode = db_mode.no_db;
tx_bwl = 0.8.*f_nyquist;
rx_bwl = 0.8.*f_nyquist;
rcalpha = 0.05;
kover = 16;
vbias_rel = 0.5;
u_pi = 2.9;
vbias = -vbias_rel*u_pi;
laser_wavelength = 1293;
laser_linewidth = 0;
% Channel
link_length = 60000;
% RX
rop = -8;
% EQ
eq_mode = equalizer_structure.vnle_pf_mlse;
ffe_order=[50,0,0];
vnle_order=[50,5,5];
dfe_order = [0 0 0];
len_tr = 4096*2;
mu_ffe = [0.0004 0.0004 0.0004];
mu_dfe = 0.0004;
mu_dc = 0.00;
dfe_ = sum(dfe_order)>0;
Pform = Pulseformer("fsym",fsym,"fdac",4*fsym,"pulse","rc","pulselength",16,"alpha",rcalpha);
[Digi_sig,Symbols,Tx_bits] = PAMsource(...
"fsym",fsym,"M",M,"order",18,"useprbs",0,...
"fs_out",fdac,...
"applyclipping",0,"clipfactor",1.5,...
"applypulseform",apply_pulsef,"pulseformer",Pform,...
"randkey",random_key,...
"duobinary_mode",duob_mode).process();
if precomp_mode == 1 % measure channel
precomp_est = ChannelFreqResp("Nacq",1024,"Navg",64,"Ncp",63,'f_ref',fdac);
Digi_sig = precomp_est.buildOFDM();
elseif precomp_mode == 2 % apply precomp
precomp_est = ChannelFreqResp("Nacq",1024,"Navg",64,"Ncp",63,'f_ref',Digi_sig.fs);
Digi_sig = precomp_est.precomp(Digi_sig,'maxampdb',-50,'loadPath',precomp_path,'fileName',precomp_fn);
end
% Symbols.spectrum("displayname",'Tx Symbols','fignum',10,'normalizeTo0dB',1);
Digi_sig.eye(fsym,M,"fignum",1234567);
%%%%% AWG
%El_sig = M8199B("kover",kover).process(Digi_sig);
El_sig = AWG("fdac",fdac,"f_cutoff",fsym,"lpf_active",0,"kover",kover,"bit_resolution",12,"upsampling_method","samplehold","precomp_sinc_rolloff",1).process(Digi_sig);
% El_sig.spectrum("displayname",'Digi Spectrum','fignum',100,'normalizeTo0dB',0);
% El_sig = El_sig.setPower(0,"dBm");
El_sig.spectrum("displayname",'Tx Signal','fignum',10,'normalizeTo0dB',0);
%%%%% Low-pass el. components %%%%%%
El_sig = Filter('filtdegree',4,"f_cutoff",tx_bwl,"fs",fdac*kover,"filterType",filtertypes.gaussian,"active",true).process(El_sig);
% El_sig.spectrum("displayname",'Digi Spectrum','fignum',100,'normalizeTo0dB',1);
%%%%% Electrical Driver Amplifier %%%%%%
El_sig = Amplifier("amp_mode","ideal_no_noise","gain_mode","gain","amplification_db",3).process(El_sig);
El_sig = El_sig.normalize("mode","oneone");
%%%%% MODULATE E/O CONVERSION %%%%%%
[Opt_sig] = EML("mode",eml_mode.im_cosinus,"power",3,"fsimu",El_sig.fs,"lambda",laser_wavelength,"bias",vbias,"u_pi",u_pi,"linewidth",laser_linewidth,"randomkey",random_key+1).process(El_sig);
Opt_sig = Fiber("fsimu",Opt_sig.fs,"fiber_length",link_length/1000,"alpha",0.3,"D",0,"lambda0",1310,"gamma",0,"Dslope",0.07).process(Opt_sig);
%%%%%% ROP %%%%%%
Rx_sig = Amplifier("amp_mode","ideal_no_noise","gain_mode","output_power","amplification_db",rop).process(Opt_sig);
%%%%%% PD Square Law %%%%%%
Rx_sig = Photodiode("fsimu",fdac*kover,"dark_current",2e-08,"responsivity",1,"temperature",20,"nep",1.8e-11).process(Rx_sig);
%%%%%% Low-pass RX (PD, El. Connectors and Scope %%%%%%
Rx_sig = Filter('filtdegree',4,"f_cutoff",rx_bwl,"fs",fdac*kover,"filterType",filtertypes.bessel_inp,"active",true).process(Rx_sig);
% %%%%%% Low-pass Scope %%%%%%
Lp_scpe = Filter('filtdegree',4,"f_cutoff",35e9,"fs",fadc,"filterType",filtertypes.butterworth,"active",true);
% Rx_sig.spectrum("displayname",'Analog Rx Spectrum','fignum',100,'normalizeTo0dB',1);
%%%%%% Scope %%%%%%
Scpe_sig = Scope("fsimu",fdac*kover,"fadc",fadc,...
"delay",0,"fixed_delay",0,"filtertype",filtertypes.butterworth,...
"samplingdelay",0,"rand_samplingdelay",0,"freq_offset",0,"samp_jitter",0,...
"adcresolution",8,"quantbuffer",0.1,'block_dc',1,'lpf_active',1,'H_lpf',Lp_scpe).process(Rx_sig);
Scpe_sig.spectrum("displayname",'Rx Signal','fignum',10,'normalizeTo0dB',1);
Scpe_sig.eye(fsym,M,"fignum",1973763)
%%%%% Precompensation Routine %%%%%%
if precomp_mode == 1
Scpe_sig_resampled = Scpe_sig.resample("fs_in",fadc,"fs_out",2*fsym);
precomp_est.estimate(Scpe_sig_resampled,"save",false,"savePath",precomp_path,"fileName",precomp_fn);
precomp_est.plot();
precomp_est.save();
end
% Preprocess signal
Scpe_sig = preprocessSignal(Scpe_sig, Symbols, fsym);
Scpe_sig.signal = Scpe_sig.signal(1:2*Symbols.length);
use_ffe = 0;
use_dfe = 0;
use_vnle_mlse = 1;
use_dbtgt = 1;
use_dbenc = 1;
if duob_mode ~= db_mode.db_encoded
if use_ffe
ffe_order = [50, 0, 0];
eq_dfe = EQ("Ne",ffe_order,"Nb",[0,0,0],"training_length",len_tr,"training_loops",5,"dd_loops",5,"K",2,"DCmu",mu_dc,"DDmu",[mu_ffe mu_dfe],"DFEmu",0.005,"FFEmu",0,"plotfinal",0,"ideal_dfe",0);
ffe_results = ffe(eq_dfe,M,Scpe_sig,Symbols,Tx_bits,...
"precode_mode",duob_mode,...
'showAnalysis',1,...
"postFFE",[],...
"eth_style_symbol_mapping",0);
disp('FFE:')
ffe_results.metrics.print;
end
if use_dfe
ffe_order = [50, 5, 5];
eq_dfe = EQ("Ne",ffe_order,"Nb",[2,0,0],"training_length",len_tr,"training_loops",5,"dd_loops",5,"K",2,"DCmu",mu_dc,"DDmu",[mu_ffe mu_dfe],"DFEmu",0.005,"FFEmu",0,"plotfinal",0,"ideal_dfe",0);
dfe_results = ffe(eq_dfe,M,Scpe_sig,Symbols,Tx_bits,...
"precode_mode",duob_mode,...
'showAnalysis',0,...
"postFFE",[],...
"eth_style_symbol_mapping",0);
disp('DFE:')
dfe_results.metrics.print;
end
if use_vnle_mlse
if 0
pf_ncoeffs = 1;
eq_ = EQ("Ne",ffe_order,"Nb",dfe_order,"training_length",len_tr,"training_loops",5,"dd_loops",5,"K",2,"DCmu",mu_dc,"DDmu",[mu_ffe mu_dfe],"DFEmu",0.005,"FFEmu",0,"plotfinal",0,"ideal_dfe",1);
pf_ = Postfilter("ncoeff",pf_ncoeffs,"useBurg",1);
% mlse_ = MLSE_viterbi("duobinary_output",0,'M',M,'trellis_states',PAMmapper(M,0).levels);
mlse_ = MLSE("duobinary_output",0,'M',M,'trellis_states',PAMmapper(M,0).levels);
[ffe_results, mlse_results] = vnle_postfilter_mlse(eq_, pf_, mlse_, M, Scpe_sig, Symbols, Tx_bits, ...
"precode_mode", duob_mode,...
'showAnalysis', 1, ...
"postFFE", [],...
"eth_style_symbol_mapping", 0);
disp('VNLE:')
ffe_results.metrics.print;
disp('MLSE:')
mlse_results.metrics.print;
end
pf_ncoeffs = 2;
eq_ = EQ("Ne",ffe_order,"Nb",dfe_order,"training_length",len_tr,"training_loops",5,"dd_loops",5,"K",2,"DCmu",mu_dc,"DDmu",[mu_ffe mu_dfe],"DFEmu",0.005,"FFEmu",0,"plotfinal",0,"ideal_dfe",1);
pf_ = Postfilter("ncoeff",pf_ncoeffs,"useBurg",1);
% mlse_ = MLSE_viterbi("duobinary_output",0,'M',M,'trellis_states',PAMmapper(M,0).levels);
mlse_ = MLSE("duobinary_output",0,'M',M,'trellis_states',PAMmapper(M,0).levels);
[ffe_results, mlse_results] = vnle_postfilter_mlse(eq_, pf_, mlse_, M, Scpe_sig, Symbols, Tx_bits, ...
"precode_mode", duob_mode,...
'showAnalysis', 1, ...
"postFFE", [],...
"eth_style_symbol_mapping", 0);
disp('VNLE:')
ffe_results.metrics.print;
disp('MLSE:')
mlse_results.metrics.print;
end
if use_dbtgt
eq_ = EQ("Ne",ffe_order,"Nb",dfe_order,"training_length",len_tr,"training_loops",5,"dd_loops",5,"K",2,"DCmu",mu_dc,"DDmu",[mu_ffe mu_dfe],"DFEmu",0.005,"FFEmu",0,"plotfinal",0,"ideal_dfe",1);
mlse_db_ = MLSE("DIR",[1,1],"duobinary_output",0,"M",M,"trellis_states",PAMmapper(M,0).levels);
dbt_results = duobinary_target(eq_, mlse_db_, M, Scpe_sig, Symbols, Tx_bits, ...
"precode_mode", duob_mode, ...
'showAnalysis',1 ,...
"postFFE", []);
disp('DB:')
dbt_results.metrics.print;
end
end
if duob_mode == db_mode.db_encoded
eq_db_enc = EQ("Ne", ffe_order, "Nb", dfe_order, "training_length", len_tr, ...
"training_loops", 5, "dd_loops", 5, "K", 2, "DCmu", mu_dc, ...
"DDmu", [mu_ffe mu_dfe], "DFEmu", 0.005, "FFEmu", 0, "plotfinal", 0, "ideal_dfe", 1);
mlse_db_enc = MLSE("DIR", [1,1], "duobinary_output", 0, "M", M, "trellis_states", PAMmapper(M,0).levels);
db_results = duobinary_signaling(eq_db_enc, mlse_db_enc, M, Scpe_sig, Symbols, Tx_bits, "precode_mode",duob_mode, "showAnalysis",1,"postFFE",[]);
db_results.metrics.print;
end

View File

@@ -5,7 +5,7 @@ precomp_mode = 2; %0=do nothing ; 1= measure; 2=precomp active
db_precode = 0;
db_coding_approach = 0;
fsym = 224e9;
fsym = 160e9;
fdac = 256e9;
random_key = 0;
M = 4;
@@ -58,8 +58,7 @@ end
rcalpha = 0.05;
Pform = Pulseformer("fsym",fsym,"fdac",4*fsym,"pulse","rrc","pulselength",16,"rrcalpha",rcalpha);
Pform = Pulseformer("fsym",fsym,"fdac",4*fsym,"pulse","rrc","pulselength",16,"alpha",rcalpha);
Pamsource = PAMsource(...
"fsym",fsym,"M",M,"order",19,"useprbs",1,...
@@ -83,7 +82,9 @@ Digi_sig = precomp_est.precomp(Digi_sig,'maxampdb',precomp_amp_max,'loadPath',pr
Digi_sig = Digi_sig.normalize("mode","rms");
Digi_sig = Digi_sig.resample("fs_out",fdac);
Digi_sig= Digi_sig.normalize("mode","rms");
Digi_sig.spectrum("displayname","Strong Precomp","fignum",2223,"normalizeToNyquist",0,"normalizeTo0dB",0);

View File

@@ -1,5 +1,5 @@
filename = "C:\Users\sioe\Documents\High_Speed_Measurement_2024\bias_5km\PAMX_5km_20241025_204334_wh.mat";
filename = "Z:\2024\sioe\High Speed Messungen Oktober\bias_5km\PAMX_5km_20241025_204334_wh.mat";
a = load(filename);
wh = a.obj;
@@ -95,7 +95,7 @@ end
filename = "C:\Users\sioe\Documents\High_Speed_Measurement_2024\bias_testing_and_b2b\PAM4_b2b_bias_sweep_20241023_191202_wh_BB_BIAS_FINAL.mat";
filename = "Z:\2024\sioe\High Speed Messungen Oktober\bias_testing_and_b2b\PAM4_b2b_bias_sweep_20241023_191202_wh_BB_BIAS_FINAL.mat";
a = load(filename);
wh = a.obj;

View File

@@ -1,12 +1,12 @@
basePath = 'C:\Users\Silas\Documents\MATLAB\Datensätze\sioe_labor\';
database = DBHandler("pathToDB",[basePath,'silas_labor.db'],"type",'sqlite');
database = DBHandler("dataBase",[basePath,'silas_labor.db'],"type",'sqlite');
filterParams = database.tables;
filterParams.Configurations = struct( ...
'bitrate', [], ... %[224,336,360,390,420,448]
'db_mode', [], ...
'bitrate', [390e9], ... %[224,336,360,390,420,448]
'db_mode', 1, ...
'fiber_length', 1, ...
'interference_attenuation', [], ...
'interference_path_length', [], ...