58 lines
1.4 KiB
Matlab
58 lines
1.4 KiB
Matlab
M = wh.parameter.M.values(1);
|
|
datarates = wh.parameter.datarate.values;
|
|
rop = wh.parameter.rop.values;
|
|
|
|
clear("sens_ffe")
|
|
|
|
col = flip(cbrewer2("RdYlGn",numel(datarates)));
|
|
|
|
cnt = 1;
|
|
for dr = datarates
|
|
|
|
ber_ffe = wh.getStoValue('ber_ffe',M,dr,rop);
|
|
|
|
sens_ffe(cnt) = getIntersection(ber_ffe,rop);
|
|
|
|
figure(116)
|
|
hold on
|
|
plot(rop,ber_ffe,"LineWidth",0.5,"LineStyle","-","Marker",".","MarkerSize",15,"DisplayName",['Postfilter + MLSE; ',num2str(dr), ' Gbps'],'Color',col(cnt,:));
|
|
yline(3.8e-3,'DisplayName','HD-FEC','LineStyle','--','HandleVisibility','off');
|
|
xlabel('Received Optical Power (dBm)');
|
|
ylabel('Bit Error Rate (BER)');
|
|
title('Bit Error Rate vs. ROP');
|
|
set(gca,'yscale','log');
|
|
set(gca,'Box','on');
|
|
grid on;
|
|
grid minor
|
|
legend
|
|
|
|
cnt = cnt+1;
|
|
|
|
end
|
|
|
|
|
|
figure(22);
|
|
hold on; % Retain the plot so new points can be added without complete redraw
|
|
plot(datarates,sens_ffe,"LineWidth",1,"LineStyle","-","Marker",".","MarkerSize",10,"DisplayName",['Linewidth: ',num2str(laser_linewidth.*1e-6),' MHz']);
|
|
xlabel('Signal to Interference Ratio (dB)');
|
|
ylabel('Receiver Sensitivity');
|
|
title(['Bit Error Rate vs. SIR']);
|
|
grid on;
|
|
legend
|
|
|
|
|
|
function i = getIntersection(ber,rop)
|
|
|
|
%get intersection between rop curve and hd-fec limit
|
|
hdfec = 3.8e-3 .* ones(size(ber));
|
|
i = InterX([rop;hdfec'],[rop;ber']);
|
|
|
|
if isempty(i)
|
|
i = NaN;
|
|
else
|
|
i = i(1);
|
|
end
|
|
end
|
|
|
|
|