## 5 Case study
### ES Device Capacity Optimization  
Particle Swarm Optimization (PSO) algorithm is applied to solve this problem. PSO algorithm is an evolutionary algorithm proposed by [PERSON] and [PERSON] in 1995 [45], and attracted extensive attention for its advantages in easy application, high precision and convergence speed. In this case, algorithm parameters are set as: iterations \(I_{\text{max}}=1000\); maximum speed \(V_{\text{max}}=50\); population size \(m=20\). \(I_{\text{max}}\) is set to avoid the iterative process being trapped into a loop, and the iterations will stop when no improvement (larger than \(10^{-5}\)) has occurred in the last 100 iterations [46]. The optimized LCC result of this planning scheme is $1,594,127 with \(ACR=0.4818\); specific results of optimized capacity are shown in Table 8, LCC costs of each device are shown in Table 9 and calculation results of each LCC component are shown in Table 10.  
The optimizing curve of LCC is illustrated in Figure 10.  
\(ACR\) is the ratio of optional compensated part for each stage of energy shortage. It reflects the improvement on supply reliability while basic requirements on power supply for level 1, level 2 and level 3 load are satisfied. \begin{table}
\begin{tabular}{c c c} \hline \hline
**LCC Component** & **Cost/\$** \\ \hline \(C_{\text{cap}}\) & 1,440,812 \\ \(C_{\text{om}}+C_{\text{P}}\) & 178,879 \\ \(C_{\text{r}}\) & \(-41\),310 \\ \(C_{\text{l}}\) & 15,746 \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Calculation results of each LCC component. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Device** & **Capacity** & **Lifetime/a** & **Times of Replacement** & **Total Cost/\$** \\ \hline Wind turbine & 450 kW & 20 & 0 & 1,400,000 \\ Photovoltaic & 48 kW & 20 & 0 & 21,600 \\ Super capacitor & 1.38 kWh & 20 & 0 & 10,000 \\ Li-ion battery & 5.73 kWh & 5.87 & 3 & 1722 \\ Lead-acid battery & 27 kWh & 7.13 & 2 & 2490 \\ Diesel generator & 100 kW & 20 & 0 & 5000 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Specified optimization result. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Device** & **Capital Cost/\$** &
\begin{tabular}{c} **Operation \& Maintenance/\$** \\ **(Considering Pollutant Emission)** \\ \end{tabular} & **Recycling Profit/\$** \\ \hline WT & 1,400,000 & 109,920 & \(-\)39,920 \\ PV & 21,600 & 1696 & \(-\)616 \\ SC & 10,000 & 393 & \(-\)285 \\ BESS & 4212 & 1662 & \(-\)346 \\ Diesel & 5000 & 65,219 & \(-\)143 \\ \hline \hline \end{tabular}
\end{table} 
Table 9: Life cycle costs (LCC) of each device. When \(ACR=0\), I, IV, VII in Figure 7 will be compensated while energy shortage of II, III, VI will be abandoned and calculated into compensation cost in \(C_{\rm L}\), as illustrated in Figure 11.  
The calculation result is shown in Figure 12.  
As illustrated, although the investment cost of ES devices slightly decreased (\(C_{\rm capSC}\) decreased by 4% and \(C_{\rm capBESS}\) decreased by 22%) compared with the optimal planning scheme at \(ACR=0.4818\),  
Figure 11: Compensated energy shortage (\(ACR=0\)). Figure 12: Calculation result at \(ACR=0\). Figure 10: Optimizing curve of life cycle cost (LCC). the compensation cost \(C_{\text{I}}\) significantly increased from $15,746 to $30,526 by 94%. The LCC result increased from $1,594,127 to $1,608,205. When \(ACR=1\), all parts of energy shortage in Figure 7 (I\(-\)VII) will be totally compensated (III, VI are reduced to zero), as illustrated in Figure 13. The compensation cost \(C_{\text{I}}\) is theoretically zero. The calculation result is shown in Figure 14.  
As illustrated, the compensation cost \(C_{\text{I}}\) is reduced to zero as expected. However, the investment costs of SC and BESS increase approximately 5.8 and 16 times than those of the optimal planning scheme at \(ACR=0.4818\) respectively. The LCC result increases to Figure 11.042,083 increase in the cost, while only $23,636 is needed for improving \(ACR\) from 0.6 to 0.7. Figure 11.1 Calculation result at \(ACR=1\). Figure 11.2 Compensated energy shortage (\(ACR=1\)).