State Expanded Kalman Filter Design for Battery Hysteresis Correction
State-expanded Kalman filters correct LFP hysteresis by adding a dynamic voltage state tracking path-dependent phase transitions across flat OCV plateaus.

Lattice
Phase boundaries in lithium iron phosphate crystallites take different free-energy paths during insertion and extraction. As lithium leaves the olivine structure during charging, triphylite converts directly into heterosite across a two-phase coexistence zone. The reverse lithiation reaction requires a mechanical overpotential to overcome coherent elastic strain between lithium-depleted and lithium-rich domains.
Because of this energy barrier, open-circuit voltage does not settle to a single thermodynamic value once current stops. Across the millions of individual cathode particles in a commercial electrode, interparticle lithium redistribution faces distinct chemical potential barriers. Even after two hundred hours of rest at twenty-five degrees Celsius, a cell retains a static voltage offset between its charge and discharge relaxation curves.
A thirty millivolt hysteresis offset across a ten millivolt per percent open-circuit voltage plateau generates a three-fold error in open-circuit state calculation.
Cell technical datasheets quote a single open-circuit voltage curve, obscuring an effect that throws off standard battery management estimators. In high-nickel layered oxides such as NMC-811, the solid-solution reaction shows negligible static hysteresis, keeping relaxation voltage divergence below five millivolts across the operating window. Olivine phosphates and manganese-rich spinels, by contrast, undergo microscopic phase separation that leaves a persistent zero-current hysteresis envelope of twenty to sixty millivolts.
| Cathode Chemistry | Phase Transition Mechanism | Peak Hysteresis Span (mV) | Plateau Slope (mV/% SoC) | State Ambiguity Window (%) |
|---|---|---|---|---|
| LiFePO4 (LFP) | First-Order Two-Phase Coexistence | 32 to 58 | 0.08 to 0.45 | 22 to 68 |
| LiMn0.6Fe0.4PO4 (LMFP) | Dual Distinct Two-Phase Plateaus | 45 to 74 | 0.15 to 0.85 | 18 to 44 |
| LiNi0.8Mn0.1Co0.1O2 (NMC-811) | Homogeneous Solid Solution | 2 to 6 | 4.20 to 9.50 | 0.2 to 0.8 |
| LiCoO2 (LCO) | Order-Disorder / Solid Solution | 4 to 9 | 3.10 to 8.20 | 0.3 to 1.1 |
| Li4Ti5O12 (LTO Anode) | Two-Phase Spinel-Rocksalt | 18 to 35 | 0.12 to 0.50 | 14 to 52 |
Estimators built around monotonic lookup tables read this phase-lag voltage as shifted capacity. A cell rested after partial charging sits on the envelope’s upper branch, while the same cell rested after partial discharge rests on the lower branch at the exact same physical state of charge. Inverting relaxed terminal voltage through a single function can yield an apparent capacity split of up to forty percent of nominal cell rating between the two conditions.
Lithium manganese iron phosphate compounds complicate this further with two distinct plateaus, centered at 3.45 volts and 4.10 volts, each with its own transformation kinetics and hysteresis loop width.
Manganese dissolution into the carbonate electrolyte alters boundary energies over long operating lifetimes. As transition metal ions leave octahedral sites, nucleating the new phase demands higher mechanical strain. Because of this, fresh cells show narrower zero-current hysteresis spans than identical cells aged through one thousand full charge-discharge cycles, presenting a structural drift that sourcing engineers must account for when assessing pack service life.

Vector
State estimators resolve these hidden phase-lag states by expanding the system matrix. Where a conventional discrete equivalent circuit tracks only state of charge and polarization voltages across RC pairs, adding a dynamic hysteresis voltage creates a four-dimensional state description capable of capturing path-dependent voltage offsets in real time.

Is State Augmentation Mandatory for Olivine Chemistries?
Without hysteresis modeled, standard estimators diverge noticeably across the thirty to seventy percent capacity window. The augmented formulation introduces a differential equation keyed to current magnitude and direction: charge current pulls the hysteresis state toward an upper saturation boundary, while discharge current drives it toward the lower boundary.
The hysteresis component evolves under a continuous differential decay expression:
dh / dt = -abs(eta I gamma / Cn) h + abs(eta I gamma / Cn) M(z, sign(I))
In this expression, h is the hysteresis voltage state, eta defines coulombic efficiency, I is instantaneous current, Cn is nominal capacity in ampere-hours, and gamma is a dimensionless tuning parameter determining the transition rate between boundaries. The function M(z, sign(I)) defines maximum static hysteresis at state of charge z. Discretizing this relationship over sample interval dt yields the update equation implemented in firmware:
h(k+1) = exp(-abs(gamma I(k) dt / Cn)) h(k) + (1 – exp(-abs(gamma I(k) dt / Cn))) M(z(k), sgn(I(k)))
The full state vector x(k) bundles four variables:
x(k) = (z(k), V1(k), V2(k), h(k))^T
Here z(k) tracks state of charge, V1(k) and V2(k) track overpotentials across short- and long-term RC networks, and h(k) tracks instantaneous hysteresis displacement. The discrete state equation advances them through time:
x(k+1) = f(x(k), I(k)) + w(k)
The measurement equation maps the augmented vector to terminal voltage:
y(k) = OCV_avg(z(k)) + h(k) – R0 I(k) – V1(k) – V2(k) + v(k)
The baseline open-circuit voltage function OCV_avg(z) marks the median between charge and discharge saturation envelopes, R0 is ohmic resistance, w(k) represents process noise, and v(k) captures voltage measurement noise.
Linearizing the model around each sample point yields the system Jacobians. The state transition Jacobian A(k) contains the partial derivatives of the state transition function with respect to each state element:
A(k) = , , ]
The cross-derivative df_h / dz couples hysteresis progression to state-of-charge change:
df_h / dz = (1 – exp(-abs(gamma I(k) dt / Cn))) (dM / dz)
The observation matrix C(k) holds the partial derivatives of the terminal voltage function:
C(k) =
A unity derivative relating hysteresis state to terminal voltage maintains estimator observability when open-circuit voltage slope approaches zero.
The recursive filter runs through six steps on each analog-to-digital measurement cycle:
- A Priori State Propagation projects state variables forward via current integration and exponential decay formulas.
- Covariance Matrix Extrapolation advances error uncertainty using the linearized state Jacobian and process noise covariance values.
- Measurement Innovation Generation subtracts predicted terminal voltage from the physical sensor reading at cell terminals.
- Kalman Gain Evaluation balances model projection uncertainty against instrument noise across the observation vector.
- A Posteriori State Update applies weighted innovation discrepancies to correct state of charge and hysteresis estimates simultaneously.
- Covariance Matrix Rectification compresses the error covariance matrix using the computed gain to establish starting confidence for the next cycle.
Drive-cycle current ripples force the hysteresis state through minor sub-loops within the main envelope. Without state expansion, an estimator misinterprets these directional reversals, pushing spurious transients into diffusion polarization states. Separating fast electrochemical polarization from persistent phase-boundary displacement keeps internal resistance tracking stable under dynamic load, though real-time execution demands lean matrix routines.
Tracking hysteresis smoothly through continuous cycling prevents estimator disruption when operation abruptly switches between charge and discharge.

Shunt
Filter stability depends heavily on the physical current-sensing path feeding it. Shunts placed in the negative battery bus translate pack current into low-level analog voltages, but printed circuit board thermal gradients introduce parasitic thermoelectric voltages via the Seebeck effect across copper-manganin solder junctions. A gradient of two degrees across solder terminals introduces roughly three-hundred milliamperes of DC bias, which integrates directly into state-of-charge tracking.
Analog-to-digital converter quantization limits exacerbate drift across long rest periods. When current drops below the lowest converter quantization bit, the algorithm registers zero current while auxiliary loads and cell self-discharge continue unrecorded. Any DC bias enters the discrete hysteresis update through the absolute-value term:
exp(-abs(gamma I_measured dt / Cn))
That absolute-value operation rectifies zero-mean Gaussian noise into an artificial positive offset, driving modeled hysteresis toward boundary limits while the physical cell rests idle.
| Hardware Sensing Defect | Physical Root Mechanism | Offset Range | Hysteresis Decay Drift Rate | SoC Error Growth (100h Rest) |
|---|---|---|---|---|
| Thermal Seebeck Voltage | Asymmetric PCB Copper Heat Dissipation | 150 to 450 mA | 0.08 to 0.22 mV / h | 1.8 to 4.5% |
| Analog Front-End Zero Drift | Operational Amplifier V_os Temperature Drift | 40 to 180 mA | 0.02 to 0.09 mV / h | 0.5 to 1.8% |
| Quantization Rounding Bias | 12-Bit ADC Range Truncation (200A Scale) | 97.6 mA / LSB | 0.05 to 0.12 mV / h | 1.2 to 2.4% |
| Current Shunt Inductance | Parasitic Mutual Inductive Voltage Spikes | 2 to 15 A (transient) | Phase Distortion Spike | 0.2 to 0.6% (dynamic) |
| Capacitive Noise Injection | Inverter Fast Switching Slew Rates (dV/dt) | 10 to 60 mA (rectified) | 0.01 to 0.03 mV / h | 0.2 to 0.7% |
Hardware-level sensing issues manifest in distinct ways:
- Offset Voltage Integration forces the hysteresis decay term along a false drift curve during prolonged storage periods.
- Digital Word Rounding cuts off sub-milliamp relaxation currents needed to locate minor sub-loops accurately.
- Gain Calibration Error creates systematic over-travel of the hysteresis state variable beyond physical thermodynamic limits.
- Thermal Resistance Modulation shifts shunt resistance across seasonal temperature ranges when left uncompensated in software.
Uncorrected acquisition errors destabilize the filter states, allowing calculated state of charge to creep toward upper trip thresholds and provoking premature high-voltage cutoffs during vehicle operation.

Tuning
Dynamic filter response depends on how the process noise covariance matrix Q and measurement noise covariance scalar R are parameterized. Setting overly confident covariance bounds on the hysteresis state destabilizes state-of-charge tracking; the diagonal elements of Q dictate how aggressively the filter adjusts each state against voltage innovation residuals.

Should Process Noise Covariance Track Temperature Shifts?
Electrochemical reaction rates drop by more than half for every ten-degree drop in pack core temperature. When temperature plunges toward sub-zero levels, charge transfer resistance escalates rapidly while solid-state lithium diffusion slows down. The static hysteresis envelope expands in width as coherent phase transition barriers grow at depressed temperatures.
Maintaining fixed process noise covariance values across wide thermal spans causes filter divergence under winter driving conditions.
Process noise covariance elements demand adaptive temperature-dependent parameterization. The covariance term Q_h allocated to the hysteresis state must balance the process noise Q_z assigned to state of charge. When a battery operates along the flat potential plateau of an olivine cathode, the derivative dOCV_avg / dz drops to values below 0.0002 volts per percent state of charge.
In this operating zone, the observation matrix entry linking state of charge to terminal voltage vanishes. The Kalman filter cannot correct state of charge errors using voltage feedback alone.
A vanishing open-circuit voltage derivative transfers all voltage innovation updates into the augmented hysteresis and polarization states.
If Q_h is set too large relative to Q_z, the filter adjusts the hysteresis state variable h(k) to absorb every discrepancy between predicted and measured terminal voltage. A genuine error in state of charge remains uncorrected while h(k) oscillates wildly between its mathematical saturation boundaries. Conversely, setting Q_h to an excessively small value freezes the hysteresis state, forcing the filter to push unmodeled phase-lag voltages into the diffusion polarization states V1(k) and V2(k).
| State Variable | Physical State Meaning | Minimum Covariance (25°C) | Maximum Covariance (-20°C) | Numerical Units |
|---|---|---|---|---|
| Q_z (z) | State of Charge | 1.0e-8 | 5.0e-9 | (Delta SoC)^2 |
| Q_V1 (V1) | Fast RC Overpotential | 1.0e-6 | 1.0e-5 | Volts^2 |
| Q_V2 (V2) | Slow RC Overpotential | 1.0e-7 | 1.0e-6 | Volts^2 |
| Q_h (h) | Augmented Hysteresis Voltage | 1.0e-7 | 4.0e-6 | Volts^2 |
| R (y) | Terminal Voltage Measurement | 2.5e-5 | 1.0e-4 | Volts^2 |
Parameter selection requires balancing several practical trade-offs:
- Covariance Cross-Coupling fixes the mathematical allocation of voltage innovation discrepancies between chemical phase lag and capacitive surface polarization.
- Saturation Clamping Limits prevent the hysteresis state from exceeding the physical envelope defined by empirical cell characterization data.
- Adaptive Noise Scaling adjusts measurement error expectations upward when rapid current transitions inject inductive switching noise into sense lines.
- Convergence Damping Factors attenuate filter gain whenever the calculated open-circuit voltage slope drops below five hundred microvolts per percent state.
Calibration engineers have to decide whether process noise covariance adaptation should follow empirical lookup surfaces or execute through real-time innovation covariance matching algorithms.

Exposure
Pack developers sometimes count on estimation algorithms to absorb loose manufacturing tolerances in budget cells. Sourcing lower-tier lithium iron phosphate cells with noticeable lot-to-lot chemical variation brings real commercial risk: if incoming cell lots exhibit diverging hysteresis envelope widths, a static hysteresis model embedded within battery management software fails to match physical pack behavior. Algorithmic divergence directly undermines pack reserve energy calculations.
In electric utility storage systems, an uncorrected three percent error in state of charge tracking triggers severe financial penalties under capacity market performance agreements. If an unexpected under-voltage shutdown occurs during a peak grid pricing event, the facility owner faces commercial liquidated damages exceeding the initial capital cost savings achieved by purchasing cheap cells. Deploying state-expanded Kalman filters also imposes definite compute hardware burdens.
Running four-state extended Kalman filtering on a multicore automotive microcontroller increases clock cycle consumption compared to standard two-state implementations. This compute overhead requires migrating from low-cost sixteen-bit processors to higher-tier thirty-two-bit floating-point units, driving up the landed bill-of-materials cost for every battery management system module across high-volume production programs.
Procurement contracts for lithium iron phosphate storage projects protect the buyer by incorporating strict verification parameters directly into incoming cell inspection standards. Clause 8.3 of standard procurement framework agreement EPC-BESS-2024 binds the cell manufacturer to deliver cells whose zero-current static hysteresis voltage envelope does not deviate by more than four millivolts from the baseline qualification dossier across two thousand continuous operational cycles.


