Battery knowledge · Charging and discharging

CC-CV charging

The standard lithium-ion charge protocol: constant current until the cell reaches its upper cutoff voltage, then that voltage held constant while the current tapers. The charge ends when the current falls to a set fraction, often C/20. [1]

Also called
constant current constant voltage

Example

Follow a two-stage charge

For an illustrative 5 Ah cell, a 2.5 A current request is 0.5C. During CC the voltage rises. At the selected upper voltage, CV regulation holds voltage while current tapers. Completion requires the taper current to fall below the selected cutoff for the configured dwell.

Interpretation & limits

  • Choose voltage, current and temperature limits from the actual cell specification. These example values do not define a charging recipe.

Explore the graph

See which quantity is held constant, when the phase changes and how charging ends.

Current profile
Current profileRelative elapsed time versus Current (A). Charge current. Interpretation follows the graphs.CCCVStop001.440.252.880.54.310.755.751Relative elapsed timeCurrent (A)
Charge current
Voltage profile
Voltage profileRelative elapsed time versus Cell voltage (V). Cell voltage. Interpretation follows the graphs.CCCVStop303.350.253.70.54.050.754.41Relative elapsed timeCell voltage (V)
Cell voltage

Current holds at 5 A until the example 4.15 V threshold; voltage then holds while current tapers. The stop marker is a separate low-current termination condition.

CC: I = I_set · CV: V = V_limit

Illustrative model. Positive current charges the cell. Time is normalized; selected thresholds are not cell-specific recommendations. The voltage trace ends at termination; post-stop relaxation is excluded.

Use in Lemonergy

Lemonergy Studio blocks

Build CC–CV charging

Native current and voltage regulation act against an explicit battery.

Blocks to use

  1. Charging schedule and target policy

    Permits charging

    Inputs & settings
    • strategy
    • targetSoc
    • departureS
    • soc, available, chargerDone → permit
  2. Regulated CC/CV charger

    Regulates current and voltage

    Inputs & settings
    • currentA
    • voltageV
    • cutoffCurrentA / cutoffHoldS
    • Electrical ports p and n
  3. Battery with SOC-dependent OCV

    Stores charge and supplies terminal voltage

    Inputs & settings
    • capacityAh
    • initialSoc
    • emptyVoltageV / fullVoltageV
    • resistanceOhm
    • Electrical ports p and n
  4. Electrical reference

    Sets zero potential

    Inputs & settings
    • Connect p to reference net

This overview identifies the components to use. Follow the example in Lemonergy for their connections and settings.

  1. Open home charging and inspect settings.
  2. Choose immediate charging; inspect mode and completion.

Example. An illustrative 100 Ah battery with a 420 V ceiling can use a 32 A cap. At the ceiling, current falls as OCV rises.

Observe. Completion needs current below cutoff at the CV ceiling for the configured dwell. Site-limited low current is different.

The battery uses linear OCV and fixed resistance. It does not automatically add aging, thermal dynamics or balancing.

Open the Studio example →

Lemonergy Studio blocks

CC-CV current controller worked example

PI voltage regulation with an external current envelope and anti-windup.

Blocks to use

  1. CC-CV current controller

    Uses a PI voltage loop and an external current magnitude envelope to request charge current. Conditional integration limits windup while the request is saturated. Charging is negative in the discharge-positive current convention; disabling resets control memory.

    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 Highest cell voltage = 3.9 V, Charge-current magnitude limit = 2 A, Enable = 1 true / false. At 0 s, Signed current request (charge negative) is -1 A. Additional checks are listed below.

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

This block generates a current request. The plant, actuator limits and loop stability must be modeled separately. 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-current envelope worked example

Selects the most restrictive cell voltage and temperature current limit.

Blocks to use

  1. Charge-current envelope

    Interpolates voltage and temperature limit tables for every channel, then selects the smallest nonnegative magnitude together with the nominal cap. Disabling the block returns zero. The envelope feeds a controller or current actuator.

    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 Cell voltages = [4, 4.05, 4.02] V, Cell temperatures = [298.15, 318.15, 300] K, Enable = 1 true / false. At 0 s, Allowed current magnitude is 1 A. Additional checks are listed below.

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

The tables are supplied by the model author. Their synthetic defaults do not establish a safe charging or discharging envelope. 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

References & further reading

Technical references

  1. Lithium-ion battery fast charging: A review

    Anna Tomaszewska et al. · eTransportation · 2019

    Technical reference · CC-CV and alternative charging protocols, transport limitations, degradation and thermal implications; results depend on cell and test conditions. Software behavior is documented separately in Lemonergy block references.