Battery knowledge · Units and electrical basics

Energy

What a battery stores and delivers: the integral of power over time, in watt-hours or joules. It is capacity times voltage, which is why two cells with equal ampere-hours can hold different energy. [1]

Unit
Wh
Relationship
E = ∫ V·I dt

Example

Integrate a changing power trace

A load that draws 40 W for 15 min and then 20 W for 30 min uses 20 Wh in total. Add the area under each part of the power-versus-time trace.

Explore the graph

Voltage connects capacity in ampere-hours to nominal energy in watt-hours.

Nominal energy versus capacity
Nominal energy versus capacityCapacity (Ah) versus Energy (Wh). 12 V rating. Interpretation follows the graphs.00605120101801524020Capacity (Ah)Energy (Wh)
12 V rating

5 Ah × 12 V = 60 Wh nominal energy.

E_nominal = Q_nominal V_nominal; actual energy = ∫ VI dt

Illustrative model. Specific energy divides energy by mass; energy density divides it by volume.

Use in Lemonergy

Lemonergy Studio blocks

Charge counter worked example

Integrates signed throughput. Changing capacity preserves fraction and reports revaluation separately.

Blocks to use

  1. Charge counter

    Integrates signed discharge current or power over elapsed sample time. Charge efficiency applies during charging. The initial sample has zero elapsed time. Variable-capacity variants preserve the current fraction when capacity changes and report the resulting amount revaluation separately. Reset restores the initial fraction without integrating that event.

    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.

  1. Review the block inputs, units and model limits.
  2. Open the Studio example and run its bundled model.
  3. Compare the output channels with the numerical checks; change one input and run again.

Example. Use the defaults below with Signed battery current = 2 A, Reset = 0 true / false. At 0 s, State of charge is 0.8 1 (fraction). Additional checks are listed below.

Observe. Inspect the outputs and numerical checks on the block reference page.

Current or power bias accumulates. Fraction clipping is reported as a boundary amount; it does not make the connected plant respect that boundary. Energy variants need capacity in joules. The example verifies numerical behavior for synthetic parameters. Cell characterization and validation for an intended use are separate tasks.

Open Studio example →

Lemonergy Studio blocks

Energy counter worked example

Integrates signed throughput. Changing capacity preserves fraction and reports revaluation separately.

Blocks to use

  1. Energy counter

    Integrates signed discharge current or power over elapsed sample time. Charge efficiency applies during charging. The initial sample has zero elapsed time. Variable-capacity variants preserve the current fraction when capacity changes and report the resulting amount revaluation separately. Reset restores the initial fraction without integrating that event.

    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.

  1. Review the block inputs, units and model limits.
  2. Open the Studio example and run its bundled model.
  3. Compare the output channels with the numerical checks; change one input and run again.

Example. Use the defaults below with Signed battery power = 2 W, Reset = 0 true / false. At 0 s, State of energy is 0.8 1 (fraction). Additional checks are listed below.

Observe. Inspect the outputs and numerical checks on the block reference page.

Current or power bias accumulates. Fraction clipping is reported as a boundary amount; it does not make the connected plant respect that boundary. Energy variants need capacity in joules. The example verifies numerical behavior for synthetic parameters. Cell characterization and validation for an intended use are separate tasks.

Open Studio example →

Lemonergy Studio blocks

Charge counter with capacity input worked example

Integrates signed throughput. Changing capacity preserves fraction and reports revaluation separately.

Blocks to use

  1. Charge counter with capacity input

    Integrates signed discharge current or power over elapsed sample time. Charge efficiency applies during charging. The initial sample has zero elapsed time. Variable-capacity variants preserve the current fraction when capacity changes and report the resulting amount revaluation separately. Reset restores the initial fraction without integrating that event.

    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.

  1. Review the block inputs, units and model limits.
  2. Open the Studio example and run its bundled model.
  3. Compare the output channels with the numerical checks; change one input and run again.

Example. Use the defaults below with Signed battery current = 2 A, Reset = 0 true / false, Charge capacity (Ah) = 2 Ah. At 0 s, State of charge is 0.8 1 (fraction). Additional checks are listed below.

Observe. Inspect the outputs and numerical checks on the block reference page.

Current or power bias accumulates. Fraction clipping is reported as a boundary amount; it does not make the connected plant respect that boundary. Energy variants need capacity in joules. 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 2 · Capacity and C-rate →

All connected Lemonergy block references
Studio interfaces connected to this concept

These components declare this quantity or operation. Their individual pages distinguish authoring metadata from numerical verification.

References & further reading

Technical references

  1. The International System of Units (SI), 9th edition

    Bureau International des Poids et Mesures · 2026

    Technical reference · Definitions of SI units and coherent derived units; 2026 revision.