Modifying transmission range values in ns-2

Tuesday, October 5, 2010 2:15 AM Posted by naz
Labels: ,

In my final year project, I have to vary the transmission range value in order to study the protocol behaviour using simulation with NS-2.

This can be done using a separate C program that is provided at ~ns/indep-utils/propagation/ to compute the receiving threshold. It can be used for all the propagation models as discussed in ns-manual 18.4.

In some applications, a user may want to specify the communication range of wireless nodes. This can be done by set an appropriate value of the receiving threshold in the network interface, 
  • Phy/WirelessPhy set RXThresh_ \

Compile using this command:
  • g++ -o threshold

Assume you have compiled it and get the excutable named as threshold. You can use it to compute the threshold as follows:
  • threshold -m \ [other-options] distance
    • where propagation-model is either FreeSpaceTwoRayGround or Shadowing, and the distance is the communication range in meter.
    • [other-options] are used to specify parameters other than their default values. For the shadowing model there is a necessary parameter, -r receive-rate, which specifies the rate of correct reception at thedistance.
    • Because the communication range in the shadowing model is not an ideal circle, an inverse Q-function [29] is used to calculate the receiving threshold. For example, if you want 95% of packets can be correctly received at the distance of 50m, you can compute the threshold by
  • threshold -m Shadowing -r 0.95 50
    • Other available values of [other-options] are shown below
    • -pl \ -std \ -Pt \ -fr \ -Gt \ -Gr \ -L \ -ht \ -hr \ -d0 \
Include new value in TCL file, example:

Comments (3)

I was not able to get the value for RXThreshold for transmission distance of 275m. I gave the command threshold -m TwoRayGround 250

Post a Comment