Battery knowledge · Modules, packs and battery management
Battery management system
The electronics and software that keep a battery inside its safe window: measuring every cell voltage and many temperatures, estimating SOC and SOH, balancing cells, computing current limits, controlling the contactors and reporting over the vehicle network. [1]
- Abbreviation
- BMS
Example
The limiting cell matters
Average: 3.93 V. Highest cell: 4.02 V. The highest cell can reach the charge limit first.
The 4.2 V ceiling is an example, not universal. Voltage alone does not uniquely determine SOC.
Explore the graph
A pack average can hide a cell that reaches its voltage limit first.
Average: 3.93 V. Highest cell: 4.02 V. The highest cell can reach the charge limit first.
V_max = max(V₁, V₂, …); V_average = ΣV_i / N
Illustrative model. The 4.2 V ceiling is an example, not universal. Voltage alone does not uniquely determine SOC.
Use in Lemonergy
Lemonergy Studio blocks
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.
Blocks to use
- 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.
Inputs & settings
- Use the parameter values in the block reference.
- Bundled example verified on the production release of 28 October 2026.
This overview identifies the components to use. Follow the example in Lemonergy for their connections and settings.
- Review the block inputs, units and model limits.
- Open the Studio example and run its bundled model.
- Compare the output channels with the numerical checks; change one input and run again.
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.
Observe. Inspect the outputs and numerical checks on the block reference page.
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.
Open Studio example →Lemonergy Studio blocks
Multi-cell balancing interface worked example
One to eight independently commanded current-sink circuits with per-cell voltage, current and power; no hardware I/O.
Blocks to use
- Multi-cell balancing interface
One to eight independently commanded current-sink circuits with per-cell voltage, current and power; no 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.
Inputs & settings
- Use the parameter values in the block reference.
- Bundled example verified on the production release of 28 October 2026.
This overview identifies the components to use. Follow the example in Lemonergy for their connections and settings.
- Review the block inputs, units and model limits.
- Open the Studio example and run its bundled model.
- Compare the output channels with the numerical checks; change one input and run again.
Example. The bundled two-cell model commands 0.1 A from circuit 1 and zero from circuit 2. The first cell has 4 V OCV and 0.1 Ω resistance, giving 3.99 V under bleed. The second 3.7 V cell remains unloaded.
Observe. Inspect the outputs and numerical checks on the block reference page.
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. One to eight independently commanded circuits per instance. The default contract shows one circuit; the worked example configures two.
Open Studio example →Lemonergy Studio blocks
Fault qualification timer worked example
Qualifies persistent symptoms, leaks intermittent evidence and clears after a healthy interval.
Blocks to use
- Fault qualification timer
Accumulates symptom time at accepted sample events, removes configured evidence during healthy samples, qualifies a persistent fault and clears it after a healthy interval. An explicit reset clears its memory. Initialization consumes no elapsed time.
Inputs & settings
- Use the parameter values in the block reference.
- Bundled example verified on the production release of 28 October 2026.
This overview identifies the components to use. Follow the example in Lemonergy for their connections and settings.
- Review the block inputs, units and model limits.
- Open the Studio example and run its bundled model.
- Compare the output channels with the numerical checks; change one input and run again.
Example. Use the defaults below with Fault symptom = 1 true / false, Reset = 0 true / false. At 0.4 s, Qualified fault is 1 true / false. Additional checks are listed below.
Observe. Inspect the outputs and numerical checks on the block reference page.
Qualification depends on sample interval and thresholds; it cannot detect a symptom that was never sampled. The example verifies numerical behavior for synthetic parameters. Cell characterization and validation for an intended use are separate tasks.
Open Studio example →Learn it in Lesson 0 · Battery basics →
All connected Lemonergy block references
References & further reading
Technical references
- 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.
Further reading on this topic
These sources provide broader context; they are not presented as citations for every statement in this entry.
- Extended Kalman filtering for battery management systems of LiPB-based HEV battery packs: Part 2. Modeling and identification
Gregory L. Plett · Journal of Power Sources · 2004
Topic background · Battery charge balance, open-circuit voltage, ohmic loss, polarization dynamics and model identification; parameters require cell-specific data.