Lemonergy · Studio block

Cell-delta SOC EKF

Estimates deviation from a supplied average. Average-error variance enters voltage uncertainty under an explicit independent-error assumption.

Implementation ID
battery-cell-delta-soc-ekf
Reviewed
2026-10-27

Behavior

Estimates the target cell SOC deviation from a supplied pack average. The variable-resistance version accepts the target resistance as an input. Average-estimate variance enters the voltage uncertainty under an independent-error assumption.

Interface

Cell-delta SOC EKF interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.Cell-delta SOC EKFStudio blockcurrentvoltageaverageaverageVariancevalidresetdeltafractionvarianceinnovationgainstatus
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
currentinputASeries current; scalar.
voltageinputVMeasured cell voltage; scalar.
averageinput1 (fraction)Average SOC; scalar.
averageVarianceinput1Average SOC variance; scalar.
validinputtrue / falseAligned measurements valid; scalar.
resetinputtrue / falseReset; scalar.
deltaoutput1SOC deviation from average; scalar.
fractionoutput1 (fraction)Reconstructed cell SOC; scalar.
varianceoutput1Delta SOC variance; scalar.
innovationoutputVCell voltage innovation; scalar.
gainoutput1Correction gain; scalar.
statusoutput1Observer status; scalar.

Parameters

Defaults are initial model values. Select values for your own model and operating conditions.

Configuration fields
ParameterUnitDefaultMeaning and limits
Sample interval (s)
sampleTimeS
s1Positive sample interval. Initialization has zero elapsed time; subsequent accepted samples update memory.
Target-cell capacity (Ah)
cellCapacityAh
Ah2Target-cell capacity (Ah). This is an editable model input; the default belongs to the synthetic worked example.
Average-cell capacity (Ah)
averageCapacityAh
Ah2Average-cell capacity (Ah). This is an editable model input; the default belongs to the synthetic worked example.
Initial SOC deviation from average
initialDelta
10Initial SOC deviation from average. This is an editable model input; the default belongs to the synthetic worked example.
Initial fraction variance
initialVariance
10.01Initial fraction variance. This is an editable model input; the default belongs to the synthetic worked example.
Process variance rate (fraction²/s)
processNoise
fraction²/s0Process variance rate (fraction²/s). This is an editable model input; the default belongs to the synthetic worked example.
Voltage measurement variance (V²)
measurementNoise
V²0.01Voltage measurement variance (V²). This is an editable model input; the default belongs to the synthetic worked example.
Series resistance (Ω)
resistanceOhm
Ω0.05Series resistance (Ω). This is an editable model input; the default belongs to the synthetic worked example.
Open-circuit voltage table [SOC fraction, V]
ocvTable
See field order[[0, 3], [1, 4]]Open-circuit voltage table [SOC fraction, V]. Rows are ordered coordinate/value pairs; the first column must be strictly increasing.

Equations and rules

  • innovation = Vmeasured - Vpredicted
  • K = Ppredicted*H / (H^2*Ppredicted + R)
  • fraction = predictedFraction + K*innovation
  • P = (1-K*H)^2*Ppredicted + K^2*R
  • cellSOC = suppliedAverageSOC + estimatedDelta

Worked example

Cell-delta SOC EKF worked example

Use the defaults below with Series current = 1 A, Measured cell voltage = 3.73 V, Average SOC = 0.8 1 (fraction), Average SOC variance = 0 1, Aligned measurements valid = 1 true / false, Reset = 0 true / false. At 0 s, SOC deviation from average is -0.01 1. Additional checks are listed below.

Open Studio example after release →
Numerical checks for the bundled synthetic example
OutputTime (s)Expected valueUnitAbsolute tolerance
SOC deviation from average
delta
0-0.0111e-08
Reconstructed cell SOC
fraction
00.791 (fraction)1e-08
Delta SOC variance
variance
00.00511e-08
Cell voltage innovation
innovation
0-0.02V1e-08
Correction gain
gain
00.511e-08

Explore the recorded outputs

Cell-delta SOC EKF recorded example

Cell-delta SOC EKF / SOC deviation from average
Cell-delta SOC EKF / SOC deviation from average against timeRecorded synthetic simulation values. Time in seconds; output in —.-0.01360-0.012633330.25-0.011666670.5-0.01070.75-0.0097333331—Time (s)
Cell-delta SOC EKF / SOC deviation from average: -0.01 — at 0 s

2 actual recorded samples. Lines are visual guides between samples. Synthetic example, not measured cell data.

Download the recorded samples (JSON) · Open this Studio example after release

Use in a workflow

Cell-delta SOC EKF worked example

Estimates deviation from a supplied average. Average-error variance enters voltage uncertainty under an explicit independent-error assumption.

  1. Cell-delta SOC EKF: Estimates the target cell SOC deviation from a supplied pack average. The variable-resistance version accepts the target resistance as an input. Average-estimate variance enters the voltage uncertainty under an independent-error assumption.
    • Use the parameter values in the block reference.
    • Implementation tested locally; public release pending.
Open Studio example after release

Connected concepts

Limits and interpretation

  • One-state extended Kalman observers, without an unscented transform, RC polarization states or automatic cell identification. SOE requires its own energy-fraction-to-OCV calibration. Synthetic filter settings are not accuracy guarantees.
  • No jointly estimated correlated covariance between the average and the cell deviation.
  • The example verifies numerical behavior for synthetic parameters. Cell characterization and validation for an intended use are separate tasks.

Scientific and mathematical references

These sources explain the scientific and mathematical background. The behavior, interface and limits above define the Lemonergy implementation; a citation does not imply every model option in the source is implemented.

  1. Extended Kalman filtering for battery management systems of LiPB-based HEV battery packs: Part 3. State and parameter estimation

    Gregory L. Plett · Journal of Power Sources · 2004

    Technical reference · Model-based battery state-of-charge and parameter estimation with extended Kalman filtering, including uncertainty and model dependence.

  2. Extended Kalman filtering for battery management systems of LiPB-based HEV battery packs: Part 2. Modeling and identification

    Gregory L. Plett · Journal of Power Sources · 2004

    Technical reference · Battery charge balance, open-circuit voltage, ohmic loss, polarization dynamics and model identification; parameters require cell-specific data.

Implementation sources

This reference follows the public interface and locally verified numerical checks for an upcoming release.

Contract: Lemonergy Studio public contract · Verification record: verification-2026-10-27

  • docs/glossary/native-block-verification.json

This implementation and its workflow uses (JSON) · Knowledge graph (JSON-LD)