more and more

This commit is contained in:
Silas Oettinghaus
2026-07-08 21:36:08 +02:00
parent 699d146fb5
commit 1879441999
22 changed files with 2197 additions and 174 deletions

View File

@@ -7,19 +7,19 @@ fp = QueryFilter();
% fp.where('Runs', 'run_id','EQUALS', 987);
M = 4;
fp.where('Runs', 'pam_level','EQUALS', M);
fp.where('Runs', 'symbolrate','EQUALS', 112e9);
% fp.where('Runs', 'symbolrate','NOT_EQUAL', 112e9);
fp.where('Runs', 'fiber_length','EQUALS', 0);
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',20);
fp.where('Runs', 'sir','LESS_EQUAL',20);
% fp.where('Runs','run_id','GREATER_EQUAL',3153);
[dataTable,sql_query] = db.queryDB(fp, db.getTableFieldNames('Runs'));
[~, uniqueIdx] = unique(dataTable.run_id); % Get unique run_id indices
dataTable.SIR = -7 - round(dataTable.power_mpi_interference);
% dataTable.SIR = -7 - round(dataTable.power_mpi_interference);
%%
for i = 1:size(dataTable,1)
@@ -41,16 +41,29 @@ for i = 1:size(dataTable,1)
Symbols = Symbols.Symbols;
Scpe_sig_raw = load([savePath, char(dataTable_.rx_raw_path(1))]);
Scpe_sig_raw = Scpe_sig_raw.Scpe_sig_raw.normalize("mode","rms");
Scpe_sig_raw = Scpe_sig_raw.Scpe_sig_raw;
% Scpe_sig_raw = Scpe_sig_raw.normalize("mode","rms");
Scpe_sig_raw.plot("displayname",['Scope Signal (Run ID: ',num2str(dataTable_.run_id)],"fignum",dataTable_.run_id,"clear",0);
Scpe_sig_raw.spectrum("normalizeTo0dB",1);
disp(num2str(dataTable_.interference_path_length));
[sep_sig, avg_sig] = showLevelScatter(Scpe_sig_raw, Symbols, ...
[separated_levels_sig, avg_sig] = showLevelScatter(Scpe_sig_raw, Symbols, ...
"fsym", fsym, ...
"syncFs", 2*fsym, ...
"fignum", 400, ...
"normalize", true, ...
"debug_plots", false);
var(sep_sig,0,2,'omitnan')
"debug_plots", false,"showPlot",true,"showStdAnnotations",false,"yLimits",[-3 3]);
std_levels = std(separated_levels_sig,0,2,'omitnan');
mean_levels = mean(separated_levels_sig,2,'omitnan');
std_tot = std(Scpe_sig_raw.signal,0,1,'omitnan');
var_levels = std_levels.^2;
p = polyfit(mean_levels, var_levels, 1);
var_slope = p(1);
var_offset = p(2);c
end

View File

@@ -4,43 +4,68 @@
% database_name = 'ecoc2025.db';
% database = DBHandler("pathToDB", [basePath, database_name],"type",'mysql');
database = DBHandler("dataBase",'labor',"type","mysql","user","silas","password","silas","server","192.168.178.192");
% database = DBHandler("dataBase",'labor',"type","mysql","user","silas","password","silas","server","192.168.178.192");
%
% filterParams = database.tables;
% filterParams.Configurations = struct( ...
% 'symbolrate', 112e9, ... %[224,336,360,390,420,448]
% 'fiber_length', 0, ...
% 'db_mode', '"no_db"', ...
% 'interference_attenuation', [], ...
% 'interference_path_length', [], ...
% 'is_mpi', 1, ...
% 'pam_level', 4, ...
% 'wavelength', 1310, ...
% 'precomp_amp', -64, ...
% 'signal_attenuation', '0', ...
% 'v_awg', [], ...
% 'v_bias', [] ...
% );
%
% % filterParams.EqualizerParameters.diff_precode = int32(db_mode.db_encoded);
% % filterParams.EqualizerParameters.equalizer_structure = int32(equalizer_structure.vnle);
%
% selectedFields = {'Configurations.run_id' 'Runs.date_of_run' 'Runs.rx_raw_path' 'Configurations.bitrate' 'Configurations.v_bias' 'Configurations.v_awg' 'Configurations.precomp_amp' 'Configurations.symbolrate' 'Configurations.pam_level'...
% 'Configurations.db_mode' 'Configurations.rop_attenuation' 'Configurations.is_mpi' 'Configurations.interference_attenuation' 'Configurations.signal_attenuation' ...
% 'EqualizerParameters.equalizer_structure' 'EqualizerParameters.diff_precode' 'EqualizerParameters.eq_id' 'Measurements.power_pd_in' ...
% 'Measurements.power_mpi_interference' 'Measurements.power_mpi_signal' 'Results.BER' 'Results.BER_precoded' 'Results.SNR' 'Results.GMI' 'Results.Alpha' 'Results.date_of_processing'};
%
% [dataTable,sql_query] = database.queryDB(filterParams, selectedFields);
filterParams = database.tables;
filterParams.Configurations = struct( ...
'symbolrate', 112e9, ... %[224,336,360,390,420,448]
'fiber_length', 0, ...
'db_mode', '"no_db"', ...
'interference_attenuation', [], ...
'interference_path_length', [], ...
'is_mpi', 1, ...
'pam_level', 4, ...
'wavelength', 1310, ...
'precomp_amp', -64, ...
'signal_attenuation', '0', ...
'v_awg', [], ...
'v_bias', [] ...
);
% filterParams.EqualizerParameters.diff_precode = int32(db_mode.db_encoded);
% filterParams.EqualizerParameters.equalizer_structure = int32(equalizer_structure.vnle);
%%
selectedFields = {'Configurations.run_id' 'Runs.date_of_run' 'Runs.rx_raw_path' 'Configurations.bitrate' 'Configurations.v_bias' 'Configurations.v_awg' 'Configurations.precomp_amp' 'Configurations.symbolrate' 'Configurations.pam_level'...
'Configurations.db_mode' 'Configurations.rop_attenuation' 'Configurations.is_mpi' 'Configurations.interference_attenuation' 'Configurations.signal_attenuation' ...
'EqualizerParameters.equalizer_structure' 'EqualizerParameters.diff_precode' 'EqualizerParameters.eq_id' 'Measurements.power_pd_in' ...
'Measurements.power_mpi_interference' 'Measurements.power_mpi_signal' 'Results.BER' 'Results.BER_precoded' 'Results.SNR' 'Results.GMI' 'Results.Alpha' 'Results.date_of_processing'};
[dataTable,sql_query] = database.queryDB(filterParams, selectedFields);
dsp_options = []; db = DBHandler("dataBase","labor","type","mysql","server","192.168.178.192","port",3306,"user","silas","password","silas");
fp = QueryFilter();
fp.where('Runs', 'symbolrate', 'EQUALS', 112e9);
fp.where('Runs', 'fiber_length', 'EQUALS', 0);
fp.where('Runs', 'interference_path_length', 'EQUALS', 1000);
% fp.where('Runs', 'sir', 'EQUALS', 23);
% fp.where('Runs', 'db_mode', 'EQUALS', '"no_db"');
% fp.where('Runs', 'is_mpi', 'EQUALS', 1);
fp.where('Runs', 'pam_level', 'EQUALS', 4);
fp.where('Runs', 'wavelength', 'EQUALS', 1310);
% fp.where('Runs', 'v_bias', 'EQUALS', 2.65);
[dataTable,~] = db.queryDB(fp, db.getTableFieldNames('mpi_superview'));
%%
dataTable = cleanUpTable(dataTable);
% Filter by time
startTime = datetime('2025-04-11 13:00:00', 'InputFormat', 'yyyy-MM-dd HH:mm:ss');
stopTime = datetime('2025-04-11 14:00:00', 'InputFormat', 'yyyy-MM-dd HH:mm:ss');
dataTable.date_of_run = datetime(dataTable.date_of_run, 'InputFormat', 'yyyy-MM-dd HH:mm:ss.SSSSSS');
dataTable.date_of_processing = datetime(dataTable.date_of_processing, 'InputFormat', 'yyyy-MM-dd HH:mm:ss.SSSSSS');
dataTable = dataTable(dataTable.date_of_processing > startTime, :);
dataTable = dataTable(dataTable.date_of_processing < stopTime, :);
dataTable.date_of_run = datetime(dataTable.date_of_run, 'InputFormat', 'yyyy-MM-dd HH:mm:ss');
dataTable.date_of_processing = datetime(dataTable.date_of_processing, 'InputFormat', 'yyyy-MM-dd HH:mm:ss'); %.SSSSSS
% startTime = datetime('2025-04-11 13:00:00', 'InputFormat', 'yyyy-MM-dd HH:mm:ss');
% stopTime = datetime('2025-04-11 14:00:00', 'InputFormat', 'yyyy-MM-dd HH:mm:ss');
% dataTable = dataTable(dataTable.date_of_processing > startTime, :);
% dataTable = dataTable(dataTable.date_of_processing < stopTime, :);
%%
% Group by smth
y_var = 'SNR';
@@ -52,6 +77,7 @@ dataTableGrpd = groupIt(fixedVars,dataTable);
plotRealizations = 1;
%%
% Create a new figure
mkr = 'x';

View File

@@ -46,13 +46,17 @@ fn = [db.getTableFieldNames('mpi_superview')];
dataTable = cleanUpTable(dataTable);
% Filter by time
startTime = datetime('2025-04-11 13:00:00', 'InputFormat', 'yyyy-MM-dd HH:mm:ss');
stopTime = datetime('2025-04-11 14:00:00', 'InputFormat', 'yyyy-MM-dd HH:mm:ss');
dataTable.date_of_run = datetime(dataTable.date_of_run, 'InputFormat', 'yyyy-MM-dd HH:mm:ss.SSSSSS');
dataTable.date_of_processing = datetime(dataTable.date_of_processing, 'InputFormat', 'yyyy-MM-dd HH:mm:ss.SSSSSS');
dataTable = dataTable(dataTable.date_of_processing > startTime, :);
dataTable = dataTable(dataTable.date_of_processing < stopTime, :);
%% Filter by time
dataTable.date_of_run = datetime(dataTable.date_of_run, 'InputFormat', 'yyyy-MM-dd HH:mm:ss');
dataTable.date_of_processing = datetime(dataTable.date_of_processing, 'InputFormat', 'yyyy-MM-dd HH:mm:ss');
%%
% startTime = datetime('2025-04-11 13:00:00', 'InputFormat', 'yyyy-MM-dd HH:mm:ss');
% stopTime = datetime('2025-04-11 14:00:00', 'InputFormat', 'yyyy-MM-dd HH:mm:ss');
% dataTable = dataTable(dataTable.date_of_processing > startTime, :);
% dataTable = dataTable(dataTable.date_of_processing < stopTime, :);
% Group by smth
y_var = 'BER';
@@ -62,6 +66,8 @@ loop_var = 'eq_id';
fixedVars = {'eq_id',loop_var};
dataTableGrpd = groupIt(fixedVars,dataTable);
%%
plotRealizations = 1;
% Create a new figure