Files
imdd_silas/Theory/Dissertation/pmd_vs_length.m
2026-03-25 10:57:48 +01:00

117 lines
5.1 KiB
Matlab
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
% pmd_vs_length.m
% ------------------------------------------------------------
% Plots the Foschini-Poole (1991) analytical variance formula for PMD:
%
% sigma_T^2(z) = 2*(Delta_beta1)^2 * lc^2
% * [ exp(-z/lc) + z/lc - 1 ]
%
% and overlays the two asymptotic regimes:
% - Short-reach (z << lc) : sigma_T(z) ~ (Delta_beta1) * z
% - Long-haul (z >> lc) : sigma_T(z) ~ Dp * sqrt(z)
%
% Parameters follow typical SMF values from the literature.
% ------------------------------------------------------------
clear; clc;
%% ── Parameters ──────────────────────────────────────────────────────────────
% Intrinsic local birefringence [ps/km]
Delta_beta1 = 1e-1; % typical value, adjust as needed
% Correlation length [km]
lc = 0.01; % ~50 m, typical for G.652 SMF
% PMD parameter [ps / sqrt(km)] — derived from the two above
Dp = Delta_beta1 * sqrt(2 * lc);
% Distance axis [km]
z_max = 10; % maximum distance
z = linspace(0.001, z_max, 10000); % avoid z = 0 in log plot
%% ── Exact Foschini-Poole formula (sigma_T in ps) ────────────────────────────
sigma_T_sq = 2 .* Delta_beta1.^2 .* lc.^2 ...
.* (exp(-z ./ lc) + z ./ lc - 1);
sigma_T = sqrt(sigma_T_sq); % RMS DGD [ps]
%% ── Asymptotic regimes ───────────────────────────────────────────────────────
% Short-reach: linear growth (z << lc)
sigma_T_short = Delta_beta1 .* z; % [ps]
% Long-haul: square-root growth (z >> lc)
sigma_T_long = Dp .* sqrt(z); % [ps]
%% ── Plot ─────────────────────────────────────────────────────────────────────
figure('Color','w','Position',[100 100 760 480]);
hold on;
% Color palette (matching dissertation style)
c_exact = [0.1216, 0.4706, 0.7059]; % blue exact
c_short = [0.8392, 0.1529, 0.1569]; % red short-reach asymptote
c_long = [0.1961, 0.6314, 0.1725]; % green long-haul asymptote
% Exact solution
h_exact = plot(z, sigma_T, ...
'Color', c_exact, 'LineWidth', 2.0, ...
'DisplayName', 'Exact (Foschini \& Poole)');
% Short-reach asymptote σ_T ≈ Δβ₁ · z
h_short = plot(z, sigma_T_short, ...
'Color', c_short, 'LineWidth', 1.4, 'LineStyle', '--', ...
'DisplayName', '$\sigma_T \approx \Delta\beta_1 \cdot z$ \quad ($z \ll l_c$)');
% Long-haul asymptote σ_T ≈ D_p √z
h_long = plot(z, sigma_T_long, ...
'Color', c_long, 'LineWidth', 1.4, 'LineStyle', ':', ...
'DisplayName', '$\sigma_T \approx D_p \sqrt{z}$ \quad ($z \gg l_c$)');
%% ── Axes & decoration ────────────────────────────────────────────────────────
ax = gca;
set(ax, 'XScale', 'log', 'YScale', 'log');
% ── X-axis: linear-style tick labels on log scale ────────────────────────
x_ticks = [1e-3, 1e-2, 1e-1, 1, 10];
ax.XTick = x_ticks;
ax.XTickLabel = arrayfun(@(v) sprintf('%g km', v), x_ticks, 'UniformOutput', false);
% ── Y-axis: linear-style tick labels on log scale ────────────────────────
y_ticks = [1e-3, 1e-2, 1e-1, 1, 10];
ax.YTick = y_ticks;
ax.YTickLabel = arrayfun(@(v) sprintf('%g ps', v), y_ticks, 'UniformOutput', false);
xlabel('Fiber length $z$ [km]', 'Interpreter', 'latex');
ylabel('RMS DGD $\sigma_T$ [ps]', 'Interpreter', 'latex');
grid on; box on;
xlim([min(z) z_max]);
legend([h_exact, h_short, h_long], ...
'Location', 'northwest', 'Interpreter', 'latex', 'FontSize', 9);
% Parameter annotation
anno_str = sprintf( ...
['$\\Delta\\beta_1 = %.3g$ ps/km\n' ...
'$l_c = %.0f$ m\n' ...
'$D_p = \\Delta\\beta_1\\sqrt{2l_c} = %.4g$ ps/$\\sqrt{\\mathrm{km}}$'], ...
Delta_beta1, lc*1e3, Dp);
annotation('textbox', [0.57 0.14 0.38 0.22], ...
'String', anno_str, ...
'Interpreter', 'latex', ...
'FontSize', 8.5, ...
'BackgroundColor','w', ...
'EdgeColor', [0.5 0.5 0.5], ...
'LineWidth', 0.8, ...
'FitBoxToText', 'on');
%% ── Regime transition marker ─────────────────────────────────────────────────
% Mark the crossover region around z = lc
xline(lc, '--', ...
'Color', [0.5 0.5 0.5], 'LineWidth', 0.8, ...
'HandleVisibility', 'off');
text(lc * 1.15, min(sigma_T)*3, '$l_c$', ...
'Interpreter', 'latex', 'Color', [0.4 0.4 0.4], 'FontSize', 9);
%% ── Export (uncomment to use) ────────────────────────────────────────────────
% mat2tikz_improved('C:\...\tikz\pmd\pmd_vs_length.tikz')