State Machine
This section provides information on the BMS State Machine. The BMS State Machine is responsible for engaging and disengaging the battery contactors (main and charge outputs). The BMS State Machine continuously monitors the status all of sensors and external devices to ensure the battery stays within it's safe area of operation.
System Wide State Diagram
State Descriptions
Non-Charging States
State | Description | Transitions | Requirements |
---|---|---|---|
INITIALISE | Immediately enters this state on startup | INIT → CALIBRATE | Cell count correct, thermistor count correct, external CAN enabled, BJU present & internal self-testing passed |
CALIBRATE | Performs self-calibration and starts self-tests | CALIBRATE → SAFE | On completion of calibration steps |
IDLE | System is healthy and is ready to be enabled. Continuously monitoring the system and battery health. | IDLE → DISCONNECT | On any fault |
IDLE → CONNECT | BMS command is CONNECT | ||
IDLE → CHARGE_INIT | BMS command is CHARGE_CONNECT | ||
CONNECT | A request has been made to connect the load to the battery. The negative contactor to the load has been closed to enable load voltage checks and connection parameters are established | CONNECT → DISCONNECT | On any fault |
CONNECT → PRECHARGE | BMS command is ENABLE and precharge context is established | ||
CONNECT → IDLE | BMS command is not CONNECT or ENABLE | ||
PRECHARGE | Engages the precharge contactor and waits for the load voltage to reach the battery voltage, monitors for precharge faults | PRECHARGE → DISCONNECT | On any fault |
PRECHARGE → ENABLED | BMS command is ENABLE and precharge conditions are met | ||
PRECHARGE → IDLE | BMS command is not ENABLE | ||
ENABLED | Enabled state. Contactors to the load are now closed following a successful PRECHARGE state. This state will persist until commanded otherwise, or a safety fault occurs | ENABLED → DISCONNECT | On any fault |
ENABLED → IDLE | BMS command is not ENABLE | ||
DISCONNECT | Disconnect allows for the load or charging device to safely reduce current flow prior to opening the contactors. | DISCONNECT → SAFE | Disconnection has completed or timed out (2s) |
SAFE | Ensures the system is in a safe state. It will enter this state if an error has occurred or we have progressed from the CALIBRATE state. Requires a command and no persistent errors to move to IDLE state | SAFE → IDLE | BMS command is IDLE and non-latching faults have cleared |
State | Contactors Engaged | Balancing Enabled |
---|---|---|
INITIALISE | None | No |
CALIBRATE | None | No |
IDLE | None | No |
CONNECT | 1 | No |
PRECHARGE | 1 & 2 | No |
ENABLED | 1 & 3 | Yes |
DISCONNECT | Unchanged | No |
SAFE | None | No |
Charging States
Charge method configuration | State | Description | Transitions | Requirements |
---|---|---|---|---|
EVSE [0x1] | CHARGE_INIT | Initiates the charge session and waits for the ERS to signal it is ready to perform precharge sequences with the EVSE | CHARGE_INIT → IDLE | BMS command is not CHARGE_INIT or CHARGE_ENABLE; ERS system has encountered an error; Timed out waiting for ERS (50s) |
CHARGE_INIT → CHARGE_CONNECT | ERS is ready for precharge; BMS command is CHARGE_ENABLE | |||
CHARGE_INIT → DISCONNECT | On any BMS fault | |||
CHARGE_CONNECT | ERS precharge sequence in progress, with negative contactor enabled. Progression to CHARGE_ENABLED and closing of contactors follows success | CHARGE_CONNECT → IDLE | BMS command is not CHARGE_INIT; Invalid ERS state | |
CHARGE_CONNECT → CHARGE_ENABLED | ERS has completed precharge; BMS command is CHARGE_ENABLE | |||
CHARGE_CONNECT → DISCONNECT | On any BMS fault or ERS emergency stop | |||
CHARGE_ENABLED | ERS charge session persists until the ERS indicates it is stopping or BMS is commanded to stop. | CHARGE_ENABLED → CHARGE_STOPPING | ERS state is requesting open contactors; BMS command is not CHARGE_ENABLE | |
CHARGE_ENABLED → DISCONNECT | On any BMS fault or ERS emergency stop | |||
CHARGE_STOPPING | Opens contactor 5 (HV+). Waits for ERS to progress to FINISHED before progressing to IDLE | CHARGE_STOPPING → IDLE | ERS completes welding detection without error and is finished | |
CHARGE_STOPPING → DISCONNECT | On any BMS fault; Timeout (20s) | |||
OTHER [0x1] | CHARGE_INIT | Transitionary state that moves immediately to charge connect when the BMS command CHARGE_ENABLE is provided. | CHARGE_INIT → IDLE | BMS command is not CHARGE_INIT or ENABLE; Timed out waiting for ERS (50s)*** |
CHARGE_INIT → CHARGE_CONNECT | BMS command is CHARGE_ENABLE | |||
CHARGE_INIT → DISCONNECT | On any BMS fault | |||
CHARGE_CONNECT | Performs the precharge sequence prior to closing contactors and moving to CHARGE_ENABLED | CHARGE_CONNECT → IDLE | BMS command is not CHARGE_INIT; precharge sequence timed out (Nseconds)*** | |
CHARGE_CONNECT → CHARGE_ENABLED | Precharge requirements met; BMS command is CHARGE_ENABLE | |||
CHARGE_CONNECT → DISCONNECT | On any BMS fault | |||
CHARGE_ENABLED | Charge session in progress. Waits for the BMS command to change before finishing the session. | CHARGE_ENABLED → CHARGE_STOPPING | BMS command is not CHARGE_ENABLE*** | |
CHARGE_ENABLED → DISCONNECT | On any BMS fault | |||
CHARGE_STOPPING | Charge session is stopping. Waits for current flow to minimise before opening contactors. | CHARGE_STOPPING → IDLE | Current flow is less than threshold (5A) | |
CHARGE_STOPPING → DISCONNECT | On any BMS fault; Timeout (20s) |
Charge method configuration | State | Contactors Engaged | Balancing Enabled |
---|---|---|---|
EVSE [0x1] | CHARGE_INIT | None | No |
CHARGE_CONNECT | 4 | No | |
CHARGE_ENABLED | 4 & 5 | No | |
CHARGE_STOPPING | 4 | No | |
OTHER [0x1] | CHARGE_INIT | None | No |
CHARGE_CONNECT | 4 | No | |
CHARGE_ENABLED | 4 & 5 | No | |
CHARGE_STOPPING | 4 & 5 | No |