diff --git a/projects/FSO_transmission/first_analysis.m b/projects/FSO_transmission/first_analysis.m index c535c19..c47a2b1 100644 --- a/projects/FSO_transmission/first_analysis.m +++ b/projects/FSO_transmission/first_analysis.m @@ -81,9 +81,23 @@ Pform = Pulseformer("fsym",fsym,"fdac",2*fsym,"pulse","rrc","pulselength",16,"al Rx_matched = Pform.process(Scope_sig); Rx_matched.spectrum("displayname",'Signal after matched filter','fignum',1); -% timing sync -> at this point we still have no symbol timing recovery, we -% try to do this with 2sps EQ! -[~,Rx_synced_cell,inverted,sequenceFound,sequenceStarts] = Rx_matched.tsynch("reference", Symbols, "fs_ref", fsym, "debug_plots", 1); + +%% + +sys = comm.SymbolSynchronizer('TimingErrorDetector', 'Gardner (non-data-aided)', ... + 'SamplesPerSymbol', 2, ... + 'DampingFactor', 0.7, ... + 'NormalizedLoopBandwidth', 0.01); +Rx_symbolsync = Rx_matched; +[Rx_symbolsync.signal, timing_error] = sys(Rx_matched.signal); + +plot(timing_error); % If this is a ramp, you have drift! + +%% timing sync -> at this point we still have no symbol timing recovery, we +% % try to do this with 2sps EQ! + +[~,Rx_synced_cell,inverted,sequenceFound,sequenceStarts] = Rx_symbolsync.tsynch("reference", Symbols, "fs_ref", fsym, "debug_plots", 1); + %% not working.. Rx_synced = Rx_synced_cell{1}; @@ -136,6 +150,22 @@ mlse_ = MLSE("duobinary_output",0,'M',M,'trellis_states',PAMmapper(M,0,"eth_styl [vnle_results, mlse_results] = vnle_postfilter_mlse(eq_v, pf_, mlse_, M, Rx_synced, Symbols, Bits, ... "precode_mode", duob_mode, 'showAnalysis', 1, "postFFE", [], "eth_style_symbol_mapping", mapping_style); -mlse_results.metrics.print +mlse_results.metrics.print("description",'MLSE') fprintf('My EQ: %.1e \n',mlse_results.metrics.BER); -fprintf('Paper: %.1e \n \n',ber_in_paper); \ No newline at end of file +fprintf('Paper: %.1e \n \n',ber_in_paper); + +%% -------------------- DB target -------------------- +mlse_db_ = MLSE("DIR",[1,1],"duobinary_output",0,"M",M,'trellis_states',PAMmapper(M,0).levels); + +eq_ = EQ("Ne",[50, 5, 5],"Nb",[0,0,0],"training_length",len_tr,"training_loops",5,"dd_loops",5, ... + "K",2,"DCmu",mu_dc,"DDmu",[mu_ffe mu_dfe],"DFEmu",0.005,"FFEmu",0,"plotfinal",0,"ideal_dfe",1); + +dbt_results = duobinary_target(eq_,mlse_db_, M, Rx_synced, Symbols, Bits, ... + "precode_mode", duob_mode, 'showAnalysis', 0, "postFFE", [],"eth_style_symbol_mapping",mapping_style); + +dbt_results.metrics.print("description",'Duobinary'); +mlse_results.metrics.print +fprintf('My EQ: %.1e \n',dbt_results.metrics.BER); +fprintf('Paper: %.1e \n \n',ber_in_paper); + + diff --git a/projects/WDM/WDM_auswertung.m b/projects/WDM/WDM_auswertung.m index 4c213fa..98b42b9 100644 --- a/projects/WDM/WDM_auswertung.m +++ b/projects/WDM/WDM_auswertung.m @@ -1,7 +1,58 @@ -filename = "C:\Users\Silas\Documents\MATLAB\Datensätze\FWM_2025\WDM_20260106_131152_n261_14408161_10km_16ch_400ghz_co_alpha0_5.mat"; -filename = "C:\Users\Silas\Documents\MATLAB\Datensätze\FWM_2025\WDM_20260106_131152_n262_14408165_10km_16ch_400ghz_co_alpha-0_5.mat"; -filename = "C:\Users\Silas\Documents\MATLAB\Datensätze\FWM_2025\WDM_20260106_134921_n223_14409338_10km_16ch_400ghz_co_alpha0_0.mat"; -res = load(filename,'res'); + +base = "C:\Users\Silas\Nextcloud\Cluster"; +all_files = dir(fullfile(base, "**/*.mat")); + +schemes = ["co","pair","alt","seg"]; + +% Preallocate as table (minimal + convenient) +T = table('Size',[0 10], ... + 'VariableTypes', ["string","string","string","datetime","double","double","double","double","double","double"], ... + 'VariableNames', ["folder","file","scheme","date","node","jobid","L_km","Nch","df_GHz","alpha"]); + +% filename parser +rx = "^WDM_(?\d{8})_(?