## 3 The Configuration Optimization Model of Energy Storage Systems
### The Objective Function  
As the energy storage system planning problem interacts with its operating problem, the operational strategy should be considered in the configuration optimization model to guide the planning of the RIES. For this reason, the energy storage system planning and operation optimization are combined in this paper, and the model that aims at the optimal economics of the RIES is also established. The objective function is the minimum of the sum of energy storage configuration costs and daily operating costs of the RIES. The configuration costs contain the capacity configuration cost and power configuration cost. The operating costs include unit start-stop costs, maintenance costs, penalty costs and so forth.  
\[\begin{array}{l}\min f\\ =C_{\text{inv}}(E_{\text{s}}^{i},P_{\text{s}}^{i})+C_{\text{op}}(P_{y},P_{ \text{s}},P_{l})\\ =C_{\text{inv}}+\sum\limits_{t=1}^{T}\left[C_{\text{buy}}(t)+C_{\text{st}}(t) +C_{\text{mt}}(t)+C_{\text{cut}}(t)\right]\Delta t\\ \\ C_{\text{inv}}=\sum\limits_{i}\Bigl{\{}(C_{\text{e}}^{i}\,E_{\text{s}}^{i}+C _{\text{p}}^{i}P_{\text{s}}^{i})\frac{r_{0}(1+r_{0})^{Y_{i}}}{365{\left[{\left( {1+r_{0}}\right)^{Y_{i}}}-1\right]}\Bigr{\}}\\ C_{\text{buy}}(t)=uC_{\text{e}}P_{\text{e}}^{\text{net}}(t)+C_{\text{g}}P_{ \text{g}}^{\text{net}}(t)+\varepsilon C_{\text{CO}_{2}}P_{\text{P2G}}(t)\eta_ {\text{P2G}}\end{array} \tag{18}\]  
\[C_{\text{st}}(t)=\begin{array}{l}\max[0,U_{\text{EB}}(t)-U_{\text{EB}}(t-1)] C_{\text{st,EB}}=\max[0,U_{\text{MT}}(t)-U_{\text{MT}}(t-1)]C_{\text{st,MT}}\\ +\max[0,U_{\text{GB}}(t)-U_{\text{GB}}(t-1)]C_{\text{st,GB}}\end{array} \tag{19}\]  
\[C_{\text{mt}}(t)=C_{\text{PV}}P_{\text{PV}}(t)+C_{\text{WT}}P_{ \text{WT}}(t)+C_{\text{MT}}P_{\text{MT}}(t)+C_{\text{GB}}P_{\text{GB}}(t)\\ +C_{\text{EB}}P_{\text{EB}}(t)+C_{\text{P2G}}P_{\text{P2G}}(t)+\sum \limits_{i}C_{\text{s}}^{i}\Bigl{|}P_{\text{ch}}^{i}(t)-P_{\text{dis}}^{i}(t) \Bigr{|} \tag{20}\]  
\[C_{\text{cut}}(t)=C_{\text{cut}}P_{\text{cut}}(t) \tag{21}\]  
where the subscript \(y,s,l\) represents the source, storage and load, respectively; the subscript \(i\) represents the type of energy storage system (EES, TES, GES); \(C_{\text{inv}}\) is the daily average allocation cost over the life cycle; \(C_{\text{buy}}(t)\) is the purchase cost including the interaction cost with the grid and natural gas network, CO\({}_{2}\) material costs; \(C_{\text{st}}(t)\), \(C_{\text{mt}}(t)\), \(C_{\text{cut}}(t)\) are the start-stop cost, maintenance cost and abandonment cost, respectively; T is the total number of daily scheduling periods, and \(\Delta t\) is the unit scheduling time; \(C_{\text{e}}\), \(C_{\text{g}}\) are the electricity and natural gas prices; \(\varepsilon\), \(C_{\text{CO}_{2}}\) is the CO\({}_{2}\) coefficient required to generate unit natural gas and the CO\({}_{2}\) price; \(C_{\text{st,EB}}\), \(C_{\text{st,MT}}\), \(C_{\text{st,GB}}\) is the EB, MT, GB start-up costs respectively; \(U_{\text{EB}}\)(t), \(U_{\text{MT}}\)(t), \(U_{\text{GB}}\)(t) are the EB, MT, GB start and stop status at time \(t\) respectively; \(C_{\text{MT}}\), \(C_{\text{PV}}\), \(C_{\text{WT}}\), \(C_{\text{GB}}\), \(C_{\text{EB}}\), \(C_{\text{PEG}}\), \(C_{\text{$S$}}^{\text{}}\) are the unit power maintenance costs of MT, PV, WT, GB, EB, P2G, energy storage systems respectively; \(C_{\text{cut}}\) is the unit abandonment cost of PV and WT.