Techno-Environmental Evaluation and Optimization of a Hybrid System: Application of Numerical Simulation and Gray Wolf Algorithm in Saudi Arabia

: Renewable energy systems have the potential to address increasing energy demand, mitigate environmental degradation, and decrease reliance on fossil fuels. Wind and solar power are examples of renewable energy sources that are characterized by their cleanliness, environmental friendliness, and sustainability. The combination of wind and solar energy is motivated by each energy source’s inherent variability. The objective of this study is to assess the technical, economic, and environmental aspects of a hybrid system designed to provide energy. This study utilizes numerical simulation and develops a novel model using the gray wolf optimization (GWO) algorithm to assess the technical, economic, and environmental consequences of adopting a hybrid system. The evaluation focused on determining the optimal conﬁguration of a greenhouse unit in Najran, Saudi Arabia, over a period of 20 years. The results showed that the diesel generator produced 42% of the required energy when combined with photovoltaic generators, while photovoltaics produced 58%. The wind turbine generated 23% of the required power while the remaining 77% was produced by the diesel generator. Finally, diesel generators, photovoltaics, wind turbines were observed to generate 37%, 48%, and 15% of the required energy, respectively. This outcome is consistent with current knowledge because solar and wind systems reduce pollution. However, the diesel generator– photovoltaic–wind mode is the preferred method of reducing emissions. Finally, the rate of return on investment for diesel generators is 3.4 years, while for diesel-photovoltaic generators and the triple array it is 2.5 and 2.65 years, respectively.


Introduction
The rapid depletion of global fossil fuel resources, rising energy demand, and rising costs have led to an increased desire of to reduce reliance on them [1][2][3].Recent Middle Eastern issues related to fossil fuel non-use and extraction emphasize the need for developing countries to make greater use of sustainable energy sources [4,5].This motivation arises from the need to address the energy demand challenges related to conventional power generation methods.Thus, renewable energy-based electricity systems that are environmentally sustainable are gaining popularity [6][7][8].
Renewable energy sources can meet global electricity demand owing to their abundance [9,10].Moreover, they can serve as a cost-free energy source [11,12].The use of renewable energy has grown in recent decades [13,14].Their importance in electricity generation has grown because they produce few greenhouse gas emissions [15].Renewable energy sources are environmentally friendly and inexhaustible [16,17].Furthermore, a significant portion of the global population inhabits regions characterized by challenges related to the installation of electricity transmission infrastructure.This issue is particularly evident in developing areas, such as Saudi Arabia, where limited electricity infrastructure hinders effective electricity distribution [18].Geographical unevenness, a lack of electrical infrastructure, and high costs are the main economic reasons for countries' failure to invest in distribution and network expansion [19][20][21].Network expansion may be a viable alternative for geographically isolated regions [22,23].However, expanding the central electricity network to reach remote and geographically dispersed villages may not be economically viable, and off-grid solutions may be more effective [24,25].Some rural areas use diesel generators to produce electricity.However, diesel generators have several drawbacks.When burned, fossil fuels, such as diesel, emit greenhouse gases.Global warming is caused by greenhouse gas emissions [26].The promotion of renewable resources and government policies have advanced in recent years.Thus, hybrid devices that use both renewable and non-renewable energy are economically viable [27].
The availability of renewable resources is inexhaustible, and they can be substituted for conventional fuels [28,29].However, relying solely on renewable methods, such as wind turbines or independent photovoltaic cells, is not a viable approach to energy generation because of their intermittent and less enduring nature [30].These challenges can be resolved through the integration of energy sources with a supplementary unit in the form of a durable and cost-effective hybrid system [31,32].The integration of a diesel generator into a hybrid system enhances the overall performance of the system and reduces energy production expenses.Therefore, the development of an appropriate system capable of accommodating diverse climatic conditions to attain sustainable energy solutions in the contemporary global context can confer significant benefits to all nations.
The main challenge involved in any system is optimizing the component dimensions to meet requirements while minimizing the investment and labor costs.The integration of a diesel generator with a photovoltaic and wind system optimizes diesel fuel use and reduces the system's operating costs and carbon footprint [33].Wind-diesel-photovoltaic systems may be more reliable than solar or wind energy systems in terms of meeting the electricity needs in remote areas [34].The best agricultural strategy for achieving selfsufficiency and reduced reliance on conventional agricultural involves using renewable energy sources in autonomous systems that supply electricity [35].Autonomous renewable energy technologies, such as residential solar power and small-scale hydroelectric systems, have also received significant attention [36].However, these systems are often inaccessible to consumers and rely on scarce resources [37].
The study conducted by Shafiullah et al. [38] involved a comparative cost analysis of a system connected to the network of a health center in rural areas.This study utilized a fuel cell and employed the HOMER software (v4.10) to perform analyses.If the distance from the network supply base exceeds 4.4 km, it is more cost-effective to opt for a bundled solution than individual components.Using the HOMER software, Alayi et al. [39] proposed a hybrid wind-solar-fuel cell system for residential use in Yazd, Iran, which has a hot and dry climate.The objective was to identify the optimal economic system that could supply 15 kWh of electricity per day, and to assess the impact of uncertainties, a sensitivity analysis was performed to measure solar radiation intensity and wind speed.Zhang et al. [40] utilized a harmony search optimization model to determine the optimal size of a solar/wind power generation system based on a hydrogen storage system.The objective function of the current optimization problem is to minimize the system's total cost while satisfying the required level of reliability.Arribas et al. [41] implemented a wind and diesel hybrid system at a tourist village located in Spain, subsequently conducting comprehensive monitoring of its operational efficacy over a period of approximately one year.Wind technology demonstrates superior efficiency than alternative energy systems.The feasibility study conducted by Bekele and Palm [42] examines the potential of implementing an autonomous wind solar hybrid system to generate electric energy to supply a hypothetical community consisting of 200 households, accommodating approximately 1000 individuals.This study was conducted in an off-grid region in Ethiopia, where it was observed that hybrid systems exhibit numerous advantages in terms of efficiency.According to Abdullah et al. [43], hybrid power systems may face limitations in terms of generating electricity due to insufficient solar radiation.Al-Sharafi et al. [44] conducted an investigation of the potential for power generation and hydrogen production using solar and wind energy resources in several areas within Saudi Arabia.These locations included Dhahran, Riyadh, Jeddah, Abha, and Yanbu.
This study employs numerical simulation and the novel gray wolf optimization (GWO) algorithm to evaluate the technical, economic, and environmental implications of implementing a hybrid system comprising a diesel generator, a wind turbine, photovoltaic panels, battery storage, and a converter.Meanwhile, based on the economy and environment of the Najran region, Saudi Arabia, several scenarios were evaluated.The objective of this study is to evaluate the power generation capabilities of this hybrid system for a greenhouse unit.This study involves a comparative analysis of the effectiveness of different configurations to identify the structure with the lowest amount of energy consumption and waste, as well as reduce the environmental effects of the hybrid system by reducing the emission of greenhouse gases.

Materials and Methods
The HOMER tool was utilized for the purpose of simulating and conducting technical and economic evaluations of hybrid systems.The tool in question was created by the National Renewable Energy Laboratory (NREL), which is an institution based in the United States of America.The HOMER tool facilitated the comparison of various design options by considering technical, economic, and environmental factors.The HOMER software employs the net present cost (NPC) equation to calculate life cycle costs.The components considered to be the overall costs of the system were the initial investment expenses, subsequent replacement expenses, repair costs, fuel expenditures, procurement of electricity from the grid, penalties incurred as a result of air pollution, and revenue generated from the sale of electricity to the grid [45].
Equation (1) was employed to determine the salvage value (S) of each component at the conclusion of the project's lifecycle.
where C Rep is the replacement cost of the component, R rem is the remaining life of the component, and R copm is the length of the component's life.The annualized cost of each component was determined by incorporating capital, moving, maintenance, and fuel costs, along with the salvage value and any additional costs or income associated with the component.Equation ( 2) was employed to perform the computation of the system NPC.
where C ann,tot is the total annual cost, i is annual real interest rate, R proj is project's lifespan, and is the capital compensation index (CRF(i, N)) [N is system operation years].
Equation ( 4) is also employed in the computation of the leveled cost of energy.
where E prim and E def are the total values of primary and secondary loads, respectively, and E gridsales is the amount of energy supplied to the power grid within a one-year period.E prim + E def + E gridsales is the overall quantity of beneficial energy generated by the system within one year.Consequently, the leveled cost of energy is the mean expense per kWh of useful electrical energy generated by the system.

Case Study
To assess the techno-environmental aspects of the hybrid system used to meet the energy demands of a greenhouse unit, the utilization of the HOMER software necessitated the acquisition of pertinent data.These data included information about energy sources, the constituent elements of the system under investigation, associated costs, efficiencies, the system's lifespan, technical specifications of the greenhouse in question, and the energy consumption of the greenhouse across various consumer sectors.The primary consumer components within a greenhouse included the greenhouse heating system, as well as the energy required to extract water from the well within the greenhouse.
To enable the utilization of wind turbines and photovoltaic panels used for energy provision in this facility, an analysis of the designated area was conducted.By considering the climatic conditions specific to the region, the heating load of the greenhouse was subsequently determined.Subsequently, the requisite quantity of water sourced within the greenhouse was determined, along with the energy required for its provision.Subsequently, the examined system, comprising a diesel generator, a wind turbine, solar arrays, and battery storage sources, was subjected to a comprehensive cost analysis encompassing investment costs, operation costs, and maintenance costs.
Polyethylene-covered greenhouses, which are commonly used to cultivate cucumber and tomato crops, typically have dimensions ranging from 6 to 10 m in width and 27 to 36 m in length.The final height of these structures is around 4 m, with the useful height being 2.4 m.These dimensions allowed the convenient and optimal cultivation of crops within the greenhouse.The creation of a greenhouse facilitated the potential to improve operational productivity within the given space.The dimensions provided adhere to the standard set by the National Greenhouse Manufactures Association (NGMA), which aligns with the dimensions specified by the Food and Agriculture Organization of the United Nations (FAO).
The sample greenhouse located in Najran, Saudi Arabia, was located at 17.56 • N and 44.23 • E (Figure 1a).The dimensions and size of the greenhouse were chosen in accordance with the FAO standard outlined in Table 1.The greenhouse structure was semi-circular and featured a two-layer polyethylene coating surface, as depicted in Figure 1b.These simulations aimed to assess the optimal system for use in Najran, Saudi Arabia.The power generated by a wind turbine is contingent upon the velocity of the wind.Consequently, it was imperative to choose a wind turbine that aligns with the minimum and maximum wind speeds prevalent in a given area to adequately fulfill the required load.
The technical specifications of the wind turbine were chosen based on the wind characteristics observed in the investigated regions, as outlined in Table 2. Figure 2a displays the power production characteristic curve and cost curve of the turbine.The financial aspects associated with each wind turbine unit of this particular type included an investment cost of USD 7000, a replacement cost of USD 6200, and an annual maintenance cost of USD 60 (Figure 2b).The power generated by a wind turbine is contingent upon the velocity of the wind.Consequently, it was imperative to choose a wind turbine that aligns with the minimum and maximum wind speeds prevalent in a given area to adequately fulfill the required load.
The technical specifications of the wind turbine were chosen based on the wind characteristics observed in the investigated regions, as outlined in Table 2. Figure 2a displays the power production characteristic curve and cost curve of the turbine.The financial aspects associated with each wind turbine unit of this particular type included an investment cost of USD 7000, a replacement cost of USD 6200, and an annual maintenance cost of USD 60 (Figure 2b).

Photovoltaic Panel
Given that the longevity of solar arrays surpasses that of other components, it is commonly accepted that the overall system's lifespan is equivalent to that of the solar arrays.The specifications of this particular type of photovoltaic panels are presented in Table 3. Figure 3a displays the investment cost and replacement cost.Given that the longevity of solar arrays surpasses that of other components, it is commonly accepted that the overall system's lifespan is equivalent to that of the solar arrays.The specifications of this particular type of photovoltaic panels are presented in Table 3. Figure 3a displays the investment cost and replacement cost.

Diesel Generator
The dimensions of diesel generators vary based on their apparent power, which is quantified in volt-ampere (VA) units.This analysis focused on the diesel generator GF2 model ZS1125-ST15, which has a power output of 15 kW and operates at a voltage of 220 V.The specifications of this particular diesel generator are presented in Table 4. Figure 3b illustrates the expenses associated with the installation and relocation of the diesel generator.This study focused on the Vision 6FM200-X battery, which falls under the lead shieldtype category.The specifications of this battery can be found in Table 5.Additionally, a Powertech converter was employed in this study.Figure 3c,d depict the expenses associated with the installation and relocation of the battery and converter employed in the hybrid system, respectively.

Gray Wolf Optimization (GWO)
The gray wolf algorithm (GWO) is a meta-heuristic algorithm based on the social structure and hunting behavior of wolves.The GWO algorithm is population-based, has a straightforward process, and can be easily applied to large-scale problems [46].The social behavior and hierarchical structure of gray wolves are defined as follows: The gray wolf is at the top of the food chain and is social in nature.The number of wolves in a pack ranges from 5 to 12.There are four primary ranks of wolf in every pack.The leader of the alpha pack is a wolf, which can be either male or female.These wolves control the herd and oversee matters such as resting areas and hunting techniques.In addition to the dominant behavior of alpha wolves, there is a democratic structure within the pack.Delta wolves are inferior to beta wolves and include older wolves, hunters, and wolves that provide parental care.Omega wolves are at the bottom of the group's hierarchy and have the fewest rights.In the end, they only eat and do not participate in decision-making [47].Figure 4 depicts the hierarchical structure of wolf pack.

• Hunting method gray wolves
There are three main phases of gray wolf hunting: (a) Observing, hunting, tracking, and pursuing prey; (b) Approaching, encircling, and misleading prey until it ceases to move; (c) An assault on prey during hunting [48].
Using delta alpha and beta wolves, optimization is performed; one wolf is designated as alpha, i.e., the algorithm's primary leader, and a beta and delta wolf also participate.The remaining wolves are regarded as their followers.Figure 4 depicts the flowchart and hierarchical structure of wolves in the GWO algorithm.
The objective function evaluated in this study is represented by Equation (5).
where F(x) is the objective function used to minimize NPC and CO 2 emissions, and N i (x ) and M j (x) are the equal and unequal limits.Limitations included the amount of energy consumed in each production unit having to be less than or equal to the amount of energy produced by the hybrid system configuration in that unit.Upon determining the objective function, conducting sensitivity analysis, and identifying the optimal values of the influential parameters of the algorithms, the decision variables of the problem were computed.CO 2 emissions could not be less than zero, and the other limitations are presented in Table 6. Figure 5 illustrates the convergence pattern of the objective function value during the whole operational period of the hybrid system, utilizing the optimal population derived from the operational model.We set the number of program executions at to 1000 and the initial population size at 100. wolves that provide parental care.Omega wolves are at the bottom of the group's hierarchy and have the fewest rights.In the end, they only eat and do not participate in decisionmaking [47].Figure 4 depicts the hierarchical structure of wolf pack.function, conducting sensitivity analysis, and identifying the optimal values of the influential parameters of the algorithms, the decision variables of the problem were computed.CO2 emissions could not be less than zero, and the other limitations are presented in Table 6. Figure 5 illustrates the convergence pattern of the objective function value during the whole operational period of the hybrid system, utilizing the optimal population derived from the operational model.We set the number of program executions at to 1000 and the initial population size at 100.Once the objective function was defined, it became necessary to carefully determine suitable the values of various components of the gray wolf optimizer algorithms.These components included the initial population size, the maximum repetition count, and other relevant parameters.Undoubtedly, the appropriate selection of these values will have a direct impact on the performance and efficiency of the algorithms employed to address the problem at hand.

Results and Discussion
The researchers acquired the environmental data for Najran, Saudi Arabia, by utilizing the National Solar Radiation Database (NSRD) [available on https://nsrdb.nrel.gov/(accessed on 1 August 2023) from 2017 to 2019].The data presented in Figure 6 pertain to the global horizontal irradiance (GHI) and wind speed, which were measured at 30-minute intervals over a period extending from 2017 to 2019 within the designated study area.Once the objective function was defined, it became necessary to carefully determine suitable the values of various components of the gray wolf optimizer algorithms.These components included the initial population size, the maximum repetition count, and other relevant parameters.Undoubtedly, the appropriate selection of these values will have a direct impact on the performance and efficiency of the algorithms employed to address the problem at hand.

Results and Discussion
The researchers acquired the environmental data for Najran, Saudi Arabia, by utilizing the National Solar Radiation Database (NSRD) [available on https://nsrdb.nrel.gov/(accessed on 1 August 2023) from 2017 to 2019].The data presented in Figure 6 pertain to the global horizontal irradiance (GHI) and wind speed, which were measured at 30-min intervals over a period extending from 2017 to 2019 within the designated study area.Based on the provided inputs, an analysis is conducted on each system to optimize their performance.The simulated systems are designed accordingly.The tabulation of the rise in the aggregate marginal cost is presented in a data structure.In the field of optimization, the optimal solution is characterized by the fulfillment of all pre-determined constraints while simultaneously minimizing both the NPC and CO2 emissions.The resulting configuration comprises a total of 1728 simulation cases and 3456 sensitivity analysis cases.The HOMER software, upon conducting an analysis of various modes, proposes an Based on the provided inputs, an analysis is conducted on each system to optimize their performance.The simulated systems are designed accordingly.The tabulation of the rise in the aggregate marginal cost is presented in a data structure.In the field of optimization, the optimal solution is characterized by the fulfillment of all pre-determined constraints while simultaneously minimizing both the NPC and CO 2 emissions.The resulting configuration comprises a total of 1728 simulation cases and 3456 sensitivity analysis cases.The HOMER software, upon conducting an analysis of various modes, proposes an optimal configuration for the integrated system.The outcomes of numerical simulation and optimization model indicate that employing a diesel generator is the most cost-effective approach for the designated regions.Furthermore, a comparative analysis of the outcomes obtained from the simulation and GWO reveals that the utilization of the proposed GWO algorithm to achieve the optimal configuration of the hybrid system yields superior results than the numerical simulation.
There are several reasons to select different configurations to optimize hybrid off-grid systems composed of a diesel engine, photovoltaic panels, wind turbines, batteries, and inverters.These reasons can be described as follows: • Load requirements: Different loads require different power outputs and energy storage capacities.Therefore, the configuration must be chosen based on the specific load requirements of the system.

•
Resource availability: The availability of solar radiation and the wind speed varies across different geographic locations.The configuration should be based on the availability and predictability of these resources at the installation site to ensure optimal utilization.

•
System efficiency: Each component of the hybrid system operates at a different efficiency.The configuration should be designed to maximize the overall system efficiency by selecting components that complement each other and minimize energy losses.

•
Redundancy and reliability: To ensure continuous power supply, the system should incorporate redundancy and reliability measures.This outcome can be achieved by selecting configurations that provide backup power sources and allow seamless switching between different energy sources.

•
Cost-effectiveness: The installation and maintenance costs of different components can significantly vary.The configuration must strike a balance between performance and cost-effectiveness to make the system financially viable.

•
Environmental impact: Hybrid off-grid systems aim to reduce reliance on fossil fuels and minimize carbon emissions.Configurations should prioritize renewable energy sources, such as solar and wind, to minimize environmental impacts and promote sustainability.• Scalability: The system may need to be expanded in the future to accommodate increasing power demand.The chosen configuration should have the flexibility to scale up or down without significant disruptions or additional investments.
These factors should be carefully considered and analyzed when selecting the configuration required to optimize hybrid off-grid systems.By taking into account these considerations, a well-designed configuration can ensure efficient, reliable, and sustainable power generation in off-grid settings.
Subsequently, an assessment is conducted for different configurations, namely the diesel generator configuration, diesel-photovoltaic generator configuration, diesel-wind generator configuration, and diesel-photovoltaic-wind generator configuration.

Diesel Generator Configuration
The simulation offers graphical depictions of the total costs that will be incurred during the course of the hybrid system's lifespan of twenty years.More specifically, the simulation focuses on the costs involved in the installation, relocation, and maintenance of a single diesel generator.The total NPC associated with this design is approximately USD 17,250, which results in a cost of producing power of approximately USD 0.408 per kWh.Using the procedure proposed via the GWO technique for the configuration of a single diesel generator, the estimated NPC of this configuration is close to USD 17,350.This configuration is anticipated to have an NPC of the same amount.In addition, it is predicted that the cost of generating one kilowatt hour of power will be USD 0.386.In fact, the cost of production per kWh is lower, despite the fact that the total cost of the system is more than the original projections (Figure 7).
The simulation offers graphical depictions of the total costs that will be incurred during the course of the hybrid system's lifespan of twenty years.More specifically, the simulation focuses on the costs involved in the installation, relocation, and maintenance of a single diesel generator.The total NPC associated with this design is approximately USD 17,250, which results in a cost of producing power of approximately USD 0.408 per kWh.Using the procedure proposed via the GWO technique for the configuration of a single diesel generator, the estimated NPC of this configuration is close to USD 17,350.This configuration is anticipated to have an NPC of the same amount.In addition, it is predicted that the cost of generating one kilowatt hour of power will be USD 0.386.In fact, the cost of production per kWh is lower, despite the fact that the total cost of the system is more than the original projections (Figure 7).Under these circumstances, the average daily production of electricity is close to 1.6 kWh.Therefore, the expected duration of the return on investment is 3.4 years.As it has such a short lifespan, the generator will need to be quite regularly replaced, which will add to the expenses of having it installed.In addition, the costs of maintaining the system and supplying it with fuel will be ongoing expenses throughout the lifetime of the system.
The annual diesel fuel consumption is about 1650 L, and the special fuel consumption per kWh is 0.6 L. The results of optimizing the emission rate caused by the use of a 2kilowatt diesel generator to power the greenhouse unit throughout the year indicate that the pollution rate in this instance is significantly higher than that of other energy compounds.In other words, the use of a diesel generator results in the production of approximately 1.5 g of carbon dioxide per day (Table 7).Under these circumstances, the average daily production of electricity is close to 1.6 kWh.Therefore, the expected duration of the return on investment is 3.4 years.As it has such a short lifespan, the generator will need to be quite regularly replaced, which will add to the expenses of having it installed.In addition, the costs of maintaining the system and supplying it with fuel will be ongoing expenses throughout the lifetime of the system.
The annual diesel fuel consumption is about 1650 L, and the special fuel consumption per kWh is 0.6 L. The results of optimizing the emission rate caused by the use of a 2-kilowatt diesel generator to power the greenhouse unit throughout the year indicate that the pollution rate in this instance is significantly higher than that of other energy compounds.In other words, the use of a diesel generator results in the production of approximately 1.5 g of carbon dioxide per day (Table 7).

Diesel Generator-Photovoltaic Configuration
Figure 8 illustrates the monthly amount of electricity produced by each array, which represents the utilization of a diesel-photovoltaic setup for the purpose of powering the unit.Due to the optimum radiation angle and the high radiation intensity during the months between April and September, solar arrays were able to generate an adequate amount of electricity throughout those months.In contrast, the amount of electricity generated was generally lower throughout the remaining months of the year.In this arrangement, it is predicted that photovoltaics will be responsible for the generation of 58% of electricity, while diesel generators will be responsible for generating 42% of electricity (Figure 8a).
unit.Due to the optimum radiation angle and the high radiation intensity during the months between April and September, solar arrays were able to generate an adequate amount of electricity throughout those months.In contrast, the amount of electricity generated was generally lower throughout the remaining months of the year.In this arrangement, it is predicted that photovoltaics will be responsible for the generation of 58% of electricity, while diesel generators will be responsible for generating 42% of electricity (Figure 8a).The average daily production of electricity will be close to 2 kWh.Although 1.6 kWh is the minimum amount, any additional energy that is produced will be stored in the battery.Therefore, the period of time needed to gain a return on the investment is 2.5 years.This design shows that the entire cost of the system's life cycle is roughly the same for both arrays, which indicates that the cost is virtually comparable.This setup brings the annual use of diesel fuel down to 1312 L, as shown in Figure 8b.The level of emissions that are produced via a hybrid diesel-photovoltaic generator is displayed in Table 7.Given that the design employs a diesel generator and a photovoltaic system with a combined capacity of 5%, the use of renewable energy and reduced diesel generator use result in fewer emissions than the diesel configuration.This outcome occurs because the combined capacity of the diesel generator and the photovoltaic system is 5%.

Diesel Generator-Wind Turbine Configuration
Using the diesel-wind configuration, the wind turbine produces an amount of electricity accounting for only 13% of the total electricity production in this configuration, as The average daily production of electricity will be close to 2 kWh.Although 1.6 kWh is the minimum amount, any additional energy that is produced will be stored in the battery.Therefore, the period of time needed to gain a return on the investment is 2.5 years.This design shows that the entire cost of the system's life cycle is roughly the same for both arrays, which indicates that the cost is virtually comparable.This setup brings the annual use of diesel fuel down to 1312 L, as shown in Figure 8b.The level of emissions that are produced via a hybrid diesel-photovoltaic generator is displayed in Table 7.Given that the design employs a diesel generator and a photovoltaic system with a combined capacity of 5%, the use of renewable energy and reduced diesel generator use result in fewer emissions than the diesel configuration.This outcome occurs because the combined capacity of the diesel generator and the photovoltaic system is 5%.

Diesel Generator-Wind Turbine Configuration
Using the diesel-wind configuration, the wind turbine produces an amount of electricity accounting for only 13% of the total electricity production in this configuration, as depicted in Figure 9a.In the meantime, the appropriate tower height has been determined.The NPC breakdown for diesel-generator-wind turbine configuration is shown in Figure 9b.However, the daily production of electricity exceeds the required amount by approximately 2.7 kWh.Therefore, the investment return index is 2.82 years.The diesel generator contributes 2975 kWh to annual electricity production, and it consumes 1255 L of diesel fuel per year.As evidenced by the results of the inventory trend summary chart, the reduction in the economic rating of this diesel-photovoltaic system is primarily attributable to maintenance costs.The use of this type of configuration, which produces 77% of energy via a diesel generator and 23% of energy via a wind turbine, has been able to reduce emissions compared to diesel use alone and is, therefore, environmentally friendly; however, this configuration produces more pollution than the photovoltaic-diesel configuration However, the daily production of electricity exceeds the required amount by approximately 2.7 kWh.Therefore, the investment return index is 2.82 years.The diesel generator contributes 2975 kWh to annual electricity production, and it consumes 1255 L of diesel fuel per year.As evidenced by the results of the inventory trend summary chart, the reduction in the economic rating of this diesel-photovoltaic system is primarily attributable to maintenance costs.The use of this type of configuration, which produces 77% of energy via a diesel generator and 23% of energy via a wind turbine, has been able to reduce emissions compared to diesel use alone and is, therefore, environmentally friendly; however, this configuration produces more pollution than the photovoltaic-diesel configuration (Table 8).

Diesel Generator-Wind Turbine-Photovoltaic Configuration
Considering the diesel-wind-solar setup, the photovoltaic array is more significant than the diesel generator, while the diesel generator is more vital than the wind turbine.As can be seen in Figure 10a, 48% of the generated electricity comes from solar cells, 37% comes from diesel generators, and 15% comes from wind towers.This configuration results in the production of 7329 kWh of electricity each year, which is equivalent to around 19.26 kWh per day.Figure 10b illustrates how the NPC was enhanced during the course of the project's lifetime thanks to the many replacements of batteries and power converters, as well as the single replacement of solar and wind turbine arrays.As a result of an increase in the use of renewable energy and a decrease in the use of diesel generators, the quantity of emissions produced via the triple arrangement of the diesel-wind-solar combination is much less than the results shown in Table 8 for the double and single arrangements.According to the findings, it is clear that the time period during which the generator, solar panels, wind turbine, power converter, and battery are all operating in conjunction with one another is the period that is connected to the lowest level of pollution.As power can only be drawn from the circuit if all of its components are present, this conclusion makes perfect sense.However, it will not be as effective as the generator, which produces a significantly higher amount of emissions.
Sustainability 2023, 15, x FOR PEER REVIEW 14 of 18 bination is much less than the results shown in Table 8 for the double and single arrangements.According to the findings, it is clear that the time period during which the generator, solar panels, wind turbine, power converter, and battery are all operating in conjunction with one another is the period that is connected to the lowest level of pollution.As power can only be drawn from the circuit if all of its components are present, this conclusion makes perfect sense.However, it will not be as effective as the generator, which produces a significantly higher amount of emissions.In other words, only 30% of the intermediate city's annual carbon dioxide emissions will be cut as a result of this arrangement in comparison to the arrangement including the single diesel generator.For this reason, countries have been paying more attention to the utilization of renewable energy, like solar and wind, and as a result, the annual use of such energies has been expanding.It is important to keep in mind that the greatest amount of pollution is produced when there are no sources of renewable energy in the circuit; hence, the existence of the generator will only contribute to environmental pollution.It is im- In other words, only 30% of the intermediate city's annual carbon dioxide emissions will be cut as a result of this arrangement in comparison to the arrangement including the single diesel generator.For this reason, countries have been paying more attention to the utilization of renewable energy, like solar and wind, and as a result, the annual use of such energies has been expanding.It is important to keep in mind that the greatest amount of pollution is produced when there are no sources of renewable energy in the circuit; hence, the existence of the generator will only contribute to environmental pollution.It is important to note that the total net cost, classified energy cost, and investment return index for the triple arrangement can be reduced if the right values of pollution are determined and accepted.

Sensitivity Analysis
Uncertainty in crucial parameters is a frequent issue for designers of micropower systems.Sensitivity analysis aids the designer in comprehending the effects of uncertainty and making appropriate design decisions in spite of it.In order to conduct this analysis, the fuel price model is assumed to be equal to USD 0.71 per liter over the project's 20-year lifespan.Clearly, this value is subject to significant uncertainty, but many other inputs may also be subject to uncertainty, such as the lifetime of the wind turbine, the maintenance cost of the diesel generator, the long-term average wind speed, and even the average electrical load.A sensitivity analysis can assist researchers in determining the effect of input changes on the behavior, feasibility, and economics of a specific configuration.
One of the primary applications of sensitivity analysis is addressing uncertainty.Sensitivity has applications beyond uncertainty management.Regarding the sensitivity variables, three values of consumption load, four values of horizontal radiation, three values of average wind speed, two values of the price of diesel fuel, two values of the lifespan of the photovoltaic system, three values of the height of the wind tower, and two values in relation to the lifetime of the photovoltaic system were considered, and they were defined by the diesel generator's service life.However, in the majority of instances, noticeable and measurable modifications were made to the optimization outcomes.This outcome occurred due to the significant difference in NPC between the wind turbine and diesel generators, which stabilized the results.However, the variations in particular parameters had significant effects.
The small contribution of the wind turbine to the optimization results is odd.With a little reflection on the optimization results, it was determined that despite the lower initial investment cost of the wind turbine than the photovoltaic system, the high maintenance cost associated with wind turbines was the cause of this issue, thereby increasing the amount of NPC.In addition, the height of domestic wind turbines is considered to be 10 m.Using a turbine with a height of 40 m reduces the NPC of the diesel-wind arrangement, bringing it closer to the NPC of the diesel-photovoltaic configuration.Figure 11 demonstrates that by applying the sensitivity variables and adjusting the wind speed data to a wind turbine height of 30 m, this proportion increases to 37%.
Sustainability 2023, 15, x FOR PEER REVIEW 15 of 18 curred due to the significant difference in NPC between the wind turbine and diesel generators, which stabilized the results.However, the variations in particular parameters had significant effects.The small contribution of the wind turbine to the optimization results is odd.With a little reflection on the optimization results, it was determined that despite the lower initial investment cost of the wind turbine than the photovoltaic system, the high maintenance cost associated with wind turbines was the cause of this issue, thereby increasing the amount of NPC.In addition, the height of domestic wind turbines is considered to be 10 m.Using a turbine with a height of 40 m reduces the NPC of the diesel-wind arrangement, bringing it closer to the NPC of the diesel-photovoltaic configuration.Figure 11 demonstrates that by applying the sensitivity variables and adjusting the wind speed data to a wind turbine height of 30 m, this proportion increases to 37%.

Conclusions
Renewable fuels are infinite and can replace conventional fuels.However, intermittent and fragile renewable resources, like wind turbines and solar cells, cannot be used

Conclusions
Renewable fuels are infinite and can replace conventional fuels.However, intermittent and fragile renewable resources, like wind turbines and solar cells, cannot be used alone to generate electricity.Creating a durable and cost-effective hybrid system using energy sources and a supplementary unit can solve these problems.Combining a diesel generator with a hybrid system improves performance and lowers energy costs.This construction of an appropriate system that can adapt to varied climatic circumstances to obtain sustainable energy solutions in the current global environment benefits all nations.The main difficulty in every system is optimizing component dimensions to match objectives while minimizing investment and labor expenses.Integrating a diesel generator with a solar and wind system increases diesel fuel use and decreases the system's running expenses and carbon impact.
The present study aimed to assess the feasibility of utilizing small-scale hybrid energy systems to provide electricity to a greenhouse unit in Najran, Saudi Arabia.The technical, economic, and biological advantages of wind turbines, photovoltaic arrays, and diesel generators were evaluated using the Homer tool and the GWO algorithm.Different combinations of these energy sources were examined, with diesel generators accounting for 42% of energy production when combined with photovoltaic arrays, while photovoltaic arrays accounted for 58% of production.The combination of wind turbines and diesel generators was estimated to result in the generator contributing 77% of the energy and the wind turbine contributing 23% of the energy.The triple configuration of a diesel generator at 37%, photovoltaic arrays at 48%, and wind turbine at 15% was found to be comparable to the findings of Kansara et al. [49], concluding that wind and solar energy were more costeffective alternatives to a diesel generator.According to Seedahmed et al. [50], the sensitivity analysis and HOMER simulation of the hybrid off-grid system is the optimal choice in terms of both economic viability and environmental sustainability.This finding indicates a reduction of 13.84% in net current cost compared to units based on distributed generation, which is accompanied by a 64.2% decrease in pollutants and no unmet demand.The use of solar and wind energy systems was also consistent with current knowledge regarding the reduction in pollution.In terms of emissions reduction, the triple mode of diesel generator-photovoltaic-wind power generation took precedence over using a single diesel generator.The return on investment index, which is a crucial parameter in the feasibility study, was employed to determine the investment return period.The diesel generator had an index of 3.4 years, while the diesel-photovoltaic generator configuration had an index of 2.5 years, ranking it as the most favorable option due to its higher renewable energy percentage.Furthermore, the return on the investment index for the triple configuration was approximately 2.65 years.

Figure 2 .
Figure 2. (a) Characteristics of electric power generation by the turbine.(b) Cost curve for the wind turbine.

Figure 2 .
Figure 2. (a) Characteristics of electric power generation by the turbine.(b) Cost curve for the wind turbine.

Figure 4 .Figure 4 .
Figure 4. Flowchart and hierarchical structure of wolves in optimization method.

Figure 5 .
Figure 5. Convergence of the objective function of the GWO algorithm.

Figure 5 .
Figure 5. Convergence of the objective function of the GWO algorithm.

Figure 7 .
Figure 7. NPC breakdown of diesel-generator scenario for GWO results.

Figure 7 .
Figure 7. NPC breakdown of diesel-generator scenario for GWO results.

Figure 8 .
Figure 8.(a) Power generation in each month of year, and (b) NPC breakdown for diesel-generatorphotovoltaic configuration for GWO results.

Figure 8 .
Figure 8.(a) Power generation in each month of year, and (b) NPC breakdown for diesel-generatorphotovoltaic configuration for GWO results.

Sustainability 2023 ,
15,  x FOR PEER REVIEW 13 of 18 depicted in Figure9a.In the meantime, the appropriate tower height has been determined.The NPC breakdown for diesel-generator-wind turbine configuration is shown in Figure9b.

Figure 9 .
Figure 9. (a) Power generation in each month of year, and (b) NPC breakdown for diesel-generatorwind turbine configuration of GWO results.

Figure 9 .
Figure 9. (a) Power generation in each month year, and (b) NPC breakdown for diesel-generatorwind turbine configuration of GWO results.

Figure 10 .
Figure 10.(a) Power generation in each month of year, and (b) NPC breakdown for diesel-generator-wind turbine-photovoltaic configuration for GWO results.

Figure 10 .
Figure 10.(a) Power generation in each month of year, and (b) NPC breakdown for diesel-generatorwind turbine-photovoltaic configuration for GWO results.

Figure 11 .
Figure 11.The results of the average monthly electricity power produced by the wind turbine diesel generator configuration (wind turbine height is 30 m).

Figure 11 .
Figure 11.The results of the average monthly electricity power produced by the wind turbine diesel generator configuration (wind turbine height is 30 m).

Table 1 .
Energy consumption of the studied greenhouse.

Table 1 .
Energy consumption of the studied greenhouse.

Table 1 .
Energy consumption of the studied greenhouse.

Table 5 .
Battery unit features.

Table 7 .
The hybrid system's numerical and optimization results.

Table 8 .
Pollution results of different configuration.