Lemonergy · Studio block

Battery heater controller

Controls the hottest cooling channel or coldest heating channel with hysteresis.

Implementation ID
battery-heater-controller
Reviewed
2026-10-27

Behavior

Uses the hottest channel for cooling or the coldest channel for heating. Separate on and off thresholds provide hysteresis. Enable gates the commanded coolant mass flow or heater power.

Interface

Battery heater controller interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.Battery heater controllerStudio blocktemperatureenablecommandactive
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
temperatureinputKCell temperatures; 3 channels at the default configuration.
enableinputtrue / falseEnable; scalar.
commandoutputWHeater power request; scalar.
activeoutputtrue / falseActive; 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.
Number of measurement channels
cells
13Number of measurement channels. This is an editable model input; the default belongs to the synthetic worked example.
Turn-on temperature (K)
onK
K280Turn-on temperature (K). This is an editable model input; the default belongs to the synthetic worked example.
Turn-off temperature (K)
offK
K285Turn-off temperature (K). This is an editable model input; the default belongs to the synthetic worked example.
Heater power request (W)
command
W10Heater power request (W). This is an editable model input; the default belongs to the synthetic worked example.

Equations and rules

  • cooling uses max(cell temperatures); heating uses min(cell temperatures)
  • command = active ? configured command : 0

Worked example

Battery heater controller worked example

Use the defaults below with Cell temperatures = [275, 282, 283] K, Enable = 1 true / false. At 0 s, Heater power request is 10 W. Additional checks are listed below.

Open Studio example after release →
Numerical checks for the bundled synthetic example
OutputTime (s)Expected valueUnitAbsolute tolerance
Heater power request
command
010W1e-08

Explore the recorded outputs

Battery heater controller recorded example

Battery heater controller / Heater power request
Battery heater controller / Heater power request against timeRecorded synthetic simulation values. Time in seconds; output in W.9.509.750.25100.510.250.7510.51WTime (s)
Battery heater controller / Heater power request: 10 W 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

Battery heater controller worked example

Controls the hottest cooling channel or coldest heating channel with hysteresis.

  1. Battery heater controller: Uses the hottest channel for cooling or the coldest channel for heating. Separate on and off thresholds provide hysteresis. Enable gates the commanded coolant mass flow or heater power.
    • 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 controller emits a request. Fluid transport and heater heat delivery require connected plant models.
  • 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. 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)