Optimization Model of Hybrid Renewable Energy Generation for Electric Bus Charging Stations

: This paper introduces a comprehensive approach for sizing grid-connected hybrid renewable energy systems tailored for electric bus fleet operations. The study involves two main steps. First, a mathematical model that optimizes the configuration of such systems by considering daily electric bus consumption, solar irradiance, wind speed, and biomass potential is formulated. The model utilizes Pareto frontier multi-objective optimization to minimize the net present cost, the cost of energy, and greenhouse gas emissions. Second, the model is rigorously applied and tested in a real-world case study in Fez, Morocco, using HOMER Pro; the case study centers on the daily energy requirements of the buses, estimated at 2.5 megawatt hours per day, with a peak demand of 345 kilowatts. Two scenarios are explored, revealing a discernible trade-off dilemma between the full hybrid renewable energy scenario (Scenario 1) and the grid-connected hybrid renewable energy scenario (Scenario 2). In Scenario 2, the grid-connected hybrid renewable energy system demonstrates a notable 42.8% reduction in the net present cost, totaling USD 984,624. Similarly, the levelized cost of energy experiences a significant decrease, reaching approximately 0.08 USD/kWh, marking a 38.1% reduction. However, this apparent economic advantage is juxtaposed with a critical consideration—an increase in greenhouse gas emissions from null to 330,418 kg/year.


Introduction
In the past few years, there has been a significant rise in worldwide awareness concerning climate change and sustainability.The escalation of global carbon emissions from 6 billion to 10 billion metric tons annually between 1990 and 2014 [1] has prompted extensive efforts to address and reduce the impacts of global warming on a global scale.These initiatives have been ongoing for decades and reached a milestone with the establishment of the Paris Agreement in 2015.However, the shift towards a sustainable, carbon-free economy encounters substantial challenges, especially for industries that have been deeply entrenched in fossil fuel dependency for over a century.
A notable sector in this context is transportation, contributing to 24% of global greenhouse gas emissions in 2020 [2].While public transport is generally viewed as a sustainable mode of mobility, transit bus fleets, in particular, have traditionally been dependent on diesel.To address this, public transport operators worldwide are progressively exploring a shift to electric buses.While the adoption of electric buses can lead to reduced gasoline and diesel consumption, resulting in a notable decrease in air pollution, the environmental challenges associated with charging these buses using grid-based thermal power generation remain similar to those of conventional buses.As a result, it may not lead to significant reductions in air pollution and related health concerns [3,4].In light of this context, two compelling pathways to amplify the environmental benefits of electric buses emerge.The initial approach envisions a comprehensive transformation of the national electricity production mix, requiring a deliberate reassessment and restructuring of the national energy grid.Conversely, the second pathway promotes a decentralized strategy, endorsing the inclusion of on-site renewable energy sources to energize the charging infrastructure for electric buses.This paper endeavors to unlock the full potential of the second pathway, meticulously investigating its feasibility, unveiling the manifold benefits, and exploring the positive consequences associated with generating on-site renewable energy for charging electric buses.
An optimization model for on-site renewable energy generation for electric buses is important.Inappropriate installation bus charging stations may cause significant power loss and may weaken the voltage profile [5][6][7], and power generation from renewable energies is uncertain and dynamic [8].In the related literature, in the absence of specific solutions for electric bus charging stations, Allouhi and Rehman [9] addressed these challenges in the context of electric vehicle charging stations.Their proposed solution involved the implementation of a grid-connected hybrid renewable energy system, comprising photovoltaic, wind, and battery components for on-site electricity generation at charging stations.They utilized the HOMER grid software for the optimization process.The optimal grid-connected system featured 107 kWp of photovoltaic (PV), 300 kW of wind, 12 batteries, and a 65 kW capacity inverter.The results indicated a minimum cost of energy (COE) of USD 0.0841 per kWh and minimum annual operating costs of USD 124,000.Likewise, Anoune et al. [10] dimensioned a hybrid PV-wind-grid system for an electric vehicle charging facility located in Rabat, Morocco, utilizing the TRNSYS package.Their suggested hybrid system configuration included 10 kWp of PV and a 1 kW wind turbine.The outcomes demonstrated an average electricity output of 11.3 MWh from PV and 1.1 MWh from the wind turbine, thus guaranteeing a total of 12.4 MWh of clean energy annually from renewable sources.Bastida-Molina et al. [11] devised a weighted multicriteria approach in HOMER grid software for devising the most appropriate configuration of hybrid renewable energy systems (comprising PV, wind, biomass, and battery) tailored to charging stations.They applied this method to a charging station located in Valencia, Spain, as a case study.In their analysis, the authors modeled the electricity demand for the electric vehicles at the designated charging station, revealing a peak load demand of 270 kW during the early morning hours (9 to 10 am) and early evening hours (9 to 10 pm).Their resource assessment indicated that solar PV and wind resources were well suited for this application, given an average daily solar irradiation of 5 kWh/m²/day and an average wind speed of 3.6 m/s at a height of 18 m.Biomass, on the other hand, was excluded, due to its high energy cost.Renewable energy sources met the electricity demands 41% of the time, offering cost-effective solutions, and backup systems such as batteries and grid connection were also considered.Indeed, a few more authors [12][13][14][15] have undertaken the modeling and optimization of hybrid renewable energy systems for electric vehicle charging stations.They commonly employed HOMER software and explored configurations that included PV-wind-battery or PV-wind-biomass-battery combinations.On the other hand, Gabbar and Siddique [16] proposed a nuclear-renewable hybrid energy system for fast charging stations.Using HOMER Pro software, the proposed system has a lower net present cost, cost of energy, and operation and maintenance cost than any hybrid renewable energy system while offering a theoretical null of GHG emissions and a higher return on investment.In conclusion, Table 1 consolidates the examined papers and adds more depth to the existing methods in the literature.

Reference Charging Stations
Hybrid Energy Systems Software/Method [9] Electric Vehicles PV-Wind-Battery-Grid HOMER Grid [10] PV-Wind-Grid TRNSYS [11] PV-Wind-Biomass-Battery HOMER Grid [12] PV-Wind Artificial Bee Colony Algorithm [13] PV-Wind-Grid HOMER Grid [14] PV-Wind-Battery HOMER Pro [15] PV-Battery-Grid HOMER Grid [16] PV-Wind-Nuclear HOMER Pro [17] PV-Wind-Battery The existing body of literature has predominantly focused on the dimensioning of hybrid renewable energy systems specifically tailored for electric vehicle charging stations.However, a notable void exists in the research landscape, as there has been a conspicuous absence of studies addressing the optimization of hybrid renewable energy systems for electric bus charging stations.This gap can be attributed to the scarcity of publicly available data pertaining to bus fleets and the intricate complexity involved in optimizing power loads.The optimal sizing of hybrid renewable energy systems within the context of bus charging stations necessitates a comprehensive data gathering process.This involves obtaining detailed information on the daily operations of public bus fleets, including factors such as the daily distance traveled and the corresponding engine types employed in these fleets.Subsequently, these acquired data are utilized to calculate the daily electricity requirements essential for powering public buses [4].This intricate process demands exhaustive data collection efforts and the utilization of sophisticated software packages capable of simulating the power needs of public buses, accounting for various influencing factors such as climate conditions, road traffic patterns, and approximate vehicle weight [4,7].Ultimately, based on the current state of knowledge, this paper stands as a pioneering contribution, being the first to address the sizing of grid-connected hybrid renewable energy systems specifically tailored for public buses.
This paper aims to introduce a comprehensive approach for sizing grid-connected hybrid renewable energy systems, encompassing solar, wind, biomass resources, and battery storage.The study unfolds in two key steps.Firstly, it formulates a comprehensive mathematical model designed to optimize the configuration of grid-connected hybrid renewable energy systems (PV-Wind-Biomass-Battery-Grid) specifically tailored for electric bus fleet operations.The mathematical model takes into account various factors, including daily electric bus consumption (considering bus fleets, engine types, distance traveled, etc.), solar irradiance, wind speed, and biomass potential.With the optimized sizing of photovoltaic, wind, and biomass components, the model calculates electricity production.Employing Pareto frontier multi-objective optimization, the mathematical model seeks to optimize the minimum net present cost, the cost of energy, and greenhouse gas emissions.Secondly, this model is rigorously applied and tested using a real-world case study in Fez, Morocco, facilitated by HOMER Pro.The outcomes of this study have the potential to offer valuable insights for nations aiming to harness the potential of hybrid renewable energy systems in order to lower the energy costs and reduce greenhouse gas emissions associated with public electric bus operations.

Materials and Methods
Within this section, an exposition of the methodologies and materials employed in this paper is presented.First, the mathematical model is intricately crafted, delineating its components into load assessment, renewable energy generation, electricity storage, and sizing.Subsequently, the effectiveness of the model is scrutinized through its application to a case study involving public buses in Fez, Morocco.The ensuing subsection furnishes essential materials and data essential for this analysis, prominently featuring pertinent information on the city's public buses, as well as data on solar potential, wind potential, and biomass potential.

Mathematical Modeling
As explained before, the following section will provide a detailed mathematical modelling of each of the components involved.

Load Assessment
The evaluation of electric bus loads encompasses both energy usage and emissions during the Well-to-Tank (WTT) phase, associated with electricity generation, and the electricity consumption during the Tank-to-Wheel (TTW) phase, associated with vehicle operation.According to El Hafdaoui et al. [4], electric buses exhibit no greenhouse gas (GHG) emissions during the vehicle operation phase, with emissions primarily tied to electricity generation.The model's sizing component optimizes hybrid renewable energy systems, aiming to minimize the net present cost, the cost of energy, and GHG emissions.Consequently, to reduce energy costs, emphasis is placed on minimizing energy consumption during the electricity generation phase (WTT) and minimizing greenhouse gas emissions in the electricity generation phase, leveraging hybrid renewable energy systems to reduce dependence on the grid.
El Hafdaoui et al. [3] provided a mathematical model that encompasses the energy usage and emissions during the electricity generation phase.Equation (1) reveals that the energy use in the electricity generation phase is the sum of generated electricity from fossil fuels, renewable energies, nuclear energy, and biomass.The electricity generated is computed in MJ, and it is assumed that the transportation of energy sources via trucks and ships is negligible when compared to other energy losses [22].The energy generated from fossil fuels is equal to heat values ℵ (in MJ/kg) multiplied by the required mass m, combustion efficiency α, share of fossil fuel x, and transmission efficiency tr.In renewable energies, the electricity generated depends on the electricity conversion efficiency of the technology β, share of renewable energy y, and transmission efficiency tr.In a similar fashion to fossil fuels, the electricity generated from biomass is equal to heat values ℶ (in MJ/kg) multiplied by the required mass m, combustion efficiency c, share of biomass z, and transmission efficiency tr.The heat value of fossil fuels, the combustion efficiencies, and the transmission efficiencies vary with each country's combustion data, energy pathway and electricity production data.Finally, the energy usage in the electricity generation E WTT EB is converted from MJ unit to kWh by multiplying the result by 3.6 kWh/MJ [3]. (1)  In summary, the environmental ramifications of electric buses across their entire life cycle, from well to tank, are encapsulated by (2).The parameters {a 1 , a 2 . . .a 14 } within the equation are contingent on variables such as vehicle technology, energy pathway, and electricity generation profile.These factors take into account diverse chemical processes encompassing distillation, hydrocracking, desulfurization, hydrogenation, evaporation, oxidation, combustion, endothermic reactions, and exothermic reactions.Additionally, the composition of C n H m varies based on the specific chemical reaction, and the potential outcomes are delineated in (3).
This assessment offers a comprehensive understanding of the environmental impact associated with these emissions.From the egalitarian viewpoint of Eco-Indicator 99, every emitting pollutant gas contributes to the degradation of ecosystem quality and human health by different weightings, as illustrated in Table 2. On the other hand, Equation (4) describes the electricity consumption during the Tank-to-Wheel phase.This equation explicates the energy consumption incurred while driving electric buses (in kWh), calculated by multiplying the distance traveled (d) by the bus energy efficiency per hundred kilometers driven (P C ).
Since the majority of countries continue to use fuel-based buses as of the present, the first step of this model is to determine the required electrical load that would result from transitioning from conventional ones to electric buses.

Renewable Energy Generation
It is crucial to delve into the mathematical modeling of the components comprising the hybrid renewable energy system to assess its performance under diverse scenarios.This section examines the essential components integral to these systems.The system model is crafted by considering solar, wind, and biomass as primary energy sources for electricity generation, leveraging their richness and abundance in the site.Additionally, a storage unit composed of second-life batteries is incorporated.Given the inclusion of both AC and DC generating sources, an AC-DC hybrid configuration has been selected, as depicted in Figure 1.Based on the literature, the power generated by a PV panel is given through (5), which is a function temperature and the irradiance of the site [24]. is the PV panel generation power at time t (in kWh), while  is the nominal power of the PV panel. is the efficiency of the PV panel. is the site solar irradiance, and  is the nominal solar irradiance. represents the rated coefficient of the PV panel. is the temperature of the PV panel at time t, and  is the temperature coefficient of the PV panel.
The previous equation computes the power generation of one photovoltaic panel; thus, for the computation of a PV module, Equation ( 6) depicts that the total power generated by all the PV panels  , (in kW) is equal to the multiplication of the power generation of PV panels  by the number of PV panels  .
The power generated by each wind turbine (WT), in kW, at hour t is determined by (7), a function reliant on wind speed and contingent upon the characteristics of the selected wind turbine [25]. is the rated power of the wind turbine generator. is the power coefficient of the wind turbine, and   s the air density, while  is the efficiency of the wind turbine. is the swept area of the rotor, and   is the hourly wind speed of the site at a specific height h. ,   are the rated, cut-in and cut-out wind speeds, respectively.Thus, the wind speed at various heights can be estimated as in (8) [26], where  is the regular wind speed in the site at height h1,  is the wind speed at required height h2, and  is the wind shear exponent.Ultimately, the power generated from the wind turbines, in kW, in the systems at time t is depicted as  in ( 9), given the power from one wind turbine   and the number of wind Based on the literature, the power generated by a PV panel is given through (5), which is a function temperature and the irradiance of the site [24].P PV is the PV panel generation power at time t (in kWh), while P PV nom is the nominal power of the PV panel.η PV is the efficiency of the PV panel.G site is the site solar irradiance, and G nom is the nominal solar irradiance.T rated represents the rated coefficient of the PV panel.T panel is the temperature of the PV panel at time t, and T coe f f is the temperature coefficient of the PV panel.
The previous equation computes the power generation of one photovoltaic panel; thus, for the computation of a PV module, Equation ( 6) depicts that the total power generated by all the PV panels P PV, total (in kW) is equal to the multiplication of the power generation of PV panels (P PV ) i by the number of PV panels N PV .
The power generated by each wind turbine (WT), in kW, at hour t is determined by (7), a function reliant on wind speed and contingent upon the characteristics of the selected wind turbine [25].P R is the rated power of the wind turbine generator.C p is the power coefficient of the wind turbine, and ρ Air is the air density, while η WT is the efficiency of the wind turbine.A WT is the swept area of the rotor, and v h (t) is the hourly wind speed of the site at a specific height h.v R , v Cut−In v Cut−out are the rated, cut-in and cut-out wind speeds, respectively.Thus, the wind speed at various heights can be estimated as in (8) [26], where v 1 is the regular wind speed in the site at height h 1 , v is the wind speed at required height h 2 , and ε is the wind shear exponent.Ultimately, the power generated from the wind turbines, in kW, in the systems at time t is depicted as P WT total in (9), given the power from one wind turbine P WT (t) and the number of wind turbines in the system N WT [27].Finally, P BM (t) in (10) represents the power generated from biomass plant [28].

Electricity Storage
In this present investigation, second-life batteries have been selected due to their cost effectiveness compared to new lithium-ion batteries.Additionally, these batteries are recognized for their environmental advantages, actively contributing to carbon footprint reduction and enhancing the availability of renewable energy.They serve as essential storage solutions to address the inherent variability in many suggested renewable energy sources.
To model such an electricity storage system, the initial step involves setting its capacity within the range of 75-80% [29].Hybrid renewable energy systems predominantly employ battery modeling based on the state of charge (SOC) [30], as depicted in Equation (11).
Here,E S represents the energy stored in a battery, E gen,t signifies the additional energy generated by all renewable sources at time t, η CC denotes the charging controller efficiency, and η CH represents battery charging efficiency.
Furthermore, Equation (12) outlines the scenario where the load demand surpasses the available energy generated, leading the battery to discharge energy into the system [31].In this equation, E bat stands for the energy stored (in kWh) in the battery at hour t, E bat (t − 1) represents the energy stored in the battery at hour t − 1, and E needed (t) indicates the energy required by the system at time t.
Finally, Equation ( 13) defines the battery state of charge, ensuring it adheres to the specified conditions of the minimum state of charge SOC min and the maximum state of charge SOC max .The minimum state of charge is articulated in Equation ( 14), incorporating the maximum permissible depth of discharge DOD and C b , the nominal capacity of the second-life battery set at 75% [27].
As the system comprises photovoltaic panels and batteries generating a DC output, while wind, biomass generation, and load operate on AC, the implementation of a bidirectional AC/DC converter becomes essential, as it helps convert the power between AC and DC as needed.The sizing of this converter is contingent upon the peak load demand [32], meaning that it needs to be appropriately be sized to handle the maximum load demand that the studied system may encounter during its operation.

Sizing and Optimization Criteria Modeling
The sizing model is designed to achieve optimization across three critical parameters: the minimum net present cost (NPC), the levelized cost of energy (LCOE), and greenhouse gas emissions (GHG).To attain this optimization, the model leverages Pareto frontier multi-objective optimization, a sophisticated approach that allows for the simultaneous consideration and exploration of trade-offs among these key objectives.By striving for a harmonious balance between minimizing costs, optimizing the levelized cost of energy, and mitigating greenhouse gas emissions, the model aims to yield an optimal system configuration that aligns with the economic and environmental sustainability goals.Finally, as explained before, in order to achieve these goals, the optimization is conducted through the HOMER PRO software, which gives the users the ability to look into all the possible solutions to the system configuration while taking into account all the simulation objectives.This helped in the current study to compare between all possible solutions that provide the electricity need required by the system while making sure it satisfies the conditions of minimizing the NPC, LCOE and GHG emissions using the Pareto front and manually choosing the best scenario depending on the needs.
The economic optimization of the model involves the simultaneous minimization of both the net present cost and the levelized cost of energy.The net present cost of the hybrid renewable energy system (HRES) is determined by calculating the disparity between the total costs and total revenues over the system's lifetime, as expressed in (15).The total cost encompasses the initial investment C HRES and the annual maintenance and operation costs M&O i .Conversely, the annual revenues generated by the system R i and the salvage value S HRES are factored into the system.The computation of the net present cost is performed while considering the capital recovery factor F CR , modeled as a function of the annual interest rate (γ) and year life (i) for a τ lifespan and is expressed as in (16).This comprehensive approach ensures a holistic evaluation of the economic viability of the hybrid renewable energy system, HRES = {PV, WT, BM, BT}.A quick note to highlight is that costs are represented with a negative sign, while revenues and the salvage value are denoted with a positive sign in the financial calculations.This helps maintain clarity and consistency in differentiating between inflows and outflows within the financial model.
The levelized cost of energy (LCOE) is a metric used to assess the lifetime cost of generating a unit of electricity from a particular energy source or power generation system.It represents the per-unit cost of electricity over the entire lifespan of the energy project, expressed in terms of a standardized unit such as dollars per kilowatt hour (USD/kWh) [33].The levelized cost of energy is expressed as in (17) and is the total cost NPC over the total hourly energy output E Gen (t).It is crucial to recognize that a standard year consists of 8760 h.
The environmental aspect of sizing the hybrid renewable energy system is crucial, as it quantifies the greenhouse gas (GHG) emissions stemming from this configuration.This measurement enables a comparison between the emissions produced and those associated with conventional electricity generation sources.In many cases, systems incorporating renewable energy sources exhibit minimal emissions during electricity generation.However, when these systems are interconnected with the main grid, there can be a notable release of CO 2e emissions.Consequently, in order to appropriately size a system that encompasses various configurations, ranging from entirely renewable energy sources to a blend of both Energies 2024, 17, 53 9 of 22 renewable energy and grid electricity generation for supplying the charging station, it becomes imperative to consider and evaluate the environmental impact comprehensively.Given the theoretical cleanliness of renewable energies and electric bus operations [3][4][5]34], the system's greenhouse gas emissions are anticipated to align with the greenhouse gas emissions associated with the grid, as in (18).

Case Study Data
The primary goal of this case study is to apply the innovative mathematical model in a real-world context and present a tangible application scenario.The software employed for this implementation is Homer Pro, chosen specifically for its suitability in addressing the unique requirements of the study.The case study focuses on electric buses operating in Fez, Morocco, utilizing the capabilities of Homer Pro to analyze and optimize the hybrid renewable energy system tailored to the specific demands and conditions of the transportation network in the province.Finally, the required data for the case study are bus load, renewable energy potential, renewable energy cost, and electricity price.

Bus Load
The study initiation involved the comprehensive collection of data pertaining to the daily bus fleets operating in the province of Fez, Morocco, where the predominant propulsion system has historically been fuel-based.The provinces covered in this extensive data gathering endeavor include the following cities: Moulay Yacoub, Sefrou, Fez, and New Fez.Referring to El Hafdaoui et al. [4], the compiled information reveals the existence of approximately 205 bus fleets, collectively traversing a noteworthy distance of 48,917 km per day throughout the province of Fez, as outlined in Table 3.The meticulous data collection process was facilitated through the utilization of intelligent transport systems, incorporating GPS technology and network infrastructure seamlessly integrated into urban buses.This successful integration was made feasible through contractual agreements established between the government and public transportation corporations, underscoring their joint commitment to enhancing passenger safety and ensuring the efficient acquisition of data for research purposes.Notably, the daily consumption patterns of electric buses in the region were computed, as detailed in [4], leveraging the equations presented in (1) and (4).

Renewable Energy Potential
The selected study area is located at 34.025 latitude, −5.000 longitude [35].The source is rich with natural resources, such as solar radiation, wind, and agricultural residues for biomass.
The solar radiation reaching the surface can be expressed through various metrics.Global horizontal irradiance quantifies the total shortwave radiation received from above by a surface positioned horizontally to the ground; this metric holds significant relevance for PV installations, as it encompasses both direct normal irradiance and diffuse horizontal irradiance.The annual average solar irradiation of the site has been extracted from the Homer Pro database.Figure 2 depicts the monthly average global horizontal solar irradiation in Fez.The results shows that the site is rich with solar potential, with an average of 4.97 kWh/m 2 /day.Wind speed measurements have been taken at potential bus charging stations and bus terminals, specifically at heights of 10 m and 50 m, as illustrated in Figure 3.As per the information provided by the EIA [36], suitable locations for wind turbines are characterized by an annual average wind speed of at least 4 m per second (m/s) for small wind turbines and 15.8 m/s for utility-scale turbines; ideal sites encompass elevated, smooth, and rounded hilltops, expansive open plains, bodies of water, and mountain gaps that effectively channel and intensify wind.Figure 3 provides wind speed data at 10 m height in Fez, ranging from 2.85 m/s to 3.87 m/s, and at 50 m height, ranging from 4.43 m/s to 5.58 m/s.The analysis concludes that, at the 10 m height, the wind speed falls short for optimal wind electricity generation in Fez.Therefore, a wind turbine with a height of 50 m is recommended to harness more favorable wind conditions.Wind speed measurements have been taken at potential bus charging stations and bus terminals, specifically at heights of 10 m and 50 m, as illustrated in Figure 3.As per the information provided by the EIA [36], suitable locations for wind turbines are characterized by an annual average wind speed of at least 4 m per second (m/s) for small wind turbines and 15.8 m/s for utility-scale turbines; ideal sites encompass elevated, smooth, and rounded hilltops, expansive open plains, bodies of water, and mountain gaps that effectively channel and intensify wind.Figure 3 provides wind speed data at 10 m height in Fez, ranging from 2.85 m/s to 3.87 m/s, and at 50 m height, ranging from 4.43 m/s to 5.58 m/s.The analysis concludes that, at the 10 m height, the wind speed falls short for optimal wind electricity generation in Fez.Therefore, a wind turbine with a height of 50 m is recommended to harness more favorable wind conditions.irradiation in Fez.The results shows that the site is rich with solar potential, with an average of 4.97 kWh/m 2 day.Wind speed measurements have been taken at potential bus charging stations and bus terminals, specifically at heights of 10 m and 50 m, as illustrated in Figure 3.As per the information provided by the EIA [36], suitable locations for wind turbines are characterized by an annual average wind speed of at least 4 m per second (m/s) for small wind turbines and 15.8 m/s for utility-scale turbines; ideal sites encompass elevated, smooth, and rounded hilltops, expansive open plains, bodies of water, and mountain gaps that effectively channel and intensify wind.Figure 3 provides wind speed data at 10 m height in Fez, ranging from 2.85 m/s to 3.87 m/s, and at 50 m height, ranging from 4.43 m/s to 5.58 m/s.The analysis concludes that, at the 10 m height, the wind speed falls short for optimal wind electricity generation in Fez.Therefore, a wind turbine with a height of 50 m is recommended to harness more favorable wind conditions.The assessment of biomass potential in Fez relies on the research conducted by Bendaoud et al. [37].Their findings indicate that the Fez-Meknes region is abundant in various forms of biomass and waste, including olive residues, vegetable waste, and wood.Table 4 quantifies the agricultural biomass, mainly olive residues, cereals, vegetable waste, legumes wastes, and woods, in the province of Fez.The study conducted by Bendaoud et al. [37] relied on official reports and documents from public institutions within the region.According to the gathered data, the annual quantity of waste generated in the Fez-Meknes region is estimated to be approximately 2,057,410 dry tons/year [37], with the yearly potential for olive residue in the city of Fez alone being around 9650 tons per year.The monthly availability of biomass resources in this area is illustrated in Figure 4.The assessment of biomass potential in Fez relies on the research conducted by Bendaoud et al. [37].Their findings indicate that the Fez-Meknes region is abundant in various forms of biomass and waste, including olive residues, vegetable waste, and wood.Table 4 quantifies the agricultural biomass, mainly olive residues, cereals, vegetable waste, legumes wastes, and woods, in the province of Fez.The study conducted by Bendaoud et al. [37] relied on official reports and documents from public institutions within the region.According to the gathered data, the annual quantity of waste generated in the Fez-Meknes region is estimated to be approximately 2,057,410 dry tons/year [37], with the yearly potential for olive residue in the city of Fez alone being around 9650 tons per year.The monthly availability of biomass resources in this area is illustrated in Figure 4.

Renewable Energy Costs
Required are the different costs of PV panels, wind turbines, and batteries in Morocco.The costs associated with the biomass plant are not presented, as they are intricately tied to the specific sizing and load requirements of the system.Due to this inherent variability, the primary cost input for biomass in Morocco within the Homer Pro software is exclusively the levelized cost of energy.This crucial parameter, previously calculated by Mana et al. [38], has been determined to be 1.7 USD/kWh.This approach ensures a more nuanced consideration of the dynamic factors influencing biomass plant costs, with a focus on the comprehensive and context-specific metric of the levelized cost of energy.
In the context of PV systems, a preference is given to monocrystalline panels, considering the solar irradiance data specific to Fez, their high efficiency, and their widespread

Renewable Energy Costs
Required are the different costs of PV panels, wind turbines, and batteries in Morocco.The costs associated with the biomass plant are not presented, as they are intricately tied to the specific sizing and load requirements of the system.Due to this inherent variability, the primary cost input for biomass in Morocco within the Homer Pro software is exclusively the levelized cost of energy.This crucial parameter, previously calculated by Mana et al. [38], has been determined to be 1.7 USD/kWh.This approach ensures a more nuanced consideration of the dynamic factors influencing biomass plant costs, with a focus on the comprehensive and context-specific metric of the levelized cost of energy.
In the context of PV systems, a preference is given to monocrystalline panels, considering the solar irradiance data specific to Fez, their high efficiency, and their widespread commercial availability in Morocco.The chosen PV configuration resulted from an exten-sive search across various studies providing cost-effective models.Ultimately, a genetic flat plate PV panel with a capacity of 1 kW was selected, and its specifications are outlined in Table 5.Just like the selection process for PV, choosing the appropriate wind turbine for this study involved an extensive review of several studies and market reports.These sources highlighted the variability in initial capital costs based on different regions and capacities.For this particular study, the capital cost is fixed at 1899.51 USD/kW, with replacement and operation and maintenance (O&M) costs set at approximately 80% and 3% of the capital cost, respectively [39].The hub height is intentionally kept variable to optimize its selection for our system.The specific input specifications for the wind turbine in the HOMER Pro software are detailed Table 6.Table 7 provides information on the cost and specifications of the Hoppecke 24 OPzS 3000 battery, chosen as a second-life battery for this system.Lastly, the capital cost of the converter is established at 263.82 USD/kW, with a replacement cost of 242.71 USD/kW [40].These details ensure a comprehensive overview of the components and costs associated with the wind turbine, battery, and converter in our study.

Electricity Prices
Electricity prices in Morocco exhibit variations based on the type of buildings, distinguishing between residential, commercial, and industrial establishments [41].Specifically, for industrial establishments, relevant to bus charging stations, the pricing fluctuates within the range of 0.07 to 0.14 USD/kWh.It is noteworthy that these rates are subject to seasonal variations and hourly fluctuations, as detailed in Table 8, reflecting the dynamic nature of electricity pricing influenced by different periods throughout the day and changing seasons.

Results and Discussion
The findings encapsulate both the daily energy demand profile and the various optimization scenarios designed for hybrid renewable energy systems specifically tailored to meet the requirements of the bus charging station in Fez.These results shed light on the dynamic interplay between energy needs and system optimization strategies, offering valuable insights into the feasibility and effectiveness of implementing hybrid renewable solutions for sustainable bus charging operations in the city.

Load Assessment
The study operates under the assumption of two terminals designated for electric buses within the province of Fez.Utilizing the daily consumption data outlined in Table 3, the load demand at each terminal is calculated to be 6.25 MWh/day.Additionally, a further assumption is made that no more than 40% of the total demand will be charged simultaneously.This consideration ensures a realistic evaluation of the load distribution and charging constraints at the designated terminals.
Examining the hourly load demand throughout the day in Fez reveals a peak demand of 314 kWh occurring at both 6 am and 5 pm.Conversely, the minimum load demand is observed around noon, as depicted in Figure 5.

Optimization Scenarios
In light of the hourly load demand, renewable energy potential, renewable energy costs, and electricity prices, the study optimizes the configuration of PV-Wind-Biomass-Battery-Grid.This optimization is achieved through a multi-objective Pareto frontier approach, focusing on minimizing the net present cost, the cost of energy, and greenhouse gas emissions simultaneously.
Within the simulation results, two primary scenarios are thoroughly assessed.Scenario 1 considers the provision of renewable energy systems exclusively for the bus charging station.In contrast, Scenario 2 envisions a grid-connected hybrid renewable energy system.The evaluation involves the computation and comparison of the net present cost, the levelized cost of energy, and the greenhouse gas emissions for both scenarios.This comparative analysis provides valuable insights into the economic and environmental performance of the optimized configurations under different supply scenarios.

Scenario 1-Fully Hybrid Renewable Energy System
The configuration in Scenario 1 consists of a fully hybrid renewable system to meet the load demand in the bus charging station.In this scenario, the hourly electricity production (in kWh) was simulated using Homer Pro, incorporating the previously mentioned inputs and multi-objectives of the study.Figure 6 illustrates the simulation results, highlighting the complete absence of biomass in this scenario due to its comparatively high levelized cost of energy and elevated greenhouse gas emissions when juxtaposed with other renewable energy sources.Furthermore, the results showcase the predominant role of PV electricity generation, accounting for 75% of the total generation during daylight hours.In contrast, wind turbines come into operation during the nighttime, ensuring a continuous energy supply and contributing to the overall system resilience.This nuanced understanding of the energy generation patterns underpins the effectiveness and dynamics of the fully hybrid renewable system in Scenario 1.

Optimization Scenarios
In light of the hourly load demand, renewable energy potential, renewable energy costs, and electricity prices, the study optimizes the configuration of PV-Wind-Biomass-Battery-Grid.This optimization is achieved through a multi-objective Pareto frontier approach, focusing on minimizing the net present cost, the cost of energy, and greenhouse gas emissions simultaneously.
Within the simulation results, two primary scenarios are thoroughly assessed.Scenario 1 considers the provision of renewable energy systems exclusively for the bus charging station.In contrast, Scenario 2 envisions a grid-connected hybrid renewable energy system.The evaluation involves the computation and comparison of the net present cost, the levelized cost of energy, and the greenhouse gas emissions for both scenarios.This comparative analysis provides valuable insights into the economic and environmental performance of the optimized configurations under different supply scenarios.

Scenario 1-Fully Hybrid Renewable Energy System
The configuration in Scenario 1 consists of a fully hybrid renewable system to meet the load demand in the bus charging station.In this scenario, the hourly electricity production (in kWh) was simulated using Homer Pro, incorporating the previously mentioned inputs and multi-objectives of the study.Figure 6 illustrates the simulation results, highlighting the complete absence of biomass in this scenario due to its comparatively high levelized cost of energy and elevated greenhouse gas emissions when juxtaposed with other renewable energy sources.Furthermore, the results showcase the predominant role of PV electricity generation, accounting for 75% of the total generation during daylight hours.In contrast, wind turbines come into operation during the nighttime, ensuring a continuous energy supply and contributing to the overall system resilience.This nuanced understanding of the energy generation patterns underpins the effectiveness and dynamics of the fully hybrid renewable system in Scenario 1.In Scenario 1, Homer Pro recommends a PV system with a capacity of 656 kW and a wind turbine system with a capacity of 7 kW.With the absence of biomass in this configuration, the annual production of the PV-Wind-Battery system is determined to be 1,468,947 kWh/year.The contribution from the PV system accounts for approximately 74.3%, while the remaining portion is supplied by the wind turbines.However, there is an unmet load of around 22,344 kWh/year, representing the annual electrical load that remains unserved, due to insufficient generation from the renewable energy system.This shortfall is attributed to the timing mismatch and intermittency of these renewable sources, indicating that the renewable energy system does not entirely meet the charging station's needs.
Furthermore, it is noteworthy that the system's minimum net present cost (NPC) is USD 1.52 million, with a levelized cost of energy (LCOE) of 0.123 USD/kWh.While this may not be the most optimal solution from a cost perspective, it emerges as the optimal choice from an environmental standpoint, emitting approximately 0 kg/year of greenhouse gases.The resulting values of NPC, LCOE, and GHG emissions are gathered in Table 9.The configuration in Scenario 2 consists of a grid-connected hybrid renewable system to meet the load demand in the bus charging station.In this scenario, the hourly electricity production (in kWh) were simulated using Homer Pro, incorporating the previously mentioned inputs and multi-objectives of the study.In addition to the input data of renewable energies, this scenario requires further data about electricity prices (discussed in Section 2.2.4), the national electricity production mix, and the grid emissions per kWh generated.
As of 2022, the electricity production mix in Morocco comprises 54% coal, 12% natural gas, 10% oil, 5% solar energy, 13% wind energy, and 4% hydropower [42].In relation In Scenario 1, Homer Pro recommends a PV system with a capacity of 656 kW and a turbine system with a capacity of 7 kW.With the absence of biomass in this configuration, the annual production of the PV-Wind-Battery system is determined to be 1,468,947 kWh/year.The contribution from the PV system accounts for approximately 74.3%, while the remaining portion is supplied by the wind turbines.However, there is an unmet load of around 22,344 kWh/year, representing the annual electrical load that remains unserved, due to insufficient generation from the renewable energy system.This shortfall is attributed to the timing mismatch and intermittency of these renewable sources, indicating that the renewable energy system does not entirely meet the charging station's needs.
Furthermore, it is noteworthy that the system's minimum net present cost (NPC) is USD 1.52 million, with a levelized cost of energy (LCOE) of 0.123 USD/kWh.While this may not be the most optimal solution from a cost perspective, it emerges as the optimal choice from an environmental standpoint, emitting approximately 0 kg/year of greenhouse gases.The resulting values of NPC, LCOE, and GHG emissions are gathered in Table 9.The configuration in Scenario 2 consists of a grid-connected hybrid renewable system to meet the load demand in the bus charging station.In this scenario, the hourly electricity production (in kWh) were simulated using Homer Pro, incorporating the previously mentioned inputs and multi-objectives of the study.In addition to the input data of renewable energies, this scenario requires further data about electricity prices (discussed in Section 2.2.4), the national electricity production mix, and the grid emissions per kWh generated.
As of 2022, the electricity production mix in Morocco comprises 54% coal, 12% natural gas, 10% oil, 5% solar energy, 13% wind energy, and 4% hydropower [42].In relation to grid electricity, Table 10 consolidates data on heat values, required masses, and combustion efficiencies of fossil fuels in Morocco, along with conversion efficiencies of renewable energies.This information is essential for estimating the greenhouse gas emissions associated with the grid, particularly in the absence of precise data on the emission factor in Morocco.Finally, Homer Pro displays an approximate emission factor of 0.571 kg of CO 2e per kWh of electricity generated.Figure 7 illustrates the hourly electricity power (in MW) of the PV-Wind-Grid-Battery configuration.Notably, the figure underscores the substantial contribution of renewable energies, constituting more than 62% of the total generation.These outcomes lead to a determination of the optimal rated capacity for the PV system at 314 kW, generating a total of 503,952 kWh/year.Additionally, this configuration calls for the incorporation of two EO20 wind turbines, contributing 11.7% to the overall production.However, there remains an unmet electricity demand of 398,045 kWh/year during off-peak hours.To fulfill this requirement, the system is designed to purchase electricity from the grid at half the price of peak hours, with the surplus energy being stored in batteries for subsequent use.This strategic approach aims to balance the energy needs efficiently, optimizing costs, reducing GHG emissions, and enhancing the overall reliability of the system.
In addition to completely satisfying the annual energy requirements of the charging station, this model generates an excess power of 78,726 kWh/year due to lower demand during certain periods.This surplus energy is efficiently stored in the batteries and is subsequently utilized for charging buses.Rohit and Subhes [43] have highlighted two potential benefits of this surplus energy generation.Firstly, it enhances the system's capability to accommodate the anticipated growth in load demand in the future.Secondly, by increasing the load factor, there is potential for a reduction in the levelized cost of energy, contributing to greater cost effectiveness and sustainability of the overall energy system.Furthermore, as indicated in Table 11, the PV-Wind-Biomass-Battery-Grid co ration in Scenario 2 demonstrates a lower net present cost and a reduced levelized energy while exhibiting higher greenhouse gas emissions.Specifically, the net prese of the grid-connected hybrid renewable energy system is USD 984,624, representing table reduction of 42.8%.The levelized cost of energy has also seen a decrease, rea approximately 0.08 USD/kWh, reflecting a 38.1% reduction.However, it is crucial t that greenhouse gas emissions have increased from null to 330,418 kg/year, unders the trade-off between economic and environmental considerations in this particula figuration.

Summary of Results
The findings of the study reveal that biomass does not present a viable contri to a hybrid renewable energy system designed for an electric bus charging station conclusion is drawn based on its high net present cost, elevated levelized cost, and icantly higher greenhouse gas emissions when compared to other renewable e sources.The economic and environmental drawbacks associated with biomass mak impractical choice for the envisioned application.
Moreover, the analysis introduces a discernible trade-off dilemma between tw narios: the fully hybrid renewable energy scenario (Scenario 1) and the grid-conn hybrid renewable energy scenario (Scenario 2).In Scenario 2, the grid-connected h renewable energy system demonstrates a noteworthy reduction of 42.8% in the ne sent cost, amounting to USD 984,624.Similarly, the levelized cost of energy experie significant decrease, reaching approximately 0.08 USD/kWh, marking a 38.1% redu Furthermore, as indicated in Table 11, the PV-Wind-Biomass-Battery-Grid configuration in Scenario 2 demonstrates a lower net present cost and a reduced levelized cost of energy while exhibiting higher greenhouse gas emissions.Specifically, the net present cost of the grid-connected hybrid renewable energy system is USD 984,624, representing a notable reduction of 42.8%.The levelized cost of energy has also seen a decrease, reaching approximately 0.08 USD/kWh, reflecting a 38.1% reduction.However, it is crucial to note that greenhouse gas emissions have increased from null to 330,418 kg/year, underscoring the trade-off between economic and environmental considerations in this particular configuration.

Summary of Results
The findings of the study reveal that biomass does not present a viable contribution to a hybrid renewable energy system designed for an electric bus charging station.This conclusion is drawn based on its high net present cost, elevated levelized cost, and significantly higher greenhouse gas emissions when compared to other renewable energy sources.The economic and environmental drawbacks associated with biomass make it an impractical choice for the envisioned application.
Moreover, the analysis introduces a discernible trade-off dilemma between two scenarios: the fully hybrid renewable energy scenario (Scenario 1) and the grid-connected hybrid renewable energy scenario (Scenario 2).In Scenario 2, the grid-connected hybrid renewable energy system demonstrates a noteworthy reduction of 42.8% in the net present cost, amounting to USD 984,624.Similarly, the levelized cost of energy experiences a significant decrease, reaching approximately 0.08 USD/kWh, marking a 38.1% reduction.However, this apparent economic advantage is juxtaposed with a crucial consideration-an increase in greenhouse gas emissions from null to 330,418 kg/year.This juxtaposition underscores the complex trade-off between economic and environmental considerations inherent in the configuration of the hybrid renewable energy system.While Scenario 2 offers substantial economic benefits, the environmental cost, as reflected in heightened greenhouse gas emissions, needs to be carefully weighed and addressed.This nuanced analysis underscores the importance of holistic decision making in designing sustainable energy solutions for specific applications.

Conclusions
In conclusion, the imperative need to address environmental pollution, rising oil prices, and the reduction in fossil fuel consumption has led to a global shift towards electric buses as a more sustainable mode of public transportation.While electric buses offer the potential for reduced air pollution and the mitigation of health concerns, there is a challenge to power these vehicles using grid-based thermal power generation.This concern has necessitated the exploration of on-site renewable energy generation as a solution, setting the stage for the research presented in this paper.
This study focuses on developing a comprehensive model for sizing grid-connected hybrid renewable energy systems, incorporating solar, wind, biomass, and battery storage for electric bus charging stations.The innovative approach, grounded in mathematical models and implemented through Pareto frontier multi-objective optimization, aims to minimize the net present cost, the cost of energy, and greenhouse gas emissions.The practical application of this model is demonstrated through a real-world case study in Fez, Morocco, using HOMER Pro for rigorous testing and validation.
The findings emphasize that biomass is not a practical choice for contributing to a hybrid renewable energy system designed for electric bus charging stations, due to its high net present cost, elevated levelized cost, and significantly higher greenhouse gas emissions compared to other renewable sources.The analysis introduces a trade-off dilemma between two scenarios: a fully hybrid renewable energy setup (Scenario 1) and a grid-connected hybrid renewable energy system (Scenario 2).While Scenario 2 showcases a substantial 42.8% reduction in net present cost (USD 984,624) and a 38.1% decrease in levelized cost of energy (0.08 USD/kWh), it comes at the expense of a notable increase in greenhouse gas emissions from null to 330,418 kg/year.This juxtaposition underscores the intricate balance between economic and environmental considerations, emphasizing the need for holistic decision making in designing sustainable energy solutions.
The study is subject to four key limitations rooted in certain assumptions within the case study.Firstly, the analysis does not account for charger powers and charging times, thereby omitting potential variations in the charging infrastructure's capabilities.Secondly, the study assumes a complete recharge of electric buses upon discharge, neglecting the possibility of employing battery-swapping methods for recharging.Thirdly, the research is based on two bus terminals in the province of Fez, potentially limiting its generalizability to other regions with varying terminal configurations.Cities or provinces with a single bus terminal may require additional renewable energy power considerations.Lastly, the study assumes that less than 40% of bus fleets are charged simultaneously, though real-world scenarios may necessitate a higher power demand, particularly in cases where a larger fleet requires simultaneous charging.These limitations highlight the need for cautious interpretation and potential adaptations of the model in different contexts.
The limitations identified in this study underscore the importance of accounting for diverse operational scenarios in future research endeavors.It is crucial for future studies to thoroughly explore the capabilities of battery-swapping mechanisms for swift bus recharging.Furthermore, the implementation of a schedule management system is essential to mitigate simultaneous power demand peaks during battery charging cycles.Another prospective avenue for investigation is the integration of solar-integrated electric buses into the grid-connected scenario, aiming to enhance range autonomy.Additionally, a valuable aspect for future exploration involves studying the feasibility and implications of incorporating small nuclear powerplants for electric bus charging as an alternative to the conventional grid.This broader scope of research will contribute to a more comprehensive understanding of the potential solutions and optimizations available for sustainable and efficient electric bus systems.

Energies 2023 , 22 Figure 1 .
Figure 1.The proposed charging station configuration of hybrid renewable energy system.

Figure 1 .
Figure 1.The proposed charging station configuration of hybrid renewable energy system.

Energies 2024 ,
17, 53   irradiation in Fez.The results shows that the site is rich with solar potential, with an average of 4.97 kWh/m 2 day.

Figure 3 .
Figure 3. Average monthly wind speed data for Fez site.

Figure 3 .
Figure 3. Average monthly wind speed data for Fez site.

Figure 5 .
Figure 5. Daily load demand of the bus charging station.

Figure 5 .
Figure 5. Daily load demand of the bus charging station.

Figure 6 .
Figure 6.Hourly electricity production of PV-Wind configuration under Scenario 1.

Figure 6 .
Figure 6.Hourly electricity production of PV-Wind configuration under Scenario 1.

Figure 7 .
Figure 7. Hourly power need of PV-Wind-Grid configuration under Scenario 2.

Figure 7 .
Figure 7. Hourly power need of PV-Wind-Grid configuration under Scenario 2.

Table 1 .
Summary of Literature Review.

Table 3 .
Daily consumption of buses in the province of Fez.

Table 5 .
Specifications and costs of monocrystalline PV panel.

Table 6 .
Specifications and costs of the wind turbine (EO20).

Table 7 .
Specifications and costs of the battery.

Table 11 .
Comparison of resulting values for both Scenario 1 and Scenario 2.

Table 11 .
Comparison of resulting values for both Scenario 1 and Scenario 2.
v h (t) Hourly wind speed of the site at a specific height h (m/s) v R Rated wind speed (m/s) v Cut−In Cut-in wind speeds (m/s) v Cut−out Cut-out wind speeds (m/s) v 1 Regular wind speed in the site at height h1 (m/s) v Wind speed at required height h2 (m/s) Extra energy generated by all the renewable sources at time t (kWh) η CC Charging controller efficiency η CH Battery charging efficiency E bat Energy stored in battery at hour t (kWh) E bat (t − 1) Energy stored in battery at hour t − 1 (kWh) E needed (t) Energy needed by the system at time t (kWh)