small updates from work pc
try to implement kalman filter for MPI mitigation
This commit is contained in:
@@ -2,21 +2,21 @@
|
||||
%% Parameter to simulate and save
|
||||
params = struct;
|
||||
|
||||
params.M = [6];
|
||||
params.datarate = [448];
|
||||
params.M = [4];
|
||||
params.datarate = [300];
|
||||
params.rop = [0];
|
||||
|
||||
precomp_mode = 0; %0=do nothing ; 1= measure; 2=precomp active
|
||||
postfilter = 1; % noise whiten. approach -> Postfilter + MLSE
|
||||
postfilter = 0; % noise whiten. approach -> Postfilter + MLSE
|
||||
|
||||
db_precode = 0;
|
||||
db_encode = 0;
|
||||
db_channelapproach = 0;
|
||||
|
||||
laser_linewidth = 1e6;
|
||||
laser_linewidth = 5e6;
|
||||
random_key_sequence = 2;
|
||||
random_key_laser_phase = 4;
|
||||
sir = 25;
|
||||
random_key_laser_phase = 11;
|
||||
sir = 20;
|
||||
|
||||
if ismac
|
||||
precomp_path = "/Users/silasoettinghaus/Documents/MATLAB/imdd_simulation/projects/standard_system";
|
||||
@@ -25,6 +25,7 @@ else
|
||||
end
|
||||
|
||||
precomp_fn = "400G_simulative_setup";
|
||||
|
||||
usemrds = 0;
|
||||
|
||||
name = ['wh_',strrep(num2str(now),'.','')];
|
||||
@@ -56,7 +57,7 @@ for M = wh.parameter.M.values
|
||||
% MAIN SIGNAL
|
||||
|
||||
%%%%% Symbol Generation MAIN %%%%%%
|
||||
[Digi_sig,Symbols,Bits] = PAMsource("fsym",fsym,"M",M,"order",18,"useprbs",0,...
|
||||
[Digi_sig,Symbols,Bits] = PAMsource("fsym",fsym,"M",M,"order",18,"useprbs",1,...
|
||||
"fs_out",M8199.fdac,"applyclipping",1,"clipfactor",1.5,...
|
||||
"applypulseform",0,"pulseformer",Pform,"randkey",random_key_sequence,...
|
||||
"db_precode",db_precode,"db_encode",db_encode,...
|
||||
@@ -80,7 +81,7 @@ for M = wh.parameter.M.values
|
||||
Digi_sig_I = ChannelFreqResp("Nacq",1024,"Navg",64,"Ncp",63,'f_ref',Digi_sig_I.fs).precomp(Digi_sig_I,'maxampdb',1,'loadPath',precomp_path,'fileName',precomp_fn);
|
||||
Digi_sig.spectrum("fignum",11,"displayname",'after precomp');
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
%%%%% AWG MAIN %%%%%%
|
||||
@@ -122,7 +123,7 @@ for M = wh.parameter.M.values
|
||||
Optfilter = Filter('filtdegree',6,"f_cutoff",fsym.*0.7,"fs",fdac*kover,"filterType",filtertypes.gaussian,"active",true);
|
||||
Opt_sig_I = Optfilter.process(Opt_sig_I);
|
||||
Opt_sig_I = Amplifier("amp_mode","ideal_no_noise","gain_mode","output_power","amplification_db",0).process(Opt_sig_I);
|
||||
|
||||
|
||||
|
||||
%%%%% Interference Signal Fiber Prop 2x fiber length %%%%%%
|
||||
Opt_sig_I_prop = Fiber("fsimu",Opt_sig_I.fs,"fiber_length",2*link_length/1000,"alpha",0.3,"D",0,"lambda0",1310,"gamma",0,"Dslope",0.07).process(Opt_sig_I);
|
||||
@@ -171,7 +172,7 @@ for M = wh.parameter.M.values
|
||||
freqresp.plot();
|
||||
end
|
||||
|
||||
Scpe_sig.spectrum("displayname",'After Scope','fignum',123434);
|
||||
%Scpe_sig.spectrum("displayname",'After Scope','fignum',123434);
|
||||
|
||||
%%%%%% Sample to 2x fsym %%%%%%
|
||||
Scpe_sig = Scpe_sig.resample("fs_in",fadc,"fs_out",2*fsym);
|
||||
@@ -183,33 +184,43 @@ for M = wh.parameter.M.values
|
||||
Eq = FFE("epochs_tr",5,"epochs_dd",5,"len_tr",4096*2,"mu_dd",1e-4,"mu_tr",0,"order",25,"sps",2,"decide",0);
|
||||
%Eq = VNLE("epochs_tr",5,"epochs_dd",5,"len_tr",4096*2,"mu_dd",[0.0004 0.0005 0.0006],"mu_tr",0,"order",[50,7,7],"sps",2,"decide",1);
|
||||
|
||||
Eq = EQ("Ne",[50,7,7],"Nb",[0,0,0],"training_length",4096*2,"training_loops",5,"dd_loops",5,"K",2,"DCmu",0.05,"DDmu",[0.0004 0.0004 0.0004 0.0004 ],"DFEmu",0.005,"FFEmu",0,"plotfinal",0,"ideal_dfe",1);
|
||||
|
||||
Eq = FFE_Kalman("epochs_tr",5,"epochs_dd",5,"len_tr",4096*2,"mu_dd",1e-4,"mu_tr",0,"order",25,"sps",2,"decide",0);
|
||||
|
||||
% Eq = FFE_Kalman_Feedback("epochs_tr",5,"epochs_dd",5,"len_tr",4096*2,"mu_dd",1e-4,"mu_tr",0,"order",25,"sps",2,"decide",0);
|
||||
|
||||
% Eq = FFE_adaptive_decision("epochs_tr",5,"epochs_dd",5,"len_tr",4096*2,"mu_dd",1e-4,"mu_tr",0,"order",25,"sps",2,"decide",1,"buffer_length",80);
|
||||
|
||||
Eq = FFE_DCremoval("epochs_tr",5,"epochs_dd",5,"len_tr",4096*2,"mu_dd",1e-4,"mu_tr",0,"order",25,"sps",2,"decide",0,"mu_dc",0.05,"dc_buffer_len",100);
|
||||
|
||||
if db_channelapproach
|
||||
% ref symbols and transm. sequence are precoded
|
||||
[EQ_sig, Noi] = Eq.process(Scpe_sig,Duobinary().encode(Symbols));
|
||||
else
|
||||
[EQ_sig, Noi] = Eq.process(Scpe_sig,Symbols);
|
||||
end
|
||||
|
||||
if db_encode || db_channelapproach
|
||||
EQ_sig = MLSE("DIR",[1,1],"duobinary_output",1,"M",M,"trellis_states",PAMmapper(M,0).levels).process(EQ_sig);
|
||||
EQ_sig = Duobinary().decode(EQ_sig);
|
||||
end
|
||||
|
||||
if postfilter
|
||||
% Noi.spectrum("displayname",'Noise Spectrum','fignum',1234);
|
||||
% EQ_sig.spectrum("displayname","Signal Spectrum","fignum",1234);
|
||||
|
||||
elseif db_encode
|
||||
|
||||
[EQ_sig, Noi] = Eq.process(Scpe_sig,Symbols);
|
||||
EQ_sig = MLSE("DIR",[1,1],"duobinary_output",1,"M",M,"trellis_states",PAMmapper(M,0).levels).process(EQ_sig);
|
||||
EQ_sig = Duobinary().decode(EQ_sig);
|
||||
|
||||
elseif postfilter
|
||||
|
||||
[EQ_sig, Noi] = Eq.process(Scpe_sig,Symbols);
|
||||
|
||||
nc = 2;
|
||||
burg_coeff = arburg(Noi.signal,nc);
|
||||
|
||||
|
||||
EQ_sig = EQ_sig.filter(burg_coeff,1);
|
||||
|
||||
|
||||
% EQ_sig.spectrum("displayname","Signal Spectrum after Postfilter","fignum",1234);
|
||||
tic
|
||||
EQ_sig = MLSE("DIR",burg_coeff,"duobinary_output",0,"M",M,"trellis_states",PAMmapper(M,0).levels).process(EQ_sig);
|
||||
toc
|
||||
% EQ_sig.spectrum("displayname","Signal Spectrum after MLSE","fignum",1234);
|
||||
|
||||
|
||||
if 1
|
||||
Noi.spectrum('displayname','Noise PSD','fignum',123)
|
||||
[h,w] = freqz(1,burg_coeff,length(Noi),"whole",Noi.fs);
|
||||
@@ -218,12 +229,24 @@ for M = wh.parameter.M.values
|
||||
w_ = (w - Noi.fs/2);
|
||||
plot(w_.*1e-9,20*log10(fftshift(h)),'DisplayName',['', num2str(nc), ' coefficients for burg alg.']);
|
||||
end
|
||||
|
||||
|
||||
else
|
||||
|
||||
[EQ_sig, Noi] = Eq.process(Scpe_sig,Symbols);
|
||||
|
||||
if 0
|
||||
Noi.spectrum('displayname','Noise PSD','fignum',123)
|
||||
EQ_sig.plot("displayname",'After EQ','fignum',1112);
|
||||
end
|
||||
end
|
||||
|
||||
Rx_bits = PAMmapper(M,0).demap(EQ_sig);
|
||||
[~,errors_bm,ber_ffe(i),errors] = calc_ber(Rx_bits.signal,Bits.signal,"skip_front",100,"skip_end",150,"returnErrorLocation",1);
|
||||
disp(['BER: ',sprintf('%.1E',ber_ffe(i)),' - - ROP: ',num2str(patten(i)),'dBm - - PAM-',num2str(M),' - - ',num2str(fsym*1e-9),' GBd']);
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
for i = 1:i_
|
||||
@@ -255,7 +278,9 @@ figure(44);
|
||||
a = gca;
|
||||
hold on; % Retain the plot so new points can be added without complete redraw
|
||||
|
||||
plot(wh.parameter.rop.values,ber_ffe,"LineWidth",0.5,"LineStyle","-","Marker",".","MarkerSize",15,"DisplayName","FFE only");
|
||||
dispname = ['Linewidth: ',num2str(laser_linewidth.*1e-6),' MHz'];
|
||||
|
||||
plot(wh.parameter.rop.values,ber_ffe,"LineWidth",0.5,"LineStyle","-","Marker",".","MarkerSize",15,"DisplayName",dispname);
|
||||
yline(3.8e-3,'DisplayName','HD-FEC','LineStyle','--','HandleVisibility','off');
|
||||
xlabel('Received Optical Power (dBm)');
|
||||
ylabel('Bit Error Rate (BER)');
|
||||
|
||||
Reference in New Issue
Block a user