Water-Energy Nexus: A Pathway of Reaching the Zero Net Carbon in Wastewater Treatment Plants

: The water-energy nexus, together with the need for sustainable management of these interconnected resources, has attracted growing attention from the scientiﬁc community. This paper focuses on this nexus from the point of view of the energy that is required by wastewater treatment plants, which are intensive energy consumers and major emitters of greenhouse gases. The main objective of the study is to investigate the possible use of a wastewater plant’s internal chemical, potential, and kinetic energy, and the addition of external renewable technologies with a view to achieving clean energy consumption and reducing greenhouse gas emissions. For this purpose, an analysis is made of the feasibility of introducing alternative technologies—anaerobic digestion, hydraulic turbines, wind turbines, and photovoltaic modules— to meet the plant’s energy needs. The plant chosen as case study (Jinamar plant, Canary Islands, Spain) has an energy consumption of 2956 MWh / year, but the employed methodological framework is suitable for other plants in locations where the renewable energy potential has previously been analyzed. The results show that a renewable energy production of 3396 MWh / year can be obtained, more than enough to meet plant consumption, but also conﬁrm the need for an energy storage system, due to seasonal variability in energy resource availability. In terms of climate change mitigation, the emission of 2754 tons / year of greenhouse gases is avoided. In addition, the economic viability of the proposed system is also conﬁrmed. and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine. In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine. system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.


Introduction
Throughout history, water and energy have been determining factors in the development of humanity [1]. Despite being conceptually different, water needs energy for the diverse stages that make up its cycle [2], and it can likewise be argued that, certainly since the invention of the steam engine in 1712, energy needs water [3]. While water may be a source of energy (hydroelectric, geothermal, and oceanic), the water industry is undoubtedly energy intensive [4] and it consumes 1723 TWh, which is the equivalent of 8% of world energy production [5]. Consumption is forecast to double by the year 2040, highlighting the intensification of desalination processes in the Middle East and North Africa and wastewater treatment processes in emerging economies [5].
According to data from the International Energy Agency, 583 billion m 3 of water are consumed in electricity production (approximately 15% of the water used globally), of which 66 billion will not be returned to their source [6]. Depending on the type of fuel used for electricity production, the water consumption ranges from 0.7 m 3 /MWh (combined cycle) to 2.7 m 3 /MWh (nuclear power) [7].
After deciding how to obtain the biogas, the different energy recovery systems had to be evaluated. The fuel cell (FC) technology was selected, as the intention is to work with zero carbon footprint technologies. Its modular nature and silent operation with low aesthetic impact and high efficiency in the direct production of electricity suggest its use in urban WWTPs [40].
The biogas has first to be transformed into hydrogen in order to use the FCs. Steam reforming is one of the most widely used methods in order to produce hydrogen enriched gases (obtaining 69% of hydrogen concentration) [41]. The main drawback is that the biogas may contain potentially harmful compounds that have to be eliminated to avoid structural damage to the equipment. Prior to steam reforming, a condenser (moisture removal), an adsorption system with active carbon (elimination of siloxanes), and a Binax system (elimination of volatile organic carbons) have to be implemented [42].
The final step before electricity can be obtained from the sludge was to select the FC model. The proton exchange membrane fuel cell (PEM FC) was chosen, due to its low operating temperatures, low corrosion, and easy maintenance. These FCs are characterized by their high sensitivity to carbon monoxide [43]. The use of a pressure swing adsorption (PSA) system was also adopted in order to eliminate the last harmful components of the gas obtaining 89% of hydrogen in its composition, as recommended in several references [44]. Figure 1 shows a schematic representation of the entire process. After deciding how to obtain the biogas, the different energy recovery systems had to be evaluated. The fuel cell (FC) technology was selected, as the intention is to work with zero carbon footprint technologies. Its modular nature and silent operation with low aesthetic impact and high efficiency in the direct production of electricity suggest its use in urban WWTPs [40].
The biogas has first to be transformed into hydrogen in order to use the FCs. Steam reforming is one of the most widely used methods in order to produce hydrogen enriched gases (obtaining 69% of hydrogen concentration) [41]. The main drawback is that the biogas may contain potentially harmful compounds that have to be eliminated to avoid structural damage to the equipment. Prior to steam reforming, a condenser (moisture removal), an adsorption system with active carbon (elimination of siloxanes), and a Binax system (elimination of volatile organic carbons) have to be implemented [42].
The final step before electricity can be obtained from the sludge was to select the FC model. The proton exchange membrane fuel cell (PEM FC) was chosen, due to its low operating temperatures, low corrosion, and easy maintenance. These FCs are characterized by their high sensitivity to carbon monoxide [43]. The use of a pressure swing adsorption (PSA) system was also adopted in order to eliminate the last harmful components of the gas obtaining 89% of hydrogen in its composition, as recommended in several references [44]. Figure 1 shows a schematic representation of the entire process. Another intrinsic energy resource in a WTTP is the kinetic energy that is produced by the passage of effluent through its pipes. This energy can be used in order to move the blades of microturbines installed in them. The standard pipe diameter of the plant is 280 mm. The flow is kept constant, thanks to the balancing tank and the correct operation of the biological reactor membranes.
The selected pipe contains the treated effluent of the secondary treatment (avoiding problems of obstruction inherent to the raw water), which goes to the permeate and washing water tank. The characteristics that it presents correspond to a flow of 0.061 m 3 /s and a net head of 3 m.
These data suggest the use of a pico-turbine system. The optimal solution of the systems evaluated was to perform a bypass and install two pico-turbines in parallel ( Figure 2). For an estimation of the energy production, an efficiency rate of 70% is assumed [45] and an inverter efficiency of 85% [46]. Another intrinsic energy resource in a WTTP is the kinetic energy that is produced by the passage of effluent through its pipes. This energy can be used in order to move the blades of microturbines installed in them. The standard pipe diameter of the plant is 280 mm. The flow is kept constant, thanks to the balancing tank and the correct operation of the biological reactor membranes.
The selected pipe contains the treated effluent of the secondary treatment (avoiding problems of obstruction inherent to the raw water), which goes to the permeate and washing water tank. The characteristics that it presents correspond to a flow of 0.061 m 3 /s and a net head of 3 m.
These data suggest the use of a pico-turbine system. The optimal solution of the systems evaluated was to perform a bypass and install two pico-turbines in parallel ( Figure 2). For an estimation of the energy production, an efficiency rate of 70% is assumed [45] and an inverter efficiency of 85% [46].

Energy Production Technologies External to the Plant. Photovoltaic, Wind, and Hydroelectric Energy
First of all, an evaluation of the solar resource available to the plant was made. The operational data were obtained with the Hybrid Optimization of Multiple Energy Resources simulation program [47]. Using a geographic coordinate system, HOMER provides the average global solar radiation on a horizontal surface via NASA's satellite system. The irradiation correction coefficient as a function of inclination was applied to these data. The latitude of the plant makes this coefficient between 15-30°. The optimal location in terms of orientation is on the south face of the two roofs of the WWTP. The slope of the roofs is 15°, and this same angle was chosen for the selection of the correction factor, as the panels can be placed flush with the roof and the costs of the support structure or possible losses due to shadow between them can, thus, be avoided. The annual global radiation obtained after applying the correction factor is 1914 kWh/m 2 .
The performance ratio (PR) values for new systems typically range from 0.6 to 0.9 [48]. After calculating losses due to wiring, dispersion of characteristics in the module, dust and dirt, orientation and inclination, shading, inverter performance, and temperature, a PR was obtained of 0.75 for the first ten years and 0.65 for the following years. The average PR of 0.7 was used for the calculations in the present study.
In terms of wind potential, the windiest areas of Gran Canaria include the northwest and southeast [49]. The Jinamar WWTP is located in the northeast, at a short distance from the area of highest wind intensity.
The wind data were obtained from a 10 m agl (above ground level) anemometer installed at the facilities of the ITC (Spanish initials of the Technological Institute of the Canary Islands) on the east coast of the island and very close to the plant. The power law was applied to the wind speed distribution in order to obtain the values at 60 m (turbine hub height) [50]. Subsequently, these values were introduced into the HOMER simulation program, giving an average wind speed of 7.7 m/s, a form factor C = 8.72 m/s and a scale factor K = 2.
The selection of the wind turbine depends on the peak load to be supplied (432 kW). It is also intended to comply with all the legislative criteria stipulated in the Canary Islands [51] with respect to the minimum distances from the coast of 150 m and urban centers of 250 m [52].
Related to hydroelectric energy, the plant has a 5 m head behind the storage tank of the treated effluent. The nominal diameter is 500 mm and the flow rate varies, depending on two time periods: 180 m 3 /h from 08:00 to 24:00 and 120 m 3 /h from 24:00 to 08:00. Therefore, the hydraulic resource will provide a constant energy altered only by the time variable. First of all, an evaluation of the solar resource available to the plant was made. The operational data were obtained with the Hybrid Optimization of Multiple Energy Resources simulation program [47]. Using a geographic coordinate system, HOMER provides the average global solar radiation on a horizontal surface via NASA's satellite system. The irradiation correction coefficient as a function of inclination was applied to these data. The latitude of the plant makes this coefficient between 15-30 • . The optimal location in terms of orientation is on the south face of the two roofs of the WWTP. The slope of the roofs is 15 • , and this same angle was chosen for the selection of the correction factor, as the panels can be placed flush with the roof and the costs of the support structure or possible losses due to shadow between them can, thus, be avoided. The annual global radiation obtained after applying the correction factor is 1914 kWh/m 2 .
The performance ratio (PR) values for new systems typically range from 0.6 to 0.9 [48]. After calculating losses due to wiring, dispersion of characteristics in the module, dust and dirt, orientation and inclination, shading, inverter performance, and temperature, a PR was obtained of 0.75 for the first ten years and 0.65 for the following years. The average PR of 0.7 was used for the calculations in the present study.
In terms of wind potential, the windiest areas of Gran Canaria include the northwest and southeast [49]. The Jinamar WWTP is located in the northeast, at a short distance from the area of highest wind intensity.
The wind data were obtained from a 10 m agl (above ground level) anemometer installed at the facilities of the ITC (Spanish initials of the Technological Institute of the Canary Islands) on the east coast of the island and very close to the plant. The power law was applied to the wind speed distribution in order to obtain the values at 60 m (turbine hub height) [50]. Subsequently, these values were introduced into the HOMER simulation program, giving an average wind speed of 7.7 m/s, a form factor C = 8.72 m/s and a scale factor K = 2.
The selection of the wind turbine depends on the peak load to be supplied (432 kW). It is also intended to comply with all the legislative criteria stipulated in the Canary Islands [51] with respect to the minimum distances from the coast of 150 m and urban centers of 250 m [52].
Related to hydroelectric energy, the plant has a 5 m head behind the storage tank of the treated effluent. The nominal diameter is 500 mm and the flow rate varies, depending on two time periods: 180 m 3 /h from 08:00 to 24:00 and 120 m 3 /h from 24:00 to 08:00. Therefore, the hydraulic resource will provide a constant energy altered only by the time variable.

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant Sustainability 2020, 12, 9377 6 of 18 and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies.

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies. In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm³/h, so at least 33 kW must be supplied to the unit to start production. If the Sustainability 2020, 12, x FOR PEER REVIEW 6 of 20

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies.  In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm³/h, so at least 33 kW must be supplied to the unit to start production. If the N.A.

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies.  In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm³/h, so at least 33 kW must be supplied to the unit to start production. If the Sustainability 2020, 12, x FOR PEER REVIEW 6 of 20

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies.  In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm³/h, so at least 33 kW must be supplied to the unit to start production. If the 2 Sustainability 2020, 12, x FOR PEER REVIEW 6 of 20

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies. In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm³/h, so at least 33 kW must be supplied to the unit to start production. If the Sustainability 2020, 12, x FOR PEER REVIEW 6 of 20

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies. In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm³/h, so at least 33 kW must be supplied to the unit to start production. If the Sustainability 2020, 12, x FOR PEER REVIEW 6 of 20

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies. In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm³/h, so at least 33 kW must be supplied to the unit to start production. If the Sustainability 2020, 12, x FOR PEER REVIEW 6 of 20

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies. In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm³/h, so at least 33 kW must be supplied to the unit to start production. If the Sustainability 2020, 12, x FOR PEER REVIEW 6 of 20

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies. In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm³/h, so at least 33 kW must be supplied to the unit to start production. If the 3

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies. In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm³/h, so at least 33 kW must be supplied to the unit to start production. If the

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies. In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm³/h, so at least 33 kW must be supplied to the unit to start production. If the

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies. In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm³/h, so at least 33 kW must be supplied to the unit to start production. If the

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies. In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm³/h, so at least 33 kW must be supplied to the unit to start production. If the

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies. In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm³/h, so at least 33 kW must be supplied to the unit to start production. If the 4

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies. In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm³/h, so at least 33 kW must be supplied to the unit to start production. If the

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies. In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm³/h, so at least 33 kW must be supplied to the unit to start production. If the N.A.

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies. In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm³/h, so at least 33 kW must be supplied to the unit to start production. If the

System Analysis
A series of scenarios were simulated using MATLAB software (Global Optimization Toolbox: User's Guide, R2018b version, United States, 2018) in order to meet the energy needs of the plant and evaluate which technological configuration is the most efficient [53]. This tool allows for the customization of the selection criteria and prioritization of the installation of internal technologies in the plant that contribute directly to a circular economy [54,55]. Table 1 shows four scenarios, all of which contain the internal sludge and microturbine energy production systems with varying arrangements of the external technologies. In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm³/h, so at least 33 kW must be supplied to the unit to start production. If the In Scenario 1, in addition to the internal technologies, a wind turbine and pico-turbine system are employed. Scenario 2 additionally incorporates a PV solar installation. Scenario 3 differs from the second in that the installed power in PV technology is doubled. Finally, Scenario 4 has no PV resource, but it incorporates a second wind turbine.

Energy Storage
The behavior of renewable energies throughout the year predicts the need to implement an energy storage system. Among all of the validated storage systems, such as batteries, flywheels, ultracapacitors, magnetic superconductors, compressed air, hydro-pumping, and hydrogen [56], the last three provide long-duration energy storage. Conventional systems, such as batteries, have severe drawbacks in the fields of action where long-term storage is required, including the dissipation of energy, a low energy density, and the need to install a relatively large number of units [57]. For this study, hydrogen storage was selected for its high density and low energy loss, as well as its good adaptability and efficiency when used with renewable energy resources [58]. An alkaline electrolyzer system was chosen, as its suitability for use with wind turbines has been shown, with a fast response time (<1 s) and a wide operating range (10%-00%) [59]. Specifically, the HySTAT®100-10 model that was manufactured by Hydrogenics Corporation was selected as it works with the supply voltage of the wind turbines in alternating current (440 V), a frequency of 50 Hz, and a consumption of 5.3 kWh/m 3 . The equipment includes a refrigeration and air conditioning system, as well as a reverse osmosis water treatment system, which uses 1.5 liters of the ultra-filtered water left over from the membrane bioreactor treatment per cubic meter of hydrogen. As the standard electrolyzer production pressure is 10 bar, a compressor is also required in order to raise the pressure to the selected 200 bar for hydrogen storage in compressed gas bottles.
Hydrogen production from the energy surplus was calculated on the basis of the peak power output of the renewable mix after subtracting the WWTP demand. The electrolyzer has a minimum production rate of 6 Nm 3 /h, so at least 33 kW must be supplied to the unit to start production. If the supply is below this value, then the unit does not produce hydrogen, but it is placed in standby mode (for which approximately 0.5 kW is required).
After hydrogen storage, a fuel cell and its corresponding inverter are used in order to produce electricity. The sizing of this system is calculated on the basis of the highest energy deficit value that needs to be covered.

Results and Discussion
This section shows the energy that is produced with each renewable technology. Subsequently, an analysis of the energy integration to the plant is performed evaluating the different technological configurations. The economic viability of the different scenarios is calculated in the final part of this section.

Internal Renewable Energy Production
While using the load factor method with the volatile solids experimental data (3.3 kg/m 3 ), a digester volume of 144 m 3 (height 7.5 m and diameter 5.5 m) was determined. The amount of biogas that can be obtained is 190,800 m 3 /year. This is stored in the second reactor, which serves as a bio-solids stabilizer and storage system. The gas flow obtained (19.38 Nm 3 /h) is introduced into the FCs in order to produce electricity (after PSA purification). Knowing the density of hydrogen (0.0899 kg/m 3 ), FC consumption (119 L/min), its power (10.5 kW), and efficiency (50%), it is possible to install three FCs that are capable of producing 31.95 kWh e of energy while releasing a certain amount of water at 80 • C that can be used to schedule internal processes of the plant, such as anaerobic digestion.
In order to harness the kinetic energy in the selected pipe, the microturbine that best fits its characteristics is the Toshiba Hydro-eKIDS S3 model. The conditions allow for the installation of two microturbines in series and a total obtainable power of 4 kW.

External Renewable Energy Production
In terms of solar energy, the limiting factor in the design is found on the surface of the roofs. Taking into account their dimensions, as well as those of the PV panels, it is possible to install 105.6 kWp of power through a total of 440 Q.Base 240 modules of the Q-cell brand. These 440 modules are divided into two generating groups, each with 220 panels and a SolarMax 50C inverter in a distribution of 11 strings of 20 modules. The resulting energy production amounts to 141,512 kWh/year.
On the other hand, wind technology provides 1,620,578 kWh/year through an Enercon E-40/500 wind turbine. The calculation procedure takes the power curve of the turbine, as well as the wind speed and the respective probability distribution, into account. This selection provides 3241 equivalent hours and a load factor of 36.99%; the optimal values that confirm the feasibility of implantation.
Finally, with regard to hydroelectric energy, 11,359 kWh per year can be produced in this way configuring the selected system.

System Analysis
Once the energy outputs of each technology are known, the simulated scenarios are distributed, as follows (see Table 2). It is worth highlighting the differences in the installed power between internal plant technologies and wind and solar energy. With the intention of evaluating the contribution of each scenario, Figure 3 compares the annual power demand of the plant with the annual installed renewable power. Although, at first glance, it may seem that plant demand is covered, the reality is that, in most of the scenarios, a significant With the intention of evaluating the contribution of each scenario, Figure 3 compares the annual power demand of the plant with the annual installed renewable power. Although, at first glance, it may seem that plant demand is covered, the reality is that, in most of the scenarios, a significant number of hours are found with a fairly pronounced renewable power deficit, while demand remains more or less constant over time. These fluctuations can be more easily seen in a monthly analysis, where it also possible to see the influence of the seasons on renewable energy. When comparing the two most extreme months (January and July) from Scenarios 3 and 4, it can be seen how the installed power generally fails to match demand in January, whereas, in July, it is not uncommon for installed power to be twice or even three times as high as the plant's power demand (Figure 4). These fluctuations can be more easily seen in a monthly analysis, where it also possible to see the influence of the seasons on renewable energy. When comparing the two most extreme months (January and July) from Scenarios 3 and 4, it can be seen how the installed power generally fails to match demand in January, whereas, in July, it is not uncommon for installed power to be twice or even three times as high as the plant's power demand (Figure 4). These fluctuations can be more easily seen in a monthly analysis, where it also possible to see the influence of the seasons on renewable energy. When comparing the two most extreme months (January and July) from Scenarios 3 and 4, it can be seen how the installed power generally fails to match demand in January, whereas, in July, it is not uncommon for installed power to be twice or even three times as high as the plant's power demand (Figure 4).  Related to climate change mitigation, and using the emission factor of 0.811 kg CO 2 equivalent/kWh e , as published by the Spanish Institute for the Diversification and Saving of Energy [60], the plant energy consumptions is equivalent to an emission of 2397.60 tons of CO 2 equivalent. In this sense, each simulated scenario potentially decreases the conventional electricity consumption and the consequent reduction of atmospheric emissions, as follows: Through an evaluation of a time summation of energy powers and the difference between both vectors (which shows the evolution of possible energy storage), it is confirmed that only Scenario 4 is found to be capable of exceeding the demand, with a turning point at 4000 hours ( Figure 5).
This hour marks the beginning of summer, the season of the year that is characterized by high wind resource potential in the area where the plant is installed, due to the influence of the trade winds. This situation is reflected in the energy production base of Scenario 4 (two installed wind turbines).
Sustainability 2020, 12, x FOR PEER REVIEW 9 of 19 Related to climate change mitigation, and using the emission factor of 0.811 kg CO2 equivalent/kWhe, as published by the Spanish Institute for the Diversification and Saving of Energy [60], the plant energy consumptions is equivalent to an emission of 2397.60 tons of CO2 equivalent. In this sense, each simulated scenario potentially decreases the conventional electricity consumption and the consequent reduction of atmospheric emissions, as follows: • This hour marks the beginning of summer, the season of the year that is characterized by high wind resource potential in the area where the plant is installed, due to the influence of the trade winds. This situation is reflected in the energy production base of Scenario 4 (two installed wind turbines). The following bar chart ( Figure 6) shows, in a discrete way, the energy contribution of each of the renewable technologies in Scenario 3 and 4. The following bar chart ( Figure 6) shows, in a discrete way, the energy contribution of each of the renewable technologies in Scenarios 3 and 4.
The results confirm the clear influence of wind technology and the possibility of implementing a storage system that takes advantage of the energy surplus of the summer months in order to cover the deficit of the winter months (most pronounced in Scenario 4). Sustainability 2020, 12, x FOR PEER REVIEW 11 of 20

Energy Storage
The peak power output of the renewable mix after subtracting the WWTP demand is known (959 kW on July 3). Two units of fuel cells are incorporated, each with a maximum hydrogen production of 100 Nm³/h and consumption of 530 kW.
Periods of no energy surplus were included in the simulation in order to take into account the decrease in performance when the electrolyzer was not in operation for longer than 48 hours (time it is kept pressurized). After such events, there is a 25% fall in yield in the first hour of production as the volume of hydrogen produced during the first 10-15 min. is discarded due to its low quality.
In the event that the useful power is higher than the maximum that can be used by the electrolyzer (530 kW), the second electrolyser starts up as long as 33 kW is available. Figure 7 confirms that almost all of the available energy is used and transformed into hydrogen through this system. Each year 48 racks of 12 bottles of hydrogen pressurized to 200 bar are filled.

Energy Storage
The peak power output of the renewable mix after subtracting the WWTP demand is known (959 kW on July 3). Two units of fuel cells are incorporated, each with a maximum hydrogen production of 100 Nm 3 /h and consumption of 530 kW.
Periods of no energy surplus were included in the simulation in order to take into account the decrease in performance when the electrolyzer was not in operation for longer than 48 hours (time it is kept pressurized). After such events, there is a 25% fall in yield in the first hour of production as the volume of hydrogen produced during the first 10-15 min. is discarded due to its low quality.
In the event that the useful power is higher than the maximum that can be used by the electrolyzer (530 kW), the second electrolyser starts up as long as 33 kW is available. Figure 7 confirms that almost all of the available energy is used and transformed into hydrogen through this system. Each year 48 racks of 12 bottles of hydrogen pressurized to 200 bar are filled. Sustainability 2020, 12, x FOR PEER REVIEW 11 of 19 Figure 7. Available energy vs. energy harnessed in hydrogen storage system. Figure 8 similarly shows the behavior of the two electrolyzers. The first electrolyser works at a much more constant rate than the second, in addition to which it usually operates at 100% efficiency. In contrast, the second electrolyzer has many more operating points at 75% efficiency.   Figure 8 similarly shows the behavior of the two electrolyzers. The first electrolyser works at a much more constant rate than the second, in addition to which it usually operates at 100% efficiency. In contrast, the second electrolyzer has many more operating points at 75% efficiency.  Figure 8 similarly shows the behavior of the two electrolyzers. The first electrolyser works at a much more constant rate than the second, in addition to which it usually operates at 100% efficiency. In contrast, the second electrolyzer has many more operating points at 75% efficiency.   Figure 9 shows the months of January and July in order to compare seasonal behavior. The activity and efficiency are considerably lower in January than in July when the impact of the trade winds in the Canary archipelago is considerable. Finally, hydrogen storage is introduced in the fuel cell to produce electricity. The highest energy deficit value that needs to be covered arise 406 kW (December), so the fuel cell size must be able to operate between a range of 10-400 kW. The large-scale technology that is required remains mostly at the research stage, with the conversion factors of hydrogen to electricity still far from optimal (average yield just over 40%), attaining a total of 177,205 kWh of final useful energy when the annual energy surplus is 443,013 kWh. In addition, the high cost of fuel cells that operate in this order of energy magnitude underlines the need for further research on this question and the creation of new lines of research.

Network Reinjection
Given the high costs of the storage system, it was decided to include an analysis of the sale of the energy surplus to the network. Because the wind turbine is not directly connected to the grid, a converter is required in order to rectify the signal and set the output voltage to 690 volts (from the 440 volts output of the wind turbine) with a frequency of 50 Hz. Subsequently, a transformer needs to be installed to raise the voltage from 690 volts to 20 kV (grid voltage). Although these conversions can cause a small loss of power, the performance of the equipment does not drop below 98%, even when at 50% load, and was therefore not taken into account when calculating the energy surplus that was sold to the grid.

Economic Feasibility Analysis
An economic feasibility study was carried out with budgets and operation and maintenance costs of each sized technology ( Table 3). The data come from the budgets that were obtained through catalog or consultations with the respective manufacturers. The cost per unit of electricity generation was calculated using the energy efficiency of each technology. The economic balance took the total energy production of the technological configuration of each scenario into account (Table 4). The results are quite competitive with respect to the conventional energy cost (average price of the daily market in the Spanish area: 0.06 €/kWh) [60]. However, it should be noted that the generation costs that are shown in Table 3 do not take into account costs related to the transformation of biogas into hydrogen as insufficient data are available to identify this transformation. Hence, a small uncertainty is assumed that will increase the values obtained. Assuming an inflation rate of 0.8%, a discount rate of 5% and an increase in the price of energy of 1.7%, Scenarios 1-3 are amortized in 6-7 years and Scenario 4 in 7-8 years (due to the installation of two wind turbines).
In terms of energy surplus use, scenario 4 incorporates the equipment that is required for the treatment of this surplus in both applications (storage with hydrogen and reinjection to the grid). Table 5 summarizes the respective costs. In the case of Application 2 (network reinjection), the income from the sale of the surplus in the electricity market also needs to be taken into account. For this, an average daily market price in the Spanish zone was determined while using the price report that was prepared by the Nominated Electricity Market Operator, amounting to € 54.24/MWh [61]. In this case, an income mix is made in which the energy surplus sold is stipulated at the free market price and the energy generated and consumed by the plant uses the economic computation that is shown in Table 3. Figure 10 shows the evolution of the amortization period.  In the case of Application 2 (network reinjection), the income from the sale of the surplus in the electricity market also needs to be taken into account. For this, an average daily market price in the Spanish zone was determined while using the price report that was prepared by the Nominated Electricity Market Operator, amounting to € 54.24/MWh [61]. In this case, an income mix is made in which the energy surplus sold is stipulated at the free market price and the energy generated and consumed by the plant uses the economic computation that is shown in Table 3. Figure 10 shows the evolution of the amortization period. The results of storage simulation show that the immediate implementation of the hydrogen economy is not feasible, and advances and improvements are still required in order to find answers to important technological, economic and social challenges. Factors, such as the number of pressurized bottles for hydrogen storage (810), or a total capital investment (€ 5,837,397), which is not amortized over the average lifetime of the plant (25 years), confirm this. However, reinjection into the grid did offer economically viable results. Taking the daily energy market of the Iberian system into account, the total capital investment is amortized after eight/nine years for such an energy trading system, making it a potential starting point when considering the integration of renewable energies in this type of plant. The results of storage simulation show that the immediate implementation of the hydrogen economy is not feasible, and advances and improvements are still required in order to find answers to important technological, economic and social challenges. Factors, such as the number of pressurized bottles for hydrogen storage (810), or a total capital investment (€ 5,837,397), which is not amortized over the average lifetime of the plant (25 years), confirm this. However, reinjection into the grid did offer economically viable results. Taking the daily energy market of the Iberian system into account, the total capital investment is amortized after eight/nine years for such an energy trading system, making it a potential starting point when considering the integration of renewable energies in this type of plant.

Conclusions
This work confirms the possibility of reducing and even eliminating the emission of greenhouse gases in wastewater treatment plants through the implementation of different renewable energy technologies.
The proposed methodological framework is suitable for any wastewater treatment plant that is located in an area whose potential energy resources have been previously analyzed.
The Jinamar wastewater treatment plant (Canary Islands, Spain), with an energy consumption of 2956 MWh/year, was selected as case study to carry out the simulation of four scenarios with different technological configurations designed to supply its energy demand.
In all simulations, the energy that is generated by the plant itself (anaerobic digestion and in-pipe microturbines) took priority. Although greater energy potential is obtained with external renewables, they are characterized by permanent energy fluctuations as opposed to the internal technologies which provide a constant flow of energy and a greater degree of control. Likewise, the waste that is generated by the plant could be given a second use, thereby contributing to the circular economy of the environment.
Of the four simulated scenarios, scenario 4 confirmed the technical and economic feasibility of a 100% conventional power consumption reduction, thereby avoiding the annual emission of 2754 tons of greenhouse gases while still producing 3,396,326.39 kWh/year. This possibility is mainly due to the consolidated use of wind technology, as the islands are characterized by very windy months in summer. The amortization of the total capital investment of € 1,343,750 would take place in the middle of the seventh year of operation.
In addition, due to the seasonality and variability of renewable resources, it was found that an energy storage system needed to be installed. In order to be as environmentally friendly as possible throughout the entire process, the chosen system involved hydrogen and fuel cells. However, the results show that such a system is still not technically or economically viable, which leaves the sale of surplus energy as the starting point when considering the economic feasibility of integrating renewable energies in WWTPs.