filename = "F:\2024\sioe\High Speed Messungen Oktober\baudrate_sweep_b2b\PAMX_b2b_baudrate20241024_210648_wh_final.mat"; a = load(filename); wh = a.obj; wh.showInfo; fsym_vals = wh.parameter.fsym.values; rop_atten_vals = wh.parameter.rop_atten.values; M_vals = wh.parameter.M.values; if 1 %%% (A) PLOT ROP CURVES OF ALL THREE MODULATION FORMATS NEXT TO EACH OTHER %%% figure(300) clf hold on ber_ffe=[]; ber_mlse=[]; rop=[]; v_bias=[]; cols = [cbrewer2('Set1',9);cbrewer2('Set2',8)]; for fsym_iter = 1:numel(fsym_vals) for modulation_iter = 1:numel(M_vals) ber_ffe(:,modulation_iter,fsym_iter) = wh.getStoValue('ber_ffe',fsym_vals(fsym_iter),rop_atten_vals,M_vals(modulation_iter)); ber_mlse(:,modulation_iter,fsym_iter) = wh.getStoValue('ber_mlse',fsym_vals(fsym_iter),rop_atten_vals,M_vals(modulation_iter)); rop(:,modulation_iter,fsym_iter) = wh.getStoValue('rop',fsym_vals(fsym_iter),rop_atten_vals,M_vals(modulation_iter)); v_bias(:,modulation_iter,fsym_iter) = wh.getStoValue('v_bias',fsym_vals(fsym_iter),rop_atten_vals,M_vals(modulation_iter)); subplot(1,3,modulation_iter) title(['PAM ',num2str(M_vals(modulation_iter))]); hold on a = plot(rop(:,modulation_iter,fsym_iter),ber_ffe(:,modulation_iter,fsym_iter),... 'Color',cols(fsym_iter,:),'MarkerSize',2,'LineWidth',1,... 'Marker','o','MarkerFaceColor',cols(fsym_iter,:),'MarkerEdgeColor','black',... 'DisplayName',[num2str(fsym_vals(fsym_iter).*1e-9),'GBd']); a.DataTipTemplate.DataTipRows(1).Label = 'P_{out}'; a.DataTipTemplate.DataTipRows(2).Label = 'BER'; a.DataTipTemplate.DataTipRows(2).Format =['%.1e']; a.DataTipTemplate.DataTipRows(3).Label = 'Baudr'; a.DataTipTemplate.DataTipRows(3).Value = repmat(fsym_vals(fsym_iter).*1e-9,size(rop(:,modulation_iter,fsym_iter))); a.DataTipTemplate.DataTipRows(3).Format = ['%d',' GBd']; a.DataTipTemplate.DataTipRows(4).Label = 'Bitr'; a.DataTipTemplate.DataTipRows(4).Value = repmat(fsym_vals(fsym_iter).*1e-9.*log2(M_vals(modulation_iter)),size(rop(:,modulation_iter,fsym_iter))); a.DataTipTemplate.DataTipRows(4).Format = ['%d',' Gbps']; a.DataTipTemplate.FontSize = 9; a.DataTipTemplate.FontName = 'arial'; % Continue with the rest of your plot settings yline(3.8e-3, 'DisplayName', 'HD-FEC', 'LineStyle', '--', 'HandleVisibility', 'off'); xlabel('Measured MZM Output Power (dBm)'); ylabel('Bit Error Rate (BER)'); set(gca, 'yscale', 'log'); set(gca, 'Box', 'on'); grid on; grid minor; legend('Interpreter', 'none'); end end end %%% (B) PLOT BEST ROP OF EACH MOD FORMAT OVER BAUDRATE %%% if 1 figure(211) clf hold on cols = [cbrewer2('Set1',9);cbrewer2('Set2',8)]; ber_ffe=[]; ber_mlse=[]; rop=[]; v_bias=[]; for modulation_iter = 1:numel(M_vals) ber_ffe(:,modulation_iter) = wh.getStoValue('ber_ffe',fsym_vals,rop_atten_vals(1),M_vals(modulation_iter)); ber_mlse(:,modulation_iter) = wh.getStoValue('ber_mlse',fsym_vals,rop_atten_vals(1),M_vals(modulation_iter)); rop(:,modulation_iter) = wh.getStoValue('rop',fsym_vals,rop_atten_vals(1),M_vals(modulation_iter)); v_bias(:,modulation_iter) = wh.getStoValue('v_bias',fsym_vals,rop_atten_vals(1),M_vals(modulation_iter)); a=plot(fsym_vals.*1e-9.*log2(M_vals(modulation_iter)),ber_ffe(:,modulation_iter),... 'Color',cols(modulation_iter,:),'MarkerSize',2,'LineWidth',1,... 'Marker','o','MarkerFaceColor',cols(modulation_iter,:),'MarkerEdgeColor','black',... 'DisplayName',['PAM ',num2str(M_vals(modulation_iter))]); a.DataTipTemplate.DataTipRows(1).Label = 'Bitr'; a.DataTipTemplate.DataTipRows(1).Format = ['%.1f',' Gbps']; a.DataTipTemplate.DataTipRows(2).Label = 'BER'; a.DataTipTemplate.DataTipRows(2).Format ='%.1e'; a.DataTipTemplate.DataTipRows(3).Label = 'P_{out}'; a.DataTipTemplate.DataTipRows(3).Value = rop(:,modulation_iter); a.DataTipTemplate.DataTipRows(3).Format = ['%.2f',' dBm']; a.DataTipTemplate.DataTipRows(4).Label = 'Baudr'; a.DataTipTemplate.DataTipRows(4).Value = fsym_vals.*1e-9; a.DataTipTemplate.DataTipRows(4).Format = ['%.1f',' GBd']; a.DataTipTemplate.FontSize = 9; a.DataTipTemplate.FontName = 'arial'; % Continue with the rest of your plot settings title('Opt B2B') yline(3.8e-3, 'DisplayName', 'HD-FEC', 'LineStyle', '--', 'HandleVisibility', 'off'); xlabel('Bit Rate in GBps'); ylabel('Bit Error Rate (BER)'); set(gca, 'yscale', 'log'); set(gca, 'Box', 'on'); grid on; grid minor; legend('Interpreter', 'none'); end end