Add AWGN channel models and route IMDD simulation through them

This commit is contained in:
Silas Oettinghaus
2026-03-26 11:23:07 +01:00
parent d3235a5c9c
commit c135cb76b1
7 changed files with 167 additions and 68 deletions

View File

@@ -15,7 +15,7 @@ close all;
if 1
uloops = struct;
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];
@@ -23,30 +23,36 @@ if 1
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.channel_alpha = [0.5];
uloops.duob_mode = db_mode.no_db;
uloops.decoding_mode = "memoryless";
uloops.channel_mode = "awgn_alphad";
uloops.channel_snr_dB = [20:-2:0];
wh = DataStorage(uloops);
wh.addStorage("ber");
wh = submit_handle(@imdd_model,wh,"parallel",0);
wh = submit_handle(@imdd_model,wh,"parallel",1);
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');
for alpha = uloops.channel_alpha
a=wh.getStoValue('ber',0, [300].*1e9 , 1293, 4, uloops.link_length,alpha,uloops.duob_mode,uloops.decoding_mode,uloops.channel_mode,uloops.channel_snr_dB);
gmi_ffe = cellfun(@(x) x.ffe_results.metrics.GMI, a);
alpha_ffe = cellfun(@(x) x.ffe_results.metrics.Alpha, a);
gmi_mlse = cellfun(@(x) x.mlse_results.metrics.GMI, a);
plot(uloops.channel_snr_dB,gmi_ffe,'DisplayName',sprintf(''),'LineStyle','-','HandleVisibility','on');
plot(uloops.channel_snr_dB,gmi_mlse,'DisplayName',sprintf(''),'LineStyle','-','HandleVisibility','on');
end
set(gca, 'YScale', 'log');
ylim([5e-5 0.4]);
yline([3.8e-3, 2e-2],'HandleVisibility','off');
% ylim([5e-5 0.5]);
% yline([3.8e-3, 2e-2],'HandleVisibility','off');
legend
beautifyBERplot()
ylabel('BER');