Extended Kalman Filter for SOC Estimation on LFP: Hysteresis, Flat OCV and Tuning

Extended Kalman Filter for SOC Estimation on LFP: Hysteresis, Flat OCV and Tuning
In this article

Cet article existe aussi en français. Lire en français →

An extended Kalman filter (EKF) for SOC estimation combines two imperfect sources of information: counting the charge that flows in and out of the cell, and comparing the measured cell voltage with what a model predicts. Each corrects the weaknesses of the other. On NMC cells this works well. On LFP cells, the chemistry takes away most of the voltage information, and the design has to account for it.

This article assumes you know what state of charge is and how a BMS is built. It focuses on the parts that decide accuracy on LFP batteries.

≈ 3.3 VLFP voltage plateau
≈ 1 mV / %OCV slope on the plateau, order of magnitude
tens of mVcharge/discharge hysteresis
2.4 % / daySOC drift from a 100 mA offset on a 100 Ah cell

Why LFP is hard

LFP open-circuit voltage with hysteresisplateau: ≈ 1 mV per % SOC — the voltage says very little3.0 V3.2 V3.4 V0 %25 %50 %75 %100 %State of chargechargedischargehysteresis: tens of mVkneeend of charge
Stylised LFP open-circuit voltage. Between roughly 20 and 90 % SOC the curve is almost flat, and the charge and discharge branches are separated by a hysteresis larger than the slope.

Two properties combine. First, the open-circuit voltage (OCV) barely moves over most of the SOC range, so a few millivolts of measurement or model error map to many percent of SOC. Second, the OCV depends on history: after a charge it sits higher than after a discharge, by tens of millivolts. On the plateau, the hysteresis alone is worth tens of percent of SOC if it is ignored.

LFP also relaxes slowly. After a current pulse the voltage can take hours to settle, so “wait for rest, read OCV” is far less useful than on NMC.

The model

A practical cell model for an EKF is an equivalent circuit: an OCV source, a series resistance and one or two RC pairs for the polarization dynamics, plus a hysteresis state.

SOCk+1 = SOCk − η · ik · Δt / QCoulomb counting: η the coulombic efficiency, Q the capacity in ampere-seconds, i positive in discharge.
VRC,k+1 = e−Δt/τ · VRC,k + R1(1 − e−Δt/τ) · ikOne state per RC pair; τ = R₁C₁ from pulse tests.
Vcell = OCV(SOC) + h − R0 · i − VRCh is the hysteresis state, which moves toward a positive or negative limit depending on the current direction.

All parameters (R₀, R₁, τ, hysteresis limits and rate, even the OCV curve) depend on temperature and some on SOC and ageing. They come from characterisation tests: pulse tests at several SOC points and temperatures, and slow charge and discharge for the OCV branches.

How the filter behaves on the plateau

Extended Kalman filter loop for state of chargePredictSOC and RC states from currentComparemeasured vs predicted voltageCorrectgain K ∝ dOCV/dSOCnext time step (typically 10 to 100 ms)current sensorcell voltageon the plateau K ≈ 0
Predict with the current, compare with the measured voltage, correct with a gain that depends on how informative the voltage is.

The key quantity is the slope dOCV/dSOC, which appears in the measurement Jacobian. On the plateau it is close to zero, so the Kalman gain for SOC becomes small: the filter correctly trusts coulomb counting and ignores the voltage. Near the knees (below about 15 % and above about 90 %) the slope is large and the voltage pulls the estimate back.

This is not a weakness of the EKF, it is the EKF doing the right thing. What it cannot do is invent information: across a long plateau excursion, accuracy is set by the current sensor, not by the filter.

Tuning Q and R

ParameterWhat it representsPractical starting point
Process noise on SOCCurrent sensor error: offset, gain, quantisationFrom the sensor datasheet over temperature, converted to SOC per step
Process noise on RC and hysteresis statesModel dynamics errorTuned on recorded profiles
Measurement noise RVoltage measurement error plus model errorMeasurement accuracy is only part of it; model error usually dominates
Initial covarianceConfidence in the start valueLarge when starting from an unknown SOC
ΔSOC = I_offset · t / Q100 mA × 24 h / 100 Ah = 2.4 % per day. Offset, not noise, is the main enemy of coulomb counting.
  • Calibrate the current offset at every opportunity (contactors open, zero current).
  • Use the end of a full charge (CV phase, current taper) as a reliable reset point.
  • Use the low knee when the application reaches it, carefully, because it depends on temperature and current.
  • Track capacity loss: an EKF with a capacity from day one drifts as the cell ages (see state of health).

Validating the estimator

Accuracy claims mean nothing without the test conditions. A good validation runs the BMS on real hardware against reference data:

  • Drive profiles from the real application, not only constant-current cycles.
  • Long plateau excursions without reaching a knee: the worst case for LFP.
  • Wrong initial SOC, to measure convergence time.
  • Temperature steps and cold operation.
  • Sensor faults (offset, gain error) to check the estimator’s error bounds and diagnostics.
  • A reference from a lab-grade current measurement and controlled full charges and discharges.

A hardware-in-the-loop bench with cell emulators lets you replay those profiles hundreds of times on the production BMS, which is how estimation is validated in serious programs.

Beyond the EKF

  • Unscented Kalman filter: no Jacobians, better with strong non-linearities, slightly more computation.
  • Dual or joint estimation: estimate capacity and resistance alongside SOC.
  • Pack level: estimate the minimum and maximum cell SOC, not only the average, because the weakest cell sets the limits.
  • Data-driven corrections: learned models on top of a physics-based filter, useful when large fleet data exists.

FAQ

Why use a Kalman filter for SOC?

It combines coulomb counting, which drifts, with voltage-based correction, which is noisy and model-dependent, and weights each according to its uncertainty.

Why is SOC estimation difficult for LFP batteries?

The open-circuit voltage is almost flat over most of the SOC range and shows hysteresis, so the voltage carries little information about SOC.

What model should I use for an EKF?

An equivalent circuit with an OCV curve, a series resistance, one or two RC pairs and a hysteresis state, with parameters that depend on temperature.

How accurate can SOC estimation be on LFP?

It depends mainly on the current sensor and how often the cell reaches a reliable reset point. Accuracy figures are only meaningful with their test conditions.

EKF or UKF?

Both work. The UKF handles non-linearities without Jacobians at a modest computational cost; the EKF is simpler and well understood.

Learn it live

This topic is covered in depth, with industrial case studies, in the Battery systems & BMS program. Join the waitlist to hear first when it opens — or browse the 64 free guides in the meantime.

Mohamed Yasser El Mekadem, Technical Leader in battery systems and power electronics

Written by

Mohamed Yasser El Mekadem

Technical Leader on a 1500 V rail traction battery. Eight years in onboard railway energy: power converters, HIL validation, battery systems.

Waitlist

Learn this live, with industrial case studies.

Three programs — power electronics, battery systems & BMS, HIL validation. Join the list to hear first when one opens.

One email when a program opens. Unsubscribe in one click. Privacy policy.

Keep reading

Related articles

Drone batteries: LiPo vs Li-ion, specific energy, flight time and BMS
Batteries & BMS

Drone Batteries: LiPo vs Li-Ion, Wh/kg, C-Rate and BMS

A drone battery is the heaviest component in the aircraft and the one that sets its endurance. LiPo against Li-ion, the Wh/kg of real packs and cells, how flight time depends on battery mass, what C-rate a mission actually needs, and what the BMS of a flight battery does differently.

Read the article →