Ali Jatt
2010-04-23 09:26:33 UTC
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
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