-1

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
RJFalconer
  • 10,890
  • 5
  • 51
  • 66
Tariq Islam
  • 97
  • 10
  • 2
    Note that it is not necessary to define `pi` yourself. Matlab knows it by default. – m7913d Mar 11 '17 at 09:57
  • 2
    `Req_SL = 3.4303e+09`, and you are computing `(10^Req_SL)`, so you are getting `Inf`. Maximum value of double precision element is about `10^308`. – Rotem Mar 11 '17 at 10:04
  • 1
    it would be helpful if you used units for all your quantities. There is a good chance this is the source of your error, as your source level/ required intensity is enormous. – anon01 Mar 11 '17 at 20:50
  • your absorption expression should be: `absorption=10^((0.002+0.11*(f^2/((1+f^2)+0.011*f^2)))/10);` – anon01 Mar 11 '17 at 21:01

2 Answers2

0

The calculation of your TL factor is probably wrong, maybe you forgot to take the logarithm of it?

I don't know where your formulas come from, nor your specific application. If you don't have the correct formulas, you can take a look at this pdf, which provides expressions for the TL factor due to attenuation and spreading.

m7913d
  • 10,244
  • 7
  • 28
  • 56
  • My Application is underwater acoustic sensor networks. The medium is acoustic waves. I have rechecked the formula. Its correct. [Here](https://arxiv.org/pdf/0801.0426.pdf) is the paper that explains the formula. Equation 1 on page 1 of the paper is the formula for calculation of TL. – Tariq Islam Mar 11 '17 at 16:21
0

Check your units.

The original paper gives an expression (3) for low frequency propagation, the one you have used, but requires the input to be in kHz, not Hz. Either you should use

f = 10*1e-3; %frequency in kHz

or you should be using formula (2). Also note that the the attenuation is in dB/km, so you should convert your distance too, unless you actually are interested in propagating 500 km.

anon01
  • 10,618
  • 8
  • 35
  • 58