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
- 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.
- Review the interface, units and model limits.
- Open the Studio example and run its bundled model.
- 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
- 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.
- Review the interface, units and model limits.
- Open the Studio example and run its bundled model.
- 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
- 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.
- Review the interface, units and model limits.
- Open the Studio example and run its bundled model.
- 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
- Conditional action kernel
- Invocation count fan-out
- Sampled invocation generator
- Detect change
- Conditional hold
- Detect decrease
- Sample delay
- Sample difference
- Discrete derivative
- Discrete transfer function
- Discrete first-order filter
- Discrete integrator
- Discrete lead-lag filter
- Discrete weighted PID
- Discrete real-zero filter
- Discrete state space
- Discrete pole-zero model
- Sampled duty-controlled PWM
- Sampled dynamic rate limiter
- Enabled kernel
- Enabled and triggered kernel
- Exclusive action merge
- Detect fall negative
- Detect fall nonpositive
- Detect falling edge
- FIR filter
- Independent element kernels
- Bounded for iterator
- Counted kernel invocation
- Comparison action router
- Detect increase
- Invocation feedback kernel
- Scoped parameter writer
- Continuous weighted PID
- Boolean transport propagation delay
- Resettable sample delay
- Resettable running minimum and maximum
- Resettable kernel
- Detect rise nonnegative
- Detect rise positive
- Detect rising edge
- Running minimum and maximum
- Zero-order hold
- Sampled backlash
- Sampled rate limiter
- Sampled hysteresis relay
- Scoped state reader
- Scoped state writer
- Case action router
- Tapped sample delay
- Triggered kernel
- Variable integer delay
- Sampled variable pulse generator
- Bounded while iterator
Studio interfaces connected to this concept
These components declare this quantity or operation. Their individual pages distinguish authoring metadata from numerical verification.
- Cell contact residual monitor
- Battery current monitor
- Battery temperature monitor
- Battery voltage monitor
- Boolean latch
- Bus selector
- Chart
- Manual variant sink
- Manual variant source
- Model predictive controller
- Arithmetic bit shift
- Assertion
- Clear bit
- Set bit
- Bitwise operator
- Boolean operator
- Dynamic forbidden interval check
- Dynamic lower-bound check
- Dynamic range check
- Dynamic upper-bound check
- Signal gap check
- Sample difference check
- Static lower-bound check
- Static range check
- Input resolution check
- Forbidden interval check
- Static upper-bound check
- Compare to zero
- Discrete weighted PID
- Dynamic interval test
- Extract bit range
- Float32 bit pattern
- Integer to Boolean bits
- Interval test
- Manual switch
- Multiport switch
- Continuous weighted PID
- Element selector
- Stop simulation
- Case action router
- Truth table
- PI controller
- Select
- Variant branch end
- Variant sink
- Variant source
- Variant branch start
- Variant submodel
- Vector selector
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.
- 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.
- 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.