Additions:

- Correction of the weighted DFE function in EQ.m
- Some evaluation scripts for FSO Data
This commit is contained in:
magf
2026-02-09 13:04:20 +01:00
parent 58e72070d9
commit 3edd64d365
22 changed files with 759 additions and 186 deletions

View File

@@ -0,0 +1,61 @@
%%
x = 225:10:285;
averaging_over_signal_traces = 1;
all_BER_plots = 0;
for k = 1:4
BER = load('C:\Users\magf\Desktop\Desktop\Projekte\FSO\Data\BER_PAM_4_Optimal' + string(k) + '.mat');
BER_values = BER.BER_PAM_4;
idx_opt = BER.idx_opt;
BER_num_signal_sweep_matrix = BER.BER_num_signal_sweep_matrix;
disp(idx_opt)
BER_num_signal_sweep_matrix = BER_num_signal_sweep_matrix(((k-1)*7+1:k*7),:);
if averaging_over_signal_traces
for i = 1:size(BER_values,2)
BER_values(i) = mean(BER_num_signal_sweep_matrix(i,:));
end
end
if all_BER_plots
figure;
hold on
for i = 1:size(BER_num_signal_sweep_matrix,1)
plot(BER_num_signal_sweep_matrix(i,:))
end
hold off
end
figure(202120)
plot(x, BER_values, '-o','LineWidth',1.75);
hold on
end
old_BER = [-1.6, -1.85, -2.2, -2.45, -2.3, -2, -1.4];
old_BER = 10.^(old_BER);
plot(x, old_BER, '-o','LineWidth',1.75)
h1 = yline(2e-2, ':k', 'LineWidth',1.5);
h2 = yline(3.8e-3,':b', 'LineWidth',1.5);
h3 = yline(4.85e-3,':g', 'LineWidth',1.5);
h4 = yline(2.2e-4,':r', 'LineWidth',1.5);
% Legende NUR für Kurven
legend('FFE', 'FFE+PF+MLSE', 'DB', 'ML-MLSE', 'BER Paper', ...
'Interpreter','latex', ...
'Location','southwest', 'FontSize', 14)
% FEC Labels direkt im Plot
text(221,2.2e-2,'o-FEC','Color','k','FontSize', 14, 'Interpreter','latex')
text(221,3.2e-3,'HD-FEC','Color','b','FontSize', 14, 'Interpreter','latex')
text(221,5.7e-3,'KP4+Hamming','Color','g','FontSize', 14,'Interpreter','latex')
text(221,2.5e-4,'KP4','Color','r','FontSize', 14,'Interpreter','latex')
xlabel('Laser Bias Current [mA]', 'Interpreter','latex')
ylabel('BER', 'Interpreter','latex')
% title('BER for PAM-2', 'Interpreter','latex')
grid minor
ylim([3e-5 5e-1])
set(gca,'YScale','log')
% beautifyBERplot
hold off