Transmit power(txPowerDbm) is always 0 in Log Distance Propagation Loss Model?

262 views
Skip to first unread message

Krishna

unread,
Jul 11, 2016, 11:26:42 AM7/11/16
to ns-3-users

Hi,

 

I am using lr-wpan module and LogDistance model for propagation loss. In my experiment I am giving Tx power to my node and want to calculate the Rx power at a certain distance with given input parameters (frequency, modulation, exponent, receiver sensitivity etc.)

 

My understanding is that the loss in signal power should be difference between Tx power and Rx power.

 

In the file src/propagation/model/propagation-loss-model.cc, (NS 3.25), Line no. 504

Function: LogDistancePropagationLossModel::DoCalcRxPower

{

  double distance = a->GetDistanceFrom (b);

  if (distance <= m_referenceDistance)

    {

      return txPowerDbm;

    }

 

  double pathLossDb = 10 * m_exponent * std::log10 (distance / m_referenceDistance);

  double rxc = -m_referenceLoss - pathLossDb;

  return txPowerDbm + rxc

}

 

Output expected from the function is: return Rx power of the signal

 

I have following three queries:

1.       The function always assumes tx power as 0 dBm i.e. the value of variable txPowerDbm is always 0. This means it is ignoring any transmit power I give to my node. It seems confusing to me.

2.       In this condition above (distance <= m_referenceDistance), I think function should return (txPowerDbm- m_referenceLoss) instead of just txPowerDbm.

3.       The variable “txPowerDbm” conveys that tx power is being used in dBm. But is it actually using “dB” in the calculation because losses are being used in dB. So looks to me a unit mismatch here or variable naming issue.

 

Please provide your guidance. If my question is very basic, please still provide your guidance as I want to correct my understanding too.

 

 

Tommaso Pecorella

unread,
Jul 12, 2016, 4:07:05 AM7/12/16
to ns-3-users
Hi,

the tx power is defined by the sender, and it's not always zero.
About the formula, you're right about the discontinuity. However, closer than the reference distance the loss value is arbitrary. We could change it so to have a continuous function, but it won't change much. Still, we'll evaluate it.
The dB Vs dBm... well, I'm not an expert in these formulas, I'll have a check with some colleagues. However I'm quite sure that it's a naming issue.

Cheers,

T.

Krishna

unread,
Jul 12, 2016, 4:33:05 AM7/12/16
to ns-3-users

Thanks for response and time.

Regards,
Krishna

Nicola Baldo

unread,
Oct 12, 2016, 3:33:10 PM10/12/16
to ns-3-users
Hi Krishna,

this issue has been resolved, see the ns-3 bugzilla for more info:
https://www.nsnam.org/bugzilla/show_bug.cgi?id=2450

Thanks for reporting it!

Kind regards,

Nicola

Krishna

unread,
Oct 17, 2016, 9:44:25 AM10/17/16
to ns-3-users
Thank You Nicola , 

I will go through it. And let you know if I have any queries.
Reply all
Reply to author
Forward
0 new messages