MPI Simulations and stuff

This commit is contained in:
Silas Oettinghaus
2024-08-14 09:36:51 +02:00
parent 1eeb970d8f
commit 34f9149346
61 changed files with 4295 additions and 429 deletions

Binary file not shown.

View File

@@ -0,0 +1,44 @@
function tx_signal_curve(wh,options)
arguments
wh
options.DisplayName = '';
end
M = wh.parameter.M.values(1);
datarate = wh.parameter.datarate.values(1);
sirs = wh.parameter.sir.values(1);
mpi_len = wh.parameter.mpi_pathlen.values(1);
laser_linewidths = wh.parameter.laser_linewidth.values(1);
pn_key = wh.parameter.pn_key.values;
vbias_rel = wh.parameter.vbias_rel.values(1);
rop = wh.parameter.rop.values(1);
clipfactor = wh.parameter.clipfactor.values;
rrcalpha = wh.parameter.rrcalpha.values(1);
% Create the initial plot
figure(4);
cols = linspecer(6);
cnt = 0;
bers(:) = wh.getStoValue('ber',M,datarate,sirs,mpi_len,laser_linewidths,pn_key,vbias_rel,rop,clipfactor, rrcalpha);
ers(:) = wh.getStoValue('er',M,datarate,sirs,mpi_len,laser_linewidths,pn_key,vbias_rel,rop,clipfactor, rrcalpha);
dn = ['M: ',num2str(M),'; Rate: ',num2str(datarate),'; SIR ',num2str(sirs), 'dB; lw: ',num2str(laser_linewidths.*1e-6),' MHz'];
hold on; % Retain the plot so new points can be added without complete redraw
% scatter(clipfactor,bers,"LineWidth",1,"Marker",".","DisplayName",string(dn),"MarkerEdgeColor",cols(cnt,:),'HandleVisibility','off');
yyaxis left
plot(clipfactor,bers,"LineWidth",1,"Marker",".","DisplayName",'BER');
yline(3.8e-3,'DisplayName','HD-FEC','HandleVisibility','off');
set(gca,'yscale','log');
grid on;
ylim([1e-5,4e-2])
yyaxis right
plot(clipfactor,ers,"LineWidth",1,"Marker",".","DisplayName",'Extinction Ratio in dB');
xlabel('Clip Factor');
ylabel('Bit Error Rate (BER)');
title(['Bit Error Rate vs. Clip Factor: ',dn]);
legend
end