Lithium-Ion State of Charge Estimation
A lithium-ion battery-management system (BMS) estimates state of charge (SOC) by tracking the charge flowing into and out of the cells, then periodically correcting that estimate against the cells’ open-circuit voltage (OCV). Coulomb counting provides a continuous estimate; OCV provides an occasional reference.
The problem: charge is not directly observable
SOC is the battery’s remaining usable charge, usually expressed as a percentage of its current rated capacity. A BMS cannot measure SOC with a single sensor. Voltage, current, temperature, and time are observable; SOC is inferred from them.
Voltage alone is a poor gauge while a battery is operating. A cell’s terminal voltage changes with current because of internal resistance and other electrochemical effects. The voltage also depends on temperature, aging, and recent charge or discharge history. Two cells with the same SOC can show different voltages under load, while a cell’s voltage may barely change across a large part of its charge range.
Without an SOC estimate, a product has difficulty deciding when to report an empty or full battery, limit power, balance cells, or shut down safely. A fuel gauge that simply maps instantaneous voltage to a percentage would jump when a motor starts and would often report the wrong value.
Coulomb counting: integrate the current
A coulomb is a unit of electrical charge. Current is charge flowing per unit time, so measuring current and accumulating it over time tells the BMS how much charge has entered or left the battery. This is called coulomb counting.
If positive current means discharge, a simple discrete update is:
SOC_next = SOC_now - (current × sample_time) / usable_capacity
Here, current is in amperes, sample time is in hours, and usable capacity is in ampere-hours. For example, drawing 2 A for 30 minutes removes 1 Ah. A battery model may also account for charging efficiency, temperature, charge rate, and the difference between nominal and currently available capacity.
The BMS usually measures pack current with a current shunt, a precisely characterized low-resistance element whose small voltage drop reveals current. An amplifier and analog-to-digital converter (ADC) digitize that voltage. Some systems use a magnetic current sensor instead. Firmware samples the result at a fixed interval, applies calibration and filtering, and integrates the signed value.
The initial SOC matters. If the BMS boots knowing that the battery is at 60%, subsequent counting can track changes from that point. If the initial value is wrong, counting does not repair it; it faithfully preserves the wrong starting point.
A practical implementation also needs boundaries. When a validated full-charge condition is reached, the BMS can set SOC to 100%. When a validated empty condition is reached, it can set SOC to its lower limit. The word validated matters: a brief voltage spike or a temporary charger connection should not cause a false reset.
Why counting drifts
Coulomb counting is an integration operation, and integration turns small measurement errors into persistent state errors. Suppose the current sensor reports 20 milliamperes too much. That error is tiny at one instant, but over 50 hours it accumulates to 1 Ah. The estimated SOC then gradually diverges from the battery’s actual condition.
Sources of error include:
- sensor offset, meaning a nonzero reading when no current flows;
- gain error, where measured current is consistently too high or too low;
- ADC quantization and electrical noise;
- missed samples, timing errors, or firmware resets;
- self-discharge and charge that the measured path does not capture; and
- an incorrect capacity value as the cell ages or its temperature changes.
The capacity used in the calculation is not necessarily the capacity printed on the cell. That label is measured under specified conditions. A cold battery, an aged battery, or a battery discharged at high current may deliver less usable charge. If the BMS keeps using the original capacity, even perfect current measurements will produce an increasingly optimistic estimate.
This is why SOC is often accurate over a short interval but slowly becomes untrustworthy over many cycles.
OCV correction: use a rested battery as a reference
Open-circuit voltage is the voltage measured across a cell when no meaningful current is flowing. After charging or discharging stops, the cell needs time to relax toward an equilibrium voltage. A manufacturer can characterize cells by recording their rested voltage at known SOC values, producing an OCV-to-SOC lookup table for a particular chemistry, temperature range, and aging assumption.
When the pack is sufficiently still, the BMS measures cell voltages and temperature, looks up the corresponding SOC estimate, and uses it to correct the coulomb-counted value. It may replace the estimate directly, or blend the two estimates gradually. More advanced systems use a state observer, an algorithm that compares a battery model’s predicted voltage with the measured voltage and adjusts hidden estimates such as SOC. A Kalman filter is one common family of state observers.
OCV is not an instant calibration signal. Voltage immediately after a load stops still includes temporary polarization effects, and the voltage can depend on whether the cell was recently charged or discharged. This path dependence is called hysteresis. Temperature also shifts the voltage curve. The BMS therefore applies OCV correction only when current has been near zero for a required rest period, and it may reject the result when conditions are unsuitable.
The correction is especially useful near reliable reference points, such as a confirmed full charge or a sufficiently rested low-SOC condition. In the middle of a lithium-ion cell’s voltage plateau, a sizable SOC change may produce only a small voltage change, so OCV cannot resolve SOC precisely there.
Calibration is periodic, not optional
The two methods complement each other:
- Coulomb counting responds immediately and works while the battery is in use, but accumulates error.
- OCV estimation can remove accumulated error, but needs a quiet, rested battery and a suitable voltage model.
Periodic calibration supplies the missing absolute reference. A BMS may calibrate when the charger reaches a defined full-charge condition, after the battery rests, during a controlled service cycle, or when its software identifies a trustworthy OCV condition. It can also update its estimate of usable capacity by comparing the charge counted between reliable endpoints.
The SOC value seen in a device log, diagnostic screen, or “remaining capacity” error is therefore usually an estimate maintained by a model, not a direct measurement. Good BMS software preserves the continuous information from current integration while looking for safe opportunities to correct its accumulated drift with voltage and operating-history evidence.