Battery optimization vs energy optimization: Which to choose and when? Ravishankar Rao and Sarma Vrudhula
Naehyuck Chang
NSF Center for Low Power Electronics Arizona State University Tempe, AZ 85281 Email: {ravirao, vrudhula}@asu.edu
School of Computer Science and Engineering Seoul National University Seoul, Korea Email:
[email protected]
Abstract— Batteries are non-ideal energy sources – minimizing the energy consumption of a battery-powered system is not equivalent to maximizing its battery life. We propose an alternative interpretation of a previously proposed battery model, which indicates that the deviation from ideal behavior is due to the buildup of “unavailable charge” during the discharge process. Previously, battery-aware task scheduling algorithms and power management policies have been developed, which try to reduce the unavailable charge at the end of a given workload. However, they do not account for the occurrence of rest periods (user enforced, naturally occurring, or due to finite load horizon), which are present in a variety of workloads. We first obtain an analytical bound on the recovery time of a battery as a function of the extent of recovery. Then, we shown that the effect of the rest periods is to reduce the improvement of battery-charge optimizing techniques over traditional energy-optimizing techniques. Under certain conditions, the policy that only minimizes energy consumption can actually achieve a longer battery lifetime than a battery-aware policy. A formal criterion based on the recovery time is proposed to choose between a candidate battery-aware policy and a candidate energy-aware policy. We also model the battery discharge process as a Linear Time Invariant system and obtain the frequency response of a battery. This is then used to study the effect of task granularity on the improvement achieved by battery-aware task scheduling. It was observed that the response time of typical batteries are of the order of seconds to several minutes. This, along with the charge recovery effect, was seen to cause battery-aware task scheduling methods to become ineffective for both very fine-grained (less than 10 ms) and very coarse-grained (greater than 30 min) task granularities.
I. I NTRODUCTION To simplify the modeling effort for battery-powered systems, the battery is often assumed to be an ideal voltage source with a finite charge capacity and a constant voltage profile. Let us denote the charge delivered to the load and the charge available at a time t as l(t) and a(t) respectively, and the capacity of the battery as α. Such a battery exhibits two important characteristics: (i) the energy delivered to the load over a given interval is proportional to the charge delivered, and (ii) a(t) = α − l(t). While (i) is still approximately true for a real battery, (ii) is not. A quantity called the unavailable charge can be defined as follows: u(t) = α − l(t) − a(t), which is responsible for the deviation from ideal behavior. This is a non-negative quantity and depends on several parameters external to the battery like the temperature, the past discharge rate profile, and the number of chargerecharge cycles [2], [3]. High-level battery models [4]–[8] have been developed that capture battery discharge behavior with reasonable accuracy, but are less computationally intensive and easier to configure than detailed physical models [9]. Such models have been used to develop batteryaware heuristics for task scheduling [7], [10]–[12], voltage scaling [7], [10], and discharge current shaping [6], [13]–[15]. Such heuristics (henceforth collectively be referred to as battery-charge optimization techniques and denoted by B ) are aimed at improving the battery lifetime when compared to traditional energy optimization techniques
(henceforth denoted by E ) that ignore battery effects like the rate capacity effect. However, none of the workload models used in these works account for the occurrence of rest periods that occur commonly in a wide range of portable battery-operated systems. The effect of these rest periods is to cause the lifetime of the B -policies to come closer, or even become worse than that of the corresponding E -policies. A. Motivation: The effect of rest periods Rest periods that occur in workloads are mainly of three types: • User-enforced rest periods: In many portable devices like PDAs, laptops, cell phones, etc., the user can pause or turn off the device, at any instant, thus forcibly introducing rest periods in the workload. • Finite horizon workloads: A finite horizon workload is essentially has an infinitely long rest period at its end. • Natural pauses in workloads: In devices like environment monitoring sensor networks, remote sensing satellites, etc., the workload, by design, consists of periodic peaks separated by idle durations. Unlike energy minimization, battery-charge optimization requires the specification of a time at which the battery charge is to be minimized (see Section II). For finite horizon workloads, this is usually the time by which all tasks are complete [7]. As user-enforced rest periods are very hard to predict, they cause the actual completion time of tasks to vary wildly. For example, a B -type algorithm that maximizes available charge at the end of a movie (by assuming continuous playback) may not be optimal any more if the user interrupts the movie in between for 20 minutes. While E only optimizes the actual charge lost, while B optimizes the sum of the actual charge lost and the unavailable charge. But, in trying to minimize the latter sum charge, B could end up losing more actual charge than E . If the duration of the rest period is sufficiently large, the unavailable charge for both policies tends to zero. This reduces the potential improvements in the battery lifetime of B over E . Further, unless B has the same actual charge lost at E , we show that there exists a finite rest period duration that can cause E to be optimal, both in terms of actual charge lost and available charge. Though the natural pauses in workloads may be predictable, they are still uncontrollable. Our results suggest that rest period durations larger than 30 minutes are sufficiently long to cause B -type policies to have little or no (less than 5%) improvement in terms of available charge, over E -type policies (see Section IV-A). Further, if a battery is not dead at the end of a finite horizon workload, it has a very large rest period to recover charge, so that B -type policies are not required. However the earlier works on battery-aware task scheduling/scaling for finite horizon workloads [7], [10], [12] do not account for such
rest periods at the end of the workload. One can verify that the three types of rest periods mentioned above are not contrived examples, but are frequently found in most workloads for battery-powered systems. This makes it very important to develop an objective criterion for choosing between B -type and E -type policies. B. Main contributions
•
•
•
•
An alternative interpretation of the battery model proposed by Rakhmatov et al. [7] is presented. Our representation relates the battery cost function σ that was proposed in [7] to the charge delivered to the load l, and the unavailable charge u, and provides valuable insight into the battery discharge process. This interpretation allowed us to analyze the relationship between the proportion of unavailable charge recovered and the time taken to recover. This analysis resulted in an analytical upper bound on the recovery time of a battery. Based on this bound, a criterion is proposed for choosing whether to use an energy-optimal or a battery-charge optimal policy, depending on the duration of the forced rest periods. The battery model from [7] is recast as a convolution between the load and a Linear Time Invariant (LTI) system, allowing us to obtain the frequency response of a battery as a function of its parameters. The frequency response of the battery was used to obtain the range of response times of typical batteries, and their sensitivity to the granularity of battery-aware task scheduling.
While the aim of our work was to develop criteria for using batteryaware strategies, we believe the (i) charge-component description of the discharge process, (ii) the recovery time expression for a battery, and the (iii) frequency domain representation of the battery, will have uses beyond the original purpose. C. Organization Section II provides a high-level view of the battery discharge behavior in terms of the lost, available and unavailable charge components. In section III, the recovery time of a battery is expressed in terms of the battery parameters. In section IV, a criterion for choosing between an energy-aware and a battery-charge aware policy is proposed, which is based on the relative improvements of the two policies in terms of actual and apparent charges lost. Section V derives the frequency response characteristic of a battery. This is used to obtain the range of response times for practical batteries and explore the effect of task granularity on battery-charge aware task scheduling. Based on these analyzes, a recommendation of when to use battery-aware policies is presented in Section VI, and Section VII concludes the paper. II. C HARGE COMPONENT INTERPRETATION OF THE BATTERY DISCHARGE PROCESS
Rakhmatov et al. [7] proposed a high-level model of the battery discharge process, which was obtained by solving the electrochemical and diffusion equations for a simple one-dimensional cell model. It provides the following analytical relationship between the load current profile i(t), the battery lifetime L, and two experimentally determined battery parameters, α and β: ! Z L Z L ∞ X −β2 m2 (L−t) α= i(t) dt + i(t) 2 e dt. (1) 0
l(t) 0 l(t) ≥ 0 l(L) ≥ 0
u(t) 0 u(t) ≥ 0 u(L) ≥ 0
σ(t) 0 l(t) + u(t) l(L) + u(L) = α
a(t) α α − σ(t) 0
TABLE I R ELATIONSHIP BETWEEN DIFFERENT CHARGE COMPONENTS .
A. The apparent charge lost
The following are the main contributions of this paper: •
Time t =0 0 0 and that F(β, 0, ∆,t) is monotonically decreasing for t ≥ ∆. The maximum unavailable charge umax of a constant load profile (I, ∆) is defined as the unavailable charge at t = ∆+ . The recovery time, tr (ε), for a constant load profile (I, ∆) is defined as that additional time after ∆ by which the unavailable charge u(∆ + tr ) has reduced to a fraction ε of the maximum unavailable charge umax = u(∆+ ),
(a) Fully Charged
a
u
β2 m2
m=1
l(t)
1
2 2 2 2 ∞ X e−β m (t−t f ) − e−β m (t−ti )
and using (3), an upper bound on tr can be obtained as tr ≤ −
1 log(ε). β2
(4)
However, the above bound is not tight. In most practical cases, we are interested in finding the time taken to recover at least 60% of the unavailable charge. This corresponds to a range of ε < 0.4. A slight modification to (4) was found empirically to provide a much tighter upper bound, t¯r (ε) in this range: tr ≤ t¯r = −
1 log(1.5ε), ∀ ε < 0.4 β2
(5)
C. Simulation results Figure 3 shows the recovery time tr (ε) and its upper bound t¯r (ε) for three different values of ε for a battery with β = 0.273 min−1/2 . It can be seen that the actual recovery time increases with load duration ∆, but tends toward the upper bound for larger ∆. Figure 4 shows the recovery time as a function of the battery parameter β for a constant current load of duration 30 minutes. It can be seen that for a battery with a low β value, the recovery time tr (5%) is of the order of ten to hundred minutes, while for batteries closer to ideal behavior, the recovery is only of the order of minutes. D. Recovery time of an arbitrary load profile Without loss of generality, we can assume that an arbitrary load profile consists of a series of N load “steps” (I1 , ∆1 ), (I2 , ∆2 ), . . . , (IN , ∆N ), where Ik , ∆k , and tk are the magnitude, duration and start time, respectively, of the kth load step. The recovery time tr (ε) for such a load profile is defined as before as the additional time required
60
so that the upper bound on the recovery time of an arbitrary load profile is the same as that for a constant load profile. The same correction for ε < 0.4 can again be made here.
¯tr(ε = 0.01)
Recovery time (min)
50
tr(ε = 0.01)
IV. E NERGY OPTIMIZATION VS BATTERY- CHARGE OPTIMIZATION
40 ¯tr(ε = 0.05)
30
Consider a task set that needs to be scheduled in such a way that all tasks complete by a given deadline T with the objective being to minimize the apparent charge lost at T . The scheduling problem can be made arbitrarily complex by allowing task preemption, idle period insertion, voltage/clock scaling, disk drive speed control, etc. For brevity, we refer to them collectively as scheduling/scaling policies. Suppose now that a rest period of unpredictable duration ∆r was forcibly inserted at the end of the task set by the user. It is shown later in this section that if the ∆r is sufficiently long, it would have been better to optimize the actual charge lost l(T ) instead of the apparent charge σ(T ). We are interested then, in answering the following question: In order to maximize the battery lifetime of a system where forced rest periods can occur, should the objective of task scheduling be to minimize the apparent charge lost (a battery-aware policy B ) or to minimize the actual charge lost (an energy-aware policy E )? Section IV-B presents a criterion to answer this question. The subscripts B and E will be used to denote the charge components of the respective policies. As B is optimal w.r.t. σ(T ), we must have σB (T ) ≤ σE (T ). Similarly, as E is optimal w.r.t. l(T ), we have lE (T ) ≤ lB (T ). Let tr (ε) be the recovery time of the battery. Further, we have from (2) that
tr(ε = 0.05)
¯tr(ε = 0.10)
20
tr(ε = 0.10)
10 0 !1 10 Fig. 3.
0
10
1
2
3
10 10 Load duration (min)
10
Dependence of recovery time on load duration ∆
3
Recovery time (min)
10
Actual recovery time Upper bound
2
10
1
10
σB (T + tr (ε)) = lB (T + tr (ε)) + uB (T + tr (ε)). 0
10
0
0.5 1 Battery parameter β (min−1/2)
As no charge is delivered to the load during the rest period [T, T + tr (ε)], lB (T +tr (ε)) = lB (T ). Also, from the definition of the recovery time, we have that uB (T + tr (ε)) = εuB (T ), so that
1.5
Fig. 4. The recovery time tr (ε = 5%) for a load (I = 500 mA, ∆ = 30 min), for different values of β.
after the end of the load profile (i.e. at time ∆), for the unavailable charge to reduce to a fraction ε of the maximum unavailable charge, PN u(tr + ∆) k=1 Ik F(β,tk ,tk + ∆k ,tr + ∆) = ε. (6) = P N u(∆) k=1 Ik F(β,tk ,tk + ∆k , ∆) Now, the contribution of the kth load segment to the total unavailable charge is uk (t) = Ik F(β,tk ,tk + ∆k ,t), t > tk + ∆k .
(7)
uk can be considered as the contribution of load segment k to the total unavailable charge u of the load profile. Let the quantity tr,k be given by uk (tr,k + ∆) = εuk (∆), or h 2 2 i P∞ 1 −β m (tr,k +∆−tk −∆k ) − e−β2 m2 (tr,k +∆−tk ) m=1 β2 m2 e = ε. (8) ˆ 2 2 ˜ P∞ 1 −β m (∆−tk −∆k ) − e−β2 m2 (∆−tk ) m=1 β2 m2 e Again, this equation for ` is difficult ´ to solve ` ´ tr,k in closed form, but by noting that exp −β2 m2 t ≤ exp −β2 t for all m = 1, 2, . . ., we get tr,k ≤ − β12 log (ε) = t¯r , the same upper bound we got before for a constant load profile. Then, from (6) and (7), we have N X k=1
uk (tr + ∆) = ε
N X
uk (∆).
k=1
uk (t¯r + ∆) = u(t¯r + ∆) ≥ εu(∆),
and similarly,
σB (T + tr (ε)) = lB (T ) + εuB (T ),
(12)
σE (T + tr (ε)) = lE (T ) + εuE (T ).
(13)
Let us denote the improvement in apparent charge lost of B over E as ∆σ(t) = σE (t) − σB (t). Also, let ∆σT = σE (T ) − σB (T ), and ∆lT = lB (T ) − lE (T ). The quantities ∆σT and ∆lT can be considered as metrics for evaluating the effectiveness of a battery-aware policy as they quantify how much better (in terms of σ) B can be than E , and at what cost (in terms of l). A. Effect of rest periods on ∆σ We have ∆σ(T + tr (ε)) = −∆lT + ε (uE (T ) − uB (T )) Substituting ε = 1 in the above equation, we get uE (T ) − uB (T ) = ∆σT + ∆lT , so that ∆σ(T + tr (ε)) = ε(∆σT + ∆lT ) − ∆lT .
(14)
Clearly, as ε decreases (or as the rest period duration increases), so does the improvement of the B policy over the E policy. From Figure 4, the recovery time for a given recovery ratio decreases monotonically with the battery parameter β, so that batteries with larger β will show smaller σ improvements for the same rest period.
(9) B. The rest period length criterion
k=1
As uk (t¯r + ∆) ≥ εuk (∆), it follows that N X
(11)
(10)
If ∆lT > 0, a sufficiently large rest period can cause ∆σ to flip signs, causing the B policy to actually be worse than the E policy, both in terms of σ and l. In other words, the optimality of B w.r.t. σ(T ) is reversed at a time T +tr (ε), for some ε > 0. Let us define the
Load current i(t) (mA)
i(t) hu(t)
400
Fig. 6.
iE (t)
300
σ(t)
u(t) = i(t) ∗ hu(t)
The battery model expressed as an LTI system
task T2 must be scheduled after task T1 , the tasks are not preemptible, • they must both be completed by time T = 60 min. Suppose now that one of the parameters of the system (e.g. the voltage/frequency of a processor) can be scaled. The load current and duration of the tasks without scaling are (600 mA, 20 min) and (400 mA, 20 min), respectively. The load profiles after scaling are shown in Figure 5(a). Theorem B.10 in [7, Pg.320] states that when a certain amount of slack could be assigned to either of two tasks by down-scaling, it is better (in terms of σ) to down-scale the later task. Also, the actual charge lost l(T ) when T2 is scaled is 17,000 mA min, but 15,000 mA min when T1 is scaled. Hence, we denote the policy that scales T2 as B , and the other as E . Using (2) again with a β = 0.273 min−1/2 battery, we can obtain the profiles of the actual and apparent charge lost for both these schedules. These are plotted in Figure 5(b). It can be seen that ∆σT and ∆lT are both positive. The value of ε∗ was computed from (15) as 0.20. For both the σB and the σE curves, this was found to correspond to a recovery time of tr (ε∗ ) = 15.87 min. As can be seen from Figure 5(b), this is also the point at which the optimality of the B policy is reversed. Further, the upper bound on the recovery time t¯r (ε∗ ) computed from (5) is equal to 15.88 min, which is very close to the actual recovery time. Thus, a rest period of greater than 15.87 min caused E to be a better policy than B , both, in terms of actual charge lost and apparent charge lost. •
200
(a)
•
0 0
20
60 80 Time t (min)
100
120
x 10
3
Charge (mA min)
40
4
3.5
σE (t)
∆σ
2.5 2
σB (t)
Reversal of Optimality
lB (t)
∆l
1.5
lE (t)
1
tr (ε∗)
0.5 0 0
T 20
40
60 Time (min)
80
100
120
Fig. 5. A task scheduling example that illustrates the reversal of optimality and schedule selection criterion.
critical recovery ratio ε∗ as that value of ε at which ∆σ(T +tr (ε) = 0. Then, using (14), ε∗ is obtained as ε∗ =
1 . 1 + ∆σT /∆lT
V. TASK GRANULARITY AND BATTERY OPTIMIZATION (15)
Thus, if it is known in advance that a forced rest period of length ∆r > tr (ε∗ ) is inserted at t = T , applying policy E during [0, T ) is optimal w.r.t. σ(T + ∆r ), otherwise, using policy B is optimal. It is intuitively satisfying that the criterion for choosing between them involves the ratio of the corresponding metrics ∆σT and ∆lT . If ∆lT = 0 and ∆σT > 0, then ε∗ = 0, and hence tr = ∞. This means that if B can achieve an improvement in apparent charge lost over E without any reduction in the actual charge lost, such a policy is always optimal even in the presence of forced rest periods. Section V-C shows an example of such a form of battery optimization. In other words, to avoid a reversal of optimality due to rest periods, the battery-charge σ should be optimized with a constraint that the energy consumption be no worse than that of an energy optimal policy. Further, if ∆lT = 0, it follows that ∆σ(T + tr (ε)) = ε∆σT . As the B -policy, being battery-aware, is more complex to implement than the E -policy, it may be desirable to set a minimum improvement level ∆σmin to invoke the B -policy. It follows then that for rest periods with a recovery ratio smaller than ε = ∆σmin /∆σT , ∆σ ≥ ∆σmin , so that the B -policy should be used, otherwise, the E -policy should be used. C. A task scaling example Consider a set of two tasks T1 and T2 that are such that: •
+
iB (t)
500
100
(b)
l(t) = i(t) ∗ hl (t)
hl (t)
600
they are both released at time t = 0,
It has been pointed out before [1], [7], [10] that batteries are not sensitive to fine-grained task scheduling. Using a novel frequency domain model of a battery, we now formally analyze the relationship between granularity of task scheduling and improvements in σ. A. Frequency domain battery model We observed that the battery model described by (2) can be equivalently represented by the Linear and Time Invariant (LTI) system shown in Figure 6, where hl (t) is the unit step function, and hu (t) is given by hu (t) = 2
∞ X
2
e−β
m2 t
, ∀ t ≥ 0.
(16)
m=1
Now, the hl (t) component simply computes the actual charge lost l(t) and does not involve any battery parameters. However, hu (t) depends on the battery parameter β. Hence, to characterize the battery’s frequency response, it is sufficient to find Hu ( f ), the Fourier transform of hu (t). This is given by Hu ( f ) = 2
∞ X m=1
1 . β2 m2 + j2π f
(17)
The DC response can be shown to reduce to Hu (0) = π2 /3β2 . Figure 7 shows a plot of |Hu ( f )|/|Hu (0)| for different values of β. The magnitude frequency response was found to be a monotonic function of the β value, and the figure shows the frequency response
10 0 -3 dB
!10 !20
β = 0.1 min
!40
β = 0.2 min−1/2
of β
!60 !70 !80 !90 !4 10
Fig. 7.
!2
0
10
10 Frequency f (Hz)
2
4
10
10
Battery frequency response for different values of the β parameter 3
DURATION
x 10 3.5
60
3
50
2.5
40
2
30
1.5
20
1
10
0.5
0
!2
10
0
10
2
10
Task granularity (s)
0 4 10
2
10
Fig. 9.
3dB
(s)
T4 518 20
70
10
τ = 1/f
T3 222 15
4
Practical range
!50
Percent improvement in σ
u
u
!30
T2 1011 10
TABLE II A N EXAMPLE TASK SET WITH LOAD MAGNITUDE AND REQUIREMENT OF EACH TASK .
β = 1 min−1/2
−1/2
T1 814 15
Improvement in σ (mA min)
|H (f)|/|H (0)| (dB)
Task Load magnitude (mA) Load duration (min)
β = 10 min−1/2
• 1
10
• •
0
10
0
0.5
−1/2
β (min Fig. 8.
1
1.5
)
The battery response time vs the β parameter.
curves for two extremes of the practical range of β values. Task scheduling at granularities less than 1 second result in significant frequency components larger than 1 Hz in I( f ), the frequency spectrum of the load current profile. From the figure, the magnitude response at 1 Hz for real batteries ranges from -10 dB to -30 dB. At higher frequencies, the response degrades even further. This suggests that real batteries are not sensitive to fine-grained task scheduling. Also, the closer to ideal a battery is (higher β), the more sensitive it is to fine-grained scheduling. An extreme case of this is illustrated by the nearly flat frequency response of a hypothetical battery with β = 10 min−1/2 . However, at β values greater than 1, the battery discharge behavior is already so close to that of an ideal battery, that any battery-specific optimization techniques become redundant. B. The response time of a battery To quantify the notion of task granularity, we define the response time of a battery as the reciprocal of its -3 dB cutoff frequency. Figure 8 shows a plot of the response time versus β over the range of practical values of β. It can be seen that the response time for “bad” (highly non-ideal) batteries is of the order of several minutes, while that for the “good” (close to ideal) batteries is of the order of seconds. This clearly suggests that fine-grained scheduling, for example, at the level of individual CPU tasks (typically of the order of milliseconds) does not warrant battery-specific techniques. Instead, the focus should be on pure energy minimization. C. A task scheduling example Consider a set of four tasks T1 , T2 , T3 and T4 such that
•
Improvement in σ(T ) for different task granularities.
each task has a fixed load magnitude and duration shown in Table II, all tasks are released at time t = 0, all tasks must be completed by t = T , where T is the sum of the duration of all tasks (i.e. no idle periods). there are no task dependencies.
We are free only to choose the order of execution of the tasks. As the deadline is the sum of the task durations, the task order uniquely determines the task start times. For such a case, it follows from Theorem B.2 in [7, Pg.314] that the apparent charge lost σ(T ) is minimized if the tasks are ordered in a non-increasing order of load currents {T2 , T1 , T4 , T3 }, and maximized for a non-decreasing order of load currents {T3 , T4 , T1 , T2 }. Let us denote the apparent charge lost at the end of the task set for these two extreme cases as σni (T ) (for non-increasing sequence) and σnd (T ) (for non-decreasing sequence). Thus, the maximum improvement in σ that can be achieved by task scheduling is simply ∆σ(T ) = σnd (T ) − σni (T ). Rakhmatov et al. [7] demonstrated that this difference is significant for a battery commonly used in pocket PCs, and this served as the motivating example for their work on task scheduling. We wish to study the effect of task granularity on this improvement ∆σ. We now define the task granularity (somewhat arbitrarily) as the smallest load duration in the task set (in this case 10 min). Suppose now that each task’s duration were to be scaled by a factor s. The above-mentioned theorem still holds, but as the solid line in Figure 9 shows, the percentage improvement is only significant for task granularities of the order of 10 ms to 1000 s. The reduction in percentage improvement at low task granularities can be explained by the corresponding low frequency response of the battery at high frequencies, as shown in Figure 7. 1) Decreasing improvement at large granularities: However, the frequency response does not explain the reduction in percentage improvement at high task granularities. The dotted line in Figure 9 shows the absolute improvement in apparent charge lost that is achieved by task scheduling. It can be seen that at high task granularities, this improvement levels off. This is because of the charge recovery effect. From Section III-D, we know that every segment of a load profile contributes a certain amount of charge to the
total unavailable charge, and this contribution gradually reduces over time. A rest period is not necessary for the charge recovery process, it is only sufficient for a net charge recovery to be noticeable. If a task is of a very long duration D, it can be divided into two parts of successive durations D− t¯r and t¯r , where t¯r is the upper bound on the recovery time derived before. Clearly, the earlier load segment of duration D − t¯r has almost completely recovered its charge by time D, the original load duration. This means that a load of duration larger than t¯r is practically equivalent (for charge recovery purposes) to a load of duration t¯r . As pure task scheduling (without scaling) derives its benefit exclusively from the charge recovery effect, this reduction of the load duration to t¯r causes the improvement due to charge recovery to level off. Consequently, the percentage improvement reduces with increasing granularity. VI. R ECOMMENDED POLICY Based on the above analysis, we propose the following general guidelines for choosing between B , a candidate battery-aware policy, and E , a candidate energy-aware policy. • Calibrate the battery using the procedure mentioned in [7] and obtain its parameters α and β. • Assuming no rest periods, compute ∆σT = σE − σB , the difference in apparent charge lost by E and B , and also compute ∆lT = lB − lE , the maximum improvement in the actual charge lost by E over B . • If ∆lT > 0, (note strict inequality) – Compute ε∗ using (15) and the corresponding bound on the recovery time t¯r (ε∗ ) using (5). – If rest periods of length larger than t¯r (ε∗ ) occur with high probability, choose E . Stop. • Else, if ∆lT = 0 (or, both policies consume the same energy) – Choose a value for ∆σmin , the minimum improvement in ∆σ that makes it acceptable to implement the more complex B policy over E . – Compute the ratio ε = ∆σmin /∆σT , and the corresponding bound on the recovery time using (5). – If rest periods of length larger than t¯r (ε) occur with high probability, choose E . • Find the task granularity of the schedule determined by B . If it is more than an order of magnitude larger than the response time of the battery from Figure 8, choose E , else choose B . Some of these steps have been kept general on purpose, as their implementation will depend on the particular problem at hand. For example, the choice of ∆σmin for a portable movie player could be chosen to be that value that creates an improvement of battery lifetime of at least 30 minutes. The value of T could be chosen as the duration of a movie for a portable DVD player, or the expected duration of continuous use for a portable audio player. VII. C ONCLUSION We proposed two alternative interpretations of a high-level battery model: (i) a charge component model that allowed us to obtain a bound on the recovery time of a battery, and (ii) a frequency domain model that allowed us to compute the response time of a battery. We note that rest periods (of the order of a few minutes to several hours) are experienced by almost all portable battery-powered devices. We showed that the improvement promised by a batteryaware policy in the absence of rest periods reduces exponentially with time if rest periods are inserted. For the case when the duration of an upcoming rest period is known, we developed a criterion to
choose between an energy-aware policy and a battery-aware policy. Further, the frequency domain model, along with the charge recovery effect, helped us to explain why battery-aware task scheduling is not advisable at both low and high task granularities. We believe the guidelines outlined above serve as a good starting point to evaluate if it is worth the extra cost of implementing a battery-aware approach over an energy-aware approach. VIII. ACKNOWLEDGEMENT This work was carried out at the National Science Foundation’s State/Industry/University Cooperative Research Centers’ (NSFS/IUCRC) Center for Low Power Electronics (CLPE). CLPE is supported by the NSF (Grant EEC-9523338), the State of Arizona, and an industrial consortium. This work was also supported by NSF through grant CCR-0205227. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF. R EFERENCES [1] T. L. Martin, “Balancing batteries, power, and performance:System issues in CPU speed-setting for mobile computing,” Ph.D. dissertation, Carnegie Mellon Univ., 1999. [2] D. Linden and T. Reddy, Handbook of Batteries, 3rd ed. McGraw Hill, 2001. [3] R. Rao, S. Vrudhula, and D. Rakhmatov, “Battery modeling for energyaware system design,” IEEE Computer: Special Issue on Power-Aware Computing, vol. 36, no. 12, pp. 77–87, December 2003. [4] J. F. Manwell, A. Rogers, G. Hayman, C. T. Avelar, and J. G. McGowan, Hybrid 2 – A Hybrid System Simulation Model: Theory Manual, University of Massachusetts, November 1998. [5] L. Benini, G. Castelli, A. Macii, E. Macii, and R. Scarsi, “Discrete-time battery models for system-level low-power design,” IEEE Trans. VLSI Sys., vol. 9, no. 5, pp. 630–640, October 2001. [6] C. F. Chiasserini and R. R. Rao, “Energy efficient battery management,” IEEE J. Selected Areas in Comm., vol. 19, no. 7, pp. 1235–1245, July 2001. [7] D. Rakhmatov and S. Vrudhula, “Energy management for batterypowered embedded systems,” Trans. on Embedded Computing Sys., vol. 2, no. 3, pp. 277–324, 2003. [8] P. Rong and M. Pedram, “An analytical model for predicting the remaining battery capacity of lithium-ion batteries,” in DATE ’03: Proc. conference on Design, Automation and Test in Europe. IEEE Computer Society, 2003, pp. 11–48. [9] M. Doyle, T. F. Fuller, and J. Newman, “Modeling of galvanostatic charge and discharge of the lithium/polymer/insertion cell,” J. Electrochem. Soc., vol. 140, no. 6, pp. 1526–1533, 1994. [10] J. Luo and N. K. Jha, “Battery-aware static scheduling for distributed real-time embedded systems,” in DAC ’01: Proc. Design Automation Conference. ACM Press, 2001, pp. 444–449. [11] J. Khan and R. Vemuri, “An iterative algorithm for battery-aware task scheduling on portable computing platforms,” in Design, Automation and Test in Europe, 2005. Proceedings, 2005, pp. 622–627. [12] P. Chowdhury and C. Chakrabarti, “Battery aware task scheduling for a system-on-a-chip using voltage/clock scaling,” in Signal Processing Systems, 2002. (SIPS ’02). IEEE Workshop on, 2002, pp. 201–206. [13] M. Pedram and Q. Wu, “Battery-powered digital CMOS design,” Very Large Scale Integration (VLSI) Systems, IEEE Transactions on, vol. 10, no. 5, pp. 601–607, 2002. [14] P. Rong and M. Pedram, “Battery-aware power management based on markovian decision processes,” in ICCAD’02: Proc. Intl’ Conf. Computer-Aided Design, 2002, pp. 707–713. [15] L. Benini, G. Castelli, A. Macii, and R. Scarsi, “Battery-driven dynamic power management,” Design & Test of Computers, IEEE, vol. 18, no. 2, pp. 53–60, 2001.