Minimal changes
This commit is contained in:
@@ -21,12 +21,12 @@ classdef DBHandler < handle
|
||||
% obj = DBHandler('pathToDB', 'path/to/database.db');
|
||||
|
||||
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.server = "";
|
||||
options.server = "134.245.243.254";
|
||||
options.port = 3306;
|
||||
options.user = "";
|
||||
options.password = "";
|
||||
options.user = "silas";
|
||||
options.password = "silas";
|
||||
|
||||
|
||||
end
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
% ------------------------------------------------------------
|
||||
|
||||
lambda0_nm = 1310;
|
||||
S0 = 0.08;
|
||||
S0 = [0.07,0.09]';
|
||||
% 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
|
||||
D_exact = (S0/4) .* ( ...
|
||||
D_exact = (S0./4) .* ( ...
|
||||
lambda_nm - (lambda0_nm^4)./(lambda_nm.^3) );
|
||||
|
||||
% linearized model around ZDW
|
||||
@@ -23,11 +23,16 @@ D_lin = S0 .* (lambda_nm - lambda0_nm);
|
||||
|
||||
% plot
|
||||
figure('Color','w'); hold on;
|
||||
plot(lambda_nm, D_exact, 'LineWidth',2, 'DisplayName','Exact model');
|
||||
plot(lambda_nm, D_lin, '--', 'LineWidth',2, 'DisplayName','Linearized model');
|
||||
cols = cbrewer2('paired',4);
|
||||
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]');
|
||||
ylabel('Dispersion D(\lambda) [ps/(nm·km)]');
|
||||
plot(lambda_nm, D_lin(2,:), '-', 'LineWidth',2, 'HandleVisibility','off','Color',[cols(3,:)]);
|
||||
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');
|
||||
legend('Location','best');
|
||||
grid on; box on;
|
||||
|
||||
@@ -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,:));
|
||||
cnt = cnt+2;
|
||||
end
|
||||
yticks([56,75,90,112])
|
||||
tickse = 1310-[7.5, 12, 17, 31.5];
|
||||
xticks(flip(tickse));
|
||||
% yticks([56,75,90,112])
|
||||
% tickse = 1310-[7.5, 12, 17, 31.5];
|
||||
% xticks(flip(tickse));
|
||||
|
||||
xlabel('$\Delta \lambda$ from ZDW [nm]');
|
||||
ylabel('$F_{null}$ [GHz]');
|
||||
grid on; box on;
|
||||
lim=1310-[5,35];
|
||||
lim=1310-[5,60];
|
||||
xlim([lim(2) lim(1)]);
|
||||
ylim([40,130])
|
||||
@@ -6,7 +6,7 @@
|
||||
%% Fiber and system parameters
|
||||
lambda0 = 1310e-9; % zero-dispersion 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]
|
||||
c = physconst('lightspeed');
|
||||
|
||||
@@ -26,11 +26,11 @@ H = abs(cos(phi));
|
||||
|
||||
%% Plot
|
||||
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;
|
||||
xlabel('Frequency [GHz]');
|
||||
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]);
|
||||
|
||||
%% Mark analytic first-null frequency
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
% === SETTINGS ===
|
||||
dsp_options.append_to_db = 1;
|
||||
dsp_options.append_to_db = 0;
|
||||
dsp_options.max_occurences = 1;
|
||||
|
||||
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.storage_path = 'Z:\2024\sioe_labor\';
|
||||
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"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
dsp_options.storage_path = 'Z:\2024\sioe_labor\';
|
||||
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();
|
||||
%
|
||||
|
||||
Reference in New Issue
Block a user