Lemonergy · Studio block

Thermal state-space model

Linear thermal rise model with a positive diagonal heat-capacity descriptor. User supplies validated matrices.

Implementation ID
battery-thermal-state-space
Reviewed
2026-10-27

Behavior

Solves a linear temperature-rise model with positive diagonal heat capacities. Heat inputs drive the state; output temperatures add the configured ambient temperature to the linear result.

Interface

Thermal state-space model interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.Thermal state-space modelStudio blockinputoutput
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
inputinputWHeat inputs; 2 channels at the default configuration.
outputoutputKTemperature outputs; 2 channels at the default configuration.

Parameters

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

Configuration fields
ParameterUnitDefaultMeaning and limits
Ambient temperature (K)
ambientK
K298.15Ambient temperature (K). This is an editable model input; the default belongs to the synthetic worked example.
State matrix A
A
Model-dependent[[-2, 1], [1, -2]]Row-oriented state matrix. Dimensions must agree with B, C, D and the initial state.
Input matrix B
B
Model-dependent[[1, 0], [0, 1]]Row-oriented input matrix. One column per input channel.
Output matrix C
C
Model-dependent[[1, 0], [0, 1]]Row-oriented output matrix. One row per output channel.
Feedthrough matrix D
D
Model-dependent[[0, 0], [0, 0]]Row-oriented direct feedthrough matrix; output rows by input columns.
Initial state vector
initial
See field order[0, 0]Initial state vector, with one value per state.
Node heat capacities (J/K)
capacityDiagonal
See field order[100, 100]Node heat capacities (J/K). This is an editable model input; the default belongs to the synthetic worked example.

Equations and rules

  • diag(capacity)*dx/dt = A*x + B*Q
  • Toutput = ambientK + C*x + D*Q

Worked example

Thermal state-space model worked example

Use the defaults below with Heat inputs = [10, 0] W. At 0 s, Temperature outputs is [298.15, 298.15] K. Additional checks are listed below.

Open Studio example after release →
Numerical checks for the bundled synthetic example
OutputTime (s)Expected valueUnitAbsolute tolerance
Temperature outputs
output
0[298.15, 298.15]K1e-08

Explore the recorded outputs

Thermal state-space model recorded example

Thermal state-space model [1]
Thermal state-space model [1] against timeRecorded synthetic simulation values. Time in seconds; output in K.298.07740298.34062.5298.60395298.86717.5299.130410KTime (s)
Thermal state-space model [1]: 298.15 K 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

Thermal state-space model worked example

Linear thermal rise model with a positive diagonal heat-capacity descriptor. User supplies validated matrices.

  1. Thermal state-space model: Solves a linear temperature-rise model with positive diagonal heat capacities. Heat inputs drive the state; output temperatures add the configured ambient temperature to the linear result.
    • Use the parameter values in the block reference.
    • Implementation tested locally; public release pending.
Open Studio example after release

Connected concepts

Limits and interpretation

  • Supports a positive diagonal descriptor, not an arbitrary descriptor matrix. No finite-element import or conserving thermal adapter; supplied matrices determine heat conservation and stability.
  • 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. Feedback Systems: An Introduction for Scientists and Engineers, second edition

    Karl J. Åström, Richard M. Murray · Princeton University Press; author-maintained FBSwiki · 2021

    Technical reference · State-space modeling, feedback and PID control. These mathematical foundations do not establish a particular software implementation.

  2. University Physics Volume 2, §1.6: Mechanisms of Heat Transfer

    OpenStax, Rice University

    Technical reference · Conduction, convection, radiation and thermal resistance.

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)