*3.2. SOC Estimation Based on HKF*

Figure 7 shows the proposed HKF-based SOC estimation algorithm. This algorithm uses a two-layer filtering arrangement to proceed with SOC estimation. In the first layer, the error between the measured voltage (denoted by Vce) and the battery model output voltage (i.e., V) is utilized as the input to an EKF. The output from the EKF provides feedback to the established battery model to obtain a correctional SOC estimate, SOCEKF. The objective of the EKF is to dispose the nondeterminacy resulted from modeling defects. Thus, the estimation performance of SOC is improved. The second layer uses the KF to deal with the cumulative error caused by the Ah integration method. The specific way is that the error difference between SOCEKF and the SOC estimate came from the Ah integration method (namely SOCAh) is sent to a KF, then the output from the KF provides feedback to the Ah integration algorithm, producing a further correctional SOC estimate value, which is the output SOC. Therefore, the accuracy of SOC estimation can be further improved by the second filter.

**Figure 7.** Schematic diagram of the hybrid Kalman filter (HKF) algorithm.

To perform related calculations of the HKF, the DPM is converted into a state-space expression by Equations (5)–(7):

$$\begin{cases} \mathbf{x}\_{k+1} = A\mathbf{x}\_k + Bu\_k + \omega\_k\\ \mathbf{y}\_k = \mathbf{C}\mathbf{x}\_k + Du\_k + \nu\_k \end{cases} \tag{16}$$

Among those, the state variable of the system is set to *x* = [*SOC U*<sup>1</sup> *U*2]; the input is *u* = *I*, and the output is *y* = *U*. The definitions of *A, B, C,* and *D* are shown as follows:

$$A = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \exp\left(\frac{-t}{R\_1C\_1}\right) & 0 \\ 0 & 0 & \exp\left(\frac{-t}{R\_2C\_2}\right) \end{bmatrix} \tag{17}$$

$$B = \begin{bmatrix} \frac{\eta t}{Q} \\ R\_1 \left(1 - \exp\left(\frac{-t}{R\_1 C\_1}\right)\right) \\ R\_2 \left(1 - \exp\left(\frac{-t}{R\_2 C\_2}\right)\right) \end{bmatrix} \tag{18}$$

$$\mathbf{C} = \begin{bmatrix} dOCV & 1 & 1 \end{bmatrix} \tag{19}$$

$$D = \mathcal{R}\_0 \tag{20}$$

According to the FOM, the continuous state-space function can be expressed by Equations (21)–(23).

$$D^a V\_1(t) = -\frac{1}{R\_1 \mathbb{C}PE\_1} V\_1(t) + \frac{1}{\mathbb{C}PE\_1} I(t) \tag{21}$$

$$^jD^\beta V\_2(t) = -\frac{1}{R\_2 \text{CPE}\_2} V\_2(t) + \frac{1}{\text{CPE}\_2} I(t) \tag{22}$$

$$D^\gamma V\_W(t) = -\frac{1}{W} I(t) \tag{23}$$

According to the definition, the system state SOC of the FOM can be denoted as Equation (24):

$$D^1 SOC(t) = -\frac{\eta}{\mathcal{C}\_\mathbf{n}} I(t) \tag{24}$$

Supposing *x*(*t*) = [*V*1(*t*) *V*2(*t*) *V*W(*t*) *SOC*(*t*)] is state variable of the system, *u* = *I*(*t*) is the input of the system, and *y* = *U*d(*t*) is the output from the system. Therefore, the pseudo-system state equation of the FOM in this paper is built as follows:

$$\begin{cases} D^N \mathbf{x}(t+1) = A \mathbf{x}(t) + Bu(t) \\ y(t) = f[\mathbf{x}(t)] + \mathbf{C} \mathbf{x}(t) + Du(t) \end{cases} \tag{25}$$

where, the definitions of *A, B, C,* and *D* are shown in Equations (26)–(29):

$$A = \begin{bmatrix} -\frac{1}{\overline{R}\_1 C P E\_1} & 0 & 0 & 0\\ 0 & -\frac{1}{\overline{R}\_2 C P E\_2} & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 \end{bmatrix} \tag{26}$$

$$B = \begin{bmatrix} \frac{1}{\underline{CPE\_1}}\\\frac{1}{\underline{CPE\_2}}\\\ -\frac{1}{\underline{W}}\\\ -\frac{\eta}{\underline{C}\_n} \end{bmatrix} \tag{27}$$

$$\mathcal{C} = \begin{bmatrix} -1 & -1 & -1 & 0 \end{bmatrix} \tag{28}$$

$$D = \mathcal{R}\_0 \tag{29}$$

*U*OCV and SOC are functionally related. The fractional-order calculus and EKF principle are used to discretize Equation (25) as follows:

$$\begin{cases} \mathbf{x}\_{k+1} = A\_k \mathbf{x}\_k + B\_k \boldsymbol{u}\_k \\ \mathbf{y}\_k = \mathbf{C}\_k \mathbf{x}\_k + D\_k \boldsymbol{u}\_k \end{cases} \tag{30}$$

where *Ak*, *Bk*, *Ck* and *Dk* are defined as shown in Equations (31)–(34).

$$A\_k = \begin{bmatrix} \alpha - T^{\alpha} \frac{1}{R\_1 C P E\_1} & 0 & 0 & 0 \\ 0 & \beta - T^{\beta} \frac{1}{R\_2 C P E\_2} & 0 & 0 \\ 0 & 0 & \gamma & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} \tag{31}$$

$$B\_k = \begin{bmatrix} \frac{T^u}{\overline{CPE\_1}}\\ \frac{T^\beta}{\overline{CPE\_2}}\\ -\frac{T^\gamma}{\overline{W}}\\ -\frac{\eta T}{\overline{C\_u}} \end{bmatrix} \tag{32}$$

$$\mathcal{C}\_{k} = \begin{bmatrix} -1 & -1 & -1 \ \frac{df(SOC\_{k})}{dSOC} \end{bmatrix} \tag{33}$$

$$D\_k = \mathcal{R}\_0 \tag{34}$$
