Lagrangian multiplier constant. Again, the case for charging
(RBL-Charge) is similar. The SDB runtime calculates these
power values at coarse granular time steps and updates the
ratios based on the DCIR-SoC curves given by the manufacturer of the batteries.
A word of caution is necessary. The above RBL-algorithms
are “optimal” only in an instantaneous sense. They minimize the instantaneous decrease of RBL (when discharging), or maximize the instantaneous increase of RBL (when
charging). However, they are not globally optimal. Across
the length of an entire workload, these algorithms might not
actually maximize battery lifetime as we show in Section 5,
that is, if we had knowledge of the future workload, we could
improve upon the above instantaneously optimal algorithms
by making temporarily suboptimal choices from which the
system can profit later, for example, keeping a battery fully
charged, if we know that this battery will be particularly
helpful in the way of CCB or RBL for a future workload. For
example, the overall cycle life or daily battery life may be
improved when compared to using instantaneous mechanisms all the time.
Exploring these and other algorithmic nuances is interesting, but beyond the scope of this paper. We just note
that the SDB resource optimization problem differs from
traditional resource scheduling mechanisms, such as for
Big.Little processors, hybrid storage, and SSD wear leveling, because of the resource in question—batteries. The
main focus of traditional resource management algorithms is to multiplex a resource efficiently across a number of entities, such as users, processes, virtual machines,
or erase blocks in case of SSDs over some fixed periods
of time. The challenge of battery resource scheduling is
threefold: daily battery life cannot be simply extended by
minimizing instantaneous power losses; their long-term
cycle life cannot be simply extended by balancing cycle
life across batteries. Knowledge of impending workload
can be used to improve the latter two metrics by picking
strategies that may not be an instantaneous optimums as
we demonstrate in Section 5. We hope that exposing the
appropriate APIs will help system and algorithm designers
to customize the scheduling algorithms for their battery
configuration, and user workloads based on predicted as
well as expected user behavior.
4. PROTOTYPE AND MICROBENCHMARKS
In this section, we describe the implementation of SDB and
present microbenchmarks to evaluate it.
We built a hardware prototype of the SDB hardware architecture in Figure 4c. Figure 6 shows the components of our
We built a custom controller board with a ARM Cortex M3
microcontroller and a low-loss switching circuit. We also built
a custom fuel gauge module that consists of a coulomb counter and a controller. We modified an off-the-shelf battery-char-ger evaluation board to enable dynamic charge current setting
by the microcontroller on the control board. These hardware
modules were interconnected as shown in Figure 6.
We used an ideal diode to switch between the batter-
ies. The switching between batteries is extremely fast, and
hence the battery sees a constant, smooth current draw.
We note that the small power-loss due to this switch under-
estimates the efficiency achievable by the proposed solu-
tion. As mentioned in Section 3, the extra power-loss and
the high component cost can be eliminated by augment-
ing existing switching regulators to switch across multiple
The boards were designed with Altium Designer,
1 a circuit board development package. The firmware was written
in C using the IAR for ARM V7.40 tool chain. The board firmware contains 3500 lines of code. We also developed the
prototype SDB Runtime shown in Figure 5 with 1200 lines
We conducted simulations and microbenchmark experiments to evaluate the efficiency and accuracy of our hardware design, as well as to evaluate the correctness of the
firmware and the runtime. Circuit simulations were done
11 a simulation program with integrated circuit
emphasis (SPICE). We generated the circuits as shown in
Figure 4, in LTSPICE, and conducted extensive simulations
at various power loads to validate system correctness, stability, and responsiveness.
4. 1. SDB emulator
We build a model for batteries based on Thevenin’s model
as built by other battery researchers3–6, 9 to simulate batteries
used in production devices. The simplified Thevenin model
is reproduced in Figure 7a. The model has four parameters:
open circuit potential, internal resistance, concentration
resistance, and plate capacitance.
The open circuit potential of a battery is the voltage
across the terminals of the battery when no load is applied. It
increases with the amount of energy left in a given battery. The
internal resistance of a battery is the resistance across the terminals of the battery when a load is applied. It decreases with
the amount of energy left in a given battery. In Figure 7b and c,
we plot the open circuit potential and resistance, respectively,
of a few batteries as the energy left in them increases.
The concentration resistance and the plate capacitance
of a battery are fixed values for a given battery. We measure
the open circuit potential, internal resistance, concentration resistance, and the plate capacitance for several kinds
of batteries. We use the industry standard Arbin BT-20002
Figure 6. SDB prototype implementation.
Fuel Gauge Microcontroller