## 3 Optimal Configuration Model of Electric Thermal Storage Heating Equipment
### Objective Function
#### 3.1.4 Total Cost of Energy Storage System  
The ETSHE must also consider the cost issue while ensuring the quality of the power. The total cost of the energy storage system was selected as one of the objective functions. The equipment cost of an electric boiler is proportional to its rated heating capacity, which is equal to the design daily heat supply rating, thus Equation (11) is:  
\[C_{S}\Big{(}Q_{S}^{\epsilon}(Q_{S})\Big{)}=\rho_{S}Q_{S}^{\epsilon}(Q_{S})=\rho _{S}\max_{t=1,\ldots,24}\{Q_{S}(t)\} \tag{11}\]  
where \(\rho_{S}\) is the unit price corresponding to the unit heat supply of the electric boiler. \(Q_{S}^{\epsilon}(Q_{S})\) is the rated heat supply of the electric boiler. \(Q_{S}=[Q_{S}(1)\ Q_{S}(2)\ \ldots Q_{S}(24)]^{T}\) is a vector composed of the hourly heating capacity of the designed electric power boiler. Equipment Cost of Heat Storage Body  
The cost of the heat storage equipment is proportional to the volume of the equipment, then \(C_{X}(V_{X})=\rho_{X}V_{X}\), and \(\rho_{X},\ V_{X}\) are the unit price and volume of the heat storage body, respectively. Equipment Cost of Heat Storage Pump  
The key parameters of heat pump selection are head and flow. The head is only related to the building structure and was selected according to typical values, and the heat pump investment was proportional to the rated flow at a certain head [24; 25]. Therefore, the heat pump equipment cost can be expressed by Equation (12):  
\[C_{B}\Big{(}F_{B}^{\epsilon}(Q_{S},\theta)\Big{)}=\rho_{B}F_{B}^{\epsilon}(Q_{ S},\theta)=\rho_{B}\gamma C_{1}\frac{\max_{t=1,\ldots,24}\{Q_{S}(t)(1-\theta(t)) \}}{C_{W}\rho_{W}\Delta\tau_{T}} \tag{12}\]  
where \(\rho_{B}\) is the increased equipment investment for each additional unit of the rated flow of the heat pump. \(\gamma\) is the safety factor when calculating the rated flow, in this paper, \(\gamma=1.05\). \(C_{1}\) is the conversion constant of kilowatt hours and joules, here \(C_{1}=3.6\times 10^{6}\). \(\theta=[\theta(1)\ \theta(2)\ \ldots\theta(24)]^{T}\) is a vector formed by designing the hourly direct supply ratio of the electric power boiler, and \(C_{W}\rho_{W}\) are the specific heat and density of the heat medium. The difference in heat storage temperature is usually \(\Delta\tau_{T}=40\ ^{\circ}\)C [26]. The equipment cost of the control device is related to the complexity of the electric boiler system. It was found that the equipment cost of the control device is basically proportional to the rated heating capacity of the heating device of the electric boiler, which is shown as follows:  
\[C_{K}\Big{(}Q_{S}^{\epsilon}(Q_{S})\Big{)}=\rho_{C}Q_{S}^{\epsilon}(Q_{S}) \tag{13}\]  
where \(\rho_{C}\) is the investment cost of the control device for each additional 1 kW of the rated heating capacity of the electric boiler. This article does not consider the operation and maintenance costs of energy storage equipment, only the investment and installation costs of energy storage equipment were considered, so the total cost of ETSHE is given as Equation (14):  
\[f_{C_{T}(Q_{S},V_{X},\theta)}=k_{ins}\Big{[}C_{S}\Big{(}Q_{S}^{\epsilon}(Q_{S })\Big{)}+C_{X}(V_{X})+2C_{B}\Big{(}F_{B}^{\epsilon}(Q_{S},\theta)\Big{)} \Big{]}+C_{K}\Big{(}Q_{S}^{\epsilon}(Q_{S})\Big{)} \tag{14}\]  
where \(k_{ins}\) is the equipment installation cost coefficient. Usually, the equipment installation cost is about 20% of the total equipment cost, so we set \(k_{ins}=1.2\). Therefore, the location and capacity multi-objective optimization model of the energy storage system comprehensively considered the voltage deviation of the distribution network nodes, the total distortion rate of the current harmonics, the voltage fluctuation, and the total cost of the energy storage system. The objective function is shown as Equation (15):  
\[\left\{ \begin{array}{l}\min F=\epsilon f_{T_{HD_{u}}}+\delta f_{SUM}+\tau f_{ Ad}+\varsigma f_{CT(Q_{S},V_{X},\theta)}\\ \epsilon+\delta+\tau+\varsigma=1\end{array} \right.