Lemonergy · Studio block

Discharge-current envelope

Selects the most restrictive cell voltage and temperature current limit.

Implementation ID
battery-discharge-envelope
Reviewed
2026-10-27

Behavior

Interpolates voltage and temperature limit tables for every channel, then selects the smallest nonnegative magnitude together with the nominal cap. Disabling the block returns zero. The envelope feeds a controller or current actuator.

Interface

Discharge-current envelope interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.Discharge-current envelopeStudio blockvoltagetemperatureenablelimitvoltageLimittemperatureLimit
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
voltageinputVCell voltages; 3 channels at the default configuration.
temperatureinputKCell temperatures; 3 channels at the default configuration.
enableinputtrue / falseEnable; scalar.
limitoutputAAllowed current magnitude; scalar.
voltageLimitoutputAVoltage limit; scalar.
temperatureLimitoutputATemperature limit; scalar.

Parameters

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

Configuration fields
ParameterUnitDefaultMeaning and limits
Number of measurement channels
cells
13Number of measurement channels. This is an editable model input; the default belongs to the synthetic worked example.
Nominal current limit (A)
nominalA
A4Nominal current limit (A). This is an editable model input; the default belongs to the synthetic worked example.
Voltage limit table [V, A]
voltageTable
See field order[[3, 0], [3.2, 4]]Voltage limit table [V, A]. Rows are ordered coordinate/value pairs; the first column must be strictly increasing.
Temperature limit table [K, A]
temperatureTable
See field order[[273.15, 0], [283.15, 4], [313.15, 4], [323.15, 0]]Temperature limit table [K, A]. Rows are ordered coordinate/value pairs; the first column must be strictly increasing.

Equations and rules

  • allowed = enable ? min(nominal, all voltage limits, all temperature limits) : 0

Worked example

Discharge-current envelope worked example

Use the defaults below with Cell voltages = [3.2, 3.1, 3.15] V, Cell temperatures = [298.15, 318.15, 300] K, Enable = 1 true / false. At 0 s, Allowed current magnitude is 2 A. Additional checks are listed below.

Open Studio example after release →
Numerical checks for the bundled synthetic example
OutputTime (s)Expected valueUnitAbsolute tolerance
Allowed current magnitude
limit
02A1e-08

Explore the recorded outputs

Discharge-current envelope recorded example

Discharge-current envelope / Allowed current magnitude
Discharge-current envelope / Allowed current magnitude against timeRecorded synthetic simulation values. Time in seconds; output in A.1.501.750.2520.52.250.752.51ATime (s)
Discharge-current envelope / Allowed current magnitude: 2 A 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

Discharge-current envelope worked example

Selects the most restrictive cell voltage and temperature current limit.

  1. Discharge-current envelope: Interpolates voltage and temperature limit tables for every channel, then selects the smallest nonnegative magnitude together with the nominal cap. Disabling the block returns zero. The envelope feeds a controller or current actuator.
    • 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 tables are supplied by the model author. Their synthetic defaults do not establish a safe charging or discharging envelope.
  • 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. Lithium-ion battery fast charging: A review

    Anna Tomaszewska et al. · eTransportation · 2019

    Technical reference · CC-CV and alternative charging protocols, transport limitations, degradation and thermal implications; results depend on cell and test conditions. Software behavior is documented separately in Lemonergy block references.

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)