Battery knowledge · Data, communication and electronics

Feedback and feedforward control

Two ways of deciding a control input. Feedback measures the result and corrects an error after it appears; feedforward acts in advance on a known disturbance or setpoint, using a model. A battery cooling loop may feed forward the heat expected from the requested current and use feedback on cell temperature to trim the remaining error.

Also called
closed-loop control, open-loop control, feedback control, feedforward control

Example

Data, communication and electronics: an example situation

2500 in a log might mean 25.00 °C, 2.5 V or raw counts. Units and scale must accompany the value.

Read Feedback and feedforward control alongside Heat generation in this context. The heat a cell produces in operation: an irreversible part equal to current times overpotential, and a reversible part from the entropy change, I·T·dE/dT. The Bernardi equation sums them and feeds every thermal model.

Use in Lemonergy

Lemonergy Studio blocks

Conditional action kernel worked example

Executes a child on a true action flag and holds its state and output on inactive samples.

Blocks to use

  1. Conditional action kernel

    Executes a child on a true action flag and holds its state and output on inactive samples. Outputs are held between accepted samples; numerical evaluation does not commit hidden state.

    Inputs & settings
    • Use the block reference for settings and connections.
    • 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 interface, units and model limits.
  2. Open the Studio example and run its bundled model.
  3. Compare outputs with the numerical checks; change one input and run again.

Example. Default editable example at the first accepted sample (t = 0 s). Child operation: bias. The output checks below are execution oracles for this example.

Observe. Inspect the output channels and checks on the block reference page.

Control executes on an explicit sampled clock. Continuous states, history/delay kernels, residual equations, and event-source children are not supported. The wrapper contains one original computation operation; arbitrary multi-block submodels are not supported. A sampled child advances once per invocation using its own declared period. Repeated calls share the same outer timestamp and do not advance physical time. A Boolean action flag controls one child. This is not an arbitrary multi-block action subsystem.

Open Studio example →

Lemonergy Studio blocks

Invocation count fan-out worked example

Copies one accepted-sample call count to fixed typed branches. It does not impose side-effect order between independent downstream models.

Blocks to use

  1. Invocation count fan-out

    Copies one accepted-sample call count to fixed typed branches. It does not impose side-effect order between independent downstream models. Outputs are held between accepted samples; numerical evaluation does not commit hidden state.

    Inputs & settings
    • Use the block reference for settings and connections.
    • 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 interface, units and model limits.
  2. Open the Studio example and run its bundled model.
  3. Compare outputs with the numerical checks; change one input and run again.

Example. Default editable example at the first accepted sample (t = 0 s). The output checks below are execution oracles for this example.

Observe. Inspect the output channels and checks on the block reference page.

Control executes on an explicit sampled clock. Continuous states, history/delay kernels, residual equations, and event-source children are not supported. Fan-out does not impose execution or side-effect order on independent downstream models. Counts are limited to 0–256; 1–32 branches are supported.

Open Studio example →

Lemonergy Studio blocks

Sampled invocation generator worked example

Emits a bounded call count on enabled sample hits, after an integer sample offset; missed disabled hits are not replayed.

Blocks to use

  1. Sampled invocation generator

    Emits a bounded call count on enabled sample hits, after an integer sample offset; missed disabled hits are not replayed. Outputs are held between accepted samples; numerical evaluation does not commit hidden state.

    Inputs & settings
    • Use the block reference for settings and connections.
    • 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 interface, units and model limits.
  2. Open the Studio example and run its bundled model.
  3. Compare outputs with the numerical checks; change one input and run again.

Example. Default editable example at the first accepted sample (t = 0 s). The output checks below are execution oracles for this example.

Observe. Inspect the output channels and checks on the block reference page.

Control executes on an explicit sampled clock. Continuous states, history/delay kernels, residual equations, and event-source children are not supported. Calls are explicit unsigned counts at accepted sample hits, not a global event bus. Disabled hits are not replayed. Total count overflow is rejected.

Open Studio example →
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

Further reading on this topic

These sources provide broader context; they are not presented as citations for every statement in this entry.

  1. 3rd generation of the CAN data link layer

    CAN in Automation, CAN Newsletter · 2020

    Topic background · Classical CAN, CAN FD and CAN XL data-link concepts; publication describes the 2020 state.

  2. Getting Started with the BQ76925

    Texas Instruments · 2019

    Topic background · A concrete BMS analog front-end example: cell voltage, current, temperature measurement and MCU integration.