# Novel Technique for Estimation of Cell Parameters Using MATLAB/Simulink

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

_{0}, R

_{1}and C

_{1}) model using PowerTrain blockset in MATLAB/Simulink software. To validate the developed model, a NASA dataset was used as the reference dataset. The cell model was tuned against the NASA dataset for different currents in such a way that the error in the terminal voltages (difference in terminal voltage between the dataset and the ECM) is <±0.2 V. The mean error and the standard deviation of the error were 0.0529 and 0.0310 respectively. This process was performed by tuning the cell parameters. It was found that the cell parameters were independent of the nominal capacity of the cell. The cell parameters of Li polymer and the Li ion cells (NASA dataset) were found be almost identical. These parameters showed dependence on SOC and temperature. The major challenge in a battery management system is the parameter estimation and prediction of SOC, this is because the degradation of battery is highly nonlinear in nature. This paper presents the parameter estimation and prediction of state of charge of Li ion batteries by implementing different machine learning techniques. The selection of the best suited algorithm is finalized through the performance indices mainly by evaluating the values of R- Squared. The parameters were trained using various Machine Leaning (ML) techniques for regression data analysis using Simulink. A study on Support Vector Machine (SVM) technique was carried out for the simulated and tuned data. It is concluded that the SVM algorithm was best suited. A detailed analysis on the errors associated with the algorithms was also carried out. Later, these parameters were trained using various Machine Leaning (ML) techniques for regression data analysis using Simulink. A study on SVM technique was carried out for the simulated and tuned data. It is concluded that the SVM algorithm was best suited. A detailed analysis on the errors associated with the algorithms was also carried out.

## 1. Introduction

- (a)
- A Universal cell model consisting of 1-RC pair is modeled using MATLAB/Simulink using the ECM approach.
- (b)
- A new methodology is adopted for better estimation of SOC by tuning the cell parameters.
- (c)
- The obtained cell parameters are independent of the chemistry of the cell. However, dependent on SOC and ambient temperature.
- (d)
- The cell parameters are tuned using trial and error method such that the difference in the voltages is <±0.2 V for accurate estimation of SOC and using this model, any cell model of any chemistry can be tuned against any standard dataset as shown in Figure 1.
- (e)
- Multiple ML techniques are used to estimate the cell parameters. SVM provided the highest accuracy is the cell estimation.

## 2. Cell Modeling

_{0}) in series with the voltage source [4]. Open Circuit Voltage (OCV) portrays the drop in the voltage due to the flow of the current in R

_{0}. The limitation of this model is that the complete dynamics of the cell are not considered. In addition, the dependence on the SOC on the cell parameters is not considered. Hence, a modified version called Thevenin’s Cell Model was proposed. This model is described as a pair of polarizing resistor (R

_{1}) and polarizing capacitor (C

_{1}) in series with the R

_{0}. It was shown that when a discharge current pulse is supplied to the cell, its voltage (V

_{T}) decays and goes down to a lower value. V

_{T}diffuses to the OCV during the resting phase. This phenomenon is modeled as a delay circuit by combining a pair of RC in series with R

_{0}. This is also referred to as the Equivalent Circuit Model (ECM). Higher order RC pairs are used for pulse charging application and helps in capturing high frequency transients [4]. Figure 3 shows the 1-RC model for a cell consisting of R

_{0}, polarizing resistance R

_{1}and capacitance C

_{1}.

_{0}and R

_{1}arein the range of mΩ and C

_{1}in kF.

## 3. Extraction of Dataset Using MATLAB/Simulink

_{0}, R

_{1}, …, R

_{5}, C

_{1}, C

_{2}, …, C

_{5}) can be estimated using the PowerTrain blockset using MATLAB/Simulink. Figure 5 shows the flowchart employed for the estimation. This estimation was used to initially obtain the cell parameter values. These values were used as reference values for ML algorithms, as shown in Section 4.

_{m}(V

_{OCV}) and Cell parameters. Experiments (OCV, current and SOC data) on a 10 Ah Li polymer Cell were performed and stored in the form of a .mat file. Some of the user-defined parameters were E

_{m}, R

_{0}and ambient temperature (T

_{amb}). An estimated plot of E

_{m}was cut up into numerous pulses based on the time constants (τ = R

_{n}C

_{n}). Based on user defined inputs, E

_{m}and R

_{0}were estimated. Finally, the ECM was transferred from MATLAB to Simulink environment using parameters defined in the ‘Equivalent Cell Model (ECM)’. Table 1 indicates the initial ECM estimates provided.

## 4. Tuning Parameters Based on NASA Dataset

_{t}is the SOC at any given time, t, SOC

_{0}is the initial SOC, C is the capacity in Ah, i is the current in A.

_{0}, R

_{1}and C

_{1}vary as a function of SOC. Figure 14 and Figure 15 show the variation of R

_{0}and R

_{1}respectively. It is observed that R

_{0}and R

_{1}gradually increase after the completion of the discharge cycle. Figure 16 shows the variation of C

_{1}with respect to time.

## 5. Machine Leaning Technique for Parameter Estimation

_{0}. The cell parameters R

_{0}, R

_{1}and C

_{1}vary as a function of SOC. The R squared obtained for validation is 0.76, 0.7 and 0.95, with a prediction speed of 30 to 50 s for C

_{1}, R

_{0}and R

_{1}with function of SOC respectively. Figure 20, Figure 21 and Figure 22 clearly project the prediction of parameters with the errors obtained. In the prediction model for the C

_{1}vs. SOC, only one point deviates, which precedes the cause of larger error. Table 3 shows R-squared mean value for parameter estimation. The parameters can be estimated with the prediction model for better control of SOC with respective to C

_{1}, R

_{0}and R

_{1}. Table 4 shows a comparison between various ML techniques used for cell parameter estimation.

## 6. Conclusions

_{terminal_cellmodel}–V

_{terminal_testdata}< ±0.2 V. It is found that the cell parameters for a Li polymer cell and Li ion 18650 cell closely match. The simulated cell parameter values were used as the reference values for the ML algorithms. SVM is an established probabilistic type knowledge-based algorithm which includes the neural network and Markov chain technique to address the uncertain conditions which are present in external and internal electrochemical mechanisms. This algorithm in ML is used for the construction of predictive model and for forecasting the charging curve. ML is mainly used to construct accurate SOC and is used for validation under a wide range of operating conditions. Among various algorithms, SVM gives a best fit and the regression. For the best fit SVM technique is adopted, which gives a good prediction model with respect to SOC and associated parameters for the estimation of parameters for a better control and efficiency which is evaluated through the R squared obtained. For the best fit, SVM technique is adopted, which gives a good prediction model with respect to SOC and associated parameters for the estimation of parameters for a better control and efficiency. It was found that the cell parameters (R

_{0}, R

_{1}and C

_{1}) are functions of SOC and ambient temperature. However, they showed no dependence on the magnitude of current. Hence, the training results need further tuning only if the temperature and the OCV range change.

## 7. Discussion and Recommendation for Further Research

_{1}and C

_{1}values as they play an important role in the dynamics of the cell behavior. From the prediction and estimation of the cell parameters using ML, a new model can be developed from the trained parameters which can be further used for better SOC estimation.

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Surya, S.; Supriya, P.; Williamson, S.S. A Comprehensive Study on DC–DC and DC–AC Converters in Electric and Hybrid Electric Vehicles. In E-Mobility. EAI/Springer Innovations in Communication and Computing; Kathiresh, M., Kanagachidambaresan, G.R., Williamson, S.S., Eds.; Springer: Cham, Switzerland, 2022. [Google Scholar] [CrossRef]
- Sumukh, S.; Rao, V.; Williamson, S.S. Comprehensive Review on Smart Techniques for Estimation of State of Health for Battery Management System Application. Energies
**2021**, 14, 4617. [Google Scholar] [CrossRef] - Shahab, N.; Gladwin, D.T.; Stone, D.A. A systematic review of lumped-parameter equivalent circuit models for real-time estimation of lithium-ion battery states. J. Power Sources
**2016**, 316, 183–196. [Google Scholar] - Plett, G.L. Cell Management Systems, Volume I: Cell Modeling; Artech House: Norwood, MA, USA, 2015. [Google Scholar]
- Surya, S.; Channegowda, J.; Datar, S.D.; Jha, A.S.; Victor, A. Accurate battery Modeling Based on Pulse Charging using MATLAB/Simulink. In Proceedings of the 2020 IEEE International Conference on Power Electronics, Drives and Energy Systems (PEDES), Jaipur, India, 16–19 December 2020; IEEE: New York, NY, USA, 2020. [Google Scholar]
- Kumar, A.A.; Kulkarni, S.S. Comparative Study of Mathematical Models and Data Driven Models for Cell Performance Parameter Estimation. In Proceedings of the 2020 Third International Conference on Advances in Electronics, Computers and Communications (ICAECC), Bengaluru, India, 11–12 December 2020; IEEE: New York, NY, USA, 2020. [Google Scholar]
- Shrivastava, P.; Soon, T.K.; Idris, M.Y.B.; Mekhilef, S. Lithium-ion Cell Model Parameter Identification Using Modified Adaptive Forgetting Factor-Based Recursive Least Square Algorithm. In Proceedings of the 2021 IEEE 12th Energy Conversion Congress & Exposition-Asia (ECCE-Asia), Singapore, 24–27 May 2021; IEEE: New York, NY, USA, 2021. [Google Scholar]
- Li, R.; Wang, Z.; Yu, J.; Lei, Y.; Zhang, Y.; He, J. Dynamic parameter identification of mathematical model of lithium-ion Cell based on least square method. In Proceedings of the 2018 IEEE International Power Electronics and Application Conference and Exposition (PEAC), Shenzhen, China, 4–7 November 2018; IEEE: New York, NY, USA, 2018. [Google Scholar]
- Ryan, A.; Rahimifard, S.; Habibi, S. Offline parameter identification and soc estimation for new and aged electric vehicles batteries. In Proceedings of the 2019 IEEE Transportation Electrification Conference and Expo (ITEC), Detroit, MI, USA, 19–21 June 2019; IEEE: New York, NY, USA, 2019. [Google Scholar]
- Bole, B.; Kulkarni, C.; Daigle, M. “Randomized Battery Usage Data Set”, NASA Ames Prognostics Data Repository. Available online: http://ti.arc.nasa.gov/project/prognostic-data-repository (accessed on 28 December 2021).
- Samanta, A.; Chowdhuri, S.; Williamson, S.S. Machine Learning-Based Data-Driven Fault Detection/Diagnosis of Lithium-Ion Battery: A Critical Review. Electronics
**2021**, 10, 1309. [Google Scholar] [CrossRef] - Venugopal, P.; Reka, S.S. State of Charge Estimation of Lithium Batteries in Electric Vehicles Using IndRNN. IETE J. Res.
**2021**. [Google Scholar] [CrossRef] - Nagarale, S.D.; Patil, B.P. A Review on AI based Predictive Battery Management System for E-Mobility. Test Eng. Manag.
**2020**, 83, 15053–15064. [Google Scholar] - Rivera-Barrera, J.P.; Muñoz-Galeano, N.; Sarmiento-Maldonado, H.O. SoC estimation for lithium-ion batteries: Review and future challenges. Electronics
**2017**, 6, 102. [Google Scholar] [CrossRef] [Green Version] - Chandran, V.; Patil, C.K.; Karthick, A.; Ganeshaperumal, D.; Rahim, R.; Ghosh, A. State of charge estimation of lithium-ion battery for electric vehicles using machine learning algorithms. World Electr. Veh. J.
**2021**, 12, 38. [Google Scholar] [CrossRef] - Khumprom, P.; Yodo, N. A Data-Driven Predictive Prognostic Model for Lithium-ion Batteries based on a Deep Learning Algorithm. Energies
**2019**, 12, 660. [Google Scholar] [CrossRef] [Green Version] - Stighezza, M.; Bianchi, V.; De Munari, I. FPGA Implementation of an Ant Colony Optimization Based SVM Algorithm for State of Charge Estimation in Li-Ion Batteries. Energies
**2021**, 14, 7064. [Google Scholar] [CrossRef]

**Figure 3.**1-RC pair model. Where V is the terminal voltage (V), V

_{OCV}is the Open Circuit Voltage (V).

**Figure 19.**Representation of Support vector machine [15].

E_{m} | R_{0} (Ω) | R_{1}C_{1} = τ |
---|---|---|

Nominal Voltage—4.1 V | 0.001 | 5 |

Minimum Voltage—3.4 V | 0.0001 | 10 |

Maximum Voltage—4.2 V | 0.1 | 200 |

SL.NO | Specification | Value |
---|---|---|

1 | Maximum charging voltage | 4.2 V |

2 | Minimum discharge voltage | 3.2 V |

3 | Nominal Capacity | 2.1 Ah |

Parameters Associated | R-Squared Mean Value |
---|---|

C_{1} V/s SOC | 0.74 |

R_{0} V/s SOC | 0.95 |

R_{1} V/s SOC | 0.69 |

Techniques Used for Estimation | R-Squared Value | ||
---|---|---|---|

C_{1} | R_{0} | R_{1} | |

Linear Regression | 0.66 | 0.90 | 0.76 |

SVM | 0.79 | 0.95 | 0.82 |

Gaussian Exponential | 0.76 | 0.90 | 0.77 |

Neural network | 0.58 | 0.85 | 0.69 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Surya, S.; Saldanha, C.C.; Williamson, S.
Novel Technique for Estimation of Cell Parameters Using MATLAB/Simulink. *Electronics* **2022**, *11*, 117.
https://doi.org/10.3390/electronics11010117

**AMA Style**

Surya S, Saldanha CC, Williamson S.
Novel Technique for Estimation of Cell Parameters Using MATLAB/Simulink. *Electronics*. 2022; 11(1):117.
https://doi.org/10.3390/electronics11010117

**Chicago/Turabian Style**

Surya, Sumukh, Cifha Crecil Saldanha, and Sheldon Williamson.
2022. "Novel Technique for Estimation of Cell Parameters Using MATLAB/Simulink" *Electronics* 11, no. 1: 117.
https://doi.org/10.3390/electronics11010117