Current work is on MLSE and SD Decoding etc. MLSE is currently not 100% working, the scalings are maybe off?!
86 lines
3.5 KiB
Matlab
86 lines
3.5 KiB
Matlab
|
|
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(); |