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
| Name | Direction | Unit | Meaning |
|---|---|---|---|
p | terminal | V / A | Electrical conserving connection. Across variables are shared at a node; through flows balance. |
n | terminal | V / A | Electrical conserving connection. Across variables are shared at a node; through flows balance. |
discharge | input | A | Optional typed command; otherwise the configured default is used. For balancing, currentN addresses the corresponding circuit. |
chargeVoltage | input | V | Optional typed command; otherwise the configured default is used. For balancing, currentN addresses the corresponding circuit. |
voltage | output | V | Observed voltage. |
current | output | A | Observed current. |
power | output | W | Observed power. |
Parameters
Defaults are initial model values. Select values for your own model and operating conditions.
| Parameter | Unit | Default | Meaning and limits |
|---|---|---|---|
Default discharge currentdischargeCurrentA | A | 0 | Default discharge current. Numerical bounds are model-validation limits, not physical operating ratings. Minimum 0; Maximum 1000000 |
Default charging voltagechargeVoltageV | V | 0 | Default charging voltage. Numerical bounds are model-validation limits, not physical operating ratings. Minimum 0; Maximum 1000000 |
Charging resistancechargeResistanceOhm | ohm | 0.1 | Charging 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)/chargeResistanceotherwise 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 →| Output | Time (s) | Expected value | Unit | Absolute tolerance |
|---|---|---|---|---|
Interface currentcurrent | 1 | -1 | A | 1e-06 |
Terminal voltagevoltage | 1 | 4.1 | V | 1e-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.
- 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.
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.
- 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)