WDM code added (Pol Cont., Opt MUX/DEMUX, Opt Atten, DP_Fiber) -> the codebase is not optimized to always work with dp signals!
33 lines
1.1 KiB
Matlab
33 lines
1.1 KiB
Matlab
%% Parameters
|
|
df = linspace(100e3,50e6,10000); % Laser FWHM linewidth [Hz]
|
|
n_fiber = 1.467; % Fiber group index
|
|
c = 3e8; % Speed of light [m/s]
|
|
|
|
% Compute coherence length (1/e of mean-fringe decay)
|
|
tau_c = 1./(pi*df);
|
|
L_c = (c/n_fiber) .* tau_c; % Coherence length [m]
|
|
|
|
%% Plot
|
|
figure('Color','w');
|
|
loglog(df/1e6, L_c, 'LineWidth',2,'LineStyle','-'); % linewidth in MHz
|
|
xticks([0.1, 1, 10, 50]);
|
|
yticks([1, 10, 100, 1000]);
|
|
yticklabels({'1','10','100','1000'})
|
|
grid on; box on;
|
|
xlabel('Laser linewidth [MHz]','FontSize',12,'Interpreter','none');
|
|
ylabel('Coherence length [m]','FontSize',12,'Interpreter','none');
|
|
title('Coherence Length vs. Laser Linewidth','FontSize',14,'Interpreter','none');
|
|
|
|
%% Annotate some key points
|
|
hold on;
|
|
freqs = [150e3, 1e6, 10e6, 50e6]; % [Hz]
|
|
for f = freqs
|
|
x = f/1e6;
|
|
y = (c/n_fiber) * (1/(pi*f));
|
|
scatter(x,y,'Marker','x','LineWidth',1,'MarkerEdgeColor','black');
|
|
|
|
text(x*1.1,y, sprintf('%.2f MHz', f/1e6), ...
|
|
'FontSize',10,'HorizontalAlignment','left');
|
|
|
|
end
|