Discussion:
[Contiki-developers] energy estimation for tmote sky
Ali Jatt
2010-04-23 09:26:33 UTC
Permalink
Hi,
I am trying to estimate energy consumed by my program in the following way.
    cpu_time_normal_mode = energest_type_time(ENERGEST_TYPE_CPU);
    tx_time = energest_type_time(ENERGEST_TYPE_TRANSMIT);
    rx_time = energest_type_time(ENERGEST_TYPE_LISTEN);
energy_consumed =  (unsigned long) ((1.8 * cpu_time_normal_mode + 20.0 * rx_time + 17.7 * tx_time) * 3 / RTIMER_SECOND));

my questions are the following:
1- Is the formula used for computing energy_consumed correct?
2- what is the current drawn by the CPU in low power mode? I'll need to include that if I include the energy consumed by the cpu while running in low power mode.
3- I checked tmote sky datasheet and found the following numbers for current drawn by the cpu in normal and low power mode.
normal mode: 500 micro-amps
low power mode: 2.6 micro-amps
shouldn't I then multiply cpu_time_normal_mode by 0.5 in the above formula, if I want to get energy consumed in mJ? and by the same token, multiply cpu_time_lpm by 0.0026, if I include energy consumed by cpu in low power mode?

Best Regards,
--ali
Nicolas Tsiftes
2010-04-23 15:10:24 UTC
Permalink
Post by Ali Jatt
Hi,
I am trying to estimate energy consumed by my program in the following way.
cpu_time_normal_mode = energest_type_time(ENERGEST_TYPE_CPU);
tx_time = energest_type_time(ENERGEST_TYPE_TRANSMIT);
rx_time = energest_type_time(ENERGEST_TYPE_LISTEN);
energy_consumed = (unsigned long) ((1.8 * cpu_time_normal_mode + 20.0
* rx_time + 17.7 * tx_time) * 3 / RTIMER_SECOND));
1- Is the formula used for computing energy_consumed correct?
2- what is the current drawn by the CPU in low power mode? I'll need
to include that if I include the energy consumed by the cpu while
running in low power mode.
3- I checked tmote sky datasheet and found the following numbers for
current drawn by the cpu in normal and low power mode.
normal mode: 500 micro-amps
low power mode: 2.6 micro-amps
shouldn't I then multiply cpu_time_normal_mode by 0.5 in the above
formula, if I want to get energy consumed in mJ? and by the same
token, multiply cpu_time_lpm by 0.0026, if I include energy consumed
by cpu in low power mode?
Best Regards,
--ali
No, the 0.5 mA is the current consumption when the CPU uses a 1 MHz
clock frequency. The Contiki Sky platform uses 3.9 MHz by default (F_CPU
in platform/sky/contiki-conf.h). Also note that the current used by the
complete mote in LPM mode is not just the CPU sleep current, but also
the ones of the radio and the sensors. MCU-idle current for the Tmote
Sky is shown on page 4 in the data sheet, and is listed as 54.5
micro-ampere.

Nicolas
Qamar Toheed
2010-05-12 08:27:47 UTC
Permalink
Hello all
Can we rewrite above formula to this one???

cpu_time = energest_type_time(ENERGEST_TYPE_CPU);
lpm_time = energest_type_time(ENERGEST_TYPE_LPM);
tx_time = energest_type_time(ENERGEST_TYPE_TRANSMIT);
rx_time = energest_type_time(ENERGEST_TYPE_LISTEN);

energy_consumed = (unsigned long) ((1.8 * cpu_time + 0.0545 * lpm_time +
20.0 * rx_time + 17.7 * tx_time ) * 3 / RTIMER_SECOND));

I have notice that if we dont send any data then tx_time will be zero, is it
ok??
If CPU is running at LPM mode then should we use Vcc as 3 or 1.8?
Post by Nicolas Tsiftes
Post by Ali Jatt
Hi,
I am trying to estimate energy consumed by my program in the following way.
cpu_time_normal_mode = energest_type_time(ENERGEST_TYPE_CPU);
tx_time = energest_type_time(ENERGEST_TYPE_TRANSMIT);
rx_time = energest_type_time(ENERGEST_TYPE_LISTEN);
energy_consumed = (unsigned long) ((1.8 * cpu_time_normal_mode + 20.0
* rx_time + 17.7 * tx_time) * 3 / RTIMER_SECOND));
1- Is the formula used for computing energy_consumed correct?
2- what is the current drawn by the CPU in low power mode? I'll need
to include that if I include the energy consumed by the cpu while
running in low power mode.
3- I checked tmote sky datasheet and found the following numbers for
current drawn by the cpu in normal and low power mode.
normal mode: 500 micro-amps
low power mode: 2.6 micro-amps
shouldn't I then multiply cpu_time_normal_mode by 0.5 in the above
formula, if I want to get energy consumed in mJ? and by the same
token, multiply cpu_time_lpm by 0.0026, if I include energy consumed
by cpu in low power mode?
Best Regards,
--ali
No, the 0.5 mA is the current consumption when the CPU uses a 1 MHz
clock frequency. The Contiki Sky platform uses 3.9 MHz by default (F_CPU
in platform/sky/contiki-conf.h). Also note that the current used by the
complete mote in LPM mode is not just the CPU sleep current, but also
the ones of the radio and the sensors. MCU-idle current for the Tmote
Sky is shown on page 4 in the data sheet, and is listed as 54.5
micro-ampere.
Nicolas
------------------------------------------------------------------------------
_______________________________________________
Contiki-developers mailing list
https://lists.sourceforge.net/lists/listinfo/contiki-developers
--
Best Regards

Qamar Toheed

M.Sc. Networks & Distributed Systems
Chalmers University of Technology
Göteborg, Sweden.
Mobile: +46704359110
Loading...