Battery knowledge · State estimation

Cell balancing

Equalising the state of charge of cells in series, since the pack is limited by its emptiest cell on discharge and its fullest on charge. Passive balancing bleeds charge from high cells through resistors; active balancing moves it between cells.

Example

Pack average versus cell limits

Average pack SOC can look acceptable while one series cell reaches its voltage limit. One aggregate SOC state does not demonstrate cell balancing.

Explore the graph

A pack average can hide a cell that reaches its voltage limit first.

Four cells before balancing
Four cells before balancingCell number versus Cell voltage (V). Individual voltages; Average; Example ceiling. Interpretation follows the graphs.3.713.851.7542.54.153.254.34Cell numberCell voltage (V)
Individual voltagesAverage (dashed)Example ceiling

Average: 3.93 V. Highest cell: 4.02 V. The highest cell can reach the charge limit first.

V_max = max(V₁, V₂, …); V_average = ΣV_i / N

Illustrative model. The 4.2 V ceiling is an example, not universal. Voltage alone does not uniquely determine SOC.

Use in Lemonergy

Lemonergy Studio blocks

Active cell supervision interface worked example

Discharge current sink below charging command; finite-resistance charging above terminal voltage; no detailed switching converter or hardware I/O.

Blocks to use

  1. Active cell supervision interface

    Discharge current sink below charging command; finite-resistance charging above terminal voltage; no detailed switching converter or hardware I/O. The terminal current participates directly in Kirchhoff current balance and changes the connected battery state. Measurements are solved with the physical network.

    Inputs & settings
    • Use the parameter values in the block reference.
    • Bundled example verified on the production release of 28 October 2026.

This overview identifies the components to use. Follow the example in Lemonergy for their connections and settings.

  1. Review the block inputs, units and model limits.
  2. Open the Studio example and run its bundled model.
  3. Compare the output channels with the numerical checks; change one input and run again.

Example. A 4 V cell with 0.1 Ω internal resistance is connected to a 4.2 V charge command through the interface’s 0.1 Ω charging resistance. Solving both resistances gives -1 A interface current and 4.1 V terminal voltage. The negative current charges the cell.

Observe. Inspect the outputs and numerical checks on the block reference page.

This is a simulated electrical interface without a target-hardware driver. SOC and temperature pass-throughs, diagnostic mode flags and hardware-specific communication are outside this interface.

Open Studio example →

Lemonergy Studio blocks

Multi-cell balancing interface worked example

One to eight independently commanded current-sink circuits with per-cell voltage, current and power; no hardware I/O.

Blocks to use

  1. Multi-cell balancing interface

    One to eight independently commanded current-sink circuits with per-cell voltage, current and power; no hardware I/O. The terminal current participates directly in Kirchhoff current balance and changes the connected battery state. Measurements are solved with the physical network.

    Inputs & settings
    • Use the parameter values in the block reference.
    • Bundled example verified on the production release of 28 October 2026.

This overview identifies the components to use. Follow the example in Lemonergy for their connections and settings.

  1. Review the block inputs, units and model limits.
  2. Open the Studio example and run its bundled model.
  3. Compare the output channels with the numerical checks; change one input and run again.

Example. The bundled two-cell model commands 0.1 A from circuit 1 and zero from circuit 2. The first cell has 4 V OCV and 0.1 Ω resistance, giving 3.99 V under bleed. The second 3.7 V cell remains unloaded.

Observe. Inspect the outputs and numerical checks on the block reference page.

This is a simulated electrical interface without a target-hardware driver. SOC and temperature pass-throughs, diagnostic mode flags and hardware-specific communication are outside this interface. One to eight independently commanded circuits per instance. The default contract shows one circuit; the worked example configures two.

Open Studio example →

Lemonergy Studio blocks

Cell-delta SOC EKF worked example

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

Blocks to use

  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.

    Inputs & settings
    • Use the parameter values in the block reference.
    • Bundled example verified on the production release of 28 October 2026.

This overview identifies the components to use. Follow the example in Lemonergy for their connections and settings.

  1. Review the block inputs, units and model limits.
  2. Open the Studio example and run its bundled model.
  3. Compare the output channels with the numerical checks; change one input and run again.

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.

Observe. Inspect the outputs and numerical checks on the block reference page.

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.

Open Studio example →
All connected Lemonergy block references

References & further reading

Further reading on this topic

These sources provide broader context; they are not presented as citations for every statement in this entry.

  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

    Topic background · 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

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