40 lines
1.3 KiB
Matlab
40 lines
1.3 KiB
Matlab
|
|
% plot_dispersion_models
|
|
% ------------------------------------------------------------
|
|
% Visualizes exact and linearized chromatic dispersion D(λ)
|
|
% around the zero-dispersion wavelength (ZDW).
|
|
%
|
|
% Inputs:
|
|
% lambda0_nm - ZDW in nm
|
|
% S0 - dispersion slope at ZDW [ps/(nm^2·km)]
|
|
% ------------------------------------------------------------
|
|
|
|
lambda0_nm = 1310;
|
|
S0 = [0.07,0.09]';
|
|
% wavelength axis around ZDW
|
|
lambda_nm = linspace(lambda0_nm-60, lambda0_nm+60, 400);
|
|
|
|
% exact dispersion model
|
|
D_exact = (S0./4) .* ( ...
|
|
lambda_nm - (lambda0_nm^4)./(lambda_nm.^3) );
|
|
|
|
% linearized model around ZDW
|
|
D_lin = S0 .* (lambda_nm - lambda0_nm);
|
|
|
|
% plot
|
|
figure('Color','w'); hold on;
|
|
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,:)]);
|
|
|
|
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;
|
|
|