Next Article in Journal
Sustainable Agritourism Heritage as a Response to the Abandonment of Rural Areas: The Case of Buenavista Del Norte (Tenerife)
Previous Article in Journal
The Impact of Environmental Incentive Policies on the Value of New Energy Enterprises—Evidence from China’s New Energy Demonstration Cities
Previous Article in Special Issue
Hybrid Forecasting for Sustainable Electricity Demand in The Netherlands Using SARIMAX, SARIMAX-LSTM, and Sequence-to-Sequence Deep Learning Models
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Comparative Analysis of PV and Hybrid PV–Wind Supply for a Smart Building with Water-Purification Station in Morocco

1
Laboratory of Advanced Systems Engineering (ISA), National School of Applied Science, Ibn Tofail University, Kenitra 14000, Morocco
2
Higher National School of Chemistry-ENSC, Ibn Tofail University, Kenitra 14000, Morocco
3
Facultad de Informática y Electrónica, Escuela Superior Politécnica de Chimborazo, Panamericana Sur km 1 1/2, Riobamba EC060155, Ecuador
*
Author to whom correspondence should be addressed.
Sustainability 2025, 17(19), 8604; https://doi.org/10.3390/su17198604
Submission received: 27 June 2025 / Revised: 28 July 2025 / Accepted: 19 August 2025 / Published: 25 September 2025

Abstract

Water and energy are strongly intertwined, especially in wastewater treatment plants (WWTPs) whose electrical loads can strain local grids. This work evaluates the technical, economic, and environmental feasibility of powering the WWTP attached to the smart building of Ibn Tofail University (Morocco) with building-integrated photovoltaics (PV) and a complementary wind turbine. Using the HOMER Pro optimizer, two configurations were compared: (i) stand-alone PV and (ii) a hybrid PV/wind system. The hybrid design raises the renewable energy fraction from 8.5% to 17.9%, cutting annual grid purchases by 8% and avoiding 47.9 t CO2 yr−1. The levelized cost of electricity decreases from 1.08 to 0.97 MAD kWh−1 (≈0.11 to 0.10 USD kWh−1), while the net present cost drops by 6%. Sensitivity analyses confirm robustness under grid electricity tariff and load-growth uncertainties. These results demonstrate that modest wind additions can double the renewable share and improve economics, offering a replicable pathway for WWTPs and smart buildings across the MENA region.

1. Introduction

With the increase in population growth, energy consumption has resulted in significant carbon emissions, leading to climate change, whereas many areas face a scarcity of water. This situation has placed the water–energy–carbon nexus at the heart of sustainability policies, accelerating the adoption of cleaner, renewable sources [1,2,3,4]. Several authors emphasize that integrated management of RE resources is essential for urban resilience [5], and coupling wastewater treatment technologies with on-site renewables yields tangible mitigation and cost-saving opportunities [6,7,8,9,10,11]. Water-purification stations can be suitable solutions to enhance the flexibility of renewable energy (RE) networks while reducing the ecological footprint.
Wastewater treatment plants (WWTPs) integrated with renewable energy (RE) exemplify the water–energy–carbon nexus, as WWTPs alone are responsible for approximately 2–4% of the global electricity consumption [12]. In China, Ching et al. [10] examined 31 wastewater treatment plants (WWTPs) integrated with photovoltaic (PV) systems and found that they achieved a 10–40% reduction in CO2 emissions, along with enhanced economic performance. In Australia, Syed et al. [13] demonstrated that integrating water-purification stations can lower grid capacity requirements by 2% and LCOE by 11%. Yet, high solar penetration often produces midday surpluses that are exported at low value or curtailed—the so-called “energy-waste side-effect” of PV [14,15]. Small wind turbines or storage can help balance supply and demand [16,17,18].
Hybrid configurations are increasingly proven. In Morocco, Bellar et al. [19] reported environmental and economic gains after adding PV to a WWTP, while Mokhi et al. [20] assessed and optimized the existing photovoltaic systems at Ibn Tofail University using HOMER Pro, in light of Morocco’s new renewable energy law, to determine the economic and environmental benefits of system expansion and energy surplus sales. In North-East Italy, Campana et al. [21] investigated the feasibility of modeling a high share of renewable energy systems, resulting in a greener and more energy-efficient WWTP. Campana et al.’s [21] study aims to find a compromise between the renewable energy share and the Net Present Cost (NPC) of the system, whereas it uses PV, wind, and multiple energy storage technologies. In a Chinese campus micro-grid combining PV, wind, biomass, and batteries, Zhao et al. [22] reported that the optimal design achieved a lower cost of energy (COE) and net present cost (NPC), amounting to USD 0.0671 and USD 153 million, respectively. Tanko et al. [23], AlKassem et al. [24] and Pérez, Mojumder et al. [25,26] highlight the effectiveness of hybrid renewable energy systems in providing reliable, cost-efficient, and sustainable electricity.
Since 2017, Ibn Tofail University has been integrating photovoltaic (PV) systems into its educational buildings, aiming to cut grid dependence by 40%. Today, the university combines solar power with an on-site wastewater treatment plant (WWTP) that irrigates its green spaces, making it a unique and practical test-bed for sustainable solutions. Meanwhile, the International Energy Agency warns that electricity demand in the water sector could double by 2040, highlighting the urgent need for renewable energy integration and more flexible operations [27]. However, recent experiences in Spain show that curtailing unused solar energy can reduce project profitability by up to 7.7% and increase electricity costs by 2.5%, putting the economic sustainability of solar investments at risk in high-penetration areas [28], while regulatory and financial barriers slow the uptake of smart-building technologies in emerging economies [29].
In light of these challenges and opportunities, this study aims to pursue three complementary goals.
G1. Quantify the ability of the PV array integrated into UIT’s smart building to satisfy the electricity demand of its coupled water-purification station.
RQ 1. What share of the station’s hourly and annual load can the existing rooftop PV system cover?
G2. Evaluate how supplementing the rooftop PV system with an on-site wind resource influences load-matching performance and interaction with the grid, using reproducible indicators of self-consumption, self-sufficiency, self-production, and grid reliability.
RQ 2. To what extent does adding a small wind turbine alter these load-matching metrics and the resulting grid reliability compared with the PV-only baseline?
G3. Assess the techno-economic and environmental feasibility of harnessing PV surplus and deploying a hybrid PV/wind configuration under the climatic, electrical, and regulatory conditions of the MENA region.
RQ 3. Under which tariff, load-growth, and wind-resource scenarios does the hybrid system outperform the stand-alone PV system in terms of LCOE, net present cost, and CO2 mitigation?
The remainder of the paper is organized as follows. Section 2 reviews the relevant literature; Section 3 details the methodology and data; Section 4 describes the case study; Section 5 presents the results, followed by discussion in Section 6; and Section 7 draws conclusions and outlines future research avenues.

2. Literature Review

Modern office buildings, hospitals, and housing complexes now use smart sensors and automation to flexibly manage energy use. The U.S. Department of Energy classifies such buildings as Grid-Interactive Efficient Buildings (GEBs), designed to store energy, incorporate renewables, and shift consumption to lower-cost periods [30]. Recent studies confirm the effectiveness of demand-side strategies in mitigating grid stress. For instance, Moses Babu et al. [31] showed that coordinating demand response with solar PV and battery storage in a microgrid setting can reduce peak loads by around 10%, while also lowering energy costs by up to 38%. Similarly, Van Tilburg et al. [32] demonstrated a 14.48% reduction in the peak-to-average load ratio using a decentralized control approach across residential households. Broader studies estimate that distributed energy resources (DERs), when effectively coordinated, can reduce peak demand by up to 17% at grid scale—underscoring the scalability of these strategies across sectors and system sizes [33].
Optimized battery control in smart buildings can increase solar self-consumption by up to 19% and building self-sufficiency by up to 12%, and shave overall building peak demand by up to 30% [34]. Recent studies exploring thermal flexibility strategies in warm climates highlight their effectiveness in managing peak load. For example, radiant roof cooling combined with indoor temperature reset strategies achieved a 19.8% peak load shift, while pre-cooling strategies reduced peak power by over 24% in hot climates like Dubai. Meanwhile, predictive control of heat pumps enabled load shifting of 2–33%, depending on demand response settings and comfort constraints [35,36,37]. These strategies complement exporting surplus to nearby high-intensity loads such as WWTPs.
Recent case studies demonstrate the value of integrating renewables with water infrastructure: In Morocco, a PV/Wind configuration at a WWTP covered 72% of its energy needs, saving roughly EUR 0.53/m3—about EUR 106.8/day for a 200 m3/day facility [19]. In China, PV integration at multiple WWTPs achieved 10–40% reductions in CO2 emissions, with system performance strongly dependent on solar resource and demand-generation ratios [4]. In Portugal, solar-powered desalination has proven both cost-effective and sustainable [38,39,40,41]. In Porto Santo, integrating PV reduced the levelized cost of energy to EUR 0.137/kWh, lower than the EUR 0.1504/kWh grid-only scenario. In the Porto Santo Island in the Madeira Archipelago and the Algarve in the southern mainland, decentralized solar-driven desalination cut water production costs by 33% compared to grid-powered setups. Additionally, using hybrid RES configurations in the island of S. Vicente, in Cape Verde, lowered the levelized cost of water by over 27% and CO2 emissions by 67% [38,39,40,41].
Recent techno-economic assessments underline the value of hybrid PV–wind systems for water infrastructure. In Egypt, hybrid PV and wind systems achieve near-100% renewable energy coverage for desalination operations, with projected electricity costs around USD 0.091/kWh and a payback period of just over one year [42]. In Saudi Arabia, Alkassem et al. [24] investigated the impact of the PV–Wind hybrid system. In this study, even though the wind has a higher capacity factor, it has a longer payback period compared to the PV system.
As solar PV penetration increases, curtailment rises due to oversupply and operational limits, with thermal generator constraints notably impacting curtailment at mid-level PV shares (25–40%). At very high penetration levels (>50%), economic curtailment can reach up to 40% during peak production hours, with frequent low-price events, despite storage helping balance supply and demand [43,44]. Flexible loads such as EV charging, heat pumps, and water pumping play a crucial role in improving the efficiency and sustainability of photovoltaic (PV) systems by absorbing excess generation and reducing curtailment. Utility-controlled EV charging (UCC) allows surplus solar electricity—especially during midday peaks—to be redirected toward vehicle batteries, effectively minimizing energy waste and enhancing solar self-consumption [45,46]. Similarly, heat pumps, when scheduled to operate during PV production hours, serve as thermal storage and contribute to higher energy utilization efficiency, reducing the mismatch between generation and demand [47]. Moreover, smart water pumping strategies that align pumping operations with solar generation windows have been shown to cut PV energy waste significantly, with some systems reporting up to 44% reduction in energy costs due to optimized usage [48]. Together, these coordinated load management strategies provide a practical path toward increasing PV integration without the immediate need for costly storage expansion. Wind–solar complementarity can increase grid penetration by up to 20% while reducing storage and balancing needs compared to stand-alone systems. Although benefits may plateau at very high penetration, complementarity improves system reliability and supports more efficient transitions to renewable energy [49].
Few studies combine PV surplus from smart buildings with external critical loads such as WWTPs, and evidence from North Africa remains scarce, although wind regimes are moderate and regulatory frameworks are evolving. The present work addresses both gaps by testing, for the first time in Morocco, a small-scale PV/wind hybrid that channels smart-building surplus to a WWTP under realistic sensitivity scenarios.

3. Materials and Methods

Using Homer Pro and the monitoring system to assess the feasibility of using building surplus to supply a wastewater treatment plant, focusing on network responsibility, will be discussed in this article using the four main metrics used in [24,50,51]. Figure 1 represents the structure used to assess the HRES. The methodology is split into two major steps: the metrics assessment and the software evaluation. The reason behind using the Homer-Pro software 3.14.2 is related to its ability to design, model, and simulate HRES. It is broadly used in different sectors, specifically the educational sector. Furthermore, Homer-Pro has three key functions—simulation, optimization, and sensitivity analysis—leading to detailed techno-economic and environmental assessments. Once the feasibility of connecting the WWTP to the buildings has been investigated, two scenarios will be evaluated.
The first scenario represents the use of the surplus from the two PV systems to power the WWTP, and the second scenario involves a 30 kW wind turbine added to the renewable energy system. Electrical, economic, and environmental factors are analyzed for each scenario and are compared in the results section.

3.1. Metrics

The mismatch problem of renewable energy grid-connected systems is described using four load matching indicators, including traditional and novel metrics: self-consumption and self-sufficiency, self-production, and grid reliability, respectively.
Self-consumption and self-sufficiency are primarily concerned with on-site utilization and independence from the grid [52]. They refer to percentages that indicate the amount of the on-site consumption or total energy needs met by the renewable system [53,54]. The amount of electricity produced by a renewable energy system, such as a solar system, that is used locally is known as self-consumption [55]. Technically speaking, it is the proportion of energy generated by the integrated photovoltaic system that is used locally, indicating the efficiency of the system’s on-site use [51,52]. Equation 1 represents the self-consumption. When an energy system is self-sufficient, it can produce enough renewable energy locally to satisfy the consumer’s energy needs without the help of outside resources like the grid. It illustrates how well the system can meet the energy requirements of buildings while reducing dependency on outside networks and traditional energy sources [53,54]. Equation 2 represents the self-sufficiency.
Grid-reliability (GL) and self-production (SP) take into account how the renewable energy system interacts overall with both on-site consumption and the grid. The SP indicator considered merging on-site utilization and feedback to the grid into a single indicator, enabling decisions on PV system sizing and control strategies. The network reliability rate is intended to describe the variation in the amount of energy transferred across the network connection point, regardless of the direction of flow [54]. In these equations in Table 1, A represents the load coverage from the grid, B the surplus of the PV system, and C the load covered on-site.

3.2. Homer-Pro

After analyzing the grid reliability and the technical feasibility of using the building’s surplus to the water-purification station, using Homer-Pro, an economic and environmental study is conducted to compare two distinct scenarios, showing the cost-effectiveness and environmental sustainability of using a hybrid PV/Wind system to power the WWTP. Using Homer-Pro necessitates the use of various inputs, represented by the load requirements, the information about energy resources, system components, economic parameters, and environmental factors, as illustrated in Figure 2. Simulating these data results in the representation of an optimal system configuration, technical feasibility, economic analysis, and environmental impact.
The first scenario, in Figure 3a, describes the current design of the two PV systems and the two separate loads. In the smart library (792.38 kWh per day), a PV system is integrated, consisting of the facade with a total capacity of 27.3 kWp and the pergola PV system with a total capacity of 42 kWp. The surplus from the PV system is transferred to the second load, which is a wastewater treatment plant (1430 kWh/day) close to the building via a shared station. In the second scenario, the proposed design shown in Figure 3b, a 30-kW wind system, has been added to the existing system to supply the WWTP.

4. Case Study

The case study is a library at Ibn Tofail University in Kenitra. Kenitra is mainly affected by the Atlantic circulation. Based on the PVGIS database, the minimum of average monthly temperature is 13.1 °C, and the maximum of average monthly temperature is 24.8 °C for the year 2020. The averages of monthly optimal irradiation are between 122.89 kWh/m2 and 220.89 kWh/m2.
Kenitra, and more specifically Ibn Tofail University, offers an ideal setting for this research due to its unique combination of technical infrastructure and environmental conditions. The university is equipped with PV systems installed since 2017 and operates an on-site wastewater treatment facility, which enables real-time monitoring and experimentation. Additionally, the region benefits from strong solar irradiance and moderate wind potential, making it well-suited for evaluating Hybrid Renewable Energy Systems (HRES) in both smart building applications and water treatment processes, particularly within the context of MENA climate conditions. These features make it a practical and representative case study for scalable, energy-water integrated solutions. Three options are envisaged for integration into the building to improve energy efficiency. Building efficiency is assumed to be the first step, followed by renewable energies and smart technologies.
The first degree of energy efficiency in this building is concerned with the building’s envelope and equipment. In the library, the walls are built of Agglo (Parpaing) and brick, while the windows are VEC curtain wall and semi-vec aluminum. The glass frames in the library are made of aluminum, which has various advantages. In line with Moroccan regulations, the building is fitted with double and triple glazing. The appliances used in the library, taking into account the LEDs used and desktop computers, have energy ratings ranging from class A, A+, or A++, thus representing a better energy performance.
For the second level of energy savings, photovoltaic systems add even more energy savings to the building. In Ibn Tofail library, a combination of two integrated photovoltaic systems is illustrated in Figure 4. The CO2 emissions and the performance of the systems were detailed in a previous study [56,57]. P(kWp) values in Table 2 represent the calculated peak power based on the datasheet’s PVs’ peak power.
The library has an integrated BMS (building management system). The BMS system includes PLCs (programmable logic controller), illustrated in Figure 5, which serve as a central control unit. The PLCs manage multiple technical domains. Among its domains, measuring station, HVAC, and DALI. Through SCADA and its human–machine interface, this BMS assists with monitoring consumption and PV production as well as their display.

4.1. Building Load Profiles

Using the smart building monitoring system and Homer-Pro, Figure 6 illustrates the load profile represented. The data used and collected were between March 2022 and February 2023. Despite carefully designing the photovoltaic systems to meet the library’s energy requirements, there is still an excess of energy, as shown in Figure 7.
This surplus is because of the library’s inconsistent functioning at specific intervals and the fact that it does not run throughout the day. To make the most of this surplus in this study, transferring it to a water-purification station in the vicinity was a better suggestion.
Weekend surplus is greater since the building uses more energy throughout the week than it does on the weekend. To be more specific, in Figure 8 and Figure 9, the graphs illustrate the days with the highest production to view the PV production, PV, and grid coverage of each season. The grid and PV coverage and production for the weekdays with the highest peaks are displayed in Figure 8 and Figure 9 (weekdays: 6 April, 22 June, and 15 February, weekends: 28 January, 15 May, and 4 June). In these figures, photovoltaic production is highest in April, resulting in greater autonomy. In the graphs, autonomy time varies from around 14 h (for April–June) to 11 h (for February), for the day. And due to the intermittency of PV, grid coverage can take over during these hours. Having the highest production does not necessarily mean that the surplus is greater, but it does depend on consumption, which varies seasonally. Thus, in the data, the maximum PV system surplus was detected on 12 April 2022, 15 February 2023, and 12 August 2022. On weekends, photovoltaic coverage is highest in June, with an autonomy of 14 h, followed by January, which covers loads using the photovoltaic system for 10 h, and May, with an autonomy of 14 h. The maximum surplus is reached on 15 January 2023, 26 March 2022, and 24 July 2022. In the Moroccan context, the sale of photovoltaic surplus is not yet authorized, hence the idea of supplying a water-purification station near the building, but only after assessing the technical feasibility of this suggestion.
Due to the intermittency of solar power, the WWPT needs an alternative renewable energy source of energy to move toward green energy sources. The battery storage in this case is not efficient since it will increase the initial investment expenses. According to [58], the best places to implement wind energy are in areas with an annual average wind speed of at least 9 miles per hour (mph) or 4.0 m per second (m/s), which makes Kenitra a suitable location for wind energy systems, as illustrated in Figure 10. Thus, an adequate option is to add a wind energy source to the system.

4.2. Water-Purification Station Electrical Profile

Figure 11 shows the load consumption of the WWPT connected to the building, which consumes 59.6 kW constantly. To represent the load profile, a random day-to-day variability of 10% and a time step of 20 are selected while using Homer-Pro. This design enables us to pre-size the wind system, and the perfect one produces 30 kW. Using load patterns is crucial and essential to integrate HRES for a continuous and optimal energy use.

5. Results

5.1. Self-Production, Self-Sufficiency, Self-Consumption, and Grid Reliability

In this section, the aim is to analyze four parameters in two distinct scenarios (first scenario: building not connected to the WWTP, second scenario: building connected to the WWTP), to assess the feasibility of supplying the WWTP with the surplus from the smart library. In the initial case, which relies on the integrated system’s output to meet the buildings’ energy demand, the grid is stressed by the photovoltaic surplus. Then, in the second scenario, a water-purification station is introduced into the connection station. This addition is designed to reduce feedback to the grid and reduce dependence on external energy sources. It should be noted that in Morocco, it is not allowed to inject surplus energy into the grid.

5.1.1. First Scenario: Smart Building

Figure 12 shows the outcomes of the four indicators for the summer, winter, and spring seasons. Self-production, self-sufficiency, and self-consumption, in particular, show lower values in all circumstances, with minor variations related to feedback exceeding self-consumption. Higher grid reliability is depicted in Figure 10, particularly on weekends when demand is lower. Grid reliability values that are higher than 100% suggest that the grid is under stress. In the first example, there is a noticeable increase in reliance on the grid. The maximum average value of grid reliability was in spring weekends and equals 1704%.
The self-production and grid reliability of the weekdays with the highest production, illustrated in Section 4.1 in Figure 8, are shown in Figure 13. And Table 3 shows the average of the metrics in each day with the highest production.
The self-produced energy and grid reliability on the day with the highest output over the weekend, as shown in Section 4.1 and Figure 9, are also displayed in Figure 14 and Table 4.

5.1.2. Second Scenario: Linking WWTP to the Building

Figure 15 shows the outcomes of the four indicators for the summer, winter, and spring seasons. Grid reliability, in particular, shows negative values in all circumstances, with high values related to self-consumption. The absolute value of the maximum average of grid reliability was in spring weekends and equals −8%.
Table 5’s SP = GL = SS = 0% for the weekdays indicates that either the surplus is zero or the feedback is proportionately low, resulting in an average that is close to zero. Figure 16 confirms that the surplus is zero for 22 June and that the feedback is low on average for February 15. As a result, even though the SC is 100%, the metrics equal zero. For 6 April, SP = −GL = SS = 1%, and these values suggest that, during the day, the feedback can cover 1% of the total energy demand of the water-purification station.
Regarding the weekend on 4 June, SP = GL = SS = 0% indicates a low surplus, as indicated in Table 6. Figure 17 further supports this finding. On 28 January, SP = −GL = SS = 8% indicates that the surplus exceeds 8% of energy consumption, and the grid has a smaller burden due to the negative value of GL. To sum up, there is a benefit to utilizing the water-purification station in terms of less reliance on the grid.

5.2. Homer-Pro Optimization

In this section, the electrical, economic, and environmental factors are analyzed for each scenario. The electrical aspects include grid purchases, energy output from each source system, grid sales, and the renewable fraction. The economic metric consists of the NPC, operation and maintenance (O&M) costs, and LCOE. Additional economic measures examined include the internal rate of return (IRR), return on investment (ROI), basic payback time, and discounted payback period. Regarding the environmental parameters, Carbon dioxide, sulfur dioxide, and nitrogen oxide emissions are represented.
Minimize the total system cost using HOMER Pro’s default objective function, which accounts for power production, component sizing, and system configuration. The constraints include component capacity limits, hourly load demand, renewable resource availability, and technical specifications based on manufacturer data [59,60].

5.2.1. First Scenario: Photovoltaic System Powering Smart Building and Water Purification Station

The grid purchases in Table 7 are 742,541 kWh/yr, accounting for 91.5% of the total energy supply. As for the PV system, its total output is around 68,784 kWh/yr, accounting for 8.48% of the total energy supply as mentioned in Table 8.
The penetration is seen to occur between 6 a.m. and 6 p.m. with power levels ranging from 0 to 80 kW. Table 9 and Table 10 describe the electrical parameters of the facade and the pergola system, respectively. The total production of the facade system is 24,165 kWh/yr with a capacity factor of 14.6% as stated in Table 9. Concerning the pergola PV system, the total yearly output is 44,619 kWh with a capacity factor of 17.4% as noted in Table 10.
The economic metrics in Table 11 are IRR equaling 20.5%, ROI equaling 16.7%, and the simple payback equaling 4.82 years. Table 12 depicts the emissions, which include carbon dioxide (469,286 kg/yr), sulfur dioxide (2035 kg/yr), and nitrogen oxides (995 kg/yr).

5.2.2. Second Scenario: Combining Photovoltaic System and Wind Turbines for Powering Smart Building and Water-Purification Station

In the second scenario, a 30 kW wind turbine is added to the renewable energy system. The yearly grid purchases equal 666,806 kWh per year, accounting for 82.1% of the total energy supply, whereas the PV systems and wind turbine generate around 68,784 and 76,174 kWh per year, respectively. PV system generation accounts for 8.48% of the total energy supply, and wind turbines represent 9.38%. As a result, the renewable penetration in this scenario reaches 17.9%. The capacity factor of the wind system is 29% with a total yearly output of 76,176 kWh/yr, as mentioned in Table 13.
Figure 18 shows that the wind system production varies from 0 to 30 kW throughout the day.
Table 14 illustrates the economic indicators focusing on the internal rate of return (IRR), return on investment (ROI), and both the discounted and simple payback periods. The IRR is 42.9%, the ROI is 46.9%, the discounted payback period is 2.13 years, and the basic payback period is 2.35 years. Table 15 depicts the emissions, which include carbon dioxide (421,421 kg/yr), sulfur dioxide (1827 kg/yr), and nitrogen oxides (894 kg/yr).

6. Discussion

6.1. Exploring the Interplay of Self-Production, Self-Sufficiency, Self-Consumption, and Grid Reliability

6.1.1. Self-Production and Grid Reliability in the Smart Building with PV Systems

The spring scenario, illustrated in Section 5.1.1 in Figure 13, is more efficient since it causes less stress on the grid, as shown by Table 3’s negative grid reliability value of −22%, illustrated in Section 5.1.1.
Table 3 and Figure 13, illustrated in Section 5.1.1, demonstrate that during spring, the SC is equal to 96%, meaning that the production is consumed on-site. On the other hand, since the SS is equal to 26%, the output has a smaller overall demand-meeting contribution than the on-site consumption. A lower SP suggests that only a smaller portion of the total energy produced is being consumed on-site, or that the energy generated is insufficient to meet demand. Figure 8 in Section 4.1 supports the hypothesis that some of the total energy produced during the day is not consumed locally. As for reduction in grid dependency, it is shown by a grid reliability rate of −22%. A decreased engagement of the grid and a decrease in the amount of energy transferred through the grid connection point are indicated by a negative score. It demonstrates that on-site generation is making a greater contribution to meeting energy needs and that there is less dependence on the external grid. Then, on 22 June, a moderate efficiency with lower on-site utilization and reduced grid reliance is detected. SC is 100%, which suggests that all of the energy produced by the system is used locally. This implies extremely effective on-site use without any extra energy being returned to the grid. SS is 19%, meaning that the system’s output as a whole contributes 19% to satisfying the site’s overall energy demand. This indicates that just a portion (19%) of the entire energy demand is covered by the system’s output, even though all generated energy is consumed on-site (SC = 100%). Grid dependency has decreased, as indicated by GL of −19%. A decrease in the quantity of energy sent through the grid connection point is indicated by the negative value. In summary, the system is fulfilling the total energy demand (SS) comparatively less overall, while it is reaching complete on-site consumption (SC = 100%). The total efficiency of the system is displayed by the combination of SC and SS in the SP measure. The emphasis on reducing dependency on the external grid is highlighted by the negative grid reliability rate (GL). On 15 February, although the system’s on-site consumption efficiency (SC = 99%) is remarkably high, its overall contribution to fulfilling the total energy demand (SS) is comparatively modest. SC is 99%, which suggests that almost all (99%) of the energy produced by the system is used locally. This shows that the generated energy was used for on-site consumption with very high efficiency. SS is 10%, meaning that 10% of the system’s output goes toward satisfying the site’s overall energy needs. This indicates that the system’s output only helps to cover 10% of the overall energy demand, even though nearly all generated energy is utilized on-site (SC = 99%). The aggregated measure, or SP, which combines on-site consumption (SC) and contribution to total demand (SS), is 9%. This value shows how well the system performs overall in terms of using energy produced on-site in comparison to the overall energy demand. Grid dependency is decreasing, as indicated by GL of −9.
As in Section 5.1.1, during 4 June (a weekend day in summer), this scenario is more efficient because it places less strain on the grid, indicated by negative grid reliability values. Table 4, illustrated in Section 5.1.1, shows that during summer, the self-consumption (SC) reaches 100%, meaning all produced energy is used on site. Meanwhile, self-sufficiency (SS) is at 29%, indicating that the output contributes less to meeting overall demand than on-site consumption. The combined indicator (SP) for these two metrics is 29%. A grid reliability rate of −29% indicates decreased dependency on the grid; a negative value reflects less energy transferred through the grid connection point and less grid involvement. This reveals lower reliance on external power and a greater contribution from on-site generation. In Figure 9 of Section 4.1, it is shown that all energy generated is fully consumed on-site, supporting reduced grid involvement. Conversely, winter and spring days display high grid reliability values. For example, as shown in Table 4 for 28 January, self-consumption and self-sufficiency are 62% and 28%, respectively. However, the SP value drops to 12% with the implementation of new measures, indicating that the PV system produces only a small fraction of the energy used on site, likely due to increased reliance on grid power. Additionally, the high grid reliability (GL) of 616% indicates significant grid involvement in maintaining energy balance, possibly implying that a large portion of energy is exported to the grid. Figure 9 in Section 4.1 shows that during the day, surplus energy exceeds self-consumption, further confirming greater grid dependency. On 15 May, Table 4 illustrated in Section 5.1.1 indicates that self-sufficiency and self-consumption are 59% and 41%, respectively. While the on-site PV output contributes substantially to the building’s energy needs, the SC rate of 59% suggests room for improvement in local utilization. The 41% SS means that a significant portion of energy is met by on-site generation. However, the SP value of 17% is relatively low, indicating only a small percentage of total energy flows are used on-site. The extremely high GL score of 6109% highlights heavy grid involvement in energy management. Comparing these figures with Figure 9 in Section 4.1 shows that the high GL and low SP result from excess energy not being consumed at certain times. Aside from 15 May, the grid reliability remains high due to insufficient PV generation. The high GL scores reflect grid pressure; therefore, solutions such as improving on-site utilization or managing excess energy are necessary. To reduce grid reliability, connecting the water-purification station to the building’s connection point is a better solution.

6.1.2. Impact of Linking WWTP to Smart Building on Energy Production and Grid Reliability

A reduction in the grid’s reliance with the addition of a water-purification station to the connecting station is observed. As illustrated in Figure 15, the negative values attest to this independence. Self-Consumption (SC) metric is higher, but the PV system production is contributing less to meet the energetic demand (as indicated by a lower Self-Production (SP) value). The goal of adding the water-purification station in this scenario is to reduce grid stress. SP is expected to be optimized in a subsequent investigation. After the water-purification station is added, the grid reliability continuously decreases, indicating less strain on the grid. This is true on the weekends and the weekdays in every season. In line to optimize on-site utilization and reduce the strain on the grid, the system with the additional water-purification station exhibits enhanced sustainability and decreased reliance on the external grid.

6.2. Discussion of Homer-Pro Optimization Results: Energy System Performance and Efficiency Insights

By simulating the two scenarios in Homer-Pro, the efficiency of the HRES can be compared and validated. Several characteristics were considered, including economic, electrical, and environmental, as noted in Table 16. Table 16 shows that the LCOE for the PV–Wind system is less than that of a standalone PV system. The LCOE of the second scenario is lower than the grid price of 1.13 MAD. Thus, adding a wind system to a stand-alone photovoltaic system is not only cost-effective but also more economical than using energy from the traditional grid.
Figure 19 and Figure 20 show that despite having a surplus, the grid is stable. By adding the wind system, the coverage of the WWPT into the evening can be extended. This enhancement offers a more continuous and dependable energy supply throughout the day, addressing the limitations of depending simply on the PV system. As Figure 21 illustrates, the frequency of a PV system penetration over an hour is lower than adding a wind turbine, hence the improvement in energy penetration from 8.5% in the first scenario to 17.9%. The increase in renewable energy penetration has improved the system’s ability to meet the WWTP needs. In terms of environmental aspects, the CO2 emissions decreased by 47,865 kg per year. This meaningful drop demonstrates the environmental benefits of integrating the wind turbine with the PV system.
This study is limited by the use of pre-established demand profiles, which do not capture the stochastic nature of electricity consumption. Future work could incorporate probabilistic or machine learning approaches to better address demand variability and enhance system robustness. Additionally, the analysis does not include a life cycle assessment (LCA) or consider circular economy principles, which are important for evaluating the environmental impacts and sustainability of renewable energy systems and warrant further investigation.

7. Conclusions

This study develops and applies a load-matching and techno-economic assessment framework—combining hourly HOMER Pro simulations with the metrics of self-consumption, self-sufficiency, self-production, and grid reliability—to a real smart-building micro-grid at Ibn Tofail University (Morocco). The methodology quantifies, first, how much of the joint electricity demand of the building and its coupled water-purification station can be met by the existing rooftop PV array and, second, how those results change when a modest on-site wind resource is introduced.
With photovoltaics alone, virtually 100% of the solar energy generated is used on site, yet this covers only 9–29% of total demand throughout the year and drives the grid-reliability index as high as 1704% during spring weekends—evidence of substantial seasonal mismatch. Electrically tying the treatment plant to the PV connection point absorbs part of the midday surplus and lowers the index by about 8%, but dependence on the external grid remains significant.
Supplementing the array with a 30 kW wind turbine nearly doubles the annual renewable fraction (from 8.5% to 17.9%), stretches green-energy availability into the evening hours, and reduces the levelized cost of electricity from 1.08 to 0.97 MAD kWh−1 while trimming the net present cost by roughly 6%. Hour-by-hour results confirm a smoother load match and a substantial improvement in grid reliability without breaching technical limits.
The self-production and grid-reliability indices were crucial for pinpointing when and why surpluses occur and for quantifying how effectively the hybrid configuration mitigates them. Given the favorable cost, performance, and ~48 t CO2 yr−1 emission savings achieved under Moroccan tariffs and wind regimes, similar PV–wind retrofits appear replicable for smart-building/WWTP pairs across the MENA region.
Future research should replace deterministic load profiles with stochastic or machine-learning demand models, extend the analysis to include life-cycle assessment and circular-economy criteria, and explore the added value of battery storage and demand-side flexibility under evolving tariff structures. These steps will further strengthen the design of robust, low-carbon energy solutions where water and energy systems are tightly intertwined.

Author Contributions

Methodology, O.A.O. and O.C.; validation, O.C., H.E.F. and W.G.; formal analysis, O.A.O.; investigation, O.A.O. and O.C.; resources, O.C.; data curation, O.A.O. and K.A.C.; writing—original draft preparation, O.A.O. and K.A.C.; writing—review and editing, O.A.O., A.A.E. and W.G.; visualization, O.C., H.E.F. and W.G.; supervision, O.C. and H.E.F.; project administration, O.C. and H.E.F.; funding acquisition, O.A.O. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Center for Scientific and Technical Research (CNRST).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Zhao, Y.; Duan, L.; Ng, H.Y.; Hermanowicz, S.W. The New Water Treatment Technology Based on the “Water–Energy–Carbon Nexus” Achieving Carbon Neutrality in Wastewater Treatment Plants. ACS EST Water 2025, 5, 1511–1513. [Google Scholar] [CrossRef]
  2. Wen, J.; Hong, L.; Khalid, S.; Mahmood, H.; Zakaria, M. Nexus between renewable energy consumption, foreign capital flows, and financial development: New evidence using CUP-FM and CUP-BC advanced methods. Struct. Chang. Econ. Dyn. 2023, 67, 82–88. [Google Scholar] [CrossRef]
  3. Anjan, R.; Aman, K.B.; Jasvinder, S.; Jayati, T.; Neeraj, A. Examining alternative carbon resources for sustainable energy generation: A comprehensive review. Next Energy 2025, 6, 100194. [Google Scholar]
  4. Sylvester, W.C.; Samuel, E.; John, T. Optimization and design of hybrid power system using HOMER pro and integrated CRITIC-PROMETHEE II approaches. Green Technol. Sustain. 2023, 1, 100005. [Google Scholar] [CrossRef]
  5. Yan, Z.; Yunqi, L. Statistical Evaluation of Sustainable Urban Planning: Integrating Renewable Energy Sources, Energy-Efficient Buildings, and Climate Resilience Measures. Sustain. Cities Soc. 2024, 101, 105160. [Google Scholar]
  6. Lima, D.; Li, L.; Appleby, G. A Review of Renewable Energy Technologies in Municipal Wastewater Treatment Plants (WWTPs). Energies 2024, 17, 6084. [Google Scholar] [CrossRef]
  7. Li, R.; Zhao, R.; Xie, Z.; Xiao, L.; Chuai, X. Water–energy–carbon nexus among different functional areas of campus: Pattern, flow, and efficiency. Sustain. Cities Soc. 2025, 118, 106039. [Google Scholar] [CrossRef]
  8. He, Z. The Water Energy Carbon Coupling Coordination Level in China. Sustainability 2024, 16, 383. [Google Scholar] [CrossRef]
  9. Choi, P.J.; Lee, J.; Jang, A. Interconnection between renewable energy technologies and water treatment processes. Water Res. 2024, 261, 122037. [Google Scholar] [CrossRef]
  10. Chen, X.; Zhou, W. Economic and ecological assessment of photovoltaic systems for wastewater treatment plants in China. Renew. Energy 2022, 191, 852–867. [Google Scholar] [CrossRef]
  11. Andrei, H.; Badea, C.A.; Andrei, P.; Spertino, F. Energetic-Environmental-Economic Feasibility and Impact Assessment of Grid-Connected Photovoltaic System in Wastewater Treatment Plant: Case Study. Energies 2020, 14, 100. [Google Scholar] [CrossRef]
  12. Faisal, M.; Muttaqi, K.M.; Sutanto, D.; Al-Shetwi, A.Q.; Ker, P.J.; Hannan, M.A. Control technologies of wastewater treatment plants: The state-of-the-art, current challenges, and future directions. Appl. Energy 2020, 268, 113324. [Google Scholar] [CrossRef]
  13. Ali, S.M.H.; Lenzen, M.; Sack, F.; Yousefzadeh, M. Electricity generation and demand flexibility in wastewater treatment plants: Benefits for 100\% renewable electricity grids. Appl. Energy 2020, 268, 114960. [Google Scholar] [CrossRef]
  14. Lew, D.; Miller, N. Nicholas Reaching new solar heights: Integrating high penetrations of PV into the power system. IET Renew. Power Gener. 2016, 11, 20–26. [Google Scholar] [CrossRef]
  15. Vanika, S.; Mahfuzul, A.S.; Mohammed, H.H.; Travis, K. Effects of high solar photovoltaic penetration on distribution feeders and the economic impact. Renew. Sustain. Energy Rev. 2020, 131, 110021. [Google Scholar] [CrossRef]
  16. Amin, V.R.M.; Alibakhsh, K.; Xiaofeng, N.; Kai, Z.; Omid, M. Excess electricity problem in off-grid hybrid renewable energy systems: A comprehensive review from challenges to prevalent solutions. Renew. Energy 2023, 212, 538–560. [Google Scholar] [CrossRef]
  17. Emmanuel, E.C.; Abeng, K.R.; Iweh, C.D.; Tsekouras, G.J.; Fopah-Lele, A. The Impact of Integrating Variable Renewable Energy Sources into Grid-Connected Power Systems: Challenges, Mitigation Strategies, and Prospects. Energies 2025, 18, 689. [Google Scholar] [CrossRef]
  18. Meister, R.; Yaïci, W.; Moezzi, R.; Gheibi, M.; Hovi, K.; Annuk, A. Evaluating the Balancing Properties of Wind and Solar Photovoltaic System Production. Energies 2025, 18, 1871. [Google Scholar] [CrossRef]
  19. Bellar, D.; Choukai, O.; Tahaikt, M.; Midaoui, A.E.; Ezaier, Y.; Khan, M.I.; Gupta, M.; AlQahtani, S.A.; Yusuf, M. A case study on the environmental and economic impact of photovoltaic systems in wastewater treatment plants. Open Phys. 2023, 21, 20230158. [Google Scholar] [CrossRef]
  20. Mokhi, C.E.; Choukai, O.; Hachimi, H.; Errouhi, A.A. Assessment and optimization of photovoltaic systems at the University Ibn Tofail according to the new law on renewable energy in Morocco using HOMER Pro. Energy Harvest. Syst. 2022, 10, 55–69. [Google Scholar] [CrossRef]
  21. Campana, P.; Mainardis, M.; Moretti, A.; Cottes, M. 100% renewable wastewater treatment plants: Techno-economic assessment using a modelling and optimization approach. Energy Convers. Manag. 2021, 239, 114214. [Google Scholar] [CrossRef]
  22. Zhao, W.; Zheng, Y.; Chen, A.; Zhao, Y. Study on the Economic Analysis of Campus-Level Integrated Energy System Based on HOMER Pro Software: China Agricultural University East Campus Example. In Proceedings of the 6th International Conference on Energy, Electrical and Power Engineering (CEEPE), Guangzhou, China, 12–14 May 2023; pp. 1289–1294. [Google Scholar] [CrossRef]
  23. Zarmai, J.T.; Alabi, I.I.; Ebisine, E.E.; Zarmai, M.T.; Irefu, O.D. Design and Techno-Economic Evaluation of a Hybrid Mini-grid System for an Academic Institution. J. Energy Power Technol. 2024, 6, 1–16. [Google Scholar] [CrossRef]
  24. AlKassem; Draou, A.; Alamri, A.; Alharbi, H. Design Analysis of an Optimal Microgrid System for the Integration of Renewable Energy Sources at a University Campus. Sustainability 2022, 14, 4175. [Google Scholar] [CrossRef]
  25. Pérez Uc, D.A.; de León Aldaco, S.E.; Aguayo Alquicira, J. Trends in Hybrid Renewable Energy System (HRES) Applications: A Review. Energies 2024, 17, 2578. [Google Scholar] [CrossRef]
  26. Mojumder, M.F.H.; Islam, T.; Takia, N.A.; Chowdhury, N.A.; Hasan, M.; Chowdhury, N.-U.-R. Enhancing Energy Economics Using Hybrid Renewable Energy Systems on the Permanent Campus of Dhaka International University; IEEE: Piscataway, NJ, USA, 2024. [Google Scholar]
  27. Organisation (IEA). Water-Energy Nexus Extrait du World Energy Outlook 2016; IEA (International Energy Agency): Paris, France, 2016. [Google Scholar]
  28. Leonardo, M.; Alberto, S.-M.; Diego, L.T.; Behnam, A.; Eduardo, F.F. Energy and economic implications of photovoltaic curtailment: Current status and future scenarios. Sustain. Energy Technol. Assess. 2025, 81, 104414. [Google Scholar]
  29. Affonso, E.O.T.; Branco, R.R.; Menezes, O.V.C.; Guedes, A.L.A.; Chinelli, C.K.; Haddad, A.N.; Soares, C.A.P. The Main Barriers Limiting the Development of Smart Buildings. Buildings 2024, 14, 1726. [Google Scholar] [CrossRef]
  30. Officials NASEO. Demand Flexibility and Grid-Interactive Efficient Buildings 101; National Association of State Energy Officials (NASEO): Arlington, VA, USA, 2022. [Google Scholar]
  31. Babu, K.V.S.M.; Pratyush, C.; Mayukha, P. Demand Response Optimization MILP Framework for Microgrids with DERs. arXiv 2025, arXiv:2502.08764. [Google Scholar]
  32. Jasper, T.; Luciano, C.S.; Jochen, L.C. MARL-iDR: Multi-Agent Reinforcement Learning for Incentive-based Residential Demand Response. arXiv 2023, arXiv:2304.04086. [Google Scholar]
  33. Navidi, T.; El Gamal, A.; Rajagopal, R. Coordinating distributed energy resources for reliability can significantly reduce future distribution grid upgrades and peak load. Joule 2023, 7, 1769–1792. [Google Scholar] [CrossRef]
  34. Mike, B.R.; Anna, B.; Iain, M. Impact of shared battery energy storage systems on photovoltaic self-consumption and electricity bills in apartment buildings. Appl. Energy 2019, 245, 78–95. [Google Scholar] [CrossRef]
  35. Thorsteinsson, S.; Kalaee, A.A.S.; Vogler-Finck, P.; Stærmose, H.L.; Katic, I.; Bendtsen, J.D. Long-term experimental study of price responsive predictive control in a real occupied single-family house with heat pump. Appl. Energy 2023, 347, 121398. [Google Scholar] [CrossRef]
  36. Saberi-Derakhtenjani; Barbosa, J.D.; Rodriguez-Ubinas, E. Energy Flexibility Strategies for Buildings in Hot Climates: A Case Study for Dubai. Buildings 2024, 14, 9. [Google Scholar] [CrossRef]
  37. Guo, Y.; Xia, X.; Wang, Z.; Liu, Y.; Li, Z. Demand response strategy study of a radiant roof cooling system based on the thermal inertia of the building envelope. Build. Serv. Eng. Res. Technol. 2023, 45, 39–51. [Google Scholar] [CrossRef]
  38. Jesús, M.D.E.; Rayco, P.B.; Manuel, L.I.J. Assessing the use of photovoltaic energy at a seawater reverse osmosis desalination plant: A case study of Porto Santo Desalination Plant (Madeira—Portugal). Desalination Water Treat. 2022, 259, 285–299. [Google Scholar]
  39. Apolinário, R.; Castro, R. Solar-Powered Desalination as a Sustainable Long-Term Solution for the Water Scarcity Problem: Case Studies in Portugal. Water 2024, 16, 2140. [Google Scholar] [CrossRef]
  40. Segurado, R.; Madeira, J.; Costa, M.; Duić, N.; Carvalho, M. Optimization of a wind powered desalination and pumped hydro storage system. Appl. Energy 2016, 177, 487–499. [Google Scholar] [CrossRef]
  41. Azinheira, G.; Segurado, R.; Costa, M. Is Renewable Energy-Powered Desalination a Viable Solution for Water Stressed Regions? A Case Study in Algarve, Portugal. Energies 2019, 12, 4651. [Google Scholar] [CrossRef]
  42. Ibrahim, E.; Hamdy, K.; Mohammed, M. Feasibility and optimal sizing analysis of hybrid PV/Wind powered seawater desalination system: A case study of four ports, Egypt. Heliyon 2024, 10, e40313. [Google Scholar] [CrossRef]
  43. Frew, B.; Sergi, B.; Denholm, P.; Cole, W.; Gates, N.; Levie, D.; Margolis, R. The curtailment paradox in the transition to high solar power systems. Joule 2021, 5, 1143–1167. [Google Scholar] [CrossRef]
  44. Frew, B.; Cole, W.; Denholm, P.; Frazier, A.; Vincent, N. Sunny with a Chance of Curtailment: Operating the US Grid with Very High Levels of Solar Photovoltaics. iScience 2019, 21, 436–447. [Google Scholar] [CrossRef]
  45. Robert, X.; Madeleine, S.; Christopher, K.; Madeleine, M. Flexible electric vehicle charging and its role in variable renewable energy integration. Environ. Syst. Res. 2023, 12, 11. [Google Scholar] [CrossRef]
  46. Alvarez Guerrero, J.D.; Acker, T.L.; Castro, R. Power System Impacts of Electric Vehicle Charging Strategies. Electricity 2022, 3, 297–324. [Google Scholar] [CrossRef]
  47. Tun, T.P.; Ceylan, O.; Pisica, I. A Real-World Case Study Towards Net Zero: EV Charger and Heat Pump Integration in End-User Residential Distribution Networks. Energies 2025, 18, 2510. [Google Scholar] [CrossRef]
  48. Mahinda, M.; Wanjiru, E.; Njiri, J.G. Optimal control of a grid-connected photovoltaic agricultural water pumping system. J. Eng. Appl. Sci. 2023, 70, 85. [Google Scholar] [CrossRef]
  49. Solomon, A.A.; Child, M.; Caldera, U.; Breyer, C. Exploiting wind-solar resource complementarity to reduce energy storage need. AIMS Energy 2020, 8, 749–770. [Google Scholar] [CrossRef]
  50. Khaled; Zahid, M.; Zahid, T.; Ilahi, T. Techno-Economic Feasibility of Hybrid Energy Systems Installation in Pakistan. IEEE Access 2024, 12, 41643–41658. [Google Scholar] [CrossRef]
  51. Iqbal, S.; Jan, M.U.; Anis-Ur-Rehman; Rehman, A.U.; Shafiq, A.; Rehman, H.U.; Aurangzeb, M. Feasibility Study and Deployment of Solar Photovoltaic System to Enhance Energy Economics of King Abdullah Campus, University of Azad Jammu and Kashmir Muzaffarabad, AJK Pakistan. IEEE Access 2022, 10, 5440–5455. [Google Scholar] [CrossRef]
  52. Ord, J.; Hern, E.S. Analysis of PV Self-Consumption in Educational and Office Buildings in Spain. Sustainability 2021, 13, 1662. [Google Scholar] [CrossRef]
  53. Ciocia; Amato, A.; Di Leo, P.; Fichera, S.; Malgaroli, G.; Spertino, F.; Tzanova, S. Self-Consumption and self-sufficiency in photovoltaic systems: Effect of grid limitation and storage installation. Energies 2021, 14, 1591. [Google Scholar] [CrossRef]
  54. László, Z.G.; Tamás, C.; Miklós, H. Novel load matching indicators for photovoltaic system sizing and evaluation. Appl. Energy 2022, 327, 120123. [Google Scholar] [CrossRef]
  55. Guentri, H.; Bouguettoucha, A.E.; Dahbi, A.; Smaani, B.; Betit, F.; Benslimane, H. Assessment of Hybrid On-Grid Photovoltaic and Hydroelectric Systems: A Case Study of University Centre of Mila; IEEE: Piscataway, NJ, USA, 2024; pp. 1–7. [Google Scholar]
  56. Omar, A.; Choukai, O.; Hassan, E. Case Study Toward a Smart Building. In Automatic Control and Emerging Technologies; Springer: Berlin/Heidelberg, Germany, 2024. [Google Scholar] [CrossRef]
  57. Omar, A.; Choukai, O.; Hassan, E.; Errouhi, A.A.; Harmouch, F. Enhancing Photovoltaic Production Management and Air Conditioning Efficiency in the University Library Smart Building; IEEE: Piscataway, NJ, USA, 2024. [Google Scholar]
  58. Online Resource: Organisation (IEA). Wind Explained Where Wind Power Is Harnessed 2024. U.S. Energy Information Administration 1000 Independence Ave., SW Washington, DC 20585. Available online: https://www.eia.gov/energyexplained/wind/where-wind-power-is-harnessed.php (accessed on 20 August 2025).
  59. Singh; Baredar, P.; Gupta, B. Computational Simulation & Optimization of a Solar, Fuel Cell and Biomass Hybrid Energy System Using HOMER Pro Software. Procedia Eng. 2015, 127, 743–750. [Google Scholar] [CrossRef]
  60. Sunanda, S.; Chandel, S. Review of software tools for hybrid renewable energy systems. Renew. Sustain. Energy Rev. 2014, 32, 192–205. [Google Scholar] [CrossRef]
Figure 1. Methodology structure.
Figure 1. Methodology structure.
Sustainability 17 08604 g001
Figure 2. Homer-Pro structure.
Figure 2. Homer-Pro structure.
Sustainability 17 08604 g002
Figure 3. Models of the existing and proposed design created in Homer-Pro for simulation of (a) baseline BIPV scenario; (b) hybrid BIPV–Wind scenario powering both a smart building and a WWTP.
Figure 3. Models of the existing and proposed design created in Homer-Pro for simulation of (a) baseline BIPV scenario; (b) hybrid BIPV–Wind scenario powering both a smart building and a WWTP.
Sustainability 17 08604 g003
Figure 4. Real-life view of the PV system installed in the smart library of Ibn Tofail University.
Figure 4. Real-life view of the PV system installed in the smart library of Ibn Tofail University.
Sustainability 17 08604 g004
Figure 5. Programmable logic controller.
Figure 5. Programmable logic controller.
Sustainability 17 08604 g005
Figure 6. Electric profile of smart building (generated using Homer-Pro).
Figure 6. Electric profile of smart building (generated using Homer-Pro).
Sustainability 17 08604 g006
Figure 7. Surplus pattern representation data modeled in Google Colab.
Figure 7. Surplus pattern representation data modeled in Google Colab.
Sustainability 17 08604 g007
Figure 8. PV production, grid and PV coverage: Weekdays (data modeled in Google Colab).
Figure 8. PV production, grid and PV coverage: Weekdays (data modeled in Google Colab).
Sustainability 17 08604 g008aSustainability 17 08604 g008b
Figure 9. PV production, Grid and PV coverage: Weekends (data modeled in Google Colab).
Figure 9. PV production, Grid and PV coverage: Weekends (data modeled in Google Colab).
Sustainability 17 08604 g009aSustainability 17 08604 g009b
Figure 10. Average wind m/s (source NASA prediction of worldwide energy resources POWER database).
Figure 10. Average wind m/s (source NASA prediction of worldwide energy resources POWER database).
Sustainability 17 08604 g010
Figure 11. Electric profile of the water purification station (generated using Homer-Pro).
Figure 11. Electric profile of the water purification station (generated using Homer-Pro).
Sustainability 17 08604 g011
Figure 12. SC, SS, SP, and GL in each season, comparing weekdays and weekends (data modeled in Google Colab).
Figure 12. SC, SS, SP, and GL in each season, comparing weekdays and weekends (data modeled in Google Colab).
Sustainability 17 08604 g012
Figure 13. SP and GL on weekdays represent the self-production and grid liability for a three selected days (data modeled in Google Colab).
Figure 13. SP and GL on weekdays represent the self-production and grid liability for a three selected days (data modeled in Google Colab).
Sustainability 17 08604 g013aSustainability 17 08604 g013b
Figure 14. SP and GL on weekends represent the self-production and grid liability for a three selected days data modeled in Google Colab.
Figure 14. SP and GL on weekends represent the self-production and grid liability for a three selected days data modeled in Google Colab.
Sustainability 17 08604 g014aSustainability 17 08604 g014b
Figure 15. SC, SS, SP, and GL in each season, comparing weekdays and weekends: using the water-purification station data modeled in Google Colab.
Figure 15. SC, SS, SP, and GL in each season, comparing weekdays and weekends: using the water-purification station data modeled in Google Colab.
Sustainability 17 08604 g015
Figure 16. SP and GL on weekdays after using the water-purification station: 15 February, 22 June, and 6 April (data modeled in Google Colab).
Figure 16. SP and GL on weekdays after using the water-purification station: 15 February, 22 June, and 6 April (data modeled in Google Colab).
Sustainability 17 08604 g016
Figure 17. SP and GL on weekends after using the water-purification station: 28 January, 4 June, and 15 May data modeled in Google Colab.
Figure 17. SP and GL on weekends after using the water-purification station: 28 January, 4 June, and 15 May data modeled in Google Colab.
Sustainability 17 08604 g017aSustainability 17 08604 g017b
Figure 18. Wind turbine production (result simulation in Homer-Pro).
Figure 18. Wind turbine production (result simulation in Homer-Pro).
Sustainability 17 08604 g018
Figure 19. Energy sold to the grid in the first scenario using PV system.
Figure 19. Energy sold to the grid in the first scenario using PV system.
Sustainability 17 08604 g019
Figure 20. Energy sold to the grid in the second scenario: PV–Wind Hybrid.
Figure 20. Energy sold to the grid in the second scenario: PV–Wind Hybrid.
Sustainability 17 08604 g020
Figure 21. Frequency of Renewable Energy Fluctuations Over 1 Hour: PV–Wind Hybrid vs. PV-Only System.
Figure 21. Frequency of Renewable Energy Fluctuations Over 1 Hour: PV–Wind Hybrid vs. PV-Only System.
Sustainability 17 08604 g021
Table 1. Four metrics: SC, SS, SP, and GL [54].
Table 1. Four metrics: SC, SS, SP, and GL [54].
MetricsEquations
Self-Consumption S C = C / ( B + C )
Self-Sufficient S S = C / ( A + C )
Self-Production S P = C / ( A + B + C )
Grid-Reliability G L = ( ( A + B ) / ( A + C ) ) 1
Table 2. PV system type and kWp (datasheet and monitoring system).
Table 2. PV system type and kWp (datasheet and monitoring system).
P (Wp)UnitsTypeTotal (kWp)
Facade395Mono Full black modules60 Units23.7
Pergola360Bifacial112 Units42
Table 3. Metric results for weekdays: 15 February, 22 June, and 6 April.
Table 3. Metric results for weekdays: 15 February, 22 June, and 6 April.
15 February22 June6 April
Self-Consumption99%100%96%
Self-Sufficient10%19%26%
Self-Production9%19%24%
Grid-Reliability−9%−19%−22%
Table 4. Metric results in weekend days: 28 January, 4 June, 15 May.
Table 4. Metric results in weekend days: 28 January, 4 June, 15 May.
28 January4 June15 May
Self-Consumption62%100%59%
Self-Sufficiency28%29%41%
Self-Production12%29%17%
Grid-Reliability616%−29%6109%
Table 5. Metric results for weekdays while using the water-purification station.
Table 5. Metric results for weekdays while using the water-purification station.
15 February22 June6 April
Self-Consumption100%(PV production = 0)100%
Self-Sufficiency0%0%1%
Self-Production0%0%1%
Grid-Reliability0%0%−1%
Table 6. Metric results for weekend days while using the water-purification station.
Table 6. Metric results for weekend days while using the water-purification station.
28 January4 June15 May
Self-Consumption100%100%100%
Self-Sufficiency8%0%11%
Self-Production8%0%11%
Grid-Reliability−8%0%−11%
Table 7. Facade and pergola production in kWh/yr and %.
Table 7. Facade and pergola production in kWh/yr and %.
ProductionkWh/yr%
Grid purchases742,54191.5
Facade24,1652.98
Pergola44,6195.5
Total811,326100
Table 8. Energy-based metrics.
Table 8. Energy-based metrics.
Energy-Based MetricsValueUnits
Total renewable production divided by load8.48%
Total renewable production divided by generation8.48%
One minus the total nonrenewable production divided by the load100%
Table 9. Facade production and capacity factor.
Table 9. Facade production and capacity factor.
QuantityValueUnits
Rated Capacity1
Mean Output2.76kW
Mean Output66.2kWh/d
Capacity Factor14.6%
Total Production24.165kWh/yr
Table 10. Pergola production and capacity factor.
Table 10. Pergola production and capacity factor.
QuantityValueUnits
Rated Capacity1
Mean Output5.09kW
Mean Output122kWh/d
Capacity Factor17.4%
Total Production44,619kWh/yr
Table 11. Economic metric using pergola and facade system.
Table 11. Economic metric using pergola and facade system.
MetricValue
Present worth548,831 MAD
Annual worth MAD/yr42,454
Return on investment %16.7
Internal rate of return %20.5
Simple payback (yr)4.82
Discounted payback(yr)5.84
Table 12. Emission metrics.
Table 12. Emission metrics.
QuantityValueUnits
Carbon Dioxide469,286kg/yr
Sulfur Dioxide2035kg/yr
Nitrogen Oxides995kg/yr
Table 13. Wind production and capacity factor.
Table 13. Wind production and capacity factor.
QuantityValueUnits
Total Rated Capacity30kW
Mean Output8.7kW
Capacity Factor29%
Total Production76,174kWh/yr
Table 14. Scenario 2: Economic metrics using wind, pergola, and facade system.
Table 14. Scenario 2: Economic metrics using wind, pergola, and facade system.
MetricValue
Present worth MAD1,655,174
Annual worth MAD/yr128,035
Return on investment %42.9
Internal rate of return %46.9
Simple payback (yr)2.13
Discounted payback(yr)2.35
Table 15. Scenario 2: Emission metrics.
Table 15. Scenario 2: Emission metrics.
QuantityValueUnits
Carbon Dioxide421,421kg/yr
Sulfur Dioxide1827kg/yr
Nitrogen Oxides894kg/yr
Table 16. Comparative analysis results of Hoper-Pro simulation.
Table 16. Comparative analysis results of Hoper-Pro simulation.
Scenario IScenario II
Levelized cost of energy
LCOE = 1.08 MAD/kWh
Levelized cost of energy
LCOE = 0.972 MAD/kWh
Grid sales
Grid_sales = 11 kWh
Grid sales
Grid_sales = 450 kWh
Renewable Fraction
Rf = 8.5%
Renewable Fraction
Rf = 17.9%
Carbon Dioxide
Emissions CO2 = 469,286 kg/yr
Carbon Dioxide
Emissions CO2 = 421,421 kg/yr
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ait Omar, O.; Choukai, O.; Guamán, W.; El Fadil, H.; Ait Errouhi, A.; Ait Chaoui, K. Comparative Analysis of PV and Hybrid PV–Wind Supply for a Smart Building with Water-Purification Station in Morocco. Sustainability 2025, 17, 8604. https://doi.org/10.3390/su17198604

AMA Style

Ait Omar O, Choukai O, Guamán W, El Fadil H, Ait Errouhi A, Ait Chaoui K. Comparative Analysis of PV and Hybrid PV–Wind Supply for a Smart Building with Water-Purification Station in Morocco. Sustainability. 2025; 17(19):8604. https://doi.org/10.3390/su17198604

Chicago/Turabian Style

Ait Omar, Oumaima, Oumaima Choukai, Wilian Guamán, Hassan El Fadil, Ahmed Ait Errouhi, and Kaoutar Ait Chaoui. 2025. "Comparative Analysis of PV and Hybrid PV–Wind Supply for a Smart Building with Water-Purification Station in Morocco" Sustainability 17, no. 19: 8604. https://doi.org/10.3390/su17198604

APA Style

Ait Omar, O., Choukai, O., Guamán, W., El Fadil, H., Ait Errouhi, A., & Ait Chaoui, K. (2025). Comparative Analysis of PV and Hybrid PV–Wind Supply for a Smart Building with Water-Purification Station in Morocco. Sustainability, 17(19), 8604. https://doi.org/10.3390/su17198604

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop