Sizing the Fault Reaction Budget of a CC/CV Charging Loop When the Controller Stops Telling the Truth
The hardest failure in a closed-loop charger is not a dead controller. It is a controller that keeps running while the converter holds on to a stale current command. A silent processor trips the obvious protections. A frozen setpoint behind a healthy-looking heartbeat does not trip them, and that case should set the size of your fault reaction budget.
Where the margin actually lives
In constant voltage the loop holds each cell just below its hard limit, and the voltage headroom between the CV setpoint and that limit is everything you have to spend while a fault is detected and acted on. Slow drift from charge accumulation near the knee is not the binding case, because it plays out over seconds and any working supervisor catches it. The binding case is a runaway. The converter loses its valid setpoint and slews current toward its own limit, so terminal voltage climbs with the current step through the cell's internal resistance. That rise starts as soon as the current does. It is not something that builds up over time. So the model folds resistance and current slew into one quantity, the terminal voltage slew under runaway, and sizes the budget against that slew rather than against state of charge.
One calculation, carried through
Take a CV headroom of about 50 mV per cell (estimate, set by the cell vendor's limit and your sensing accuracy) and a runaway terminal slew of about 1 mV/ms per cell (estimate, from converter current slew times cell DC resistance at the coldest temperature you charge at, because resistance is worst there). Their ratio gives a raw budget of roughly 50 ms (estimate) from the moment the setpoint goes bad to the moment current is gone. Both inputs carry error bars of roughly a factor of two: resistance rises with ageing and cold, and the slew depends on how the converter's current loop saturates, which bench tests rarely reproduce. Since the two errors can stack the same way, halve the raw figure, which leaves a design budget of about 25 ms (estimate) that has to cover detection, the decision, and the physical disable together. Detection gets the smallest share of that budget, because actuation through a converter shutdown path or a pilot state change has fixed latency that firmware cannot shrink.
Keeping a second path honest
Conductive charging interface standards such as IEC 61851 and SAE J1772 give the vehicle a channel that does not depend on the main controller: opening the vehicle-side pilot switch drops the line from State C to State B, and the supply equipment must stop delivering current when it sees that, whatever the vehicle's software is doing. That gives you the shutdown path that has to survive the fault. Drive it from an independent cell voltage comparator in the battery monitoring hardware, not from the same processor that computes the CC/CV setpoint, so a hung control task cannot block its own shutdown. The supply side's response latency to the pilot transition is outside your control and must be booked against the budget as a fixed cost. If that cost alone eats most of the 25 ms estimate, the pilot path should be your backstop, and the primary disable has to be a local converter inhibit that can act faster.
The watchdog that lies
Feed the watchdog only at the end of a control cycle that has confirmed fresh sensor timestamps and a setpoint inside the expected envelope, never from a timer interrupt or a scheduler tick, because a watchdog fed by a timer interrupt still gets fed while the control task is frozen, which is exactly the failure this budget is sized for.
Technical FAQ: Why not simply tighten the CV setpoint to buy more headroom instead of chasing a faster reaction path?
Every millivolt taken from the setpoint costs usable capacity on every charge, while a faster disable path is a one-time hardware cost. Tightening the setpoint is the right call only when the remaining latency comes from the supply equipment's pilot response, which you cannot design away. In that case, trading a little capacity for headroom is the only lever you have left.