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:
@@ -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
|
||||
Reference in New Issue
Block a user