Optimization of Photovoltaic Self-consumption using Domestic Hot Water Systems

Electrified domestic hot water systems, being deferrable loads, are an important demand side management tool and thus have the potential to enhance photovoltaic self-consumption. This study addresses the energy and economic performance of photovoltaic self-consumption by using a typical Portuguese dwelling. Five system configurations were simulated: a gas boiler (with/without battery) and an electric boiler (without demand management and with genetic and heuristic optimization). A sensitivity analysis on photovoltaic capacity shows the optimum photovoltaic sizing to be in the range 1.0 to 2.5 kWp. The gas boiler scenario and the heuristic scenario present the best levelized cost of energy, respectively, for the lower and higher photovoltaic capacities. The use of a battery shows the highest levelized cost of energy and the heuristic scenario shows the highest solar fraction (56.9%). Results also highlight the great potential on increasing photovoltaic size when coupled with electrified domestic hot water systems, to accommodate higher solar fractions and achieve lower costs, through energy management.


INTRODUCTION
The need to fight the greenhouse gas emissions and climate change requires urgent rethink of our energy paradigm.The increase on both oil prices and energy consumption, highlight this urgency and the energy markets has been responding with the development and integration of cleaner and renewable energy sources [1].In the EU-28 countries, the energy consumption in buildings represents about 40% of the total final energy consumption [2], 26% being attributed to the residential sector [3].It is clear that a huge effort has to be made regarding Self-Consumption (SC) of renewable energy in households.Distributed renewable energy production, where a consumer is also a producer (prosumer), embodies an important trend.Indeed, if the European Union targets for 2020 regarding energy performance on buildings are to be accomplished, in particular such as the Nearly Zero Energy Buildings (NZEB) directive, the increasing renewable energy at households allied with growing efficient processes/appliances and smarter use of energy, must be urgently encouraged and implemented [2].
Demand Response (DR) may be defined as the "voluntary and temporary adjustment of power demand taken by the end-user as a response to a price signal, for example market prices or tariffs, or taken by a counter-party like the utility based on an agreement with the end-user" [4,5].According to the definition, DR can be used to shift loads from peak periods to off-peak or for curtailment of generation, assuring a more efficient demand-supply balance.
Energy storage coupled with Photovoltaic (PV) systems for SC improves the known benefits of DR, i.e., the ability to match the demand with energy supply, tackling the variability issues of renewable production and allowing an increase of renewable penetration.While improving the grid flexibility, DR also addresses a reduction of operation costs regarding backup power plants and a reduction on grid capacity enhancement requirements [6][7][8].Although the residential sector has lower economic benefits from participating in DR activities comparing to larger consumers, it still represents a large potential to improve the grid performance through the shifting of peak loads to valley periods [6].An exhaustive review conducted in [9] mentions several studies regarding the high penetration of renewables through the use of flexible demand and production, namely using Domestic Hot Water (DHW).Here, the work of Finn et al. [10,11] is referred, since the results of their work focused on matching wind production with residential loads, achieved potential cost savings of 4-33% when using domestic hot water devices.Soares et al. [12] studied the potential of DR for residential sector through the modelling of household consumption considering disaggregated loads by its type of control, using an energy management system, a potential of 5% of savings for a household's owner was found.
The process of load-generation matching at the residential sector level can be hugely improved when optimal sizing of PV generation, energy storage and smart appliances are available for SC energy management [13].Parra et al. [7], compared the performance of batteries and hot water tanks as energy storage technologies and concluded that the most beneficial solution in terms of levelized cost of stored energy is the coupling of PV generation with hot water tanks.
Cao et al. [14] presented a household with a thermal-electrical energy storage system that uses the renewable excess in order to evaluate the mismatch between demand and supply sources.Different combinations of battery/DHW thermal storage sizing and renewable energy sources (PV and micro-wind turbine) are tested.They concluded that the DHW thermal storage is the best option to minimize the demand-supply mismatch and its optimal sizing is the equivalent of the daily hot water consumption.Neves et al. [4,5] developed a genetic-algorithm to optimize the demand response through the minimization of the dispatch cost of the electric system, taking the Corvo Island, Azores, as a case study.In that study, DHW loads are used as a demand side management tool, by being considered deferrable loads.
The literature review allowed the identification of electrified DHW as an important demand side management tool through the optimization of PV self-consumption, since it has the availability to be a deferrable load (decoupled from routines).
In this study, several scenarios are proposed to compare different single household system configurations (with PV self-consumption), regarding energy cost and usage, with the main focus on DHW demand.The analysis of solar thermal systems was not included in this study, since the main objective is to ascertain how electrified DHW equipment is able to promote the penetration of PV systems at residential level by reducing the cost of energy.Although from an exergy point of view, the use of PV systems for DHW purposes may seem counteracting, the high cost of an electrochemical battery makes it an interesting economic solution, as discussed in this work.

METHODS
The aim of this study is to evaluate the best technical and economic configuration to optimize PV self-consumption at the residential level, taking advantage of the electrified DHW deferrable loads.As such, all the scenarios consider PV generation in order to identify the best option for a prosumer.The electric demand, in all scenarios, is primarily supplied by photovoltaic production, and ultimately by the grid.The excessive PV production is sold back to the grid.
The energy and economic balances are determined annually, using data (electric and DHW consumption, and PV production) based on an hourly resolution.
Furthermore, a sensitivity analysis of the PV power installed, within a range of 0.25 kWp and 5 kWp, is performed to evaluate its impact on the solar fraction and to select the optimum sizing for each scenario considering its Levelized Cost of Energy (LCoE).
The solar fraction is determined according to eq. ( 1): The energy cost was calculated through the annual balance between the energy expenses (electricity and natural gas, when applicable) and the energy sales to the grid.The LCoE is determined considering the energy and the investment costs for the project lifetime (20 years), eq. ( 2).The degradation of the PV production was not considered:

Scenarios' characterization
In this section a detailed description of each studied scenario is provided.
No demand side flexibility.Scenarios A1, A2 and B1 consider configurations without flexibility on the demand side: • Scenario A1 [conventional supply (natural gas and electricity)] -In scenario A1, the household's DHW needs are supplied by a natural gas boiler and the electric demand is supplied by the photovoltaic installation and the grid; • Scenario A2 (natural gas and electricity, with battery storage) -In scenario A2, the DHW needs are supplied by natural gas, as in the previous scenario.However, the use of a battery is introduced to understand the impact of energy storage from both energy and economic point of view.The battery is designed to charge when there is PV surplus, and to discharge when there is demand and no PV production; • Scenario B1 (all demand electrified) -In scenario B1, a total electrification of household's energy demand was considered.Since the gas boiler was replaced by an electric one, all the energy loads can be supplied by the PV installation, or the grid when PV power is not available.
Levelized cost of energy = Energy costs + Investment cost Energy demand The overall electric profile is the sum of the initial electric demand and the electrified DHW demand.The remaining amount of PV, when PV production exceeds consumption, is sold back to the grid.
With demand side flexibility.Scenarios B2 and B3 aim to improve the DHW loads of scenario B1, considering the same system components, while introducing demand side management of DHW loads through two different approaches: genetic-algorithms and heuristic optimization: • Scenario B2 (DHW loads optimization with genetic-algorithms) - The development of a genetic-algorithm is proposed in order to optimize the electrified DHW demand.The genetic-algorithm used was implemented in MATLAB ® , in similarity to the study conducted by Neves et al. [4].
For the specific problem addressed in this study, the chromosomes have 24 genes (accounting for daily number of hours) and the values for each gene represent the DHW demand for each hour of the day.The objective function is given by the minimization of cost for the household owner, considering the balance between energy purchases and sales.The fitness given to each individual on the evaluation phase is the combination of the cost and the penalties that are assigned to them.The penalties are used to guarantee that the chosen chromosomes have specific characteristics.In this case, the penalties are applied to assure the satisfaction of the DHW needs.The algorithm used builds the annual consumption through the optimization of each day individually, saving the chromosome with the lower fitness for each day independently.
The number of individuals and generations used for this optimization was 50 and 100, respectively.The crossover and mutation probability was assumed to be 70% and 5%, respectively; • Scenario B3 (DHW loads optimization with heuristic method) -The heuristic method developed for this scenario is similar to the one implemented in scenario A2, albeit using a DHW tank.The excess PV production is stored in the hot water tank as thermal energy, and when the tank is completely full, but still there is PV production, this energy is sold to the grid.The tank energy is used preferably before the use of grid energy, constraining the minimum energy in the tank at 10% of its maximum capacity.
Figure 1 presents a summarized schematic configuration of each scenario abovementioned.

Case study
A typical Portuguese household at Lisbon, with three inhabitants (two adults and one child), was used as case study.The hourly electricity demand data for a year was accessed [15], resulting in a yearly demand of 3,381 kWh, peak demand of 2.95 kW and average daily demand of 9.3 kWh.Originally the house had a gas fired boiler for DHW and the electricity demand was exclusively supplied by the electric grid.
The DHW needs were estimated according to the current regulation for Portugal, that assumes a consumption of 40 L/day of hot water per person [16].As such, a consumption of 120 L/day was assumed and distributed throughout the day to establish an hourly profile of hot water consumption.Then, this hot water profile was converted to thermal energy, assuming an initial and final temperature of 15 °C and 50 °C † , respectively, which represents 5.5 kWh/day.When considering hot water storage equipment, a final temperature of 60 °C was assumed ‡ .Also, the efficiency of the DHW equipment was taken into consideration (84% for the gas boiler and 97% for the electric boiler [17]) and the DHW profile was assumed constant along the year.
The DHW profile (using a gas fired boiler) and electric profile of an autumn typical week is represented in Figure 2. As an example, the PV production for this typical week for a PV system with 1.0 kWp capacity is also presented in Figure 2 [18].The PV production that exceeds the electric demand is mentioned throughout this work as the 'Excess PV'.An economic analysis was performed regarding both the electricity and natural gas disbursements.For the scenarios with non electrified DHW (i.e., use of a gas-fired boiler), the natural gas costs were calculated according to its current retail price § and the associated fixed costs (fixed cost per day and soil use and occupation fee for Lisbon) [19,20].
Regarding the electrical bill, a contracted power of 4.6 kVA was assumed and both simple and Time Of Use (TOU) tariffs were simulated.The electricity prices and fixed costs considered were the 2016 regulated tariffs ** [21].† Temperature difference of 35 °C, according to Portuguese regulation [16]   ‡ Final temperature recommended by the Portuguese Quality Institute and the Portuguese Directorate-General of Health for Legionella pneumophila prevention [30]   § 0.0690 EUR/kWh without VAT ** Simple tariff 0.1634 EUR/kWh, and TOU tariff 0.1002 EUR/kWh is used for off-peak hours and 0.1909 EUR/kWh for peak hours (8 AM to 10 PM), excluding VAT According to the Portuguese legal framework, a prosumer is able to sell its excessive production to the grid at 90% of the monthly daily average of the Iberian Electricity Market (OMIE) price for Portugal [22].The calculation of the energy sales to the grid considered the information of OMIE market for 2015, the average sellback price being approximately 5 cEUR/kWh.
The investment regarding the electric boiler for the scenarios with electrified DHW was considered as the difference between the annualized acquisition cost of an instantaneous gas fired boiler and an electric boiler with a tank of 150 L (representing the additional cost that had to be covered).The useful lifetime and investment of each equipment is presented below in Table 1, along with the scenarios where they are included.All the equipment costs presented below do not consider VAT.

RESULTS AND DISCUSSION
In this section the simulation results of each scenario are presented along with the discussion.

Levelized cost of energy and solar fraction sensitivity analysis for photovoltaic sizing
The LCoE and the solar fraction were calculated to understand the behaviour of each scenario according to the installed PV capacity.
The LCoE curves for simple and TOU tariffs (Figure 3 and Figure 4, respectively) show a minimum for each scenario, which reports the optimal sizing of PV power installation.Figure 5 presents the solar fraction of each scenario as an indicator of the self-consumption penetration.Even though a detailed discussion is provided later, these figures have been presented here since the individual analysis of each scenario is described, in the following section, for its optimum PV sizing.Besides the LCoE and the solar fraction, other parameters can be relevant when analysing the performance of different system configurations.One of these parameters is the maximum peak power of the grid purchases which, when reduced, can provide benefits both to the consumer, since it allows the reduction of contracted power, and the distribution network operator, by smoothing the load diagram.As reported in Table 2, scenario A2 shows a reduction on the maximum peak due to the use of a battery.For electrified DHW scenarios, scenario B3 (heuristic) presents the highest reduction of the maximum peak power (11.2%).

Self-consumption energy and economic analysis
Hereafter, an individual analysis of each scenario is presented for the optimum PV power capacity showed in Figure 3 and Figure 4.
In scenario A1, the electric demand is 3,381.2kWh/year (Table 3).The minimum LCoE occurs at a PV power of 1.0 kWp and 1.25 kWp for simple and TOU tariffs, respectively.With a PV installation of 1.0 kWp (Figure 2), 68.1% of the PV production is used for self-consumption, which leads to a grid purchase of 2,363 kWh/year.The solar fraction for this sizing is 19.7% and the LCoE for simple tariff is 15.11 cEUR/kWh.Considering TOU, the PV sizing increases to 1.25 kWp, decreasing the LCoE to 14.81 cEUR/kWh and increasing the solar fraction to 22.2% (Table 3).In scenario A2, when a storage battery is considered, the optimum sizing for the system is 2.0 kWp, for both tariffs.In the following figure (Figure 6), the PV sales to the grid are represented as negative values.Figure 6.PV sellback, PV production (2.0 kWp system), electric demand and grid purchases in an autumn typical week (scenario A2) The system does not need to purchase energy from the grid until achieving the bottom limit of the battery (20%).As for the PV sales to the grid, it only occurs when there is excess PV production and the battery is full (which occurs at the 6 th day for the presented typical week).The use of a battery promotes self-consumption, providing a fraction of PV use of 79.0% and a solar fraction of 45.8%.The energy purchased from the grid (904 kWh/year) decreases significantly compared to scenario A1, despite the increase on LCoE for both tariffs (Table 3).
For scenario B1, the electric demand is 5,744 kWh/year, which is higher than in the previous scenarios, due to the electrification of the domestic hot water with the use of an electric water heater (Figure 7).Higher electric demand leads to higher PV power sizing.Thus, for this scenario the optimum sizing is 1.25 kWp and 1.75 kWp for simple and TOU tariffs, respectively (Figure 3 and Figure 4).The grid purchases are 4,498 kWh/year and the self-consumption accounts for 66.6% of the PV production.The solar fraction and the LCoE obtained are 22.0% and 17.19 cEUR/kWh.When considering the TOU, the PV sizing increases by 0.5 kWp, which is due to the fact that the energy price during the day is higher, thus an increase on PV production leads to savings on the cost of energy (Table 3).
The optimum sizing results for the genetic-algorithms optimization (scenario B2) yielded a 1.75 kWp PV system for simple tariff and 2.0 kWp for TOU.The genetic-algorithm allows a more uniform distribution of the energy requirements throughout the day.The peaks decrease significantly as it can be seen in Figure 8.The percentage of total energy consumption provided by renewable sources (PV), i.e., the solar fraction, is 39.7% and 41.4% for simple and TOU tariffs, respectively (Table 3).
The TOU tariff presents less grid purchases, mainly during daytime.The grid purchase for TOU is 3,398 kWh/year, while for simple tariff is 3,490 kWh/year.Even though the difference is not very clear, the LCoE for the optimum sizing for TOU (14.47 cEUR/kWh) is lower than for simple tariff (15.76 cEUR/kWh).This difference can be justified not only by the higher PV capacity installed but also with a better usage of the grid, purchasing more energy in off-peak periods than in peak hours.
In Figure 9 the daily energy cost is presented along with the fitness value for each day of the year.The fitness of the majority of the days is very close to the daily energy cost, which means that the chosen chromosomes are not violating significantly any of the imposed conditions.The cost presented is a balance between the purchases and sales of energy to the grid.
In the middle of the year, when higher radiation occurs, the daily cost of energy assumes negative values.This is due to higher excessive PV production that leads to higher sales of photovoltaic energy to the grid.However, it is worth noting that the electricity purchases avoidance, due to self-consumption, contributes more to the reduction of the overall energy cost than the energy sales to the grid.This regards to the sellback price, established by the Portuguese regulation, which is significantly lower than the electricity purchase price.As it was expected, when lower values of radiation occur (winter) the cost of energy is higher and so is the daily balance of energy cost.In scenario B3, the photovoltaic production that is not used for the electric demand is used to "charge" the DHW tank.The minimum LCoE for both tariffs occurs with a 2.5 kWp PV system.Hereafter, the behaviour of the system can be observed (Figure 10).
The hot water tank is able to store the energy as thermal energy by heating up the water, when excessive PV production occurs.In Figure 10, one can observe that with the sizing presented (2.5 kWp), the remaining PV production is very low and so are the energy sales to the grid (514 kWh/year).Almost all the energy produced is used for self-consumption (86.2%), as a consequence the energy purchases decrease to 2,518 kWh/year.As the optimum sizing is the same for both tariffs, the main difference is on the minimum LCoE: 14.63 cEUR/kWh and 14.11 cEUR/kWh for simple and TOU tariff, respectively (Table 3).
The use of the heuristic method can bring benefits regarding the peaks of energy that are no longer static, and as Figure 10 shows, they tend to decrease.

Discussion
Regarding the LCoE, scenario A1 (gas boiler) provides the best energy supply solution up to 1.5 kWp of installed PV (Figure 3 and Figure 4), mainly due to the reduced cost of natural gas, compared to electricity costs.When PV production becomes significant, scenario A1 is not able to take advantage of the increased PV production, since energy storage is absent in this scenario and the consumption peaks do not match the solar resource.
In scenario A2 (battery), the LCoE is the most expensive for both tariffs (Figure 3 and Figure 4).The second most expensive scenario for both tariffs is scenario B1, where the system configuration is not able to take advantage of the PV production for self-consumption, because of the decoupling between DHW demand and production profiles.In addition, the increased electricity purchase due to electrified domestic hot water penalizes this scenario, since natural gas is more affordable.
For genetic and heuristic algorithms scenarios (B2 and B3, respectively) the results showed that, for simple tariff, the LCoE is very similar between these two scenarios up to 1.25 kWp of installed PV capacity (Figure 3).The PV production not used in instantaneous self-consumption (DHW and/or electric demand) is extremely reduced in these cases, which leaves a narrow space for improvements.For larger PV capacities, scenario B3 performs best since it aims to maximize the stored thermal energy, while scenario B2 focus on charging only the correspondent to the daily DHW needs.
When comparing the performance of both optimization scenarios considering TOU tariff (Figure 4), scenario B2 presents lower LCoE up to 1.75 kWp of PV capacity.This may be explained by the fact that scenario B3 is not "tariff sensitive" and when PV production is not enough to fulfil the DHW needs, the system relies on grid electricity at the hour of the demand (peak hour) when energy is most expensive.Since, in scenario B2, a cost function optimization is performed using genetic algorithms, this scenario is pointed as the best solution for this range of PV powers.
It is interesting to compare the thermal storage (scenario B3) against the electrochemical storage (scenario A2), since the changing variables are the acquisition cost of the storage devices, their technical characteristics and the end use of stored energy.Due to the high cost of battery acquisition and the reduced amount of excessive PV production for smaller installed powers, scenario A2 represents the worst solution, while B3 clearly represents a better system configuration, having a lower LCoE for all PV powers, in both tariffs.
Regarding solar fraction (Figure 5), for smaller PV installation (0.25-0.5 kWp) the results are very similar within the scenarios since reduced amount of PV production is almost totally used in electric demand.When the excess PV production becomes significant the performances of the considered scenarios differ notably, being scenario B3 the one that maximizes renewable energy self-consumption.Scenario A1 presented the lower solar fraction, but by adding a battery and an energy management strategy (scenario A2) the solar fraction nearly doubles.

CONCLUSIONS
This study explored different energy supply strategies for a typical Portuguese dwelling (with a PV installation) from both economic and environmental perspectives, and aims to help prosumers in the assortment of the most accurate solution for their individual interests.Natural gas and electricity were compared as energy sources for DHW needs, and energy storage at the dwelling was made available through the use of a battery or a hot water tank.Flexibility on the electrified DHW loads was also tested.The analysis was conducted for a range of PV installation sizes in order to evaluate its impact on both LCoE and solar fraction, for both simple and TOU tariffs, under the Portuguese legislation.The methodology implemented in this work allows the qualitative extrapolation of the presented results to other frameworks.
The use of a gas fired boiler (A1) and the heuristic scenario with an electric boiler (B3) present the best performances, regarding the LCoE for both tariffs, respectively, for the lower and higher PV capacities.The use of a battery (A2) showed the highest LCoE, followed by the dumb use of an electric boiler (B1).Regarding the self-consumption, the heuristic scenario shows the highest solar fraction (56.9%).The optimum PV sizing for all scenarios ranges between 1.0 and 2.5 kWp.
The authors conclude that for PV installations up to 1.5 kWp, scenario A1 provides the best solution in terms of LCoE, pointing that the current Portuguese regulation does not fully promote the decarbonisation of the energy sector, nor the increase of PV penetration on the residential sector.When considering all electrified demand, it was shown that energy storage devices coupled with proper demand side management: allow reduced costs of energy for larger PV installations, increases renewable self-consumption, and promotes the penetration of PV power.

ACKNOWLEDGEMENT
Financial support from the Portuguese Foundation of Science and Technology through the Doctoral grants (PD/BD/114263/2016 and PD/BD/114174/2016) and from Instituto Dom Luiz through UID/GEO/50019/2013, is gratefully appreciated.

Figure 1 .
Figure 1.Schematic configuration of the considered scenarios

Figure 2 .
Figure 2. PV production (1.0 kWp system), electric and DHW demand for an autumn typical week using a gas fired boiler

Figure 3 .
Figure 3. LCoE according to the installed PV power for simple tariff

Figure 4 .
Figure 4. LCoE according to the installed PV power for TOU tariff

Figure 5 .
Figure 5. Solar fraction according to the installed PV power

Figure 7 .
Figure 7. PV production (1.0 kWp system) and electric demand for an autumn typical week for scenario B1

Figure 8 .Figure 9 .
Figure 8.Initial and optimized DHW demand and excessive PV production (1.75 kWp system)for simple tariff in an autumn typical week (scenario B2)

Figure 10 .
Figure 10.Initial and optimized DHW demand and PV excess in an autumn typical week for a 2.5 kWp PV system (scenario B3)

Table 1 .
Technical specifications, useful lifetime and investment of the system components

Table 2 .
Maximum peak power of grid purchases

Table 3 .
Summary of the results