Lemonergy · Studio block

Controlled discharger

Triggered discharge request with low-voltage/time cutoff, recorded charge and latched completion.

Implementation ID
battery-controlled-discharger
Reviewed
2026-10-27

Behavior

A trigger starts a discharge-current request. Measured voltage cutoff or maximum active time ends the run and latches completion. Measured discharge current accumulates removed ampere-hours. Disable pauses actuation.

Interface

Controlled discharger interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.Controlled dischargerStudio blockvoltagecurrenttriggerenablerequestdonemodechargeelapsed
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
voltageinputVMeasured terminal voltage; scalar.
currentinputAMeasured discharge current; scalar.
triggerinputtrue / falseStart trigger; scalar.
enableinputtrue / falseEnable; scalar.
requestoutputADischarge-current request; scalar.
doneoutputtrue / falseComplete; scalar.
modeoutput1Mode (0 idle, 1 discharge, 2 complete, 3 paused); scalar.
chargeoutputAhRemoved charge (Ah); scalar.
elapsedoutputsActive discharge time (s); 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.
Discharge request (A)
currentA
A1Discharge request (A). This is an editable model input; the default belongs to the synthetic worked example.
Discharge cutoff voltage (V)
cutoffV
V3.2Discharge cutoff voltage (V). This is an editable model input; the default belongs to the synthetic worked example.
Maximum discharge duration (s)
maximumS
s3600Maximum discharge duration (s). This is an editable model input; the default belongs to the synthetic worked example.

Equations and rules

  • removedAh = integral(measured discharge current dt) / 3600
  • finish when terminal voltage <= cutoffV or active time >= maximumS

Worked example

Controlled discharger worked example

Use the defaults below with Measured terminal voltage = 3.8 V, Measured discharge current = 1 A, Start trigger = 1 true / false, Enable = 1 true / false. At 0 s, Discharge-current request is 1 A. Additional checks are listed below.

Open Studio example after release →
Numerical checks for the bundled synthetic example
OutputTime (s)Expected valueUnitAbsolute tolerance
Discharge-current request
request
01A1e-08
Complete
done
0falsetrue / false1e-08
Removed charge (Ah)
charge
00Ah1e-08
Active discharge time (s)
elapsed
00s1e-08

Explore the recorded outputs

Controlled discharger recorded example

Controlled discharger / Discharge-current request
Controlled discharger / Discharge-current request against timeRecorded synthetic simulation values. Time in seconds; output in A.0.500.750.2510.51.250.751.51ATime (s)
Controlled discharger / Discharge-current request: 1 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

Controlled discharger worked example

Triggered discharge request with low-voltage/time cutoff, recorded charge and latched completion.

  1. Controlled discharger: A trigger starts a discharge-current request. Measured voltage cutoff or maximum active time ends the run and latches completion. Measured discharge current accumulates removed ampere-hours. Disable pauses actuation.
    • 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 requests current; a separate plant or physical sink performs the discharge. The synthetic example is not a standardized cell test.
  • 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. Battery Test Manual For Electric Vehicles, Revision 3

    Jon P. Christopherson · Idaho National Laboratory · 2015

    Technical reference · Performance characterization, pulse resistance/power, life testing and reference performance tests; historical 2015 edition.

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)