You are on page 1of 3

Exp:03 POWER BUDGET ANALYSIS OF AN OPTICAL LINK DATE: 9.7.

2021

MATLAB CODE :(Roll No : 01,18CH1034)

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 :
NAME: PRIYADHARSHINI. A

You might also like