Distributed Thermal Energy Storage Configuration of an Urban Electric and Heat Integrated Energy System Considering Medium Temperature Characteristics

: Distributed thermal energy storage (DTES) provides specific opportunities to realize the sustainable and economic operation of urban electric heat integrated energy systems (UEHIES). However, the construction of the theory of the model and the configuration method of thermal storage for distributed application are still challenging. This paper analyzes the heat absorption and release process between the DTES internal heat storage medium and the heat network transfer medium, refines the relationship between heat transfer power and temperature characteristics, and establishes a water thermal energy storage and electric heater phase change thermal energy stor ‐ age model, considering medium temperature characteristics. Combined with the temperature transmission delay characteristics of a heat network, a two ‐ stage optimal configuration model of DTES for UEHIES is proposed. The results show that considering the temperature characteristics in the configuration method can accurately reflect the performance of DTES, enhance wind power utilization, improve the operation efficiency of energy equipment, and reduce the cost of the sys ‐ tem.


Introduction
In order to deal with increasingly severe energy and environmental problems, the development of renewable energy and the improvement of energy structures have become a common goal in many countries and regions [1,2]. Currently, wind power and other renewable power generation technologies are widely used in the field of renewable energy utilization [3]. However, due to the randomness and volatility of wind power, there are still some obstacles to its high usage proportion and stable consumption. The development of urban electric heat integrated energy systems (UEHIES) is an effective way to promote the utilization of large-scale renewable energy and reduce the operation and maintenance costs of energy systems, which have been a focus of scholars in recent years [4,5]. Among the various energy technologies, distributed thermal energy storage (DTES), represented by water storage [6] and phase change storage [7], has the distinguishing features of a flexible operation [8], short construction period, and low investment costs [9], which has a positive role in the further optimization of UEHIES. This method has attracted extensive attention from researchers all over the world. Reasonably configuring DTES has become an important research topic.
The DTES model is the basis of optimal configuration. In the current research into DTES configuration, the construction of DTES models mainly focuses on two aspects. exchange area, mass flow, and other parameters, are not reflected. This leads to a decline in model accuracy and brings about a deviation from the expected value in the design scheme. Secondly, presently, UEHIES is mostly described by power flow [18,22]. However, this method can hardly reflect the differences in all kinds of energy. As two energy forms with different energy attributes and transmission characteristics, electric and heat exhibit different actual operation performances, especially in the case of the temperature transmission delay in an urban heat network in UEHIES with long pipes and a large mass flow [24,25]. Some studies have shown that the two models, considering the temperature transmission delay characteristics and ignoring the operation schedules of heat sources, show obvious diversity [26], and the heat supply medium temperature of each node in the primary heat network is significantly different [27].
In view of the above, starting from the internal structure of DTES, this paper analyzes the heat charge and discharge performances of two typical DTES devices-water thermal energy storage (WTES) and electric heater phase change thermal energy storage (EH-PHTES)-and presents a DTES model considering medium temperature characteristics. Then, the temperature transmission delay characteristics of the heat network (TTD-HN) and the medium temperature characteristics of DTES (MTC-DTES) are introduced into the construction of a model of an urban heat network, and a two-stage optimal configuration method of DTES is proposed. The objective of the upper optimization stage is to minimize the comprehensive annual total cost of the whole system, and the layout nodes, the storage tank, and the heat exchanger capacity are selected. The objective of the lower optimization stage is to minimize the typical daily operation and maintenance costs. Combined heat and power (CHP) and thermal power generation (TPG) outputs, DTES heat charge and discharge power, and other operating parameters are taken as optimization objects. Finally, the effectiveness of the method is verified using a case study. Subsequently, the influences of different thermal storage equipment, load types, and wind power capacity on the DTES configuration are discussed and configuration schemes of distributed and centralized thermal energy storage are compared and analyzed.

Medium Temperature Characteristics of Distributed Thermal Energy Storage Models
In UEHIES, there may be a variety of thermal energy storage devices. According to the installation location, they can be divided into centralized and distributed. Centralized thermal energy storage is generally a large heat storage device which is installed in the heat source station. Distributed thermal energy storage aims to arrange small heat storage devices at the heat exchange station (HES), and regulate the heat power of HESs.
DTESs store heat using various heat storage mediums, absorb heat from the high temperature heat transfer medium of the primary heat network or from the electric heater equipment, and then release heat to the low temperature heat transfer medium from the secondary heat network. The temperature characteristics of the heat storage medium and heat transfer medium have an essential impact on the heat exchange process of DTES, which should not be ignored in the DTES configuration model. In this study, WTES and EH-PHTES, which are presently widely used, are taken as the specific research objects for modeling.

Water Thermal Energy Storage
WTES consists of a water tank, two heat exchangers (HEXs), and some pipes and valves. The water tank uses a natural stratification effect to store heat. The HEXs are responsible for charging heat from the primary heat network and discharging it to the secondary heat network. The storage medium in the water tank can be divided into three layers: the upper temperature zone, thermocline, and the lower temperature zone. The upper and lower temperature zones have a large thickness and a slight temperature difference in their respective regions, which can be approximately regarded as constant temperature regions and are the main effective utilization zones of energy storage. The thermocline has an obvious temperature change and small thickness and mainly plays the role of insulation and heat preservation. The HEX has a primary side and a secondary side. There is only heat exchange between the two sides and no hydraulic exchange. The high temperature medium flows in the primary side from the inlet to the outlet. The low temperature medium flows in the secondary side from the outlet to the inlet. The medium temperature zones and device connections of a WTES system are shown in Figure 1. During the heat charging period, the high temperature medium from the primary heat network flows into the primary side of the WTES HEX; afterwards, the heat is delivered to the secondary side of WTES HEX, increasing the temperature of the WTES circulating medium and storage medium [28,29]. The distances between the inlet, outlet, HEX, and water tank are usually very close. The heat loss in the transfer process is negligible. It is assumed that the heat power released by the heat transfer medium of the primary heat network, the heat power exchanged by the HEX, and the heat power received by the water tank are basically the same.
The relationship between the heat transfer and the storage medium is based on the heat exchange theory in [28,29]. It can be described as follows: The logarithmic mean temperature difference in Equation (2) is nonlinear, which is approximated linearly under the condition that: This condition can be satisfied in most counter flow DTES scenarios. The approximation of Equation (2) can be expressed as follow [34].
At the same time, it is assumed that the temperature of the heat network transfer medium flowing into the HEX is consistent with the temperature of the HES supply pipe connected to the primary heat network ( ,1

HES s T
). The temperature difference calculation formulas at the HEX inlet and outlet are taken from [34]. Some of the parameters in Equations (1)-(4) are shown in Equations (8)- (10).
According to Equations (1)-(4), the relationship between the WTES heat charging power and the temperature of the HES supply pipe connected to the primary heat network can be deduced; additionally, the relationship between the thermal resistance of WTES connected to the primary heat network and the mass flow of the primary heat network flowing into the HEX can also be deduced . The expression is as follows:  , , ,1  ave,  ,  , , ,1 where the subscript i is the node number, the subscript t is the time interval number, the subscript 1 is the connection to the primary heat network, and the subscript 2 is the connection to the secondary heat network. For example, It can be seen from Equations (11) and (12) that the heat charging power is positively correlated with medium temperature; the higher the temperature of the heat transfer medium, the higher the WTES heat charging power. The thermal resistance is negatively correlated with mass flow; the larger the mass flow, the smaller the thermal resistance coefficient. At the same time, the mass flow into the heat exchanger is controlled by relevant valves and water pumps, and its maximum value cannot exceed the mass flow of primary heat network in HES ( ,1 Similarly, the relationship between the WTES heat discharging power and the medium temperature of the HES return pipe connected to the secondary heat network, the relationship between the thermal resistance of WTES system connected to the secondary heat network and the mass flow of the secondary heat network into the HEX, are as follows:   , , , ,2 , , , 2 where , , is the heat discharging power of WTES and is the thermal resistance of WTES connected to the secondary heat network. It can be seen from Equations (14) and (15) that the heat discharging power is negatively correlated with medium temperature; the lower the temperature of the heat transfer medium, the higher the WTES heat discharging power. The thermal resistance is negatively correlated with the mass flow; the larger the mass flow, the smaller the thermal resistance coefficient. At the same time, the mass flow's maximum value cannot exceed the mass flow of primary heat network in the HES ( ,2 HES i m ). , ,2 ,2 In the configuration process, the configuration heat capacity ( , is usually related to the volume of the container [8,20]. In this article, it indicates the heat when the water tank is full of the upper temperature medium, representing the maximum heat storage quantity in theory. In the operation process, the change of the actual energy stored in the water tank ( , should consider the influence of the heat charging and discharging power and the balance between the energy change of two adjacent time intervals according to [14]. At the same time, due to the influence of factors such as the thickness of thermocline, the internal energy has the following maximum and minimum constraints by referring to [13,15].

Electric Heater Phase Change Thermal Energy Storage
EH-PHTES is composed of an electric heater (EH), a phase change tank, and a HEX. EH directly generates heat using energy conversion technology. The phase change material is placed in the phase change tank to store heat in the form of latent heat. The phase change material in the tank is in the state of solidification and melting coexistence. Heating electrodes and some circulating pipes are arranged in the phase change tank. Heating electrodes can release heat to phase change materials to make them melted. After some time, with the increase of melting material, the proportion of solidification and melting reaches a new balance point. The circulating pipes contain a heat circulating medium, which can absorb heat from phase change materials and release them to the HEX. Similarly, with the increase of solidification material, the proportion of solidification and melting reaches another new balance point.
There is a great deal of research to reduce the time spent in the process of heat transfer [35,36]. The thermal energy storage in distributed application scenarios can completely store or release heat in several minutes [37]. In the configuration model, it can be approximately considered that the material in EH-PHTES of each operation interval has reached balance points.
The internal structure of EH-PHTES and the device connections are shown in Fig  The choice of phase change materials should have a reasonable phase change temperature. In the HES, the phase change temperature is generally required to be in the range of 50-90 °C. In addition, phase change materials are required to have enough generality. Typical phase change materials include organic materials represented by paraffin, fatty acids, alcohols, and esters, and inorganic materials represented by hydrated salts [8].
In the process of heat charging, EH-PHTES does not exchange heat through the HEX but rather through the EH. The relationship between the heat charging power ( -, ,

EH PHTES CH i t H
) and the electric power ( , EH i t P ) of the EH can be expressed by the electric to thermal efficiency of EH  EH i according to [38], which represents the ratio of the unit thermal power generated by EH to the electric power consumed. , , , According to [38,39], in a well-maintained system, the efficiency is close to 100%.
The electric power shall not exceed the rated power ( , EH Rated i P ). During the heat discharging process, the medium temperature characteristics of the phase change tank are different from those of the water tank. When the phase change material changes between the solid and the liquid, the phase change temperature is constant, and the relationship between the phase change temperature and the heat discharging power can be expressed as follows:  (2). At the same time, it is assumed that the heat network medium temperature flowing into the HEX is consistent with the temperature of the HES return pipe connected to the secondary heat network.

  
According to the heat transfer process of Equations (1), (4), (23) and (24), the relationship between the EH-PHTES heat discharging power and the temperature of the HES return pipe connected to the secondary heat network, and the relationship between the EH-PHTES heat discharging resistance coefficient and the mass flow of the secondary heat network into HEX, are as follows: where -, , is the heat discharging power of EH-PHTES, is the thermal resistance of EH-PHTES connected to the secondary heat network.
It can be seen from Equations (28) and (29) that the heat discharging power is negatively correlated with medium temperature; the lower the temperature of the heat transfer medium, the higher the EH-PTES heat discharging power. The thermal resistance is negatively correlated with the mass flow; the larger the mass flow, the smaller the thermal resistance coefficient. At the same time, the mass flow maximum value cannot exceed the mass flow of primary heat network in the HES. , ,2 ,2 In the configuration process, the configuration heat capacity ( , PHTES cap i S ) is related to the volume of the container. In this article, it indicates the heat when the phase change tank is full of the liquid phase material, in theory representing the maximum heat quantity. In the operation process, the change of the actual energy stored in the phase change tank ( , ) should consider the influence of the heat charging and discharging power, and the balance between the heat change of two adjacent time intervals. At the same time, the internal energy has the following maximum and minimum requirements: EH-PHTES is only connected with the secondary heat network in the urban heat network and has no physical connection with the primary heat network. Thus, EH-PHTES can charge from the EH and discharge to the secondary heating network simultaneously.

Urban Electric and Heat Integrated Energy System Models
The UEHIES is mainly composed of electric and heat production equipment, electric heat coupling devices, an urban electric power grid and an urban heat network. A typical urban electric thermal integrated energy system is shown in Figure 3. The electric heat coupling devices contain the interaction of electricity and heat, which is the main link between energy production and conversion. The urban electric power grid and heat network connect the energy coupling links, which is the key to realizing the balance of voltage, temperature, and energy in the system. In order to focus on the research points, the independent heat production equipment is not modeled nor analyzed in this paper.

Electric Heat Coupling Device
In the UEHIES, the CHP unit is the most common electric heat coupling device. In the operational area of cogeneration, electric power ( ) and thermal power ( are interdependent [40,41]. Any operation point in this polygonal operation area can be represented by the combination of corner coordinates by the combination coefficient.
where  k is the set of numbers of corner coordinates and  k is the combination coefficient of corner coordinate k in the CHP polygonal operation area.
CHP k H and CHP k P are the heat and electric power of corner coordinate k in the CHP polygonal operation area.
The ramping constraint of the CHP is shown in Equation (38): is the ramp power of CHP.

Wind Power
From the relationship between wind speed ( , ) can be obtained according to [42,43]: where is the rated wind speed of wind power generation.
In actual operation, the electric power grid may not be able to accept all the wind power, and wind curtailment may occur. The wind curtailment power ( , , ) is the difference between predicted wind power and real wind power ( , ,

Power Plant
The levelized cost of energy (LCOE) method is commonly used to estimate the fuel consumption of various TPGs [44][45][46]. Fuel consumption ( , The maximum and minimum power and ramping power (  (43) and (44):

Temperature Transmission Delay Characteristics of the Heat Network
Constant flow control is a widely used regulation method in urban heat systems [26,47]. The mass flow of the medium in the heat pipe is kept constant, and orderly supplementation is realized by adjusting the temperature of the heat source station (HSS). In this paper, a heat network under constant flow control is studied.
At the HSS, the relationship between the CHP heat power and HSS supply temperature can be expressed based on the HSS model from [34]. is the set of the number of CHP units in node i .
The primary heat network is composed of a supply part and a return part. In the primary supply heat network, the heat medium flows from the HSS to each HES, and the supply temperature of the HES system ( s, , in Equation (46). In the return part, the heat medium of each HES system flows back to HSS, and the re- in Equation (47). The formula derivation can refer to [47].
, , , where a T is the ambient temperature,  l is the temperature drop and confluence coefficient of path l ,  l is the temperature transmission time delay of path l ,   j i is the set of the number of paths from node j to i .  HSS is the set of the number of HSS, l pipe is the set of the number of pipes in path l , and  , l pipe is the set of the number of nodes in path l .
In the constant flow control mode, the temperature drop coefficient, the confluence coefficient, and the transmission delay are determined, which can be calculated in advance [47,48].
According to the mass flow mixing relationship in [48], the equivalent mixing tem- in Equations (46) and (47) , , , where     means to round up the values,     means to round down the values.
The return temperature of the HES heat medium , , can be expressed as Equation (51) according to the HES model in [34,47].
In the secondary heat network, the supply and return temperature directly affect the comfort level of users. In order to ensure heating quality, the supply and return temperatures of the HES connected to the secondary heat network at any time should correspond to the following equations [49]: where n T is the standard indoor heating temperature, , , ,2 is the heat load. It can be seen from Equations (46), (47) and (51) that, if the return temperature of the HSS remains unchanged and the heat output increases at some point, the temperature of the heat supply medium will increase. This part of the heat cannot be transferred to HES immediately, but is stored in the heat network in the form of increasing the temperature of the heat transfer medium. Similarly, if the return temperature of HSS remains unchanged and the heat output decreases, the temperature of the heat supply medium will decrease, and some of the heat demand will be provided by the heat network. Thus, TTD-HN has a certain degree of ability to regulate heat charging and discharging.

Electric Power Grid
The phase angle difference between the two ends of each urban electric power transmission line is generally not more than 10° and the voltage deviation is not more than 15%. Therefore, the simplified power flow model can be used to calculate the urban electric power grid. This paper adopts the simplified power flow algorithm given in [50,51]. The power flow equation of each node is as follows: The injected power of each power node is as follows: where  i means the sum value in node i . For example, is the sum of active electric power of the CHP units installed in node i , are the sum of active and reactive electric power of electric load in node i .

Two-Stage Optimal Configuration Model of DTES Considering Economy
The optimal configuration of DTES not only needs to consider the selection of node and capacity, but also needs to analyze the scheduling plan after DTES configuration to comprehensively consider the equipment investment and system operation costs. In the face of complex optimization problems with multiple influencing factors, a two-stage optimization model is an effective analysis method [52,53].

Upper Stage: Optimization of DTES Configuration Considering Comprehensive Annual Total Cost
The optimization objective is the comprehensive annual total cost ( ann ann ann The annual investment cost is calculated according to the total amount of investment and the designed utility each year according to the model in [54]. Different typical days are datasets with varying features of data. Each typical day can represent some general days. The annual operation cost is the annual conversion according to the operation and maintenance costs of different typical days and the number of general days represented by different typical days. The annual investment cost and operation cost can be expressed as follows:

Lower Stage: Optimization of the UEHIES Considering Typical Day Operation and Maintenance Cost
In the lower stage, different tele-meter reading (TMR) data, such as electric demand and wind speed, are summarized for several typical days. The lower stage takes the minimum operation and maintenance cost of a typical day as the objective and comprehensively considers the wind curtailment penalty cost and the operation and maintenance cost of the CHP, TPG, and DTES. For each typical day, an operation and maintenance cost are calculated.
where, The calculation formulas for each cost are as follows: WTES and EH-PHTES constraints are shown in Equations (11)- (20), (22) and (28)- (33). At the same time, in order to ensure reasonable operation for each typical day, it is assumed that the energy stored in the DTES is consistent at the beginning, 0 t , and end, te n d , of operation time intervals.  (54)- (57). At the same time, the following constraints should be satisfied based on the requirements of safety and stability [13,55]

Solution Method
In the upper stage, diversified energy equipment and many nonlinear constraints are included the optimal economic configuration model of DTES in the UEHIES. The immune algorithm with cell memory is used to solve the problem. In the lower stage, it is a typical large-scale multiple linear programming problem. This paper uses GUROBI 8.1.1 to solve the problem, and the MATLAB r2016a toolbox YALMIP is used to connect the upper and lower stages. The specific steps are as follows: Step 1: Read and initialize the data, and enter the upper stage; Step 2: An immune cell population representing configuration information X is generated by an immune transfer strategy; Step 3: Proceed to the lower stage, optimize the variable x according to the configuration information in Step 2, determine the typical daily operation and maintenance cost, and deliver the information to the upper stage; Step 4: Return to the upper stage, calculate the comprehensive annual total cost, and judge whether the algorithm converges or not. If it converges, enter Step 5; if it does not, extract the dominant immune cells to form an antigen combination, correct the parameters of immune transmission and cross mutation, and return to Step 2; Step 5: Output the results and generate the best configuration scheme.

Case Study
In this paper, the effectiveness of the proposed model is verified based on a UEHIES in Northern China. The system consists of 30 electric nodes and 28 heat nodes. The power grid and the heat network are connected through CHP coupling nodes. In order to reduce the calculation time without losing generality one typical day is used in this section. The maximum electric load is 1072.75 MW, and the maximum heat load is 359.26 MW. The load curve and predicted wind power curve are shown in Figure 4. The heating period is 150 days. The structure of the UEHIES is shown in Figure 5. The power system parameters are shown in [47], and the thermodynamic system parameters are shown in Appendix A, Tables A1 and A2. Parameters of the CHP units are shown in Appendix A, Table A3. Parameters of the DTES configuration are shown in Appendix A, Table A4.

Medium Temperature Characteristics
In order to explore the influence of the MTC-DTES and TTD-HN models on the configuration scheme, five scenarios are used in this section; four WTES systems are configured first. The settings are shown in Table 1, and the configuration results of scenarios S1-S5 are shown in Table 2.   1 The cost column uses Chinese Yuan (CNY: ¥) 10,000 as a unit. The same unit is used in the other tables in Section 5.

Influence of Temperature Transmission Delay Characteristics of the Heat Network on Configuration Scheme
The results when TTD-HN is, or is not, included are shown in Table 2 for scenarios S3 and S4. The following can be observed: 1. The annual operation and maintenance cost of the scenario with TTD-HN (S4), compared with the scenario without TTD-HN (S3), is reduced by CNY 21.49 million-a decrease of 3.54%; 2. The configuration heat capacity and HEX capacity of S4 compared with S3 is greatly reduced, and the annual investment cost is reduced by ¥8.709 million, or 59.4%. At the same time, the heat node selection of S4 is completely different from S3.
Firstly, the difference in the annual operation and maintenance costs is analyzed. Table 3 shows the cost components of scenarios S3 and S4. It can be seen that, after considering TTD-HN, all components are reduced, where the CHP1 cost and wind curtailment penalty cost are reduced the most, accounting for 39.4% and 35.0% of the annual operation and maintenance cost reductions, respectively. The reasons for these two cost reductions are analyzed below. After considering TTD-HN in S4, the coordination regulation ability between the heat network and WTES is greatly enhanced, achieving a larger-scale heat transfer at different times of the day. Figure 6 shows the optimal results of heat power scheduling. The typical day can be divided into the night period of 20:00-8:00 and the day period of 9:00-19:00. Due to the lack of a TTD-HN model, the heat network in S3 does not have a regulation ability, and so the heat transfer quantity between night and day periods is 540 MWh, and is only relying on WTES. In S4, the heat transfer quantity of the heat network is 712.5 MWh, and the heat transfer quantity of WTES is 178.8 MWh. It can be seen that, with the TTD-HN model, on the one hand, the regulation ability of the heat network is greatly enhanced and, on the other hand, the demand for WTES is reduced. The enhancement of the regulation ability provides a more flexible optimization space for the CHP units, and the CHP operational economy is improved. Figure 7 shows the operation status of the CHP units. MWh and the heat generation increases by 322.1 MWh, while the annual operating cost increases by ¥4.158 million, or 33% of the cost reduction during the night. CHP2 mainly undertakes peak heat load regulation at night, and its daytime operation state points are basically unchanged. Figure 8 shows the changes of wind power and utilization rate under the two scenarios. It can be seen that the wind power of S4 increases by 155.3 MW, 139.9 MW, 131.6 MW, and 60.5 MW from 24:00 to 3:00 when the wind curtailment is the most serious. Additionally, the wind power utilization rate increases by 92.4%, 69.9%, 65.8%, and 38.8%. According to the statistics, the wind power generation of S4 on a typical day increases by 627.5 MWh, the wind power utilization rate increases by 28.7%, and the annual wind curtailment penalty cost decreases by ¥7.53 million. Next, the node selection and heat capacity of WTES is analyzed. It is found that WTES is always configured in the node with the best effect of enhancing the adjustment ability of the heat system in both scenarios. The difference is that S3 is configured in the node with the largest heat load, while S4 is configured in the node with an excessively low or high operation temperature.
In S3, the node with the largest heat load has the largest mass flow. Under the same temperature change, a node with a large load and large mass flow can provide more heat exchange power. Compared with other nodes, DTES as configured here can give full play to the ability of heat transfer and improve the cost of the system; therefore, four heat nodes-H21, H22, H23 and H28-with the largest heat load are selected.
In S4, the heat network takes on the main role of heat transfer. At this time, the nodes with an excessively low or high operating temperature have a more restrictive effect on the heat network regulation ability. Figure 9 shows the return temperature curves of H18, H24, and H28 under S2 and S4, and the heat power change of WTES at H18 under S4. The heat discharging power is positive and the charging power is negative. It can be seen from Figure 9 that in S2 without DTES, the night period return temperature of H18 is lower than that of H24 and H28. Especially, at 24:00-7:00, the temperature is close to the minimum value of 60 °C. Thus, at 23:00-6:00, the supply temperature of HSS cannot be further adjusted downward, and the heat power output of the units is limited. Similarly, in S2, the day return water temperature of H18 is close to the maximum value of 80 °C. Thus, at 13:00-9:00, the output of the HSS cannot be further adjusted upward, and the regulation ability of the heat power output is limited. The return temperature constraints can be effectively broken by installing WTES. The heat discharging power in the night period can increase the return temperature, and the heat charging power in the day period can decrease the return temperature, which enhances the heat regulation ability of the CHP and provides the CHP with more flexible operation space. Figure 10 shows the change of configuration schemes in the solution space during the optimization process of the immune algorithm. The red dot indicates the final optimization result. It can be seen that with the increase of WTES investment cost, the annual operation and maintenance cost gradually decreases, and the annual total cost first decreases and then increases. The minimum value of the total cost corresponds to the final configuration scheme. At the same time, because the heat network in S4 undertakes most of the heat power transfer, the heat capacity of WTES is reduced, resulting in an annual investment of ¥5.958 million, which is far lower than the ¥14.667 million in S3.

Influence of Medium Temperature Characteristics of Distributed Thermal Energy Storage on the Configuration Scheme
This section constructs a new scenario, NS4, for comparative analysis. The configuration scheme of DTES in NS4 is the same as that in S4, but the MTC-DTES model is introduced into the lower stage optimization for the typical day. Through the comparison of results of S4, NS4, and S5, the influence of the MTC-DTES on the configuration is illustrated. Table 4 shows the costs of S4, NS4 and S5 configuration schemes. Comparing the costs in Table 4, it can be found that the annual operation and maintenance cost of S5 is ¥1.687 million greater than that of S4, and the comprehensive annual total cost is ¥1.153 million greater. Compared with NS4, the annual operating and maintenance cost and comprehensive annual total cost of S5 are smaller, and the two costs are reduced by ¥0.563 million and ¥1.097 million. At the same time, the annual investment cost is reduced by ¥0.534 million, or 8.96%. Without the MTC-DTES model, in S4, the medium temperature of the primary heat network flowing into the WTES HEX is considered to be constant, which is the designed supply temperature of 120 °C. However, in the actual operation, the medium tempera- ture changes between 95-120 °C, resulting in the actual economic performance of NS4 not reaching a value in S4 which is as good as expected.
In Figure 11a, the curve Hwtes shows the hourly heat power output, ChMax shows the maximum heat charging power, and DisMax shows the maximum heat discharging power curve of WTES at H4 under three scenarios. Figure 11b shows the heat proportion of WTES, which is the proportion of actual heat quantity to configuration heat capacity. It can be seen from Figure 11 that the actual heat charging power in NS4 is lower than S4 at most time intervals, and the maximum decrease is 3.76 MW at 14:00, with a decrease rate of 43%. The decrease heat charging power leads to a decrease in the actual heat quantity in the water tank. The maximum actual heat quantity accounts for 88.5% of the configured heat capacity, which is reduced by 6.5% compared with S4. According to the statistics, 4.7 MWh of configured capacity is not utilized. The configuration scheme of S5 avoids these problems. First of all, the HEX capacity WTES 1 KF is generally larger than that of NS4, which enhances the heat exchange ability with the primary heat network, and the heat charging power at 14:00 is 1.14 MW higher than that of NS4. Secondly, the configuration heat capacity is reduced by 10 MWh, and there is no more wastage of capacity. Finally, the configuration HEX capacity WTES 2 KF is reduced. On the one hand, this weakens the ability to discharge heat to users, resulting in an increase of ¥0.139 million in the annual operation and maintenance cost of the CHP in the night period and ¥0.128 million from the wind curtailment penalty cost; on the other hand, this reduces the annual investment cost by ¥0.458 million. From these two aspects, the reduction of the HEX capacity improves the economic performance.

Distributed Thermal Energy Storage Types
In order to analyze the influence of WTES and EH-PHTES on the configuration scheme, the following two scenarios are added on the premise of considering the medium temperature characteristics:  S6: Only EH-PHTES is equipped;  S7: WTES and EH-PHTES are configured together.
The electric power used for electric heating comes from the power nodes near the HES system. The corresponding relationship between power and heat nodes is shown in Appendix A, Table A5. A mixture of palmitic acid and stearic acid is selected as a specific phase change material, and a small amount of carbon materials is added to enhance the heat transfer ability [56,57]. The phase change temperature is 65 °C. The cost per

S4_Hwtes
NS4_Hwtes megawatt-hour is about one million. Table 5 shows the configuration results of scenarios S5-S7. From the analysis of different configuration schemes of DTES types, the following can be seen: 1. In the three scenarios, H4, H18, and H19 are selected to configure DTES because of their large restriction of the regulation ability of the heat network. In scenarios S6 and S7, the H22-E25 node is selected to configure EH-PHTES, because H22-E25 is the closest electricity and heat load coupling node to the wind farm. Configuring EH-PHTES here can make use of the wind power nearby; 2. Compared with S5, the annual operating and maintenance cost of S6 decreases by ¥1.499 million, the annual investment cost increases by ¥2.011 million, and the annual total cost is ¥0.512 million greater. Compared with S5, the annual operating and maintenance cost of S7 is reduced by ¥1.041 million, the annual investment cost is increased by ¥0.534 million, and the annual total cost is reduced by ¥0.506 million. Table 6 shows the components of the operating and maintenance costs in three scenarios. The following can be seen from Table 6:  In S5, the costs of CHP1 and CHP2 units, TPG units and DTES are the lowest among the three scenarios, and the total cost is reduced by ¥0.801 million and ¥0.217 million, respectively, compared with S6 and S7. This is because WTES can not only discharge in the night period but also charge in the day period, which has the strongest effect on improving the regulation ability of the heat network. Additionally, EH-PHTES can only discharge to the heat network, so the regulation ability of the heat network is limited;  The wind curtailment penalty cost in S6 is the lowest in three scenarios, at ¥2.298 million and ¥1.041 million lower than that in S5 and S7. This is because EH-PHTES can directly use wind power for heating, which is more conducive to wind power consumption;  In the S7 configuration scheme, three nodes (H4, H18, H19) with a severe restriction on the improvement of the heat network regulation ability are selected to configure WTES, and the node (H22-E25) with the most direct use of wind power is selected to configure EH-PHTES. The advantages of the two types of DTES are fully reflected to optimize the operation cost, and the investment cost is not excessively high. Thus, the comprehensive annual total cost is the lowest of the three scenarios.

Heat Load Types
In this section, a kind of commercial building heat load, which is different from the UEHIES heat load curve, is set up in different nodes to explore the influence of different heat load types on the configuration scheme. The heat load curve of commercial buildings is shown in Appendix A, Figure A1. Therefore, two new scenarios are added:  S8: The commercial heat load is set at the head nodes H4, H5, H18, and H19;  S9: The commercial heat load is set at the end nodes H14, H16, H27, and H28. Table 7 shows the configuration schemes of S7-S9. It can be seen in Table 7 that, compared with S7, the three nodes, H4, H18, and H19, are no longer equipped with DTES in S8 and S9, while the three nodes, H20, H21, and H22, and four nodes, H14, H16, H27, and H28, are selected. In addition, the heat capacity and HEX capacity also change in each scenario. This is mainly because the operating temperature of HES, especially the return temperature, changes with the change of heat load types. Thus, the nodes that restrict the regulation ability of the heat network have changed. In order to improve the regulation ability in the new scenario, it is necessary to install DTES in the new severe restriction nodes, and the heat and HEX capacity will be adjusted accordingly.
For illustration, Figure 12a shows the return temperature of the H18 node under S7 and S8, and Figure 12b shows the return temperature of the H28 node under S7 and S9. It can be seen from Figure 12a that under S7, the return temperature of H18 is too low in the night period and too high in the day period. However, in S8, the return temperature of H18 increases at night and decreases during the daytime; thus, it is no longer a severe restriction node, so there is no need to configure DTES. At the same time, it can be seen from Figure 12b that in S7, the return temperature of H28 is neither too high nor low. However, in S8, the return temperature of H28 increases in the night period, especially at 23:00-2:00, when it reaches the upper constraints, which limits the increase of the heat power of the CHP in the corresponding period of 15:00-20:00; at the same time, the return temperature drops in the day period, reaching the lower constraints at 9:00, which limits the decrease in the heat power of the CHP in the corresponding period of 2:00-3:00. H28 thus becomes a severe restriction node, which seriously limits the regulation capacity of the heat network. Therefore, H28 needs to be equipped with DTES under new heat load types. The situation for other configuration nodes is similar.

Wind Power Capacity
According to the analysis in Section 5.2, the advantage of EH-PHTES is wind power utilization. In order to analyze the impact of wind power capacity on the configuration scheme, two new scenarios are set in this section as follows:  S10: The capacity of wind power is set to 100 MW;  S11: The capacity of wind power is set to 300 MW. Table 8 shows the configuration schemes of S7, S10, and S11. In order to reflect the wind power utilization, new columns are added in the table, and the calculation of new columns is given in Appendix B. Table 8. Optimization results of configuration schemes of S7 and S10-S11. According to the analysis of the configuration schemes under different wind power capacity, the following can be seen: 1. With the wind power capacity of S10, S7, and S11 increasing in turn, the wind power utilization gradually increases and the annual operation and maintenance cost of the units gradually decreases; however, at the same time, the wind curtailment penalty cost increases. This is because in the day period, wind farms and CHP and TPG units share the power load supply and give priority to clean and cheap wind power output. With the increase of wind power capacity, the wind power generation and utilization quantity increase, the power outputs of CHP and TPG units decrease, fuel consumption decreases, and the annual operation and maintenance cost decreases. However, at night, there is insufficient utilization space for wind power. With the increase in capacity, the wind curtailment power increases and the annual cost of the wind curtailment penalty increases. 2. With the increase of wind power capacity, the amount of EH-PHTES, the heat and HEX capacity, and the rated power of EH increase. This is because the increase of wind curtailment power is more conducive to the EH-PHTES system realizing its potential to use nearby wind power. In order to make more use of wind power, the number of EH-PHTES systems and the capacity of each component are required to increase continuously to improve the wind power utilization. However, this also causes an increase in the investment cost.

Centralized Thermal Energy Storage
Centralized thermal energy storage is configured at the HSS node to regulate the heat medium flowing into the primary heat network [58]. In order to explore the difference between centralized and distributed thermal energy storage, a new scenario is set in this section: S12-configure WTES equipment in the HSS. Table 9 shows the configuration results of S5 (a distributed WTES configuration) and S12. The analysis of the centralized and distributed configuration scheme shows that the heat capacity of the centralized scheme is 130 MWh higher than the total heat capacity of the distributed scheme, and the HEX capacity is 1.8 MW/°C higher. A centralized storage device can decouple the heat demand and the HSS heat output to some extent, meaning that the operation schedule of the CHP units can be optimized. However, compared with DTES, it is not effective at improving the regulating ability of the heat network. Therefore, if roughly the same operation and maintenance cost is incurred, the annual investment cost of the centralized scheme is ¥4.736 million greater. It is shown that, compared with the centralized configuration, DTES is more conducive to saving investment costs.

Conclusions
In this paper, a model of DTES considering the medium-temperature characteristics is established; afterwards, an optimal economic configuration method in a UEHIES is proposed that takes the TTD-HN and MTC-DTES models into account. Through the analysis of different scenarios, the following conclusions are drawn.
(1) Considering TTD-HN, the heat network can be effectively utilized, the heat capacity and HEX capacity can be reduced, and the investment cost can be reduced. At the same time, considering MTC-DTES can avoid the waste of configuration heat capacity and reduce the actual operation and maintenance costs; (2) Compared with the centralized configuration, the heat and HEX capacity of DTES is significantly decreased, the thermal energy storage investment cost is reduced, and the economic factors of the system are improved; (3) WTES has a stronger effect on improving the regulation ability of the heat network and EH-PHTES is more conducive to improving the wind power utilization. The capacity of wind power is a major factor when determining the configuration scheme of EH-PHTES; (4) Different types and distributions of heat load directly affect the temperature of HES, resulting in the change of the location and number of nodes that severely restrict the regulating ability of the heat network, thus changing the configuration nodes and investment cost of DTES.

Appendix B
The wind power consumption of a typical day The annual wind curtailment penalty cost is shown as follows: , , ( )