Saturday, December 7, 2019

Free space loss and the power received using Matlab program

Free space loss and the power received using Matlab program

Program :-

clc;
close all;
clear;
Pt=input('transmistion power in watt');
Gt=input('gain of transmistting antenna');
Gr=input('gain of the receiving antenna');
f=input('freq in MHz');
d=input('Distance in km');
pt=10*log10(Pt);
pr=pt+Gt+Gr-(20*log10(d)+20*log10(f)+32.4);
disp('Recived power is');
disp(pr);
for i=1:1:d
PL(i)=20*log10(i)+20*log10(f)+32.44-Gt-Gr;
end
disp('path loss');
disp(PL(i));
plot(PL);
xlabel('distance');
ylabel('path loss');
 

Output:-

 freq in MHz325
Distance in km15
Recived power is
  -65.9847
path loss
   88.1995



0 comments:

If you have any doubts,please let me know