Lemonergy · Studio block
Cell contact residual monitor
Filters cell/group voltage residuals against their median and qualifies persistent differences. Residuals are not a unique contact-fault diagnosis.
- Implementation ID
battery-contact-monitor- Reviewed
- 2026-10-27
Behavior
Forms measured-minus-predicted voltage residuals, subtracts their channel median, filters the differences and qualifies consecutive threshold crossings when current is large enough.
Interface
| Name | Direction | Unit | Meaning |
|---|---|---|---|
measured | input | V | Measured cell/group voltages; 3 channels at the default configuration. |
predicted | input | V | Predicted healthy voltages; 3 channels at the default configuration. |
current | input | A | Signed current; scalar. |
enable | input | true / false | Enable; scalar. |
residual | output | V | Filtered differential residual; 3 channels at the default configuration. |
faults | output | true / false | Qualified channel symptoms; 3 channels at the default configuration. |
fault | output | true / false | Any qualified symptom; scalar. |
valid | output | true / false | Sufficient current; scalar. |
Parameters
Defaults are initial model values. Select values for your own model and operating conditions.
| Parameter | Unit | Default | Meaning and limits |
|---|---|---|---|
Sample interval (s)sampleTimeS | s | 1 | Positive sample interval. Initialization has zero elapsed time; subsequent accepted samples update memory. |
Number of measurement channelscells | 1 | 3 | Number of measurement channels. This is an editable model input; the default belongs to the synthetic worked example. |
Residual filter weight (0–1)filterWeight | 0–1 | 0.5 | Residual filter weight (0–1). This is an editable model input; the default belongs to the synthetic worked example. |
Residual threshold (V)thresholdV | V | 0.008 | Residual threshold (V). This is an editable model input; the default belongs to the synthetic worked example. |
Minimum diagnostic current (A)minCurrentA | A | 1 | Minimum diagnostic current (A). This is an editable model input; the default belongs to the synthetic worked example. |
Consecutive qualifying samplesrequiredSamples | 1 | 2 | Consecutive qualifying samples. This is an editable model input; the default belongs to the synthetic worked example. |
Equations and rules
d[j] = measured[j] - predicted[j]residual[j] = filtered(d[j] - median(d))
Worked example
Cell contact residual monitor worked example
Use the defaults below with Measured cell/group voltages = [3.64, 3.66, 3.66] V, Predicted healthy voltages = [3.66, 3.66, 3.66] V, Signed current = 2 A, Enable = 1 true / false. At 0 s, Filtered differential residual is [0, 0, 0] V. Additional checks are listed below.
Open Studio example after release →| Output | Time (s) | Expected value | Unit | Absolute tolerance |
|---|---|---|---|---|
Filtered differential residualresidual | 0 | [0, 0, 0] | V | 1e-08 |
Any qualified symptomfault | 0 | false | true / false | 1e-08 |
Sufficient currentvalid | 0 | true | true / false | 1e-08 |
Any qualified symptomfault | 2 | true | true / false | 0 |
Explore the recorded outputs
Cell contact residual monitor recorded example
Cell contact residual monitor / Filtered differential residual [1]4 actual recorded samples. Lines are visual guides between samples. Synthetic example, not measured cell data.
Read the selected signal as a table
| Time (s) | Value |
|---|
Download the recorded samples (JSON) · Open this Studio example after release
Use in a workflow
Cell contact residual monitor worked example
Filters cell/group voltage residuals against their median and qualifies persistent differences. Residuals are not a unique contact-fault diagnosis.
- Cell contact residual monitor: Forms measured-minus-predicted voltage residuals, subtracts their channel median, filters the differences and qualifies consecutive threshold crossings when current is large enough.
- Use the parameter values in the block reference.
- Implementation tested locally; public release pending.
Connected concepts
Limits and interpretation
- Requires at least three channels. Contact loss, parameter mismatch and sensor bias can produce the same symptom; this is not a unique fault diagnosis.
- The example verifies numerical behavior for synthetic parameters. Cell characterization and validation for an intended use are separate tasks.
Scientific and mathematical references
These sources explain the scientific and mathematical background. The behavior, interface and limits above define the Lemonergy implementation; a citation does not imply every model option in the source is implemented.
- 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.
Implementation sources
This reference follows the public interface and locally verified numerical checks for an upcoming release.
Contract: Lemonergy Studio public contract · Verification record: verification-2026-10-27
docs/glossary/native-block-verification.json
This implementation and its workflow uses (JSON) · Knowledge graph (JSON-LD)