Sweden
Loading...
India
Loading...
Cell Balancing SWCSourceSWC InputSWC Output OutputSourceSourceSWC InputSWC InputSWC OutputSWC OutputOutputOutputCell voltage (fast filtered)Cell temperature (fast filtered)I_lim_chgI_lim_dchContactor Immediate Opening RequestCritical error flagMild error flag Calibration Parameters:voltage critical MIN :- 2.3 Vvoltage critical MAX :- 3.8 Vtemperature critical MIN :- 0 °Ctemperature critical MAX :- 45 °CI_crit (critical overcurrent) :- 550 AI_crit_almost (warning) :- 500 Acell imbalance critical :- 0.050 Vcell imbalance almost :- 0.040 Vcurrent limit charge :- TBD Acurrent limit discharge :- TBD AMinor->Major escalation delay :- 50 cycles (configurable)Fault clear debounce :- 5 cycles (stable non-violation required)
Cell Balancing SWCSourceSWC InputSWC Output OutputSourceSourceSWC InputSWC InputSWC OutputSWC OutputOutputOutputCell voltage (fast filtered)Cell temperature (fast filtered)I_lim_chgI_lim_dchContactor Immediate Opening RequestCritical error flagMild error flag Calibration Parameters:voltage critical MIN :- 2.3 Vvoltage critical MAX :- 3.8 Vtemperature critical MIN :- 0 °Ctemperature critical MAX :- 45 °CI_crit (critical overcurrent) :- 550 AI_crit_almost (warning) :- 500 Acell imbalance critical :- 0.050 Vcell imbalance almost :- 0.040 Vcurrent limit charge :- TBD Acurrent limit discharge :- TBD AMinor->Major escalation delay :- 50 cycles (configurable)Fault clear debounce :- 5 cycles (stable non-violation required)

Limits Violation Protection

The BMS shall detect any violation on any cell of the pack and react as fast as possible to protect the batteries.
It shall continuously monitor cell voltages and temperatures and act by either opening the contactor and/or reducing the power limits.



Cell Voltage Limits

  1. High limit (critical)
    If any cell voltage (fast filtered) > V_{crit,max} (3.8 V):
  2. Immediately set error severity = MAJOR
  3. Request immediate contactor opening (critical error flag)

  4. Low limit (critical)
    If any cell voltage (fast filtered) < V_{crit,min} (2.3 V):

  5. Immediately set error severity = MAJOR
  6. Request immediate contactor opening (critical error flag)

  7. Almost-limit (warning)

  8. If any cell voltage > V_{crit,max} - 0.10 V (3.7 V) or < V_{crit,min} + 0.10 V (2.4 V) the condition is marked as "almost" and latched with debounce.
  9. Almost-latched conditions contribute to MINOR severity and may escalate to MAJOR if persistent.

Cell Temperature Limits

  1. High limit (critical)
  2. If any cell temperature (fast filtered) > T_{crit,max} (45 °C): set severity = MAJOR and flag a critical error.

  3. Low limit (critical)

  4. If any cell temperature (fast filtered) < T_{crit,min} (0 °C): set severity = MAJOR and flag a critical error.

  5. Almost-limit (warning)

  6. If any cell temperature > T_{crit,max} - 2 °C (43 °C) or < T_{crit,min} + 2 °C (2 °C) it is treated as an "almost" condition and latched with debounce. Almost-latched temperatures contribute to MINOR severity.

Pack Current

  1. Overcurrent (critical/present detection)
  2. If |I_pack| > I_crit (550 A) the overcurrent condition is detected and latched (debounced).
  3. Overcurrent latched contributes to MINOR severity as a persistent minor condition.

  4. Almost-limit (warning)

  5. If |I_pack| > I_crit_almost (500 A) the overcurrent-almost condition is latched and contributes to MINOR severity.

  6. I_lim_chg / I_lim_dch

  7. The dedicated charge/discharge current limits (I_lim_chg, I_lim_dch) remain test/config parameters (TBD). Their crossing should be treated similarly to overcurrent (latched, debounced) and may generate mild errors depending on configuration.

Cell Imbalance

  • Cell imbalance is computed as (max_cell_voltage - min_cell_voltage) across all cells each cycle.
  • If imbalance > 0.050 V it is treated as a latched fault (debounced) and considered a persistent minor condition.
  • If imbalance > 0.040 V it is treated as an "almost" condition and contributes to MINOR severity while latched.

Debounce and Fault Clearing

  • Per-fault clear debounce: a latched fault is only cleared after FAULT_CLEAR_DEBOUNCE_CYCLES (5) consecutive cycles without the violation. This prevents immediate re-clearing from transient noise.
  • Almost-limit conditions use separate latch/clear counters but the same clear-debounce rule.

Severity Logic and Actions

  • Immediate MAJOR: If any critical condition is present (over-voltage, under-voltage, over-temperature, under-temperature) the BMS sets ERROR_SEVERITY_MAJOR, requests immediate contactor opening and raises a critical error flag. The minor-escalation counter is reset.
  • MINOR: If any almost-latched condition is present, or if a persistent minor fault exists (latched overcurrent or latched cell imbalance), the BMS sets ERROR_SEVERITY_MINOR and raises a mild error flag.
  • Minor -> Major escalation: A MINOR condition increments a minor-error delay counter each cycle; when the counter reaches MINOR_ERROR_DELAY_CYCLES (50 cycles) the severity is escalated to MAJOR and the counter resets.
  • NONE: If no latched or present conditions exist the BMS sets ERROR_SEVERITY_NONE and clears the minor counter.

Note: The C implementation sets severity flags (bmslv_LimitViolationErrorSeverity_Val) and latched fault booleans; contactor open/close actions and higher-level responses are handled elsewhere in the SW.


Testing Procedure

Note: Testing should be done with fake limits to avoid damaging cells.

Voltage Limits

  • High Limit Test
  • Set cell voltage to ~3–3.2 V
  • Set V_crit_max to 3.5 V
  • Slowly charge the cell until it reaches 3.5 V (current < 10 A)

  • Low Limit Test

  • Set cell voltage to ~3–3.2 V
  • Slowly discharge the cell until it crosses 2.9 V (current < 10 A)

Current Limits

  • Charge Limits
  • Adjust T_crit_min and T_crit_max close to actual cell temperature

  • Discharge Limits

  • Observe: Contactors open immediately upon crossing limits

Cell Limit Violation SWCVoltage Monitor(All Cells)Temperature Monitor(All Sensors)Current Monitor(|Ipack|)Cell Imbalance(Vmax - Vmin)Almost LimitDetectionFault Latching+ DebounceSeverity DecisionLogicBMS Measurement LayerBMS State Manager/ Protection Layer Severity Levels NONE MINOR- Almost limits- Overcurrent- Cell imbalance MAJOR- Overvoltage- Undervoltage- Overtemperature- Undertemperature- Minor fault persisted > configured delay  Fault handling behavior • Faults are latched when detected• Faults clear only after5 stable cycles without violation• Minor faults escalate to MAJORafter 50 cycles (configurable) Cell VoltagesCell TemperaturesPack CurrentVmax, VminLimitViolationErrorSeverityFault Flags
Cell Limit Violation SWCVoltage Monitor(All Cells)Temperature Monitor(All Sensors)Current Monitor(|Ipack|)Cell Imbalance(Vmax - Vmin)Almost LimitDetectionFault Latching+ DebounceSeverity DecisionLogicBMS Measurement LayerBMS State Manager/ Protection Layer Severity Levels NONE MINOR- Almost limits- Overcurrent- Cell imbalance MAJOR- Overvoltage- Undervoltage- Overtemperature- Undertemperature- Minor fault persisted > configured delay  Fault handling behavior • Faults are latched when detected• Faults clear only after5 stable cycles without violation• Minor faults escalate to MAJORafter 50 cycles (configurable) Cell VoltagesCell TemperaturesPack CurrentVmax, VminLimitViolationErrorSeverityFault Flags