Path loss and the power received using Matlab program
Program:-
close all;
clear;
Pt=input('transmistion power in watt');
Gt=input('gain of transmistting antenna');
Gr=input('gain of the receiving antenna');
ht=input('Hight of Transmitter');
hr=input('Hight of Receiver');
f=input('freq in MHz');
d=input('Distance in km');
pt=10*log10(Pt);
pr=pt+Gt+Gr+20*log10(ht)+(20*log10(hr)-40*log10(d))-120;
disp('Recived power is');
disp(pr);
for i=1:1:d
PL(i)=40*log10(i)+120-((Gt)+(Gr)+20*log10(ht)+20*log10(hr));
end
disp('path loss');
disp(PL(i));
plot(PL);
xlabel('distance');
ylabel('path loss');
Output:-
Hight of Transmitter40
Hight of Receiver5
freq in MHz325
Distance in km15
Recived power is
-80.8482
path loss
103.0231
0 comments:
If you have any doubts,please let me know