Equalizer with different DC removal positions

This commit is contained in:
Silas Oettinghaus
2023-09-29 08:18:22 +02:00
parent 8b3bc688dd
commit fce274c4cf
6 changed files with 443 additions and 326 deletions

View File

@@ -1,73 +1,48 @@
clear
clear
sir_loop = [-22:1.5:-15];
sir_loop = [-25:2:-13];
sir_loop = 0;
lw_loop = [1,2,3];
%dc_tap_loop = [0.001 0.005 0.01 0.05 0.1 0.25];
bw_loop = [1:10];
lw_loop = [0e6:0.2e6:1e6 2e6:2e6:10e6 20e6:20e6:100e6];
data = cell(length(sir_loop),length(bw_loop),length(lw_loop));
data = cell(length(sir_loop),length(lw_loop));
iterations=size(data);
for ix = 1:numel(data)
parfor ix = 1:numel(data)
[u1,u2,u3] = ind2sub(iterations,ix);
[u1,u2] = ind2sub(iterations,ix);
output = imddmodel(sir_loop(u1),bw_loop(u2),lw_loop(u3));
output = imddmodel(sir_loop(u1),lw_loop(u2));
data{ix} = output;
% ber(ix) = BER.ber;
% ber_a1(ix) = BER.ber_a1;
disp(ix)
end
%% Plot Winlen Contour
hdfec = 3.8e-3.*ones(size(sir_loop));
for dc = 1:size(data,2)
for lw = 1:size(data,3)
for s = 1:size(data,1)
ber_lvlp(s,dc,lw) = data{s,dc,lw}.ber_dcsm;
% ber_dcsm(wl,lw,s) = data{wl,s,lw}.ber_dcsm;
end
a_bm = InterX([sir_loop;squeeze(ber_lvlp(:,dc,lw))'],[sir_loop;hdfec]);
% a_dcsm = InterX([sirloop;squeeze(ber_dcsm(wl,lw,:))'],[sirloop;hdfec]);
try
thres_a0(dc,lw) = -a_bm(1);
%thres_a1(wl,lw) = -a_dcsm(1);
catch
thres_a0(dc,lw) = NaN;
%thres_a1(wl,lw) = NaN;
end
for sir = 1:size(data,1)
for lw = 1:size(data,2)
ber_bm(sir,lw) = data{sir,lw}.ber_bm;
ber_dcsm(sir,lw) = data{sir,lw}.ber_dcsm;
ber_lvsm(sir,lw) = data{sir,lw}.ber_lvsm;
ber_lvlp(sir,lw) = data{sir,lw}.ber_lvlp;
end
end
figure(1)
contour(lw_loop,bw_loop,thres_a0,14:0.2:21,'LineWidth',1.5,'FaceAlpha',0.3,'ShowText','on',"LabelFormat","%0.1f dB");
a = flip(cbrewer2('seq','Spectral',32));
a = [a(1:12,:); a(22:end,:)];
colormap(a);
clim([16 21]);
ylabel("Window Length");
xlabel("Linewidth in MHz");
yticks(bw_loop);
yticklabels(bw_loop);
col = [ 0.6510 0.8078 0.8902
0.6980 0.8745 0.5412
0.9922 0.7490 0.4353];
figure(22)
for l = 1:numel(lw_loop)
hold on
plot(sir_loop,ber_bm(:,l),'DisplayName',['DC mode:', num2str(lw_loop(l)),', Linewidth= 50 MHz'],'Marker','o','MarkerFaceColor',col(l,:),'Color',col(l,:),'LineWidth',2,'LineStyle','--');
end
set(gca,'yscale','log');
set(gca,'xscale','log');
grid minor
yline(3.8e-3,'LineWidth',2,'LineStyle','--','HandleVisibility','off');
set(gca,'xdir','reverse');
%% Plot
%% Plot
col = linspecer(8);
figure(1)
hold on
@@ -122,6 +97,43 @@ title("MPI removal - Optimization of Averaging Window Length")
%% Plot Winlen Contour
hdfec = 3.8e-3.*ones(size(sir_loop));
for dc = 1:size(data,2)
for lw = 1:size(data,3)
for s = 1:size(data,1)
ber_lvlp(s,dc,lw) = data{s,dc,lw}.ber_dcsm;
% ber_dcsm(wl,lw,s) = data{wl,s,lw}.ber_dcsm;
end
a_bm = InterX([sir_loop;squeeze(ber_lvlp(:,dc,lw))'],[sir_loop;hdfec]);
% a_dcsm = InterX([sirloop;squeeze(ber_dcsm(wl,lw,:))'],[sirloop;hdfec]);
try
thres_a0(dc,lw) = -a_bm(1);
%thres_a1(wl,lw) = -a_dcsm(1);
catch
thres_a0(dc,lw) = NaN;
%thres_a1(wl,lw) = NaN;
end
end
end
figure(1)
contour(lw_loop,bw_loop,thres_a0,14:0.2:21,'LineWidth',1.5,'FaceAlpha',0.3,'ShowText','on',"LabelFormat","%0.1f dB");
a = flip(cbrewer2('seq','Spectral',32));
a = [a(1:12,:); a(22:end,:)];
colormap(a);
clim([16 21]);
ylabel("Window Length");
xlabel("Linewidth in MHz");
yticks(bw_loop);
yticklabels(bw_loop);
set(gca,'yscale','log');
set(gca,'xscale','log');
grid minor
@@ -167,7 +179,7 @@ end
xlabel("DC Tap Value");
ylabel("Required SIR to rech FEC in dB");
%%
%%
col = linspecer(7);
figure(3)
cnt=1;
@@ -182,7 +194,7 @@ for lw = [1,2,11]
yline(3.8e-3,'LineWidth',2,'LineStyle','--','HandleVisibility','off');
set(gca,'yscale','log');
grid minor
xlim([15,30]);
ylim([1e-4,1e-2]);
xlabel("SIR in dB");