Minimal changes

This commit is contained in:
Silas Oettinghaus
2026-02-05 15:50:49 +01:00
parent 3d47813f1e
commit bc8ebc044f
6 changed files with 26 additions and 21 deletions

View File

@@ -21,12 +21,12 @@ classdef DBHandler < handle
% obj = DBHandler('pathToDB', 'path/to/database.db'); % obj = DBHandler('pathToDB', 'path/to/database.db');
arguments arguments
options.dataBase = ""; % Default value for pathToDB if not provided options.dataBase = "labor_highspeed"; % Default value for pathToDB if not provided
options.type = "mysql"; options.type = "mysql";
options.server = ""; options.server = "134.245.243.254";
options.port = 3306; options.port = 3306;
options.user = ""; options.user = "silas";
options.password = ""; options.password = "silas";
end end

View File

@@ -10,12 +10,12 @@
% ------------------------------------------------------------ % ------------------------------------------------------------
lambda0_nm = 1310; lambda0_nm = 1310;
S0 = 0.08; S0 = [0.07,0.09]';
% wavelength axis around ZDW % wavelength axis around ZDW
lambda_nm = linspace(lambda0_nm-40, lambda0_nm+40, 400); lambda_nm = linspace(lambda0_nm-60, lambda0_nm+60, 400);
% exact dispersion model % exact dispersion model
D_exact = (S0/4) .* ( ... D_exact = (S0./4) .* ( ...
lambda_nm - (lambda0_nm^4)./(lambda_nm.^3) ); lambda_nm - (lambda0_nm^4)./(lambda_nm.^3) );
% linearized model around ZDW % linearized model around ZDW
@@ -23,11 +23,16 @@ D_lin = S0 .* (lambda_nm - lambda0_nm);
% plot % plot
figure('Color','w'); hold on; figure('Color','w'); hold on;
plot(lambda_nm, D_exact, 'LineWidth',2, 'DisplayName','Exact model'); cols = cbrewer2('paired',4);
plot(lambda_nm, D_lin, '--', 'LineWidth',2, 'DisplayName','Linearized model'); plot(lambda_nm, D_lin(1,:), '-', 'LineWidth',2, 'DisplayName','Linearized model','Color',[cols(1,:)]);
plot(lambda_nm, D_exact(1,:), 'LineWidth',2, 'DisplayName',sprintf('Exact model'),'Color',[cols(2,:)]);
xlabel('Wavelength \lambda [nm]'); plot(lambda_nm, D_lin(2,:), '-', 'LineWidth',2, 'HandleVisibility','off','Color',[cols(3,:)]);
ylabel('Dispersion D(\lambda) [ps/(nm·km)]'); plot(lambda_nm, D_exact(2,:), 'LineWidth',2, 'HandleVisibility','off','Color',[cols(4,:)]);
xlabel('Wavelength $\lambda$ [nm]','Interpreter','latex');
ylabel('D($\lambda$) [ps/(nm km)]','Interpreter','latex');
title('Chromatic Dispersion Around the ZDW'); title('Chromatic Dispersion Around the ZDW');
legend('Location','best'); legend('Location','best');
grid on; box on; grid on; box on;

View File

@@ -20,13 +20,13 @@ for L = 10%[2,5,10]
plot(1310-Delta_lambda*1e9, f_null_10/1e9, 'LineWidth',2,'DisplayName',sprintf('%d km',L),'Color',cols(cnt,:)); plot(1310-Delta_lambda*1e9, f_null_10/1e9, 'LineWidth',2,'DisplayName',sprintf('%d km',L),'Color',cols(cnt,:));
cnt = cnt+2; cnt = cnt+2;
end end
yticks([56,75,90,112]) % yticks([56,75,90,112])
tickse = 1310-[7.5, 12, 17, 31.5]; % tickse = 1310-[7.5, 12, 17, 31.5];
xticks(flip(tickse)); % xticks(flip(tickse));
xlabel('$\Delta \lambda$ from ZDW [nm]'); xlabel('$\Delta \lambda$ from ZDW [nm]');
ylabel('$F_{null}$ [GHz]'); ylabel('$F_{null}$ [GHz]');
grid on; box on; grid on; box on;
lim=1310-[5,35]; lim=1310-[5,60];
xlim([lim(2) lim(1)]); xlim([lim(2) lim(1)]);
ylim([40,130]) ylim([40,130])

View File

@@ -6,7 +6,7 @@
%% Fiber and system parameters %% Fiber and system parameters
lambda0 = 1310e-9; % zero-dispersion wavelength [m] lambda0 = 1310e-9; % zero-dispersion wavelength [m]
lambda = 1275e-9; % operating wavelength [m] lambda = 1275e-9; % operating wavelength [m]
S0 = 0.08; % dispersion slope [ps/(nm²·km)] S0 = 0.09; % dispersion slope [ps/(nm²·km)]
L = 10e3; % fiber length [m] L = 10e3; % fiber length [m]
c = physconst('lightspeed'); c = physconst('lightspeed');
@@ -26,11 +26,11 @@ H = abs(cos(phi));
%% Plot %% Plot
figure('Color','w'); figure('Color','w');
plot(f/1e9, 10*log10(H), 'LineWidth', 1.8); plot(f/1e9, 10*log10(H), 'LineWidth', 1.8,'Color','black');
grid on; box on; grid on; box on;
xlabel('Frequency [GHz]'); xlabel('Frequency [GHz]');
ylabel('Magnitude [dB]'); ylabel('Magnitude [dB]');
title(sprintf('IM/DD Power Fading |H| for λ = %.1f nm, L = %.1f km', lambda*1e9, L/1000)); title(sprintf('IM/DD Power Fading: 10 km; 1275nm', lambda*1e9, L/1000),"Interpreter","latex");
ylim([-30 0]); ylim([-30 0]);
%% Mark analytic first-null frequency %% Mark analytic first-null frequency

View File

@@ -1,5 +1,5 @@
% === SETTINGS === % === SETTINGS ===
dsp_options.append_to_db = 1; dsp_options.append_to_db = 0;
dsp_options.max_occurences = 1; dsp_options.max_occurences = 1;
experiment = "highspeed_2024"; experiment = "highspeed_2024";
@@ -14,7 +14,7 @@ if dsp_options.mode == "load_run_id"
dsp_options.dataBase = 'labor_highspeed';%'C:\Users\Silas\Documents\MATLAB\Datensätze\sioe_labor\silas_labor_newdsp_newstructure.db'; dsp_options.dataBase = 'labor_highspeed';%'C:\Users\Silas\Documents\MATLAB\Datensätze\sioe_labor\silas_labor_newdsp_newstructure.db';
dsp_options.storage_path = 'Z:\2024\sioe_labor\'; dsp_options.storage_path = 'Z:\2024\sioe_labor\';
db = DBHandler("dataBase", [dsp_options.dataBase],... db = DBHandler("dataBase", [dsp_options.dataBase],...
"type", dsp_options.database_type,"server","192.168.178.192","user","silas","password","silas"); "type", dsp_options.database_type,"server","134.245.243.254","user","silas","password","silas");
elseif experiment == "mpi_ecoc_2025" elseif experiment == "mpi_ecoc_2025"

View File

@@ -2,7 +2,7 @@
dsp_options.storage_path = 'Z:\2024\sioe_labor\'; dsp_options.storage_path = 'Z:\2024\sioe_labor\';
dsp_options.max_occurences = 1; dsp_options.max_occurences = 1;
db = DBHandler("dataBase", 'labor_highspeed', "type", 'mysql' ); db = DBHandler("dataBase", 'labor_highspeed', "type", 'mysql','server','134.245.243.254','password','silas','user','silas');
% fp = QueryFilter(); % fp = QueryFilter();
% %