MPI Simulations and stuff
This commit is contained in:
47
projects/MPI_Juni/linewidth_curve.m
Normal file
47
projects/MPI_Juni/linewidth_curve.m
Normal file
@@ -0,0 +1,47 @@
|
||||
function linewidth_curve(wh,options)
|
||||
arguments
|
||||
wh
|
||||
options.DisplayName = '';
|
||||
end
|
||||
|
||||
M = wh.parameter.M.values(1);
|
||||
datarate = wh.parameter.datarate.values(1);
|
||||
sir = wh.parameter.sir.values(6);
|
||||
mpi_len = wh.parameter.mpi_pathlen.values;
|
||||
laser_linewidth = wh.parameter.laser_linewidth.values;
|
||||
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(1);
|
||||
rrcalpha = wh.parameter.rrcalpha.values(1);
|
||||
|
||||
cols = linspecer(numel(mpi_len));
|
||||
% Create the initial plot
|
||||
figure(44);
|
||||
hold on; % Retain the plot so new points can be added without complete redraw
|
||||
for l = 1:numel(mpi_len)
|
||||
|
||||
cnt = 0;
|
||||
for i = 1:numel(laser_linewidth)
|
||||
|
||||
bers(:,i) = wh.getStoValue('ber',M,datarate,sir,mpi_len(l),laser_linewidth(i),pn_key,vbias_rel,rop,clipfactor, rrcalpha);
|
||||
%ers(:,i) = unique(wh.getStoValue('er',M,datarate,sir,mpi_len,laser_linewidth(i),pn_key,vbias_rel,rop,clipfactor, rrcalpha));
|
||||
|
||||
dn = ['Interference Path Length: ',num2str(mpi_len(l)),'m; Rate: ',num2str(datarate)];
|
||||
|
||||
end
|
||||
|
||||
scatter(laser_linewidth.*1e-6,bers,"LineWidth",1,"Marker",".","DisplayName",string(dn),"MarkerEdgeColor",cols(l,:),'HandleVisibility','off');
|
||||
plot(laser_linewidth.*1e-6,mean(bers),"LineWidth",1,"Marker",".","DisplayName",string(dn),"MarkerEdgeColor",cols(l,:),"Color",cols(l,:));
|
||||
|
||||
end
|
||||
ylim([1e-4, 1e-2]);
|
||||
yline(3.8e-3,'DisplayName','HD-FEC');
|
||||
xlabel('Laser Linewidth in MHz');
|
||||
ylabel('Bit Error Rate (BER)');
|
||||
title(['Bit Error Rate vs. Interference Path Length @ SIR ',num2str(sir), 'dB']);
|
||||
set(gca,'yscale','log');
|
||||
grid on;
|
||||
legend
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user