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
| Name | Direction | Unit | Meaning |
|---|---|---|---|
current | input | A | Signed cell current (discharge positive); scalar. |
ambient | input | K | Ambient temperature; scalar. |
externalHeat | input | W | External heat flow; scalar. |
voltage | output | V | Terminal voltage; scalar. |
soc | output | 1 (fraction) | State of charge; scalar. |
temperature | output | K | Cell temperature; scalar. |
loss | output | W | Irreversible heat; scalar. |
ocv | output | V | Open-circuit voltage; scalar. |
inRange | output | true / false | SOC in characterized range; scalar. |
Parameters
Defaults are initial model values. Select values for your own model and operating conditions.
| Parameter | Unit | Default | Meaning and limits |
|---|---|---|---|
Charge capacity (Ah)capacityAh | Ah | 5 | Charge capacity (Ah). This is an editable model input; the default belongs to the synthetic worked example. |
Series resistance (Ω)resistanceOhm | Ω | 0.01 | Series resistance (Ω). This is an editable model input; the default belongs to the synthetic worked example. |
First polarization resistance (Ω)r1Ohm | Ω | 0.02 | First polarization resistance (Ω). This is an editable model input; the default belongs to the synthetic worked example. |
First polarization capacitance (F)c1F | F | 500 | First polarization capacitance (F). This is an editable model input; the default belongs to the synthetic worked example. |
Second polarization resistance (Ω)r2Ohm | Ω | 0.01 | Second polarization resistance (Ω). This is an editable model input; the default belongs to the synthetic worked example. |
Second polarization capacitance (F)c2F | F | 2000 | Second polarization capacitance (F). This is an editable model input; the default belongs to the synthetic worked example. |
Heat capacity (J/K)heatCapacityJPerK | J/K | 100 | Heat capacity (J/K). This is an editable model input; the default belongs to the synthetic worked example. |
Ambient thermal conductance (W/K)conductanceWPerK | W/K | 1 | Ambient thermal conductance (W/K). This is an editable model input; the default belongs to the synthetic worked example. |
Initial SOC (0–1)initialSoc | 0–1 | 0.8 | Initial SOC (0–1). This is an editable model input; the default belongs to the synthetic worked example. |
Initial cell temperature (K)initialTemperatureK | K | 298.15 | Initial 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 →| Output | Time (s) | Expected value | Unit | Absolute tolerance |
|---|---|---|---|---|
Terminal voltagevoltage | 0 | 3.68 | V | 1e-08 |
State of chargesoc | 0 | 0.8 | 1 (fraction) | 1e-08 |
Terminal voltagevoltage | 10 | 3.646845790452711 | V | 1e-06 |
Explore the recorded outputs
Electrothermal ECM cell recorded example
Electrothermal ECM cell / Terminal voltage103 actual recorded samples. Lines are visual guides between samples. Synthetic example, not measured cell data.
Read the selected signal as a table
| Time (s) | Value |
|---|
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.
- 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.
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.
- 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.
- 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)