Lemonergy · Studio block

Electrothermal ECM cell

Causal current-to-voltage model with charge and thermal states. Conserving ports are not yet included.

Implementation ID
battery-ecm-cell
Reviewed
2026-10-27

Behavior

Accepts signed discharge current, ambient temperature and external heat. Charge balance drives SOC; an OCV table sets equilibrium voltage. The ECM adds two RC polarization states. Both variants include an ohmic loss and a lumped temperature state.

Interface

Electrothermal ECM cell interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.Electrothermal ECM cellStudio blockcurrentambientexternalHeatvoltagesoctemperaturelossocvinRange
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
currentinputASigned cell current (discharge positive); scalar.
ambientinputKAmbient temperature; scalar.
externalHeatinputWExternal heat flow; scalar.
voltageoutputVTerminal voltage; scalar.
socoutput1 (fraction)State of charge; scalar.
temperatureoutputKCell temperature; scalar.
lossoutputWIrreversible heat; scalar.
ocvoutputVOpen-circuit voltage; scalar.
inRangeoutputtrue / falseSOC in characterized range; scalar.

Parameters

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

Configuration fields
ParameterUnitDefaultMeaning and limits
Charge capacity (Ah)
capacityAh
Ah5Charge capacity (Ah). This is an editable model input; the default belongs to the synthetic worked example.
Series resistance (Ω)
resistanceOhm
Ω0.01Series resistance (Ω). This is an editable model input; the default belongs to the synthetic worked example.
First polarization resistance (Ω)
r1Ohm
Ω0.02First polarization resistance (Ω). This is an editable model input; the default belongs to the synthetic worked example.
First polarization capacitance (F)
c1F
F500First polarization capacitance (F). This is an editable model input; the default belongs to the synthetic worked example.
Second polarization resistance (Ω)
r2Ohm
Ω0.01Second polarization resistance (Ω). This is an editable model input; the default belongs to the synthetic worked example.
Second polarization capacitance (F)
c2F
F2000Second polarization capacitance (F). This is an editable model input; the default belongs to the synthetic worked example.
Heat capacity (J/K)
heatCapacityJPerK
J/K100Heat capacity (J/K). This is an editable model input; the default belongs to the synthetic worked example.
Ambient thermal conductance (W/K)
conductanceWPerK
W/K1Ambient thermal conductance (W/K). This is an editable model input; the default belongs to the synthetic worked example.
Initial SOC (0–1)
initialSoc
0–10.8Initial SOC (0–1). This is an editable model input; the default belongs to the synthetic worked example.
Initial cell temperature (K)
initialTemperatureK
K298.15Initial cell temperature (K). 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.7], [1, 3.7]]Open-circuit voltage table [SOC fraction, V]. Rows are ordered coordinate/value pairs; the first column must be strictly increasing.

Equations and rules

  • dSOC/dt = -I / (3600 * capacityAh)
  • dVk/dt = (I - Vk/Rk) / Ck [ECM branches only]
  • Vterminal = OCV(SOC) - I*R0 - sum(Vk)
  • Cthermal*dT/dt = I^2*R0 + sum(Vk^2/Rk) + Qexternal - G*(T-Tambient)

Worked example

Electrothermal ECM cell worked example

Use the defaults below with Signed cell current (discharge positive) = 2 A, Ambient temperature = 298.15 K, External heat flow = 0 W. At 0 s, Terminal voltage is 3.68 V. Additional checks are listed below.

Open Studio example after release →
Numerical checks for the bundled synthetic example
OutputTime (s)Expected valueUnitAbsolute tolerance
Terminal voltage
voltage
03.68V1e-08
State of charge
soc
00.81 (fraction)1e-08
Terminal voltage
voltage
103.646845790452711V1e-06

Explore the recorded outputs

Electrothermal ECM cell recorded example

Electrothermal ECM cell / Terminal voltage
Electrothermal ECM cell / Terminal voltage against timeRecorded synthetic simulation values. Time in seconds; output in V.3.64419303.6538082.53.66342353.6730387.53.68265210VTime (s)
Electrothermal ECM cell / Terminal voltage: 3.68 V at 0 s

103 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

Electrothermal ECM cell worked example

Causal current-to-voltage model with charge and thermal states. Conserving ports are not yet included.

  1. Electrothermal ECM cell: Accepts signed discharge current, ambient temperature and external heat. Charge balance drives SOC; an OCV table sets equilibrium voltage. The ECM adds two RC polarization states. Both variants include an ohmic loss and a lumped temperature state.
    • Use the parameter values in the block reference.
    • Implementation tested locally; public release pending.
Open Studio example after release

Connected concepts

Limits and interpretation

  • The external interface is causal current-to-voltage, without conserving terminals. Parameters are constant except the one-dimensional SOC-to-OCV table. No hysteresis, aging, reversible entropic heat or automatic parameter identification.
  • 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. A General Energy Balance for Battery Systems

    Dawn Bernardi, Ellen Pawlikowski, John Newman · Journal of The Electrochemical Society · 1985

    Technical reference · Battery energy balance and irreversible and reversible heat contributions. Reduced thermal models require explicit assumptions and current-sign conventions.

  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)