# State of Charge Estimation of Composite Energy Storage Systems with Supercapacitors and Lithium Batteries

Authors: Kai Wang; Chunli Liu; Jianrui Sun; Kun Zhao; Licheng Wang; Jinyan Song; Chongxiong Duan; Liwei Li
Journal: Complexity
 (2021)

---

## Abstract

This paper studies the state of charge (SOC) estimation of supercapacitors and lithium batteries in the hybrid energy storage system of electric vehicles. According to the energy storage principle of the electric vehicle composite energy storage system, the circuit models of supercapacitors and lithium batteries were established, respectively, and the model parameters were identified online using the recursive least square (RLS) method and Kalman filtering (KF) algorithm. Then, the online estimation of SOC was completed based on the Kalman filtering algorithm and unscented Kalman filtering algorithm. Finally, the experimental platform for SOC estimation was built and Matlab was used for calculation and analysis. The experimental results showed that the SOC estimation results reached a high accuracy, and the variation range of estimation error was [−0.94%, 0.34%]. For lithium batteries, the recursive least square method is combined with the 2RC model to obtain the optimal result, and the estimation error is within the range of [−1.16%, 0.85%] in the case of comprehensive weighing accuracy and calculation amount. Moreover, the system has excellent robustness and high reliability.


---

## Body

## 1. Introduction

In recent years, with the increasingly serious energy crisis and environmental pollution problems, ecological environment [1–8] and energy have become the focus of human concern. New energy sources, such as solar, geothermal, wind, and oceanic energy, are being exploited more and more widely. The development of modern industry and manufacturing industry [9, 10] makes the application of electric energy more and more extensive [11–15], and in order to meet the power demand of small electronic equipment, a nanogenerator has emerged, which can effectively collect all kinds of energy and convert mechanical energy into electrical energy [16–18]. At the same time, fuel vehicles are facing challenges, and electric vehicles have become a potential choice to solve such crises [19]. The energy storage components of the hybrid energy storage system in pure electric vehicles mainly include supercapacitors of high power density [20, 21] and lithium batteries of high energy density [22, 23]. Supercapacitors are new components that store energy through a two-layer interface between an electrode and an electrolyte. Compared with traditional capacitors, it has larger capacity, specific energy or energy density, wider operating temperature range, and longer service life [24–26]. Although ultracapacitors are affected by voltage, current, temperature, and electrode materials [27–44], their cycle life is still long. With high energy density and high average output voltage, the aging of lithium batteries is a long-term gradual process [45–47], and their life is affected by temperature, current ratio, cutoff voltage, and other factors [48]. The evaluation of the parameters such as the state of charge and the remaining useful life has guiding significance for the use, maintenance, and economic analysis of lithium batteries. The SOC of the compound energy storage system of electric vehicles is the basis of rational energy management [49–51], so accurate SOC information is of great significance to improve the dynamic performance [52, 53] and range of electric vehicles [54–58].Wang et al. proposed a joint estimator to estimate both model parameters and SOC. The extended Kalman filter is used for parameter updating, the recursive least square algorithm provides the initial value with small deviation, and the Unscented Kalman filter is used for SOC estimation [59]. The joint estimator is designed to form a closed-loop control of the real-time changing model parameters and the estimation results of SOC. In order to improve the model accuracy, adaptive learning and online parameter identification methods in other fields are still applicable to the estimation of SOC [60–62]. Jarraya et al. proposed a real-time estimation method for the SOC of lithium ion batteries based on extended Kalman filter [63]. Extended Kalman filter linearizes nonlinear systems and is therefore applied to the SOC estimation of supercapacitors [64–68]. Chen et al. proposed an open circuit voltage online estimation based on the particle filter to achieve SOC estimation and based on this proposed open loop residual discharge time prediction algorithm [69]. The particle filter has irreplaceable advantages in both nonlinear and non-Gaussian systems [69–71]. Zhang et al. used fractional order models to synthesize fractional Kalman filters to recursively estimate the SOC of supercapacitors [72]. To predict SOC based on data, only the associated data of SOC and relevant parameters are used to train the model, and the model completed by training is used to estimate the future trend [73–77].In this paper, the circuit models of supercapacitors and lithium batteries are established, model parameters are identified online by using recursive least square method and Kalman filter algorithm. SOC estimation of the composite energy storage system is performed by using unscented Kalman filter algorithm, and the effectiveness and feasibility of the estimation method are verified.


## 2. Method

In this paper, the process of SOC estimation of supercapacitors is mainly composed of four parts: establishment of supercapacitor model, online identification of model parameters, and estimation of model open circuit voltage by the Kalman filtering method and estimation of SOC by the lookup table method, as shown in Figure1(a). The process of SOC estimation of lithium battery mainly includes three parts: firstly, the lithium battery model is established; secondly, the model parameters are identified online based on the recursive least square method and Kalman filtering algorithm; finally, unscented Kalman filtering algorithm estimates SOC, as shown in Figure 1(b).Figure 1
SOC estimation process for supercapacitors and lithium batteries. (a) Flowchart of SOC estimation of supercapacitors; (b) flowchart of SOC estimation of lithium batteries.


### 2.1. Model Establishment

The experimental supercapacitor used in this paper is shown in Figure2. The supercapacitor is 25 mm in diameter and 2 mm in height. Nitrogen-doped graphene was selected as the negative electrode material, nickel hydroxide was used as the positive electrode, and the electrolyte was potassium hydroxide solution. Its operating voltage is 0.9 V–1.5 V, and its rated capacity is 0.5 F under the condition of 0.1 A rated charge-discharge current. The experimental battery model in this paper is Samsung ICR 18650-20R, with rated voltage of 3.6 V, rated capacity of 2.15 Ah, and charge-discharge cutoff voltage of 4.2 V and 3.0 V, respectively.Figure 2
Supercapacitors used in the experiment.An appropriate circuit model is the prerequisite for accurate estimation of SOC. The positive pole of the circuit model of the supercapacitor used in the experiment can be built by the branch structure of resistor and capacitor in parallel, whereRf is Faraday resistance and Cf is pseudocapacitance. The negative electrode of an ultracapacitor can be equated with an ideal flat plate capacitor, represented by a Cd. Rs is equivalent series resistance. In addition, there should be equivalent parallel resistance Rp on the electrode, as shown in Figure 3(a). Thevenin’s equivalent circuit model includes equivalent internal resistance Re, a RC network, and voltage source Uoc. In the RC network, Rs is the polarization internal resistance, Cs is the polarization resistance, and Uoc is the open circuit voltage of lithium battery. In this paper, n additional RC networks were added on the basis of the Thevenin model to improve the model accuracy and denoted as the nRC model, as shown in Figure 3(b).Figure 3
Model of supercapacitor and lithium battery. (a) Supercapacitor equivalent circuit model; (b) nRC equivalent circuit model of lithium battery.
(a)(b)


### 2.2. The Function of Open Circuit Voltage and SOC

In this paper, programmable electronic load and power supply are selected to constitute the charging-discharge test module. Both of them communicate with the computer through R232 port to conduct charging-discharge cycle experiment on energy storage components. A three-electrode supercapacitor testing system was set up for constant current charge and discharge test, cyclic voltammetry test, and life test. The instrument used was CHI608A electrochemical workstation produced by the Shanghai Chenhua Instrument Company.This paper mainly uses the NI PCI 6221 high-speed data acquisition card to complete the collection of voltage and current signals of energy storage components in working state, then uses LabVIEW to transmit the data to the subsequent data processing module, and uses Matlab for calculation operation to complete the real-time estimation of the SOC of supercapacitors and lithium batteries. The computer used was Intel E5400 CPU, 2 GB RAM, and Windows XP operating system, as shown in Figure4Figure 4
(a) The NI PCI 6221 acquisition card; (b) experimental platform of supercapacitor and lithium battery charged state estimation system.
(a)(b)In general, when lithium batteries and supercapacitors work normally, their open circuit voltage cannot be directly obtained, so the functional relationship between open circuit voltage and SOC needs to be obtained in advance. The open circuit voltage of the supercapacitor model is monitored in real time, and then the functional relationship between open circuit voltage and SOC is determined. The specific steps are shown in Table1.Table 1
Experimental steps of the relationship between open circuit voltage and SOC function of supercapacitors.
Step1: initialize the supercapacitorThe supercapacitor was continuously discharged by 0.1 A current for 0.5 s, and then it was cut off and placed in a standing state for 5 sStep2: supercapacitor charging process(1) 0.1 A current is used to charge the supercapacitor in a constant current for 0.5 s, and then the supercapacitor is disconnected and placed in a standing state for 5 s(2) 0.1 A current is applied to charge the supercapacitor in a constant current for 1 s, and then the circuit is cut off and placed in a standing state for 5 s. Repeat this step for 6 times, and then the supercapacitor is fully filled (SOC = 1)Step3: discharge process of supercapacitor(1) 0.1 A current is used to continuously discharge the supercapacitor for 0.5 s, and then the supercapacitor is cut off and placed in a standing state for 5 s(2) 0.1 A current is used for constant discharge of the supercapacitor for 1 s, and then it is cut off and placed in a standing state for 5 s. Repeat this step for 6 times, and then the supercapacitor is completely emptied (SOC = 0)Complete the above experimental steps and fit the data. Firstly, the minimum value of the voltage in the 8 standing intervals in Step 2 and the maximum value of the voltage in the 8 standing intervals in Step 3 are obtained, respectively; then, the average value of the two is taken at each point, and then the curve is fitted to obtain the functional relationship between the open circuit voltage and SOC as shown in equation (1), and the curve is shown in Figure 5:(1)OCV=0.004525SOC5+0.5864SOC4−1.265SOC3+0.6658SOC2+0.6116SOC1+0.8972.Figure 5
The relationship between SOC and OCV in supercapacitor.Similarly, experimental steps of the relationship between open circuit voltage and SOC function of lithium battery are shown in Table2.Table 2
Experimental steps of the relationship between open circuit voltage and SOC function of lithium battery.
Step1: initialize the lithium battery(1) The experimental battery model in this paper is Samsung ICR 18650-20R, with rated voltage of 3.6 V, rated capacity of 2.15 Ah, and charge-discharge cutoff voltage of 4.2 V and 3.0 V, respectively(2) Under the condition that the battery is fully full, namely, SOC = 1. The 0.215 A current is used to continuously discharge the battery until it is completely emptied, that is, SOC = 0, and then the battery is disconnected and left standing for 12 hStep2: (1) 0.43 A current is used for constant current charging of the lithium battery until its capacity increases by 215 mAh, and then it is cut off and kept in a standing state of 90 s(2) Repeat Step 1 for a total of 9 times, and at this moment, SOC = 1; then, disconnect the lithium battery and leave it for 12 hStep3: (1) 0.43 A current carries out constant current discharge on the lithium battery until its capacity is reduced by 215 mAh and then puts it in a static state of 90 s(2) Repeat Step 1 for a total of 9 times. At this moment, SOC = 0, and then disconnect the lithium battery and leave it in a standing state for 12 hComplete the above experimental steps and fit the data. Firstly, the minimum value of the voltage in the 10 static intervals in Step 2 and the maximum value of the voltage in the 10 static intervals in Step 3 are obtained, respectively. Then, the average value of the two points is taken for curve fitting to obtain the functional relationship between open circuit voltage and SOC of lithium battery as shown in equation (2), and the curve is shown in Figure 6:(2)OCV=14.42SOC5−40.89SOC4+44.02SOC3−21.76SOC2+5.11SOC+3.30.Figure 6
The relationship between SOC and OCV in lithium battery.


### 2.3. Identification Model Parameters

In order to improve the model accuracy, the recursive least square method with forgetting factor is used to identify the parameters of the supercapacitor model online. The forgetting factor can reduce the weight of the outdated data in the system, while the newly sampled data will assign the weight value to ensure the accuracy and real-time performance of the system. The recursive least square method with forgetting factor is shown below.Firstly, the system in formula (3) is defined as follows:(3)yk=φnTkθnk+ek.In the above equation,yk is the system output variable; θn(k) is the parameter to be estimated; e(k) is the error matrix; k is the kth period, and the length of the period is T.The gain matrix of the system is(4)Kk+1=Pkφnk+1λ+φnTk+1Pkφnk+1.System variance is updated as(5)Pk+1=Pk−Kk+1φnTk+1Pkλ.System parameter identification is updated as(6)θ^nk+1=θ^nk+Kk+1yk+1−φnTk+1θ^k.In the above equation,θ^nkis the optimal identification of the system, namely, model parameters; K(k) is the system gain matrix; P(k) is the system variance matrix; λ is the oblivion factor, and λ∈0.95,1. Therefore, if the recursive least square method with forgetting factor is to be used, the equation of state should be adjusted to meet the requirements of the parameter identification algorithm, as shown in equation (7):(7)yk=φTkθk.According to the supercapacitor model in Figure3(a), equation (8) can be obtained:(8)Is=I1s+I2s,Us=I2sRp=I1sRs+1Cds+Rf1+RfCfs.For the simultaneous equations, equation (9) can be obtained:(9)Gs=UsIs=RpCdCfRsRfs2+CdRf+CfRf+CdRss+1CdCfRfRs+Rps2+CdRp+CdRf+CfRf+CdRss+1.Using bilinear transformations=21−z−1/T1+z−1, we can get(10)Gz−1=a3+a4z−1+a5z−21−a1z−1−a2z−2.Therefore, the difference equation is shown in the following equation:(11)Uk−a1Uk−1−a2Uk−2=a3Ik+a4Ik−1+a5Ik−2,transposition to(12)Uk=a1Uk−1+a2Uk−2+a3Ik+a4Ik−1+a5Ik−2.In the form of formula (3), we can get(13)φcTk=Uk−1Uk−2IkIk−1Ik−2,θck=a1a2a3a4a5T.To sum up, the model parameters of the supercapacitor can be identified online according to equation (13).The charge and discharge process of lithium batteries is much more nonlinear than that of supercapacitors. In this section, the recursive least square method with forgetting factor and Kalman filter algorithm are used to identify the online parameters of the lithium battery model. Considering the hardware processing capacity of the laboratory, 1RC, 2RC, and 3RC models are mainly used for analysis in this paper. As shown in Figure3(b), the state equation of the nRC equivalent circuit model is shown in(14)SOC′t=−itQn,Ui′t=−1τiUit+1Ciit,i=1,2,3,…,Ut=UocSOC,t−∑i=1nUi−Reit.Among them,τ is the time constant; Uoc(SOC, t) is the relationship between open circuit voltage and SOC, namely, equation (2). After sorting out equation (14), the complex frequency domain form can be obtained as follows:(15)Us=Uocs−IsRe+∑i=1nRi1+RiCis.Whenn = m, the space-state equation of the nRC model is shown as follows:(16)Us=Uocs−IsRe+∑k=1mRk1+RkCks.According to the bilinear transformation factor, we can get(17)Gz−1=bm+1+bm+2z−1+⋯+b2m+1z−m1−b1z−1−⋯−bmz−m=bm+1+∑q=m+22m+1bqz−q+m+11−∑q=1mbqz−q.Discrete equation (17) can be obtained as follows:(18)UΔk=1−∑q=1mbqUk+∑q=1mbqUk−q+∑q=m+12m+1bqIk−q+m+1,Uk=1−∑q=1mcqUock+∑q=1mcmUk−q+∑q=m+12m+1Ik−q.It can be obtained in the form of formula (7):(19)φmTk=1Uk−1Uk−2⋯Uk−mIk−1Ik−2⋯Ik−m,θmk=1−∑q=1mcqUockc1c2⋯c2m+1T.In this section, the recursive least square method with forgetting factor and Kalman filter algorithm are used to complete the online identification of lithium battery model parameters. The principle of the former has been introduced in the parameter identification part of the supercapacitor model, so it will not be repeated. In the specific application of the latter, it should be assumed that the system state variablex = θ, the output variable y = U, and the noise is an independent Gaussian white noise whose variance is, respectively, r and e. Then, based on the principle of the Kalman filtering algorithm, the corresponding parameter identification process is shown as follows:(20)θk+1=θk+rk,yk=φkTθk+ek,where the corresponding parameter matrix is A=I4×4,B=0,C=φTk,D=0, so the parameters of the lithium battery model can be identified in real time as the state variable.


### 2.4. SOC Estimation

The Kalman filtering algorithm is used to estimate SOC of supercapacitors. Firstly, the system in equation (21) is defined as follows:(21)xk+1=Akxk+Bkuk+wk,yk=Ckxk+Dkuk+vk,where xk is the system state variable; yk is a systematic observation variable; uk is the system input, which can also be regarded as the system control variable; Ak is the transfer matrix; Bk is the input matrix; Ck is the measurement matrix; Dk is feedforward matrix; wk and vk are the system state equation and measurement equation noise, respectively, and wk ∼ N(0, Qk), vk ∼ N(0, Rk).According to the Kalman filtering algorithm, the time of the system is updated as follows:(22)x˜k−=Ak−1x˜k−1++Bkuk,Pk−Ak−1Pk−1+Ak−1T+Q.The Kalman gain matrix is(23)Kk=Pk−CkTCkPk−CkT+R−1.The system status measurement is updated as(24)x˜k+=x˜k−+Kkyk−Cx˜k−−Duk,Pk+=I−KkCkPk−.In the above equation,x˜k+ is the optimal estimation of system state variable at time k; Pk+ is the best estimate of variance at time k.In this paper, the state equation of the supercapacitor model is not fixed under charging and discharging conditions, so the charging and discharging conditions should be discussed separately.


#### 2.4.1. Space-State Equation of Supercapacitor Charging Process

The current flow direction during charging is shown in Figure7(a).Figure 7
Charge-discharge current flow diagram of the supercapacitor model. (a) The supercapacitor model in charge process; (b) the supercapacitor model in discharge process.
(a)(b)Based on Ohm’s law, equation (25) can be obtained:(25)U−U0=I2Rp=I1Rs+Ud+Uf,I=I1+I2,where Uf and Ud are the partial pressures on capacitance Cf and Cd, respectively.From the above equation, equation (26) can be obtained:(26)I1=IRp−Ud−UfRp+Rs,I2=IRs+Ud+UfRp+Rs.On the capacitor branch, the current relationship as shown in equation (27) is established:(27)I1=UfRf+CfUf′=CdUd′.From equation (26) and (27), equation (28) can be obtained:(28)Uf′=−1Rp+RsCfUf+Ud−IRp−UfRfCf,Ud′=−1Rp+RsCdUf+Ud−IRp.From equation (25) and (28), we can get(29)U=RpRp+RsUf+Ud+IRs,and with x = [UfUd]T and y = U, the state equation of supercapacitor can be arranged as follows:(30)Ufk+1Udk+1=1−TCf1Rp+Rs+1Rf−TRp+RsCf−TRp+RsCd1−TRp+RsCdUfkUdk+TRpRp+RsCfTRpRp+RsCdIk+wk,yk=RpRp+RsRpRp+RsUfkUdk+RpRsRp+RsIk+vk.


#### 2.4.2. Space-State Equation of Supercapacitor Discharging Process

The current flow direction during discharging is shown in Figure7(b). Similarly, the state equation of the discharge process can be expressed as(31)Ufk+1Udk+1=1+TCf1Rp−Rs+1RfTRp−RsCfTRp−RsCd1+TRp−RsCdUfkUdk+−TRpRp−RsCf−TRpRp−RsCdIk+wk,yk=RpRp−RsRpRp−RsUfkUdk−RpRsRp+RsIk+vk.Therefore, the voltageUf and Ud of capacitors Cf and Cd in the ultracapacitor model can be estimated in real time by the Kalman filtering algorithm. The open circuit voltage is the sum of the above two, and its charged state can be obtained by using the known relationship between the open circuit voltage and SOC function of the ultracapacitor. In the experiment, the open circuit voltage of the supercapacitor is 1.5 V, so its initial SOC value is 1. Therefore, the initial state of the Kalman filter operator is as follows:(32)x0=10.5T,P0=11.There are complex electrochemical reactions in the charging and discharging process of lithium battery, so its SOC cannot be directly observed or measured. Therefore, its SOC is regarded as a state variable and put into its space-state equation. The unscented Kalman filter algorithm is used to complete the estimation, and the steps are as follows.Step 1.
System initialization(33)x˜0=Ex0,P0=Ex0−x˜0x0−x˜0T.Step 2.
Sampling the sigma point set(34)χ0,k−1=x˜k−1a,χi,k−1=x˜k−1a+N+λPk−1i,i=1,…,L,χi,k−1=x˜k−1a−N+λPk−1i,i=L+1,…,2L,W0m=λL+λ;W0c=λL+λ+1−α2+β,Wim=Wic=12L+λ,i=1,…,2L,χk−1a=x˜k−1a,x˜k−1a+N+λPk−1,x˜k−1a−N+λPk−1;λ=α2L+κ−L.
In the above equation,α is the distance between the set of sigma points and the points of the state variable, which generally takes a smaller value; k is usually 0 or 3 − n; β can incorporate the prior information into the state variable, which is usually β = n for Gaussian distributions.Step 3.
Time update
The set of sigma points is substituted into the nonlinear system:(35)χk|k−1x=Fχk−1i,i=1,…,2L.
State variables and their variances are predicted according to the centralized value of sigma points:(36)x˜k−=∑i=02LWimχi,k|k−1x,Px−=∑i=02LWicχi,k||k−1x−x˜k−χi,k|k−1x−x˜k−T.Step 4.
Measure update
The predicted value and variance of the output can be obtained from the new sigma point set after the above time update:(37)yk|k−1=Hχk|k−1x,χk|k−1n,y˜k−=∑i=02LWimyi,k|k−1,Py˜ky˜k=∑i=02LWicyi,k|k−1−y˜k−yi,k|k−1−y˜k−T,Px˜ky˜k=∑i=02LWicχi,k|k−1−x˜k−yi,k|k−1−y˜k−T.
According to the above calculation results, the posterior estimation of the state variable is modified:(38)y˜k=zk−z˜k|k−1,K=PxkykPy˜kx˜k−1,x˜k=x˜k−+Kyk−y˜k−,Pk=Pk−−KPy˜ky˜kKT.
Therefore, the SOC of lithium batteries can be estimated in real time by updating the system state variablex˜k.
The unscented Kalman filtering algorithm does not need to preprocess the nonlinear system, so it only needs to discretize formula (14), as shown below.
Letx=SOCU1U2⋯UnT,y=U, then the state equation of lithium battery is(39)SOCk+1U1k+1U2k+1⋮Unk+1=1000001−T/τ1000001−T/τ200000⋱⋮000⋯1−T/τnSOCkU1kU2k⋮Unk+−TQNTC1TC2⋯TCnTIk+wk.
The output equation is(40)yk=UocSOC−∑i=1nUi+IkRe+vk.
In the experiment, the open circuit voltage of the lithium battery is measured at 4.18 V, so its initial charged state value is 0.995. Therefore, the initial state of the unscented Kalman filter operator is as follows:(41)x0=0.99500⋯0T,P0=111⋱1.


## 2.1. Model Establishment

The experimental supercapacitor used in this paper is shown in Figure2. The supercapacitor is 25 mm in diameter and 2 mm in height. Nitrogen-doped graphene was selected as the negative electrode material, nickel hydroxide was used as the positive electrode, and the electrolyte was potassium hydroxide solution. Its operating voltage is 0.9 V–1.5 V, and its rated capacity is 0.5 F under the condition of 0.1 A rated charge-discharge current. The experimental battery model in this paper is Samsung ICR 18650-20R, with rated voltage of 3.6 V, rated capacity of 2.15 Ah, and charge-discharge cutoff voltage of 4.2 V and 3.0 V, respectively.Figure 2
Supercapacitors used in the experiment.An appropriate circuit model is the prerequisite for accurate estimation of SOC. The positive pole of the circuit model of the supercapacitor used in the experiment can be built by the branch structure of resistor and capacitor in parallel, whereRf is Faraday resistance and Cf is pseudocapacitance. The negative electrode of an ultracapacitor can be equated with an ideal flat plate capacitor, represented by a Cd. Rs is equivalent series resistance. In addition, there should be equivalent parallel resistance Rp on the electrode, as shown in Figure 3(a). Thevenin’s equivalent circuit model includes equivalent internal resistance Re, a RC network, and voltage source Uoc. In the RC network, Rs is the polarization internal resistance, Cs is the polarization resistance, and Uoc is the open circuit voltage of lithium battery. In this paper, n additional RC networks were added on the basis of the Thevenin model to improve the model accuracy and denoted as the nRC model, as shown in Figure 3(b).Figure 3
Model of supercapacitor and lithium battery. (a) Supercapacitor equivalent circuit model; (b) nRC equivalent circuit model of lithium battery.
(a)(b)


## 2.2. The Function of Open Circuit Voltage and SOC

In this paper, programmable electronic load and power supply are selected to constitute the charging-discharge test module. Both of them communicate with the computer through R232 port to conduct charging-discharge cycle experiment on energy storage components. A three-electrode supercapacitor testing system was set up for constant current charge and discharge test, cyclic voltammetry test, and life test. The instrument used was CHI608A electrochemical workstation produced by the Shanghai Chenhua Instrument Company.This paper mainly uses the NI PCI 6221 high-speed data acquisition card to complete the collection of voltage and current signals of energy storage components in working state, then uses LabVIEW to transmit the data to the subsequent data processing module, and uses Matlab for calculation operation to complete the real-time estimation of the SOC of supercapacitors and lithium batteries. The computer used was Intel E5400 CPU, 2 GB RAM, and Windows XP operating system, as shown in Figure4Figure 4
(a) The NI PCI 6221 acquisition card; (b) experimental platform of supercapacitor and lithium battery charged state estimation system.
(a)(b)In general, when lithium batteries and supercapacitors work normally, their open circuit voltage cannot be directly obtained, so the functional relationship between open circuit voltage and SOC needs to be obtained in advance. The open circuit voltage of the supercapacitor model is monitored in real time, and then the functional relationship between open circuit voltage and SOC is determined. The specific steps are shown in Table1.Table 1
Experimental steps of the relationship between open circuit voltage and SOC function of supercapacitors.
Step1: initialize the supercapacitorThe supercapacitor was continuously discharged by 0.1 A current for 0.5 s, and then it was cut off and placed in a standing state for 5 sStep2: supercapacitor charging process(1) 0.1 A current is used to charge the supercapacitor in a constant current for 0.5 s, and then the supercapacitor is disconnected and placed in a standing state for 5 s(2) 0.1 A current is applied to charge the supercapacitor in a constant current for 1 s, and then the circuit is cut off and placed in a standing state for 5 s. Repeat this step for 6 times, and then the supercapacitor is fully filled (SOC = 1)Step3: discharge process of supercapacitor(1) 0.1 A current is used to continuously discharge the supercapacitor for 0.5 s, and then the supercapacitor is cut off and placed in a standing state for 5 s(2) 0.1 A current is used for constant discharge of the supercapacitor for 1 s, and then it is cut off and placed in a standing state for 5 s. Repeat this step for 6 times, and then the supercapacitor is completely emptied (SOC = 0)Complete the above experimental steps and fit the data. Firstly, the minimum value of the voltage in the 8 standing intervals in Step 2 and the maximum value of the voltage in the 8 standing intervals in Step 3 are obtained, respectively; then, the average value of the two is taken at each point, and then the curve is fitted to obtain the functional relationship between the open circuit voltage and SOC as shown in equation (1), and the curve is shown in Figure 5:(1)OCV=0.004525SOC5+0.5864SOC4−1.265SOC3+0.6658SOC2+0.6116SOC1+0.8972.Figure 5
The relationship between SOC and OCV in supercapacitor.Similarly, experimental steps of the relationship between open circuit voltage and SOC function of lithium battery are shown in Table2.Table 2
Experimental steps of the relationship between open circuit voltage and SOC function of lithium battery.
Step1: initialize the lithium battery(1) The experimental battery model in this paper is Samsung ICR 18650-20R, with rated voltage of 3.6 V, rated capacity of 2.15 Ah, and charge-discharge cutoff voltage of 4.2 V and 3.0 V, respectively(2) Under the condition that the battery is fully full, namely, SOC = 1. The 0.215 A current is used to continuously discharge the battery until it is completely emptied, that is, SOC = 0, and then the battery is disconnected and left standing for 12 hStep2: (1) 0.43 A current is used for constant current charging of the lithium battery until its capacity increases by 215 mAh, and then it is cut off and kept in a standing state of 90 s(2) Repeat Step 1 for a total of 9 times, and at this moment, SOC = 1; then, disconnect the lithium battery and leave it for 12 hStep3: (1) 0.43 A current carries out constant current discharge on the lithium battery until its capacity is reduced by 215 mAh and then puts it in a static state of 90 s(2) Repeat Step 1 for a total of 9 times. At this moment, SOC = 0, and then disconnect the lithium battery and leave it in a standing state for 12 hComplete the above experimental steps and fit the data. Firstly, the minimum value of the voltage in the 10 static intervals in Step 2 and the maximum value of the voltage in the 10 static intervals in Step 3 are obtained, respectively. Then, the average value of the two points is taken for curve fitting to obtain the functional relationship between open circuit voltage and SOC of lithium battery as shown in equation (2), and the curve is shown in Figure 6:(2)OCV=14.42SOC5−40.89SOC4+44.02SOC3−21.76SOC2+5.11SOC+3.30.Figure 6
The relationship between SOC and OCV in lithium battery.


## 2.3. Identification Model Parameters

In order to improve the model accuracy, the recursive least square method with forgetting factor is used to identify the parameters of the supercapacitor model online. The forgetting factor can reduce the weight of the outdated data in the system, while the newly sampled data will assign the weight value to ensure the accuracy and real-time performance of the system. The recursive least square method with forgetting factor is shown below.Firstly, the system in formula (3) is defined as follows:(3)yk=φnTkθnk+ek.In the above equation,yk is the system output variable; θn(k) is the parameter to be estimated; e(k) is the error matrix; k is the kth period, and the length of the period is T.The gain matrix of the system is(4)Kk+1=Pkφnk+1λ+φnTk+1Pkφnk+1.System variance is updated as(5)Pk+1=Pk−Kk+1φnTk+1Pkλ.System parameter identification is updated as(6)θ^nk+1=θ^nk+Kk+1yk+1−φnTk+1θ^k.In the above equation,θ^nkis the optimal identification of the system, namely, model parameters; K(k) is the system gain matrix; P(k) is the system variance matrix; λ is the oblivion factor, and λ∈0.95,1. Therefore, if the recursive least square method with forgetting factor is to be used, the equation of state should be adjusted to meet the requirements of the parameter identification algorithm, as shown in equation (7):(7)yk=φTkθk.According to the supercapacitor model in Figure3(a), equation (8) can be obtained:(8)Is=I1s+I2s,Us=I2sRp=I1sRs+1Cds+Rf1+RfCfs.For the simultaneous equations, equation (9) can be obtained:(9)Gs=UsIs=RpCdCfRsRfs2+CdRf+CfRf+CdRss+1CdCfRfRs+Rps2+CdRp+CdRf+CfRf+CdRss+1.Using bilinear transformations=21−z−1/T1+z−1, we can get(10)Gz−1=a3+a4z−1+a5z−21−a1z−1−a2z−2.Therefore, the difference equation is shown in the following equation:(11)Uk−a1Uk−1−a2Uk−2=a3Ik+a4Ik−1+a5Ik−2,transposition to(12)Uk=a1Uk−1+a2Uk−2+a3Ik+a4Ik−1+a5Ik−2.In the form of formula (3), we can get(13)φcTk=Uk−1Uk−2IkIk−1Ik−2,θck=a1a2a3a4a5T.To sum up, the model parameters of the supercapacitor can be identified online according to equation (13).The charge and discharge process of lithium batteries is much more nonlinear than that of supercapacitors. In this section, the recursive least square method with forgetting factor and Kalman filter algorithm are used to identify the online parameters of the lithium battery model. Considering the hardware processing capacity of the laboratory, 1RC, 2RC, and 3RC models are mainly used for analysis in this paper. As shown in Figure3(b), the state equation of the nRC equivalent circuit model is shown in(14)SOC′t=−itQn,Ui′t=−1τiUit+1Ciit,i=1,2,3,…,Ut=UocSOC,t−∑i=1nUi−Reit.Among them,τ is the time constant; Uoc(SOC, t) is the relationship between open circuit voltage and SOC, namely, equation (2). After sorting out equation (14), the complex frequency domain form can be obtained as follows:(15)Us=Uocs−IsRe+∑i=1nRi1+RiCis.Whenn = m, the space-state equation of the nRC model is shown as follows:(16)Us=Uocs−IsRe+∑k=1mRk1+RkCks.According to the bilinear transformation factor, we can get(17)Gz−1=bm+1+bm+2z−1+⋯+b2m+1z−m1−b1z−1−⋯−bmz−m=bm+1+∑q=m+22m+1bqz−q+m+11−∑q=1mbqz−q.Discrete equation (17) can be obtained as follows:(18)UΔk=1−∑q=1mbqUk+∑q=1mbqUk−q+∑q=m+12m+1bqIk−q+m+1,Uk=1−∑q=1mcqUock+∑q=1mcmUk−q+∑q=m+12m+1Ik−q.It can be obtained in the form of formula (7):(19)φmTk=1Uk−1Uk−2⋯Uk−mIk−1Ik−2⋯Ik−m,θmk=1−∑q=1mcqUockc1c2⋯c2m+1T.In this section, the recursive least square method with forgetting factor and Kalman filter algorithm are used to complete the online identification of lithium battery model parameters. The principle of the former has been introduced in the parameter identification part of the supercapacitor model, so it will not be repeated. In the specific application of the latter, it should be assumed that the system state variablex = θ, the output variable y = U, and the noise is an independent Gaussian white noise whose variance is, respectively, r and e. Then, based on the principle of the Kalman filtering algorithm, the corresponding parameter identification process is shown as follows:(20)θk+1=θk+rk,yk=φkTθk+ek,where the corresponding parameter matrix is A=I4×4,B=0,C=φTk,D=0, so the parameters of the lithium battery model can be identified in real time as the state variable.


## 2.4. SOC Estimation

The Kalman filtering algorithm is used to estimate SOC of supercapacitors. Firstly, the system in equation (21) is defined as follows:(21)xk+1=Akxk+Bkuk+wk,yk=Ckxk+Dkuk+vk,where xk is the system state variable; yk is a systematic observation variable; uk is the system input, which can also be regarded as the system control variable; Ak is the transfer matrix; Bk is the input matrix; Ck is the measurement matrix; Dk is feedforward matrix; wk and vk are the system state equation and measurement equation noise, respectively, and wk ∼ N(0, Qk), vk ∼ N(0, Rk).According to the Kalman filtering algorithm, the time of the system is updated as follows:(22)x˜k−=Ak−1x˜k−1++Bkuk,Pk−Ak−1Pk−1+Ak−1T+Q.The Kalman gain matrix is(23)Kk=Pk−CkTCkPk−CkT+R−1.The system status measurement is updated as(24)x˜k+=x˜k−+Kkyk−Cx˜k−−Duk,Pk+=I−KkCkPk−.In the above equation,x˜k+ is the optimal estimation of system state variable at time k; Pk+ is the best estimate of variance at time k.In this paper, the state equation of the supercapacitor model is not fixed under charging and discharging conditions, so the charging and discharging conditions should be discussed separately.


### 2.4.1. Space-State Equation of Supercapacitor Charging Process

The current flow direction during charging is shown in Figure7(a).Figure 7
Charge-discharge current flow diagram of the supercapacitor model. (a) The supercapacitor model in charge process; (b) the supercapacitor model in discharge process.
(a)(b)Based on Ohm’s law, equation (25) can be obtained:(25)U−U0=I2Rp=I1Rs+Ud+Uf,I=I1+I2,where Uf and Ud are the partial pressures on capacitance Cf and Cd, respectively.From the above equation, equation (26) can be obtained:(26)I1=IRp−Ud−UfRp+Rs,I2=IRs+Ud+UfRp+Rs.On the capacitor branch, the current relationship as shown in equation (27) is established:(27)I1=UfRf+CfUf′=CdUd′.From equation (26) and (27), equation (28) can be obtained:(28)Uf′=−1Rp+RsCfUf+Ud−IRp−UfRfCf,Ud′=−1Rp+RsCdUf+Ud−IRp.From equation (25) and (28), we can get(29)U=RpRp+RsUf+Ud+IRs,and with x = [UfUd]T and y = U, the state equation of supercapacitor can be arranged as follows:(30)Ufk+1Udk+1=1−TCf1Rp+Rs+1Rf−TRp+RsCf−TRp+RsCd1−TRp+RsCdUfkUdk+TRpRp+RsCfTRpRp+RsCdIk+wk,yk=RpRp+RsRpRp+RsUfkUdk+RpRsRp+RsIk+vk.


### 2.4.2. Space-State Equation of Supercapacitor Discharging Process

The current flow direction during discharging is shown in Figure7(b). Similarly, the state equation of the discharge process can be expressed as(31)Ufk+1Udk+1=1+TCf1Rp−Rs+1RfTRp−RsCfTRp−RsCd1+TRp−RsCdUfkUdk+−TRpRp−RsCf−TRpRp−RsCdIk+wk,yk=RpRp−RsRpRp−RsUfkUdk−RpRsRp+RsIk+vk.Therefore, the voltageUf and Ud of capacitors Cf and Cd in the ultracapacitor model can be estimated in real time by the Kalman filtering algorithm. The open circuit voltage is the sum of the above two, and its charged state can be obtained by using the known relationship between the open circuit voltage and SOC function of the ultracapacitor. In the experiment, the open circuit voltage of the supercapacitor is 1.5 V, so its initial SOC value is 1. Therefore, the initial state of the Kalman filter operator is as follows:(32)x0=10.5T,P0=11.There are complex electrochemical reactions in the charging and discharging process of lithium battery, so its SOC cannot be directly observed or measured. Therefore, its SOC is regarded as a state variable and put into its space-state equation. The unscented Kalman filter algorithm is used to complete the estimation, and the steps are as follows.Step 1.
System initialization(33)x˜0=Ex0,P0=Ex0−x˜0x0−x˜0T.Step 2.
Sampling the sigma point set(34)χ0,k−1=x˜k−1a,χi,k−1=x˜k−1a+N+λPk−1i,i=1,…,L,χi,k−1=x˜k−1a−N+λPk−1i,i=L+1,…,2L,W0m=λL+λ;W0c=λL+λ+1−α2+β,Wim=Wic=12L+λ,i=1,…,2L,χk−1a=x˜k−1a,x˜k−1a+N+λPk−1,x˜k−1a−N+λPk−1;λ=α2L+κ−L.
In the above equation,α is the distance between the set of sigma points and the points of the state variable, which generally takes a smaller value; k is usually 0 or 3 − n; β can incorporate the prior information into the state variable, which is usually β = n for Gaussian distributions.Step 3.
Time update
The set of sigma points is substituted into the nonlinear system:(35)χk|k−1x=Fχk−1i,i=1,…,2L.
State variables and their variances are predicted according to the centralized value of sigma points:(36)x˜k−=∑i=02LWimχi,k|k−1x,Px−=∑i=02LWicχi,k||k−1x−x˜k−χi,k|k−1x−x˜k−T.Step 4.
Measure update
The predicted value and variance of the output can be obtained from the new sigma point set after the above time update:(37)yk|k−1=Hχk|k−1x,χk|k−1n,y˜k−=∑i=02LWimyi,k|k−1,Py˜ky˜k=∑i=02LWicyi,k|k−1−y˜k−yi,k|k−1−y˜k−T,Px˜ky˜k=∑i=02LWicχi,k|k−1−x˜k−yi,k|k−1−y˜k−T.
According to the above calculation results, the posterior estimation of the state variable is modified:(38)y˜k=zk−z˜k|k−1,K=PxkykPy˜kx˜k−1,x˜k=x˜k−+Kyk−y˜k−,Pk=Pk−−KPy˜ky˜kKT.
Therefore, the SOC of lithium batteries can be estimated in real time by updating the system state variablex˜k.
The unscented Kalman filtering algorithm does not need to preprocess the nonlinear system, so it only needs to discretize formula (14), as shown below.
Letx=SOCU1U2⋯UnT,y=U, then the state equation of lithium battery is(39)SOCk+1U1k+1U2k+1⋮Unk+1=1000001−T/τ1000001−T/τ200000⋱⋮000⋯1−T/τnSOCkU1kU2k⋮Unk+−TQNTC1TC2⋯TCnTIk+wk.
The output equation is(40)yk=UocSOC−∑i=1nUi+IkRe+vk.
In the experiment, the open circuit voltage of the lithium battery is measured at 4.18 V, so its initial charged state value is 0.995. Therefore, the initial state of the unscented Kalman filter operator is as follows:(41)x0=0.99500⋯0T,P0=111⋱1.


## 2.4.1. Space-State Equation of Supercapacitor Charging Process

The current flow direction during charging is shown in Figure7(a).Figure 7
Charge-discharge current flow diagram of the supercapacitor model. (a) The supercapacitor model in charge process; (b) the supercapacitor model in discharge process.
(a)(b)Based on Ohm’s law, equation (25) can be obtained:(25)U−U0=I2Rp=I1Rs+Ud+Uf,I=I1+I2,where Uf and Ud are the partial pressures on capacitance Cf and Cd, respectively.From the above equation, equation (26) can be obtained:(26)I1=IRp−Ud−UfRp+Rs,I2=IRs+Ud+UfRp+Rs.On the capacitor branch, the current relationship as shown in equation (27) is established:(27)I1=UfRf+CfUf′=CdUd′.From equation (26) and (27), equation (28) can be obtained:(28)Uf′=−1Rp+RsCfUf+Ud−IRp−UfRfCf,Ud′=−1Rp+RsCdUf+Ud−IRp.From equation (25) and (28), we can get(29)U=RpRp+RsUf+Ud+IRs,and with x = [UfUd]T and y = U, the state equation of supercapacitor can be arranged as follows:(30)Ufk+1Udk+1=1−TCf1Rp+Rs+1Rf−TRp+RsCf−TRp+RsCd1−TRp+RsCdUfkUdk+TRpRp+RsCfTRpRp+RsCdIk+wk,yk=RpRp+RsRpRp+RsUfkUdk+RpRsRp+RsIk+vk.


## 2.4.2. Space-State Equation of Supercapacitor Discharging Process

The current flow direction during discharging is shown in Figure7(b). Similarly, the state equation of the discharge process can be expressed as(31)Ufk+1Udk+1=1+TCf1Rp−Rs+1RfTRp−RsCfTRp−RsCd1+TRp−RsCdUfkUdk+−TRpRp−RsCf−TRpRp−RsCdIk+wk,yk=RpRp−RsRpRp−RsUfkUdk−RpRsRp+RsIk+vk.Therefore, the voltageUf and Ud of capacitors Cf and Cd in the ultracapacitor model can be estimated in real time by the Kalman filtering algorithm. The open circuit voltage is the sum of the above two, and its charged state can be obtained by using the known relationship between the open circuit voltage and SOC function of the ultracapacitor. In the experiment, the open circuit voltage of the supercapacitor is 1.5 V, so its initial SOC value is 1. Therefore, the initial state of the Kalman filter operator is as follows:(32)x0=10.5T,P0=11.There are complex electrochemical reactions in the charging and discharging process of lithium battery, so its SOC cannot be directly observed or measured. Therefore, its SOC is regarded as a state variable and put into its space-state equation. The unscented Kalman filter algorithm is used to complete the estimation, and the steps are as follows.Step 1.
System initialization(33)x˜0=Ex0,P0=Ex0−x˜0x0−x˜0T.Step 2.
Sampling the sigma point set(34)χ0,k−1=x˜k−1a,χi,k−1=x˜k−1a+N+λPk−1i,i=1,…,L,χi,k−1=x˜k−1a−N+λPk−1i,i=L+1,…,2L,W0m=λL+λ;W0c=λL+λ+1−α2+β,Wim=Wic=12L+λ,i=1,…,2L,χk−1a=x˜k−1a,x˜k−1a+N+λPk−1,x˜k−1a−N+λPk−1;λ=α2L+κ−L.
In the above equation,α is the distance between the set of sigma points and the points of the state variable, which generally takes a smaller value; k is usually 0 or 3 − n; β can incorporate the prior information into the state variable, which is usually β = n for Gaussian distributions.Step 3.
Time update
The set of sigma points is substituted into the nonlinear system:(35)χk|k−1x=Fχk−1i,i=1,…,2L.
State variables and their variances are predicted according to the centralized value of sigma points:(36)x˜k−=∑i=02LWimχi,k|k−1x,Px−=∑i=02LWicχi,k||k−1x−x˜k−χi,k|k−1x−x˜k−T.Step 4.
Measure update
The predicted value and variance of the output can be obtained from the new sigma point set after the above time update:(37)yk|k−1=Hχk|k−1x,χk|k−1n,y˜k−=∑i=02LWimyi,k|k−1,Py˜ky˜k=∑i=02LWicyi,k|k−1−y˜k−yi,k|k−1−y˜k−T,Px˜ky˜k=∑i=02LWicχi,k|k−1−x˜k−yi,k|k−1−y˜k−T.
According to the above calculation results, the posterior estimation of the state variable is modified:(38)y˜k=zk−z˜k|k−1,K=PxkykPy˜kx˜k−1,x˜k=x˜k−+Kyk−y˜k−,Pk=Pk−−KPy˜ky˜kKT.
Therefore, the SOC of lithium batteries can be estimated in real time by updating the system state variablex˜k.
The unscented Kalman filtering algorithm does not need to preprocess the nonlinear system, so it only needs to discretize formula (14), as shown below.
Letx=SOCU1U2⋯UnT,y=U, then the state equation of lithium battery is(39)SOCk+1U1k+1U2k+1⋮Unk+1=1000001−T/τ1000001−T/τ200000⋱⋮000⋯1−T/τnSOCkU1kU2k⋮Unk+−TQNTC1TC2⋯TCnTIk+wk.
The output equation is(40)yk=UocSOC−∑i=1nUi+IkRe+vk.
In the experiment, the open circuit voltage of the lithium battery is measured at 4.18 V, so its initial charged state value is 0.995. Therefore, the initial state of the unscented Kalman filter operator is as follows:(41)x0=0.99500⋯0T,P0=111⋱1.


## 3. Experimental Results and Analysis

### 3.1. SOC Estimation and Analysis of Supercapacitors

The parameter identification results of the supercapacitor model are shown in Figure8. All the five parameter identification curves tend to be stable at the initial stage of the charge-discharge experiment, where the capacitance values of capacitor elements Cd and Cf tend to be 1.05f and 0.45f, respectively. The variation trend of capacitance Cf is approximately opposite to that of resistance Rf, which proves that the time constant of the RC network structure is relatively stable.Figure 8
Parameter identification of the supercapacitor model. (a) Identification results of negative capacitance parameterCd; (b) identification result of equivalent parallel resistance Rp; (c) identification result of equivalent series resistance Rs; (d) identification results of positive capacitance parameter Cf; (e) identification result of Faraday resistance Rf.
(a)(b)(c)(d)(e)The estimated SOC of the supercapacitor is shown in Figure9. The error range of SOC based on the Kalman filtering algorithm is [−0.94%, 0.34%], and the root mean square error (RMSE) is 0.0044, indicating that its true value is in good agreement with the estimated value.Figure 9
SOC estimation results and errors of supercapacitors.
(a)(b)


### 3.2. SOC Estimation and Analysis of Lithium Battery

According to the second section, the estimated SOC of 1RC, 2RC, and 3RC models identified by the least square method is, respectively, recorded as SOCL1, SOCL2, and SOCL3. Similarly, those identified by the Kalman filtering algorithm are denoted as SOCK1, SOCK2, and SOCK3, respectively.Figure10 shows the estimation curves of SOCL1, SOCL2, and SOCL3 and their corresponding errors. In contrast, the errors of SOCL2 and SOCL3 are relatively low, changing within the range [−1.16%, 0.85%] and [−0.61%, 0.90%], respectively, indicating that the 3RC model can describe lithium batteries more accurately.Figure 10
The SOC estimation results and errors of nRC models identified by the RLS method.
(a)(b)Figure11 shows the estimation curves of SOCK1, SOCK2, and SOCK3 and their corresponding errors. Different from the SOCL approach, the accuracy of SOCK1 and SOCL1 is significantly improved. In addition, SOCK2 and SOCK3 errors belong to the interval [−0.6%, 0] and [−0.40%, 0.31%], respectively. It is proved that the model parameter identification ability of the Kalman filter algorithm is better than the recursive least square method (Table 3).Figure 11
The SOC estimation results and errors of nRC models identified by the KF method.
(a)(b)Table 3
The error and RMSE of SOCL and SOCK.
SOCError range (%)RMSESOCL1[−4.41, 1.91]0.0175SOCL2[−1.16, 0.85]0.0067SOCL3[−0.61, 0.90]0.0030SOCK1[−1.04, 2.08]0.0113SOCK2[−0.60, 0]0.0034SOCK3[−0.40, 0.31]0.0018To evaluate an algorithm, the accuracy and the amount of calculation should be considered comprehensively. In this paper, the accuracy of the algorithm is the integral after taking the absolute value of the errors of different algorithms. The real-time working voltage and current data of lithium battery during the experiment were recorded and saved and then brought into Matlab for offline calculation. The data were repeated for 20 times, and the mean value of the calculation time was taken, so as to simulate the real-time calculation amount during the experiment. The above calculation is shown in Table4.Table 4
The estimation accuracy and complexity of SOCL and SOCK.
SOCError integrationTime consumption (s)SOCL1171.765.49SOCL266.9910.46SOCL336.9817.12SOCK197.938.71SOCK239.8515.32SOCK317.2229.18As shown in Table4, the more RC networks in the model, the smaller the estimation error, but the calculation amount also increases correspondingly. At the same time, more RC network will weaken the improvement effect of model accuracy. In addition, SOCK path precision is higher than SOCL path precision, but the calculation time is longer. To sum up, the 1RC model has low accuracy, the 3RC model is more complex, and the 2RC model is the appropriate choice. If the system requires high accuracy and has strong data processing capacity, the SOCK2 method should be selected; otherwise, the SOCL2 method is more reasonable.


## 3.1. SOC Estimation and Analysis of Supercapacitors

The parameter identification results of the supercapacitor model are shown in Figure8. All the five parameter identification curves tend to be stable at the initial stage of the charge-discharge experiment, where the capacitance values of capacitor elements Cd and Cf tend to be 1.05f and 0.45f, respectively. The variation trend of capacitance Cf is approximately opposite to that of resistance Rf, which proves that the time constant of the RC network structure is relatively stable.Figure 8
Parameter identification of the supercapacitor model. (a) Identification results of negative capacitance parameterCd; (b) identification result of equivalent parallel resistance Rp; (c) identification result of equivalent series resistance Rs; (d) identification results of positive capacitance parameter Cf; (e) identification result of Faraday resistance Rf.
(a)(b)(c)(d)(e)The estimated SOC of the supercapacitor is shown in Figure9. The error range of SOC based on the Kalman filtering algorithm is [−0.94%, 0.34%], and the root mean square error (RMSE) is 0.0044, indicating that its true value is in good agreement with the estimated value.Figure 9
SOC estimation results and errors of supercapacitors.
(a)(b)


## 3.2. SOC Estimation and Analysis of Lithium Battery

According to the second section, the estimated SOC of 1RC, 2RC, and 3RC models identified by the least square method is, respectively, recorded as SOCL1, SOCL2, and SOCL3. Similarly, those identified by the Kalman filtering algorithm are denoted as SOCK1, SOCK2, and SOCK3, respectively.Figure10 shows the estimation curves of SOCL1, SOCL2, and SOCL3 and their corresponding errors. In contrast, the errors of SOCL2 and SOCL3 are relatively low, changing within the range [−1.16%, 0.85%] and [−0.61%, 0.90%], respectively, indicating that the 3RC model can describe lithium batteries more accurately.Figure 10
The SOC estimation results and errors of nRC models identified by the RLS method.
(a)(b)Figure11 shows the estimation curves of SOCK1, SOCK2, and SOCK3 and their corresponding errors. Different from the SOCL approach, the accuracy of SOCK1 and SOCL1 is significantly improved. In addition, SOCK2 and SOCK3 errors belong to the interval [−0.6%, 0] and [−0.40%, 0.31%], respectively. It is proved that the model parameter identification ability of the Kalman filter algorithm is better than the recursive least square method (Table 3).Figure 11
The SOC estimation results and errors of nRC models identified by the KF method.
(a)(b)Table 3
The error and RMSE of SOCL and SOCK.
SOCError range (%)RMSESOCL1[−4.41, 1.91]0.0175SOCL2[−1.16, 0.85]0.0067SOCL3[−0.61, 0.90]0.0030SOCK1[−1.04, 2.08]0.0113SOCK2[−0.60, 0]0.0034SOCK3[−0.40, 0.31]0.0018To evaluate an algorithm, the accuracy and the amount of calculation should be considered comprehensively. In this paper, the accuracy of the algorithm is the integral after taking the absolute value of the errors of different algorithms. The real-time working voltage and current data of lithium battery during the experiment were recorded and saved and then brought into Matlab for offline calculation. The data were repeated for 20 times, and the mean value of the calculation time was taken, so as to simulate the real-time calculation amount during the experiment. The above calculation is shown in Table4.Table 4
The estimation accuracy and complexity of SOCL and SOCK.
SOCError integrationTime consumption (s)SOCL1171.765.49SOCL266.9910.46SOCL336.9817.12SOCK197.938.71SOCK239.8515.32SOCK317.2229.18As shown in Table4, the more RC networks in the model, the smaller the estimation error, but the calculation amount also increases correspondingly. At the same time, more RC network will weaken the improvement effect of model accuracy. In addition, SOCK path precision is higher than SOCL path precision, but the calculation time is longer. To sum up, the 1RC model has low accuracy, the 3RC model is more complex, and the 2RC model is the appropriate choice. If the system requires high accuracy and has strong data processing capacity, the SOCK2 method should be selected; otherwise, the SOCL2 method is more reasonable.


## 4. Conclusions

Based on the operating characteristics of supercapacitors and lithium batteries, the equivalent circuit models are established, respectively. In the supercapacitor model, the recursive least square algorithm with forgetting factor is used for parameter identification, then the Kalman filter method is used to estimate the open circuit voltage, and finally, the corresponding relationship between the open circuit voltage and SOC is used to complete the SOC estimation. For lithium batteries, nRC networks are set in the model because the charge and discharge process is much more nonlinear than that of supercapacitors. The recursive least square method and Kalman filter algorithm were used to identify the parameters of the lithium battery model, and then the unscented Kalman filter algorithm was used to estimate SOC.The experimental results show that the estimation results of supercapacitor reach a high accuracy, and the error range of the whole estimation is [−0.94%, 0.34%]. For lithium batteries, considering the accuracy and calculation amount comprehensively, the recursive least square method is combined with the 2RC model to obtain the optimal result. The estimation error is within the range of [−1.16%, 0.85%], and results verify the effectiveness of the SOC estimation system in this paper.



---

*Source: 8816250-2021-02-18.xml*