CLEANUP - changes to folder structure
This commit is contained in:
65
projects/MPI/MPI_August/auswertung/clipfactor_curve.m
Normal file
65
projects/MPI/MPI_August/auswertung/clipfactor_curve.m
Normal file
@@ -0,0 +1,65 @@
|
||||
M = wh.parameter.M.values(1);
|
||||
datarate = wh.parameter.datarate.values(1);
|
||||
sir = wh.parameter.sir.values(1);
|
||||
laser_linewidth = wh.parameter.laser_linewidth.values(1);
|
||||
pn_key = wh.parameter.pn_key.values(1);
|
||||
rop = wh.parameter.rop.values;
|
||||
cfs = wh.parameter.vbias_rel.values;
|
||||
|
||||
cols = linspecer(6);
|
||||
c_cnt = 0;
|
||||
for c = cfs
|
||||
c_cnt = c_cnt+1;
|
||||
for pnk = pn_key
|
||||
|
||||
%get ROP curve data for cur. sir and realization
|
||||
|
||||
ber_ffe = wh.getStoValue('ber_ffe',M,datarate,sir,laser_linewidth,pnk,rop,c);
|
||||
|
||||
try
|
||||
rrop_ffe(c_cnt,1) = getIntersection(ber_ffe,rop);
|
||||
end
|
||||
|
||||
if 1
|
||||
% Create rop plot
|
||||
figure(43);
|
||||
hold on; % Retain the plot so new points can be added without complete redraw
|
||||
plot(rop,ber_ffe',"LineWidth",1,"LineStyle","-","Marker",".","MarkerSize",10,"DisplayName","ber ffe",'Color',cols(5,:));
|
||||
yline(3.8e-3,'DisplayName','HD-FEC');
|
||||
xlabel('Signal to Interference Ratio (dB)');
|
||||
ylabel('Bit Error Rate (BER)');
|
||||
|
||||
set(gca,'yscale','log');
|
||||
grid on;
|
||||
legend
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
figure(2243);
|
||||
hold on; % Retain the plot so new points can be added without complete redraw
|
||||
plot(cfs,mean(rrop_ffe,2,"omitnan")',"LineWidth",1,"LineStyle","--","Marker",".","MarkerSize",10,"DisplayName","FFE",'Color',cols(5,:));
|
||||
|
||||
xlabel('Clipfactor');
|
||||
ylabel('Receiver Sensitivity');
|
||||
%title(['Bit Error Rate vs. SIR; SIR: ',num2str(s),' dB']);
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user