Comparison Between Recursive Least Squares Method and Kalman Filter for Online Identification of Supercapacitor State of Health

Supercapacitors are electrochemical components with high-power density and an intermediate energy density between batteries and conventional capacitors. They are characterized by low series resistance, significant equivalent capacitance, and long service life. Nowadays, they have become an attractive alternative storage device for several applications. However, supercapacitors are subject to degradation due to aging, in addition to other factors, such as temperature and high voltage. Therefore, it is very important to be able to estimate their State-of-Health during operation. Electrochemical Impedance Spectroscopy and Maxwell test are very recognized techniques to determine supercapacitors’ state-of-health. However, these methods require the interruption of system operation and thus cannot be performed in realtime (online). The purpose of this paper is the real-time estimation of supercapacitor resistance and capacitance, which are the main indicators of supercapacitor state-of-health. The electrical behavior of the supercapacitor is modeled using equivalent RC circuit model and the identification is performed using two methods: recursive least squares method and Kalman filter. The resistance and the capacitance values obtained with the two methods are compared with capacitance and resistance values using Maxwell experimental test. The values obtained by Kalman filter are more accurate for both resistance and capacitance.


Introduction
Supercapacitor (SC), also called ultracapacitors (UC), or Electric Double Layer Capacitors (EDLC) [1], are electrical energy storage technologies with high-power density and an intermediate energy density between batteries and conventional capacitors [2]. They are characterized by low series resistance, significant equivalent capacitance, and large number of charge/discharge cycle, which permits to have a longer service life [2,3]. Supercapacitors are used in different applications, including industry, transportation, consumer electronics, and others [3,5].They are widely used in hybrid vehicles for peak power [4,6,7],for instantaneous power compensation, in backup power sources, or simply as energy storage devices [3,4,8].
Supercapacitors are composed of two conductive plates (electrodes), generally made of activated carbon particles, separated by an insulator (dielectric), and immersed in a solution (electrolyte) made of negative and positives ions. When a voltage is applied, the double charged layer is produced on the surface between carbon and electrolyte [9].
During their functioning, supercapacitors are subject to aging, which causes a progressive degradation of their performances. The real-time (online) identification of SC internal resistance and capacitance is crucial since 120 COMPARISON BETWEEN RLS METHOD AND KF FOR ONLINE IDENTIFICATION OF SUPERCAPACITOR SOH these parameters constitute key parameters to diagnose supercapacitors state-of-health [10,11].They also allow predicting the remaining operation time before replacement. The real-time identification of these parameters can therefore facilitate the planning of preventive maintenance tasks and improve system safety [8]. The online identification of SC resistance and capacitance will permit to estimate SCs ageing rate (State of Health) and then their remaining lifetime in real time.
In order to identify the internal resistance and capacitance of SC, several experimental and numerical methods exist. Electrochemical Impedance Spectroscopy (EIS) [12,13],and Maxwell test [14] are the most widely used experimental techniques to determine SC resistance and capacitance. However, despite the recognized reliability of these techniques, they cannot be used in real-time (online) since they require the interruption of system operation. There exist numerical identification techniques that allow the identification of SC parameters without the interruption of system operation. All these methods are based on an equivalent electrical circuit model. Several equivalent electrical circuit model have been proposed in literature, such as RC model [6,15],zubieta model [16], simple pore model [17], CPE model [18] and, multi-pore model [19]. For each of these models, several identification methods are proposed in the literature.
Nadeau et al. [20] proposed an identification algorithm based on Kalman filter to estimate the state-of-charge of a SC for a solar application. The SC was modeled by three RC branch circuits. They assumed that RC circuit parameters are constants with the aging time. The EKF becomes a recognized and widely used technique for state estimation in several nonlinear dynamic systems [21].One of the advantages of EKF is that only terminal measurement of voltage and current is required, which can be done online. El Mejdoubi et al. [22]developed a model that permits the real-time diagnosis of supercapacitors' state of health. The proposed model is based on sliding mode observer with an adaptation gain. The SC was modeled by Zubieta model [16].Chaoui et al. [19] developed a real-time identification method for lifetime diagnostic of supercapacitors. They used Lyapunov-based adaptation law to estimate the supercapacitor's parameters. Saha et khanra [23]proposed an online identification scheme based on Particle Filter (PF) for the estimation of State-of-Charge, SoH, and temperature of SC by combining electrical equivalent circuit model and thermal model. They found that the proposed estimation scheme performs SoH estimation with acceptable accuracy. Naseri et al [24] proposed a nonlinear state-space model for the online estimation of capacitance and resistance of SC. The proposed model takes the capacitance variation and self-discharge effects into account. The estimation error achieved with the proposed model is approximately 5%. Soualhi et al. [25] proposed a procedure based on fuzzy logic and artificial neural network (ANN) to estimate the internal resistance and capacitance of SCs. Roman et al. [26] also proposed a machine learning Model based on ANN to estimate the capacitance of electrochemical capacitors at high temperature. ANN and fuzzy logic can be a powerful technique to provide a robust identification for systems that are subjected to uncertainties [27]. However, these techniques usually require long and tedious offline tests for each new component to have enough training data [26,28]. In addition, they usually require a high computation time and complexity [29]. In the present study, we aim to develop an identification method that can be applied to each new SC model and that requires only voltage and current measurements (no need for a database).
These identification models are developed for different purposes. They all use complicated models that are mainly used to study in detail a specific behavior of SC. Indeed, the complexity of these models generally requires high computational resources, making difficult the real-time identification of SC parameters [30]. The objective of the present work is the online identification of SC resistance and capacitance with low computational resources. Two different identification methods are developed and compared in this paper.
The paper begins by presenting an experimental study of a supercapacitor developed in LUSAC laboratory to characterize supercapacitor by measuring and recording the voltage and charge/discharge current. In the second part, the RC equivalent circuit used to model SC electrical behavior is presented and detailed. In the third part, the recursive least square method (RLS) is used to identify parameters of RC model. Then, another identification method based on Kalman filter observer is proposed and applied. Finally, the results obtained using RLS method and Kalman Filter observer are presented and compared with the experimental values obtained by Maxwell Test.

Experimental study
In this experimental study, a power supply (GEN40-125 of GENESYS) and an active load (Chroma 63203) are used to apply a charging and discharging cycles to a supercapacitor following the current profile shown in Figure 2. A temperature-controlled chamber is used to conduct the experiment under a constant temperature of 65°. The bias voltage and charging/discharging current are measured and saved using the acquisition board NI cDAQ 9178 which convert analog signal (from current and bias voltage sensors) to digital signal with a 32-bit resolution. To facilitate results visualization and experience monitoring, the acquisition board is connected to a personal computer and a specific program developed in LabVIEW is used. Figure 1 shows the experimental bench used. The sampling time used for voltage/current measurements is set to 0.01s. Figure 1. Test bench used for characterization. [6,22,40] The current profile applied to the SC, shown in Figure 2 (a), represents the real currents in electric and hybrid vehicles. As can be seen in this Figure, the current profile represents the real driving profile in hybrid and electric vehicles, which corresponds to the repeated braking and acceleration. Since the SC resistance and capacitance are influenced by operating temperature [23], the supercapacitor (BCAP1500 Maxwell Technologies) used in this study is aged 228 hours, it is maintained at a temperature of 65°C (operating temperature) during the experiment using a temperature-controlled chamber [40].
The experimental current (Figure 2 (a)) and voltage ( Figure 2 (b)) profiles, obtained at this stage will be used to identify SC parameters using the two online identification methods proposed in this paper. It is important to note that voltage/current measurements can be done in real-time and do not require the interruption of SC operation.

Supercapacitors modeling
To model the electrical behavior of a SC and identify its internal resistance and capacitance, several equivalent electrical circuits have been proposed in the literature. The most simple and used circuit is RC model [20], also called constructor model [31]. The RC model, represented in Figure 3, is a simple model that evaluates the overall real electrical behavior of the supercapacitor. As shown in Figure 3, RC model is characterized by an equivalent series resistance R and a storage capacity C. The capacitor represents the canonical capacitance effect of the supercapacitor and the resistor represents the electrolyte and electrode resistances [30]. Other equivalent electrical circuits exist as mentioned in section 1. Increasing circuit sophistication always requires a more complex formulation, which generally leads to high computational resources, making it more difficult to identify SC parameters in real-time [30,32]. The RC model is chosen in the present study.  Figure 3, the output voltage on the terminals of SC is expressed by: The voltage U c at the terminal of the capacitor can be expressed as follows: Where U 0 is the voltage on the terminals of the capacitor when t = 0 . The bias voltage U s at the terminal of the SC can be expressed by the following equations:

Identification of RC model parameters using Maxwell Test
Maxwell test is an offline identification test that allows the determination of internal resistance and capacitance of SC. The principle of this experimental method consists of applying a simple constant current discharge as shown in Figure 4 and then analyzing the response voltage, so as to estimate capacitance "C" and resistance "R" [14].  Figure 4 shows that, when the current passes suddenly from I d to 0, a spontaneous rise in output voltage ( V r ) is observed. Once the current began null, the voltage at the terminals of the capacitor is unchanged. Then, the variation V r correspond to a rise in voltage at the terminals of resistance. Therefore, the resistance can be determined as follows: During the interval [ t 1 , t 2 ], the current is constant and equal to I d . Thus, the voltage at the terminals of resistance Ur is constant. Therefore, the linear variation in output voltage V d observed between t 1 and t 2 corresponds to a discharge of the capacitor. Based on equation (3), the variation of output voltage between t 1 and t 2 is expressed by: As the current is constant between t 1 and t 2 , the difference (I( t 2 )-I( t 1 )) is null. Therefore: Therefore: Using Maxwell test, the obtained values of supercapacitor parameters, capacity C and resistance R, are respectively C = 1498, 21F and R = 6, 67.10 −4 ohm It's worth noticing that, despite the simplicity and the effectiveness of Maxwell test to identify SC parameters [14], it remains difficult to use this method for online identification since it requires applying a specific current profile (Figure 4), which is usually very different from the real current during SC operation. However, the values of resistance and capacitance obtained by Maxwell test are used in our study as reference values to compare the results obtained by the proposed real-time identification methods and to assess the accuracy of these methods.
In the next paragraph, the recursive least square method (RLS) and Kalman Filter observer (KF) are used to identify parameters of RC model.

Identification of RC model using Recursive least-squares method
In this section, the parameters of supercapacitor are identified using the recursive least-squares method. This method was introduced by Karl Gauss in 1809 [33]. It is based on minimization of a quadratic function J defined as [33]: Represents the prediction error. The recursive least-squares method has several advantages like [34]: 1) The possibility of processing a larger number of data, which is not the case of simple least-squares method.
2) The recursive form permits to "follow" the parameters of the system when the system varies over time, which is important in our context to allow real-time identification of these parameters.
In order to estimate the two parameters R and C of the Rc model (shown in Figure 3), we will use the recursive least squares method. The output voltage Us(t) can be expressed in the form of the equation (9): Such as: Figure 5 shows a comparison between the simulated bias voltage obtained using RLS algorithm and the experimental bias voltage.   Figure 6, the maximum error between simulated using RLS method and experimental bias voltage is 0, 015% . We also note that the relative error decreases with time (almost zero at the end of simulation). These results demonstrate the ability of RLS algorithm to accurately simulate the bias voltage.
After simulating the behavior of EDLC using the recursive least squares method, we obtained the two curves of capacity and resistance shown in Figures 7 and 8. We remark that simulated values of capacity and resistance using RLS method converge towards parameters obtained by Maxwell test. Relative errors between the values obtained by RLS method and Maxwell test are 0, 24%for capacitance and 10, 04% for resistance.

Identification of RC model using Kalman filter
Kalman Filter (KF) has been used with success in order to estimate linear systems states in many applications [11,20,21,35]. Its recursive structure and low computational cost make it suitable for real-time identification of system state parameters.
Kalman Filter (KF) allows the estimation of the system state, represented by the state vector X in our case, at each time step (in real-time). Beside, KF only requires terminal measurement of voltage and current, which can be done in real-time.
The electrical expression of the output voltage (on the terminal of SC) as a function of model parameters R and C is: In our study, the state vector chosen in our work is given in equation (12).
KF is used to estimate, at each time period, the state variables of a continuous linear system defined by the following equations: Y(t) is the system output, which corresponds to the bias voltage Us(t) in our study. t is the time index, X(t) is the state vector, w(t) is the state noise and v(t) is the measurement noise.
We assume that, during a cycle of several charges/discharges, the variation in resistance and capacity are negligible.
We can assume that the variations of resistance R as well as capacity are zero as a function of time: By deriving the state vector, we have: So our system can be written in the following form: The KF is based on two important steps: prediction and correction. The first step consists of predicting the state vector X and the covariance matrix of the estimation error P(t), which satisfies the following equation [36,37]: The second step of the extended Kalman observer is the correction step, where the Kalman filter gain K is calculated based on the covariance matrix of the estimation error P (t). Using this gain, the predicted state vector X(t)and the covariance matrix of the predicted measurement error P (t) are updated, which leads to the estimated stateX(t) andP (t) Figure 9 shows the functional diagram of the extended Kalman filter.
Before using the proposed EKF scheme, it is important to verify the observability of the system. The observability is verified around an equilibrium point Xe using the Jacobian matrix J(Xe) as defined in [38]. After the calculation of J(Xe), we found that rank(J(Xe))=3, which correspond to the order of our system. Therefore,our system is observable around its equilibrium point Xe [38,39]. Figure 9 shows a comparison between the simulated voltage obtained using KF algorithm and the experimental bias voltage.  We remark that simulated values of capacity and resistance using Kalman Filter observer converge towards parameters obtained by Maxwell test. Relative errors between the values obtained by the KF method and the values obtained by Maxwell test are 0, 044% for capacitance and 0, 59% for resistance.

Comparison between RLS method and sliding mode observer
In this paper, we use two online identification methods based on two different algorithms in order to estimate the parameters of supercapacitor. The RC model has been proposed thanks to the simplicity of this electrical model. In order to evaluate the efficacy and the reliability of the two proposed methods, a comparison is made with a Maxwell test. In this table, the results obtained by sliding mode observer (SMO), proposed by El Mejdoubi et al. [6], are also compared with Maxwell test. It is important to notice that El Mejdoubi et al. [6] used the same experimental bench ( Figure 1) and the same SC model (BCAP1500 Maxwell Technologies) that the present study. We observe from the comparison between the measured and the estimated bias voltage using KF observer and RLS method, that the two methods allow the convergence of voltage with minimum relative error. However, RLS method identification has the lowest voltage error compared to the KF model. This precision is justified by the fact that this technique focuses on minimizing the sum of squared errors.
Comparing the resistance and capacity at the end of simulation,(table 1), we Remarque that the capacity and resistance using KF observer are very close to the parameters using Maxwell test (reference) with the lowest error. Table 1 summarizes the comparison between the two works and result of El Mejdoubi et al article [6]. We conclude from this comparison between the two works using different identification methods, that the RLS method and KF observer are reliable with minimum error (precision), both of them are used for online identification of SC resistance and capacitance with low computational resources.
Compared our results with sliding mode observer (SMO) (proposed by El Mejdoubi et al. [6]), the two identification methods proposed in the present paper require less complexity since SC is modeled using simple RC equivalent circuit instead of Zubieta equivalent circuit used by Mejdoubi et al. [6]. The Zubieta equivalent circuit requires more parameters and more complex equations. Regarding the results accuracy, we observe that relative errors of capacity and resistance using sliding mode observer [6] are higher than error using RLS method or Kalman Filter .
Based on the results above, We remarque that KF observer is the best method for R and C identification comparing with RLS method and SMO (table 1), it gives more precision, maximum reliability and minimum response time.

Conclusion
In this study, a comparison between recursive least squares method and Kalman filter for online identification of supercapacitor state of health has presented. The output voltage simulated using RLS method and KF observers converge towards to experimental voltage. The result has shown that the model based on the extended Kalman filter gives a better estimate of the capacitance and the resistance, however, RLS identification is the best method to estimate voltage.
In future work, the approach proposed in this paper will be extended. First, results obtained with RC model will be compared with those obtained by Zubieta model [10] or multi pore model using RLS identification. Second, other technical identifications like sliding mode observer and high gain observer will be tested. In the third point, SC aging phenomena will be investigated with the goal to evaluate SC State of Health and predict the remaining lifetime using estimated parameters (R and C) identified in this article.