116 lines
4.3 KiB
Matlab
116 lines
4.3 KiB
Matlab
dsp_options.append_to_db = false;
|
|
dsp_options.max_occurences = 1;
|
|
dsp_options.mode = "load_run_id";
|
|
experiment = "highspeed_2024";
|
|
|
|
if dsp_options.mode == "load_run_id"
|
|
|
|
dsp_options.load_file_path = [];
|
|
if experiment == 'highspeed_2024'
|
|
|
|
dsp_options.database_path = 'C:\Users\Silas\Documents\MATLAB\Datensätze\sioe_labor\silas_labor_newdsp_newstructure.db';
|
|
dsp_options.storage_path = 'Z:\2024\sioe_labor\';
|
|
db = DBHandler("pathToDB", [dsp_options.database_path], "type", "sqlite");
|
|
|
|
elseif 'mpi_ecoc_2025'
|
|
|
|
dsp_options.database_path = []; %sqlite im netzwerk
|
|
dsp_options.storage_path = 'Z:\2025\ECOC Silas\ecoc_2025\';
|
|
db = DBHandler("pathToDB", [dsp_options.database_path], "type", "mysql");
|
|
|
|
end
|
|
|
|
|
|
elseif dsp_options.mode == "load_files"
|
|
|
|
dsp_options.load_file_path.tx_bits_path = "Z:\2025\ECOC Silas\ecoc_2025\mpi_opti_1000m_pam2 4 6 8\20250417_091513_PAM_4_R_112_bits.mat"';
|
|
dsp_options.load_file_path.tx_symbols_path = "Z:\2025\ECOC Silas\ecoc_2025\mpi_opti_1000m_pam2 4 6 8\20250417_091513_PAM_4_R_112_symbols.mat"';
|
|
dsp_options.load_file_path.rx_raw_path = "Z:\2025\ECOC Silas\ecoc_2025\mpi_opti_1000m_pam2 4 6 8\20250417_091525_PAM_4_R_112_rec01_rx_signal_raw.mat"';
|
|
|
|
elseif dsp_options.mode == "simulate"
|
|
|
|
error('Not yet implemented')
|
|
|
|
end
|
|
|
|
|
|
%% === Define Database Filters ===
|
|
|
|
if experiment == 'highspeed_2024'
|
|
|
|
fp = QueryFilter();
|
|
db = db.getDistinctValues;
|
|
%fp.where('Runs', 'run_id','EQUALS', 3);
|
|
fp.where('Runs', 'pam_level','EQUALS', 4);
|
|
allrates = string(num2str(sort(db.distinctValues.Runs.bitrate.*1e-9)));
|
|
fp.where('Runs', 'bitrate','EQUALS',390e9);
|
|
alllengths = string(num2str(sort(db.distinctValues.Runs.fiber_length)));
|
|
fp.where('Runs', 'fiber_length','EQUALS', 1);
|
|
fp.where('Runs', 'is_mpi','EQUALS', 0);
|
|
% fp.where('Runs', 'interference_path_length','EQUALS', 1000);
|
|
% fp.where('Runs', 'loop_id','GREATER_THAN', 11);
|
|
% fp.where('Runs', 'sir','EQUALS',18);
|
|
fp.where('Runs', 'wavelength','EQUALS', 1310);
|
|
fp.where('Runs', 'db_mode','EQUALS', 0);
|
|
% fp.where('Runs', 'rop_attenuation','EQUALS', 0);
|
|
fp.where('Runs', 'power_pd_in','GREATER_THAN', 7);
|
|
|
|
elseif experiment == 'mpi_ecoc_2025'
|
|
|
|
fp = QueryFilter();
|
|
%fp.where('Runs', 'run_id','EQUALS', 3);
|
|
fp.where('Runs', 'pam_level','EQUALS', 4);
|
|
fp.where('Runs', 'bitrate','EQUALS',224e9);
|
|
fp.where('Runs', 'is_mpi','EQUALS', 1);
|
|
fp.where('Runs', 'interference_path_length','EQUALS', 1000);
|
|
% fp.where('Runs', 'loop_id','GREATER_THAN', 11);
|
|
fp.where('Runs', 'sir','EQUALS',18);
|
|
fp.where('Runs', 'wavelength','EQUALS', 1310);
|
|
fp.where('Runs', 'db_mode','EQUALS', 0);
|
|
% fp.where('Runs', 'rop_attenuation','EQUALS', 0);
|
|
fp.where('Runs', 'power_pd_in','GREATER_THAN', 7);
|
|
% fp.where('Runs', 'loop_id','EQUALS', 14);
|
|
|
|
end
|
|
|
|
|
|
% === Queue from DB ===
|
|
[dataTable,~] = db.queryDB(fp, db.getTableFieldNames('Runs'));
|
|
|
|
% === Adapt or filter Matlab Table ===
|
|
% [~, unique_indices] = unique(dataTable.sir, 'first');
|
|
% dataTable = dataTable(unique_indices, :);
|
|
|
|
|
|
% === Set LOOPS & Initialize DataStorage ===
|
|
dsp_options.parameters = struct();
|
|
% dsp_options.parameters.adaption = [3];
|
|
% dsp_options.parameters.mu_tr = 0.999;%[0,logspace(-4,0,10)];
|
|
% dsp_options.parameters.mu_dd = [logspace(-0.004,0,20)];
|
|
% dsp_options.parameters.use_dd_mode = [1];
|
|
|
|
wh = DataStorage(dsp_options.parameters);
|
|
wh.addStorage("ffe_package");
|
|
wh.addStorage("mlse_package");
|
|
wh.addStorage("vnle_package");
|
|
wh.addStorage("dbtgt_package");
|
|
wh.addStorage("dbenc_package");
|
|
|
|
|
|
% === RUN IT ===
|
|
% run this function: dsp_runid(run_id, options)
|
|
[results,wh] = submitJobs(dataTable.run_id, dsp_options, "serial", 'wh', wh, 'waitbar', false);
|
|
|
|
|
|
%%
|
|
BERs = cellfun(@(c) c.ffe_package{1,1}.metrics.BER, results);
|
|
figure
|
|
hold on
|
|
plot(dsp_options.parameters.mu_dd,BERs,'Marker','+')
|
|
yline([2.2e-4,4.85e-3,2e-2],'HandleVisibility', 'off','LineWidth',1,'LineStyle','--');
|
|
set(gca, 'YScale', 'log'); % BER is usually plotted log-scale
|
|
xlabel('$\mu$ DD', 'Interpreter', 'latex');
|
|
ylabel('BER', 'Interpreter', 'latex');
|
|
legend('show', 'Location', 'best');
|
|
grid on;
|
|
hold off; |