Artificial Intelligence-Based Battery Management Systems For Li-Ion Batteries
Artificial Intelligence-Based Battery Management Systems For Li-Ion Batteries
Li-ion batteries are highly advanced as compared to any other commercially available rechargeable batteries due to their
gravimetric and volumetric energy. With the rise of the electric vehicle market, battery management systems play a key
role in the industry to deliver finer performance and support longer ranges. Battery packs need to be monitored in real-
time to maintain the safety, efficiency and reliability of the overall system. The crucial parameters that need to be
determined for efficient and safe working include State-Of-Charge. This is achieved by monitoring the current, voltage,
temperature, etc. which are then processed using various algorithms. The SoC of the battery pack is determined using
Original Article
ANN/AI-ML based control system based on the dataset collected/simulated for the individual Li-ion cells. To ensure
voltage/SoC remains the same for the multiple cells in the battery pack, a single inductor method of cell balancing is
used. This paper focuses on the hardware aspects as well as the software aspects of the battery management system with a
short analysis of basic requirements and topologies. Implementation and development aspects are also elaborated
KEYWORDS: Li-ion, Battery Management System, State of Charge, Safe Operating Area, Battery Monitoring, Cell
Balancing, ANN/AI-M
Received: Oct 22, 2021; Accepted: Nov 12, 2021; Published: Nov 30, 2021; Paper Id.: IJEEERDEC20213
1. INTRODUCTION
With the increasing environmental concern over the usage of petroleum-based energy, electrical energy is the main
focus across the globe as it is a cleaner form of energy. Hence, the industry has gradually started moving towards
cleaner energy-driven applications such as electric vehicles, smartphones, laptops, etc.
An electric vehicle runs on the electric power delivered by a battery pack. Electric vehicles come with
large battery packs, owing it's relatively poor energy density. There are various types of batteries that can be used
for this purpose like lead-acid, Li-ion, NiMH, etc. Among the existing batteries, Li-ion batteries are the most
efficient and are competitive enough to make electric vehicles feasible.
But with the Li-ion batteries being volatile and hazardous, comes another problem: Battery Management.
A battery management system (BMS) for Li-ion batteries is an electronic system that manages a
rechargeable battery system that is highly sensitive and has the potential to explode if incorrectly designed.
Battery management is essential as it helps to protect the connected load from improper operations such as
over-current, under-voltage, over-voltage, etc. It is also essential to monitor the thermal aspects of the cells.
www.tjprc.org [email protected]
24 Rachit Raj, Parth, Tushar Kashikar, Abhishek A & Kiran R
BMS includes battery behaviour analysis, battery state monitoring that includes SoC, real-time controller design.
A well-designed BMS protects batteries against damage, limits temperature variations, as well as the efficiency of energy
conversion, is improved.
There are different types of architectures available to design for the Battery Management System such as – Centralized
architecture, Modular architecture and Distributed architecture.[1]
The centralized architecture consists of one master controller which is very much responsible for all functions.
Not only does it monitor various parameters of the cell, but also controls the battery safety operation and provides cell
balancing capabilities. Various other attributes like thermal control and functions which estimate values of SoC are also
taken care of. The only drawback of this assembly is that it gets complex as the capacity of the battery increases. [2]
The complexity of this assembly can be solved by employing distributed architecture or modular architecture with
a large number of cells in a battery pack. [1]
Safe Operating Area, abbreviated as SOA, ensures that the voltage, current and temperature of the battery fall
under the permissible limits. If any of the cells of the battery pack exceed the optimal temperature value then it is labelled
as over-temperature and if it goes below the optimal value then it is labelled as under temperature. Similarly, if the voltage
of any cell exceeds the pre-defined maximum value then it is labelled as over-voltage and if it goes below the pre-defined
minimum value then it is labelled as under-voltage. Now, in order to avoid these conditions, BMS comes into the picture. It
monitors each Li-ion cell in the system and acts as an interface between input and output. Fig. 1 shows the SOA
characteristics of a Li-ion cell. [4-5]
B. State of Charge
State of Charge (SoC) is defined as the available capacity of the battery in Ah and it is expressed as a percentage at the
rated capacity of the battery.[6]
C. Cell Balancing
Balancing each cell in a battery pack is essential as it increases the shelf life by maintaining the cell voltages and SoC
during battery operation. Cell balancing is needed because not all cells remain equal in terms of cell potential and SoC as a
system and environmental conditions vary over a period of time. Cell balancing reduces exposure to stresses due to cell
over-voltage, under-voltage, enables greater energy to be used from the total pack, reduces hazard, improves safety and
extends battery life. It also helps in determining the overall health of the battery pack. [6-7]
3. DESIGN
Architecture
Figure 2 shows the architecture of the design of the Battery Management System. It follows the centralized
architecture. Centralized architecture is beneficial when there is a lesser number of cells in a battery pack as it reduces the
size and cost of building the BMS.
In this design, two development boards are connected together and function as one. Hence, the working of the
master controller can be explained as two functions. One part of the development board controls the physical circuit
connections such as monitoring the sensors and collection of real-time data of cell parameters such as voltage, current,
temperature; state of current flow, cell balancing, fault detection and protection, etc. the function of the second
development board involves the calculation of SoC, storing the real-time collected data and pushing it to a cloud-based
server.
To collect the real-time data, accurate sensors are placed near the cells of the battery pack. Based on the sensed
values, the fault protection works by keeping a check on the conditions, ensuring that SOA is maintained. Relay is used to
isolate the battery pack from the load/charge if any of the SOA parameters and load current parameters are violated.
Multiplexers are a way to collect many data of different cells of the same parameter which reduces the number of I/O pins
required on the development board, thereby saving cost and space.
Cell Balancing
As mentioned earlier, cell balancing is a prime requirement for any Li-ion battery pack. As each cell in the battery pack
goes through a cycle of charging and discharging, the probability of the cells having different rates at which it charges and
discharges from one another increases. If there is a mismatch between the SoC/potential of each cell, the efficiency of the
battery pack may reduce.[6]
www.tjprc.org [email protected]
26 Rachit Raj, Parth, Tushar Kashikar, Abhishek A & Kiran R
Consider three cells are connected in series and are discharging, if one of the cells reach the lower threshold
voltage limit while others have not, then the relay has no other option but to trip the circuit. If the circuit is not tripped,
then the cell that hit the lower threshold limit will become unstable and might end its operable life (as we know that once a
Li-ion cell completely discharges, it can never function again). The power left in the other two cells are unused and reduces
the overall efficiency of the battery pack. The same is true in the case of charging. If one of the cells hit the upper limit and
relay has to be operated again to stop the charging process. This means that the other two cells cannot be charged to their
full potential. Therefore, the power available for discharging is less than the designed capacity. These problems are solved
by using cell-balancing methods. Cell balancing can be done by the active or passive method. The active method is highly
efficient and faster. Among them, the single inductor method has better efficiency than others. Cells connected in parallel
are known to self-balance owing to the electrical properties of voltage sources in parallel connection. [8]
The cell balancing circuit is illustrated in fig. 3. Active cell balancing is achieved here using the single inductor
method. Switching is performed using the power MOSFETs which are series-connected with diodes to prevent short-
circuit. The inductor is responsible for the transfer of energy between the cells. The working principle involves the
following procedure:
Discharge the inductor into the cell with the lowest voltage/SoC.
The above can be achieved by creating an intelligent control mechanism using PWM. The MOSFETs responsible
for charging the inductor are activated by PWM whereas, the MOSFETs responsible for charging the cell with the lowest
potential/SoC are kept on till the cell is no longer the one at the lowest potential. The process repeats again from step 1
until all the cells are balanced. [9]
Upon operation, the results achieved in different modes are shown in fig. 3(a), fig. 3(b) and fig. 3(c).
Static Mode
When the battery is not connected to any load or charging source, it is said to be in static mode. In this mode, the
convergence of SoC is noted to be quick and efficient.
Charging Mode
The battery is connected to a 12.6V DC source supplying current to charge the battery pack. It is observed that the SoC
steadily converges.
Discharging Mode
The battery pack discharges at about 0.6A DC current through a resistive load. The observed graph confirms that the cell
balances steadily during discharging operation as well.
www.tjprc.org [email protected]
28 Rachit Raj, Parth, Tushar Kashikar, Abhishek A & Kiran R
Figure 3(b)(ii): Current through the Inductor(iL) when Balancing in Charging Mode.
Figure 3(c)(ii): Current through the Inductor(iL) when Balancing in Discharging Mode.
www.tjprc.org [email protected]
30 Rachit Raj, Parth, Tushar Kashikar, Abhishek A & Kiran R
SoC Estimation
SoC is one of the important parameters that help in evaluating the battery operation time for a load. In electric vehicles
application, the range can be estimated based on SoC. Moreover, the life expectancy of the battery can be improved if the
SoC of all the cells are within a particular range. Thus, SoC estimation is a meticulous process that ensures the safe
operation of the cells. But SoC estimation is complicated due to complex chemical reactions and non-linear characteristics
of the battery. Furthermore, SoC cannot be measured directly and it has to be calculated through a rigorous process. [10]
Numerous algorithms exist to estimate the SoC of each cell such as Coulomb Counting, Open Circuit Voltage
(OCV), Kalman Filter, Neural Network, Fuzzy Logic, Hybrid Methods, etc. Machine Learning based Artificial Neural
Networks (ANN) method has a reliable accuracy in estimating the SoC of each cell. But to estimate the SoC of each cell, a
large number of data is required to be trained, validated and tested. [10]
Generation of Data
Various 18650 cells data was collected based on the testing of Li-ion cells by various manufacturers such as LG,
Panasonic, etc. to understand the variation of SoC with respect to voltage and temperature. An algorithm was designed to
simulate the data of BAK H18650CQ cell (physical data collection was avoided due to covid-19).
Where,
I = Current Discharging
t = Discharging Time
From figurer 4(a), the algorithm selected for the neural network is the backpropagation algorithm. The data is divided into
test data, training data and validation data. After training the data through a number of epochs and until good accuracy is
obtained or MAPE is minimized, the neural network is ready and the new data is predicted which predicts the accurate SoC
for each cell in a battery pack.
The Back Propagation Algorithm is written using TensorFlow and Keras. The Sequential model is designed using
3 input neurons each for voltage, current and temperature. Two hidden layers consisting of 200 neurons each with a ReLU
activation function (Rectified Linear Unit) are designed. The data pass-through input and hidden layers to the output layer
consisting of a single neuron. The output layer is activated using the Sigmoid activation function.
Sigmoid function is used to keep the SoC output between 0 and 1. ReLU function is used to prevent the vanishing
of gradient in the neural networks.
www.tjprc.org [email protected]
32 Rachit Raj, Parth, Tushar Kashikar, Abhishek A & Kiran R
Adam optimizer is used by the Sequential Keras model to train the neurons with Mean Square Error (MSE) loss
function and Mean Absolute Percentage Error (MAPE) metrics function with a learning rate of 0.0001, β1 = 0.9, β2 = 0.999
and amsgrad optimization set to False.
From fig. 4(c), MAPE obtained was 0.4709% upon completion of training. This signifies that the SoC value
predicted by the neural network is fairly accurate. Therefore, the accuracy can be determined as (100-MAPE) %.
Accuracy = 99.4055%
The loss can be observed to be in the order of 10-5. When converting SoC to percentage, this error will be present
in the fourth decimal place. Therefore, it can be concluded that negligible inaccuracies are present in the predicted
SoC value.
INTERFACING
As observed and discussed in the architecture, the sensor data is first procured by Arduino's microcontroller. However, it is
essential to communicate this data to the raspberry pi to perform functions such as SoC calculation using the neural
network, and also further communication to the cloud.
A handshaking algorithm is designed to achieve this communication. The Arduino initially waits for a signal from
the raspberry pi to start its processes. Upon receiving this signal, Arduino proceeds into its algorithms. As data is sensed by
the Arduino, it then sends a communication code to Raspberry pi. This communication code lets the raspberry pi know
what kind of data is going to be received, and it acknowledges the communication code by sending a signal. Now, as
individual data is sent by Arduino, it is received by raspberry pi and then acknowledged. The last instance of data of a
particular Arduino function is not acknowledged and the Arduino proceeds to send the next communication code.
All this is made possible using serial communication via a USB A to USB B cable. The optimal baud rate used is
'19200'.
Initial state: The Arduino waits for a signal to begin operation from raspberry pi.
Step 1:
Step 2:
Step 3:
Step 4:
www.tjprc.org [email protected]
34 Rachit Raj, Parth, Tushar Kashikar, Abhishek A & Kiran R
After step 4, go back to step 3 for the next piece of data. Step 3 and step 4 are therefore repeated until a certain
type of data (say various voltages) have been received by the Raspberry Pi.
For the next type of data (say various currents of every cell), we go back to step 2.
This process occurs in every iteration of the monitoring system to ensure a safe working and allow other features
to function appropriately.
Cloud Connectivity
The data received by the Raspberry Pi undergoes its processing and is ready to be sent to the cloud. A time-series database
is used to make this happen. Influx DB receives this data and stores it for a limited number of days. This means that Wi-Fi
connectivity is a necessary requirement for the optimal utilisation of the cloud dashboard feature.
Dashboard
A Grafana dashboard is designed upon the data received in the cloud. (Appendix A) This dashboard displays various
aspects of the battery pack such as voltage, current, temperatures, SoC, the error encountered by the BMS, charging status,
and some relevant data is graphed.
The presence of error detection allows the user to take corrective measures quickly. This design also enables
remote monitoring of the battery.
4. CONCLUSION
The objective of this paper is to develop a model for the Battery Management System of Li-ion cells by actively
monitoring the critical primary parameters: voltage, current, temperature and SoC. Using ANN/AI-ML for estimation of
SoC reduces the errors drastically. Through this paper, the cell balancing method, SoC estimation are analysed in detail
and they not only optimise the life of the battery pack but also reduce the overall processing time. A reduction in cost for
producing this design is a bonus. This battery management system can be applied universally such as applications ranging
from smartphones and other gadgets to the electric automobile.
ABBREVIATIONS:
Ah Ampere-hours
AI Artificial Intelligence
Li-ion Lithium-ion
ML Machine Learning
NN Neural Network
REFERENCES
1. PratinavKashyap, Manish Kumar Dwivedi, R Jayapragash, VIT, Chennai - ”Lithium ion battery monitoring and protection
system”, 2020
2. MugilanAravazhi, Girish Gangadharaiah, Ather Energy, Bengaluru - “A Battery pack Management System”, 2018
3. KartikShanbhag - "How to best select Battery Management Systems (BMS) for High Voltage Li-Ion Batteries", 2019
5. Languang Lu, Xuebing Han, Li Jianqiu, Jianfeng Hua, Tsinghua University, Beijing, China - “A review on the key issues for
lithium-ion battery management in electric vehicles”, 2013
8. Hemavathi S, CSIR-Central Electrochemical Research Institute, Chennai - “Overview of cell balancing methods for Li-ion
battery technology”, 2020
9. Vardhan, Rigvendra Kumar, T Selvathai, Rajaseeli Reginald, P Sivakumar, and S. Sundaresh - "ModelingOf Single Inductor
Based Battery Balancing Circuit For Hybrid Electric Vehicles", 2017
10. Manjot S. Sidhu, Deepak Ronanki, Sheldon Williamson – “State of Charge Estimation of Lithium-ion Batteries using Hybrid
Machine Learning Technique”, 2019
11. Xia, Bizhong, Sa Wang, Yong Tian, Wei Sun, Zhihui Xu, and Weiwei Zheng - "Experimental Research On The Linixcoymnzo2
Lithium-Ion Battery Characteristics For Model Modification Of SOC Estimation", 2014
12. Ali, R. Ben, et al. "Energy management of a small-scale wind turbine system combined with battery storage
system." International Journal of Mechanical and Production Engineering Research and Development 8.3 (2018): 1167-1178.
13. Agrawal, M. E. E. N. A., and A. R. V. I. N. D. Mittal. "Deployment of microgrids in the developed countries: an
appraisal." International Journal of Electrical and Electronics Engineering Research (IJEEER) 4.3 (2014): 23-34.
14. Agrawal, M. E. E. N. A., and A. R. V. I. N. D. Mittal. "Deployment of microgrids in the developed countries: an
appraisal." International Journal of Electrical and Electronics Engineering Research (IJEEER) 4.3 (2014): 23-34.
15. Gaikwad, Nikita, Yogita Mistry, and Kiran Inamdar. "Design and Implementation of Energy Efficient Environment Monitoring
www.tjprc.org [email protected]
36 Rachit Raj, Parth, Tushar Kashikar, Abhishek A & Kiran R
System." International Journal of Electronics, Communication & Instrumentation Engineering Research and Development
(IJECIERD) ISSN (P) (2016).
Appendix A