556 lines
21 KiB
Matlab
556 lines
21 KiB
Matlab
close all;
|
|
|
|
if 1
|
|
|
|
uloops = struct;
|
|
uloops.precomp = [0];
|
|
uloops.bitrate = [300].*1e9; %[300,330,360,390,420,450,480] [224,336,360,390,420,448] for MPI
|
|
% uloops.laser_wavelength = [1293,1297.5,1302,1306.5,1310,1313.4,1318,1322.7,1327.4];
|
|
uloops.laser_wavelength = [1293];
|
|
uloops.M = [4];
|
|
uloops.link_length = 1;
|
|
% uloops.link_length = [0:2:10]; % 1,2,3,5,6,8,10
|
|
uloops.alpha = [0];
|
|
uloops.duob_mode = db_mode.db_precoded;
|
|
uloops.decoding_mode = "memoryless";
|
|
|
|
wh = DataStorage(uloops);
|
|
wh.addStorage("ber");
|
|
|
|
wh = submit_handle(@imdd_model,wh,"parallel",0);
|
|
|
|
end
|
|
|
|
%%
|
|
figure
|
|
hold on
|
|
for alpha = uloops.alpha
|
|
a=wh.getStoValue('ber',0, [300].*1e9 , 1293, 4, uloops.link_length,alpha,uloops.duob_mode,uloops.decoding_mode);
|
|
% ffe = cellfun(@(x) x.ffe_results.metrics.BER, a);
|
|
ffe = cellfun(@(x) x.dbt_results.metrics.BER, a);
|
|
plot(uloops.link_length,ffe,'DisplayName',sprintf('Alpha: %d',alpha),'LineStyle','-','HandleVisibility','on');
|
|
end
|
|
|
|
set(gca, 'YScale', 'log');
|
|
ylim([5e-5 0.4]);
|
|
yline([3.8e-3, 2e-2],'HandleVisibility','off');
|
|
legend
|
|
beautifyBERplot()
|
|
ylabel('BER');
|
|
|
|
|
|
|
|
|
|
%
|
|
% wh_ana = wh_master;
|
|
%
|
|
% cols = cbrewer2('Paired',8);
|
|
%
|
|
% figure()
|
|
%
|
|
% for precomp = [0,1]
|
|
% wavelength=uloops.laser_wavelength;
|
|
% for m = [6]
|
|
%
|
|
% baudrate = wh_ana.parameter.bitrate.values;
|
|
%
|
|
%
|
|
% %VNLE
|
|
% precode = 1;
|
|
% a = wh_ana.getStoValue('ber',precomp, precode, baudrate , wavelength, m, uloops.link_length);
|
|
% ber_vnle_pc = cellfun(@(x) x.vnle_pf_package{1,1}.ber_vnle, a);
|
|
% %MLSE
|
|
% ber_mlse_pc = cellfun(@(x) x.vnle_pf_package{1,1}.ber_mlse, a);
|
|
% %DB
|
|
% ber_dbtgt_pc = cellfun(@(x) x.dbtgt_package{1,1}.ber, a);
|
|
%
|
|
% precode = 0;
|
|
% a = wh_ana.getStoValue('ber',precomp, precode, baudrate , wavelength, m, uloops.link_length);
|
|
% ber_vnle = cellfun(@(x) x.vnle_pf_package{1,1}.ber_vnle, a);
|
|
% %MLSE
|
|
% ber_mlse = cellfun(@(x) x.vnle_pf_package{1,1}.ber_mlse, a);
|
|
% %DB
|
|
% ber_dbtgt = cellfun(@(x) x.dbtgt_package{1,1}.ber, a);
|
|
%
|
|
% if precomp
|
|
% legndname1 = ['Pre-Emphasis'];
|
|
% else
|
|
% legndname1 = ['No Pre-Emphasis'];
|
|
% end
|
|
%
|
|
%
|
|
% baudrate = floor( uloops.bitrate.*1e-9 ./log2(m) ) .* 2.5 .* 1e9;
|
|
%
|
|
% subplot(1,3,1)
|
|
% hold on
|
|
% title(sprintf('%d km | %d nm | PAM %d',uloops.link_length,wavelength,m));
|
|
% title(sprintf('PAM %d',m));
|
|
% plot(baudrate.*1e-9,ber_vnle,'DisplayName',['Pre-Emphasis: ', num2str(precomp), '| Diff.-Code: 0'],'Color',cols(1+precomp,:),'LineStyle','-','HandleVisibility','on');
|
|
% plot(baudrate.*1e-9,ber_vnle_pc,'DisplayName',['Pre-Emphasis: ', num2str(precomp), '| Diff.-Code: 1'],'Color',cols(1+precomp,:),'LineStyle','-.','HandleVisibility','on');
|
|
% xticks(baudrate.*1e-9);
|
|
% set(gca, 'YScale', 'log');
|
|
% ylim([5e-5 0.4]);
|
|
% xlim([min(baudrate(2).*1e-9), max(baudrate.*1e-9) ]);
|
|
% yline([3.8e-3, 2e-2],'HandleVisibility','off');
|
|
% legend
|
|
% beautifyBERplot()
|
|
% xlabel('Bit Rate in Gbps');
|
|
% ylabel('BER');
|
|
%
|
|
%
|
|
%
|
|
% subplot(1,3,2)
|
|
% hold on
|
|
% % title(sprintf('%d km | %d nm | PAM %d',uloops.link_length,wavelength,m));
|
|
% title(sprintf('PAM %d',m));
|
|
% plot(baudrate.*1e-9,ber_dbtgt,'DisplayName',['Pre-Emphasis: ', num2str(precomp), '| Diff.-Code: 0'],'Color',cols(5+precomp,:),'LineStyle','-','HandleVisibility','on');
|
|
% plot(baudrate.*1e-9,ber_dbtgt_pc,'DisplayName',['Pre-Emphasis: ', num2str(precomp), '| Diff.-Code: 1'],'Color',cols(5+precomp,:),'LineStyle','-.','HandleVisibility','on');
|
|
% xticks(baudrate.*1e-9);
|
|
% set(gca, 'YScale', 'log');
|
|
% ylim([5e-5 0.4]);
|
|
% xlim([min(baudrate(2).*1e-9), max(baudrate.*1e-9) ]);
|
|
% yline([3.8e-3, 2e-2],'HandleVisibility','off');
|
|
% legend
|
|
% beautifyBERplot()
|
|
% xlabel('Bit Rate in Gbps');
|
|
% ylabel('BER');
|
|
%
|
|
%
|
|
% subplot(1,3,3)
|
|
% hold on
|
|
% % title(sprintf('%d km | %d nm | PAM %d',uloops.link_length,wavelength,m));
|
|
% title(sprintf('PAM %d',m));
|
|
% plot(baudrate.*1e-9,ber_mlse,'DisplayName',['Pre-Emphasis: ', num2str(precomp), '| Diff.-Code: 0'],'Color',cols(3+precomp,:),'LineStyle','-','HandleVisibility','on');
|
|
% plot(baudrate.*1e-9,ber_mlse_pc,'DisplayName',['Pre-Emphasis: ', num2str(precomp), '| Diff.-Code: 1'],'Color',cols(3+precomp,:),'LineStyle','-.','HandleVisibility','on');
|
|
% xticks(baudrate.*1e-9);
|
|
% set(gca, 'YScale', 'log');
|
|
% ylim([5e-5 0.4]);
|
|
% xlim([min(baudrate(2).*1e-9), max(baudrate.*1e-9) ]);
|
|
% yline([3.8e-3, 2e-2],'HandleVisibility','off');
|
|
% legend
|
|
% beautifyBERplot()
|
|
% xlabel('Bit Rate in Gbps');
|
|
% ylabel('BER');
|
|
% end
|
|
% end
|
|
% %
|
|
% %
|
|
% cols = linspecer(7);%cbrewer2('Set2',10);
|
|
%
|
|
%
|
|
% for w = uloops.laser_wavelength
|
|
%
|
|
% figure(w)
|
|
% figcnt = 0;
|
|
%
|
|
% for precode = uloops.db_precode
|
|
%
|
|
% for precomp = uloops.precomp
|
|
%
|
|
% for m = uloops.M
|
|
%
|
|
% a = wh_ana.getStoValue('ber',precomp, precode, uloops.bitrate , w, m, uloops.link_length);
|
|
% ber_dbtgt = cellfun(@(x) x.dbtgt_package{1,1}.ber, a);
|
|
%
|
|
% ber_vnle = cellfun(@(x) x.vnle_pf_package{1,1}.ber_vnle, a);
|
|
%
|
|
% ber_mlse = cellfun(@(x) x.vnle_pf_package{1,1}.ber_mlse, a);
|
|
%
|
|
% figcnt = figcnt+1;
|
|
% subplot(4,3,figcnt);
|
|
% hold on
|
|
% title(sprintf('precomp = %d | precode = %d | %d km | %d nm | PAM %d',precomp,precode,uloops.link_length,w,m));
|
|
%
|
|
% plot(uloops.bitrate,ber_dbtgt,'DisplayName',sprintf('DB tgt. + MLSE',uloops.link_length,uloops.M),'Color',cols(1,:),'LineStyle','-','HandleVisibility','on');
|
|
%
|
|
% plot(uloops.bitrate,ber_vnle,'DisplayName',sprintf('VNLE'),'Color',cols(3,:),'LineStyle','-','HandleVisibility','on');
|
|
%
|
|
% plot(uloops.bitrate,ber_mlse,'DisplayName',sprintf('VNLE + 1 tap post-filter + MLSE',uloops.link_length,uloops.M),'Color',cols(4,:),'LineStyle','-','HandleVisibility','on');
|
|
%
|
|
% % plot(uloops.bitrate,cellfun(@min, ber_dfe),'DisplayName',sprintf('VNLE + DFE',uloops.link_length,uloops.M),'Color',cols(2,:),'LineStyle','--');
|
|
%
|
|
% % plot(uloops.bitrate,cellfun(@min, ber_dbenc),'DisplayName',sprintf('DB Encoded',uloops.link_length,uloops.M),'Color',cols(5,:),'LineStyle','-');
|
|
%
|
|
% set(gca, 'YScale', 'log');
|
|
% ylim([5e-5 0.5]);
|
|
% % xlim([min(uloops.bitrate.*1e-9), max(uloops.bitrate.*1e-9) ]);
|
|
% yline([3.8e-3, 2e-2],'HandleVisibility','off');
|
|
% legend
|
|
% beautifyBERplot()
|
|
% xlabel('Bit Rate in Gbps');
|
|
% ylabel('Channel Wavelength (nm)');
|
|
%
|
|
% end
|
|
% end
|
|
% end
|
|
% end
|
|
|
|
|
|
%
|
|
% m = 6;
|
|
% ir = [2,2.5,3];
|
|
% cols = linspecer(6);
|
|
% baudrate_gather = [];
|
|
% for i = 1:3
|
|
% m = uloops.M(i);
|
|
%
|
|
% %%% GET VNLE VALS
|
|
% precode = 0;
|
|
% precomp = 1;
|
|
% a = wh_master.getStoValue('ber',precomp, precode, uloops.bitrate , uloops.laser_wavelength, m, uloops.link_length);
|
|
% ber_vnle(i,:) = cellfun(@(x) x.vnle_pf_package{1,1}.ber_vnle, a);
|
|
%
|
|
% %%% GET DB VALS
|
|
% precode = 1;
|
|
% precomp = 0;
|
|
% a = wh_master.getStoValue('ber',precomp, precode, uloops.bitrate , uloops.laser_wavelength, m, uloops.link_length);
|
|
% ber_db(i,:) = cellfun(@(x) x.dbtgt_package{1,1}.ber, a);
|
|
%
|
|
% %%% GET MLSE VALS
|
|
% precode = 0;
|
|
% precomp = 0;
|
|
% a = wh_master.getStoValue('ber',precomp, precode, uloops.bitrate , uloops.laser_wavelength, m, uloops.link_length);
|
|
% ber_mlse(i,:) = cellfun(@(x) x.vnle_pf_package{1,1}.ber_mlse, a);
|
|
%
|
|
% inf_rate_pam(i,:) = cellfun(@(x) x.vnle_pf_package{1,1}.air, a);
|
|
% inf_rate_pam(i,:) = inf_rate_pam(i,:)./log2(m);
|
|
%
|
|
% bitrate = floor( uloops.bitrate.*1e-9 ./log2(m) ) .* ir(i) .* 1e9;
|
|
% baudrate = floor( uloops.bitrate.*1e-9 ./log2(m) ) .* 1e9;
|
|
% baudrate_gather = union(baudrate_gather,baudrate);
|
|
% baudrate_ticks = 100:20:240;
|
|
% bitrate_ticks = 300:30:480;
|
|
%
|
|
% tp = TransmissionPerformance;
|
|
% netRatesVNLE = tp.calculateNetRate(bitrate, 'NGMI', inf_rate_pam(i,:), 'BER', ber_vnle(i,:));
|
|
%
|
|
% %%% NGMI
|
|
% figure(12)
|
|
% hold on
|
|
% title(sprintf('Performance at 1310 nm'));
|
|
% plot(baudrate.*1e-9,inf_rate_pam(i,:),'DisplayName',sprintf('NGMI; PAM %d',m),'Color',cols(i,:),'LineStyle','-');
|
|
% xlabel('Baud rate in GBd');
|
|
% ylabel('NGMI')
|
|
% beautifyBERplot()
|
|
% xticks(baudrate_ticks);
|
|
% xlim([min(baudrate_ticks) max(baudrate_ticks)]);
|
|
%
|
|
%
|
|
% %%% AIR
|
|
% figure(14)
|
|
% hold on
|
|
% title(sprintf('Performance at 1310 nm'));
|
|
% plot(baudrate.*1e-9,inf_rate_pam(i,:).*bitrate.*1e-9,'DisplayName',sprintf('AIR; PAM %d',m),'Color',cols(i,:),'LineStyle','-');
|
|
% xlabel('Baud rate in GBd');
|
|
% ylabel('AIR');
|
|
% beautifyBERplot()
|
|
% xticks(baudrate_ticks);
|
|
% xlim([min(baudrate_ticks) max(baudrate_ticks)]);
|
|
%
|
|
% %%% RATES
|
|
% figure(16)
|
|
% hold on
|
|
% title(sprintf('Performance at 1310 nm'));
|
|
% if i == 1
|
|
% hv = 'on';
|
|
% else
|
|
% hv = 'off';
|
|
% end
|
|
% plot(baudrate*1e-9,netRatesVNLE.SDHD.NetRate.*1e-9,'DisplayName',sprintf('SD+HD FEC',m),'Color',cols(i,:),'LineStyle','-','HandleVisibility',hv,'Marker','o');
|
|
% plot(baudrate.*1e-9,netRatesVNLE.HD.NetRate.*1e-9,'DisplayName',sprintf('HD FEC',m),'Color',cols(i,:),'LineStyle',':','HandleVisibility',hv,'Marker','diamond');
|
|
% plot(baudrate.*1e-9,netRatesVNLE.KP4_hamming.NetRate*1e-9,'DisplayName',sprintf('KP4+Hamming',m),'Color',cols(i,:),'LineStyle','-.','HandleVisibility',hv,'Marker','square');
|
|
% xticks(baudrate_ticks);
|
|
% xlim([min(baudrate_ticks) max(baudrate_ticks)]);
|
|
% xlabel('Baud rate in GBd');
|
|
% ylabel('Net Bitrate in Gbps')
|
|
% beautifyBERplot()
|
|
% ylim([250 410])
|
|
%
|
|
% %%% CODE OVERHEAD IN %
|
|
% figure(18)
|
|
% hold on
|
|
% title(sprintf('Performance at 1310 nm'));
|
|
% plot(baudrate*1e-9,100.*(1-netRatesVNLE.SDHD.CodeRate)./netRatesVNLE.SDHD.CodeRate,'DisplayName',sprintf('SD+HD FEC',m),'Color',cols(i,:),'LineStyle','-','HandleVisibility',hv,'Marker','o');
|
|
% plot(baudrate.*1e-9,100.*(1-netRatesVNLE.HD.CodeRate)./netRatesVNLE.HD.CodeRate,'DisplayName',sprintf('HD FEC',m),'Color',cols(i,:),'LineStyle',':','HandleVisibility',hv,'Marker','diamond');
|
|
% plot(baudrate.*1e-9,100.*(1-netRatesVNLE.KP4_hamming.CodeRate)./netRatesVNLE.KP4_hamming.CodeRate,'DisplayName',sprintf('KP4+Hamming',m),'Color',cols(i,:),'LineStyle','-.','HandleVisibility',hv,'Marker','square');
|
|
% xticks(baudrate_ticks);
|
|
% xlim([min(baudrate_ticks) max(baudrate_ticks)]);
|
|
% xlabel('Baud rate in GBd');
|
|
% ylabel('FEC Overhead in %')
|
|
% beautifyBERplot()
|
|
%
|
|
% %%% CLASSIC BER
|
|
% figure(22)
|
|
% subplot(1,4,i)
|
|
% hold on
|
|
% plot(baudrate*1e-9,ber_vnle(i,:),'DisplayName',sprintf('Tx precomp + VNLE',m),'Color',cols(i,:),'LineStyle','-','HandleVisibility','on','Marker','o');
|
|
% plot(baudrate*1e-9,ber_mlse(i,:),'DisplayName',sprintf('VNLE + PF + MLSE',m),'Color',cols(i,:),'LineStyle',':','HandleVisibility','on','Marker','square');
|
|
% plot(baudrate*1e-9,ber_db(i,:),'DisplayName',sprintf('Diff. Code + DB tgt.',m),'Color',cols(i,:),'LineStyle','--','HandleVisibility','on','Marker','diamond');
|
|
% yline(4.85e-3,'HandleVisibility','off');
|
|
% yline(2e-2,'HandleVisibility','off');
|
|
% xticks(baudrate*1e-9);
|
|
% xlim([min(baudrate*1e-9) max(baudrate*1e-9)]);
|
|
% ylim([1e-4 0.3]);
|
|
% xlabel('Baudrate in GBd');
|
|
% if i == 1
|
|
% ylabel('BER')
|
|
% end
|
|
% beautifyBERplot()
|
|
% set(gca, 'YScale', 'log');
|
|
% legend
|
|
% subplot(1,4,4)
|
|
% hold on
|
|
% if m == 4
|
|
%
|
|
% plot(bitrate*1e-9,ber_db(i,:),'DisplayName',sprintf('Diff. Code + DB tgt.'),'Color',cols(i,:),'LineStyle','--','HandleVisibility','on','Marker','diamond');
|
|
%
|
|
% elseif m == 6
|
|
%
|
|
% plot(bitrate*1e-9,ber_vnle(i,:),'DisplayName',sprintf('VNLE + PF + MLSE'),'Color',cols(i,:),'LineStyle','-','HandleVisibility','on','Marker','o');
|
|
% % plot(bitrate*1e-9,ber_mlse(i,:),'DisplayName',sprintf('MLSE',m),'Color',cols(i,:),'LineStyle',':','HandleVisibility',hv,'Marker','square');
|
|
%
|
|
% elseif m ==8
|
|
%
|
|
% plot(bitrate*1e-9,ber_vnle(i,:),'DisplayName',sprintf('Tx precomp + VNLE'),'Color',cols(i,:),'LineStyle','-','HandleVisibility','on','Marker','o');
|
|
% % plot(bitrate*1e-9,ber_mlse(i,:),'DisplayName',sprintf('MLSE',m),'Color',cols(i,:),'LineStyle',':','HandleVisibility',hv,'Marker','square');
|
|
%
|
|
% end
|
|
% yline(4.85e-3,'HandleVisibility','off');
|
|
% yline(2e-2,'HandleVisibility','off');
|
|
% xticks(bitrate_ticks);
|
|
% xlim([min(bitrate_ticks) max(bitrate_ticks)]);
|
|
% ylim([1e-4 0.3]);
|
|
% xlabel('Gross Bitrate in Gbps');
|
|
% % ylabel('BER')
|
|
% beautifyBERplot()
|
|
% set(gca, 'YScale', 'log');
|
|
%
|
|
%
|
|
% end
|
|
%
|
|
%
|
|
%
|
|
% figure()
|
|
% title(sprintf('%d km | 1310 nm | PAM %d | VNLE',uloops.link_length,uloops.M));
|
|
% hold on
|
|
% line([min(uloops.bitrate.*1e-9) max(uloops.bitrate.*1e-9)],[min(uloops.bitrate.*1e-9) max(uloops.bitrate.*1e-9)],'Color',[.7,.7,.7],'Marker','none','Handlevisibility','off');
|
|
% plot(uloops.bitrate.*1e-9,cellfun(@min, inf_rate_vnle).*uloops.bitrate./log2(uloops.M).*1e-9,'DisplayName',sprintf('AIR'),'Color',cols(1,:),'LineStyle',':');
|
|
% plot(uloops.bitrate.*1e-9,netRatesVNLE.SDHD.NetRate.*1e-9,'DisplayName',sprintf('SD+HD'),'Color',cols(2,:),'LineStyle',':');
|
|
% plot(uloops.bitrate.*1e-9,netRatesVNLE.HD.NetRate.*1e-9,'DisplayName',sprintf('HD'),'Color',cols(3,:),'LineStyle',':');
|
|
% plot(uloops.bitrate.*1e-9,netRatesVNLE.KP4_hamming.NetRate.*1e-9,'DisplayName',sprintf('KP4+Hamming'),'Color',cols(4,:),'LineStyle',':');
|
|
% beautifyBERplot()
|
|
% xlim([min(uloops.bitrate.*1e-9) max(uloops.bitrate.*1e-9)])
|
|
% xlabel('Gross Bitrate in Gbps');
|
|
% ylabel('Net Bitrate in Gbps');
|
|
% legend
|
|
|
|
|
|
% plot(uloops.bitrate.*1e-9,ber_vnle,'DisplayName',sprintf('NGMI MLSE; %d km',len),'Color',cols(1,:),'LineStyle','-');
|
|
% plot(uloops.bitrate.*1e-9,ber_dfe,'DisplayName',sprintf('NGMI MLSE; %d km',len),'Color',cols(1,:),'LineStyle','-');
|
|
% plot(uloops.bitrate.*1e-9,ber_mlse,'DisplayName',sprintf('NGMI MLSE; %d km',len),'Color',cols(1,:),'LineStyle','-');
|
|
% plot(uloops.bitrate.*1e-9,ber_db,'DisplayName',sprintf('NGMI VNLE; %d km',len),'Color',cols(2,:),'LineStyle','-');
|
|
%
|
|
% set(gca, 'YScale', 'log');
|
|
% ylim([1e-5, 0.1]);
|
|
% yline([3.8e-3;1e-2],'LineWidth',1,'HandleVisibility','off');
|
|
|
|
|
|
|
|
|
|
|
|
% for alpha = uloops.alpha
|
|
% for precode = uloops.db_precode
|
|
% for precomp = uloops.precomp
|
|
%
|
|
%
|
|
% cols = linspecer(6);%cbrewer2('Set2',10);
|
|
% cnt = 1;
|
|
% a = wh.getStoValue('ber',alpha,uloops.vnle_order2,uloops.vnle_order3,precomp, precode, uloops.bitrate,uloops.M);
|
|
%
|
|
%
|
|
% for i = 1:numel(a)
|
|
% ber_db(i) = mean((a{i}.ber_db));
|
|
% ber_vnle(i) = mean((a{i}.ber_vnle));
|
|
% ber_vnle_dfe(i) = mean((a{i}.ber_vnle_dfe));
|
|
% ber_mlse(i) = mean((a{i}.ber_mlse));
|
|
% pf_taps(i) = a{i}.pf_taps{1}(2);
|
|
% vnle_taps(i,:) = a{i}.eq_vnle{1}.e;
|
|
%
|
|
% figure(222)
|
|
%
|
|
%
|
|
% subplot(7,3,3*(i-1)+1)
|
|
% ylim([-0.5 1]);
|
|
% title(sprintf('%d GBps',uloops.bitrate(i).*1e-9));
|
|
% hold on
|
|
% stem(a{i}.eq_vnle{1}.e)
|
|
%
|
|
% subplot(7,3,3*(i-1)+2)
|
|
% ylim([-0.5 1]);
|
|
% title(sprintf('%d GBps',uloops.bitrate(i).*1e-9));
|
|
% hold on
|
|
% stem(a{i}.eq_vnle{1}.e2)
|
|
%
|
|
% subplot(7,3,3*(i-1)+3)
|
|
% ylim([-0.5 1]);
|
|
% title(sprintf('%d GBps',uloops.bitrate(i).*1e-9));
|
|
% hold on
|
|
% stem(a{i}.eq_vnle{1}.e3)
|
|
%
|
|
% showEQNoisePSD(a{i}.noise_vnle{1},"fignum",220,"displayname",sprintf('%d 2nd order taps; %d GBps',vnle_order2,uloops.bitrate(i).*1e-9),"postfilter_taps",a{i}.pf_taps{1});
|
|
%
|
|
% eq_sig = a{i}.signal_vnle{1};
|
|
%
|
|
%
|
|
% end
|
|
%
|
|
% figure()
|
|
% hold on
|
|
%
|
|
% if precomp
|
|
% lsty = '-';
|
|
% else
|
|
% lsty = '-';
|
|
% end
|
|
%
|
|
% if precode
|
|
% coloffset = 1;
|
|
% else
|
|
% coloffset=1;
|
|
% end
|
|
%
|
|
% % plot(uloops.bitrate,ber_mlse,'DisplayName',sprintf('Precomp: %d; Precode %d',precomp,precode),'Color',cols(cnt,:));
|
|
% title(sprintf('Precomp: %d; Precode %d',precomp,precode));
|
|
% plot(uloops.bitrate.*1e-9,ber_vnle,'DisplayName','VNLE','Color',cols(4,:),'LineStyle',lsty);
|
|
% plot(uloops.bitrate.*1e-9,ber_vnle_dfe,'DisplayName','VNLE+DFE','Color',cols(2,:),'LineStyle',lsty);
|
|
% plot(uloops.bitrate.*1e-9,ber_mlse,'DisplayName','VNLE+PF+MLSE','Color',cols(3,:),'LineStyle',lsty);
|
|
% plot(uloops.bitrate.*1e-9,ber_db,'DisplayName','DB tgt.','Color',cols(1,:),'LineStyle',lsty);
|
|
%
|
|
% cnt = cnt+1;
|
|
% yline([3.8e-3;1e-2],'LineWidth',1,'HandleVisibility','off');
|
|
% beautifyBERplot()
|
|
% end
|
|
% end
|
|
% end
|
|
%
|
|
%
|
|
%
|
|
% for vnle_order3 = uloops.vnle_order3([1,3,5,7,9,10])
|
|
% cnt = 0;
|
|
% for vnle_order2 = 3%= uloops.vnle_order2
|
|
% for precode = uloops.db_precode
|
|
% for precomp = uloops.precomp
|
|
%
|
|
%
|
|
% cols = linspecer(10);%cbrewer2('Set2',10);
|
|
% cnt = cnt+1;
|
|
% a = wh.getStoValue('ber',vnle_order2,vnle_order3,precomp, precode, uloops.bitrate,uloops.M);
|
|
%
|
|
%
|
|
% ber_db(cnt) = mean((a{1}.ber_db));
|
|
% ber_vnle(cnt) = mean((a{1}.ber_vnle));
|
|
% ber_vnle_dfe(cnt) = mean((a{1}.ber_vnle_dfe));
|
|
% ber_mlse(cnt) = mean((a{1}.ber_mlse));
|
|
% pf_taps(cnt) = a{1}.pf_taps{1}(2);
|
|
%
|
|
% showEQNoisePSD(a{1}.noise_vnle{1},"fignum",220,"displayname",sprintf('%d 3rd order taps; %d GBps',vnle_order3,uloops.bitrate(i).*1e-9));
|
|
%
|
|
% eq_sig = a{1}.signal_vnle{1};
|
|
%
|
|
%
|
|
% end
|
|
% end
|
|
% end
|
|
%
|
|
% figure(180)
|
|
% hold on
|
|
% scatter(uloops.vnle_order2,ber_mlse,'MarkerEdgeColor',cols(vnle_order3,:),'LineWidth',1,'DisplayName',sprintf('%d 3rd order taps',vnle_order3));
|
|
% ylim([1e-3 0.5]);
|
|
%
|
|
% end
|
|
% title(sprintf('%d GBps',uloops.bitrate(i).*1e-9));
|
|
% ylabel('BER');
|
|
% xlabel('VNLE 2nd order taps');
|
|
% yline([3.8e-3;1e-2],'LineWidth',1,'HandleVisibility','off');
|
|
% beautifyBERplot()
|
|
|
|
% r = 1;
|
|
% for rate = uloops.bitrate
|
|
%
|
|
% i = 1;
|
|
% for alpha = uloops.alpha
|
|
% cols = linspecer(7);%cbrewer2('Set2',10);
|
|
% cnt = 1;
|
|
% a = wh.getStoValue('ber',alpha,uloops.vnle_order2,uloops.vnle_order3,precomp, precode, rate,uloops.M);
|
|
% ber_mlse(i) = mean((a{1}.ber_mlse));
|
|
% pf_taps(i) = a{1}.pf_taps{1}(2);
|
|
% i = i+1;
|
|
% end
|
|
%
|
|
% figure(150)
|
|
% hold on
|
|
% scatter(pf_taps(1),ber_mlse(1),200,'DisplayName','Burg','MarkerEdgeColor',cols(r,:),'Marker','x','LineWidth',2,'HandleVisibility','off');
|
|
% plot(uloops.alpha(2:end),ber_mlse(2:end),'DisplayName',sprintf('%d GBps',rate.*1e-9),'Color',cols(r,:),'LineStyle','-');
|
|
% r=r+1;
|
|
%
|
|
% end
|
|
%
|
|
%
|
|
% % title(sprintf('%d GBps',uloops.bitrate.*1e-9));
|
|
% ylabel('BER');
|
|
% xlabel('Alpha');
|
|
% yline([3.8e-3;1e-2],'LineWidth',1,'HandleVisibility','off');
|
|
% beautifyBERplot()
|
|
%
|
|
%
|
|
%
|
|
% figure(2024)
|
|
% hold on
|
|
% for j = 1:numel(uloops.vnle_order3)
|
|
% all2nd = wh.getStoValue('ber',uloops.vnle_order3(j), uloops.vnle_order2, uloops.bitrate,uloops.M);
|
|
% for i = 1:numel(a)
|
|
% ber_mlse(i) = all2nd{i}.ber_mlse;
|
|
% ber_vnle(i) = all2nd{i}.ber_vnle;
|
|
% pf_taps(:,i) = all2nd{i}.pf_taps;
|
|
%
|
|
% end
|
|
% plot(uloops.vnle_order2,ber_mlse,'DisplayName',sprintf('%d 3rd order',uloops.vnle_order3(j)));
|
|
% end
|
|
%
|
|
% yline(3.8e-3,'LineWidth',2,'DisplayName','3.8e-3');
|
|
% yline(2e-2,'LineWidth',2,'LineStyle','--','DisplayName','2e-2');
|
|
% beautifyBERplot()
|
|
% legend
|
|
%
|
|
% figure(2025)
|
|
% clf; % Clear figure so we start fresh
|
|
%
|
|
% numJ = numel(uloops.vnle_order3);
|
|
% numI = numel(uloops.vnle_order2);
|
|
% ber_mlse_mat = zeros(numJ, numI);
|
|
%
|
|
% % Gather data into a 2D matrix
|
|
% for j = 1:numJ
|
|
% all2nd = wh.getStoValue('ber', uloops.vnle_order3(j), uloops.vnle_order2, uloops.bitrate, uloops.M);
|
|
% for i = 1:numI
|
|
% ber_mlse_mat(j,i) = all2nd{i}.ber_mlse;
|
|
% end
|
|
% end
|
|
%
|
|
% % Create a 2D plot
|
|
% % 'imagesc' displays the matrix as an image with a colorbar.
|
|
% imagesc(uloops.vnle_order2, uloops.vnle_order3, ber_mlse_mat);
|
|
% set(gca,'YDir','normal'); % Ensure that lower vnle_order3 is at the bottom
|
|
% colorbar; % Add a colorbar to show BER scale
|
|
%
|
|
% xlabel('VNLE Order 2');
|
|
% ylabel('VNLE Order 3');
|
|
% title('BER MLSE as a function of VNLE Orders');
|
|
%
|
|
% % If you want to highlight certain BER levels, you can add contour lines:
|
|
% hold on;
|
|
% [C,h] = contour(uloops.vnle_order2, uloops.vnle_order3, ber_mlse_mat, [3.8e-3, 2e-2], 'LineWidth',2,'LineColor','k');
|
|
% clabel(C,h,'Color','k','FontWeight','bold');
|
|
%
|
|
% beautifyBERplot();
|
|
% legend('BER contour lines'); |