You are on page 1of 3

# EX NO 10

AIM

## Simulation of fiber optic power budget analysis

To simulate fiber optic power budget analysis using MATLAB APPARATUS REQUIRED MATLAB software, PC SOURCE CODE:
POWER BUDGET ANALYSIS WITHOUT JUMPER LOSS clc; close all; clear all; disp('POWER BUDGET ANALYSIS WITHOUT JUMPER LOSS') ptr=input('Enter the transmitted power in dBm:'); prec=input('Enter the receiver sensitivity in dBm:'); ms=input('Enter the system margins in dB:'); cl=input('Enter the available connector loss in dB:'); af=input('Enter the fibre cable loss in dB:'); %To calculate the power loss of the optical system (dB) p=ptr-prec; % To calculate the maximum transmission length of the optical system (Km) L=(p-2*cl-ms)/af; disp(sprintf('Total power loss of the optical system = %fdB',p)); disp(sprintf('Total transmission length=%f km',L)); for (i=1:L) p=cl+(af*i); % Calculating the total power (dB) disp(sprintf('Total power at %d km=%fdB',i,p)); end; OUTPUT: POWER BUDGET ANALYSIS WITHOUT JUMPER LOSS Enter the transmitted power in dBm:-3 Enter the receiver sensitivity in dBm:-30 Enter the system margins in dB:6 Enter the available connector loss in dB:3 Enter the fibre cable loss in dB:2 Total power loss of the optical system = 27.000000dB Total transmission length=7.500000 km Total power at 1 km=5.000000dB Total power at 2 km=7.000000dB Total power at 3 km=9.000000dB Total power at 4 km=11.000000dB Total power at 5 km=13.000000dB Total power at 6 km=15.000000dB Total power at 7 km=17.000000dB

POWER BUDGET ANALYSIS FOR LASER AND LED clc; close all; clear all; disp('POWER BUDGET ANALYSIS FOR LASER AND LED') ptr=input('Enter the transmitted power in dBm:'); prec=input('Enter the receiver sensitivity in dBm:'); ms=input('Enter the system margins in dB:'); ac=input('Enter the available connector loss in dB:'); af=input('Enter the fibre cable loss in dB:'); cl=input('Enter the available channel loss in dB:'); %To calculate the powerloss of the optical system (dB) p=ptr-prec; %To calculate the powerloss of the optical system (dB) L=(cl-ac)/af; disp(sprintf('Total power loss of the optical system = %fdB',p)); disp(sprintf('Total transmission length=%f km',L)); for i=1:L p=ac+(af*i); % Calculating the total power disp(sprintf('Total power at %d km=%fdB',i,p)); end; OUTPUT:

POWER BUDGET ANALYSIS FOR LASER AND LED Enter the transmitted power in dBm:0 Enter the receiver sensitivity in dBm:-42 Enter the system margins in dB:6 Enter the available connector loss in dB:2 Enter the fibre cable loss in dB:3.5 Enter the available channel loss in dB:36 Total power loss of the optical system = 42.000000dB Total transmission length=9.714286 km Total power at 1 km=5.500000dB Total power at 2 km=9.000000dB Total power at 3 km=12.500000dB Total power at 4 km=16.000000dB Total power at 5 km=19.500000dB Total power at 6 km=23.000000dB Total power at 7 km=26.500000dB Total power at 8 km=30.000000dB Total power at 9 km=33.500000dB

POWER BUDGET ANALYSIS WITH JUMPER LOSS clc; clear all; close all; disp('POWER BUDGET ANALYSIS WITH JUMPER LOSS') ptr=input('Enter the transmitter power in dBm:'); prec=input('Enter the receiver sensitivity in dBm:'); jl=input('Enter the jumper loss in dB:'); cl=input('Enter the availbale connector loss in dB:'); af=input('Enter the fibre cable loss in dB:'); L=input('Enter the max possible distance in km:'); %To calculate the powerloss of the optical system (dB) p=ptr-prec; %To calculate the final power margin (dB) ms=p-(af*l)-(2*cl)-(2*jl); disp(sprintf('Total power loss of optical system= %f dB',p)); disp(sprintf('Final power margin =%f dB',ms)); for i=1:L p=cl+(af*i)+jl; % Calculating the total power (dB) disp(sprintf('Total power at %d km=%fdB',i,p)); end; OUTPUT: POWER BUDGET ANALYSIS WITH JUMPER LOSS Enter the transmitter power in dBm:-4 Enter the receiver sensitivity in dBm:-27 Enter the jumper loss in dB:1.5 Enter the availbale connector loss in dB:2 Enter the fibre cable loss in dB:1 Enter the max possible distance in km:8 Total power loss of optical system= 23.000000 dB Final power margin =8.000000 dB Total power at 1 km=4.500000dB Total power at 2 km=5.500000dB Total power at 3 km=6.500000dB Total power at 4 km=7.500000dB Total power at 5 km=8.500000dB Total power at 6 km=9.500000dB Total power at 7 km=10.500000dB Total power at 8 km=11.500000dB