about the battery model parameters Inetmanet

538 views
Skip to first unread message

Ernesto Garcia

unread,
Nov 12, 2012, 5:23:51 AM11/12/12
to omn...@googlegroups.com
Hi

I would like to know the meaning of some values of the battery model used in inetmanet. I'm not sure if these values are correct or they are set up properly. 

I'using 802.15.4 model of a previous version of Inetmanet 2.0.

Theses are the values in my omnet.ini
**.battery.nominal = 25
**.battery.capacity = 25
**.battery.voltage = 3.3
**.battery.resolution = 0.01s
**.battery.publishDelta = 0.3
**.battery.publishTime = 0.02s

I will appreciate your help.


All the best,

--
Ernesto

Alfonso Ariza Quintana

unread,
Nov 12, 2012, 5:46:51 PM11/12/12
to omn...@googlegroups.com

**.battery.resolution = 0.01s
**.battery.publishDelta = 0.3
**.battery.publishTime = 0.02s
Determine the actualization period,

The parameters that are important is the consumption in every state


Date: Mon, 12 Nov 2012 11:23:51 +0100
Subject: [Omnetpp-l] about the battery model parameters Inetmanet
From: otse...@gmail.com
To: omn...@googlegroups.com
--
--
Sent from the OMNeT++ mailing list. To configure your membership,
visit http://groups.google.com/group/omnetpp
 
 
 

Ernesto Garcia

unread,
Nov 14, 2012, 11:20:43 AM11/14/12
to omn...@googlegroups.com
Thanks Alfonso.

Is it possible with this battery model to estimate the node lifetime ?

What do i need to get this or there is other method for this ?

All the best,

Ernesto

2012/11/12 Alfonso Ariza Quintana <aari...@hotmail.com>



--
Ernesto

Alfonso Ariza Quintana

unread,
Nov 14, 2012, 12:25:09 PM11/14/12
to omn...@googlegroups.com

you need to set the consumption in every radio state, but you need to be careful about the values, because the base consumption (CPU, screen ...) must be added like a bias to the consumption of the radio in every state

Ernesto Garcia

unread,
Nov 14, 2012, 12:55:09 PM11/14/12
to omn...@googlegroups.com
Yes I'm using InetSimpleBattery, i get the Consumed energy and the residual capacity but i  do not know how to estimate the node lifetime based on this values, any suggestion ?


All the best

Ernesto

2012/11/14 Alfonso Ariza Quintana <aari...@hotmail.com>



--
Ernesto

Alfonso Ariza Quintana

unread,
Nov 14, 2012, 1:23:10 PM11/14/12
to omn...@googlegroups.com

you need to modify the code and introduce a timer and measure the consumption in a interval, with this you have the consumption per  unit time and the rest is easy

Aneesh Chirukandath

unread,
Mar 5, 2013, 5:56:37 AM3/5/13
to omn...@googlegroups.com, aari...@hotmail.com

Please help me, i need the code for observing the drainage of battery capacity Vs time..

Alfonso Ariza Quintana

unread,
Mar 5, 2013, 1:15:59 PM3/5/13
to omn...@googlegroups.com

Change in void InetSimpleBattery::initialize(int stage)

residualVec.disable();

to

residualVec.enable();

You received this message because you are subscribed to the Google Groups "omnetpp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Mmartin

unread,
Mar 11, 2013, 11:36:58 PM3/11/13
to omn...@googlegroups.com, aari...@hotmail.com
Dear Alfonso Ariza Quintana  

hope you are doing fine...

Kindly, As I have been seeing you are always trying to help those guys who are new to omnetpp. may I have your help? about installing INETMANET !!


I highly need your help .
I do appreciate your support.

best regards,
Martin

Sh Asaadi

unread,
Sep 21, 2014, 10:26:52 AM9/21/14
to omn...@googlegroups.com, aari...@hotmail.com
Does . Is the residual capacity in joules? in inetmanet.
thanks,

Alfonso Ariza Quintana

unread,
Sep 22, 2014, 4:03:10 AM9/22/14
to omn...@googlegroups.com

 

mW/s

 

 

De: omn...@googlegroups.com [mailto:omn...@googlegroups.com] En nombre de Sh Asaadi
Enviado el: domingo, 21 de septiembre de 2014 16:27
Para: omn...@googlegroups.com
CC: aari...@hotmail.com
Asunto: Re: [Omnetpp-l] about the battery model parameters Inetmanet

 

Does . Is the residual capacity in joules? in inetmanet.

--

You received this message because you are subscribed to the Google Groups "omnetpp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Ibrahim Khan

unread,
Jul 2, 2015, 4:06:08 AM7/2/15
to omn...@googlegroups.com
dear I am new to this group. Ernesto and alfanso or anyone else can you tell me how can i get the consumed energy. Secondly tell me why the value of residual energy like : 1.4822e-323 .. Waiting for your favorable response.

Alfonso Ariza Quintana

unread,
Jul 2, 2015, 9:52:16 AM7/2/15
to omn...@googlegroups.com

Dou you have included a battery module in the node definition?

 

A value of  e-323 is equal to zero but due to round problems it is possible that the value could be a bit different it is the classical problem of finite precision in computers

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.


To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.

Ibrahim Khan

unread,
Jul 3, 2015, 4:45:44 AM7/3/15
to omn...@googlegroups.com
yes i have included.. secondly tell me where is the code of consumption. and how it is calculated

--
You received this message because you are subscribed to a topic in the Google Groups "OMNeT++ Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/omnetpp/Sm8AyZ9DzfQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to omnetpp+u...@googlegroups.com.

Visit this group at http://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.



--
IBRAHIM

Alfonso Ariza Quintana

unread,
Jul 6, 2015, 1:09:49 PM7/6/15
to omn...@googlegroups.com

The consumption of the radio modules is computed in this method

InetSimpleBattery::receiveChangeNotification()

noor alsaedi

unread,
Oct 6, 2015, 6:22:24 AM10/6/15
to OMNeT++ Users, aari...@hotmail.com
Hi Alfonso,
Please as usual I need your help.. I am working with omnet 4.4, mixim, WSN... in the result file many scalars and vectors I wonder which one represent the consumed energy for each sensor node coz I am confused..
 Thanx in advanced

Alfonso Ariza Quintana

unread,
Oct 6, 2015, 10:06:56 AM10/6/15
to omn...@googlegroups.com

There isn’t, in the result file there is the residual energy, the consumption will be the initial that it is a configuration parameter in the ini file minus the residual

noor alsaedi

unread,
Oct 6, 2015, 11:18:44 AM10/6/15
to omn...@googlegroups.com
in ini file we have capacity(mAh)
**.battery.nominal = 99999mAh
**.battery.capacity = 99999mAh
and in result file I found scalars:
device total(mWs) for each sensor node 
and many vectors of capacity(mAh)

Can you please explain to me how to calculate the consumed energy coz its so important in my research...Best regards


Alfonso Ariza Quintana

unread,
Oct 6, 2015, 12:13:23 PM10/6/15
to omn...@googlegroups.com

It should be in the sca file the residual energy of the node

Consumption = capacity-residual

noor alsaedi

unread,
Oct 6, 2015, 12:50:36 PM10/6/15
to omn...@googlegroups.com
I checked the scalar and found scalar named (total energy(mWs) ) its reduced with time and reduced more if there is attacks on the node within the same simulation time as below
total energy for node (1) after 20 minutes: 74447.75754 (mWs)
total energy for node (1) after 20 minutes when attacked by malicious node: 74447.02322 (mWs)
and capacity is ( **.battery.nominal = 99999mAh )

Sorry to ask again: the parameters is different one is energy(mWs) and the other is capacity(mAh) so if they are the right parameters ( how to subtract coz can not abstract (mAh - mWs) 
 

 

Alfonso Ariza Quintana

unread,
Oct 6, 2015, 12:59:38 PM10/6/15
to omn...@googlegroups.com

mAh = mWh  / V

 

mAh = 3600 * mWs  / V

 

 

In the configuration file you can find the voltage of the battery

noor alsaedi

unread,
Oct 6, 2015, 1:25:44 PM10/6/15
to omn...@googlegroups.com
I will consider the following in my research and plz correct if I made a mistake
from ini file :
                      **.battery.nominal = 99999mAh
                       **.battery.voltage = 3.3V
so initial energy for battery : 99999 (mAh)  * 3300 (mV) /3600 (s) = 91665.75 (mWs)
plz notice in calculation I convert the voltage from voltage (V) to milivoltage(mV)

Alfonso Ariza Quintana

unread,
Oct 6, 2015, 1:39:54 PM10/6/15
to omn...@googlegroups.com

No

 

mWs = mAh*V*3600

noor alsaedi

unread,
Oct 6, 2015, 1:52:57 PM10/6/15
to omn...@googlegroups.com
Thanx alot ... best regards

noor alsaedi

unread,
Oct 7, 2015, 4:44:33 AM10/7/15
to OMNeT++ Users, aari...@hotmail.com
Sorry Alfonso to ask again but its urgent to me.. I have the initial energy of the battery but can not find the residual energy scalar..
in mixim > BatteryStats.cc the following code
void BatteryStats::summary(double init, double final, simtime_t_cref lifetime)
{
  Enter_Method_Silent();
  recordScalar("nominal", init, "mW-s");   // in the result file : scalar (nominal) =1,187,988,120 (mWs) which is equal to (Battery Capacity * Battery Voltage) from ini file
  recordScalar("total", init - final, "mW-s");  // ex for node[1]:  scalar (total) = 74447.5689 (mWs) 
  recordScalar("lifetime", lifetime, "s");
  recordScalar("Mean power consumption", (init - final)/SIMTIME_DBL(simTime()), "mW");  //  ex for node[1]:  scalar (Mean power consumption) = 62.03991
}

my question: which scalar represent the residual energy in the result file?  

Alfonso Ariza Quintana

unread,
Oct 7, 2015, 7:36:42 AM10/7/15
to omn...@googlegroups.com

This is the consumption

recordScalar("total", init - final, "mW-s");

 

Residual is  

nominal-total  

Shaikha Al-Khuder

unread,
Oct 16, 2015, 2:24:57 PM10/16/15
to OMNeT++ Users
First: What's the difference between nominal and capacity?
Second: I want to calculate the energy consumption in more than one state of the network. How to do that ? what to include and where to include it? I'm using inet and I don't want to use mixim.

Thank you.

Shaikha Al-Khuder

unread,
Dec 22, 2015, 3:39:04 AM12/22/15
to OMNeT++ Users
I also have something similar to your problem, and the value never changes no matter for how long I keep the simulation running.
If you find a fix, please tell.

Shaikha Al-Khuder

unread,
Dec 22, 2015, 3:54:17 AM12/22/15
to OMNeT++ Users, aari...@hotmail.com
The .ned file of my node already inherits (extend) a module that has a definition for battery (WirelessHost), and the energy value is still fixed all through my simulation.

Shaikha Al-Khuder

unread,
Dec 22, 2015, 5:43:27 AM12/22/15
to OMNeT++ Users
Salam, Noor,

I'm trying to conclude my MSc. Thesis. and I think you'll be great assistance. I'm also simulating an attack on some of the network nodes and I need to do exactly what you did with energy:
- Calculate the energy consumption (charts and numbers)
- Simulate operations that can presumably reduce energy

I can explain what I've done already so you can tell me what to do or which class to fix. 
In brief, kindly tell me how to integrate the energy with a current setup of simulation, so I can check my steps.

Many thanks.

Shaikha Al-Khuder

unread,
Dec 22, 2015, 1:56:19 PM12/22/15
to OMNeT++ Users, aari...@hotmail.com
BatteryStat.cc << Is this class a part of inet? if yes where to find it? if not, how to get it?

Ibrahim Khan

unread,
Dec 30, 2015, 2:46:22 AM12/30/15
to omn...@googlegroups.com
Dear Alfanso,

How can we perform parrallel simulation in INet omnet. I have installed DeinoMPI.2.0.1.msi.

Thanks


For more options, visit https://groups.google.com/d/optout.



--
IBRAHIM

Shaikha Al-Khuder

unread,
Dec 30, 2015, 9:23:50 AM12/30/15
to omn...@googlegroups.com, aari...@hotmail.com
Does anyone know how to do the below?

On Dec 22, 2015, at 9:56 PM, Shaikha Al-Khuder <cpe....@gmail.com> wrote:

you need to set the consumption in every radio state, but you need to be careful about the values, because the base consumption (CPU, screen ...) must be added like a bias to the consumption of the radio in every state

I mean where to add the values?
Do you have example values of consumption?

Best regards,
Engr. Shaikhah B. Al-Khadhr

Reply all
Reply to author
Forward
0 new messages