An Adaptive Autotuned Polynomial-Based Extended Kalman Filter for Sensorless Surface Temperature Estimation of Li-Ion Battery Cells

This paper proposes an adaptive filter for estimating the surface temperature of lithium-ion battery cells in real time. The proposed temperature sensorless method aims to achieve a highly accurate temperature estimation at a relatively low implementation cost. The method employs a system dynamic and measurement models derived using polynomial curve fitting and implemented in the proposed adaptive autotuned extended Kalman filter (AA-EKF). Derivation of the proposed technique followed by experimental verification are demonstrated.


I. INTRODUCTION
Lithium-ion batteries (LIBs) are adopted in a wide spectrum of applications and products including portable electronics, transportation electrification, renewable generation support and grid storage. Due to their high energy/power densities and long cycle-life, they are preferred over other storage technologies in many industries [1]- [4]. These batteries, however, are extremely sensitive and hence they must be carefully handled when they are operated or stored. Excessive temperature rise in these batteries due to abuse or improper storage could lead to a significant degradation in their performance. It may also impose a safety risk or fire hazard if their temperature rise is not handled quickly and properly [5]. Therefore, online monitoring of the temperature of an LIB is a crucial function of a BMS.
Typically, the temperature of a battery is monitored utilizing a sensor by taking direct readings using a thermal impulse technique [6]. Alternatively, the temperature could be monitored indirectly as proposed in [7] using artificial neural networks (ANNs). In the referenced works, the use of sensors brings additional limitations and issues to the BMS. Although sensors have been widely adopted in many applications due to their low cost, sensors demand a continuous The associate editor coordinating the review of this manuscript and approving it for publication was Pinjia Zhang . power supply for their operation, [8], which might interfere with the performance of the LIB and the data needed by the BMS. Furthermore, fully relying on sensors to monitor the temperature of LIBs is impractical in many applications due to the need to perform regular offline calibrations and maintenance procedures to ensure accurate measurements at any instance. Another ANN method is proposed in [9] to estimate the surface temperature of LIB cells. Although ANN have high stability and accuracy in general, they demand tremendous resources. In addition, ANN methods such as those in [7] and [9] have a guaranteed poor performance if the testing conditions differ from the training and validation conditions. Therefore, many sensorless techniques have been recently proposed to replace or support sensorbased monitoring systems. For instance, a sensorless based technique for estimating the internal temperature of an LIB utilizing impedance measurements is proposed in [10]. In the referenced paper, an EKF is used to estimate the internal temperature using a reduced-order thermal model. The main drawback of the referenced work is the use of the impedance measurement in real time to estimate the temperature, which results in an added complexity to the system's implementation. On the other hand, in [11] a dual Kalman filter that uses a 1-D LIB thermal model is used for improved accuracy as compared to [10]. Although the use of a dual Kalman filter is more accurate, it adds more complexity to the model and it heavily relies on numerical approximations and the knowledge of the internal resistance of the battery cell, which in turn increases the inaccuracy of the model used and the resulting temperature estimation. Other sensorless methods that are based on electrochemical impedance spectroscopy have been proposed in [12] and [13] to estimate the internal temperature of a LIB. The referenced methods rely on injecting an AC current to the battery cell to determine the impedance spectroscopy. Subsequently, using the zero-phase impedance frequency, the temperature is extracted. Although the referenced methods are sensorless, these methods face several implementation challenges that range from the added hardware complexity due to the need of injecting an AC current into the system. In addition, there is a lack of scientific evidence that the zero-phase impedance relies exclusively on temperature rather than on other parameters such as the stateof-charge (SOC) and state-of-health (SOH), which might vary from one battery to another. An adaptive approach that is based on measuring the impedance phase of the battery in real time by a simple search algorithm is presented in [14] while addressing the limitations of [12] and [13]. Yet, the calculation of the impedance-phase requires the injection of an AC current, which is inadequate in many applications. In addition, the external (surface) temperature is considered accurate enough as an input to the BMS in many applications. This makes it a low-cost alternative to internal temperature estimation which is costly and unnecessary in many applications.
Polynomial based Kalman filters have been recently introduced to offer a simplified stochastic estimation approach to real engineering problems such as navigation as in [15] and SOC estimation as proposed by [16]. In both references, the polynomial-based approaches proven to be simpler to implement without sacrificing the accuracy of the estimation process. The polynomial based mathematical models are prepared from experimental data with negligible approximations, hence delivering promising results. Therefore, inspired by these efforts, this research aims at utilizing polynomial-based modelling to estimate the surface temperature of an LIB at a reduced cost and simplified implementation requirements while maintaining the accuracy and reliability of the estimation process. This paper proposes a polynomial based curve-fitting approach based on given experimental data to formulate the temperature dynamic and voltage measurement models for surface temperature estimation. The derived models and the EKF-based temperature estimation algorithm are very accurate, as experimental results show. Besides its high accuracy, the proposed estimation method is simple, robust and adaptive as it employs a powerful autotuning algorithm to adapt the models' parameters as the battery ages.
The organization of this article is as follows: Section II presents the proposed dynamic and measurement models. Section III presents derivation of the proposed technique. Experimental verification is provided in Section IV followed by summary and conclusions in Section VII.

II. DYNAMIC AND MEASUREMENT MODELS
Parameter estimation of time variant parameters typically requires a dynamic model that can represent how the parameter evolves with time. Additionally, there should be a measurement model that relates the system output to the estimated parameter [17]. In this work, the estimated parameter is the surface temperature with the output being the terminal voltage of the battery. The dynamics of a battery are nonlinear by nature as indicated in [18]. Therefore, the dynamic and measurement models take the forms represented by Eqs. (1) and (2), respectively, where f is a nonlinear function that propagates the state given the previous sampling step k, the previous knowledge of the state x, the input u, and h is the nonlinear relation between the output z and the state. The white Gaussian sequences w and v are the dynamic process noise and measurement noise sequences with covariances Q w and R v , respectively.
In this section, the required battery models are generated by running MATLAB polynomial fitting routines on experimental data acquired from NASA public dataset [32]. In this dataset, a 4.2-V, 1840-mAh brand-new LIB cell (cell B0005) was exposed to continuous charge-discharge cycles. The cell was first completely discharged. Then, it was charged using a constant-current-constant-voltage method (1500-mA constant current to 4.2-V followed by 4.2-V constant voltage until current dropped to 10-mA). After the charge test was completed, the cell was completely discharged again using 2000-mA current until the voltage reached 2.6-V. This procedure was repeated for over 500 cycles until the capacity dropped by 30% of initial capacity.

A. TEMPERATURE DYNAMIC MODEL
Literature is rich with physics-based thermal models that are capable of accurately predicting the temperature distribution of an LIB [19]. Models ranging from volume averaged temperature models as in [20] to two-state lumped thermal models as in ( [21], [22]) have shown promising results but suffer from high complexity and computational effort. A computationally efficient thermal model for a cylindrical battery cell was proposed by [23] that relies on providing a polynomial approximation to a battery's heat transfer problem. However, the proposed solution faces some added complexity due to requiring exact knowledge of the battery's physical parameters and geometry. In this paper, we follow a generalized less-complex polynomial approximation to the temperature dynamics of an LIB as suggested in [23]. The non-linear battery temperature model used is expressed by Eq. (3) where x is the surface temperature while u is the input current to the LIB system.
Since the model shown in Eq. (3) is an expansion of the general non-linear dynamic function f in Eq. (1), the VOLUME 10, 2022 coefficients obtained by polynomial fitting of the experimental data are thus denoted by f 0 , f 1 , and f 2 . The coefficient f 0 is a general curve fitting constant with no real physical significance as opposed to f 1 , and f 2 that represent the degrading rate of temperature difference and heat generation rate due to Joule Heat, respectively, as claimed by [24]. A separate polynomial fit was performed on each cycle to obtain the corresponding fitting coefficients. The coefficients for some selected cycles are tabulated in Table 1 and are plotted against cycle number in Fig. 1 to observe the significance of the aging factor on the obtained thermal model.

B. VOLTAGE MEASUREMENT MODEL
Polynomial based measurement models have been widely used in literature for the SOC estimation of LIBs. In [25] and [26], for instance, polynomials are employed to approximate the SOC and open-circuit voltage (OCV) relationship with reliable accuracy. While in [27] a study is made to present the SOC-OCV characteristic curves at different temperatures using a range of curve fitting functions that include polynomial, exponential, sum of sines, and Gaussian fits. The polynomial fit was found to be the simplest most reliable fit. Hence, the goal is to use a similar approach but rather to approximate the V-T characteristic equation for the given LIB. The characteristic equation is approximated by the 8 th order polynomial presented by Eq. (4) which also serves as an expansion to the general measurement model expressed by Eq. (2). h 0 through h 8 are the coefficients of the nonlinear measurement function h.
Once again, a separate polynomial fit is found for each discharge cycle to observe the aging factor and its effect on the coefficients of the V-T characteristic equation. The coefficients for selected cycles are given in Table 2 and plotted in Fig. 2.
By examining Figs.1 and 2, it is evident that the curve fitting coefficients of Eqs. (3) and (4)

III. PROPOSED TECHNIQUE
The derivation of the EKF algorithm alongside the proposed autotuning algorithm are presented in this section.

A. EKF DERIVATION
Equations (3) and (4) are used to formulate the EKF estimation algorithm [28]. The EKF is first initialized with an initial state estimation,x 0 , and initial state estimation covariance, P 0 . Next, the prediction step is used to obtain the a priori state estimation,x k along with its covariance,P k , and estimate the measurement Jacobian (or the derivative), H k , and the EKF gain, K k , as follows: Finally, the EKF estimates and its corresponding covariance are updated as follows: The standard EKF algorithm assumes a consistent dynamic and measurement models throughout the estimation process and any changes in the model parameters will cause the filter to diverge significantly and yield inaccurate estimation. This problem is more prominent with the system in hand given the significance of the aging factor and model parameters dependency on cycle number as shown graphically in Fig. 1 and Fig. 2. In the next sub-section, an autotuned adaptive approach is presented to overcome this problem by adjusting model parameters based on the cycle number.

B. AUTOTUNING ALGORITHM
Relying on a single average model for Eqs. (3) and (4) while ignoring the aging condition of the LIB reduces the accuracy of estimation process. Therefore, using the standard EKF discussed earlier is not enough to achieve an accurate estimation of a battery's surface temperature with varying health/age condition that experiences a change in capacitance per cycle. To overcome this problem, a more robust approach is used to improve the accuracy of temperature estimation.
A great advantage of using polynomial models for Eqs. (3) and (4) is that it is possible to observe the change in the models by tracking the variation of their coefficients over the discharge cycles. The model coefficients for selected cycles tabulated in Tables 1 and 2 and presented graphically in Figs. 1 and 2 show the total of 12 combined model coefficients at different SOH conditions for cycles 1 through 500 until the brand-new cell reaches 30% capacity fade. Therefore, an average model would only succeed to capture the dynamics of a battery in the middle of its life cycle. This parameter-averaged model is not enough to deliver an accurate temperature estimation at any given cycle. Thus, an adaptive autotuning approach that utilizes lookup tables (LUTs) to tune the temperature and voltage model parameters per given cycle will be used. LUTs are in use for some time in literature to develop SOC-OCV relations by constructing LUTs offline from experimental data as in [29] and [30]. These LUTs are then used for linear interpolation between sampling points as in [31]. Similarly, Table 1 and Table 2, that are prepared offline, are used as LUTs for linear interpolation of the coefficients of Eqs. (3) and (4) given the discharge cycle. Once the appropriate model coefficients are obtained, they are fed in to the EKF algorithm to deliver a more accurate estimation for the surface temperature. The resulting algorithm is referred to as the adaptive autotuned EKF (AA-EKF) and is illustrated in Fig. 3. VOLUME 10, 2022

IV. EXPERIMENTAL VERIFICATION
The proposed estimation algorithm is verified experimentally using the dataset in [32]. The estimation results of this dataset using a standard EKF and the proposed AA-EKF algorithms are shown in Fig. 4.
The performance of the proposed AA-EKF algorithm is compared against a standard EKF through the estimation of the battery's surface temperature for different cycles that represent different SOH conditions. The initialization of the state estimation was set to 25 • C for both filters, to match that of an average room temperature. The mean absolute error (MAE) value is used to quantify the performance of the proposed AA-EKF to the standard EKF algorithm. The MAE is defined as where K is the length of the measurement window and the error isx = x k true −x k . The results in Fig. 4 show that both algorithms follow the true surface temperature. However, it is evident that the AA-EKF algorithm is able to track the surface temperature more closely, unlike the standard EKF which shows significant divergence towards the end in both the 100 th and 500 th discharge cycles. Such divergence is not noticeable in the 300 th cycle since this is an intermediate cycle, hence the model parameters are close to the average model used by the standard EKF. However, the goal here is to ensure that the estimator can predict the battery's surface temperature at any given cycle. The MAE values obtained from both algorithms are tabulated in Table 3 for further verification. Both the graphical and the quantitative results captured by the MAE prove that the proposed AA-EKF is superior to its standard counterpart in the surface temperature estimation.
For further verification, the proposed estimation algorithm is applied to a different dataset. An Oxford battery dataset, which comprises a highly dynamic pulse discharging test using a 4.2-V, 740-mAh LIB cell was used [33]. The test starts with an initially fully charged cell and continues until the SOC reaches 30%. The cell is exposed to highly dynamic pulses all the way from 100% down to 30% SOC. The temperature dynamic model, voltage measurement model, and temperature estimation algorithm results are shown in Figs. 5-7. The polynomial based EKF is used to estimate the battery's temperature as shown in Fig. 7. The AA-EKF is not required for this test given that the data are only collected for one discharge cycle. The estimation results obtained by using the polynomial based dynamic and measurements models illustrated in Figs. 5 and 6 are promising and show significant robustness even under highly dynamic conditions. Although the dynamic model in Fig. 5 does not accurately capture the dynamics of the battery's temperature, the estimation algorithm still manages to deliver a highly accurate estimation as shown in Fig. 7. This proves that polynomial based models  are reliable and are able to capture the necessary system dynamics needed for accurate state estimation.
Lastly, the MAE obtained in the dynamic pulse discharge test (Fig. 7) is 0.053 • C, which is very low given the high dynamics of the test, which adds to the accuracy and robustness of the proposed temperature estimation algorithm at different testing conditions.

V. PRACTICAL CONSIDERATIONS
A number of practical aspects must be considered when implementing the proposed estimation method on a battery cell or pack. Some of these aspects are demonstrated in this section.

A. CELL-TO-CELL VARIATION
Due to the manufacturing process, internal parameters such as the internal resistance and capacity may slightly differ from a cell to another. This variation occurs even within identical cells from the same manufacturer. As a result, the temperature profile may slightly deviate from the reference used to derive the model parameters. The impact of this variation can be mitigated by allowing the autotuning algorithm to tune the parameters of the dynamic and measurement models when the mismatch between the actual and estimated temperature crosses a predefined value. In this case, a sensor calibrated on a regular basis must be attached to the cell's surface to provide the actual measurement (in this case, the estimation algorithm will offer an alternative temperature measurement method that supports the temperature measurement provided  by the sensor). Alternatively, the original model can be used with other similar cells without adding an external sensor or performing an additional offline parameter tuning at the cost of slightly reduced accuracy. To quantify the impact of cellto-cell variation on the accuracy of the proposed algorithm, the model derived using the B0005 dataset is tested on two other cells, namely B0006 and B0007. The results are shown in Fig. 8 and 9. As seen from Fig. 8 and 9, the temperature estimation accuracy is accurate and acceptable despite the fact that the model is derived from a battery cell and applied on other different cells.

B. PROCESS AND MEASUREMENT UNCERTAINTIES
EKFs, in general, assume a white Gaussian noise with zero mean. While this assumption has been widely used in many Kalman filter-based algorithms, it could raise concerns during operation. Uncertainties in the process and measurement models are not only caused by the white noise on the measured current and/or voltage but are also due to possible sensor-incurred biases. As a result, achieved estimation accuracy in a real-life scenario is usually worse than that obtained under controlled conditions assuming complete knowledge of the noise statistics. To enhance the accuracy of the EKF by accounting for unknown, or change, in the dynamics and measurement uncertainties, adaptive techniques such as the auto-covariance least square (ALS) or maximum-likelihooderror (MLE) algorithms can be embedded with the traditional EKF. In this paper, we employ an innovation-based approach to update the covariance matrices Q w and R v , see Eqs. (14) and (16). A forgetting factor, 0 < α < 1, is introduced to adaptively estimate the covariance matrices. The purpose of the forgetting factor is to place more weight on the most recent estimations of the covariance magnitudes such that it adapts with the system. Additionally, the forgetting factor will suppress sudden fluctuations in the covariance estimations leading to a numerically more stable algorithm. A momentum constant, 0 < β < 1, is used to compute the forgetting factor α according to Eq. (17), allowing it to grow with the number of iterations. β controls the rate at which α grows and is chosen empirically such that the forgetting factor is neither too sensitive to cause numerical instability nor is too slow to capture the covariances matrices magnitude. The adaptive dynamics noise covariance update is performed as: Similarly, the measurement noise covariance matrix is adaptively updated as: where, Figure 10 shows the estimation results for cell B0005 (a) using a conventional EKF and (b) using an enhanced VOLUME 10, 2022 covariance-matching-EKF algorithm. The enhanced EKF provides better estimations as observed through the presented plots, which can further be captured through a direct comparison between the obtained MAE values. The enhanced EKF algorithm managed to decrease the MAE value by roughly 28% from 0.1966 • C using the conventional EKF to 0.1410 • C using the innovation-based covariance matching approach.

C. BATTERY PACK IMPLEMENTATION
While the proposed method is derived for a battery cell, which is suitable in applications such as cell phones where once battery cell is commonly used, the proposed method can also be employed in a battery pack to monitor the temperature of each individual cell. To achieve that, the current and voltage measurement of each individual cell must be available. In an advanced BMS, the voltage and current can be monitored by the DC-DC converter connected across the cell to achieve active balancing. Alternatively, the voltage and current of each cell can be approximately determined by dividing the total pack voltage by the number of series-connected cells to determine the voltage, and by dividing the total current of the pack by the number of parallel strings to determine the current of each cell. The possibility to monitor the temperature of each cell in a battery pack is another feature of the proposed method which is impossible to achieve using external sensors.

D. HARDWARE REQUIREMENTS
The gained merits of the proposed method come at a higher implementation cost due to increased hardware requirements. To implement the EKF along with the autotuning algorithm and perhaps the enhancement algorithm to track the temperature of the cell(s), the BMS must be able to run the algorithm fast enough to quickly detect abnormal temperature rise. A detailed block diagram for the BMS hardware implementation is shown in Fig. 11. While it might be tempting to use a traditional sensor to measure and track the temperature of a battery, the proposed sensorless estimation method can  add a priceless benefit in early detecting abnormal temperature rise in the case when a traditional sensor fails. With the advancement in hardware technology and the consistently dropping prices of ICs, advanced monitoring methods, such as the proposed, can enhance or even replace traditional sensor-based measurement methods.

VI. SUMMARY AND CONCLUSION
In this paper, an approach is adopted for formulating the dynamic and measurement models of surface temperature estimation. The derived models are implemented in the proposed AA-EKF algorithm to estimate the surface temperature of an LIB cell. The estimation technique employs an adaptive autotuning algorithm to track the changes in the models' parameters due to battery ageing. Two independent public datasets were used to evaluate the proposed approach. Results show that the proposed technique is capable of adapting to any SOH condition and/or operating condition. Compared to a standard EKF, the proposed AA-EKF has improved the temperature estimation accuracy by 56%, 50%, 6%, 16% and 40% at cycles 100, 200, 300, 400 and 500, respectively, according to the results obtained using the constant-current discharge dataset. Another dataset that involves a highly dynamic discharge pulses was used to further evaluate the proposed technique. In that dataset, the algorithm was capable to maintain the MAE for the estimated temperature within 0.053 • C, which is quite accurate and comes in full agreement and consistency with the constant-current discharge test results.
Overall, the proposed technique is highly accurate and robust, as conducted experiments show. Additionally, the proposed technique has a low implementation cost compared to other techniques that demand tremendous computational and hardware requirements, such as neural networks and impedance-spectroscopy based methods, making it a suitable and reliable choice in a wide range of industrial applications.
Lastly, the proposed method was verified at moderateto-high ambient temperatures, i.e. 24 • C-40 • C. As a future work, the impact of extremely low temperatures, i.e. below freezing point, on the battery dynamics, and modeling these dynamics to estimate the battery surface temperature must be investigated to validate the proposed approach at all possible operating temperatures.