+ duobinary_target now supports memoryless decoding (FFE targets DB response without MLSE) + PAMmapper.quantize now supports custom constellations for quantization + Added a new folder 'Documentations' for pdfs, slides, etc. + Added new FSO evaluation scripts in projects/FSO transmission/Evaluation Scripts + Added ffe_db (rudimentary module, not important anymore)
84 lines
2.7 KiB
Matlab
84 lines
2.7 KiB
Matlab
figure(202120); clf; hold on
|
|
set(gcf, 'WindowState', 'maximized');
|
|
|
|
x = 225:10:285;
|
|
shift = 0.5;
|
|
x = [x;x-shift;x+shift;x;x];
|
|
|
|
hErr = gobjects(1,4); % Errorbars -> für Legende
|
|
hLine = gobjects(1,4); % Linien durch Mittelwerte (nicht in Legende)
|
|
|
|
for k = 1:4
|
|
BER = load("C:\Users\magf\Desktop\Desktop\Projekte\FSO\Data\BER_PAM_4_Optimal" + string(k) + ".mat");
|
|
BER_all = BER.BER_num_signal_sweep_matrix;
|
|
BER_traces = BER_all((k-1)*7+1:k*7,:);
|
|
|
|
BER_min = zeros(1,7); BER_avg = zeros(1,7); BER_max = zeros(1,7);
|
|
for l = 1:7
|
|
BER_min(l) = min(BER_traces(l,:));
|
|
BER_avg(l) = mean(BER_traces(l,:));
|
|
BER_max(l) = max(BER_traces(l,:));
|
|
end
|
|
|
|
% Log-sicherer Floor (falls min=0)
|
|
yFloor = 1e-12;
|
|
BER_min(BER_min <= 0 | isnan(BER_min) | isinf(BER_min)) = yFloor;
|
|
BER_max(BER_max <= 0 | isnan(BER_max) | isinf(BER_max)) = yFloor;
|
|
BER_max = max(BER_max, BER_min);
|
|
|
|
% Errorbar-Parameter (asymmetrisch)
|
|
y = BER_avg;
|
|
yneg = BER_avg - BER_min;
|
|
ypos = BER_max - BER_avg;
|
|
|
|
% Errorbars (Punkt + Intervall)
|
|
hErr(k) = errorbar(x(k,:), y, yneg, ypos, 'o', ...
|
|
'LineWidth', 2.75, 'MarkerSize', 8, 'CapSize', 10);
|
|
|
|
% Gestrichelte Linie durch die Mittelwerte (gleiche Farbe)
|
|
hLine(k) = plot(x(k,:), y, '--o', ...
|
|
'LineWidth', 2.75, ...
|
|
'MarkerSize', 8, ...
|
|
'Color', hErr(k).Color);
|
|
end
|
|
|
|
% Paper-Kurve
|
|
old_BER = 10.^([-1.6, -1.85, -2.2, -2.45, -2.3, -2, -1.4]);
|
|
hPaper = plot(x(k+1,:), old_BER, '-o', 'LineWidth', 2.75, 'MarkerSize', 8);
|
|
|
|
% FEC-Linien
|
|
yline(2e-2, ':k', 'LineWidth',1.2);
|
|
yline(3.8e-3,':b', 'LineWidth',1.2);
|
|
yline(4.85e-3,':g','LineWidth',1.2);
|
|
yline(2.2e-4,':r', 'LineWidth',1.2);
|
|
|
|
% FEC Labels (wie bei dir, FontSize = 16)
|
|
text(221, 2.3e-2,'o-FEC', 'Color','k','FontSize',22,'Interpreter','latex')
|
|
text(221, 3e-3,'HD-FEC', 'Color','b','FontSize',22,'Interpreter','latex')
|
|
text(221, 6e-3,'KP4+Hamming', 'Color','g','FontSize',22,'Interpreter','latex')
|
|
text(221, 2.5e-4,'KP4', 'Color','r','FontSize',22,'Interpreter','latex')
|
|
|
|
% Achsen
|
|
set(gca,'YScale','log'); grid minor
|
|
ylim([1e-5 5e-1])
|
|
|
|
% ---- Schriftgrößen: Achsen + Legende = 22 ----
|
|
ax = gca;
|
|
ax.FontSize = 22;
|
|
ax.LabelFontSizeMultiplier = 1;
|
|
|
|
xlabel('Laser Bias Current [mA]', 'Interpreter','latex', 'FontSize', 22)
|
|
ylabel('BER', 'Interpreter','latex', 'FontSize', 22)
|
|
|
|
% Legende: Errorbar-Handles verwenden (Marker + vertikale Linie)
|
|
lgd = legend([hErr(1) hErr(2) hErr(3) hErr(4) hPaper], ...
|
|
{'FFE','FFE+PF+MLSE','DB','ML-MLSE','BER Paper'}, ...
|
|
'Interpreter','latex','Location','southwest');
|
|
lgd.FontSize = 22;
|
|
|
|
% ---- Figure "Presentation"-Style ----
|
|
set(gcf, 'Color', 'w');
|
|
set(gcf, 'Units', 'pixels', 'Position', [100 100 1400 900]);
|
|
set(gcf, 'Renderer', 'painters');
|
|
|
|
hold off |