Minor Changes and Lab Preps

This commit is contained in:
Silas [Labor]
2024-09-24 11:30:25 +02:00
parent 0f0b4d2c66
commit 9571f73b24
5 changed files with 203 additions and 3 deletions

View File

@@ -0,0 +1,59 @@
%% Parameter to simulate and save
params = struct;
params.M = [4];
params.datarate = [300];
params.rop = [0];
precomp_mode = 2; %0=do nothing ; 1= measure; 2=precomp active
if ismac
precomp_path = "/Users/silasoettinghaus/Documents/MATLAB/imdd_simulation/projects/standard_system";
else
precomp_path = "C:\Users\Silas\Documents\MATLAB\imdd_simulation\projects\standard_system\";
end
precomp_fn = "400G_simulative_setup";
usemrds = 0;
name = ['wh_',strrep(num2str(now),'.','')];
wh = DataStorage(params);
wh.addStorage("ber_ffe");
%% Init Params
link_length = 0; %meter
pn_key = 2;
laser_linewidth = 0;
endcnt = prod(wh.dim);
cnt=0;
disp(['Start Simulation of ',num2str(endcnt),' loops...'])
tic
% SETUP HERE: %%
fsym = 92e9;
Symbols = Informationsignal(digi_mod_out',"fs",92e9);
Scpe_sig = Electricalsignal(awg2scope_keysight_out.no1',"fs",160e9);
Scpe_sig = Scpe_sig.resample("fs_in",160e9,"fs_out",2*92e9);
Bits = Informationsignal(prms_out',"fs",92e9);
%%%%%% Sync Rx signal with reference %%%%%%
[Scpe_sig,S] = Scpe_sig.tsynch("reference",Symbols,"fs_ref",fsym);
%%%%% EQUALIZE %%%%%%
% Eq = FFE("epochs_tr",5,"epochs_dd",5,"len_tr",4096*2,"mu_dd",1e-4,"mu_tr",0,"order",25,"sps",2,"decide",1);
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_sig] = Eq.process(Scpe_sig,Symbols);
Rx_bits = PAMmapper(M,0).demap(EQ_sig);
[~,errors_bm,ber_ffe,errors] = calc_ber(Rx_bits.signal,Bits.signal,"skip_front",100,"skip_end",150,"returnErrorLocation",1);
disp(['BER: ',sprintf('%.1E',ber_ffe),' - - - ',num2str(fsym*1e-9),' GBd']);

View File

@@ -6,7 +6,7 @@ params.M = [4];
params.datarate = [300];
params.rop = [0];
precomp_mode = 2; %0=do nothing ; 1= measure; 2=precomp active
precomp_mode = 0; %0=do nothing ; 1= measure; 2=precomp active
if ismac
precomp_path = "/Users/silasoettinghaus/Documents/MATLAB/imdd_simulation/projects/standard_system";
@@ -148,7 +148,7 @@ for M = wh.parameter.M.values
%%%%%% Sync Rx signal with reference %%%%%%
[Scpe_sig,D,cuts] = Scpe_sig.tsynch("reference",Symbols,"fs_ref",fsym);
[Scpe_sig,S] = Scpe_sig.tsynch("reference",Symbols,"fs_ref",fsym);
%%%%% EQUALIZE %%%%%%