Sie sind auf Seite 1von 8

% This matlab code analyses the losses in optical fibers for telecom networks

% This analysis is done on two types of optical fibers, the Corning SMF-28
% Optical Fiber and the AllWave Zero Water Peak (ZWP) Fiber. The steps in
% this analysis are the following : Determination of the length of the
% fiber, determination of the deadzoness and the attenuation at the
% wavelengh of 1310 nm and 1550 nm.

%---------- PART I Corning SMF-28 Optical fiber-----------------------

%------------- Distance measurement------------------------------


clear all
close all
% @ pulsewidth = 10 ns max range = 1.5km
av_num1 = [1024 3328 6656 9216 11776 14336 18432 23552 26672 36864 ...
40960 45056];
length1 = [1.1022 1.1022 1.1022 1.1022 1.1022 1.1022 1.1022 1.1022 ...
1.1022 1.1022 1.1022 1.1022];

% @ pulsewidth = 20 ns, max range = 1.5 km


av_num2 = [4352 9216 16384 21504 32768 34816 47104 65536 69632 ...
86016 106496 139264];
length2 = [1.1022 1.1022 1.1022 1.1022 1.1021 1.1022 1.1022 ...
1.1021 1.1022 1.1022 1.1022 1.1021];
% En kilomtres

% @ pulsewidth = 50 ns HR
av_num3 = [5120 13312 22528 34816 45056 65536 90112 114688 139264];
length3 = [1.1022 1.1022 1.1022 1.1022 1.1022 1.1022 1.1022 ...
1.1022 1.1022 ];
% @ pulsewidth = 50 ns
av_num4 = [5120 15360 22528 34816 47104 65536 90112 114688];
length4 = [1.102 1.102 1.102 1.102 1.102 1.102 1.102 1.102];
% @ pulsewidth = 100 ns
av_num6 = [8192 21504 57344 147456];
length6 = [1.101 1.101 1.102 1.102];
figure
p= plot(av_num1,length1,'b*',av_num2,length2,'r+',av_num3,length3, ...
'go',av_num4,length4,'k*');
axis([900 148000 1.1019 1.1023 ])
set(p,'LineWidth',2)
legend('10 ns HR ','20 ns HR','50 ns HR','50 ns')
title('Length of the fiber (km) vs number of averages')
xlabel('Number of averages')
ylabel('Length(km)')
grid on

1
% ------------------------------- Deadzones evolution -----------

%@ pulsewidth = 10 ns
Dz11 = [19.5 20.3 20.3 21.1 21.6 22.4 21.7 20.5 20.4 20.4 ...
20.4 20.5];
Dz12 = [34.4 38.5 36.1 36.4 36.6 38.5 36.4 36.2 36.5 36.5 ...
36.5 36.5];
%@ pulsewidth = 20 ns
Dz21 = [21.9 21.9 21.5 21.4 21.4 21.4 20.6 20.6 20.5 20.5 ...
20.5 20.4 ];
Dz22 = [34.4 33.8 33.7 33.7 33.7 30.5 30.6 30.2 29.6 29.6 ...
29.6 29.4];
%@ pulsewidth = 50 ns HR
Dz31 = [20.4 20.4 20.4 20.4 20.2 20.4 20.3 20.2 20.2 ];
Dz32 = [33.7 33.7 33.5 33.5 33.2 33.2 33.2 32.7 32.7 ];
figure
subplot(1,3,1)
plo1 = plot(av_num1,Dz11,'b*',av_num1,Dz12,'r+');
axis([900 46000 15 38 ])
set(plo1,'LineWidth',2)
legend('Front end ','Far end')
title('Deadzones with 10 ns HR pulse')
xlabel('Number of averages')
ylabel('Deadzone span(m)')
grid on
subplot(1,3,2)
plo2 = plot(av_num2,Dz21,'b*',av_num2,Dz22,'r+');
axis([4000 140000 15 38 ])
set(plo2,'LineWidth',2)
legend('Front end ','Far end')
title('Deadzones with a 20 ns HR pulse')
xlabel('Number of averages')
ylabel('Deadzone span(m)')
grid on
subplot(1,3,3)
plo3 = plot(av_num3,Dz31,'b*',av_num3,Dz32,'r+');
axis([5000 140000 19 34 ])
set(plo3,'LineWidth',2)
legend('Front end ','Far end')
title('Deadzones with a 50 ns HR pulse')
xlabel('Number of averages')
ylabel('Deadzone span(m)')
grid on
%@ pulsewidth = 50 ns
Dz41 = [ 48 48 48 48 47.4 47.5 47.3 47];
Dz42 = [51 50 49 49 49 49 49 49];
%@ pulsewidth = 100 ns
Dz51 = [52 51 51 51 50 49 49 49];
Dz52 = [ 54 53.5 53.3 53.1 53 51 51 51 ];
figure

2
subplot(1,2,1)
plo4 = plot(av_num4,Dz41,'b*',av_num4,Dz42,'r+');
axis([5000 120000 46 52 ])
set(plo4,'LineWidth',2)
legend('Front end ','Far end')
title('Deadzones with a 50 ns pulse')
xlabel('Number of averages')
ylabel('Deadzone span(m)')
grid on
subplot(1,2,2)
plo5 = plot(av_num4,Dz51,'b*',av_num4,Dz52,'r+');
axis([5000 120000 48 55 ])
set(plo5,'LineWidth',2)
legend('Front end ','Far end')
title('Deadzones with a 100 ns pulse')
xlabel('Number of averages')
ylabel('Deadzone span(m)')
grid on
%--------------------- Attenuation @ 1310 nm--------------------------
% pulsewidth= 10 ns
att1 = [0.346 0.332 0.325 0.320 0.327 0.316 0.320 0.314 ...
0.317 0.313 0.315 0.311 ];
% pulsewidth= 20 ns
att2 = [0.367 0.353 0.345 0.35 0.364 0.356 0.346 0.35 0.345 ...
0.347 0.340 0.341];
% pulsewidth= 50 ns HR
att3=[0.351 0.354 0.342 0.3455 0.345 0.347 0.346 0.344 0.343 ...
0.3454 0.344 0.346 ];
figure
subplot(1,3,1)
p1= plot(av_num1,att1,'b*');
axis([900 46000 0.305 0.35 ])
set(p1,'LineWidth',2)
title('Attenuation coefficient with a 10 ns HR pulse')
xlabel('Number of averages')
ylabel('Attenuation(dB/km)')
grid on
subplot(1,3,2)
p2= plot(av_num1,att2,'r+');
axis([ 900 46000 0.33 0.37])
set(p2,'LineWidth',2)
title('Attenuation coefficient with a 20 ns HR pulse')
xlabel('Number of averages')
ylabel('Attenuation(dB/km)')
grid on
subplot(1,3,3)
p3= plot(av_num1,att3,'ko');
axis([900 46000 0.33 0.36 ])
set(p3,'LineWidth',2)
title('Attenuation ocefficient with a 50 ns HR pulse')
xlabel('Number of averages')
ylabel('Attenuation(dB/km)')
grid on

3
% pulsewidth= 50 ns
att4 = [ 0.334 0.335 0.328 0.327 0.326 0.323 0.325 0.323 ...
0.322 0.320 0.320 0.321 ];
% pulsewidth= 100 ns
att5 = [ 0.338 0.327 0.319 0.320 0.318 0.317 0.320 0.320 ...
0.321 0.320 0.321 0.321];
figure
subplot(1,2,1)
p4= plot(av_num1,att4,'b*');
axis([900 46000 0.31 0.35 ])
set(p4,'LineWidth',2)
title('Attenuation coefficient with a 50 ns pulse')
xlabel('Number of averages')
ylabel('Attenuation(dB/km)')
grid on
subplot(1,2,2)
p5= plot(av_num1,att5,'r+');
axis([900 46000 0.30 0.35 ])
set(p5,'LineWidth',2)
title('Attenuation coefficient with a 100 ns pulse')
xlabel('Number of averages')
ylabel('Attenuation(dB/km)')
grid on

% ---------------- Attenuation @ 1550 nm ------------------------


% @ 20 ns
att21 = [0.2868 0.267 0.268 0.263 0.256 0.247 0.216 ...
0.202 0.1903 0.205 0.202 0.1887];
% @ 50 ns HR
att23 = [0.264 0.251 0.248 0.242 0.247 0.246 0.238 0.232 ...
0.238 0.233 0.227 0.230];
figure
subplot(1,2,1)
p21= plot(av_num1,att21,'b*');
axis([900 46000 0.16 0.30 ])
set(p21,'LineWidth',2)
title('Attenuation coefficient with a 10 ns HR pulse')
xlabel('Number of averages')
ylabel('Attenuation(dB/km)')
grid on
subplot(1,2,2)
p23= plot(av_num1,att23,'r*');
axis([900 46000 .20 0.28])
set(p23,'LineWidth',2)
title('Attenuation coefficient with a 50 ns HR pulse')
xlabel('Number of averages')
ylabel('Attenuation(dB/km)')
grid on

4
% @ 50 ns
att24 = [0.264 0.258 0.253 0.254 0.236 0.233 0.231 ...
0.225 0.222 0.224 0.2223 0.223];
% @ 100 ns
att25 = [0.251 0.250 0.245 0.243 .23 0.222 0.22 ...
0.22 0.219 0.22 0.219 0.223 ];
figure
subplot(1,2,1)
p24= plot(av_num1,att24,'b*');
axis([ 800 46000 0.20 0.28 ])
set(p24,'LineWidth',2)
title('Attenuation coefficient with a 50 ns pulse')
xlabel('Number of averages')
ylabel('Attenuation(dB/km)')
grid on
subplot(1,2,2)
p25= plot(av_num1,att25,'b*');
axis([800 46000 0.2 0.27 ])
set(p25,'LineWidth',2)
title('Attenuation coefficient with a 100 ns pulse')
xlabel('Number of averages')
ylabel('Attenuation(dB/km)')
grid on

% ------------- PART 2 SM Allwave Fiber --------------

clear all
close all
clc
% ------------- distance measurement ----------------
% pulsewidth = 20 ns max range = 4 km
av_num1 = [1280 3840 7680 11264 14336 17408 21504 28672 ...
32768 45056 49152 53248 ];
ave_num1 = [1280 7680 11264 17408 21504 28672 32768 ...
45056 49152 53248];
length1 = [2.2492 2.2492 2.2492 2.2492 2.2492 2.2492 2.2492 ...
2.2492 2.2492 2.2492 2.2492 2.2492];

% @ pulsewidth = 50 ns HR , max range = 4 km


av_num2 = [3840 9728 15360 21504 32768 34816 49152 65536 ...
86016 106496 139264 ];
length2 = [2.2495 2.2495 2.2495 2.2495 2.2495 2.2495 2.2495 ...
2.2495 2.2495 2.2495 2.2495 2.2495];

% @ pulsewidth = 50 ns
av_num3 = [3328 9728 15360 24576 32768 49152 65536 ...
81920 106496 ];
length3 = [3.2498 2.2498 2.2498 2.2498 2.2498 2.2498 ...
2.2498 2.2498 ...
2.2498];

5
% @ pulsewidth = 100 ns
av_num4 = [5120 15360 21504 34816 47104 65536 90112 114688];
length4 = [2.250 2.250 2.250 2.250 2.250 2.250 2.250 2.250] ;
% @ pulsewidth = 200 ns
av_num6 = [17408 40960 106496 278528];
length6 = [2.250 2.250 2.250 2.250];
figure
p = plot(av_num1,length1,'b*',av_num3,length3,'r+',av_num4, ...
length4,'go',av_num6,length6,'k*');
axis([800 148000 2.247 2.252 ])
set(p,'LineWidth',2)
legend('10 ns HR ','50 ns HR','50 ns ','100 ns')
title('Length of the fiber(km) vs number of averages')
xlabel('Number of averages')
ylabel('Length(km)')
grid on

% ----------- Attenuation @ 1310 nm -----------------------------


%@ pulsewidth = 20 ns
atte1 = [0.373 0.370 0.365 0.362 0.344 0.352 0.355 ...
0.342 0.345 0.360];
%@ pulsewidth = 50 ns HR
atte2 = [ 0.378 0.375 0.372 0.371 0.369 0.366 0.366 ...
0.368 0.365 0.363 ];
%@ pulsewidth = 50 ns
atte3 = [0.358 0.357 0.353 0.345 0.342 0.323 0.325 0.325 ...
0.323 0.323];
figure
subplot(1,2,1)
pl1= plot(ave_num1,atte1,'b*');
axis([800 54000 0.335 0.38 ])
set(pl1,'LineWidth',2)
title('Attenuation coefficient with a 20 ns HR pulse')
xlabel('Number of averages')
ylabel('Attenuation(dB/km)')
grid on
subplot(1,2,2)
pl2= plot(ave_num1,atte2,'ro');
axis([800 54000 0.36 0.38 ])
set(pl2,'LineWidth',2)
title('Attenuation coefficient with a 50 ns HR pulse')
xlabel('Number of averages')
ylabel('Attenuation(dB/km)')
grid on

%@ pulsewidth = 100 ns
atte4 = [0.358 0.357 0.352 0.340 0.335 0.325 0.323 ...

6
0.321 0.319 0.319];
figure
subplot(1,2,1)
pl3 = plot(ave_num1,atte3,'k+');
axis([800 54000 0.31 0.36])
set(pl3,'LineWidth',2)
title('Attenuation coefficient with a 50 ns pulse')
xlabel('Number of averages')
ylabel('Attenuation(dB/km)')
grid on
subplot(1,2,2)
pl4 = plot(ave_num1,atte4,'r+');
axis([800 54000 0.31 0.37 ])
set(pl4,'LineWidth',2)
title('Attenuation coefficient with a 100 ns pulse')
xlabel('Number of averages)')
ylabel('Attenuation(dB/km)')
grid on

% ------------------- Attenuation @ 1550 nm ---------------------


%@ pulsewidth = 10 ns
atte21 = [0.201 0.187 0.172 0.173 0.171 0.188 0.187 ...
0.186 0.193 0.174];
%@ pulsewidth = 20 ns
atte22 = [0.240 0.204 0.195 0.198 0.200 0.201 0.196 0.233 ...
0.200 0.210 ];
%@ pulsewidth = 50 ns HR
atte23 = [0.270 0.257 0.255 0.213 0.221 0.212 0.21 0.213 0.212 ...
0.209];
figure
subplot(1,2,1)
pl5 = plot(ave_num1,atte21,'b*');
axis([800 54000 0.16 0.22 ])
set(pl5,'LineWidth',2)
title('Attenuation coefficient with a 20 ns pulse')
xlabel('Number of averages')
ylabel('Attenuation(dB/km)')
grid on
subplot(1,2,2)
pl6 = plot(ave_num1,atte22,'b*');
axis([800 54000 0.18 0.26 ])
set(pl6,'LineWidth',2)
title('Attenuation coefficient with a 50 ns HR pulse')
xlabel('Number of averages')
ylabel('Attenuation(dB/km)')
grid on

%@ pulsewidth = 50 ns
atte24 = [0.262 0.226 0.216 0.208 0.207 0.206 0.201 0.198 ...
0.197 0.196];

7
%@ pulsewidth = 100 ns
atte25 = [0.252 0.214 0.217 0.218 0.201 0.199 0.198 0.201 ...
0.197 0.198];

figure
subplot(1,2,1)
pl7 = plot(ave_num1,atte23,'b*');
axis([800 54000 0.18 0.28 ])
set(pl7,'LineWidth',2)
title('Attenuation coefficient with a 50 ns pulse')
xlabel('Number of averages')
ylabel('Attenuation(dB/km)')
grid on
subplot(1,2,2)
pl8 = plot(ave_num1,atte24,'b*');
axis([800 54000 0.18 0.28 ])
set(pl8,'LineWidth',2)
title('Attenuation coefficient with a 100 ns pulse')
xlabel('Number of averages')
ylabel('Attenuation(dB/km)')
grid on

Published with MATLAB 7.9

Das könnte Ihnen auch gefallen