# An Optimal Sizing Design Approach of Hybrid Energy Sources for Various Electric Vehicles
## 2 Development of Global Search Algorithm for HEESs
### The Procedures of the GSA
It can be listed as:  
\[E=\int_{0}^{t}P_{t}dt=\int_{0}^{t}(F(t)\times V(t))dt \tag{1}\]0  
where C is cost, and the subscripts \(HEES\), \(Ii3\), and \(LTO\) represent the HESS, Li3 battery, and LTO battery set, respectively. Individual costs of dual energy sources are listed as:  
\[E=\int_{0}^{t}P_{t}dt=\int_{0}^{t}(F(t)\times V(t))dt \tag{1}\]1  
\[E=\int_{0}^{t}P_{t}dt=\int_{0}^{t}(F(t)\times V(t))dt \tag{1}\]2  
where \(E\), \(SR\), \(SP\), \(PD\), \(SW\), \(SPDC\), \(i\), \(j\), and \(k\) represent stored energy, size ratio, specific price (USD/kWh), power density (kw/kg), specific weight (kWh/kg), specific price of DC/DC converter (USD/kW), index for searching the DC/DC converter, index for searching energy of HEES, and index for searching the size ratio, respectively. Thus the cost function \(J\) can be defined as follows:  
\[E=\int_{0}^{t}P_{t}dt=\int_{0}^{t}(F(t)\times V(t))dt \tag{1}\]3  
subject to  
\[E=\int_{0}^{t}P_{t}dt=\int_{0}^{t}(F(t)\times V(t))dt \tag{1}\]4  
\[E=\int_{0}^{t}P_{t}dt=\int_{0}^{t}(F(t)\times V(t))dt \tag{1}\]5  
\[E=\int_{0}^{t}P_{t}dt=\int_{0}^{t}(F(t)\times V(t))dt \tag{1}\]6  
\[E=\int_{0}^{t}P_{t}dt=\int_{0}^{t}(F(t)\times V(t))dt \tag{1}\]7  
\[\gamma(i,j,k)= \begin{cases}0&\text{if above equation satisfied}\\ 10^{6}&\text{if above equation unsatisfied}\end{cases}  \tag{17}\]  
where \(V\), \(W\), and \(\gamma\) represent volume, weight, and penalty value, respectively. Figure 2: The power variations with different acceleration settings (example). (3) GSA optimization with for-loops; after deriving the cost function, performance requirements, and the performance indices of dual energy sources, the GSA was proposed, as shown in Figure 3. First, three for-loops were constructed. The most outer loop was the DC/DC position with two possible values: \(i=\) [0, 1]. The second loop was the required total energy of the HESS with bounded values from \(E_{HESS,min}\) to \(E_{HESS,max}\). The increment of \(E_{HESS,inc}\) separated for the index of \(E_{HESS}\) was from \(j=1\) (\(E_{HESS,min}\)) to \(j=n\) (\(E_{HESS,max}\)). The total number n was calculated by: n = \(\frac{\left[E_{HESS,max}-E_{HESS,min}\right]}{E_{HESS,inc}}+1\). The most inner loop was the size ratio with bounded values from 0 to 1. The increment of \(SR_{inc}\) separated the index of \(SR\) from \(k=1\) (\(SR=0\)) to \(k=m\) (\(SR=1\)). The total number n was calculated from: m = \(\frac{[1-0]}{SR_{inc}}+1\). Therefore, the possible combinations of DC/DC converter positions, total energies of the HESS, and size ratios were \(2\times n\times m\) cases. At each case with a determined DC/DC converter position, total HESS energy, and size ratio, the energy of the Li3 battery was \(E_{Li3}=E_{HESS}(j)\times SR(k)\), while the energy of the LTO battery was \(E_{LTO}=E_{HESS}(j)\times[1-SR(k)]\). Next, physical constraints were calculated based on Equations (13)-(16) including \(D_{max}\), \(P_{max}\), \(V_{max}\), and \(W_{max}\). The value of \(\gamma\) can be determined if any of the constraints are satisfied or unsatisfied. The three-dimensional database with indices \(i,j,\) and \(k\) was constructed. (4) Optimal results; to determine the optimal solution at a specific DC/DC converter position and stored hybrid energy, the cost functions with various size ratios were compared. The cost function with a minimum value under a chosen size ratio was the best solution, while the size ratio was the optimal size ratio at a specific X (position of DC/DC converter). That is:  
\[{J_{1}}^{*}(i,j)=\min_{SR}({J_{1}}(i,j,k)) \tag{18}\]  
Next, for the outer layer, using different DC/DC converter positions, the final optimal solution can be determined and chosen from \({J_{1}}^{*}\). \[{J_{2}}^{*}(j)=\min_{X}({J^{*}}_{1}(i,j)) \tag{19}\]  
Figure 4 summarizes the flow chart of the GSA for optimal size ratio: (1) vehicle specification and performance requirements of energy sources, (2) determination of the cost function and constraints, (3) GSA optimization with for-loops, and (4) optimal results.