The energy requirements of modern smart-phones continue to increase as a result of various factors. Among these factors are the growing demands on their performance, users’ needs such as smooth experience and longer operation times. However, the available energy provided by a smart-phone is restricted by its battery size. Optimizing energy consumption requires accurate measurements and estimation of the smart-phone energy usage patterns, as well as solutions which balance multiple (potentially conflicting) requirements. Therefore, improving the battery life starts from measuring the energy consumption of the phone.
We aim to implement an energy profiler that generates event-based energy consumption models on the fly using the smart-phones’ battery fuel gauges. The use of built-in meters enables the use of online-learned and adaptive models that can be applied under varying conditions, accounting for each user’s usage patterns [1, 2], phone configuration, and battery age. Furthermore, it facilitates battery optimization processes. Although external power meters are golden standards , they are costly, restricted to laboratory conditions and hard to setup. However, before we can solely rely on internal meters, it crucial to validate their precision.
In this work we report on the results of a series of experiments on two different Android devices and compare the readings of their internal energy meters with an external meter. Our experiments show that using these internal meters is sufficient for detecting differences in energy consumption.
In this section, we outline our software and hardware test harnesses.
Modern mobile phones are equipped with battery fuel gauge chips that report the voltage, current and remaining energy within the battery . The target devices for our experiments are HTC Nexus 9 and Motorola Nexus 6. They are equipped with the Maxim MAX17050 fuel gauge chip that compensates measurements for temperature, battery age and load . To validate the internal power meter measurements, we insert a Yoctopuce Yocto-Watt  external meter between the internal battery of the phone and the phone’s internal battery connectors. The meter’s maximum sampling rate is 100 Hz.
Our software framework includes a data logger, hardware component controller and battery monitor. The data logger samples hardware settings and utilization data such as CPU frequency and load, screen brightness and network traffic. The controller’s main job is to create test scenarios. It activates, deactivates and applies workloads on hardware components. For example, while profiling the screen, it changes and fixes its brightness, as well as it turns off other components and fixes the CPU frequency.
The battery monitor records the power consumption data such as the remaining energy, voltage and drawn current during each test session. Accessing the battery chip’s values can be done through the battery API, such as Android’s BatteryManager class. This API periodically broadcasts these values.
In this paper we report the results of four experimental scenarios used to validate the battery fuel gauge precision and the accuracy with respect to an external meter. In the first two scenarios, the hardware controller sets the CPU to maximum frequency and the screen brightness to 100%. The device is held idle for five minutes, then the controller turns off the screen and locks the CPU frequency to prevent the operating system from changing its settings. This second phase (scenario) lasts for five minutes as well. During the experiment, the battery monitor records battery’s data (e.g. voltage, current, temperature and remaining energy in the battery) provided by the fuel gauge and the data logger keeps track of system data such as the CPU workload. In addition, a complete system report is collected using the Android Debug Bridge utility. In addition to the screen experiment, we have conducted experiments to collect Wi-Fi and 4G energy consumption data. Three more settings are added as following. After recharging the device and setting up the CPU and screen, the controller downloads a 15 MB file ten times. In between each download job, there is a one-minute rest period. During this period, The controller deactivates the network provider under test for 20 seconds and then reactivates it. As a result, we can capture the energy cost of such events. During each download, the system and battery data as well as network’s statistics are recorded, for example, the number of downloaded and uploaded packets and signal strength.
Before coming to the results, we need to note that we believe the Nexus 6 does not directly supply the remaining energy directly, although the Android documentation claims it. We multiplied the results obtained from the system by the voltage observed for the particular sample taken. The resulting values are then in the correct order of magnitude.
Table I summarizes the observed energy consumption for our two devices in four different experiments. It appears that the internal meter in the Nexus 9 tends to underestimate the energy consumption while the Nexus 6 fuel gauge overestimates it.
|Nexus 9||Nexus 6|
|Total Energy Measured in Wh|
Figures 1 and 2 illustrate different aspects of the experiments. Figure 1 shows the total consumption over time in the 4G experiment and the corresponding individual samples. Both measurements are highly correlated. The external meter is very stable in its readings when the load stays stable. In contrast to this, the internal meter’s readings are very noisy during short periods of times (see Figure2). However, when the considered time window is tens of seconds, then we consider the effective power consumption signal that we get from the internal meter as being stable.
V Conclusion and Future Work
In this article we outlined our approach towards achieving precise power measurements on smart-phones without the use of external meters. We require this to (i) create customized power models online and to (ii) optimize the multi-objective energy consumption of software using genetic program improvement .
Our next step will be to characterize the noise and to investigate the minimal event that we can reliably detect, which will depend on the observation time window and the effect size. In parallel, we will conduct a wide range of experiments on multiple phones, and subsequently create and validate device-specific models using machine-learning techniques, before moving to the fully-automatic optimization of non-functional property optimization directly on smart-phones.
-  H. Falaki, R. Mahajan, S. Kandula, D. Lymberopoulos, R. Govindan, and D. Estrin, “Diversity in smartphone usage,” in Proceedings of the 8th International Conference on Mobile Systems, Applications, and Services, ser. MobiSys ’10. ACM, 2010, pp. 179–194.
-  A. Shye, B. Scholbrock, and G. Memik, “Into the wild: Studying real user activity patterns to guide power optimizations for mobile architectures,” in Symposium on Microarchitecture, ser. MICRO 42. ACM, 2009, pp. 168–178.
-  S. Tarkoma, M. Siekkinen, E. Lagerspetz, and Y. Xiao, Smartphone energy consumption: modeling and optimization. Cambridge University Press, 2014.
-  Android Power Profiles, Android, retrieved 03/2016. [Online]. Available: https://source.android.com/devices/tech/power.html
-  MAX17047/MAX17050 ModelGauge m3 Fuel Gauge. Maxim integrated. Viewed November 2016. [Online]. Available: https://datasheets.maximintegrated.com/en/ds/MAX17047-MAX17050.pdf
-  Yocto-Watt. Yoctopuce. Viewed November 2016. [Online]. Available: http://www.yoctopuce.com/EN/products/usb-electrical-sensors/yocto-watt
M. Bokhari and M. Wagner, “Optimising energy consumption heuristically on android mobile phones,” in
Proceedings of the 2016 on Genetic and Evolutionary Computation Conference Companion, ser. GECCO ’16 Companion. ACM, 2016, pp. 1139–1140.