Forums - How does Trepn Power measure battery power?

10 posts / 0 new
Last post
How does Trepn Power measure battery power?
juampi_fs
Join Date: 19 Jul 16
Posts: 3
Posted: Tue, 2016-07-19 08:33
Hi, I'm a Computer Engenieer student, I'm working in an Informatic Lab and researching about power consumption in differents apps.
 
I'm going to use this tool to take some measurements about the battery power. I want to know how is the way it works. How it collects the information, or where, about the power consumption.
 
What is the accuracy of all the measurements?  
Is there Scientific Publications that explains the tool?
 
regards
  • Up0
  • Down0
ToolsPM
Join Date: 15 Feb 13
Posts: 393
Posted: Tue, 2016-07-19 11:02

Hello, 

Your questions are good ones. 

Q: How does Trepn Profiler collect power data?

It gets its power readings from the power management IC (PMIC) and the battery fuel gauge software.  

 

Q: What is the accuracy of all the measurements?

Accuracy is very good on devices that are known to report accurate power when best practices are followed. How accurate? I did some power readings at different screen brigthness levels on a Nexus 6 that were compared to hardware-based readings on a Monsoon Power Monitor. Trepn's accuracy varies. In some cases the error is only 0.2%. The average error of my measurements was 2.1%. Worst case error was 5.5%. You can see the detailed results here. Examples of devices known to report accurate power include Nexus 5, Nexus 6, Nexus 7 and others. 

Important notes: One of the reasons these readings are so close is because Trepn and the Monsoon were running at the same time on the same device. You should keep in mind that in general Trepn's power readings are generally going to be higher than hardware readings because it is running on-target (aka on the device). By default it samples every 100ms and collects a lot of data, so it is affecting the readings. You can change the sample rate, but that can affect accuracy, because you'll miss more power spikes. 

Newer devices with Snapdragon 808, 810 or 820 processors only report power readings every 15-30 seconds. Although instantaneous power readings should still be accurate, this affects the accuracy of average power readings because only 2-4 readings are collected a minute. If one of those readings is a very large power spike, the average will be higher than it should. Supported devices with other Snapdragon processors provide 600 power readings a minute, so the averages are much better.

 

Are there any Scientific Publications that discuss the accuracy of Trepn Profiler?

Yes. I'm aware of two papers that compare Trepn to other power measurement tools. 

1. Modelling, Profiling, and Debugging the Energy Usage of Mobile Devices - By MOHAMMAD ASHRAFUL HOQUE, University of Helsinki (and others). This article claims on p. 29 that Trepn is 99% accurate. 

2. Comparing Energy Profilers for Android - Alexander Bakker University of Twente. This article compares Trepn to other profilers. No accuracy measurements)

- Rick

 

 

  • Up0
  • Down0
juampi_fs
Join Date: 19 Jul 16
Posts: 3
Posted: Fri, 2016-07-22 12:55

Hi Rick!, thanks for comment.

I get your info very useful, i have one more question: When I enter into App Profile, it shows me a graph with battery power. This is related to the system or what the app is consuming? Because, if I use the desktop App, "battery power" option is only availabe in System section, not into Process section.

  • Up0
  • Down0
ToolsPM
Join Date: 15 Feb 13
Posts: 393
Posted: Fri, 2016-07-22 14:29

It's system power. In my opinion the "Profile App" button is a little misleading because there are no profiling tools that accurately show the power consumed by a single app. Some of the Trepn metrics like mobile data are per app, but power is always system power. 

There are no major differences between using the Profile System and Profile App options. It's primarily used for convenience - such as launching the application when baselining is complete (when using the Show Deltas option) and saving information in the database about the application being tested.

- Rick

  • Up0
  • Down0
juampi_fs
Join Date: 19 Jul 16
Posts: 3
Posted: Wed, 2016-08-10 07:55

Sorry for use the same thread.

Is there any way to know how much battery power was consumed by Trepn application while it's measuring? Or it's insignificant?

  • Up0
  • Down0
ToolsPM
Join Date: 15 Feb 13
Posts: 393
Posted: Wed, 2016-08-10 08:49

The amount of power consumed by Trepn will vary depending on a number of variables including the sample rate, number of data points selected, type of use-case and hardware-related differences. 

Here are the results of a test with a Nexus 6, where the power was measured by Trepn and a Monsoon Power monitor over 11 different screen brightness levels:

- The delta in power consumed varies, but in my tests most values were close to 111mW, which was the average delta. There were three outliers however: A low value or 98mW and a two high values of 125mW (at 0% brightness) and 127mW (at 20% brightness).  Removing these values resulted in an average delta of 108.97mW.  

Bottom line: In this test, the overhead of Trepn was 111mW. 

- As a percentage, the overhead of Trepn increased power readings between 11% to 25% depending on screen brightness levels. Removing the data for the lowest 3 screen brightness (0-20%) results in a much more consistant average power increase of 13%. 

Bottom line: In this test, Trepn increased power readings by an average of 13%. 

- Rick

  • Up0
  • Down0
wmvj
Join Date: 26 Apr 17
Posts: 1
Posted: Wed, 2017-04-26 10:08

Hello!

I'd like know if there is an energy model to calculate energy consumption in Trepn?

Best regards
Warley Jr.

 

  • Up0
  • Down0
ToolsPM
Join Date: 15 Feb 13
Posts: 393
Posted: Wed, 2017-04-26 11:26

Hi Warley, 

We haven't published the model that Trepn uses to estimate power. In a nutshell, here's how it works. If your device doesn’t support direct power reading, Trepn automatically estimates the power consumption in real-time by analyzing the frequency and load of every CPU core and the GPU in your mobile device. Power estimation also takes into account the brightness of your screen, which is one of the biggest consumers of power.  The model was created using a device with a Snapdragon 800/801 (8974) processor and Snapdragon 805 (8084) processor. If your device has an 8974, it uses that model. If your device has a later processor, it uses the 8084 power model. 

Estimated power readings should not be compared to direct power readings because they are collected from different sources. You should also not attempt to use this app to compare system power readings of one device to another device, since different devices have different configurations. 

- Rick

  • Up0
  • Down0
Phu Lai
Join Date: 9 Oct 17
Posts: 1
Posted: Tue, 2017-10-10 01:41

Hi Rick,

In the Modelling, Profiling, and Debugging the Energy Usage of Mobile Devices paper (Hoque et.al., 2015), the authors mention that AppScope profiling tool can show the energy consumption of individual apps with an accuracy up to 92% (table 3, p. 19). Can you elaborate on why there are no profiling tools that accurately show the power consumed by a single app? What about power consumed by a single hardware component (sensor, camera, wifi, radio, GPS, etc.), can we accurately measure it?

Also, in this StackExchange post, you mention that Android power profiles don't appear to be accurate; does it still hold true until current Android version, can you please provide more details?

Sorry for the many questions. I find your work and knowledge in mobile power consumption very impressive.

-Phu

  • Up0
  • Down0
ToolsPM
Join Date: 15 Feb 13
Posts: 393
Posted: Tue, 2017-12-12 14:22

Sorry for the delay responding. Normally we get notifications when someone posts in the forum. I didn't see one for this. 

1. Although I haven't read the Modelling, Profiling, and Debugging the Energy Usage of Mobile Devices paper, I'm confident that there is no secret method to determine app power consumption accurately, without access to hardware and modeling software that is not available publically. There are several reasons for this. One is because of the amount of background activity that occurs on Android and the fact that some of these power spikes are huge. 

2. It is possible to estimate the power consumed by a single hardware component (sensor, camera, wifi, radio, GPS, etc.), if you have access to all of the power rails and understand what else is on a power rail. Qualcomm used to sell reference hardware (smartphones and tablets) that displayed per rail power data. That was very useful to compute things like camera power, CPU power, GPU power and screen power, etc. It was not very useful in determining things like sensor power because it's so low and power rails are sometimes shared.  Sadly those devices are no longer available. 

 

3. In this StackExchange post, I mentioned that Android power profiles don't appear to be accurate. This is still true. This data was provided by OEMs. Some OEMs like Google/LG did a good job on some devices (e.g. Nexus 6). Other devices like the Samsung Note 3, and other SS phones where NOT accurate at all. Most OEMs do not have a method to measure component power, so I'd take this with a grain of salt. 

Sorry again for the delay responding. 

-Rick

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.