Design , Analysis and Optimization of a Hybrid Microgrid System Using HOMER Software : Eski ş ehir Osmangazi University Example

This study presents design, performance analysis, and optimization of a hybrid microgrid for the hospital complex located on Eskişehir Osmangazi University (ESOGU) campus using Hybrid Optimization of Multiple Energy Resources (HOMER) software. Solar energy potential of the campus and the real electricity consumption of the hospital collected over one-year period were used in the design of the microgrid. The optimization takes into account the overall performance and the economic feasibility of the microgrid system over its lifetime. The designed microgrid consisting of photovoltaic (PV) modules, diesel generators, batteries, converters, and loads is configured as a grid-connected hybrid system. In order to optimize the system, PV module failures, increase in demand, increase in fuel cost of diesel generators, and mains interruptions are defined as performance variables and realistically modelled in the HOMER simulation. Later, both the individual and the combined effects of these variables on the performance of the microgrid was investigated via simulation using five operating scenarios. The objective was to obtain reliable data from the microgrid design that reflects the realistic operation of microgrid over its 25-years of service time. Simulation results have shown that the economic feasibility and the performance of the microgrid are greatly affected by these factors. For example, in a worst case scenario where all variables are acting together, net present cost increases to 40.44%, cost of energy increases to 21.92%, and operating cost rises to 53.91%. Moreover, the results show a reduction up to 33.30% in the portion of energy that is directly transferred from renewable sources to the load. The simulation results were then used to optimize the design of the microgrid system for the best overall performance. In conclusion, it was demonstrated that the proposed hybrid microgrid system supplies the energy demand of the hospital, lowers the cost of electricity consumption, provides a reasonable payback time, and the best of all, it contributes to the clean campus concept. ©2019. CBIORE-IJRED. All rights reserved


Introduction
The effective use of renewable energy sources and utilizing their potential in the best way in electric energy generation applications for medium and long-term energy plans and goals is one of the critical issues of today's energy sector.For this reason, the concept of microgrid, which consists of renewable energy sources, distributed generation units, energy storage units, and loads, has become a new kind of solution to the energy generation problem.These systems can work in connection with the grid, as well as in local and remote areas independent of the grid.Microgrid systems have many advantages over the conventional large-scale power systems.In classical electric energy market, individuals can take place only as consumers.Through the deployment of microgrids, individuals can now take place in energy market both as consumers and as producers (Mengelkamp et al. 2018, Koltsaklis et al. 2018, Boudoudouh et al. 2018, Çetinbaş et al. 2017).
In the classical energy networks, the production of electricity generated by non-renewable sources is centralized and the energy transmission is carried out with high voltage transmission lines from the long distances.On the contrary, in microgrids, the principle of on-site production and on-site consumption is adopted with the use of distributed generations.With this strategy, one or more renewable energy sources can be included in the energy production process effectively.In addition to the advantage of the combined use of these resources, regional geographical potential such as solar and wind energy can be utilized.Therefore, the use of renewable energy sources with microgrids becomes practical and feasible.Thus, carbon dioxide emission is reduced, transmission and distribution losses are reduced as the generation is done locally and very close to the load, reliable energy is supplied to the loads, and microgrids with a structure that is open to development offer a flexible power system (Hirsch et al. 2018, Milis et al. 2018).
Microgrids can be classified into three categories according to their topological structures: alternating current (AC), direct current (DC), and hybrid.From the point of view of conventional power system network; microgrids are acting as a single and independent controllable structures and connected to the existing power system network through the common connection point.Among the three topologies, the AC microgrids are the most used one in applications.In this topology, DC generators such as PV power sources and energy storage units like batteries are connected to the AC bus via a bidirectional power electronic converter such as DC/AC inverters.PV sources and batteries produce DC power and some loads are operated directly with DC power as well.The direct connection of such components to a DC bus offer many advantages, but it is only possible in DC microgrids.Yet, there is still a need for an interface such as a DC/DC converter.However, the design and use of DC/DC converters are much simpler than DC/AC inverters.Therefore, the elimination of inverters is the main advantage of the DC microgrid structure.Microgrids in which the AC and DC buses are used together are called hybrid microgrids and have many advantages over other topologies.In a hybrid microgrid, the power components and loads are more easily integrated into appropriate busbars according to production and consumption types.In addition, both energy losses and cost are reduced by decreasing the number of converters used (Justo et al. 2013, Unamuno et al. 2015).
Microgrid technology provides significant environmental, economic and technical benefits to the society.Therefore, the optimal approaches in the design of microgrids are important to obtain these benefits.These benefits can be achieved by the right choice of microgrid technologies, the proper selection of the grid components, and the optimal sizing of these components based on the load characteristics.Specifically, determination of optimum capacity for the energy storage units in a microgrid is one of the important design steps.Energy storage for a microgrid using renewable energy sources that cannot generate continuous energy is required to maintain energy continuity.Energy is stored when production is more than consumption.In case the renewable energy sources cannot meet the demand, the storage unit supplies energy to the microgrid.In addition to optimal sizing of energy storage units, one or more resources can be used together with optimal planning and operation approach.Thus, renewable and nonrenewable energy sources can be used together, variable energy produced according to variable meteorological conditions are used daily, operation cost is reduced and energy quality is increased.
There are many computer aided design methods to analyze and evaluate microgrids.Among these programs, HOMER is one of the popular computer software that is effectively used to develop the models of the power systems for economic and technical analysis; it also allows comparison of different designs.The analysis of a microgrid that can be classified as a grid tied or a grid independent type in HOMER is performed in three stages defined as simulation, optimization, and sensitivity analysis.After going through these three stages, HOMER produces the technical and economic analysis of microgrids with great accuracy (https://www.homerenergy.com/products/pro/docs/3.12/in dex.html).
Many studies have been done and reported in recent literature about the evaluation and the analysis of microgrids.Çetinbaş et al. proposed and designed an AC microgrid for a section of the Eskisehir Osmangazi University campus.The objective was to reduce the total electricity energy consumption cost using an optimal energy management strategy.The system is modelled, designed, and simulated in MATLAB (Çetinbaş et al. 2017).Zahboune et al. designed a hybrid power generation system operating in island mode consisting of solar energy, wind energy, batteries, and loads based on the Modified Electric System Cascade Analysis method.The results obtained from this method and the results obtained from the HOMER software for the same application were compared, and it was seen that both methods and tools had achieved the optimal solution successfully (Zahboune et al. 2016).Halabi et al. modelled two decentralized power generation plants in Malaysia using the HOMER software, where the various combinations of PV generation systems, diesel generators, energy storage units, and converters are utilized.The simulation results for various scenarios are compared.In addition, the optimum scenarios are evaluated in terms of technical performance and economic benefit (Halabi et al. 2017).Rajbongshi et al. designed a hybrid power generation system consisting of a PV power system, a biomass gasifier, a diesel generator, and the electric grid.Using the HOMER simulator, the hybrid system is evaluated for various load levels in grid connected and grid independent modes in order to investigate for the most optimum system configuration (Rajbongshi et al. 2017).Shahzad et al. proposed a grid independent hybrid energy system that combines PV power system and biomass for an agricultural farm and a residential community in Pakistan.Similarly, the HOMER software is used to evaluate system (Shahzad et al. 2017).Çetinbaş et al. have designed a hybrid microgrid consisting of PV power, battery, and load components for the hospital complex located on Eskişehir Osmangazi University Campus, Eskişehir, Turkey.The optimum PV, diesel generator and converter power, and the battery capacities required for this complex are determined by using real electricity energy consumption data collected for over one-year period.The results of evaluation demonstrated that the proposed microgrid lowers the cost of electricity, increases reliability, and provides high quality power to the hospital complex by promoting the use of renewables (Çetinbaş et al. 2018).
This study is the extension of the work presented in (Çetinbaş et al. 2018).Similarly, in this study, the design of the proposed hybrid microgrid and the evaluation of the design including its optimization, technical, and economic analyses are also done using the HOMER software.However, this study performs the optimization under more realistic conditions by taking many variables into consideration.Otherwise a microgrid designed with ideal conditions cannot predict future, meet the overall performance criteria, and economic benefits over its service life.Therefore, PV module failures, increase in demand, grid interruptions, and the increase of the fuel cost of diesel generators are determined as the variables that affect the performance of a microgrid.The impact of these variables to the performance of the microgrid over the life of the project was examined in the basic system by one by.Later, all variables were applied to the basic system and their combined effects are compared.Finally, a microgrid system that meets the design specifications throughout its service life is achieved.
The study is organized in three subsections.In Materials and Methods section, the design objective, the design and optimization process of hybrid microgrid are explained.In Results and Discussions section, the effects performance variables to the microgrid project throughout its lifetime were analyzed under different scenarios that likely to happen in real life.In the last section, the performance of the microgrid is evaluated in terms of technical and economic aspects.

Materials and Methods
In this study, a hybrid microgrid was designed for the hospital complex located on ESOGU campus.The objective of this microgrid design is to reduce the electricity consumption cost of the hospital and to ensure energy continuity.However, it is very difficult to predict at what rate the proposed microgrid concept designed under the current and relatively ideal conditions will be able to provide the desired working conditions for 25 years, which is the expected lifetime of the project.In practical life, there are several factors that may have significant negative affect on the performance of the system.These factors, which we call them as performance variables, are aging of PV modules, increase in demand over years, frequency and severity of grid interruptions, and change of diesel fuel cost, we assume that fuel cost cannot stay constant but increases on yearly basis.Hence, it is very important to examine and determine the effects of these variables.Only after an analysis of all of these variables together, it can be concluded that our design can meet the objectives even after 25 years of operation.The process of evaluating such a system today over the life of the project is a difficult problem as it involves the need to evaluate many variables and effects together.Today, nevertheless, there are softwares such as HOMER that can do such analyzes with great accuracy and reliability.Using HOMER, the 25-year usefulness analysis of the microgrid that we are proposing for the ESOGU hospital complex has been done and examined under different scenarios.This section is followed by four subsections as follows: description of HOMER software, hybrid microgrid design, criteria for optimization evaluation, and finally microgrid optimization step.

HOMER Program
HOMER software was developed by the U.S. National Renewable Energy Laboratory.HOMER, which is a computer model, is used in a combination of different technologies and applications as production, storage and load.Micropower systems with or without grid connection can be designed.Throughout the project life cycle, it takes many cost related items such as investment cost, replacement and operation cost into consideration, and it allows to evaluate and compare the advantages and disadvantages of technical and economic aspects of the projects.A design process with HOMER is carried out in three stages as simulation, optimization and sensitivity analysis.In the first stage, which is simulation, the technical analysis and cost evaluation of the micropower system are performed.After the simulation phase, optimization is started.At this stage, various system configurations are modeled and factors such as the components of the micropower system and the sizing of these components are evaluated and determined in terms of the lowest cost.A quite long simulation times can be successfully handled with HOMER.Using this feature of HOMER in the last stage of sensitivity analysis, the variables and uncertainties that the designer cannot control in the long run are modeled (https://www.homerenergy.com/products/pro/docs/3.12/in dex.html).

Design of Hybrid Microgrid
This section explains the development, design and the optimization steps of the proposed microgrid for the hospital complex located on ESOGU campus.The microgrid, which is configured as hybrid structure, is shown in Figure 1.In this hybrid microgrid structure, the loads and the main grid are connected to the AC bus.A PV power system and an energy storage unit is connected to the DC bus.A bidirectional power converter ties the DC bus to the AC bus for bidirectional energy transfer.There are currently no loads supplied by the DC bus, but some loads such as the UPSs used in the hospital can be connected this bus in future.
Table 1 gives the list of parameters for each component of hybrid microgrid used in the design.Energy purchase and sales prices for microgrid, brand, model, power, capital, replacement, operation and maintenance (O&M) costs of PV, diesel generator, battery and converter and the necessary parameters for simulation are shown in Table 1.The hybrid microgrid under evaluation consist of mains, PV power system, battery energy storage unit, diesel generator, converter and load components.These components are described in the sub-headings below in the listed order.

Ø Mains
The load group of the hybrid microgrid consists of the hospital complex.Hospital is considered as the critical load, so the energy must be continuously supplied to the emergency department, operating rooms, laboratories, intensive care rooms, and so on.A tie connection from microgrid to local electric network is preserved to charge batteries and sell the excess energy back to grid.The price of energy coming from the local grid to the microgrid was realized as $ 0.0770 / kWh, and the sale price of energy from the microgrid back to the grid was at a fixed price of $ 0.0520 / kWh.The calculations are all made based on the flat rate electricity price tariff.

Ø PV power system
Solar radiation is converted into DC electrical energy by PV modules.The variation of the output power produced from PV modules is determined using Equation 1.The output power of a PV module depends on many parameters such as the type of cell structure, nominal power of the panel, derating factor, solar radiation, cell temperature, temperature coefficient, meteorological conditions at the panel location, and environmental conditions (Garni et al. 2018, Jatoi et al. 2018). (1) where: • YPV is the rated capacity of the PV array, meaning its power output under standard test conditions (kW), • fPV is the PV derating factor (%), is the solar radiation incident on the PV array in the current time step (kW/m 2 ), • is the incident radiation at standard test conditions (1 kW/m 2 ), • aP is the temperature coefficient of power (%/°C),

•
TC is the PV cell temperature in the current time step (°C), • TC,STC is the PV cell temperature under standard test conditions (25°C).
Flat plate PV modules from Jinko Solar is selected for the hybrid microgrid.The cost of the module is determined for 1 kW power.The capital and replacement costs of this module is $440 and the cost of O&M is $10 per year.The lifetime of the modules is determined as 25 years.The PV power system is connected to the DA bus in the hybrid microgrid as shown in Figure 1.

Ø Battery energy storage unit
It is important to use energy storage units in order to ensure energy continuity in a system designed with renewable energy sources that vary according to meteorological conditions such as solar and wind energy.When the production is sufficient, the energy is stored.When there is a power failure or when peak power is needed, energy reliability is met by storage units and the performance of the microgrid is increased.The calculation of the battery charge power of the kinetic battery model, maximum charge rate of the storage component and the maximum charge current values of the storage component by HOMER are given in Equations 2-4.Using these equations, battery charge power is calculated by Equation 5 and maximum battery discharge power is calculated by Equation 6(https://www.homerenergy.com/products/pro/docs/3.12/in dex.html).Saft brand kinetic battery type has been selected for the hybrid microgrid. ( where: • Q1 is the available energy (kWh) in the storage at the beginning of the time step, • Q is the total amount of energy (kWh) in the storage at the beginning of the time step, • ac is the storage's maximum charge rate (A/Ah), • Qmax is the total capacity of the storage bank (kWh),

•
Nbatt is the number of batteries in the storage bank, The cost of the battery is determined for one unit.The capital and replacement costs of a battery are $60,000 and $36,000 respectively, and O&M cost is $ 6,000 per year.Battery life is determined as 15 years.The battery, initially at 100% charge level, can be discharged up to a minimum of 20%.In conjunction with the PV power system, the battery is connected to DC bus in the hybrid microgrid.

Ø Diesel generator
Diesel generators are used as alternative energy sources in cases where there is no access to grid or interruption to electrical energy.Diesel generators, which are also preferred as backup power, provide robust and reliable energy supply due to their structures.The fuel consumption per hour of a diesel-fueled diesel generator is calculated by Equation 7 (https://www.homerenergy.com/products/pro/docs/3.12/in dex.html).

•
Ygen is the rated capacity of the generator (kW),

•
Pgen is the electrical output of the generator (kW).
A generic generator type is selected for the hybrid microgrid.The generator cost is determined for 1 kW output power.The capital and replacement costs of a generator are $ 154.74 and the O&M cost is $ 0.010 per hour.The lifetime of the generator is 15,000 hours.The generator is connected to AC bus in the hybrid microgrid.

Ø Converter
The energy flow between the AC bus and the DC bus inside microgrid is done by a bidirectional power converter.According to the production, consumption and storage energy conditions of the microgrid, the converter works as both an inverter and a rectifier.ABB brand converter has been selected for the hybrid microgrid.
Converter cost is also determined for 1kW output power.
The capital and replacement costs of this converter are $ 70, the cost of O&M is $ 7 and the life expectancy is 15 years.The efficiency of the converter connected to two busbars is taken as 95%.

Ø Load
The load in this design only consists of the power demanded by the university hospital complex.The data for the load has been collected from the field using proper measuring devices on hourly basis for over one-year period.The monthly profile of the data is shown in Table 2. Table 2 also gives the maximum and minimum consumption including average day maximum, average, and average day minimum consumption data.Making a design based on real field data is very important to obtain credible answers when defining the tariff and credible solutions when finding the optimum cost of the system.For this purpose, the actual and current cost of components used in the application and the up-to-date unit price of the energy are obtained, and then used in the simulation model as the design input data.
When Table 2 is examined, it can be seen that the hospital complex reaches a maximum energy consumption of almost 1.9 MW in some months during the year, and this consumption value is realized in December-February winter months and July-August summer months.
These moths are the colder times in winter when electric heaters are used and the hottest months in summer when air conditioners are used mostly.The same load profile but categorized and displayed by the HOMER software is shown in Figure 2. Figure 2 shows the daily electricity consumption during the month of January, the profile of the monthly seasonal consumption and the annual consumption data in more details for easy evaluation.

Assessment Criteria for Optimization
After the design of the microgrid, simulation and optimization can be done.After the simulation, various evaluation criteria are taken into consideration in the optimization phase.In this study, the assessment criteria such as the net present cost, levelized cost of energy, operating cost, initial capital cost, and renewable fraction are taken into consideration during the optimization phase.The detailed description of each criterion is defined in the sub-headings below.

Ø Net present cost ($)
The cost term "NPC" is defined by the HOMER program as the following."The net present cost (or life-cycle cost) of a component is the present value of all the costs of installing and operating the component over the project lifetime, minus the present value of all the revenues that earns over the project lifetime.HOMER calculates the net present cost of each component in the system and of the system as a whole" (https://www.homerenergy.com/products/pro/docs/3.12/in dex.html).

Ø Levelized cost of energy (COE) ($/kWh)
COE is defined by the HOMER program as the following."To calculate the COE, HOMER divides the annualized cost of producing electricity (the total annualized cost minus the cost of serving the thermal load) by the total electric load served".COE is calculated by Equation 8(https://www.homerenergy.com/products/pro/docs/3.12/in dex.html) where: • Cann,tot is the total annualized cost of the system ($/yr),

Ø Operating Cost
Operating cost is defined by the HOMER program as the following."The operating cost is the annualized value of all costs and revenues other than initial capital costs.

Ø Initial capital cost
Initial capital cost is defined by the HOMER program as the following."The initial capital cost of a component is the total installed cost of that component at the beginning of the project" (https://www.homerenergy.com/products/pro/docs/3.12/in dex.html).Renewable fraction is defined by the HOMER program as the following."The renewable fraction is the fraction of the energy delivered to the load that originated from renewable power sources".Renewable fraction is calculated using Equation 10 (https://www.homerenergy.com/products/pro/docs/3.12/in dex.html).(10) where: • Enonren is the non-renewable electrical production (kWh/yr), • Egrid,sales is the energy sold to the grid (kWh/yr) (included in ), • Hnonren is the non-renewable thermal production (kWh/yr),

•
Eserved is the total electrical load served (kWh/yr),

Optimization of Hybrid Microgrid Design
The load following controller is chosen as the dispatch strategy for the simulation of the microgrid.In this strategy, the primary objective is to meet the demand for energy.For this reason, if there is a demand for energy, then all sources of generation are directed to meet this demand.This strategy is also preferred when the production capacity of renewable energy resources exceeds the demand power of the load.That is, the priority is not the sale of energy but the use of it at the optimum way.Generally, the charging of the battery and the feeding of the deferrable loads are left to renewable energy sources.
After the determination of the operating strategy, the upper and lower limits of the optimum capacities to be determined by HOMER during optimization stage for PV power, diesel generator, battery, and converter are defined.For the proposed design, we set the limits such that the PV power and converter have a minimum and maximum range of 0 to 2500 kW, while the battery group has a minimum of two to maximum of ten units each having a capacity of 55 kWh.The search range of the diesel generator is limited between 2100 kW and 2500 kW.The life of the system is set as 25 years.After the design is completed, and the constraints and the necessary parameters are all determined, the system is simulated and optimized.Therefore, the categorized optimization results obtained for the proposed microgrid by the HOMER software are given in Table 3.The optimization has produced four results in different combinations.In the first category, which is the first row, the optimization uses the grid, PV source, battery and the converter.In the second solution category, which is the second row, it uses all of them.In third, it uses only grid as the source, battery and converter and ignores the PV and the diesel generator.In the last category, it uses the grid, diesel generator, battery and the converter but not the PV source.The optimum capacities of components in each combination that includes PV, diesel generator, battery and converter are determined and compared in terms of net present cost, cost of energy, operating cost, initial capital cost and renewable fraction.
According to Table 3, when the net present cost (system cost) and the cost of energy values are compared; the most optimum system (the lowest cost) is given in the first row, which consists of the combination of the grid, PV, battery and the converter.The highest cost system is the grid, diesel generator, battery and converter combination, which is the last row.However, in this study, we prefer to use the next optimum solution, which is in the second row since it includes energy storage capability.In a microgrid, the presence of a diesel generator and energy storage unit is important for providing backup power in case of an emergency.This is especially true for hospitals.
The evaluation of the hybrid microgrid in terms of capital and O&M costs is given in Table 4.The highest capital cost in the system belongs to the PV power system and the highest O&M cost belongs to the grid.The total cost of the system over the life of the project is calculated as $6.70M according to this assessment.
The randomly selected three-day energy production and consumption situation inside one-year operation period of the microgrid is given in Figure 3.In Figure 3, the production of PV power, the load, the amount of energy purchased from the local network and the energy sold to the grid are examined.When PV production is more than consumption, energy is supplied to the load only from the PV system and the excess energy is sold to the grid.When the PV production is less than consumption, the required energy is purchased from the grid.In this operating strategy, no diesel generator nor battery are used.
In addition to the review of the three-day energy profile of the designed microgrid, a one-year general evaluation is made.The comparison of the simulated system in terms of production and consumption of electric energy is given in Table 5.In this microgrid design, the 45.10% of total energy is produced by the renewable energy sources.All of this generation is directly supplied to the load.According to Table 3, the fraction of PV generation that is directly utilized by the load is equal to 43.70%.The remaining 54.90% of electricity is purchased from the grid.Therefore, the 91.80% of generated electricity from PV system is transferred to AC loads and 8.15% is sold to the grid at the determined selling price.

Results and Discussions
In the second section of this paper, the performance of the microgrid with no PV aging, no increase in demand, no change in diesel fuel price, and no mains interruptions was investigated.However, the effects of these factors on the microgrid performance should be investigated in a real-time simulation, since they do not stay the same but changes year by year.For this reason, in this section, the change of microgrid performance against above factors and success status is examined based on yearly basis.The microgrid designed in the second section is called the basic system.Five different scenarios have been proposed to examine the impact of performance variables on this basic system.These scenarios were added to the basic system in order and their effects on the microgrid were analysed.The scenarios are described in the subheadings below.Since the basic system (microgrid structure) stays the same in each scenario, only the "initial capital" value within the evaluation criteria has not been changed.

Ø Scenario 1: Investigation of PV degradation effect
The PV modules undergo a loss of efficiency during the period they work depending on the structure of the silicon based material and the production techniques.
Based on the result of the tests performed by the manufacturing companies, the ratio of this loss and the extended efficiency data over the expected panel life are given in the catalogues of the products.PV module aging and failures cause a decrease in power production performance.The power production loss curve given by the manufacturer for the selected JINKO Solar 275W PV panel in this study is given in Figure 4 (https://www.jinkosolar.com/ftp/EN-Eagle+-275PP(Plus)-60_rev2015.pdf).Mainly based on the data in graph given in Figure 4 and the literature search, the annual PV degradation factor for Scenario 1 has been determined as 0.9%; and this factor is used in the calculations here after (Jordan et al. 2016).
Table 6 shows the comparison of the basic system and scenario 1 in terms of optimization results.In scenario 1, the energy demand of the load is supplied by the PV and the grid, the diesel generator and the battery are not used.When basic system is compared to Scenario 1, the net present cost increased by 4.33%, cost of energy increased by 6.35%, and operating cost increased by 5.81%.Renewable fraction, which is the energy transferred directly from the renewable energy sources to the load, decreased by 7.55% from 43.70% to 40.40%.These results show that annual degradation of PV modules by 0.9% directly affected the whole system performance.The effect of PV degradation on the system throughout the lifetime of the project is given in Figure 5.While 4,163,748 kWh of energy is produced from the PV system in the first year, this value decreases to 3,713,826 kWh in the twenty-fifth year.The effect of PV degradation was also evaluated in terms of production and consumption.
When it is evaluated in terms of production, in the first year of the project life, the PV system produced 45.10%, while in the twenty-fifth year the production capacity decreased to 38.30% due to PV degradation.In addition to PV production, while the rate of purchasing electricity from the grid in the first year was 54.90%, it increased to 61.71% in the twenty-fifth year.When the system is evaluated in terms of consumption, while the load in the first year was 91.80% of the consumption, it increases to 96.30% in the twenty-fifth year.While the excess energy not consumed by the hospital complex, but sold to grid was 8.15% in the first year, only 3.70% was sold in the twenty-fifth year.With the addition of new devices or the addition of new units to the hospital, the burden of the hospital may increase in certain years.In the second scenario, an annual fixed load increase value is predicted for the hospital.The effects of this load increase on production and consumption over time have been evaluated in this scenario.The annual load increase for this scenario was 2%.The comparison of the basic system and scenario 2 in terms of optimization results is given in Table 7.In Scenario 2, as in Scenario 1, the energy demand of the load is supplied by PV and grid, diesel generator and battery are not used.When again the basic system is compared to Scenario 2, the net present cost increased by 25.98%, cost of energy increased by 8.46% and operating cost by 34.64%.The renewable fraction value decreased by 16.70% from 43.7% to 36.40% in total.In this case, the gradual increase in the load instead has also directly affected the costs and the whole system.The effect of the load increase on the system throughout the life of the project is given in Figure 6.While the amount of energy needed by the load was planned as 9,164,537 kWh per year in the first year, this rate increased to 14,740,582 kWh in the twenty-fifth year.
When the effect of the load increase was evaluated in terms of production, the PV system produced 45.10% in the first year and this rate decreased to 30.50% due to the load increase in the twenty fifth year.In addition to PV production, the rate of purchasing electricity from the grid in the first year was 54.90%, while this rate rose to 69.50% in the twenty-fifth year.In terms of consumption, the effect of load increase was 91.80% of the load consumption in the first year, while it was 99% in the twenty-fifth year.While the excess energy sold to grid was 8.15% in the first year, only 0.981% was sold in the last year.

Ø Scenario 3: Mains failures and reliability
If a microgrid provides energy to the hospital load, energy continuity must be ensured.In Scenario 3, two types of power outages and mains failures have been planned to test the reliability of the microgrid.It is assumed that there are about 25 power outages in a year and the estimated repair time of the failures is 1 hour.Type 1 outages as seen in Figure 7   Table 8 shows the comparison of the basic system and scenario 3 in terms of optimization results.The basic system is compared separately with two types of mains failures.The net present cost increased by 0.89%, cost of energy increased by 0.77% and operating cost by 1.06% when compared with outages 1.The renewable fraction fell 0.23% from 43.70% to 43.60%.The net present cost increased by 5.82%, cost of energy by 5.96% and operating cost by 7.65% when compared to outages 2. The renewable fraction decreased by 0.46% from 43.70% to 43.50%.After mains failures, the energy is supplied to the microgrid by diesel generator and battery.Table 9 shows the effect of interruptions during the life of the project and comparison with the basic system.In two types of outages, the PV utilization rate was 45.10% and stayed unchanged.While electricity generation from diesel generator was 0.159% at outage 1, electricity intake from grid decreased by 0.18% according to the basic system.While 91.90% of the consumption is transferred to AC load, 8.13% is sold to local grid.In the outage 1, the battery provided 1.145 kWh of energy to the microgrid.While the electricity generation from the diesel generator was 1.14% in the outage 2, the electricity purchase from the grid decreased by 2% compared to the basic system.While 92.10% of the consumption was transferred to AC load, 7.94% was sold to the network.In the outage 2, the battery provided 9,231 kWh of energy to the microgrid.

Ø Scenario 4: Mains failures and increase in diesel fuel cost
The diesel generator and battery are not used in the basic system scenario and are kept as backup power.
However, in this scenario, when power failures are experienced in the main power grid, microgrid power is provided from PV, diesel generator and battery.In this scenario, it is assumed that diesel fuel increases by 3% annually.Table 10 shows the optimization results.The net present cost has increased by 1.04%, cost of energy by 0.96% and operating cost by 1.44% when compared to outage 1.When the basic system was compared with outage 2, net present cost increased by 7.76%, cost of energy increased by 7.88% and operating cost increased by 10.39%.The renewable fraction values of outage 1 and outage 2 have decreased by 0.23% and 0.46%, respectively.
Ø Scenario 5: Application of all variables to the basic system Scenario 4's electricity energy production and consumption ratios are the same as in scenario 3 and given in Table 9.In scenario 4, the fuel cost of the diesel generator changed and the cost increase was observed throughout the life of the project.In the outage 1, the diesel generator worked 23 hours per year and consumed 4,656 L fuel.In the interruption 2, the diesel generator worked 157 hours a year and consumed 33,042 L of fuel.
The effect of diesel generator on fixed generation cost and marginal generation cost is given in Figures 8 (a) and 8 (b).It is more likely to have all variables being effective at the same time for a real microgrid.Therefore, in order to make a more realistic assessment, all of the variables: PV degradation, load increase, outages, and diesel fuel price increase were applied to the basic grid and the effect was investigated in Scenario 5. Comparison of the basic system and Scenario 5 in terms of optimization results is given in Table 11.When basic system is compared to outage 1, the net system cost increased by 31.64%,cost of energy 14.23% and operating cost increased by 42.25%, the renewable fraction rate decreased by 23.57%.When the basic system is compared with outage 2, the net present cost increased by 40.44%, the cost of energy increased by 21.92% and the operating cost increased by 53.91%.The energy transferred directly from the renewable energy sources to the load decreased by 23.80%.PV power production, energy transferred to the load, 25years of change in energy sold to and purchased from the grid is given in Figure 9. Figure 9 (a) shows the percent change in PV production with PV degradation that is assumed as 0.9% yearly.In this scenario, the production drops from 45.10% to 24.80%.Figure 9 (b) shows the change in the percentage of energy allocated to the load, which shows an annual increase of 2% in total consumption.The load in the basic system is constant and equal to 91.80%.The energy transferred to the load has decreased approximately from 92% to 99.70% for both outage types.This result means that the energy produced by the PV panels on a yearly basis is directly consumed since the aging reduces the PV generation already.
Figure 9 (c) shows the percent change of energy purchased from the grid.Since the load in the basic system is constant over the years, the energy taken from the grid is 54.90%.The energy purchased from the grid increased from 54.80% to 75% in outage 1 and from 53.80% to 73.70% in outage 2. With the annual increase in the load and the effect of aging in modules, less electricity was produced and more energy was purchased from the grid to supply the demand.
Figure 9 (d) shows the change in the percentage of energy sold to the grid.In the basic system, 8.15% energy was sold.The energy sold to the grid in outage 1 has decreased from 8.13% to 0.29% and in outage 2 from 7.94% to 0.28%.This is due to the decrease in PV production and the increase of the load, the increase of the energy requirement of the microgrid and the lack of energy to sell to the grid.The change in diesel generator and battery usage is given in Figure 10. Figure 10 (a) shows the percentage change in diesel generator usage.In outage 1, the generator usage rate increased from 0.16% to 0.21% and in outage 2 from 1.14% to 1.53%.This is due to the use of a diesel generator to compensate for mains outages.The increase in the energy demanded by the diesel generator is due to the decrease in the PV power and the increase of the load.The evaluation of the hybrid microgrid system designed for the hospital complex in terms of the cost, profit-loss, and energy production-consumption status according to different input variables and for five different scenarios is given below, respectively.In the first scenario, the degradation effect of PV modules has been examined and an increase of 4.33% to 6.35% has been observed at the end of 25 years based on the assumption of 0.9% annual degradation.A decrease of 7.55% in total was calculated in the renewable fraction with respect to this increase.Similarly, the rate of purchasing electricity from the grid increased by 12.40% due to the degradation of the PV panels, and a reduction of 54.60% was calculated in selling the excess of electricity from the panels.According to these calculated values, it was observed that the degradation in the PV panels did not adversely affect the investment of a 2.5 MW PV panel in the 25-year period, and the system was able to pay off its investment and continue to make a profit at the end of 25 years.In the second scenario, an annual load increase of 2% is assumed.At the end of the 25-year period, an increase of 8.46% to 34.64% was seen in the costs, and the energy transferred directly from renewable energy sources to the load decreased by 16.70%.When the effect of the load increase was evaluated in terms of production, the percentage of providing energy to the load from PV sources decreased to 32.37%.The electrical energy purchased from the network increased by 26.59% and the electricity energy purchased by the network decreased by 87.96%.Considering the increase in the amount of load, it can be foreseen that a 2% load increase is the limit value for the designed system and if the amount of load increase exceeds this value, the determined PV panel power will not be enough for the load within the working life and the system will not be able to pay the investment within a few years.
In the third scenario, the effects of mains interruptions on system operation and cost are investigated.The outage 1 scenario, which consists of small scale interruptions that would not put the microgrid into major crisis, showed an increase in the costs between 0.89% and 1.06%.On the other hand, the costs in outage 2, which consists of large scale interruptions with longer durations and frequency that would put the microgrid into major crisis, has increased by 5.82% to 7.65%.In these scenarios, the energy transferred directly from the renewable energy sources to the load decreased by 0.23% to 0.746%.When the data obtained are evaluated, it is calculated that the small or large cuts in the network will not have a great effect on the rate of renewable energy use or the amount of electricity to be produced, but it is calculated that the interruptions require additional battery and generator investments and these investments negatively affect the system cost.Increase in the amount of interruptions increases the battery and generator usage and reduces the lifetime of these equipment.
In the fourth scenario, the effect of the increase in fuel costs on the system was investigated in the 25-year period in addition to the network outages that were predicted in the third scenario.In this scenario, system investment costs and depreciation values are calculated when there is a cost increase of 3% in diesel fuel.It was calculated that the system consumed 4,656 L fuel per year in the outage 1, while 33,042 L consumed diesel fuel for outage 2. The increased fuel cost does not affect the operating time of the system, but the increase in fuel cost causes a decrease in the rate of profit from the electricity sold to grid and the system's amortization time.In the fifth scenario, all four variables described above are acting all together.Having diesel generators and battery groups in a microgrid system with renewable energy sources is the most suitable method to provide energy to the load continuously.However, PV module aging, annual increase in load, frequency of power outages, time to repair faults, and the variations in fuel prices must be taken into consideration in order to obtain realistic results of long-term operation of the system.When these four variables were analysed together for outage 2 scenario, the net present cost increased by 40.44%, the cost of energy increased by 21.92% and the operating cost increased by 53.91%.The energy transferred directly from the renewable energy sources to the load decreased by 23.80%.Similarly, while energy purchased from the grid was 54.90% in basic system, this ratio increased to 73.70% when all variables acted together.The rate of purchase from grid is increased since less electricity was produced due to the aging of PV modules and the energy demand of the load has increased over the years.Therefore, the energy sold to the grid decreased from 8.13% to 0.29%.Almost no excess energy left to sell back to the grid.
If disruptive effects exceeds the reasonable limits, the unit cost of energy increases and the payback period becomes longer.After a certain period of time production cannot meet the demand and the earnings cannot compensate the investment cost.It has been shown that the designed microgrid meets all the needs of the hospital complex sufficiently during the life of the project even if it is exposed to those bad scenarios.In conclusion, the proposed system is feasible and fulfils the performance targets set at the beginning of the project.

Conclusions
In this study, a hybrid microgrid consists of a PV power system and an energy storage unit is designed to supply power to a section of the hospital complex located in the ESOGU campus.The objective is to reduce the total electricity cost, add renewables to the system, and have diesel generator and battery power for emergency backup.However, the sizing and the optimal operation of this additional system must be correctly done so that maximum benefit can be achieved.For this reason, design, simulation, and optimization of the proposed microgrid are carried out by using the HOMER program.The program finds the optimum size of each component based on the provided solar radiation available in the region and the load data.It also provides the economic analysis projected over the selected lifetime of system.Using the real power consumption of the hospital over one-year period, the program is set to run an optimization considering lifetime of 25 years.In conclusion, a PV power source of 2500 kW, a diesel generator of 2100 kW and two energy storage unit having a capacity of 110 kWh are found to be optimum for the selected load profile.The effects of PV module degradation, demand increase, network outages and increase in diesel fuel prices have been investigated in the proposed hybrid microgrid consisting of PV-diesel generator-battery-converter combination.When the effect of these variables ae added to the system, the following increases have been observed compared to the basic system: the net present cost increased by 40.44%, cost of energy 21.92% and operating cost 53.91%.The energy transferred directly from the renewable energy sources to the load decreased to 33.30% range.It is concluded that the exposure of microgrid to disruptive factors affects its performance over its lifetime.However, the proposed system is feasible and fulfils the performance targets set at the beginning of the project.The current calculations are based on flat rate tariff.However, when multi-rate tariffs become available in the university region, the benefit of the proposed microgrid can be more substantial.

Fig. 2
Fig. 2 Load profile of hospital complex categorized and displayed by the HOMER software

Fig. 3
Fig. 3 Three-day energy generation-consumption graph of the microgrid

Fig. 5 Fig. 6
Fig. 5 Effect of PV degradation on the system (a).Type 2 outages are set manually and shown in Figure 7 (b).With the failures 1, small scale power outages are planned.With the failures 2, large-scale power outages that can be difficult to handle by the microgrid are planned.(a) Power outages in a year (type 1) (b) Power outages in a year (type 2) Fig. 7 Power outages (a) Fixed generation cost of diesel generator (b) Marginal generation cost of diesel generator Fig. 8 Effect of diesel fuel price increase to the total cost Energy purchased from grid (d) Energy sold to grid Fig. 9 Evaluation of energy production and consumption Figure 10 (b) shows the change in the working hours of diesel generators.The annual use of the diesel generator in outage 1 has increased from 23 hours to 25 hours, and in outage 2 from 157 hours to 176 hours.Figure 10 (c) shows the change in diesel fuel consumption.The use of fuel in outage 1 increased from 4,656 L to 8245 L and in the outage 2 from 33,042 L to 61,038 L. Figure 10 (d) shows the marginal generation cost and Figure 10 (e) shows the variation of the fixed generation cost.In scenario 5, the marginal generation cost, which is the energy produced per kWh, increased from $ 0.23 to $ 0.47.The fixed generation cost per hour increased from $ 70.60 to $ 99.40. Figure 10 (f) shows the energy profile of the battery.In outage 1, it has increased from 1,145 kWh to 1,448 kWh per year, while in outage 2, it has decreased from 9,231 kWh to 3,309 kWh.
Fuel consumption of diesel generator (d) The marginal generation cost of diesel generator (e) Diesel generator's fixed generation cost (f) Annual energy status of battery Fig. 10 Investigation of diesel generator and battery usage

Table 1
Design parameters of components and units of hybrid microgrid

Table 2
Profile of hospital complex load consumption data per month in over one year period

Table 3
Categorized optimization results served E

Table 4
Cost status of the system

Table 5
Production and consumption of electricity

Table 9
Effect of outages on system during project life (Scenario 3)