For charging, the SDB hardware has to support control
over how batteries are charged. In contrast to existing solutions where batteries are charged according to a fixed charging profile, SDB requires setting of charging currents and
charging profiles dynamically based on OS policies. Under
certain circumstances, it should even be possible to charge
a battery from another one.
Designing these flexible charging and discharging circuits are challenging for two reasons. First, due to the high
currents that flow in these circuits, any electronic component in series with the current flow will cause energy losses.
Hence, these circuit designs should introduce as few of
these components as possible. Second, each extra component we introduce can increase the weight, volume, and bill
of material (BoM) cost of the device, which will make the
proposed solution unattractive in the competitive hardware
SDB discharging circuit design. A simple discharging
circuit can be implemented using a combination of an electronic switch and a capacitor as shown in Figure 4a. The
microcontroller achieves load switching by connecting the
appropriate battery to the load. To achieve load sharing, the
load is switched between the batteries at a high frequency
in round-robin fashion. The ratio of the current draw is determined by the fraction of time the switch is connected to
a particular battery. The capacitor acts as an energy store to
smooth out the discontinuities due to switching. Parasitic
battery capacitance and external capacitors smooth out the
high frequency battery current.
However, this naive implementation has two main
drawbacks. First the switch, typically implemented using
a Field Effect Transistor (FET), has a finite on resistance
that causes significant power loss at high load currents.
Second, a switch with high power handling capability and
the necessary capacitors increase the BoM cost and space
To overcome these shortcomings, we designed a new
switched mode regulator architecture that integrates fine-
grain battery switching into the regulator itself. As shown
in Figure 4c, we restructure the built-in switch to achieve
voltage regulation and support switching between multiple
batteries—by drawing packets of energy from the batteries
in a weighted round-robin fashion. We reuse the storage
capacitor to smooth out the load current variations due to
switching. We have evaluated the correctness of the pro-
posed solution under different battery voltages and load
conditions by running LTSPICE11 simulations.
SDB charging circuit design. The SDB charging circuit
should have the ability to charge batteries at a configurable
rate and also charge them from each other. Given that such
charging should be possible irrespective of the battery voltage, the batteries should be connected through a buck-boost
regulator, such that the energy source is at the input and the
energy sink is at the output of the regulator. A buck-boost
regulator is a particular form of switching regulator where
the regulator output voltage can be either less than or greater than its input voltage.
Apart from different charging configurations, SDB
requires dynamic fine-grain control over the charging profile. This is achieved by instrumenting each switched mode
regulator with multiple charging profiles where the SDB
microcontroller dynamically selects the appropriate charging profile based on OS policy decisions.
Figure 4b shows how these modules can be combined
to implement a flexible charging circuit. However, a
major drawback of this configuration is the large number
of switching regulators (O(N2) for N batteries) required,
which negatively impacts the device BoM cost and space
Instead, we design an optimized charging circuit as
shown in Figure 4c, which requires only O(N) switched mode
regulators to charge N batteries. When an external supply
is present, the microcontroller configures both R1 and R2 in
buck mode to charge the batteries. When external power is
removed, R1 and R2 are disabled. When B2 is to be charged
from B1, R1 operates in reverse buck mode while R2 operates
in buck mode and vice versa.
3. 3. SDB policies and APIs
Our current SDB software architecture is illustrated in
Figure 5. An SDB Runtime encapsulates the SDB microcontroller from the rest of the OS. The SDB Runtime is responsible for all scheduling decisions affecting the charging and
discharging of batteries. It takes clues from the rest of the
OS, and communicates the charging and discharging scheduling decisions to the SDB controller.
Figure 4. (a) A simple switch and capacitor-based battery switching solution. (b) A naive implementation of a flexible charging circuit
consisting of two buck regulators and two buck-boot regulators with dynamic charging parameters. (c) SDB hardware architecture for an
example two-battery system. The switched mode regulator implements discharge across multiple batteries and the reverse buck regulators
(a) (b) (c)
Power Management Bus