## 2 Literature Review and Methodology
### Simulation and Practical BMS Model Implementation
The cooling system uses the temperature sensor's measurements to track the battery temperature in comparison to the assigned safe operating temperature limit, which is 299 Kelvin; when the battery exceeds this limit, the switch automatically turns on the pump which increases the amount of thermal liquid being pumped in the cooling plate, this leads to more heat being extracted and transferred from the battery through the thermal liquid circulation inside the cooling plate that channels near the battery cell, which drops the battery temperature into a safe temperature range below 299 K. Conversion from Kelvin to Celsius was also performed, which displays temperature in range from 25 to 36 \({}^{\circ}\)C. To alert the end-user when the battery is overheating, two LEDs connected to the Arduino board with a switch are used. The switch is assigned a temperature threshold; when this limit is exceeded, a signal of \"1\", which is read as \"high\", is sent to the Arduino board's output digital pin 8 which then turns on the red LED connected to it and an inverter (NOT logic gate) is used to convert the \"1\" signal to \"0\". This turns off the green LED which is connected to the Arduino's output digital pin 7. This process happens vice-versa when the temperature drops below the assigned threshold. For establishing the connection and interface between the Simulink model and the Arduino board, Simulink's hardware support library is used. To transmit data to the IoT \"ThingSpeak\" platform, the Simulink model uses the in-built ThingSpeak connecting function block and the device's Wi-Fi module to connect to the IoT cloud. The ThingSpeak function block uses the ID details of the created user interface on the ThingSpeak platform such as its channel ID \"248378\", which is unique to each created channel, the API key, which is the writing key needed to access and write in this channel, and the field number, which informs in which block or display the channel needs to be written in. A user interface was also created in the Simulink model shown in Figure 5b to allow the end-user to interact and manage the BMS in the Simulink software. It consists of displays that show the measured and estimated battery parameters in LCD and gauge display formats; it also has a manual button for turning on the cooling system [20, 21]. Figure 6 demonstrates the setup used to implement and verify the SOC and SOH estimation algorithms in the BMS by having the BMS's Simulink simulation program running in one computer on the left side and having the IoT platform user interface running on the second computer on the right side. It also shows the interface occurring between the Simulink program and the hardware \"Arduino Uno board\" that is connected to two LEDs on the left side, which shows the green LED being turned on, hence informing the end-user that the battery is operating under normal and in the safe temperature range. The IoT platform displays the up-to-date updates of the new measured and estimated \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Current & 15 Amps \\ Temperature & 295 to 336 K \\ Initial SOC of battery & 30\% \\ Initial SOC given to SOC estimator & 35\% \\ Initial R0 of battery and given to SOC estimator & 0.0008 ohms \\ Sensor Noise & Random white noise \\ Battery Cycle Time & 1 complete charging and discharging cycle \\ Number of Completed Battery Cycles & 5 cycles completed in 10 h \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Initial parameter setting table of the battery and BMS. parameters of the battery at regular intervals of 15 s from the Simulink program to the IoT in the form of plot graphs, numerical displays, and gauge displays for the end-user on their computer in a user-friendly manner.