## 2 Methods
### Workflow  
In this study, the operation and the efficiency of a set of systems for DHW production were determined through dynamic simulation models using the TRNSYS 17 platform [32]. In order to appreciate the interactions with electrical grids and to test time-shifting actions that can be implemented, an analysis on a short time scale (minutes) was conducted. A preliminary task was to correctly identify the typical DHW consumption hourly profile (tapping) and the volume of the daily-consumed DHW via a representative final user on Lampedusa Island. These values (hourly tapping profile and DHW demand per day) depend on the number of persons in the consumer unit and on their habits. Moreover, the use of hot water is influenced by seasonal fluctuations due to climatic conditions. The method is based on data extracted from the observations of a representative consumer unit during an experimental campaign. In addition, statistical data on population and housing in Lampedusa and the results of previous studies [33; 34] were considered. According to the last population census, most families in Lampedusa are formed of two or three people (about 42%). Through a survey, presented in previous studies [5], it was verified that the most widespread DHW production plant is an 80-L ESWH equipped with a 1200-W electric resistance. Moreover, due to the touristic vocation of the island, the number of people living in apartment units varies from two in the winter to three in the summer. In order to identify the average daily DHW consumption, the monitored data of energy consumption in the most critical seasons (EDHW) were compared with those calculated using a Trnsys model of the heater. Indeed, simulations were conducted by varying the hot water volume demand per day until energy consumption matched the averaged recorded data in the critical months. Maximum (V\({}_{\text{DHW,max}}\)) and minimum DHW demand values (V\({}_{\text{DHW,min}}\)) were respectively calculated in the winter and summer as follows:  
\[\text{V}_{\text{DHW,i}}=\text{f}_{\text{m,i}}\text{V}_{\text{DHW,max}}\ ( \text{L}), \tag{1}\]  
\[\text{f}_{\text{m,i}}=-\frac{\text{n}_{\text{i}}-\text{n}_{\text{max}}}{\text {n}_{\text{max}}-\text{n}_{\text{min}}}\ (\text{V}_{\text{DHW,max}}-\text{V}_{\text{DHW, min}})+\text{V}_{\text{DHW, max}}\ (\text{L}), \tag{2}\]  
where i is the generic number of the month in the year, n\({}_{\text{max}}\) and n\({}_{\text{min}}\) are respectively the months in which V\({}_{\text{DHW,max}}\) and V\({}_{\text{DHW,min}}\) values were recorded from the experimental campaign, and f\({}_{\text{m,i}}\) is a monthly correction factor. A linear trend was then used to extrapolate the daily DHW volume for the other months. In order to generalize results, hot water consumption per person per day was calculated. Similarly, the hourly frequency of on/off ESWH cycles was calculated from monitored data to build the hourly tapping profile as follows:  
\[\text{x}_{\text{h}}=\frac{\text{f}_{\text{h}}}{\text{f}_{\text{MAX}}}\ (\%), \tag{3}\]  
where x\({}_{\text{h}}\) is an hourly factor for the VDHW,i, f\({}_{\text{h}}\) is the operation time of the ESWH, and f\({}_{\text{MAX}}\) is the maximum frequency value in the day. Yearly energy consumption and temperature trends in the water storage were used to run the simulation models of possible retrofit options. Based on the actual DHW demand, remarks on plant sizing and service modes were made using simulations in real operating conditions.