A Polygeneration System Based on Desiccant Air Conditioning Coupled with an Electrical Storage

: This study presents an extension of a previous paper recently published by the authors. In particular, the current paper focuses on adding electrical storage to a polygeneration system developed for residential applications. Different from the previous work, it aims to design an off-grid facility. The polygeneration plant provides electricity, space heating and cooling, domestic hot water, and freshwater for a single-family dwelling in Almer í a, Spain. The main system technologies are photovoltaic/thermal collectors, reverse osmosis, and desiccant air conditioning. Lead-acid battery storage was added as a backup for the electrical system. The system was performed in the TRNSYS simulation environment for one year with a 5-min time step. A parametric study was carried out to investigate the grid dependence according to the number of batteries installed. Design optimization was also performed to provide the optimal system conﬁguration for the off-grid case. A solar collector efﬁciency of 0.55 and a desiccant air-conditioning coefﬁcient of performance of 0.42 were obtained. All demands were fully supplied, and the primary energy saving and CO 2 saving achieved 100%. A minimum battery state of charge of 30% was reached for a few hours all year long.


Introduction
Buildings are responsible for about 40% of global energy consumption and more than 30% of CO 2 emissions [1]. Consequently, building energy consumption has been calling the attention of the International Energy Agency [2] and the European Union [3]. In 2016, the European Commission introduced the concept of nearly zero-energy buildings (NZEBs) to endorse building energy efficiency [4]. Moreover, the integration of polygeneration systems within buildings is an exciting solution to meet the NZEBs target. Polygeneration plants based on renewable energy sources (RES) can replace the existing conventional technologies and simultaneously produce several energy services. Thus, the primary energy consumption and CO 2 emissions are reduced as the RES are replenished by nature and emit little to no greenhouse gases [5].
It is well known that RES, such as solar and wind technologies, can be highly variable due to climate conditions. This leads to a significant grid dependence as the energy production can be null or insufficient to meet the demand, resulting in a plant's profitability reduction [6]. Therefore, the adoption of electrical storage (ES) to increase the availability of electricity is an attractive option to be investigated [7]. Furthermore, the electricity distribution losses by the grid are dramatically reduced in an off-grid facility [8]. ES refers to converting electricity from a power source into a storage form for conversion back to electricity on demand [9]. They are classified into four main categories: mechanical (e.g., flywheel), electrical (e.g., capacitors), chemical (e.g., electrochemical devices), and fuel cell (e.g., hydrogen storage) [10,11] and can be used as single energy storage or multiple heat pump, thermal energy storage (TES), and two ES systems. The results showed that the self-consumption of PV energy is increased by the operation of the ES with a decrease in electricity fed back to the grid. Singh et al. [33] developed a PV-WT generation system, including biomass and ES. The system was used to match the electrical load of a small area. The study defined the optimal component sizes through an artificial bee colony and particle swarm algorithms. The results highlighted the system operation in terms of the battery state of charge (SOC). The analysis showed a minimum SOC of 30% for only a few hours in the whole year. Destro et al. [34] studied the optimal design of a trigeneration system for a small, isolated tourist resort in Northern Italy. It consisted of a PV plant, a diesel engine, a hot and cold TES, lead-acid batteries, and pumped hydro energy storage. The design and operation strategies were optimized through a model based on the particle swarm algorithm to minimize the costs and fulfill the users' demands of electricity, heating, cooling, and potable water. The results showed a PV generation of 35% of the total electricity demand and battery storing of around 88% of all energy stored. Calise et al. [35] developed a thermo-economic analysis of a polygeneration system consisting of photovoltaic/thermal collectors (PVT) coupled with a solar-assisted heat pump, an adsorption chiller, and ES. The plant supplies electricity, space heating and cooling, and domestic hot water. The electricity was self-consumed and/or sent to the grid. The results outlined a share of the ES system on the self-consumed electricity of about 20%.Żołądek et al. [36] presented an energy-economic assessment of an island polygeneration system based on a PV field, small WT, wood chip gasifier, battery, and hydrogen circuit with electrolyzer and fuel cell. The system was designed in TRNSYS to supply electricity for a tourist facility in two European cities. The system was able to meet the user's demand. Cappiello et al. [37] analyzed two technologies for biogas production coupled with PV panels and an ES system. The off-grid arrangement was designed for a sewage sludge treatment plant located in Stuttgart, Germany. The results presented a primary energy saving of around 25-30%. Kim et al. [38] studied a polygeneration system with ES for a hospital. The results showed 30.79% of primary energy saving, 28.35% of CO 2 emission reduction, and 36.86% of operating cost saving compared to the conventional system. Furthermore, the economic feasibility analysis indicated a simple payback period of 6.6 years.
Analyzing the available literature, RES systems coupled with ES are of interest to the research community, especially for buildings. However, the analysis of an off-grid polygeneration plant coupled with battery storage for a residence is scarce. The authors aim to extend the application of the polygeneration system designed by Gesteira et al. [39] for electricity, heating, cooling, domestic hot water (DHW), and freshwater supply for a residential dwelling located in Almeria, Spain. Here, a novel off-grid layout is proposed and modeled with TRNSYS software [40]. To the best of the authors' knowledge, the polygeneration system proposed in this paper was never investigated employing a dynamic simulation of PVT collectors, reverse osmosis (RO), and desiccant air conditioning (DAC) coupled with lead-acid batteries. First, a parametric study analyzed the previous polygeneration system when coupled with batteries. Then, a Hooke-Jeeves optimization was performed to determine the system's off-grid optimal setup regarding the energy and environmental parameters. Finally, the optimal daily and yearly results are presented and analyzed.

System Layout
The proposed approach is adapted from the polygeneration system designed by Gesteira et al. [39] (Figure 1). Here, the novelty is the electrical storage replacing the grid to avoid grid dependence and converting it to an off-grid system. Moreover, a new regulator/inverter for monitoring the battery state of charge was added. The solar and TES loops, RO module, and HVAC system are described in more detail in Ref. [39]; therefore, in this work, only the new off-grid power circuit is deeply reported.
to avoid grid dependence and converting it to an off-grid system. Moreover, a new regulator/inverter for monitoring the battery state of charge was added. The solar and TES loops, RO module, and HVAC system are described in more detail in Ref. [39]; therefore, in this work, only the new off-grid power circuit is deeply reported. The PVT collectors convert solar irradiation into electrical and thermal energy with a fixed slope of 35° (no tracking). The solar collector fluid is a mixture of water/glycol (60/40). The thermal energy storage consists of a fluid-filled sensible vertically stratified (four nodes) energy storage tank with a heat exchanger inside. An air heater (AH) prevents fluid overheating by dissipating heat with a capacity of 20 kW. The TES supplies the HVAC system and the DHW at 45 °C. The RO device consumes 110 W and produces 35 kg/h of freshwater. The freshwater is stored in a tank of 1.0 m³. In the winter season, heating is provided for the building through a fan coil. During summertime, the thermal energy drives a DAC system and provides cooling.
Regarding the power circuit, the electricity consumption consists of the building's electric demand and the system power load (pumps, fans, etc.). The PVT collector's power is sent to a regulator/inverter with peak-power tracking. Two power-conditioning devices are needed in PV power systems coupled with ES. The first is a regulator, which distributes DC power from the solar array to and from a battery. If the battery is fully charged, excess energy is dumped. The second component is the inverter, which converts the DC power to AC and sends it to the load. Although batteries are expensive and require notable maintenance [41], an economic analysis was not performed. However, they can be economically competitive for isolated dwellings for which the cost of connection to the grid would be high [42].

System Model
The TRNSYS environment (version 18) [40] was used to model and dynamically simulate the proposed system (PS). The software's built-in library provided all components used to develop the system. Some of them are user-defined, such as calculators, controllers, and data readers set by the authors. Others are required to provide the results, such as integrators and plotters. Here, a detailed description of the regulator/inverter, the battery storage, and the energy and environmental models are reported. The other components' descriptions are available in TRNSYS's component mathematical reference [40]. Table 1 presents the parameters of the novel power circuit of the PS. The PVT collectors convert solar irradiation into electrical and thermal energy with a fixed slope of 35 • (no tracking). The solar collector fluid is a mixture of water/glycol (60/40). The thermal energy storage consists of a fluid-filled sensible vertically stratified (four nodes) energy storage tank with a heat exchanger inside. An air heater (AH) prevents fluid overheating by dissipating heat with a capacity of 20 kW. The TES supplies the HVAC system and the DHW at 45 • C. The RO device consumes 110 W and produces 35 kg/h of freshwater. The freshwater is stored in a tank of 1.0 m 3 . In the winter season, heating is provided for the building through a fan coil. During summertime, the thermal energy drives a DAC system and provides cooling.
Regarding the power circuit, the electricity consumption consists of the building's electric demand and the system power load (pumps, fans, etc.). The PVT collector's power is sent to a regulator/inverter with peak-power tracking. Two power-conditioning devices are needed in PV power systems coupled with ES. The first is a regulator, which distributes DC power from the solar array to and from a battery. If the battery is fully charged, excess energy is dumped. The second component is the inverter, which converts the DC power to AC and sends it to the load. Although batteries are expensive and require notable maintenance [41], an economic analysis was not performed. However, they can be economically competitive for isolated dwellings for which the cost of connection to the grid would be high [42].

System Model
The TRNSYS environment (version 18) [40] was used to model and dynamically simulate the proposed system (PS). The software's built-in library provided all components used to develop the system. Some of them are user-defined, such as calculators, controllers, and data readers set by the authors. Others are required to provide the results, such as integrators and plotters. Here, a detailed description of the regulator/inverter, the battery storage, and the energy and environmental models are reported. The other components' descriptions are available in TRNSYS's component mathematical reference [40]. Table 1 presents the parameters of the novel power circuit of the PS. Type 48 models both the regulator and inverter with peak-power tracking. It is a power-conditioning device that distributes DC power from the solar array to and from a battery bank. It converts the input power to an AC output signal waveform [43] and sends it to the load. It also monitors the battery's state of charge (SOC). If the SOC is between the high limit on the state of charge (HSOC) and the low limit on the state of charge (LSOC), the battery can discharge (when the power production, P prod , is lower than the power demand, P tot,dem ) or charge (when P prod is greater than P tot,dem ). The priority for the power output is to match the electricity demand. It also monitors if the SOC is lower than LSOC and no further discharging is allowed or if it is higher than HSOC, the excess power is dumped. A detailed description of subroutines of such additional controls is reported by Calise et al. [35]. It is important to note that power exchange with the electric grid is not admitted.

Battery Model
A lead-acid storage battery (Type 47) operates with the solar array and the powerconditioning components. It specifies how the battery SOC varies over time, given the rate of charge or discharge. This model is based on a simple energy balance of the battery [44]. The battery mathematical model is based on Shepherd equations, which describe the battery charge or discharge [40]. The battery discharge equation (I < 0) is given by: And the battery charge equation (I > 0) is given by: The maximum charging and minimum discharging voltages are limited to extend the battery lifetime. The voltage limit on discharge is calculated from the: The variation of the battery charge is calculated as follows:

Energy and Environmental Models
The energy performance of the PS is evaluated by the primary energy saving (PES) index. The PS considers the demands not attended to by the polygeneration system. A reference system (RS) compares all demands provided by traditional energy sources. The RS consists of an electric cooling system (ECS) with a coefficient of performance, COP ECS , of 2.6, and a natural gas boiler (GB) with a thermal efficiency, η th , of 0.92 [45]. The Spanish electric grid efficiency was taken from IDAE [46], η el = 0.42.
The PES and its ratio (PES R ) are calculated as shown in Equations (5) and (6): PE RS = P build, dem + P syst, dem η el P grid,aux is the electricity withdrawn from the grid, and Q DHW,aux , Q heat,aux , and Q cool,aux are the thermal demands supplied by a GB and an ECS.
Following the same method, the CO 2 saving was used as the environmental analysis, as shown in Equations (9) and (10): The Spanish emission factor for natural gas, f CO 2 ,NG , is 0.25 kg CO 2 /kWh [46], and for the grid, f CO 2 ,EE , it is 0.19 kg CO 2 /kWh [47].

Results and Discussion
The residential building used during the simulation is described in detail by Ref. [48]. Table 2 summarizes all the information regarding the climate zone and the building. In this paper, the authors propose a novel polygeneration system for the same case study. It supplies electricity, heating, cooling, DHW, and freshwater for a residential dwelling located in Almeria, Spain.  The simulation was performed based on one year with a 5-min time step. Firstly, a parametric study was performed to investigate the behavior of the polygeneration system developed in Ref. [39] when coupled with a battery bank. Then, a design optimization was done to determine the system's off-grid optimal setup. For that reason, the number of PVT collectors and batteries was simultaneously optimized. Finally, the optimal system behavior is shown based on typical-day temperature and energy profiles. The yearly results showed the main performance metrics. Table 3 comprehends the solar generation parameters of the polygeneration system developed by Ref. [39]. Here, a parametric analysis was conducted to investigate the behavior of this system when coupled with a battery bank. The number of batteries (N batt ) varied from 1 to 20. The off-grid configuration is obtained when the PES r and CO 2r achieve their maximum, and the P grid,aux is no longer required by the system. As seen in Figure 2, the addition of batteries to the already developed system solely cannot convert it into an off-grid facility.  An annual electricity autonomy is a primary goal. However, Pgrid,aux was not able to achieve less than 500 kWh per year based only on the batteries addition. It can also be seen by the energy and environmental analysis, which achieved a maximum of 89.4% and 92.0% of PESr and CO2r, respectively, due to the grid electricity consumption. It is worth noting that selling back electricity to the grid was neglected.

Design Optimization
To achieve 100% electricity autonomy, an optimization analysis was performed. The TRNOPT plug-in included in the TRNSYS package links the optimization algorithm and the simulation model. This tool uses the algorithms included in the GENOPT package developed by Lawrence Berkeley National Laboratory [49] to perform complex mathematical operations and optimize the system. In particular, the generalized search method was used as this technique avoids the calculation of partial derivatives. The Hooke-Jeeves [50] modified algorithm was selected. The structure of this algorithm avoids the achievement of local minimum points and considers the TRNSYS simulation for approximating the objective function. This optimization method provides the optimum value in a relatively low number of iterations.
The optimization was conducted considering the number of PVT collectors and batteries to achieve an off-grid capable setup. Moreover, the PES and CO2 ratios were selected as optimization objective functions. As they are similar, the results coincided for both parameters. Figure 3 shows the optimized variables as a function of iterations. The optimization process converged in more than 100 simulations. The optimization results are consistent with the ones obtained by the parametric study. The optimum number of PVT collectors was 30 due to roof limitation. Regarding the number of batteries, the optimum value was 22. Moreover, it is worth noting that the optimization algorithm restricted the lower value for both variables to 1, and the maximum number of batteries was not limited. An annual electricity autonomy is a primary goal. However, P grid,aux was not able to achieve less than 500 kWh per year based only on the batteries addition. It can also be seen by the energy and environmental analysis, which achieved a maximum of 89.4% and 92.0% of PES r and CO 2r , respectively, due to the grid electricity consumption. It is worth noting that selling back electricity to the grid was neglected.

Design Optimization
To achieve 100% electricity autonomy, an optimization analysis was performed. The TRNOPT plug-in included in the TRNSYS package links the optimization algorithm and the simulation model. This tool uses the algorithms included in the GENOPT package developed by Lawrence Berkeley National Laboratory [49] to perform complex mathematical operations and optimize the system. In particular, the generalized search method was used as this technique avoids the calculation of partial derivatives. The Hooke-Jeeves [50] modified algorithm was selected. The structure of this algorithm avoids the achievement of local minimum points and considers the TRNSYS simulation for approximating the objective function. This optimization method provides the optimum value in a relatively low number of iterations.
The optimization was conducted considering the number of PVT collectors and batteries to achieve an off-grid capable setup. Moreover, the PES and CO 2 ratios were selected as optimization objective functions. As they are similar, the results coincided for both parameters. Figure 3 shows the optimized variables as a function of iterations. The optimization process converged in more than 100 simulations. The optimization results are consistent with the ones obtained by the parametric study. The optimum number of PVT collectors was 30 due to roof limitation. Regarding the number of batteries, the optimum value was 22. Moreover, it is worth noting that the optimization algorithm restricted the lower value for both variables to 1, and the maximum number of batteries was not limited.

Daily Analysis: A Typical Summer Day
A daily result for the summer season is presented next. As a representative day, 6 August was chosen. Figure 4 displays the profile of the main parameters for this typical day. The power produced by the PVT collectors (PPVT) follows the increase in solar radia-

Daily Analysis: A Typical Summer Day
A daily result for the summer season is presented next. As a representative day, 6 August was chosen. Figure 4 displays the profile of the main parameters for this typical day. The power produced by the PVT collectors (P PVT ) follows the increase in solar radiation. P PVT starts to increase at 6:30, meets its maximum at 12:30 (4197 W), and then decreases until 20:00. The battery power (P batt ) meets the electric demand (P load ) from 0:00 to 9:00 and from 18:30 to 24:00, which coincides with the overnight period or deficient power production. The excess power produced during the daylight is dumped (P dump ) between 13:30 and 19:00 as the battery SOC achieves 100%. No electricity is withdrawn from the grid (P grid ) during the day. The minimum SOC found was around 80%.

Daily Analysis: A Typical Summer Day
A daily result for the summer season is presented next. As a representative day, 6 August was chosen. Figure 4 displays the profile of the main parameters for this typical day. The power produced by the PVT collectors (PPVT) follows the increase in solar radiation. PPVT starts to increase at 6:30, meets its maximum at 12:30 (4,197 W), and then decreases until 20:00. The battery power (Pbatt) meets the electric demand (Pload) from 0:00 to 9:00 and from 18:30 to 24:00, which coincides with the overnight period or deficient power production. The excess power produced during the daylight is dumped (Pdump) between 13:30 and 19:00 as the battery SOC achieves 100%. No electricity is withdrawn from the grid (Pgrid) during the day. The minimum SOC found was around 80%.

Daily Analysis: A Typical Winter Day
As a winter day, 24 January was selected. Figure 5 shows its main parameters. Here, the sunlight period is shorter. PPVT increases at 8:30, meets its maximum at 13:30 (4292 W), and then decreases until 18:00, four hours less than in the summertime. The battery is fully charged between 9:00 and 12:00. Pbatt supplies Pload from 0:00 to 9:00 and from 18:00 to 24:00, coinciding with the overnight time. Pdump occurs between 13:30 and 19:00 as the battery SOC achieves 100%. Pgrid remains null throughout the day. The minimum SOC found was greater than the summer case and was around 85%.

Daily Analysis: A Typical Winter Day
As a winter day, 24 January was selected. Figure 5 shows its main parameters. Here, the sunlight period is shorter. P PVT increases at 8:30, meets its maximum at 13:30 (4292 W), and then decreases until 18:00, four hours less than in the summertime. The battery is fully charged between 9:00 and 12:00. P batt supplies P load from 0:00 to 9:00 and from 18:00 to 24:00, coinciding with the overnight time. P dump occurs between 13:30 and 19:00 as the battery SOC achieves 100%. P grid remains null throughout the day. The minimum SOC found was greater than the summer case and was around 85%.

Yearly Results
The state of charge of a lead-acid battery denotes the actual battery capacity as a function of the rated capacity. It can vary between 0% to 100%. In this application, the SOC can go down to 30% to minimize the number of batteries during the optimization process. Therefore, the battery is recharged when the SOC reaches 30%. SOC over 100% is not permitted. Thus, electricity is dumped whenever 100% SOC is achieved.
The annual SOC profile found in this study is shown in Figure 6. It is important to note that the SOC affects the safe operation, aging, and degradation of the batteries [51]. The minimum SOC of 30% was achieved for only a few hours in the year, from 8359 h to

Yearly Results
The state of charge of a lead-acid battery denotes the actual battery capacity as a function of the rated capacity. It can vary between 0% to 100%. In this application, the SOC can go down to 30% to minimize the number of batteries during the optimization process. Therefore, the battery is recharged when the SOC reaches 30%. SOC over 100% is not permitted. Thus, electricity is dumped whenever 100% SOC is achieved.
The annual SOC profile found in this study is shown in Figure 6. It is important to note that the SOC affects the safe operation, aging, and degradation of the batteries [51]. The minimum SOC of 30% was achieved for only a few hours in the year, from 8359 h to 8362 h and from 8408 h to 8409 h.

Yearly Results
The state of charge of a lead-acid battery denotes the actual battery capacity as a function of the rated capacity. It can vary between 0% to 100%. In this application, the SOC can go down to 30% to minimize the number of batteries during the optimization process. Therefore, the battery is recharged when the SOC reaches 30%. SOC over 100% is not permitted. Thus, electricity is dumped whenever 100% SOC is achieved.
The annual SOC profile found in this study is shown in Figure 6. It is important to note that the SOC affects the safe operation, aging, and degradation of the batteries [51]. The minimum SOC of 30% was achieved for only a few hours in the year, from 8359 h to 8362 h and from 8408 h to 8409 h. The annual results are summarized in Table 4. Here, Pprod is the PPVT minus the regulator/inverter losses due to its inefficiency during the DC to AC conversion (4%). The total useful power production (Ptot) is the Pprod minus the Pdump by the system when the excess power cannot be delivered to the battery because it is fully charged. The off-grid system fully attends to the annual electricity demand during the simulation.
The total useful heat production (Qtot) is the PVT heat generation (QPVT) minus the heat released by the AH (QAH) and the heat dissipated to the environment (Qloss). The energy dissipated by the air heater is around 76.7%, and the thermal losses correspond to 8% of QPVT. The air heater dissipates much energy as the system prioritizes electricity production. Moreover, Qtot is used for attending QDHW,dem, Qheat,dem, and Qcool,dem. However, as the DAC thermal COP is 0.42, the thermal energy required by the DAC regenerator (3,750 The annual results are summarized in Table 4. Here, P prod is the P PVT minus the regulator/inverter losses due to its inefficiency during the DC to AC conversion (4%). The total useful power production (P tot ) is the P prod minus the P dump by the system when the excess power cannot be delivered to the battery because it is fully charged. The off-grid system fully attends to the annual electricity demand during the simulation. The total useful heat production (Q tot ) is the PVT heat generation (Q PVT ) minus the heat released by the AH (Q AH ) and the heat dissipated to the environment (Q loss ). The energy dissipated by the air heater is around 76.7%, and the thermal losses correspond to 8% of Q PVT . The air heater dissipates much energy as the system prioritizes electricity production. Moreover, Q tot is used for attending Q DHW,dem , Q heat,dem , and Q cool,dem . However, as the DAC thermal COP is 0.42, the thermal energy required by the DAC regenerator (3750 kWh/yr) is much higher than Q cool,dem (1450 kWh/yr). Nevertheless, the annual thermal demand is also fully supplied by the system.
The previous work [39] simulated a polygeneration system consisting of 17 (27.2 m 2 ) PVT collectors connected to the national electric grid. An annual near-zero electricity balance was assumed for the electricity withdrawn and sold back to the grid. However, according to the parametric study presented here, this system is not suitable for conversion to an off-grid facility. The addition of lead-acid battery storage on it was not able to provide annual electricity autonomy from the grid.
Consequently, a design optimization was performed to determine a novel polygeneration system setup that is fully independent of the grid. For that case, the number of PVT collectors was increased to 30 (48 m 2 ), and 22 (48.4 kWh) batteries were established by the optimization algorithm. In particular, the constraints were the roof availability (50 m 2 ) and the minimum SOC, affecting the PVT generation and the storage bank size, respectively.

Conclusions
This paper investigated a novel off-grid polygeneration system for residential applications. The proposed system integrates PVT collectors, RO, and DAC coupled with lead-acid batteries. The system was simulated for a single-family townhouse in Spain to meet the demands of electricity, heating, cooling, domestic hot water, and freshwater. The system can be applied to isolated areas with mild relative humidity and temperature, which makes the operation of a DAC possible. The system's layout was dynamically simulated in the TRNSYS environment on an hourly and yearly basis. Design optimization of the system was done under different numbers of PVT collectors and batteries to achieve the optimal off-grid system structure. The main findings are summarized in the following: 1.
The introduction of batteries to the already developed on-grid system solely cannot convert it into an off-grid plant. Indeed, the number of PVT collectors and the number of batteries must also be considered.

2.
The optimal off-grid system configuration for Almería was obtained for 30 PVT collectors and 22 batteries. This optimization pursued null electricity withdrawn from the grid. For that reason, an energy and environmental approach was used, neglecting the system's economic feasibility. 3.
The minimum battery SOC was defined as 30%, which may decrease the battery lifespan. However, the yearly results showed that the SOC achieved its minimum only for a few hours during the year. Lithium battery would be an interesting choice for avoiding lifespan issues but with higher costs.

4.
The energy released by the air heater was around 77% of the generated heat due to an electricity generation priority. The excess heat may be reduced with the addition of PV panels instead of increasing PVT collectors or used in other thermal applications.

5.
High PES and CO 2 savings were found, and all demands were fully attended.
To sum up, the developed polygeneration system is replicable for other cities, mainly those disconnected from the grid. It can be an interesting option for meeting the energy demands using RES. Future works should investigate the economic feasibility of the capital cost of new and second-life batteries if the grid is not available or determine which system is more attractive if the grid is available, considering the electricity purchase tariff.