I have written the following code to calculate required transmission power based on distance between the sender and receiver and SNR threshold at the receiver. However I get huge values for required Intensity(Req_I) and Required Transmission Power (Req_Pt). Please Suggest the solution if I am making any mistake in the technique to calculate the transmission power or in the code itself.
Best Regards
Pt=12; %Transmit power in watts
spreading=1.5; %Spreading factor
f=10; %Frequency in Kilo Hz.
d=0.5; %Distance in Kilo Meters.
NL=47.69; %Noise Level in db
DI=0; %Directivity Index
pi=3.14159265359;
SNRth=17; %SNR threshold in db
%absorption=10^((0.002+0.11*(f^2/((1+f^2)+0.011*f^2)))/10); %Absorption factor
absorption=10^((0.11*(f^2/(1+f^2))+44*(f^2/(4100+f^2))+2.75*10^(-4)*f^2+0.003)/10);
TL=(d^spreading)*(absorption^d); %Transmission Loss
Req_SL=SNRth+TL+NL+DI; %Required Source Level
Req_I=((10^Req_SL)/10)*(0.67*10^(-18)); %Required Intensity
Req_Pt=Req_I*4*pi; %Required Transmission Power