Articles

How battery percentage is measured, and why it jumps

Battery percentage is estimated in one of three ways: by looking up the cell’s voltage in a table, by counting the charge that flows in and out, or with a model-based fuel gauge that combines both with a running estimate of the cell’s resistance. Voltage lookup is cheap, but it reads low under load, needs an hour or more of rest to be right, and is nearly blind on a LiFePO4 cell’s plateau, where about 77 mV can span almost 60 percent of the charge. Counting is accurate over hours but drifts with the sensor’s offset and the cell’s self-discharge, and it needs a known starting point and a known capacity. In one gauge maker’s comparison on one cell, the peak errors were about 20 percent for voltage alone, 11 percent with a resistance correction, 6 percent for counting before the capacity had been learned, and about 1 percent for its model-based gauge. The percentage jumps when the estimate is corrected against something it trusts more, such as a full charge, a reading at rest or the cell reaching its cutoff early in the cold, or when the gauge’s idea of full capacity changes.

The familiar complaints, an indicator stuck at 100 percent, a sudden drop, a product that dies at 8 percent, usually come from a step nobody checked: the measurement, the estimate of what the cell holds when full, or what the display does with both. State of charge, open-circuit voltage and internal resistance are defined in How lithium-ion charging works.

Method Measures Wrong when Corrects itself Peak error, one maker’s test
Voltage lookup Cell voltage Under load, cold, on a flat curve Every reading, no memory About 17 to 20 percent
Voltage with resistance correction Voltage and current The cell is cold or aged Every reading About 10 to 11 percent
Coulomb counting Current, integrated Offset uncorrected, long gaps between full charges At full charge; capacity only from a full discharge About 6 percent, capacity not learned
Model-based gauge Both, plus a model of the cell Not yet learned; for the rest-based kind, on a plateau or never resting At rest, on each discharge, after enough charge passes (rest-based kind) About 1 percent

What “100 percent” is a percentage of

A gauge reports relative state of charge as remaining capacity divided by full charge capacity. In one gauge maker’s definition, full charge capacity is the charge delivered from full until the terminal voltage reaches the gauge’s terminate voltage at a given rate, less a reserve, and it “is lower at higher rates and low temperatures because the cell I*R drop causes the Terminate Voltage threshold to be reached earlier.” So full charge capacity depends on the cell, the load and the temperature.

Three capacities hide behind “full”. The rated capacity is the cell maker’s figure at a stated rate, temperature and cutoff. The chemical capacity, which one gauge maker calls Qmax, is what the chemistry holds, measured at low current. The full charge capacity is what this product can draw out before its own cutoff at its own load. State of health is reported from the chemical capacity, the full charge capacity or the resistance, depending on the gauge; one gauge maker’s application note counts a battery at the end of its useful life when its chemical capacity has fallen to 80 percent of the original.

Both ends of the scale are set outside the gauge. Full is wherever the charger stops, so a lower charge voltage or a higher termination current defines a lower full, and the gauge’s full has to come from the same end-of-charge event or it never shows 100 percent: a gauge whose own taper threshold sits below the charger’s termination current never sees full and sticks at 99. Empty is the terminate voltage, which has to be the voltage at which the product really shuts down, under its real load. Set below the product’s shutdown, the product dies with the display above zero; set above, the display reaches zero with charge left. Where the shutdown sits against the protection’s undervoltage trip is in the protection article.

Reading the voltage

A voltage table maps the open-circuit voltage, the voltage at rest, to a state of charge; the voltage-only method in that maker’s comparison used an 11-point table with straight lines between points. Its summary is blunt: the state of charge “is not adjusted for important factors like discharge rate, temperature, and the age of the battery.”

Load, resistance and the wait for rest

Under load the terminal voltage sits below the open-circuit voltage by the current times the internal resistance, so a loaded reading looks emptier than the cell is. The error in state of charge is that drop divided by the slope of the curve where the cell is. As an example, a cell with 30 mΩ of DC resistance, one 21700 sheet’s figure, drops 30 mV at 1 A (a 30-second figure; the sag under a sustained load is larger, so this is a lower bound). On a standard lithium-ion cell’s flattest stretch, about 2.3 mV per percent across 26 to 54 percent, that reads about 13 percent low; on LiFePO4’s plateau, about 1.3 mV per percent, about 23 percent. The fix is to measure the current too and add the drop back, using an assumed resistance. In that comparison the correction halved the peak error, but it’s only as good as the resistance it assumes, and the maker warns of greater error on aged cells and in the cold, “since the internal impedance increases.”

Removing the load doesn’t give a clean reading straight away. The resistive drop goes the instant the current stops, but polarization inside the cell relaxes over minutes to hours, as the charging article describes. One gauge maker’s gauges accept a reading as open-circuit only when the voltage changes by less than 4 µV per second, checked after at least 30 minutes, or after 5 hours at most; that takes “approximately 1 hour if DOD is between 0 and 80%, and 3–4 hours if DOD is above 80%,” longer in the cold. The current needn’t be zero, only below a C/20 rate. On an example 3 Ah cell, C/20 is 150 mA, which through 30 mΩ is 4.5 mV, about 2 percent on the flat stretch if uncorrected; the gauge corrects for it with its resistance estimate, so what’s left is that estimate’s error. A product that never draws less than C/20, or never sits for an hour, never gets a clean reading at all.

Temperature and age

A table is measured at one temperature, and cold raises the resistance, so the loaded voltage falls further below the table at the same charge. Age works differently. One gauge maker’s note says the open-circuit voltage curves of typical lithium-ion and LiFePO4 chemistries “do not shift significantly as the battery ages.” So a rested reading on an old cell still gives roughly the right share of what the cell now holds. What changes is what that share is worth, since the capacity has shrunk, and how far the voltage sags under load, since the resistance has grown, so a runtime estimate built on a fixed capacity overstates an aged cell.

LiFePO4’s plateau

One gauge maker lists where its gauge won’t use a voltage reading to update capacity: for one LiFePO4 cell, 3,274 to 3,351 mV, covering 34 to 93 percent, and for a second, 3,193 to 3,329 mV, covering 12 to 92 percent. The error from a given voltage error “increases dramatically between 3274 and 3309 mV.” Two cells of one chemistry have different flat ranges, so the table has to be for the cell fitted. Another gauge maker describes LiFePO4’s two voltage plateaus and uses a keep-out window where voltage isn’t trusted. What a cell monitor’s ±15 mV means there, about ±11 percent, is worked in the BMS article. On LiFePO4, voltage gives the state of charge near full and near empty; in between, the gauge is a charge counter, and it needs regular trips to one end.

Counting the charge

A coulomb counter measures the current through a sense resistor in series with the cell and integrates it: the area under the current curve in the charging article’s charge-curve figure. The cell’s resistance and plateaus don’t affect it, though temperature moves the converter’s offset and the sense resistor. Its trouble is the two numbers it can’t measure: in one gauge maker’s words, “full charge is needed to initialize SOC, otherwise SOC is unknown,” and finding the full charge capacity needs “a full discharge to empty … which is not viable for most applications because it would cause data-loss on shut-down.” The 6 percent in that test was with the capacity not yet learned; on later cycles at similar load and temperature, the maker says, counting can have low error.

Offset, gain and what the counter can’t see

Offset is the error that matters, because it integrates. One gauge’s converter is specified at 10 µV typical input offset, with no maximum given; another’s table gives a few microvolts after calibration. As a typical case, across an example 10 mΩ sense resistor, 10 µV is 1 mA, 24 mAh a day: on an example 1,000 mAh cell, about 17 percent in a week if nothing corrects it. The large-pack version is in the custom charger article. One gauge measures its own offset from time to time, when the current is low, and subtracts it. It also has a counting deadband, a small voltage across the sense resistor below which it stops integrating, so offset doesn’t pile up; the current that corresponds to depends on the resistor, and a product sleeping below it isn’t counted: an example 2 mA for a day is 48 mAh. A gauge that corrects at rest catches that at its next rested reading; a pure counter doesn’t. The same offset limits how low a firmware charger can terminate, as the thresholds article explains.

Gain error is a share of every reading, from the converter and from the sense resistor’s tolerance and temperature drift; gauges calibrate current gain on the board in production to take out the fixed part. Once the full capacity has been learned by the same counter, a steady gain error cancels in the percentage and in a runtime estimate, since both the charge and the current carry it, though not in milliamp-hours; against a programmed design capacity it doesn’t cancel at all.

The counter sees only current through its sense resistor. Self-discharge happens inside the cell: about 2 to 3 percent a month for lithium-ion at room temperature in one cell maker’s handbook, more when full or warm, and one LiFePO4 maker’s acceptance limit is 3 percent a month. Anything wired on the cell’s side of the sense resistor is just as invisible: the protection circuit, a monitor, a battery-sense divider.

On one sample board, a divider like that drew about 20 µA with the product off, as the power path article describes. Gauges that read at rest compensate self-discharge that way.

Where the count gets corrected

A counter is reset at known points, and each reset can show as a jump:

  • Full: the charger terminates and the gauge sets remaining capacity to full.
  • Empty: the cell reaches the terminate voltage and the gauge learns how much came out. A simpler gauge that learns capacity only near the end of discharge can do it abruptly: one maker warns of “an abrupt SOC drop … sometimes up to 50% if the temperature is low and the rate of discharge is high.”
  • Rest: a rest-based gauge corrects the state of charge from the open-circuit voltage, outside the flat range.
  • Enough charge passed between two rests: the gauge updates the chemical capacity.

That last one is fussy. One gauge maker’s gauge updates chemical capacity only when the charge passed between two rested readings exceeds 37 percent of design capacity (90 percent for the first update), only between 10 and 40 °C, and only if neither reading fell in the flat range, and it weights small passes less. A product that only tops up between 70 and 100 percent, or lives on its charger, rarely meets those conditions, and its capacity estimate goes stale as the cell ages. A full charge alone doesn’t fix that: it resets the reference at full, but the capacity update needs a large discharge between two rests. The occasional full charge one laptop and phone maker schedules is for the reference, as the lifetime article describes. For LiFePO4 in shallow cycles the same maker allows 10 percent instead of 37, “at the expense of SOC accuracy.”

Model-based gauging

What follows is one gauge maker’s resistance-tracking design. Other gauges blend a voltage model with the counter continuously and need neither long rests nor a learned resistance table, and some use no sense resistor at all, so check how the gauge you choose corrects itself. The design described keeps three kinds of information: chemical (depth of discharge and chemical capacity), electrical (internal resistance against depth of discharge) and external (load and temperature). It counts charge between rested readings and during discharge learns the resistance: the terminal voltage’s difference from the table’s open-circuit voltage at the present depth of discharge, divided by the current.

The resistance answers the question the user cares about: how much is left at this load. The gauge simulates the rest of the discharge in steps, each the open-circuit voltage at that depth less the present load current times the learned resistance, until the simulated voltage reaches the terminate voltage. So a heavier load or a colder cell gives less remaining capacity for the same charge, and the percentage can step when the load changes, changes the same maker calls “drastic but legitimate.”

That maker claims “as little as 1% error across a wide variety of operating conditions”; in its own phone test the error was about 4 percent as the discharge started and within 2 percent from 80 percent down to empty. The model needs the cell’s own data, starting with its open-circuit voltage curve; a gauge set up for a similar cell carries the difference into every correction.

Resistance changes with age

One gauge maker’s application note plots low-frequency resistance against age and says that “over 100 cycles, a typical value of the low-frequency resistance of the battery can increase by 60%, depending on the battery chemistry and usage patterns.” That’s the note’s illustration for its example, not a lifetime figure or a rating for any cell, and it keeps rising after that. Storage raises it too; the lifetime article gives one study’s worst case, about 1.8 times the starting resistance. A simpler method that predicts the end-of-discharge voltage with fixed compensation can underestimate an aged cell’s impedance, which the same maker says “can result in 15% - 25% error in Full Charge Capacity and SOC for aged batteries.” The resistance-tracking gauge relearns resistance on every discharge, provided the product discharges far enough and rests often enough to let it.

Usable capacity in the cold and under load

A cold cell holds its charge but can’t deliver all of it before reaching the cutoff. In one gauge maker’s example, a full charge capacity of 2,250 mAh at room temperature “could reduce to 1100 mAh” in very cold conditions, about 51 percent less. Cell sheets give figures, mostly acceptance minimums:

Cell Test Capacity against 25 °C
Lithium-ion 18650, 2,600 mAh 0.2C to 2.50 V At least 70 percent at −20 °C
Lithium-ion 18650, 2,900 mAh 1C to 2.75 V, 2.2 V at −20 °C At least 70 percent at −20 °C
LiFePO4, 10 Ah 0.5C to 2.5 V 75 percent at 0 °C, 55 percent at −10 °C
LiFePO4 prismatic 0.2C, cutoff 2.0 V At least 70 percent at −20 °C
LiFePO4 12.8 V packs (pack maker) 1C About 20 percent less at 0 °C, about half at −20 °C

Two of those rows lower the cutoff to reach their cold figure, so a product with a fixed shutdown voltage gets less than the sheet suggests. Whether the cell may be charged in the cold is a separate limit.

A gauge can report chemical state of charge, which holds steady and then hits empty early in the cold, or usable state of charge, which drops as the product goes outside and climbs back as it warms, with no charge moving. Users read either as a fault. One LiFePO4 pack maker, whose packs leave state of charge to a separate battery monitor, says the monitor doesn’t show the actual state of charge in the cold and tells users to watch the battery and cell voltages instead.

The low-battery cutoff is where this bites: an aged or cold cell under a heavy load reaches it early. The lifetime article covers the brown-out of an aged cell on a peak, and the power path article tells two sample-board faults in full. On one, the battery measurement sat on the switched system rail, so on USB the low-battery cutoff had nothing real behind it; on another, the cutoff read the cell under its heaviest current and shut the product down early.

Why the percentage jumps

A jump is the reported number being corrected. The usual causes:

  • A reading at rest corrects drift that counting built up, or self-discharge it missed.
  • The gauge learns a new full charge capacity. Remaining capacity updates every second but full charge capacity only “at a few points during a discharge,” so the ratio moves with no charge moving.
  • The load or temperature changes, and so does the remaining capacity at the new conditions.
  • The cell reaches the terminate voltage before the count says it should, and the display falls to zero.
  • The charge terminates before the count reaches full, or the count reaches full first and sits at 100 percent while the charger tapers.

A gauge can hide these. One gauge maker’s smoothing spreads the difference between reported and “true” state of charge over the rest of the cycle: during discharge it adds or removes charge from the running count, speeding or slowing the displayed fall until it meets the true value at empty. During charge it adjusts a filtered full charge capacity that “is not a real determinant of the total available battery capacity”; the unfiltered value is the real one. On entering a rest it can converge over time or at once. Smoothing is a setting, so a product can still jump if it’s left off.

That makes the display a design decision. Settle these before the firmware is written:

  • Where 0 percent sits: at the product’s own shutdown, with reserve for a clean shutdown and for months on a shelf.
  • Which value feeds what: the smoothed one suits the display; runtime estimates and health reports need the unfiltered one.
  • Whether a correction after a rest converges or snaps.
  • Whether the display may move against the current, rising during discharge or falling on the charger.
  • That 100 percent arrives when the charger terminates, not long before.

Series packs: per cell or per pack

In a series pack every cell carries the same current, so a counter on the pack counts the same charge for all of them and can’t tell them apart. A passive balancing bleed runs across one cell and never passes the pack’s sense resistor, so it isn’t counted, and it differs from cell to cell. The pack is full when its highest cell is full and empty when its lowest is empty, as the BMS article explains, so a gauge tracking only the total overstates what’s left once the cells drift.

Multi-cell gauges can keep the voltage side per cell. In one gauge maker’s description, the gauge updates depth of discharge from rested readings “for each cell separately,” stores a chemical capacity for each series cell, and uses the lowest-capacity cell’s for the pack. The cell monitor’s accuracy, about ±2 to ±10 mV at room temperature across the families in the BMS article and ±15 mV in LiFePO4’s range on the loosest, becomes part of the gauge’s, and on a LiFePO4 plateau it decides whether a reading is usable at all.

Large LiFePO4 packs in standby use combine every difficulty here, and need a planned trip to the top of charge, for the gauge’s reference and for balancing.

Getting a gauge to learn the cell

Most of a gauge’s accuracy is decided outside the gauge chip:

  • Use model data for the cell actually fitted, starting with its open-circuit voltage curve.
  • Set the terminate voltage to the product’s real shutdown at its real load, with the reserve decided above.
  • Make the gauge’s full the charger’s real termination, at the voltage and current it actually delivers.
  • Size the sense resistor for both peak and sleep current, calibrate its offset and current gain in production (designing for production test), and check the sleep current against the deadband.
  • Measure the cell, on its side of any battery switch, not the system rail.
  • Run a learning cycle before trusting it: charge to full, rest at least 2 hours, discharge most of the way (90 percent of design capacity for the first update on the gauge described), rest again, 3 to 4 hours after a deep discharge, all between 10 and 40 °C.
  • For products that never rest or never fill, plan an occasional full charge and deep discharge, or accept that the capacity estimate ages with the cell.
  • Test with the real load profile, warm and cold, logging the reported percentage against a reference measurement of the charge delivered.

If your product’s battery indicator sticks, jumps or dies early, or you’re choosing how to gauge a new design, get in touch.

All articles

Have a project in mind?

Based in southern Indiana. Working with clients anywhere, including companies across the Midwest.