How to change transmission power of wifi in ns3

1,546 views
Skip to first unread message

rashad kasim

unread,
Nov 27, 2015, 7:21:36 AM11/27/15
to ns-3-users
Hi all,
  I am trying to use wifi for longer range communication and as a part of it, I want to increase its transmission power.
I used below part of code
YansWifiPhyHelper wifiInternetPhy = YansWifiPhyHelper::Default ();
  wifiInternetPhy.Set ("TxPowerStart", DoubleValue(1600.0206));
  wifiInternetPhy.Set ("TxPowerEnd", DoubleValue(160.0206));
  wifiInternetPhy.Set ("TxPowerLevels", UintegerValue(1));
  wifiInternetPhy.Set ("TxGain", DoubleValue(15) );
  wifiInternetPhy.Set ("RxGain", DoubleValue (5) );

But still the radiation range is still the same. Am I making any mistake? Is there any problem if I use default while object creation and then assign other values like I have done?

Regards,
RK

rashad kasim

unread,
Nov 27, 2015, 7:30:53 AM11/27/15
to ns-3-users
It would also be great if someone could give me pointer how I can use Wimax in mesh mode.

Regards,
RK

Konstantinos

unread,
Nov 27, 2015, 7:47:37 AM11/27/15
to ns-3-users
Hi Rashad,

I do not know what sort of wireless system you want to simulate but those Tx Power levels are un-realistic. 
The maximum allowable power is usually <40dBm and you have put it 160 and 1600.... 
See this link http://www.digitalairwireless.com/wireless-blog/t-eirp/wifi-transmit-power-calculations-made-simples.html

Now, in order to have different levels you have to specify how many. 
  wifiInternetPhy.Set ("TxPowerLevels", UintegerValue(1));

Now, you have only one, so it simply does not change.
If you add more TxPowerLevels, then you can see dynamic range.

Regards,
K.

rashad kasim

unread,
Nov 29, 2015, 5:40:59 PM11/29/15
to ns-3-users
Hello Konstantinos,
  Thanks for your reply.
Actually I am trying to see what is the maximum distance for which a node in wifi can be placed away from the wifi node. I tried with default of wifiPhyHelper object, and also tried with higher values. But all the corresponding simulation showed same distance without any improvement.
It would be great, if could give any suggestion to check the maximum signal reaching distance.

Regards,
Rashad

Konstantinos

unread,
Nov 30, 2015, 5:24:21 AM11/30/15
to ns-3-users
Hi Rashad,

Have you studied the examples already provided by NS-3, e.g. examples/wireless/rate-adaptation-distance.cc ?
Also, the communication range is a well discussed topic in the list. It has also been explained in the training slides regarding wireless and it depends on many parameters.
Please consider reading the documentation. 

Regards,
K.

rashad kasim

unread,
Nov 30, 2015, 7:12:14 AM11/30/15
to ns-3-users
Hi Konstantinos,
  Thanks for your timely reply and also for your valuable time.
I will go through those examples again and try to understand those examples for better insight.
But my question is more on the relationship between power and radiating distance, given all other parameters are kept fixed. Is it possible just by varying these power related parameters?

Regards,
Rashad

Konstantinos

unread,
Nov 30, 2015, 7:25:05 AM11/30/15
to ns-3-users
The relationship between power and radiating distance is explained in many books related to wireless communications. 
I would recommend studying one of them, e.g. Digital Communications by J. Proakis.

Still when you vary them, you should use 'valid' values. With 1600dBm (~1.0e+157 Watts) you build a death ray, not a wifi transceiver. 

rashad kasim

unread,
Nov 30, 2015, 7:34:41 AM11/30/15
to ns-3-users
Thanks Konstantinos,
    I will have a looks at the book you suggested.
But the value 1600dBm was just some random value. I started with the default value 16dBm, then kept on varying up and down. I could not see any change in the radiating distance. Unfortunately the value was 1600dBm when I took the screenshot. :(

Regards,
Rashad

Konstantinos

unread,
Nov 30, 2015, 7:49:12 AM11/30/15
to ns-3-users
How do you define radiating distance because it is the first time I come across such term. 
Usually it is communication range or similar term.

rashad kasim

unread,
Nov 30, 2015, 8:14:42 AM11/30/15
to ns-3-users
sorry about confusion on the terminology. When I say radiation distance, I mean the communication range. As in the minimum coordinate where the signal power 0mw.

Apologising again for the confusion.

Regards,
Rashad

Konstantinos

unread,
Nov 30, 2015, 5:32:02 PM11/30/15
to ns-3-users
I do not think that you will ever see signal power 0mw as you will always receive something, it could be noise. That's why you do not see any difference by changing the Tx signal power
The point is when that signal you receive is comprehensible. 
Again, the place to look for is the manual and the book I referred you. 


Regards,
K.
Reply all
Reply to author
Forward
0 new messages