Lemonergy · Studio block

Active cell supervision interface

Discharge current sink below charging command; finite-resistance charging above terminal voltage; no detailed switching converter or hardware I/O.

Implementation ID
active-supervision-interface
Reviewed
2026-10-27

Behavior

Discharge current sink below charging command; finite-resistance charging above terminal voltage; no detailed switching converter or hardware I/O. The terminal current participates directly in Kirchhoff current balance and changes the connected battery state. Measurements are solved with the physical network.

Interface

Active cell supervision interface interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.Active cell supervision interfaceStudio blockdischargechargeVoltagevoltagecurrentpowerpn
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
pterminalV / AElectrical conserving connection. Across variables are shared at a node; through flows balance.
nterminalV / AElectrical conserving connection. Across variables are shared at a node; through flows balance.
dischargeinputAOptional typed command; otherwise the configured default is used. For balancing, currentN addresses the corresponding circuit.
chargeVoltageinputVOptional typed command; otherwise the configured default is used. For balancing, currentN addresses the corresponding circuit.
voltageoutputVObserved voltage.
currentoutputAObserved current.
poweroutputWObserved power.

Parameters

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

Configuration fields
ParameterUnitDefaultMeaning and limits
Default discharge current
dischargeCurrentA
A0Default discharge current. Numerical bounds are model-validation limits, not physical operating ratings.
Minimum 0; Maximum 1000000
Default charging voltage
chargeVoltageV
V0Default charging voltage. Numerical bounds are model-validation limits, not physical operating ratings.
Minimum 0; Maximum 1000000
Charging resistance
chargeResistanceOhm
ohm0.1Charging resistance. Numerical bounds are model-validation limits, not physical operating ratings.
Minimum 1e-06; Maximum 1000000000

Equations and rules

  • if commandVoltage >= terminalVoltage: I = (terminalVoltage-commandVoltage)/chargeResistance
  • otherwise I = max(0, dischargeRequest)

Worked example

Active cell supervision interface worked example

A 4 V cell with 0.1 Ω internal resistance is connected to a 4.2 V charge command through the interface’s 0.1 Ω charging resistance. Solving both resistances gives -1 A interface current and 4.1 V terminal voltage. The negative current charges the cell.

Open Studio example after release →
Numerical checks for the bundled synthetic example
OutputTime (s)Expected valueUnitAbsolute tolerance
Interface current
current
1-1A1e-06
Terminal voltage
voltage
14.1V1e-06

Use in a workflow

Active cell supervision interface worked example

Discharge current sink below charging command; finite-resistance charging above terminal voltage; no detailed switching converter or hardware I/O.

  1. Active cell supervision interface: Discharge current sink below charging command; finite-resistance charging above terminal voltage; no detailed switching converter or hardware I/O. The terminal current participates directly in Kirchhoff current balance and changes the connected battery state. Measurements are solved with the physical network.
    • Use the parameter values in the block reference.
    • Implementation tested locally; public release pending.
Open Studio example after release

Connected concepts

Limits and interpretation

  • This is a simulated electrical interface without a target-hardware driver. SOC and temperature pass-throughs, diagnostic mode flags and hardware-specific communication are outside this interface.

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. Getting Started with the BQ76925

    Texas Instruments · 2019

    Technical reference · A concrete BMS analog front-end example: cell voltage, current, temperature measurement and MCU integration.

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)