DHW tank sizing considering dynamic energy prices

Due to the rapid development of the building stock in Norway, the energy use in this segment is drastically increasing. Therefore, improving the energy performance of buildings becoming an urgent problem. Among technical systems in buildings, domestic hot water (DHW) systems have still significant untapped potential for energy saving. Storage tanks enable us to change DHW demand in buildings in a more energy-efficient and cost-effective way. However, to achieve this effect, the proper sizing and operation of the storage tanks are required. The aim of this study was to define a method for the DHW tank size optimization considering dynamic electricity prices and to assess how different electricity pricing methods would influence the DHW tank size. A dynamic discretized model of the DHW tank was used as a DHW tank model. Dynamic optimization was implemented as the optimization method to find the optimal tank charging rate based on the different pricing methods. Two pricing methods were considered in this study: 1) the current method with the fixed grid fee and 2) the power extraction method with the pricing of the maximum power extraction. The results showed that the electricity pricing pattern had significant impact on the DHW charging heating rate. In the case of the extraction fee pricing method, the charging rate was more stable over the day than in the case of the fixed grid fee. This stable charging rate gave stable DHW tank temperature over the day and the highest decrease in the total cost. A general conclusion was that the extraction grid fee pricing method would promote for stable charging over the day.


Introduction
Due to the rapid development of the building stock in Norway, energy use in this sector is drastically increasing. For that reason, improving the energy efficiency in buildings is becoming an urgent problem. Domestic hot water (DHW) systems are substantial energy consumers, typically accounting for about 25-35% of buildings' total energy use [1]. Among technical systems in buildings, DHW heat storage systems have a significant untapped potential for energy saving [2]. To unleash this potential, the proper sizing, operation, demand-side management, and control for storage tanks are required. The main features of these solutions were discussed below.
The primary condition for the efficient and correct functioning of the DHW system components is their proper design and sizing. Oversizing of the heat storage tanks may lead to significant negative consequences for the DHW system's performance. These consequences include the availability of unneeded storage capacity, increased investment costs, excessive heating rates, and high heat loss in DHW systems. The investigation in [3] shows that heat losses due to the oversizing and poor operation of hot water tanks and circulation systems in residential buildings are very high and reach up to 65% of the total DHW heat use.
Recent studies revealed that DHW system design based on standards and rules of thumb might lead to oversizing and inefficient heat use [4]. For example, the flow rates for residential apartment blocks in UK were recorded and compared with the design flow rates obtained by sizing guides [5]. This comparison shows that the measured flow rates on average are at least 20% higher than those calculated by commonly used methods. The investigation performed in Estonia apartments demonstrates that the sizing approach that is better than presented in the existing standard allow to decrease the investments by 28% and decrease operating costs by 8% [6].
Traditionally sizing of storage tanks is performed based on DHW profiles. The methodology for designing and sizing DHW production systems based on DHW profiles is presented in the paper [7]. The inaccuracy of profiles presented in the standards is one of the reasons for incorrect tank sizing. In the study [8], the DHW heat use profiles obtained from measurements in Norwegian residential buildings were compared with profiles presented in national and international standards. The comparison showed that the reference profiles in standards are not accurate enough. They do not adequately reflect the change in DHW heat use during the day, overestimate DHW heat use, and therefore should be modified. Consequently, for sizing the storage tanks and components of DHW systems, the preference should be given to the DHW profiles obtained based on the statistical data collected in real buildings.
The time-frequency of measurements is an important feature that should be considered when performing databased sizing for DHW systems. Currently, there are no generally accepted recommendations for this problem. Several authors investigate this topic [9]. The paper [9] explores the effect of measurement intervals on the DHW peak flow rate in different Norwegian buildings. Within the analysis, the measured peak flow rate is calculated as a moving average for different time steps. Compared to using an interval of 2 second, averaging the data over 10-second shows underestimation of the peak flow rate by a factor of 0.8-1.0, and 0.67-0.94 for a 30-second interval. Authors in [10] claim that the storage tank volume should be identified based on the maximum hot water delivery capability value at a time period of 35 minutes or less. The work presented in [11] also determined that data resolution has a large influence on the measured and simulated peak flow rates. This work concludes that hourly measurements may be used for the DHW heat use analysis [11], while for the system design, it is better to use data collected with a higher frequency. However, a more detailed investigation of this problem is required.
It should be noted that the design and operation of DHW heat storage must ensure compliance with the temperature requirements for stored and distributed hot water. In order to prevent the spreading of the harmful Legionella bacterium [12], many countries, including Norway, develop regulations about minimum acceptable hot water temperatures in DHW systems. Therefore, to prevent Legionella growth, hot water in DHW systems are usually stored above 55-60°C.
The application of demand-side management for DHW heat storage enables us to change DHW demand in buildings in a more energy-efficient and costeffective way. The economic analysis of DHW pricing shows that the households respond to DHW price changes [13]. Reacting to dynamic energy prices and applying smart DHW tanks charging and discharging strategies may improve buildings' energy performance, save cost, and provide extra flexibility to the power grid [14]. The concept of a multi-mode charging method for '+: VWRUDJH WDQNV EDVHG RQ '+: SUR¿OHV LV considered in [15]. According to [14], the tank electric water heaters in households have a very high potential for energy storage, and therefore they should be used to cover flexibility needs in future power systems. Thus, developing technologies and advanced control strategies for intelligent tank operation is a topical issue that requires careful study. Therefore, the aim of this study was to define a method for the DHW tank size optimization considering dynamic electricity prices and to assess how different electricity pricing methods would influence the DHW tank size.
In this paper, an approach with a dynamic discretized model of the DHW tank was utilized to identify the optimal DHW tank charging rate and to minimize cost under two dynamic pricing schemes. The inputs included historical data for the DHW use and heat loss from an actual building and hourly day-ahead pricing data of Oslo, Norway. Based on developed models, the relationship between the energy cost and the tank size was also investigated, leading to a guideline on choosing proper tank size based on the DWH heat use data. The research performed in this paper is useful for both the sizing and operation of the DHW storage tanks. The rest of the paper is organized as the following. Section 2 is briefly introducing the DHW system. Section 3 is giving an overview of the DHW demand and electricity prices. The optimization method is presented in Section 4. Finally, the results are given in Section 5.

Description of the apartment building and data
The studies were performed based on data collected from a large housing cooperative located in Oslo, Norway. It includes several apartment blocks with 56 flats. The total area of the apartment blocks is 3 752 m 2 . In this housing cooperative, electric water heaters and a heat pump are used as the energy source for DHW generation. In this housing cooperative, the 2-second measurements were performed at the heating plant, giving the aggregated heat use for all blocks. The measurement campaign lasted from January to March 2019. During the measurement campaign, the DHW heat use and circulation losses were measured separately. The principle drawing of the heating plant and measurements are shown in Figure 1. In Figure 1, the symbols for the temperature and water flow show the measurement locations. In Figure 1, HW stands for hot water, HWC is the hot water circulation, and CW is the cold water. The temperatures marked in Figure 1 are the following: THW -temperature of the hot water, THWCtemperature of the circulation water, TCW -temperature of the cold water, and THTHW -temperature of the hot water from the tank. Finally, the marked volume rates in Figure 1 are the following: ܸ ሶ ௐ -water flow rate of the cold water, ܸ ሶ ௐ் -water flow rate of the cold water coming to the system, ܸ ሶ ுௐ -water flow rate of the circulating water, and ܸ ሶ ுௐ -water flow rate of the hot water. Please note that Figure 1 shows only the schematic principle of the system, but the presented model is not considering all the details presented.

DHW heat use profiles and electricity prices
As explained in Introduction, two important parameters for proper DHW tank sizing are: 1) relevant DHW heat use profiles and 2) dynamic energy price to encourage flexibility and better infrastructure utilization. These two input parameters are introduced in this section.
In this study, measured DHW heat use was used as shown in Figure 2. In Figure 2, both the standard DHW heat use profiles and the measured user profile are shown. The measured profile in Figure 2 was obtained based on the discharging rate from January 16 th to March 6 th , 2019. In total, the measured profile in Figure  2 shows an average over 50 days in the large housing cooperative located in Oslo.

Figure 2. Comparison of DHW user profiles from standard and measured data
As it may be noticed in Figure 2, there were several differences between the measured and the standard DHW profiles. For example, the standard DHW profile shows no heat use until 5 o'clock in the morning, while the real measurements showed either use or heat losses. Further, the maximum demand for the standard profiles is much higher than the measured one. Finally, the maximums for the DHW use lasted longer than for the standard profile.
To consider demand-side management for the DHW heat storage, hourly day-ahead energy price for Oslo from January 16 th to March 6 th , 2019, were considered, as shown in Figure 3. Norway is following market based electricity pricing system NordPool [16].
The pricing system at NordPool is based on the demand and the supply possibility for electricity supply. The higher demand than the supply possibility will cause higher prices. This effect when the demand is high is shown for the first 200 hours in Figure 3, because these were hours in January. Please note that the values in Figure 3 show only the electricity energy price and not any grid fee.

Optimization of DHW tank charging
To perform the optimization of the tank size and identify what tank size would be preferable for different electricity pricing methods, an optimization method was developed. The method consisted of three parts. Firstly, the tank model defining the tank size and the tank capacity was defined. Two pricing methods were considered in this study: 1) current method with the fixed grid fee and 2) power extraction method with the pricing of the maximum power extraction. Consequently, two different objective functions were defined for each pricing method. For both objective functions, dynamic optimization was performed where the hourly charging rate was the optimization variable. Finally, simulations were conducted for the accumulated energy cost from January 16 th to March 6 th , 2019, 50 days, and for varied size of the DHW tank. Based on this, the results with the changed tank size could be obtained showing the relationship between the energy cost and the normalized tank size.

DHW tank model
To enable smooth optimization, a dynamic and discretized model for the DHW tank were defined. Starting from the energy balance for the DHW and based on the demand requirements shown in Figure 2, the tank size was defined as: while the corresponding electric heater capacity was defined as: (2) where ܸ ௧ is the tank volume, ܿ is the specific heat capacity of water and ߩ is the water density. ο‫ݐ‬ is the time length for tank charging and discharging. In general, two different values could be considered for charging and discharging time. However, since in this study data for the large housing block were considered, 0.5 hour was assumed for both charging and discharging time. When considering the discharging mode and the DHW tank size defined in Eq. 1, the allowable temperature drop, οܶ ଵ ᇱ , in the DHW tank was assumed to be 40 K. When considering the charging mode and the electric heater capacity, ܳ ሶ ௧௬ , the design temperature difference, οܶ ଶ ᇱ , that should be achieved with the electric heater was assumed to be 70 K. In general, the above parameters, the charging and discharging time, the allowable temperature drop, and the design temperature difference are important for sizing the DHW tank. However, due to complexity of the optimization, they were not analysed in this study.

Optimization problem
The two observed pricing methods were defined as the following. In Norway, the electricity bill consists of two parts: variable part related to energy use and the grid fee part. The definition of the grid fee part may be different. In this study, two models for the grid fee were analysed. The first analysed model was the current pricing model where the grid fee is related to the electricity use and a fix part that is the same for different customers. The second model is a new suggested model that is considering the maximum power extraction as the basis for the grid fee. These two pricing models were used as a basis to define the two objective functions.
The first objective function considering the current electricity price and the so-called the constant grid fee was defined as: (3) where ܳ ሶ ,௧ is the charging rate for each hour and ο‫ݐ‬ is the time step of 1 hour. ‫‬ ௧ , ‫‬ ௗ , and ‫‬ ௫ௗ are the pricing parameters given in Table 1.
The second objective function considering the new suggested pricing method that is considering the maximum power extraction was defined as: is the maximum charging rata over the optimization horizon. ‫‬ ௫ௗ is the fee for the power extraction and is also given as the other pricing parameters in Table 1.
The above defined objective functions were defined as the dynamic optimization function with the charging rate, ܳ ሶ ,௧ , as the optimization variable. This means that the charging rate was optimized for each hour to achieve the lowest total cost over the optimization period, ‫.ܪ‬ In this study, the optimization horizon, ‫,ܪ‬ was 24 hours.
The electricity pricing parameters were provided from [17]. For both objective function the same constraints were introduced as explained below. The constrains were defined based on the dynamic model of the DHW tank that was discretized for each hour and the allowed temperature levels. The constrains were defined as the following: -the tank temperature was defined as: Eq. 6 is based on the dynamic energy balance for the DHW tank. ܳ ሶ ,௧ is the charging rate. ܳ ሶ ௗ௦,௧ is the discharge rate that was defined based on the real use measurements as given in Figure 2. In this study, the specific DHW use given in Figure 2 was multiplied with the total area of the observed apartment blocks in Oslo. ܳ ሶ ௦௦,௧ are the heat losses from the DHW tank as modeled by Eq. 10. In Eq. 10, ‫ܣ‬ indicates the surface area of the DHW tank, ܷ is the U-value of the DHW tank surface, and ܶ ,௧ is the room temperature where the tank is placed at time interval ‫.ݐ‬ For the second objective function where the pricing included the maximum charging rate, an additional constraint was introduced as the following: The temperature limits introduced in the above constraints are given in Table 2. The room temperature 10ႏ

Results
As explained in Section 4, to obtain a good overview of the results and the DHW tank sizing, data for 50 days data were used for the optimization analyses. The optimization was conducted for each day and for the different tank sizes. Finally, the tank size was normalized, so that the results are shown as the total energy cost for the DHW heat use versus the normalized tank size. Figure 4 shows a result example for one day profile optimization with the fixed grid fee and the extraction fee, respectively. In Figure 4, hourly electricity price profile from NordPool as shown in Figure 3 is given in the highest figure. Consequently, the input profiles for the discharging rate are given in the figure below. Please note, the discharge rate in the second from the above figure in Figure 4 had similar shape as the specific measured DHW demand given in Figure 2, because this was used as the input for the optimization. The resulting optimized charging rate in the case of the fixed grid fees, the first objective function, and the extraction grid fee, the second objective function are shown in the third from the above figure in Figure 4. Please note in the third from the above figure in Figure 4, with "Grid fee" are marked the results for the first objective function, while with "With extraction fee" are marked the results for the second objective function. Finally, the fourth figure from the above in Figure 4 shows the resulting heat loss rate due to different control policies generated for both cases. The results in Figure 4 show that the electricity pricing NordPool pattern had significant impact on the DHW charging heating rate. Both optimizations tended to charge the DHW tank when the energy price was low and reduced the charging rate when the price was high. The results in Figure 4 showed that the current pricing model for the grid fee would give a cost of 329.9 NOK per one day with 13 hours with the lowest DHW tank temperature ႏ. The current pricing method was only dependent on the NordPool electricity price and thereby, the charging rate was strongly variating according to the price. This resulting DHW tank temperature of ႏ over 13 hours should be further critically discussed if this is allowable. The new suggested method considering the extraction rate would cause a daily cost of 317.8 NOR with only two hours with the lowest temperature of ႏ. Due to pricing of the maximum discharge rate, the new pricing method considering the extraction rate, resulted in a stable and relatively low charging rate. Please note that the result in Figure 4 are related to typical profile data.
The entire optimization for one day was performed further for the real discharging rate and heat losses over 50 days and considering the variable electricity price over the same period from Figure 3. Further, simulations were also conducted for the accumulated cost over 50 days while changing the DHW tank size. To present the result more efficiently, the tank size was normalized as tank size/ܸ ் . Where the reference tanks size ܸ ் was 0.756 m 3 . The investment cost of DHW tanks of various size is also evaluated. Based on the experienced values in Norway, it costs 41.95 NOK/L to increase the size of DHW tanks and the lifetime of DHW tanks is about 20 years. In such a way, the investment cost averaged to these 50 days was calculated. The relationships between the total cost over 50 days and the normalized DHW tank size for the optimized charging rate are shown in Figure 5. The results in Figure 5 show that with the extraction fee pricing method, the minimal total cost was obtained when the DHW tank size reached about six times of the reference tank size. After that value, further DHW tank increase did not give the cost reduction, but rather led to the total cost increase due to higher heat loss and higher investment. However, for the current pricing method and the fixed grid fee, the minimal total cost was obtained when the DHW tank size reached about three times of the reference tank size. After that value, the cost reduction introduced by demand-side management is overwhelmed by the cost for heat loss and the investment. In addition, in the case of the extraction fee pricing method, the relative decrease in the total cost due to tank increase was much higher than in the case of the fixed grid fee method.

Conclusions
The aim of this study was to define a method for the DHW tank size optimization considering dynamic electricity prices and to assess how different electricity pricing methods would influence the DHW tank size. The dynamic discretized model of the DHW tank was used as a DHW tank model. Dynamic optimization was implemented as the optimization method to find the optimal tank charging rate based on the different pricing methods. Two pricing methods were considered in this study: 1) the current method with the fixed grid fee and 2) the power extraction method with the pricing of the maximum power extraction. As a case study, the real measurements from the large housing cooperative in Oslo were used. The optimization was performed on the daily basis. To give a guideline on choosing the proper tank size based on the DWH heat use data, 50 days of optimization and simulation was performed for each pricing method.
The results showed the optimal charging signal for different pricing methods. In general, the electricity pricing NordPool pattern had significant impact on the DHW charging heating rate. Both optimizations tended to charge the DHW tank when the energy price was low and reduced the charging rate when the price was high. However, in the case of the extraction fee pricing method, the charging rate was more stable over the day than in the case of the fixed grid fee. This stable charging rate gave stable DHW tank temperature over the day and finally the highest decrease in the total cost was achieved with the smaller DHW tanks.
This study was based on the dynamic and discretized DHW tank method and different assumptions were made. In the future studies, the charging and discharging time, the allowable temperature drop, and the design temperature difference should be part of sensitivity analyses. In addition, analysis of the different DHW use profiles should be also performed.