# Battery management system

A battery management system (BMS) is any electronic system that manages a rechargeable battery (cell or battery pack) by facilitating the safe usage and a long life of the battery in practical scenarios while monitoring and estimating its various states (such as state of health and state of charge), calculating secondary data, reporting that data, controlling its environment, authenticating or balancing it.
Protection circuit module (PCM) is a simpler alternative to BMS.
A battery pack built together with a BMS with an external communication data bus is a smart battery pack. A smart battery pack must be charged by a smart battery charger.

## Functions
### Monitor

A BMS may monitor the state of the battery as represented by various items, such as:
* Voltage: total voltage, voltages of individual cells, or voltage of periodic taps
* Temperature: average temperature, coolant intake temperature, coolant output temperature, or temperatures of individual cells
* Coolant flow: for liquid cooled batteries
* Current: current in or out of the battery
* Health of individual cells
* State of balance of cells

### Electric vehicle systems: energy recovery

* The BMS will also control the recharging of the battery by redirecting the recovered energy (i.e., from regenerative braking) back into the battery pack (typically composed of a number of battery modules, each composed of a number of cells).
Battery thermal management systems can be either passive or active, and the cooling medium can either be air, liquid, or some form of phase change. Air cooling is advantageous in its simplicity. Such systems can be passive, relying only on the convection of the surrounding air, or active, using fans for airflow. Commercially, the Honda Insight and Toyota Prius both use active air cooling of their battery systems. The major disadvantage of air cooling is its inefficiency. Large amounts of power must be used to operate the cooling mechanism, far more than active liquid cooling. The additional components of the cooling mechanism also add weight to the BMS, reducing the efficiency of batteries used for transportation.
Liquid cooling has a higher natural cooling potential than air cooling as liquid coolants tend to have higher thermal conductivities than air. The batteries can either be directly submerged in the coolant or the coolant can flow through the BMS without directly contacting the battery. Indirect cooling has the potential to create large thermal gradients across the BMS due to the increased length of the cooling channels. This can be reduced by pumping the coolant faster through the system, creating a tradeoff between pumping speed and thermal consistency.

### Computation

Additionally, a BMS may calculate values based on the items listed below, such as:
* Voltage: minimum and maximum cell voltage
* State of charge (SoC) or depth of discharge (DoD), to indicate the charge level of the battery
* State of health (SoH), is a variously defined measurement of the remaining capacity of the battery as a fraction of the original capacity
* State of power (SoP), is the amount of power available for a defined time interval given the current power usage, temperature and other conditions
* State of Safety (SOS)
* Maximum charge current as a charge current limit(CCL)
* Maximum discharge current as a discharge current limit (DCL)
* Energy delivered since last charge or charge cycle
* Internal impedance of a cell (to determine open circuit voltage)
* Charge delivered or stored (sometimes this feature is called coulomb counting)
* Total operating time since first use
* Total number of cycles
* Temperature monitoring
* Coolant flow for air or liquid cooled batteries

### Communication

The central controller of a BMS communicates internally with its hardware operating at a cell level, or externally with high level hardware such as laptops or an HMI.
High level external communication is simple and uses several methods:
* Different types of serial communications.
* CAN bus communications, are commonly used in automotive environments.
* Different types of wireless communications.
Low-voltage centralized BMSes mostly do not have any internal communications.
Distributed or modular BMSes must use some low-level internal cell–controller (modular architecture) or controller–controller (distributed architecture) communication. These types of communications are difficult, especially for high-voltage systems. The problem is the voltage shift between cells.The first cell ground signal may be hundreds of volts higher than the other cell ground signal. Apart from software protocols, there are two known ways of hardware communication for voltage shifting systems, optical-isolator and wireless communication. Another restriction for internal communications is the maximum number of cells. For modular architecture, most hardware is limited to a maximum of 255 nodes. For high-voltage systems the seeking time of all cells is another restriction, limiting minimum bus speeds and losing some hardware options. The cost of modular systems is important, because it may be comparable to the cell price. Combination of hardware and software restrictions results in a few options for internal communication:
* Isolated serial communications
* Wireless serial communications
To bypass power limitations of existing USB cables due to heat from electric current, communication protocols implemented in mobile phone chargers for negotiating an elevated voltage have been developed, the most widely used of which are Qualcomm Quick Charge and MediaTek Pump Express. "VOOC" by Oppo (also branded as "Dash Charge" with "OnePlus") increases the current instead of voltage with the aim to reduce heat produced in the device from internally converting an elevated voltage down to the battery's terminal charging voltage, which however makes it incompatible with existing USB cables and relies on special high-current USB cables with accordingly thicker copper wires. More recently, the USB Power Delivery standard aims for a universal negotiation protocol across devices of up to 240 watts.

### Protection

A BMS may protect its battery by preventing it from operating outside its safe operating area, such as:
* Over-charging
* Over-discharging
* Over-current during charging
* Over-current during discharging
* Over-voltage during charging, especially important for lead–acid, Li-ion, and LiFePO4 cells
* Under-voltage during discharging, especially important for Li-ion, and LiFePO4 cells
* Over-temperature
* Under-temperature
* Over-pressure (NiMH batteries)
* Ground fault or leakage current detection (system monitoring that the high voltage battery is electrically disconnected from any conductive object touchable to use like vehicle body)
The BMS may prevent operation outside the battery's safe operating area by:
* Including an internal switch (such as a relay or MOSFET) which is opened if the battery is operated outside its safe operating area
* Asking the devices to reduce or even stop using or charging the battery.
* Actively controlling the environment, such as through heaters, fans, air conditioning or liquid cooling
* Reduce processor speed to reduce heat.

### Battery connection to load circuit

A BMS may also feature a precharge system allowing a safe way to connect the battery to different loads and eliminating the excessive inrush currents to load capacitors.
The connection to loads is normally controlled through electromagnetic relays called contactors. The precharge circuit can be either power resistors connected in series with the loads until the capacitors are charged. Alternatively, a switched mode power supply connected in parallel to loads can be used to charge the voltage of the load circuit up to a level close enough to the battery voltage in to allow closing the contactors between the battery and load circuit. A BMS may have a circuit that can check whether a relay is already closed before recharging (due to welding for example) to prevent inrush currents from occurning.

### Balancing

In order to maximize the battery's capacity, and to prevent localized under-charging or over-charging, the BMS may actively ensure that all the cells that compose the battery are kept at the same voltage or State of Charge, through balancing. The BMS can balance the cells by:
* Dissipating energy from the most charged cells by connecting them to a load (such as through passive regulators)
* Shuffling energy from the most charged cells to the least charged cells (balancers)
* Reducing the charging current to a sufficiently low level that will not damage fully charged cells, while less charged cells may continue to charge (does not apply to Lithium chemistry cells)
Some chargers accomplish the balance by charging each cell independently. This is often performed by the BMS and not the charger (which typically provides only the bulk charge current, and does not interact with the pack at the cell-group level), e.g., e-bike and hoverboard chargers. In this method, the BMS will request a lower charge current (such as EV batteries), or will shut-off the charging input (typical in portable electronics) through the use of transistor circuitry while balancing is in effect (to prevent over-charging cells).

## Topologies

BMS technology varies in complexity and performance:
* Simple passive regulators achieve balancing across batteries or cells by bypassing the charging current when the cell's voltage reaches a certain level. The cell voltage is a poor indicator of the cell's SoC (and for certain lithium chemistries, such as LiFePO $_4$, it is no indicator at all), thus, making cell voltages equal using passive regulators does not balance SoC, which is the goal of a BMS. Therefore, such devices, while certainly beneficial, have severe limitations in their effectiveness.
* Active regulators intelligently turn on and off a load when appropriate, again to achieve balancing. If only the cell voltage is used as a parameter to enable the active regulators, the same constraints noted above for passive regulators apply.
* A complete BMS also reports the state of the battery to a display, and protects the battery.
BMS topologies fall into three categories:
* Centralized: a single controller is connected to the battery cells through a multitude of wires
* Distributed: a BMS board is installed at each cell, with just a single communication cable between the battery and a controller
* Modular: a few controllers, each handling a certain number of cells, with communication between the controllers
Centralized BMSs are the most economical, least expandable, and are plagued by a multitude of wires. Distributed BMSs are the most expensive, simplest to install, and offer the cleanest assembly. Modular BMSes offer a compromise of the features and problems of the other two topologies.
The requirements for a BMS in mobile applications (such as electric vehicles) and stationary applications (like stand-by UPSes in a server room) are quite different, especially from the space and weight constraint requirements, so the hardware and software implementations must be tailored to the specific use. In the case of electric or hybrid vehicles, the BMS is only a subsystem and cannot work as a stand-alone device. It must communicate with at least a charger (or charging infrastructure), a load, thermal management and emergency shutdown subsystems. Therefore, in a good vehicle design the BMS is tightly integrated with those subsystems. Some small mobile applications (such as medical equipment carts, motorized wheelchairs, scooters, and forklifts) often have external charging hardware, however the on board BMS must still have tight design integration with the external charger.
Various battery balancing methods are in use, some of them based on state of charge theory.