Hi All, Our website moved to a new URL. Please bookmark the new link: https://ns2bloggers.blogspot.com/

Monday, 21 April 2014

NEED OF ENERGY MODEL IN NETWORK SIMULATOR 2

By enabling energy model in node configuration of a wireless node, we get more accurate results.By default node configuration, the energy on node is infinite i.e there is no energy log will be carried out.

NODE CONFIGURATION WITHOUT ENERGY MODEL
$ns node-config   -addressType hierarchical \
                            -adhocRouting AODV \
                            -llType LL \
                            -macType Mac/802_11 \
                           -ifqType Queue/DropTail/PriQueue \
                           -ifqLen 50 \
                           -antType Antenna/OmniAntenna \
                           -propType Propagation/TwoRayGround \
                           -phyType Phy/WirelessPhy \
                           -topologyInstance $topo \
                           -channel Channel/WirelessChannel \
                           -agentTrace ON \
                           -routerTrace ON \
                           -macTrace OFF \
                           -movementTrace OFF
NODE CONFIGURATION WITH ENERGY MODEL
$ns node-config   -addressType hierarchical \
                            -adhocRouting AODV \
                            -llType LL \
                            -macType Mac/802_11 \
                           -ifqType Queue/DropTail/PriQueue \
                           -ifqLen 50 \
                           -antType Antenna/OmniAntenna \
                           -propType Propagation/TwoRayGround \
                           -phyType Phy/WirelessPhy \
                           -topologyInstance $topo \
                           -channel Channel/WirelessChannel \
                           -agentTrace ON \
                           -routerTrace ON \
                           -macTrace OFF \
                           -movementTrace OFF \
                           -energyModel EnergyModel \
                           -initialEnergy 90 \
                           -txPower 0.5 \
                           -rxPower 0.3 \
                           -idlePower 0.05 \
                           -sleepPower 0.03 \ 
                           
NOTE: initial energy is in Joule and all other energy parameters are in Watts.

6 comments :

  1. how can we use variable transmission power which depends on the transmission distance?

    ReplyDelete
    Replies
    1. you can simply change the transmission power from the tcl script itself

      Delete
  2. how to print residual energy of all the nodes in aodv ?

    ReplyDelete
    Replies
    1. you can use awk script or perl script for thal

      Delete
  3. I followed the code that u type it above, but i got errors

    num_nodes is set 8
    can't read "ns": no such variable
    while executing
    "$ns node-config -addressType hierarchical \
    -adhocRouting AODV \
    -llType LL \
    ..."
    (file "mscproject.tcl" line 51)

    how can i fixed this, and if this will give us the energy of the node after appling AWK or PERL script?

    ReplyDelete
    Replies
    1. use ns always..may be u used ns_ instead of ns

      Delete