help regarding energy model in wsn simulation

440 views
Skip to first unread message

Soumya Banerjee

unread,
Jun 3, 2014, 2:32:07 PM6/3/14
to ns-3-...@googlegroups.com
In the attached file I am simulating a single sink multiple sink scenario 

routing done accordingly to AODV
all the nodes  send data to the sink every 'interval' seconds

Now for the energy in the energy source all nodes are depleted around 33 minutes regardless of whether   'interval'  is 10 seconds or 15 minutes

why is this happening ?
and how do I rectify it?
final.cc

Tommaso Pecorella

unread,
Jun 3, 2014, 4:21:34 PM6/3/14
to ns-3-...@googlegroups.com
This Is Not a WSN

Sorry if I write this in bold, huge font, but things have to be named in the right way.

This is a (honest) Wi-Fi, 802.11b network where nodes are transmitting at low bit rate.
This does not qualify it as a WSN.

About why your network is discharging so fast, I'm 99.95% sure that you have a lot of "background" traffic, and it is there also if no traffic is generated.
Try checking the pcap with wireshark, and see how many packets are sent / received even when no traffic is generated.

Moreover, 802.11 radio doesn't go into sleep mode when not used. As a consequence, it's always draining the battery. The only difference is that...
OH, I see... you've set the Rx energy to ZERO !
I hope your head of research (or your reviewers) will not find it. I really hope so.

Anyway, check the amount of "unsolicited" traffic. I'm quite sure that it's dominant over the data traffic.

T.

PS: to go ahead and reply to your obvious question (how to fix it). Don't use Wi-Fi pretending it's a WSN. If you're really meant to use Wi-Fi in a "sensor" system (poorest idea ever, but some industries seems to want it), don't use tricks and tell them the truth. Wi-Fi will drain your batteries in no time. AODV is not going to help.

Soumya Banerjee

unread,
Jun 4, 2014, 1:34:47 AM6/4/14
to ns-3-...@googlegroups.com
I realized I'm messing up but I didn't realize the magnitude
Its supposed to be a wsn. 

and the Rx energy that was  not zero; I set it to zero in desperation and then forgot to correct it.

Anyway Thanks that you took the time to point out the errors. I'll go and try to correct the errors

Soumya Banerjee

unread,
Jun 4, 2014, 2:05:04 AM6/4/14
to ns-3-...@googlegroups.com
I looked a bit, I think I have to use the  lr-wpan model for ns-3


Could you point me to some example that I can study ?
I only found wsn-ping6.cc  from which i could not understand how to use it properly



Tommaso Pecorella

unread,
Jun 4, 2014, 3:44:05 AM6/4/14
to ns-3-...@googlegroups.com
Hi,

this should be a bit easier to work with:
src/sixlowpan/examples/example-ping-lr-wpan.cc

You can find it in the latest ns-3-dev or in the upcoming 3.20.

I have one bad news, tho... the energy module is not integrated in lr-wpan. As a consequence, you'll be able to do all the measures in a more reliable way, but not the energy ones.
The energy module will be integrated into lr-wpan in the next release (hopefully).

Cheers,

T.

Haider Alkafajy

unread,
Mar 29, 2015, 12:08:21 PM3/29/15
to ns-3-...@googlegroups.com
Hi Tommso
is the energy module  integrated into lr-wpan in NS3.22 ?

Tommaso Pecorella

unread,
Mar 29, 2015, 12:19:10 PM3/29/15
to ns-3-...@googlegroups.com
Hi,

not yet. See the GSoC 2015 ideas page for further details.

Cheers,

T.

Haider Alkafajy

unread,
Mar 29, 2015, 12:57:03 PM3/29/15
to ns-3-...@googlegroups.com
thank you for replay Tommso

kindly, which page you mean?

Tommaso Pecorella

unread,
Mar 29, 2015, 1:04:49 PM3/29/15
to ns-3-...@googlegroups.com
Message has been deleted

Tommaso Pecorella

unread,
Mar 29, 2015, 2:18:04 PM3/29/15
to ns-3-...@googlegroups.com
Hi,

just a quick reply. If the GSoC idea is there, it means that we need still to implement the WSN energy model.

You could have a rough estimate of the energy used, but it's not realistic. The problem is that simply counting the Tx/Rx packets may give you an idea, but it wouldn't consider the collisions, retransmissions, etc. due to a realistic energy conserving MAC.

About the other issues (routing and so on) you could easily use a static routing. The topology is simple enough to allow this approach.

The packet sending is a matter of installing a normal ns-3 traffic generation app on each node. Something you learn doing the tutorial.

Cheers,

T.


On Sunday, March 29, 2015 at 8:10:42 PM UTC+2, Haider Alkafajy wrote:
thank you very much Tommaso

kindly, my project for build WSN scenario as show in figure, with initial energy 2 joules for each node and using 802.15.4 as Mac protocol  
So, my questions:
1-  is it possible to build this scenario as WSN in ns3 (every node send only one udp packet to base station in round) and how?
 2- how to calculate remaining energy in every node from time to time? 
3- how to make this connection between nodes?


i know your  are busy but really appreciate your answer and efforts
thank you  

Haider A.

Haider Alkafajy

unread,
Mar 29, 2015, 4:45:07 PM3/29/15
to ns-3-...@googlegroups.com
Thank you very much for help
regards

Haider A.

marana...@gmail.com

unread,
Dec 8, 2015, 9:48:17 AM12/8/15
to ns-3-users
It seems I have the same problem.
I wanted to use the basic energy harvester for the lr-wpan network and I got stuck.
I dont have the helper classes to easily Install the the energy source into the node :(
I hope this thing will be finalized soon.
I would be glad to know also if somebody has really made a feasible trick on this  

Tommaso Pecorella

unread,
Dec 8, 2015, 10:01:25 AM12/8/15
to ns-3-users
Hi,

that, interesting enough, is being discussed right now. Like, between yesterday and today.

T.
Reply all
Reply to author
Forward
0 new messages