Search code examples
contiki

Interpreting results from contiki's powertrace app


I am using contiki's powertrace (that in turn uses ENERGEST) to get power consumption. I came across the formula for that to be= ((rxon)*(RXi)*Vcc)/(cpu+lpm). Where rxon, cpu and lpm are obtained from powertrace (i.e. times the mote spends in these states) and RXi (current) and Vcc (voltage) from datasheet.

My question is if I need to obtain total current consumption do I just remove the Vcc or do i need to remove Vcc and divide the whole thing by RTIMER_ARCH_SECOND. Since i read somewhere that powertrace results time in Rtimer ticks.

Thank you, Avijit


Solution

  • If your formula is the calculation of the average total power consumption where (cpu+lpm) is the whole period, then you do not have to convert the time values in real seconds. The formula is a ratio and if your divide the numerator by RTIMER_ARCH_SECOND you need equally to divide the denominator, which brings you to the same result.