Accurate Online Power Estimation and Automatic Battery Behavior Based Power Model Generation for Smartphones
Total Page:16
File Type:pdf, Size:1020Kb
Accurate Online Power Estimation and Automatic Battery Behavior Based Power Model Generation for Smartphones Lide Zhang† Birjodh Tiwana† Zhiyun Qian† Zhaoguang Wang† Robert P. Dick† Z. Morley Mao† Lei Yang⋆ †EECS Department, University of Michigan ⋆ Google Inc. Ann Arbor, MI, USA Mountain View, CA, USA {lide,tiwana,zhiyunq,zgw,dickrp,zmao}@umich.edu [email protected] ABSTRACT platforms have incorporated power-saving features, allowing This paper describes PowerBooter, an automated power components to dynamically adjust their power consumptions model construction technique that uses built-in battery volt- based on required functionality and performance. However, age sensors and knowledge of battery discharge behavior to using these features wisely (or at least avoiding undermin- monitor power consumption while explicitly controlling the ing their benefits) requires that software developers under- power management and activity states of individual com- stand the implications of their design decisions. Unfortu- ponents. It requires no external measurement equipment. nately, many software developers have limited experience We also describe PowerTutor, a component power manage- with energy-constrained portable embedded systems such as ment and activity state introspection based tool that uses smartphones. As a consequence, many smartphone applica- the model generated by PowerBooter for online power esti- tions are unnecessarily power-hungry. mation. PowerBooter is intended to make it quick and easy End users have difficulty determining which applications for application developers and end users to generate power are energy-efficient, and which squander energy; as a re- models for new smartphone variants, which each have dif- sult, application users may blame short battery lifespans on ferent power consumption properties and therefore require the operating system or hardware platform instead of un- different power models. PowerTutor is intended to ease the fortunate and unintentional software design decisions. For- design and selection of power efficient software for embed- tunately, application designers have an incentive to develop ded systems. Combined, PowerBooter and PowerTutor have energy-efficient smartphone software. Their main barrier is the goal of opening power modeling and analysis for more the difficulty of determining the impact of software design smartphone variants and their users. decisions on system energy consumption, but that barrier can be overcome. Researchers have proposed a number of power models for Categories and Subject Descriptors portable embedded systems including Palm [1] and HTC C.4 [Performance of Systems]: Modeling techniques Dream [2]. These power models were derived manually by using a power meter attached to one specific embedded sys- tem instance. As a result of the model derivation process, General Terms the generated power model is at best accurate for one type Measurement, Design of embedded system and at worst accurate only for the spe- cific embedded system instance for which it was built. It Keywords would require great effort and time to manually generate power models for the wide range of phones now available. Power modeling, mobile phones, battery This paper describes online power model generation tech- niques. The models produced by these techniques provide 1. INTRODUCTION accurate, real-time power consumption estimates for power- There is tension between the interest in potentially power- intensive Android platform smartphone components includ- hungry smartphone application features and the require- ing CPU, LCD, GPS, and audio, as well as Wi-Fi and cellu- ment for low power consumption necessary for long bat- lar communication components. The proposed power model tery lifespans. Designers of smartphone hardware–software is based on the influence of the power management and ac- tivity states of hardware components on system power con- This work was supported in part by Google; in part by sumption. Hardware components are associated with system NSF under awards CNS-0720691, CCF-0702761, and CNS- variables, e.g., LCD brightness, that are subject to intro- 0347941; in part by SRC under award 2007-HJ-1593; and in spection and allow estimation of component power consump- part by DARPA under award HR0011-08-1-0021. tions. We also provide an on-line power estimation tool, called PowerTutor, that uses a function of these variables to Permission to make digital or hard copies of all or part of this work for determine system-level power consumption. The power es- personal or classroom use is granted without fee provided that copies are timation and model generation techniques described in this not made or distributed for profit or commercial advantage and that copies paper can be applied to a variety of platforms. PowerTutor bear this notice and the full citation on the first page. To copy otherwise, to has been evaluated on the Android HTC Dream (ADP1) republish, to post on servers or to redistribute to lists, requires prior specific and HTC Magic (ADP2) phones. permission and/or a fee. In this paper, we show that phones of different types have CODES+ISSS’10, October 24–29, 2010, Scottsdale, Arizona, USA. significant differences in power consumption properties and Copyright 2010 ACM 978-1-60558-905-3/10/10 ...$10.00. provide evidence that power consumption differences be- tween individual phones of the same type are negligible for HTC Dream and HTC Magic phones. Motivated by this observation and the difficulty of generating power models manually, we propose a battery-based automatic model con- struction technique. This technique uses the built-in battery voltage sensors common to modern smartphones. Instead of using a power meter, we use this voltage sensor, and a some- what complex but automated characterization procedure, to generate a power model. The work described in this paper makes three main re- search contributions. 1. We provide manually generated power models for HTC Dream and HTC Magic phones. These comprehensive Figure 1: Experimental setup for power measurement. system-level models consider CPU, LCD, GPS, Wi-Fi, cellular, and audio components (see Section 3). This is therefore provide only part of the solution for embedded sys- the first time a GPS power model has been described. tem power estimation. For components with significant power consumption, Mobile embedded system power models are generally we find that power consumption is independent of the component-based. Cignetti et al. proposed a full-system states of other components. See Section 3 for details. power model for Palm PDAs [1] and Shye et al. [2] derived 2. We measure variation in power consumption properties a system-level power model for Android platform smart- among phones. In particular, for the phones we stud- phones. Both power models were constructed by corre- ied, we quantify the (small) variation among multiple lating operating system visible state variables with power instances of the same type of phone, and the (large) consumption while running a range of normal software ap- variation among different types of phones. See Sec- plications. This modeling technique is sometimes accurate. tion 4 for details. However, it suffers from a potential drawback: the accuracy of the resulting model relies on the training applications ex- 3. We describe a novel automated power model construc- ercising the full set of component activity and power man- tion technique. This technique uses built-in battery agement states that may be encountered during the use of voltage sensors and knowledge of battery discharge be- model. We suggest, instead, that training and characteriza- havior to monitor power consumption while explicitly tion applications be designed to explicitly exercise all rele- controlling the power management and activity states vant system states, so that the resulting model is appropriate of individual components. It requires no external mea- for use with arbitrary applications. Section 3.2 describes the surement equipment. See Section 5 for details. selection of components and states to consider. The above power models are constructed using external In addition, our work makes a practical contribution: we power meters. To the best of our knowledge, only two pa- describe an easy-to-use on-line power estimation technique pers have proposed battery behavior based power model con- that uses the power models described above to determine struction techniques. The concurrent work from Dong and component-level power consumption during application ex- Zhong [8] proposed a automatic construction of a power ecution. A software implementation of this estimator has model using a smart battery interface, while Gurun and been released on the Android market. This software tool, Krintz [9] proposed an adaptive power estimation model which we refer to as PowerTutor, has been used by more that uses the built-in Battery Monitor Unit (BMU). Both than 6,000 people. See Section 7 for details. techniques require knowledge of the discharging current and remaining battery capacity, which are not available for most 2. RELATED WORK phones. Our technique relies only on knowledge of the bat- In this section we summarize related work on online power tery discharge voltage curve and access to a battery voltage modeling and model construction techniques. sensor, which is available on most smartphones. Power modeling has been well studied by many re- searchers, not only for mobile embedded systems, but also 3. POWER MODEL for general-purpose computers. For example,