This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Energy trace wrong power calculation

Other Parts Discussed in Thread: ENERGYTRACE, MSP-FET, MSP-EXP430FR5969

Hi, I am seeing some discrepancies between the energy and power graphs shown by energytrace. If I understand correctly, the debugger (a new MSP-FET) works with energy measurement, and power is derived from it by deriving the energy information.

I get the following profile window:

Where to me, nothing makes sense. Lets assume that we can trust the test data of 30 seconds and an energy usage of 1.114mJ, which makes sense if you look at the energy graph:

This matches with what I know of my application, the device wakes up every two seconds to do an active operation and then goes back to sleep. And yes, it seems like it used around 1.1mJ in 30 seconds.

Lets try to derive the measurements shown in the Profile window. First comes power, average power is said to be 2.44mW. If we take a load with an average power of 2.44mW, in 30 seconds it will have consumed 2.44mW*30s = 73.2mJ, since as we all know 1W = 1J/s. If we go the other way around, in order to use 1.11mJ in 30 seconds we have an average power of 1.11mJ/30s = 37uW. This is a big discrepancy.

Being the mean value incorrect, which is the easy one to obtain, how could we trust the min and max values??, especially being the min value 0.0000mW?

The current values are obtained by dividing the incorrect Power values by the voltage, which is kind of correct.

It is a pity, because the min/max power values are very interesting even with the 10KHz sample rate, because that is high enough for my application, and they are useful to see the current stress that will be seen by the battery.

Also, the power graph seems to be wrong:

Energy and power graphs have the same horizontal scale. In the energy plot you can see nice regular and very similar energies used in each wake period. In the power graph, some activations seem to be much higher than others, which is not true. And most importantly, the time in active mode is very short as seen from the energy graph (which corresponds with reality) but it is very large as seen in the power plot. This also doesn't match.

So, I would like to know if I am doing something wrong, there is some error on my side to make this work, or any kind of insight into this. I have taken the data during a free-run with 30 seconds of capture. Especially I would like to know what can I trust, this is the most important thing.

Also, any way to obtain the energy plot in a csv or whatever would be very helpful, since then I could obtain a power plot in matlab or python.

Best regards, and thanks for the support!

Pedro

  • Pedro Perez de Ayala said:
    Energy and power graphs have the same horizontal scale. In the energy plot you can see nice regular and very similar energies used in each wake period. In the power graph, some activations seem to be much higher than others, which is not true. And most importantly, the time in active mode is very short as seen from the energy graph (which corresponds with reality) but it is very large as seen in the power plot. This also doesn't match.

    I've seen this issue on the MSP-EXP430FR5969 and MSP-EXP432P401R launchpads. When the power consumption of the target drops from a relatively high value to somewhere below ~0.5mA, the value on the power graph gets "stuck" and remains high for about a second. The energy graph shows accurate results, but the power graph doesn't match. The value that the power graph shows while "stuck" can be anywhere between the correct (low) value and the value before the power consumption dropped.

    If you zoom in on the peaks of your power graph I think you'll find that they all begin with a short initial spike up to 22mW, which is so short that it's invisible when zoomed out. Then the power level drops to somewhere between 0 and 22mW and holds there for a second or two before dropping to the correct level. That's why your power peaks seem so variable, even though they should be uniform height as implied by the energy graph.

    This problem seems to go away if the baseline power is not too low. For example, powering an LED during the whole measurement works for me. The power graph in that case ends up matching the energy graph, and accounting for the extra power/energy used by the LED gives correct results.

    With regard to which values are accurate in the EnergyTrace windows when this happens, in my experience the energy graph is always correct. The energy and max power/current values on the main window are correct too.

    The min power/current values are correct - as long as they're not zero. Sometimes the initial state of the system results in zero power at the start of measurement, and then that value persists as it's the lowest possible. This can be avoided by running EnergyTrace without an active debug session, triggering the capture manually.

    I've not noticed the mean power value being incorrect before, but perhaps I just wasn't looking for it.

    I have noticed some very wrong values for estimated battery life (an order of magnitude higher than it should be). I'm not sure if that's related to the other issues, however.

  • Hi Robert, thanks for your reply.

    Robert Cowsill said:

    If you zoom in on the peaks of your power graph I think you'll find that they all begin with a short initial spike up to 22mW, which is so short that it's invisible when zoomed out. Then the power level drops to somewhere between 0 and 22mW and holds there for a second or two before dropping to the correct level. That's why your power peaks seem so variable, even though they should be uniform height as implied by the energy graph.

    I've had a closer look at the beginning of the pulses, and I have to say that there is no such peak as you describe. Most of the power pulses are just square and clean. Some start with a lower value and then become a bit higher some ms later.

    Robert Cowsill said:

    I have noticed some very wrong values for estimated battery life (an order of magnitude higher than it should be). I'm not sure if that's related to the other issues, however.

    OK, good to know, I'll keep an eye on that.

    Thanks,

    Pedro

**Attention** This is a public forum