Protection and limitation
There are two ways how the BMS can protect the battery:
- Turn off the BMS ports
- Limitation - send a CAN message and ask the connected device to reduce the current
Limitation
The limitation concept is, that the connected device is listening to the BMS and reducing the current if the BMS asks for it. If the device listens to the BMS, the BMS is not forced to turn off the ports. This results in a better user experience, because the user can still use the device, but with reduced power.
The BMS can send a CAN message with a limitation request. This message is implemented on the application level - the BMS must send the message and the controller must react to it, otherwise, the BMS will turn off the ports and the limitation concept will not work.
| Variable | Description |
|---|---|
/driver/totalLimitPos | Available relative current in positive direction |
/driver/totalLimitNeg | Available relative current in negative direction |
Both variables have a range from 0 - 1. If the value is 0, it means, that there is 0 current available. If the value is 1, it means, that the full current is available.
How the limiter works
Every limiter has a threshold (max or min), a margin and a slope (dec) parameter:
- While the measured value is further than
margin + decfrom the threshold, no limitation is applied (limit = 1). - When the value enters the
deczone, the limit decreases linearly from 1 to 0. - When the value crosses into the
marginzone (closer thanmarginto the threshold), the limit is 0 - no current is available in the affected direction. - When the value reaches the threshold itself, the BMS enters the PROTECT state and turns the ports OFF.
If more limiters are active at the same time, the lowest (most restrictive) value wins.
Limit word
If there is any limitation active, the BMS will indicate what is causing the limitation with state /driver/limit. Use the wtf command to see the reason for the limitation and check "Limiter state" section. More about diagnostic
limit is a bitwise state - multiple bits can be active at the same time.
limit bit | Reason | Condition to enter | Limits |
|---|---|---|---|
| 1 | BMS temperature too high | An internal BMS sensor (mcu, balmcu, ptcBal, switchptc) got closer than marginMax + decMax to its max threshold. See temperature limitation. | Both directions |
| 2 | Battery temperature too low | A battery TS input reading got closer than marginMin + decMin to its min threshold. See temperature limitation. | Discharge |
| 4 | Battery temperature too high | A battery TS input reading got closer than marginMax + decMax to its max threshold. See temperature limitation. | Discharge |
| 16 | Cell voltage too low | The lowest cell voltage cellMin got closer than cellMinMargin + cellMinDec to the cellMinVoltage threshold. See cell voltage limitation. | Discharge |
| 32 | Cell voltage too high | The highest cell voltage cellMax got closer than cellMaxMargin + cellMaxDec to the cellMaxVoltage threshold. See cell voltage limitation. | Charge/regen |
| 64 | Pack discharge current too high | The filtered pack current currentf got closer than iPosDec to the iPos threshold (see pack current limiter). | Discharge |
| 128 | Pack charge current too high | The filtered pack current currentf got closer than iNegDec to the iNeg threshold (see pack current limiter). | Charge/regen |
| 256 | DSC port current limiter | The DSC port current got close to the idscPos/idscNeg thresholds. See DSC port limiter. (BMS1 only) | Both directions |
| 512 | CHG port current limiter | The CHG port current got close to the ichgPos/ichgNeg thresholds. See CHG port limiter. (BMS1 only) | Both directions |
| 1024 | Battery too cold for charging | A battery TS input reading got closer than marginMinChg + decMinChg to its minChg threshold. See charging temperature limits. | Charge/regen |
| 2048 | Battery too hot for charging | A battery TS input reading got closer than marginMaxChg + decMaxChg to its maxChg threshold. See charging temperature limits. | Charge/regen |
| 32768 | State machine | The current state does not allow the current direction. E.g. in PROTECT/STANDBY both directions are forced to 0, in UNDERVOLTAGE and CHARGING discharge is forced to 0, in OVERVOLTAGE and CHG_OVERTEMP charge is forced to 0. | State dependent |
Pack current limiter configuration
Pack current limiter parameters are located in folder /driver/limiter/.
The pack-level current limiter sets the absolute overcurrent thresholds for the entire battery pack. The filtered pack current currentf is compared against the thresholds. The margin of the pack current limiter is fixed to zero - when the threshold itself is reached, the BMS enters the PROTECT state and turns the ports OFF.
| Parameter | Unit | Description |
|---|---|---|
iPos | A | Pack discharge overcurrent threshold |
iPosDec | delta A | Pack discharge current limit slope |
iNegDec | delta A | Pack charge current limit slope |
iNeg | A | Pack charge overcurrent threshold |
On BMS3, the hard overcurrent disconnect is performed by the balancer IC and is configured separately with the /driver/ocd_treshold and /driver/ocd_delay parameters (logged as "Current overload on DSC", value 0x0040 in protectLog). The short circuit disconnect is configured with /driver/idscShort and /driver/idscDelay (logged as "Shortcut", value 0x0002). See DSC port.
In addition to the pack-level limiter, each port has its own independent current limiter. See CHG port limiter and DSC port limiter for details.
Protection - turn off the BMS ports
Turning the ports off is always the last resort. If the BMS turns off the ports, the user must turn them back on. The BMS will not turn the ports back on automatically.
If the ports are turned off due to the protection of the battery and BMS, the BMS will enter PROTECT state and log the exact reason into the protectLog permanent. Use the wtf command to see the reason for the protection. More about diagnostic