Battery SOC Estimation Guide: Coulomb Counting, OCV Lookup and EKF

Battery SOC Estimation Guide

Coulomb Counting, OCV Lookup, EKF, Impedance Tracking & Hybrid Algorithms

1. Introduction — Why “Percent Battery” Is an Estimate, Not a Measurement

Unlike fuel in a tank, the state of charge (SOC) of a lithium-ion cell cannot be measured directly — there is no sensor that reads percent. Every battery gauge infers it from proxies: the current integrated over time, the open-circuit voltage (OCV), the cell impedance, or a model-based observer. Each proxy has a failure mode: coulomb counting drifts with the current-sense offset, OCV is blocked while the battery is loaded and needs long rest, and impedance changes with age and temperature. This guide covers the SOC definition and units, the four main estimation families (OCV lookup, coulomb counting, impedance/DCIR tracking, and model-based Kalman filtering), the hybrid architecture used by real fuel-gauge ICs, the state-of-health coupling, the temperature/aging corrections, the parameter identification, and a complete worked example that runs each method on the same data. It complements the battery fuel gauge and BMS design guides on this site.

2. SOC, SOH and the Definition That Matters

SOC is the ratio of the remaining charge to the present capacity: SOC(t) = SOC(0) − (1/Q_rated) · ∫ I(τ) dτ with the sign convention dependent on discharge positive. Two details separate a good gauge from a naive one. First, the denominator changes: the cell’s usable capacity Q_available falls with temperature and with aging (state of health, SOH = Q_current/Q_new), so a fixed Q_rated in the denominator over-counts SOC as the cell degrades. Second, the coulomb count must not drift: any DC offset in the current sense or a missed sample integrates into a permanent SOC error, so a good algorithm periodically re-anchors the integration to a voltage- or model-based estimate. Chemistry matters too: LFP (lithium iron phosphate) has a famously flat OCV curve in its mid-range (2–5 mV per 10% SOC), which makes OCV lookup nearly useless there and forces coulomb counting with periodic full-charge/full-discharge re-anchoring — while NMC/LCO have a steeper OCV slope and tolerate voltage-based anchoring more often.

3. Method 1 — OCV Lookup

The OCV-SOC curve is measured by resting the cell until the terminal voltage settles (typically 1–4 hours) at a series of SOC points. Once you have the table, the SOC is simply the inverse lookup on the rested voltage. The catch is the word “rested”: under load the terminal voltage shifts by the IR drop plus polarization, so using the loaded voltage as if it were OCV produces an error of tens of percent at high current. The practical use is at the endpoints and during true rest: after the device has been off for hours, the first ADC sample of a rested cell is a legitimate re-anchor. The curve is also temperature- and age-dependent; storing two or three temperature variants (e.g. 0 °C, 25 °C, 45 °C) and interpolating keeps the accuracy acceptable. For LFP the mid-range flatness means the OCV method’s resolution is only a few percent even when implemented perfectly — which is why LFP gauges lean on coulomb counting.

4. Method 2 — Coulomb Counting

Integrate the measured current: SOC += (η · I · Δt) / Q_available, where η is the coulombic efficiency (≈1 for Li-ion except at the very top and bottom of the range) and Q_available is the temperature/age-corrected capacity. The accuracy is set almost entirely by the current-sense chain: a 1% current error at 1 C over a full discharge is a 1% SOC error, but a 1 mA offset on a 10 A full-scale sensor over 24 hours is 0.1% SOC per hour — a fixed drift of 2.4% per day that eventually saturates the estimate. Design rules: (a) use a low-offset, temperature-compensated current sense (a shunt with a chopper-stabilized or auto-zero amplifier, or a Hall sensor with an offset trim); (b) calibrate the sense at zero current at power-on (the “offset learning” step that real fuel gauges do); (c) re-anchor to OCV at rest and to full-charge detection at the top. The method is simple, continuous, and works at any current — the backbone of every practical gauge.

5. Method 3 — Impedance / DCIR Tracking

A cell’s internal resistance rises with age and falls with temperature, and its rate of change with SOC is characteristic. By measuring the voltage step for a known current pulse, the DC internal resistance (DCIR) can be tracked: R_dc = ΔV / ΔI. Used two ways: (a) as an SOH indicator (R_dc growth ≈ capacity fade), and (b) as a small SOC correction near the endpoints where the impedance curve has recognizable features. Impedance tracking alone is not a precise SOC method (the resistance change over the mid SOC range is small and noisy), but it is a valuable second independent signal that catches drift when combined with coulomb counting — the classic “coulomb count + impedance correction” hybrid.

6. Method 4 — Model-Based (EKF / Observer)

The modern approach treats the cell as a dynamic system and estimates SOC as a hidden state. A common model is the Thevenin equivalent: an OCV source in series with R0 and one or two RC polarization networks. The state vector is [SOC, V_RC1, …]; the input is current; the output is the terminal voltage. The extended Kalman filter (EKF) propagates the state with the coulomb-count equation and corrects it with the voltage innovation, using the OCV-SOC slope as the “gain” that tells the filter how much voltage error implies SOC error. The advantage: the filter combines the smooth integration with the periodic voltage correction automatically and handles the LFP flat region better than raw OCV (the slope, though small, still carries information). The costs: parameter identification (R0, R1, C1 vs SOC/T/age), the measurement and process noise covariances (Q, R) must be tuned, and the math is arithmetic-heavy for a small MCU — which is why dedicated fuel-gauge ICs implement it in silicon. The rule of thumb is that an EKF buys ±2–3% accuracy where naive coulomb counting drifts to ±10% after a few days without anchoring.

7. Comparison and the Hybrid Architecture

Method Accuracy Needs rest? Drift Compute
OCV lookup ±5–10% (flat chem worse) Yes, hours None (absolute) Trivial
Coulomb counting ±1% short-term No Grows with time/offset Low
DCIR tracking ±10% SOC, good SOH Pulse needed Low Low
EKF/model ±2–3% No Self-correcting High

The production architecture is always a hybrid: coulomb counting as the continuous engine, OCV re-anchoring whenever the cell is at rest, endpoint corrections (full-charge detection at the top, empty detection at the bottom), and a model/EKF layer where accuracy demands it. SOH from DCIR/capacity fade scales the denominator Q_available, and the temperature model scales both Q and R. Real gauges also implement “relaxation” logic — they recognize when the current has been low for long enough that the terminal voltage approaches OCV and use that window to correct — which is the practical way to get the OCV benefit without needing a full charge cycle.

8. Worked Example — 3S2P 18650 Pack, 5000 mAh, 5 A Load

Target: estimate SOC within ±5% over a day of intermittent 5 A load in a 25 °C environment, no full charge in between.

  • Sense chain: a 1 mΩ shunt with a 50× chopper amplifier → 50 mV at 5 A. ADC 12-bit over 3.3 V → 0.8 mV/LSB → 1.6% current resolution; add a zero-current offset calibration at boot to remove the dominant drift term. The pack power and energy arithmetic (used by the gauge as a cross-check) can be pre-computed with the power calculator for the expected P = V·I and the energy budget.
  • Coulomb engine: Q_available = 5000 mAh × temperature factor (say 0.95 at 25 °C after 200 cycles) = 4750 mAh. Integrate at 100 ms; a 5 A load draws 0.139 mAh per 100 ms sample — well resolved.
  • OCV anchor: when current < 50 mA for 2 hours (device idle overnight), take the rested terminal voltage, invert the 25 °C OCV table, and blend the correction over 30 minutes (never snap, or the UI jumps).
  • Endpoint: at charge termination (CV to C/20) reset SOC to 100%; at the low-voltage cutoff set SOC to the datasheet’s 0% point. These two anchors bound the drift even without a model.
  • Optional EKF: if the MCU has the cycles, run the Thevenin EKF with R0 = 30 mΩ (or from DCIR tracking), R1 = 20 mΩ, C1 = 2000 F; the filter then corrects continuously rather than only at rest.
  • Auxiliary: the pack’s idle/quiescent drain (gauge + BMS) also consumes energy; the low-power estimator confirms whether that self-drain is negligible relative to the 5000 mAh budget or must be added to the coulomb count.
  • Validation: compare the computed SOC against a full charge/discharge reference cycle after one week — target error < 5%.

9. Common Mistakes

  • Ignoring current-sense offset: the number-one cause of SOC drift; without auto-zero calibration a few mA of offset erases the estimate over days.
  • Fixed Q_rated forever: the denominator must follow capacity fade and temperature or the SOC drifts high as the cell ages.
  • Using loaded voltage as OCV: under load the IR drop makes the voltage-based SOC wrong by tens of percent; only rested voltage is a valid anchor.
  • Snapping the displayed SOC: abrupt re-anchoring jumps the UI; blend the correction over time.
  • Assuming LFP behaves like NMC: the flat OCV plateau kills voltage-only gauging; LFP needs coulomb counting plus endpoint anchors.
  • Forgetting coulombic efficiency and self-discharge: at the extremes and over long idle periods these small terms accumulate.

10. FAQ

Q: What SOC accuracy can I realistically expect? A: ±1% short-term with a good sense chain and coulomb counting, ±2–3% with an EKF, ±5–10% for voltage-only gauging — but only if the current sense offset is controlled and the capacity denominator is updated.

Q: Why does my gauge read 100% then drop fast? A: Usually a stale Q_available (the cell aged, the denominator is too big), an endpoint anchor that reset the top but the mid-range drifted, or a temperature change not modeled.

Q: Do I need a Kalman filter? A: Not necessarily. Coulomb counting + rest-time OCV anchoring + endpoint resets achieves a practical ±5% for many products; the EKF earns its complexity when you need continuous ±2–3% under load or in the LFP plateau.

Q: How often should I re-anchor? A: Whenever the current is low enough for long enough that the terminal voltage approaches OCV — the relaxation condition — and at every full charge/empty event; the anchors are what stop the integration from drifting away.

11. Conclusion

SOC estimation is an inference problem, and the winning design is always a hybrid: integrate the current precisely, re-anchor against the rested voltage when the cell allows, bound the result with the charge and discharge endpoints, and track health so the capacity denominator stays honest. Add a model-based observer when the accuracy target justifies it. Get the current-sense offset right and the OCV anchor schedule right, and the battery percentage will be trustworthy instead of decorative.

发表评论