[ns] transmission range
hi i am a master student and i am using ns2 as my simulation tool, my question is how to change the transmission range of a wireless node from the default 250m to 4om, in the manual its written that i a have to change the receiving threshold in threshold.cc and specify the propagation model as well and when i googled it i found out that i have to change the transmitted power, receiving threshold and carrier sense range . Do i have to edit ns-default.tcl and phy/wirelessphy.cc in addition to the threshold.cc can u plz guide me through it because i am really confused -- Regards... === Eng. Ghadeer Hassan
Re: [ns] Transmission Range of Node in WirelessPhyExt
Hello Itishi, Thanks a lot for your reply. If I want to use *200m* for transmission range and *TwoRayGround* for propagation model, what value should I change in default parameters of 802.11p? Please see default parameters for 802.11p in https://sites.google.com/site/nahoons2/english-con/ns2-simulation-with-802-11p RXThresh_ parameter has not used in Phy/WirelessPhyExt. Does your answer mean that I should only be use Pt_ for setting transmission range? regards, On Thu, Jun 13, 2013 at 6:46 AM, itishi saxena wrote: > Hello Falahati, > > Please refer following link for your answer, > http://mailman.isi.edu/pipermail/ns-users/2005-March/048467.html > -- > *From:* M Falahati > *To:* ns-users@ISI.EDU > *Sent:* Wednesday, 12 June 2013 10:47 PM > *Subject:* Re: [ns] Transmission Range of Node in WirelessPhyExt > > > Sorry, I think that previous my post has not send to ns-users! > > On Tue, Jun 11, 2013 at 3:30 PM, M Falahati wrote: > > > Hi, > > > > I want to use *802.11Ext* and *WirelessPhyExt* for simulating 802.11p in > * > > ns-2.35* and want to set transmission range of nodes to *200m*. > > > > > Which value should be change in default parameters of 802.11p ( > > > https://sites.google.com/site/nahoons2/english-con/ns2-simulation-with-802-11p > > )? > > > > I am appreciated if someone can send me the answer. > > > > regards, > > > > >
Re: [ns] Transmission Range of Node in WirelessPhyExt
Sorry, I think that previous my post has not send to ns-users! On Tue, Jun 11, 2013 at 3:30 PM, M Falahati wrote: > Hi, > > I want to use *802.11Ext* and *WirelessPhyExt* for simulating 802.11p in * > ns-2.35* and want to set transmission range of nodes to *200m*. > > Which value should be change in default parameters of 802.11p ( > https://sites.google.com/site/nahoons2/english-con/ns2-simulation-with-802-11p > )? > > I am appreciated if someone can send me the answer. > > regards, >
Re: [ns] Transmission range
Rafael, You would need to spend more time with NS2 manual. 1. How can I change the transmission power to allow 2 nodes communicate themselves at a max distance of 5m ? It depends on the propagation model you are using. Since its just 5 m, you may check Friis as Two Way Ground behaves as Friis as it operate below cut off frequency (assuming you are operating in a frequency above 2GHz). You would find the right Pt_ value when Pr at 5m is >=RxThreshold using your preferred propagation model. You may write you own simple code, use excel sheet or even use a built in program in NS2, I think its in the folder named "tools". How can I calculate the Pt_ value ? 2. Refer above. > What does a 0.28 Pt_ value mean ? 3. Its 0.28W rgds Saravanan K On Sat, Jan 26, 2013 at 7:56 PM, Rafael P B Mota wrote: > > How can I change the transmission power to allow 2 nodes communicate > themselves at a max distance of 5m ? How can I calculate the Pt_ value ? > What does a 0.28 Pt_ value mean ? > Thanks
[ns] Transmission range of a wireless node?
Hi ns2 users, I am trying to get the transmission range of a node and put it in my customized trace file. But when I access the variable radius_ in mobilenode.cc, the value is always zero. In my intuition, when I use: Phy/WirelessPhy set RXThresh_ 1.20174e-07 the value 1.20174e-07 should be convert correspondingly to meter and store in radius_, but it seems not happen like that. So my question is how to get the range of node, by meter, to put it in my trace file (or simply print it on the screen)? Thank you, Hieu Nguyen
[ns] Transmission range
How can I change the transmission power to allow 2 nodes communicate themselves at a max distance of 5m ? How can I calculate the Pt_ value ? What does a 0.28 Pt_ value mean ? Thanks
Re: [ns] Transmission Range in WirelessPhyExt
Hi, In WirelessPhyExt, a reception depends on the SINR level at the receiver, instead of a simple Rx_threshold. So Pt is a factor, but the noise level as well. Also, I think that no message may be received if its power is below the carrier sense threshold. If I remember my own experiments correctly, any message with enough power to be detected could be decoded if there were no interferences, which may, or may not be realistic. I have no clue about how to find realistic values for these parameters. Please tell me if you find anything about this. You will find all 802.11Ext parameters in tcl/lib/ns-defaults.tcl. Remi Alexander Adrowitzer a écrit : > Hi all, > I have some troubles in setting the transmission range in WirelessPhyExt > (ns-2.34). > I tested the examples with IEEE 802.11a and 802.11p and found (by > simulaiton) a transmission range of 163m and 202m respectively. > > Changing the value of Pt_ does change the transmission range, but not in > a "predictable" way. I use TwoRayGround model btw. > > Does anybody know how to calculate transmission range in WirelessPhyExt? > > Thanks > Alexander Adrowitzer > >
[ns] Transmission Range in WirelessPhyExt
Hi all, I have some troubles in setting the transmission range in WirelessPhyExt (ns-2.34). I tested the examples with IEEE 802.11a and 802.11p and found (by simulaiton) a transmission range of 163m and 202m respectively. Changing the value of Pt_ does change the transmission range, but not in a "predictable" way. I use TwoRayGround model btw. Does anybody know how to calculate transmission range in WirelessPhyExt? Thanks Alexander Adrowitzer
[ns] transmission range in wifi network
Hi all, I need to fix the transmission range for access points and mobile stations in an infrastructure wifi network. I mean, how to manage to let communication restricted to a given distance? I know that in the ns3.3 version, this parameter is not explicitly set, but affected by others like the TxPower and the channel loss model, but actually, I experimented multiple matching between those parameters but I have always stange results (a sta can affiliate with an APdistant of thousands of meters!!). Having distinct results from those of the wifi-phy-test.cc example, I wonder if this issue has a relation with other layers other than the Physical one? I find the hypothesis very stange but I really reproduced the same scenario as in wifi-phy-test.cc. May I missing something? - Did someone experiment this issue especially in high mobiliy network? or have an idea to deal with it differently? - Is the transmission range explicitly set in ns 3.4? If yes, which files were modified? Any answer would be very appreciated. Best regard. Ichrak
Re: [ns] Transmission Range in ns2.
Hey, for {set i 0} {$i < $opt(nn) } {incr i} { Phy/WirelessPhy set RXThresh_ value set node_($i) [$ns_ node] } will this work? if it will then i suppose this change the range statically. Can anything be done to change the range during runtime? Thanks On Mon, Dec 15, 2008 at 1:01 PM, Waleed Tuffaha wrote: > Hello Mayank, > > In ns-mobilenode.tcl there is this function: > > # set transmission power > Node/MobileNode instproc setPt { val } { > $self instvar netif_ > $netif_(0) setTxPower $val > } > > I haven't tried it before, so i'm not sure if it works. > > I usually change the transmission power by setting the PLCPDataRate_ > parameter, for example" > Mac/802_11 set PLCPDataRate_ 1.0e6 > but I use it to change the power for all nodes. > > > > > On Sun, Dec 14, 2008 at 6:46 PM, Mayank Daga wrote: > >> >> On Sun, Dec 14, 2008 at 1:39 AM, Mayank Daga >> wrote: >> >> > Dear All, >> > I want to set different ranges for each node. How can I do that. Using >> > threshold.cc, we set same range for all the nodes. >> > >> > Please help. >> > >> > -- >> > Regards, >> > Mayank Daga >> > MUKTI '09 | www.mukti09.in >> > >> >> Please help!!! >> >> -- >> Regards, >> Mayank Daga >> MUKTI '09 | www.mukti09.in >> > > > > -- > Waleed Tuffaha. > -- Regards, Mayank Daga MUKTI '09 | www.mukti09.in
Re: [ns] Transmission Range in ns2.
On Sun, Dec 14, 2008 at 1:39 AM, Mayank Daga wrote: > Dear All, > I want to set different ranges for each node. How can I do that. Using > threshold.cc, we set same range for all the nodes. > > Please help. > > -- > Regards, > Mayank Daga > MUKTI '09 | www.mukti09.in > Please help!!! -- Regards, Mayank Daga MUKTI '09 | www.mukti09.in
Re: [ns] transmission range
Oh Well As long as your happy it does not matter In a real world scenario, the carrier sense threshold and the receiver threshold are hardware specific and cannnot be changed. However the transmit power can be changed by increasing or decreasing the power sent to the transmitter, So in my research I have actually modified the transmit power to achieve the range as required by modifying the wireless phy to check what is the transmit range for each node. But all is well that ends well. regards Qasim > > The first pair did not communicate. Only n3 received packet means there > was > no data connection established between n0 and n1. > > As to the transmission range, it depends not only on transmission power, > but > also the receving threshold, and propogation model. ns2 uses TwoRayGround > as > the default propagation model, and the following parameters for the radio > interface, (from ns-default.tcl): > > # Initialize the SharedMedia interface with parameters to make > # it work like the 914MHz Lucent WaveLAN DSSS radio interface > Phy/WirelessPhy set CPThresh_ 10.0 > Phy/WirelessPhy set CSThresh_ 1.559e-11 > Phy/WirelessPhy set RXThresh_ 3.652e-10 > Phy/WirelessPhy set bandwidth_ 2e6 > Phy/WirelessPhy set Pt_ 0.28183815 > Phy/WirelessPhy set freq_ 914e+6 > Phy/WirelessPhy set L_ 1.0 > > Thus, it's transmission range is 250m, and cs range is 550m. > > In me script, I made the transmission power to a fixed value, and set the > propogation model to FreeSpace. I got csthresh and rxthresh values by > running the program threshold with the distance parameters to 50m, 100m, > and > 200m. Adjusting transmission power is another way to change the > transmssion > range, under the condition that we keep the rxthreshold fixed. In my case, > I > choose to keep the transmission power fixed, and adjust the rxthreshold. > They should achieve the same goal. > > Hope I made myself clear. > > Thanks. > > > > 2008/1/15 Q.R.Iqbal <[EMAIL PROTECTED]>: > >> Hi there >> It seems you have been working harder settuping up the scenario >> >> Yes I can see a slight problem in your script >> >> Phy/WirelessPhy set CPThresh_ 10.0 >> Phy/WirelessPhy set CSThresh_ 2.78831e-9;#100m >> Phy/WirelessPhy set RXThresh_ 1.11532e-8;#50m >> Phy/WirelessPhy set bandwidth_ 1Mb >> Phy/WirelessPhy set Pt_ 0.2818 (gives my signal will travel upto 250m ) >> >> >> The Pt_ value (transmit power) of 0.2818 will give your node a transmit >> range of 250m for a start. So any node within the 250m will receive that >> message no matter what its Carrier sense or Receiver threshold is. You >> need to lower that value to find what Pt_ value will give you the >> transmission range of 50m or 100m >> >> So in your test, when the first pair which should have the transmission >> range of only 50m are still commuinicating when they are 90m apart shows >> that something is wrong (and the answer is the transmission range is set >> to 250m) and so can probably confirm that by increasing the distance >> between the nodes to 250m. >> >> So first of all you need to work out the transmit power. Ns2 manual has >> the information on how to change the transmit power settings for >> different >> lengths. I hope it makes sense. >> >> regards >> >> Qasim >> Aston University >> Birmingham (UK) >> >> > Hi Qasim, >> > >> > Thanks for the reply and giving suggestions on the tesing scenarios. >> > >> > I made another test as you suggested, however, the result still looked >> > positive. The following is a brief description of the settings. >> > >> > Two pair of nodes are create. The first pair includes n0 and n01, and >> they >> > have a receiving range of 50m, CS range of 100m. They are placed at >> the >> > bottom of the topology (n0(0,0), n1(90,0)), with a distance of 90m. >> The >> > second pair includes n2 and n3, the receiving range is 100m, CS range >> is >> > 200m. They are placed at the top of topology (n2(0,500), n3(90,500)), >> and >> > again, with a distance of 90m. The two pairs are far away from each >> other, >> > so they do not interfere. >> > >> > At second 1.0, n0 starts to transmit a packet to n1, and n2 starts to >> > transmit a packet to n3 at the same time. >> > >> > If ns2 always use the same transmission range for all nodes in a >> script, >> > it >> > can only be the one of two cases in this test: >> > 1) using 50m transmission range. In this case, both connectio will >> fail, >> > and >> > no packet will be delivered to either n1 or n3; >> > 2) using 100m transmission range. In this case, both connection will >> > success, and both n1 and n3 will receive a packet. >> > >> > If ns2 uses two different transmission ranges, only the connection >> between >> > n2 and n3 will success, and the connection between n0 and n1 will >> fail. >> > Consequently, only n3 will receive a data packet. >> > >> > After running test, I found out delivered packets by the following >> > command: >> > >> > awk '$1=="r" && /AGT/' out.tr >> > >> > and it showed that
Re: [ns] transmission range
The first pair did not communicate. Only n3 received packet means there was no data connection established between n0 and n1. As to the transmission range, it depends not only on transmission power, but also the receving threshold, and propogation model. ns2 uses TwoRayGround as the default propagation model, and the following parameters for the radio interface, (from ns-default.tcl): # Initialize the SharedMedia interface with parameters to make # it work like the 914MHz Lucent WaveLAN DSSS radio interface Phy/WirelessPhy set CPThresh_ 10.0 Phy/WirelessPhy set CSThresh_ 1.559e-11 Phy/WirelessPhy set RXThresh_ 3.652e-10 Phy/WirelessPhy set bandwidth_ 2e6 Phy/WirelessPhy set Pt_ 0.28183815 Phy/WirelessPhy set freq_ 914e+6 Phy/WirelessPhy set L_ 1.0 Thus, it's transmission range is 250m, and cs range is 550m. In me script, I made the transmission power to a fixed value, and set the propogation model to FreeSpace. I got csthresh and rxthresh values by running the program threshold with the distance parameters to 50m, 100m, and 200m. Adjusting transmission power is another way to change the transmssion range, under the condition that we keep the rxthreshold fixed. In my case, I choose to keep the transmission power fixed, and adjust the rxthreshold. They should achieve the same goal. Hope I made myself clear. Thanks. 2008/1/15 Q.R.Iqbal <[EMAIL PROTECTED]>: > Hi there > It seems you have been working harder settuping up the scenario > > Yes I can see a slight problem in your script > > Phy/WirelessPhy set CPThresh_ 10.0 > Phy/WirelessPhy set CSThresh_ 2.78831e-9;#100m > Phy/WirelessPhy set RXThresh_ 1.11532e-8;#50m > Phy/WirelessPhy set bandwidth_ 1Mb > Phy/WirelessPhy set Pt_ 0.2818 (gives my signal will travel upto 250m ) > > > The Pt_ value (transmit power) of 0.2818 will give your node a transmit > range of 250m for a start. So any node within the 250m will receive that > message no matter what its Carrier sense or Receiver threshold is. You > need to lower that value to find what Pt_ value will give you the > transmission range of 50m or 100m > > So in your test, when the first pair which should have the transmission > range of only 50m are still commuinicating when they are 90m apart shows > that something is wrong (and the answer is the transmission range is set > to 250m) and so can probably confirm that by increasing the distance > between the nodes to 250m. > > So first of all you need to work out the transmit power. Ns2 manual has > the information on how to change the transmit power settings for different > lengths. I hope it makes sense. > > regards > > Qasim > Aston University > Birmingham (UK) > > > Hi Qasim, > > > > Thanks for the reply and giving suggestions on the tesing scenarios. > > > > I made another test as you suggested, however, the result still looked > > positive. The following is a brief description of the settings. > > > > Two pair of nodes are create. The first pair includes n0 and n01, and > they > > have a receiving range of 50m, CS range of 100m. They are placed at the > > bottom of the topology (n0(0,0), n1(90,0)), with a distance of 90m. The > > second pair includes n2 and n3, the receiving range is 100m, CS range is > > 200m. They are placed at the top of topology (n2(0,500), n3(90,500)), > and > > again, with a distance of 90m. The two pairs are far away from each > other, > > so they do not interfere. > > > > At second 1.0, n0 starts to transmit a packet to n1, and n2 starts to > > transmit a packet to n3 at the same time. > > > > If ns2 always use the same transmission range for all nodes in a script, > > it > > can only be the one of two cases in this test: > > 1) using 50m transmission range. In this case, both connectio will fail, > > and > > no packet will be delivered to either n1 or n3; > > 2) using 100m transmission range. In this case, both connection will > > success, and both n1 and n3 will receive a packet. > > > > If ns2 uses two different transmission ranges, only the connection > between > > n2 and n3 will success, and the connection between n0 and n1 will fail. > > Consequently, only n3 will receive a data packet. > > > > After running test, I found out delivered packets by the following > > command: > > > > awk '$1=="r" && /AGT/' out.tr > > > > and it showed that only n3 received a packet. I am not sure if my > settings > > is the same as what you suggested, and I am not 100% confident that this > > approach really works. But according to the test, it seems ns2 does > > support > > different transmission ranges this way. Any comment is welcome. > > > > Script: > > > > --- > > > > # First pair: n0 and n1, placed at the topology bottom, receiving range > > 50m, > > carrier sensing range 100m > > # Second pair: n2 and n3, placed at the topology top, receiving range > > 100m, > > carrier sensing range 200m > > # The two pairs are place far away from each other that they do not > > interfere > > > > # ==
Re: [ns] transmission range
Hi there It seems you have been working harder settuping up the scenario Yes I can see a slight problem in your script Phy/WirelessPhy set CPThresh_ 10.0 Phy/WirelessPhy set CSThresh_ 2.78831e-9;#100m Phy/WirelessPhy set RXThresh_ 1.11532e-8;#50m Phy/WirelessPhy set bandwidth_ 1Mb Phy/WirelessPhy set Pt_ 0.2818 (gives my signal will travel upto 250m ) The Pt_ value (transmit power) of 0.2818 will give your node a transmit range of 250m for a start. So any node within the 250m will receive that message no matter what its Carrier sense or Receiver threshold is. You need to lower that value to find what Pt_ value will give you the transmission range of 50m or 100m So in your test, when the first pair which should have the transmission range of only 50m are still commuinicating when they are 90m apart shows that something is wrong (and the answer is the transmission range is set to 250m) and so can probably confirm that by increasing the distance between the nodes to 250m. So first of all you need to work out the transmit power. Ns2 manual has the information on how to change the transmit power settings for different lengths. I hope it makes sense. regards Qasim Aston University Birmingham (UK) > Hi Qasim, > > Thanks for the reply and giving suggestions on the tesing scenarios. > > I made another test as you suggested, however, the result still looked > positive. The following is a brief description of the settings. > > Two pair of nodes are create. The first pair includes n0 and n01, and they > have a receiving range of 50m, CS range of 100m. They are placed at the > bottom of the topology (n0(0,0), n1(90,0)), with a distance of 90m. The > second pair includes n2 and n3, the receiving range is 100m, CS range is > 200m. They are placed at the top of topology (n2(0,500), n3(90,500)), and > again, with a distance of 90m. The two pairs are far away from each other, > so they do not interfere. > > At second 1.0, n0 starts to transmit a packet to n1, and n2 starts to > transmit a packet to n3 at the same time. > > If ns2 always use the same transmission range for all nodes in a script, > it > can only be the one of two cases in this test: > 1) using 50m transmission range. In this case, both connectio will fail, > and > no packet will be delivered to either n1 or n3; > 2) using 100m transmission range. In this case, both connection will > success, and both n1 and n3 will receive a packet. > > If ns2 uses two different transmission ranges, only the connection between > n2 and n3 will success, and the connection between n0 and n1 will fail. > Consequently, only n3 will receive a data packet. > > After running test, I found out delivered packets by the following > command: > > awk '$1=="r" && /AGT/' out.tr > > and it showed that only n3 received a packet. I am not sure if my settings > is the same as what you suggested, and I am not 100% confident that this > approach really works. But according to the test, it seems ns2 does > support > different transmission ranges this way. Any comment is welcome. > > Script: > > --- > > # First pair: n0 and n1, placed at the topology bottom, receiving range > 50m, > carrier sensing range 100m > # Second pair: n2 and n3, placed at the topology top, receiving range > 100m, > carrier sensing range 200m > # The two pairs are place far away from each other that they do not > interfere > > # == > #Definition > # == > set opt(chan) Channel/WirelessChannel ;# channel type > set opt(prop) Propagation/FreeSpace;# radio-propagation > set opt(ant) Antenna/OmniAntenna ;# Antenna type > set opt(ll) LL ;# Link layer type > set opt(ifq) CMUPriQueue;# Interface queue > set opt(ifqlen) 100;# max packet in ifq > set opt(netif) Phy/WirelessPhy;# network interface > set opt(mac)Mac/802_11 ;# MAC type > set opt(nn) 2 ;# number of mobilenodes > set opt(rp) DSR;# routing protocol > set opt(x)1000 > set opt(y)1000 > set opt(seed) 0.0 > set opt(stop) 10.0 > > # == > # Initialize Global Variables > # == > set ns [new Simulator] > > $ns use-newtrace > set trace [open out.tr w] > $ns trace-all $trace > > set namtrace [open out.nam w] > $ns namtrace-all-wireless $namtrace $opt(x) $opt(y) > > # == > # set up topography object > # == > set topo [new Topography] > $topo load_flatgrid $opt(x) $opt(y) > > # == > # Create God --> General Operations Director > # ==
Re: [ns] transmission range
I am sorry, the script messed up. Send it again. script: # First pair: n0 and n1, placed at the topology bottom, receiving range 50m, carrier sensing range 100m # Second pair: n2 and n3, placed at the topology top, receiving range 100m, carrier sensing range 200m # The two pairs are place far away from each other that they do not interfere # == #Definition # == set opt(chan) Channel/WirelessChannel ;# channel type set opt(prop) Propagation/FreeSpace;# radio-propagation set opt(ant) Antenna/OmniAntenna ;# Antenna type set opt(ll) LL ;# Link layer type set opt(ifq) CMUPriQueue;# Interface queue set opt(ifqlen) 100;# max packet in ifq set opt(netif) Phy/WirelessPhy;# network interface set opt(mac)Mac/802_11 ;# MAC type set opt(nn) 2 ;# number of mobilenodes set opt(rp) DSR;# routing protocol set opt(x)1000 set opt(y)1000 set opt(seed) 0.0 set opt(stop) 10.0 # == # Initialize Global Variables # == set ns [new Simulator] $ns use-newtrace set trace [open out.tr w] $ns trace-all $trace set namtrace [open out.nam w] $ns namtrace-all-wireless $namtrace $opt(x) $opt(y) # == # set up topography object # == set topo [new Topography] $topo load_flatgrid $opt(x) $opt(y) # == # Create God --> General Operations Director # == create-god $opt(nn) # == # Create channel (koneksi wireless) # == set chan_1 [new $opt(chan)] # == # configure and create nodes # == $ns node-config -addressType expanded \ -adhocRouting $opt(rp) \ -llType $opt(ll) \ -macType $opt(mac) \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON \ -macTrace OFF \ -movementTrace OFF \ -channel $chan_1 # === # create node 0,node 1 # === Phy/WirelessPhy set CPThresh_ 10.0 Phy/WirelessPhy set CSThresh_ 2.78831e-9;#100m Phy/WirelessPhy set RXThresh_ 1.11532e-8;#50m Phy/WirelessPhy set bandwidth_ 1Mb Phy/WirelessPhy set Pt_ 0.2818 Phy/WirelessPhy set freq_ 2.4e+9 Phy/WirelessPhy set L_ 1.0 Antenna/OmniAntenna set X_ 0 Antenna/OmniAntenna set Y_ 0 Antenna/OmniAntenna set Z_ 0.25 Antenna/OmniAntenna set Gt_ 1 Antenna/OmniAntenna set Gr_ 1 set node_(0) [$ns node] $node_(0) random-motion 0 $node_(0) set X_ 0.0 $node_(0) set Y_ 0.0 $node_(0) set Z_ 0.0 set node_(1) [$ns node] $node_(1) random-motion 0 $node_(1) set X_ 90.0 $node_(1) set Y_ 0.0 $node_(1) set Z_ 0.0 # # create node 2, node 3 # Phy/WirelessPhy set CPThresh_ 10.0 Phy/WirelessPhy set CSThresh_ 6.97078e-10 ;#200m Phy/WirelessPhy set RXThresh_ 2.78831e-9;#100m Phy/WirelessPhy set bandwidth_ 1Mb Phy/WirelessPhy set Pt_ 0.2818 Phy/WirelessPhy set freq_ 2.4e+9 Phy/WirelessPhy set L_ 1.0 Antenna/OmniAntenna set X_ 0 Antenna/OmniAntenna set Y_ 0 Antenna/OmniAntenna set Z_ 0.25 Antenna/OmniAntenna set Gt_ 1 Antenna/OmniAntenna set Gr_ 1 set node_(2) [$ns node] $node_(2) random-motion 0 $node_(2) set X_ 0.0 $node_(2) set Y_ 500.0 $node_(2) set Z_ 0.0 set node_(3) [$ns node] $node_(3) random-motion 0 $node_(3) set X_ 90.0 $node_(3) set Y_ 500.0 $node_(3) set Z_ 0.0 # UDP connections between from node_(0) to node_(1) set udp_(0) [new Agent/UDP] $ns attach-agent $node_(0) $udp_(0) $udp_(0) set fid_ 1 set null_(0) [new Agent/Null] $ns attach-agent $node_(1) $null_(0) set cbr_(0) [new Application/Traffic/CBR] $cbr_(0) set packetSize_ 512 $cbr_(0) set rate_ 200kb $cbr_(0) set maxpkts_ 1 $cbr_(0) attach-agent $udp_(0) $ns connect $udp_(0) $null_(0) $ns at 1.0 "$cbr_(0) start" set udp_(1) [new Agent/UDP] $ns attach-agent $node_(2) $udp_(1) $udp_(1) se
Re: [ns] transmission range
Hi Qasim, Thanks for the reply and giving suggestions on the tesing scenarios. I made another test as you suggested, however, the result still looked positive. The following is a brief description of the settings. Two pair of nodes are create. The first pair includes n0 and n01, and they have a receiving range of 50m, CS range of 100m. They are placed at the bottom of the topology (n0(0,0), n1(90,0)), with a distance of 90m. The second pair includes n2 and n3, the receiving range is 100m, CS range is 200m. They are placed at the top of topology (n2(0,500), n3(90,500)), and again, with a distance of 90m. The two pairs are far away from each other, so they do not interfere. At second 1.0, n0 starts to transmit a packet to n1, and n2 starts to transmit a packet to n3 at the same time. If ns2 always use the same transmission range for all nodes in a script, it can only be the one of two cases in this test: 1) using 50m transmission range. In this case, both connectio will fail, and no packet will be delivered to either n1 or n3; 2) using 100m transmission range. In this case, both connection will success, and both n1 and n3 will receive a packet. If ns2 uses two different transmission ranges, only the connection between n2 and n3 will success, and the connection between n0 and n1 will fail. Consequently, only n3 will receive a data packet. After running test, I found out delivered packets by the following command: awk '$1=="r" && /AGT/' out.tr and it showed that only n3 received a packet. I am not sure if my settings is the same as what you suggested, and I am not 100% confident that this approach really works. But according to the test, it seems ns2 does support different transmission ranges this way. Any comment is welcome. Script: --- # First pair: n0 and n1, placed at the topology bottom, receiving range 50m, carrier sensing range 100m # Second pair: n2 and n3, placed at the topology top, receiving range 100m, carrier sensing range 200m # The two pairs are place far away from each other that they do not interfere # == #Definition # == set opt(chan) Channel/WirelessChannel ;# channel type set opt(prop) Propagation/FreeSpace;# radio-propagation set opt(ant) Antenna/OmniAntenna ;# Antenna type set opt(ll) LL ;# Link layer type set opt(ifq) CMUPriQueue;# Interface queue set opt(ifqlen) 100;# max packet in ifq set opt(netif) Phy/WirelessPhy;# network interface set opt(mac)Mac/802_11 ;# MAC type set opt(nn) 2 ;# number of mobilenodes set opt(rp) DSR;# routing protocol set opt(x)1000 set opt(y)1000 set opt(seed) 0.0 set opt(stop) 10.0 # == # Initialize Global Variables # == set ns [new Simulator] $ns use-newtrace set trace [open out.tr w] $ns trace-all $trace set namtrace [open out.nam w] $ns namtrace-all-wireless $namtrace $opt(x) $opt(y) # == # set up topography object # == set topo [new Topography] $topo load_flatgrid $opt(x) $opt(y) # == # Create God --> General Operations Director # == create-god $opt(nn) # == # Create channel (koneksi wireless) # == set chan_1 [new $opt(chan)] # == # configure and create nodes # == $ns node-config -addressType expanded \ -adhocRouting $opt(rp) \ -llType $opt(ll) \ -macType $opt(mac) \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON \ -macTrace OFF \ -movementTrace OFF \ -channel $chan_1 # === # create node 0,node 1 # === Phy/WirelessPhy set CPThresh_ 10.0 Phy/WirelessPhy set CSThresh_ 2.78831e-9;#100m Phy/WirelessPhy set RXThresh_ 1.11532e-8;#50m Phy/WirelessPhy set bandwidth_ 1Mb Phy/WirelessPhy set Pt_ 0.2818 Phy/WirelessPhy set freq_ 2.4e+
Re: [ns] transmission range
Hi there What you really need to do is to see that if you have two different pair of nodes. One pair with the same range e.g. 50m and another pair with the range 100m. You set both the pairs apart o they cannot interefere with each others transmission. You will see, that the transmission range of the node that is defined first will be set for all the nodes. So in my case if I have a node 0 with transmission range set to 50 m then all the nodes in that script will automatically have 50m transmission range. Hence the pair with 100m range will also have 50m range. On the other hand if my node 0 has the range of 100m then all the remaining nodes will be set to that range, even though the nodes whos range is 50m. So while writing your script you need to set pairs to see clearly how the communications takes place. You want to make sure you are not simulating bugs for 6 months. So when you say transmit range of n0 > n1, but ns2 has already assigned n1 the same range as n0. Try to make two pairs, e.g. four nodes where node 0 and 1 have same range but lower then the second pair n2 and n3 and each pair communicated with each other, you will see that when n0 and n1 are communicating, n2 and n3 do not communicate, e.g. ns as implied the same transmit range to all the four nodes. Change the transmission ranges e.g node 0 and node 1 with higher range and n2 and n3 with lower range, you will see all nodes are transmitting. I think just having two nodes is ver risky to prove what you are saying In reality to make individual transmission range to work for each node, use need to modify the wirelessphy.cc file Kind regards Qasim Raza Iqbal PhD Candidate, ACNRG Lab N504, Office N505 Adaptive Communications Networks Research Group, School of Engineering And Applied Science Aston University Birmingham B4 7ET United Kingdom http://www.ee.aston.ac.uk/research/acrg/index.html > > Hi Muhamad, > > I tried your script, and understood how you did it. However, I did not > observe any data packet delivered from source to host node. Also, your > scenario looks a little bit complex for me. > > So, I designed a simple scenario which has only two nodes, with different > receiving ranges (n0's range > n1's). I also used DSR to transmit one > packet > from n0 to n1, and n1 to n0. There was no data packet delivery, because > DSR > requres a two-way communicaiton for route discovery. But I did observed > the > consequence of having different receiving range on n0 and n1: the > broadcast > packets from n1 can reach n0, but those from n0 cannot reach n1. > > I think this verifies that we can indeed use two different receiving > ranges > in one simulaiton. The following is my tcl script. You can find more > detail > on my blog, http://ns-3.blogspot.com/. > > Thanks. > > tcl script: > - > > # n0 and n1 use the same transmission power. > # n0 has a receiving range of 250m, n1's receiving range is 160m. > # n0 and n1 are 200m away from each other. > # n1 cannot receive routing requests broadcast by n0; > # however, n0 can receive routing requests broadcast by n1. > > # == > #Definition > # == > set opt(chan) Channel/WirelessChannel ;# channel type > set opt(prop) Propagation/FreeSpace;# radio-propagation > set opt(ant) Antenna/OmniAntenna ;# Antenna type > set opt(ll) LL ;# Link layer type > set opt(ifq) CMUPriQueue;# Interface queue > set opt(ifqlen) 100;# max packet in ifq > set opt(netif) Phy/WirelessPhy;# network interface > set opt(mac)Mac/802_11 ;# MAC type > set opt(nn) 2 ;# number of mobilenodes > set opt(rp) DSR;# routing protocol > set opt(x)1000 > set opt(y)1000 > set opt(seed) 0.0 > set opt(stop) 10.0 > > # == > # Initialize Global Variables > # == > set ns [new Simulator] > > $ns use-newtrace > set trace [open out.tr w] > $ns trace-all $trace > > set namtrace [open out.nam w] > $ns namtrace-all-wireless $namtrace $opt(x) $opt(y) > > # == > # set up topography object > # == > set topo [new Topography] > $topo load_flatgrid $opt(x) $opt(y) > > # == > # Create God --> General Operations Director > # == > create-god $opt(nn) > > # == > # Create channel (koneksi wireless) > # == > set chan_1 [new $opt(chan)] > > # ==
Re: [ns] transmission range
Hi Muhamad, I tried your script, and understood how you did it. However, I did not observe any data packet delivered from source to host node. Also, your scenario looks a little bit complex for me. So, I designed a simple scenario which has only two nodes, with different receiving ranges (n0's range > n1's). I also used DSR to transmit one packet from n0 to n1, and n1 to n0. There was no data packet delivery, because DSR requres a two-way communicaiton for route discovery. But I did observed the consequence of having different receiving range on n0 and n1: the broadcast packets from n1 can reach n0, but those from n0 cannot reach n1. I think this verifies that we can indeed use two different receiving ranges in one simulaiton. The following is my tcl script. You can find more detail on my blog, http://ns-3.blogspot.com/. Thanks. tcl script: - # n0 and n1 use the same transmission power. # n0 has a receiving range of 250m, n1's receiving range is 160m. # n0 and n1 are 200m away from each other. # n1 cannot receive routing requests broadcast by n0; # however, n0 can receive routing requests broadcast by n1. # == #Definition # == set opt(chan) Channel/WirelessChannel ;# channel type set opt(prop) Propagation/FreeSpace;# radio-propagation set opt(ant) Antenna/OmniAntenna ;# Antenna type set opt(ll) LL ;# Link layer type set opt(ifq) CMUPriQueue;# Interface queue set opt(ifqlen) 100;# max packet in ifq set opt(netif) Phy/WirelessPhy;# network interface set opt(mac)Mac/802_11 ;# MAC type set opt(nn) 2 ;# number of mobilenodes set opt(rp) DSR;# routing protocol set opt(x)1000 set opt(y)1000 set opt(seed) 0.0 set opt(stop) 10.0 # == # Initialize Global Variables # == set ns [new Simulator] $ns use-newtrace set trace [open out.tr w] $ns trace-all $trace set namtrace [open out.nam w] $ns namtrace-all-wireless $namtrace $opt(x) $opt(y) # == # set up topography object # == set topo [new Topography] $topo load_flatgrid $opt(x) $opt(y) # == # Create God --> General Operations Director # == create-god $opt(nn) # == # Create channel (koneksi wireless) # == set chan_1 [new $opt(chan)] # == # configure and create nodes # == $ns node-config -addressType expanded \ -adhocRouting $opt(rp) \ -llType $opt(ll) \ -macType $opt(mac) \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON \ -macTrace OFF \ -movementTrace OFF \ -channel $chan_1 # # create node 0, receiving range 250m, carrier sensing range 500m # Phy/WirelessPhy set CPThresh_ 10.0 Phy/WirelessPhy set CSThresh_ 9.21756e-11 ;#550m Phy/WirelessPhy set RXThresh_ 4.4613e-10;#250m Phy/WirelessPhy set bandwidth_ 512kb Phy/WirelessPhy set Pt_ 0.2818 Phy/WirelessPhy set freq_ 2.4e+9 Phy/WirelessPhy set L_ 1.0 Antenna/OmniAntenna set X_ 0 Antenna/OmniAntenna set Y_ 0 Antenna/OmniAntenna set Z_ 0.25 Antenna/OmniAntenna set Gt_ 1 Antenna/OmniAntenna set Gr_ 1 set node_(0) [$ns node] $node_(0) random-motion 0 $node_(0) set X_ 0.0 $node_(0) set Y_ 0.0 $node_(0) set Z_ 0.0 # === # create node 1, receiving range 160m, carrier sensing range 400m # === Phy/WirelessPhy set CPThresh_ 10.0 Phy/WirelessPhy set CSThresh_ 1.74269e-10 ;#400m Phy/WirelessPhy set RXThresh_ 1.08918e-9;#160m Phy/WirelessPhy set bandwidth_ 512kb Phy/WirelessPhy set Pt_ 0.2818 Phy/WirelessPhy set freq_ 2.4e+9 Phy/WirelessPhy set L_ 1.0 Antenna/OmniAntenna set X_ 0 Antenna/OmniAntenna set Y_ 0 Antenna/OmniAntenna set Z_ 0.25 Antenna/OmniAntenna set Gt_ 1 Antenna/Omn
Re: [ns] transmission range change dynamically
Hi, Is it possible to change the transmission range run time? For example if a node upon some condition wishes to increase its range by say, 50 meter after the simulation started what it has to do? best regards, Sabbir. Date: Fri, 4 Jan 2008 08:14:03 -0800 (PST) From: Ehsan Bagherian <[EMAIL PROTECTED]> Subject: Re: [ns] transmission range To: ns-users@ISI.EDU Message-ID: < [EMAIL PROTECTED]> Content-Type: text/plain; charset=iso-8859-1 hi you can change node configurataion many times in your tcl code and define nodes in belw of node configurataion definition, also you can change Pt_ and RXThresh_ for transmit and recieve ranges Ehsan B, -- > > --- > Never miss a thing. Make Yahoo your homepage. > > --
Re: [ns] transmission range
i have add my script as an attachment in the previous mail On Jan 5, 2008 4:10 AM, Song Luo <[EMAIL PROTECTED]> wrote: > Can you give more detail on how you manually set node sensitivities right > before creating nodes? Do you write your code in C++ files? which C++ or tcl > files did you modify? And what are the statements? Maybe an example or the > files you are currently using can better illustrates. If possible, can you > send me your simulation script and modified source files, I am very > interested in giving it a shot. > > Thanks. > > > On Jan 4, 2008 10:56 AM, muhamad faiz arief budianto <[EMAIL PROTECTED]> > wrote: > > > > > > > i think, actually we can't set our transmission range on each node, > > without > > changing or hack the code from ns. > > for now i just set my sensitivity node (RXthre, CST, etc). and set it > > manually just right before we create the nodes. > > I already make some simple simulation, for trying some kind of wireless > > sensor sims u can say . > > It has 25 node and have 3 kind of node. > > 1 node for the HOST (80 m range) > > 7 node for the MIDDLE (50 m range) > > 17 node for the END (30 m range) > > the data can travel just from the node that already on it's range. > > > > the scenario is, the field is just like war field, so i have to send > > data > > packet from node 13 to 0 (END to HOST). > > i disabled the movement. just try it n give me some feedback about the > > range > > from each node. > > If you want more clearly about the range transmission, i draw the field > > and > > node deployment with some design software (CORELDRAW). > > -- > > jho > > > > > > > -- > Song Luo > Intelligent Automation, Inc. -- jho
Re: [ns] transmission range
Can you give more detail on how you manually set node sensitivities right before creating nodes? Do you write your code in C++ files? which C++ or tcl files did you modify? And what are the statements? Maybe an example or the files you are currently using can better illustrates. If possible, can you send me your simulation script and modified source files, I am very interested in giving it a shot. Thanks. On Jan 4, 2008 10:56 AM, muhamad faiz arief budianto <[EMAIL PROTECTED]> wrote: > > > i think, actually we can't set our transmission range on each node, > without > changing or hack the code from ns. > for now i just set my sensitivity node (RXthre, CST, etc). and set it > manually just right before we create the nodes. > I already make some simple simulation, for trying some kind of wireless > sensor sims u can say . > It has 25 node and have 3 kind of node. > 1 node for the HOST (80 m range) > 7 node for the MIDDLE (50 m range) > 17 node for the END (30 m range) > the data can travel just from the node that already on it's range. > > the scenario is, the field is just like war field, so i have to send data > packet from node 13 to 0 (END to HOST). > i disabled the movement. just try it n give me some feedback about the > range > from each node. > If you want more clearly about the range transmission, i draw the field > and > node deployment with some design software (CORELDRAW). > -- > jho > > -- Song Luo Intelligent Automation, Inc.
Re: [ns] transmission range
hi you can change node configurataion many times in your tcl code and define nodes in belw of node configurataion definition, also you can change Pt_ and RXThresh_ for transmit and recieve ranges Ehsan B, - Never miss a thing. Make Yahoo your homepage.
[ns] transmission range
i think, actually we can't set our transmission range on each node, without changing or hack the code from ns. for now i just set my sensitivity node (RXthre, CST, etc). and set it manually just right before we create the nodes. I already make some simple simulation, for trying some kind of wireless sensor sims u can say . It has 25 node and have 3 kind of node. 1 node for the HOST (80 m range) 7 node for the MIDDLE (50 m range) 17 node for the END (30 m range) the data can travel just from the node that already on it's range. the scenario is, the field is just like war field, so i have to send data packet from node 13 to 0 (END to HOST). i disabled the movement. just try it n give me some feedback about the range from each node. If you want more clearly about the range transmission, i draw the field and node deployment with some design software (CORELDRAW). -- jho
Re: [ns] transmission range
> > that's also what I want to know. If you find a solution, please share with > me. Thanks a lot! > > > > On Dec 31, 2007 10:05 PM, muhamad faiz arief budianto <[EMAIL PROTECTED]> > wrote: > > > > > how can i set or define each node to have different transmission range? > > i think i should change the *Phy*/WirelessPhy parameter. > > but it just works for all nodes. I want it just work for some node. > > I already try to use the hierarchy transmission, like from wired to > > wireless > > (different cluster) > > but it's stuck!!! > > > > Please help > > > > -- > > jho > > > > > > -- > Song Luo > Intelligent Automation, Inc. -- Song Luo Intelligent Automation, Inc.
[ns] transmission range
how can i set or define each node to have different transmission range? i think i should change the *Phy*/WirelessPhy parameter. but it just works for all nodes. I want it just work for some node. I already try to use the hierarchy transmission, like from wired to wireless (different cluster) but it's stuck!!! Please help -- jho
[ns] transmission range problem in 802.11 (continued)
Hi, Can you tell us what is your propagation model, Phy/WirelessPhy set CPThresh_ 10.0 //Collision threshold When multi-frames are received simultaneously by one mobile node, it calculates the ratio of the strongest frames signal strength to the signal strength sum of other frames. NS2 has one threshold (CPThresh_) for this ratio. If it is larger than CPThresh_, the frame will be received correctly and other frames are ignored. Otherwise, all frames are collided and discarded. Regards hamid reza __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[ns] transmission range problem in 802.11 (continued)
Dear all, Thanks for your attention. This time I am trying to make things clearer. I have 5x5 grid network with 200m spacing between rows and columns as follows: 0-123--4 | | | | | | | | | | 5-678--9 | | | | | | | | | | 10--11---12--1314 | | | | | | | | | | 15--16---17--1819 | | | | | | | | | | 20--21---22--2324 I need extended transmission range for particular broadcast packets, so I setup related values for receiving this type of packets in "wireless-phy.cc" as CPThresh_=30; // I am not sure how to set this value. Just my guess. RXThresh_=6.87305e-12; //675m CSThresh_=1.42681e-12; //1000m They are computed using "thresh.cc" tool. The problem is when I send broadcast packets from node 7 to all other nodes. Node 20 and 24 are 721m from node 7, so not supposed to receive packets. However, in my simulation, node 21, 22 and 23 did NOT receive packets either. Node 21 and 23 are 632m from node 7, and node 22 is 600mfrom node 7. All three of them are supposed to receive packets. I am not able to figure this problem out. Hope you guys have some clues to help me. Thanks much for your help.
[ns] Transmission range
Hi all, I put in simulation script this row : Phy/WirelessPhy set RXThresh_8.71838e-09 ;# threshold to have a transmission range of 150m I use to create it the script threshold.cc but if I put in simulation script this position nodes $node_(0) set X_ 100 $node_(0) set Y_ 150 $node_(0) set Z_ 1.0 $node_(1) set X_ 270 $node_(1) set Y_ 150 $node_(1) set Z_ 1.0 they can send and receive messages even if they are out of range. Instead I want that they have a range of 150m,what can I do? Thanks in advance. - Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive
[ns] transmission range
Hi all, I put in simulation script this row : Phy/WirelessPhy set RXThresh_8.71838e-09 ;# threshold to have a transmission range of 150m I use to create it the script threshold.cc but if I put in simulation script this position nodes $node_(0) set X_ 100 $node_(0) set Y_ 150 $node_(0) set Z_ 1.0 $node_(1) set X_ 270 $node_(1) set Y_ 150 $node_(1) set Z_ 1.0 they can send and receive messages even if they are out of range. Instead I want that they have a range of 150m,what can I do? Thanks in advance. Tom - Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3