*2.3. Optimization Algorithm*

The power demands from the typical driving cycles are used as the input of the program, which are the foundations of the model simulation and the energy management implementation. The optimization is conducted by the PSO algorithm. There are three control coefficients (two thresholds and one power demand) that required to be determined, expressed by

$$X = \begin{bmatrix} P\_H \ P\_L \ P\_\sigma \end{bmatrix} \tag{12}$$

where *X* denotes the particle position in PSO algorithm.

The PSO algorithm is offline implemented with varying battery aging condition to do the optimization. The numerical processing of the PSO algorithm is described in Reference [27]. The scale of the particle swarm *M* = 60, the maximum iteration steps *N*p = 1000. For each particle *i*, the velocity and position are updated according to the following expression:

$$\begin{cases} V^i(k+1) = wV^i(k) + c\_1r\_1(P^i(k) - X^i(k)) + c\_2r\_2(G^i(k) - X^i(k))\\ X^i(k+1) = X^i(k) + V^i(k) \end{cases} \tag{13}$$

where w is inertia factor, *r*<sup>1</sup> and *r*<sup>2</sup> denote two random values, *r*1, *r*<sup>2</sup> ∈ (0, 1), *c*<sup>1</sup> and *c*<sup>2</sup> are weight coefficients, *Pi* denotes the best position of the particle *i* amongst the historical iterations, *Gi* denotes the best position within a certain neighborhood at the current iteration step.

Once the optimal *X* is obtained, the control policy *u* = [*PE*, *PBatt*] <sup>T</sup> can be further deduced based on previous blended strategy, denoted as *u* = *f*(*X*). It should be noticed that all these coefficients in *X* are treated as functions of SOH since the parameters-varying battery aging model has been adopted to replace the conventional battery model.

Thus, the optimal control policy is obtained by

$$\mu^\* = \begin{bmatrix} P\_E \\ P\_{Batt} \end{bmatrix} = f(X^\*(\text{SOH})) \tag{14}$$

It should be noted that the presented algorithm is using PSO to offline optimize the control policy under different aging condition and can be used in online implementation by a look-up table method. However, to implement the presented algorithm in real-time control, we need the battery management system (BMS) hardware to provide the online estimation of the current SOH and SOC information. Accurate estimations [31–34] are the premise guarantee for this method improving the energy economy improvement.

### **3. Impacts of Battery Aging**

The battery performance parameters will be notably changed after the battery is seriously aged, resulting in the influences of the total hybrid power sources and the optimal control policy. In order to establish a global optimal strategy, it is necessary to dynamically adjust the control parameters as the battery ages. Physical methods like X-ray diffraction and scanning electron microscopy are very useful to analyze the aging mechanism of the battery [35], but they are not suitable for onboard energy management application. In this section, the mathematical expression of the battery aging characteristics is presented and the parameters-varying aging model of lithium battery is used to incorporate the battery aging into the EMS design.

### *3.1. Modeling*

Here an equivalent circuit model, namely the first-order RC model, is employed to mimic the basic electrical behavior of the battery, as shown in Figure 3. The parameters in the model are treated as functions of battery SOC and SOH. In this study, the inconsistency of single cells is neglected and the battery SOC is supposed to be known correctly. SOH is described by

$$\text{LSOH} = \frac{Q\_{\text{Ratt}}}{Q\_{\text{Ratt\\_new}}} \times 100\% \tag{15}$$

where *QBatt* is the maximum capacity of the battery at current, *QBatt\_new* is the nominal capacity of the battery.

The parameters in this model are considered as functions of both SOH and SOC, described as

$$\mathcal{U}\_l \mathcal{U}\_l(k) = \mathcal{U}\_{\text{oc}}(z, \text{SOH}) - q\_B(k)R\_0(z, \text{SOH}) - \mathcal{U}\_p(k) \tag{16}$$

$$\mathcal{U}\_p(k) = \mathcal{U}\_p(k-1)e^{\frac{-\Lambda t}{\tau(z, \text{SOH})}} + \varphi\_B(k-1)\mathcal{R}\_p(z, \text{SOH}) \left(1 - e^{\frac{-\Lambda t}{\tau(z, \text{SOH})}}\right) \tag{17}$$

$$
\rho\_B(k) = \frac{P\_B(k)}{l!l\_t(k)}\tag{18}
$$

where *Ut* is the terminal voltage, *Uoc* is the open circuit voltage (OCV), *Up* is the voltage of the RC network, *Rp* and τ are resistance and time constant of RC network, respectively, *PB* is the battery output power, ϕ*<sup>B</sup>* is the battery current, *R*<sup>0</sup> is the internal resistance.

The maximum output power of the battery pack is treated as a function of battery SOC and SOH, and is calculated by a discrete solving process:

$$\begin{cases} I\_{\text{max}}^{\text{dis}} = \frac{\mathcal{U}\_{\text{oc}}(z\_{k}) - \mathcal{U}\_{p1,k+1} - \mathcal{U}\_{p2,k+1} - \mathcal{U}\_{t,\text{min}}}{\frac{\mathcal{V}\_{\text{cylged}}}{\mathcal{C}\_{\text{cylged}}} \frac{\partial \mathcal{U}\_{\text{cyl}}(z)}{\partial z}|\_{z=z\_{k}} + R\_{\text{dis}}} \\\ I\_{\text{min}}^{\text{chg}} = \frac{\mathcal{U}\_{\text{sc}}(z\_{k}) - \mathcal{U}\_{p1,k+1} - \mathcal{U}\_{p2,k+1} - \mathcal{U}\_{t,\text{max}}}{\frac{\mathcal{V}\_{\text{cyled}}}{\mathcal{C}\_{\text{cyled}}} \frac{\partial \mathcal{U}\_{\text{sc}}(z)}{\partial z}|\_{z=z\_{k}} + R\_{\text{chg}}} \\\ SoS\_{\text{dis}} = n\_{\text{s}} n\_{\text{P}} \{I\_{\text{max}}^{\text{dis}} \mathcal{U}\_{t,\text{min}}\} \\\ SoS\_{\text{clyg}} = n\_{\text{s}} n\_{\text{P}} \{I\_{\text{max}}^{\text{chg}} \mathcal{U}\_{t,\text{max}}\} \end{cases} \tag{19}$$

where *np* and *ns* are the parallel number and series number of the cells that contained in the lithium battery pack, *Ut*min is lower cut-off voltage.

**Figure 3.** Diagram of the first order RC model.
