Energy Management and Optimization of a PV/Diesel/Battery Hybrid Energy System Using a Combined Dispatch Strategy

In recent years, the concept of hybrid energy systems (HESs) is drawing more attention for electrification of isolated or energy-deficient areas. When optimally designed, HESs prove to be more reliable and economical than single energy source systems. This study examines the feasibility of a combined dispatch (CD) control strategy for a photovoltaic (PV)/diesel/battery HES by combining the load following (LF) strategy and cycle charging (CC) strategy. HOMER software is used as a tool for optimization analysis by investigating the techno-economic and environmental performance of the proposed system under the LF strategy, CC strategy, and combined dispatch CD strategy. The simulation results reveal that the CD strategy has a net present cost (NPC) and cost of energy (COE) values of $110,191 and $0.21/kWh, which are 20.6% and 4.8% lower than those of systems utilizing the LF and CC strategies, respectively. From an environmental point of view, the CD strategy also offers the best performance, with CO2 emissions of 27,678 kg/year. Moreover, the results show that variations in critical parameters, such as battery minimum state of charge, time step, solar radiation, diesel price, and load growth, exert considerable effects on the performance of the proposed system.


Introduction
Progressive energy demand growth and rapid depletion of fossil fuels have raised concerns of future energy supplies [1]. Moreover, the utilization of conventional energy sources from fossil fuels has resulted in tremendous increases in CO 2 emissions, which are the primary cause of global warming [2,3]. The atmospheric CO 2 concentration has increased by approximately 40% compared with that at the beginning of the industrial revolution [4]. These issues have led to the determination of alternative energy sources with the potential to reduce pollution and produce a sustainable energy supply [5]. The utilization of renewable energy sources (RESs) has grown exponentially over the last few years. By the end of 2017, approximately 26.5% of the total global electricity produced came from RES, as shown in Figure 1 [6]. RESs, such as solar, wind, hydropower, geothermal, and biomass, are easily replenished and environmentally friendly. However, the major drawback of RESs is the unpredictable and intermittent nature of power generation. This issue can be overcome by integrating The optimal design of HESs requires appropriate sizing of the components and a feasible energy management strategy. Selection of a suitable energy management strategy is critical because it determines the behavior of the system by controlling the flow of energy and deciding the priority of each component in the system [12]. The proper energy management strategy is therefore able to improve the power system stability, ensure the continuity of power supply, minimize the cost of energy (COE), and protect components against damage due to overloads. Moreover, in gridconnected systems, the energy management strategy is vital to control the flow of energy from and to the grid and for metering purposes [13,14]. Depending on the system configuration and the optimization objectives, different energy management strategies are performed based on various technical and economic criterions. These strategies can be less or more complicated, requiring the utilization of less or more complicated optimization algorithms [15].
The energy management strategy is conducted by selecting, installing, and programming a central controller to manage the flow of energy according to an optimized strategy. Various mathematical programs and optimization techniques are employed to design and plan energy management strategies. These strategies include off-grid and grid-connected HESs as presented in Figure 2 [14]. The optimal design of HESs requires appropriate sizing of the components and a feasible energy management strategy. Selection of a suitable energy management strategy is critical because it determines the behavior of the system by controlling the flow of energy and deciding the priority of each component in the system [12]. The proper energy management strategy is therefore able to improve the power system stability, ensure the continuity of power supply, minimize the cost of energy (COE), and protect components against damage due to overloads. Moreover, in grid-connected systems, the energy management strategy is vital to control the flow of energy from and to the grid and for metering purposes [13,14]. Depending on the system configuration and the optimization objectives, different energy management strategies are performed based on various technical and economic criterions. These strategies can be less or more complicated, requiring the utilization of less or more complicated optimization algorithms [15].
The energy management strategy is conducted by selecting, installing, and programming a central controller to manage the flow of energy according to an optimized strategy. Various mathematical programs and optimization techniques are employed to design and plan energy management strategies. These strategies include off-grid and grid-connected HESs as presented in Figure 2 [14]. problems and provide an environmentally friendly solution [7][8][9]. Various power sources and storages, such as diesel generators, batteries, and supercapacitors, should be integrated into HESs to improve system stability and smooth out fluctuations [10,11]. The optimal design of HESs requires appropriate sizing of the components and a feasible energy management strategy. Selection of a suitable energy management strategy is critical because it determines the behavior of the system by controlling the flow of energy and deciding the priority of each component in the system [12]. The proper energy management strategy is therefore able to improve the power system stability, ensure the continuity of power supply, minimize the cost of energy (COE), and protect components against damage due to overloads. Moreover, in gridconnected systems, the energy management strategy is vital to control the flow of energy from and to the grid and for metering purposes [13,14]. Depending on the system configuration and the optimization objectives, different energy management strategies are performed based on various technical and economic criterions. These strategies can be less or more complicated, requiring the utilization of less or more complicated optimization algorithms [15].
The energy management strategy is conducted by selecting, installing, and programming a central controller to manage the flow of energy according to an optimized strategy. Various mathematical programs and optimization techniques are employed to design and plan energy management strategies. These strategies include off-grid and grid-connected HESs as presented in Figure 2 [14].

•
Selected site specifications and load demand data • Metrological data (solar radiation and temperature) • Hybrid power system components • Mathematical representation • System operational control

Specification and Load Profile of the Selected Site
The remote rural village selected as a case study in this research is located at Muqdadiyah District, Diyala, Iraq. The village consists of 40 households with total number of people of around 150. Water-wells and hand pumps are the primary sources of water in the area. The village does not have access to grid power, and this situation may open new opportunities for utilization of stand-alone HESs to provide electricity for the area. Similar to most remote rural areas, the residential units of the village require a low electricity supply for electrical appliances and lighting. Figure 3 shows the total daily load profile of the village's households [48]. A 5% random variability is considered for time step to time step and day-to-day analyses to provide better reliability. During the first hours of the day (00:00-06:00), the power consumption is low since the people are asleep. From 06:00-07:00, the load profile shows an increase since most of the people get ready either to leave for schools or their work. Then the load profile decreases again, as most of the family members are outside, and continue until 14:00 when people come back to their homes. Starting from 14:00 the load profile shows a continues increment and the maximum is recorded from 19:00-21:00 since most people are present in their homes; then, the load decreases, which refers to the start of sleep time. A daily total energy demand of 145 kWh/day, a daily average of 6.04 kW, and power peak load of 18.29 kW are found. The remote rural village selected as a case study in this research is located at Muqdadiyah District, Diyala, Iraq. The village consists of 40 households with total number of people of around 150. Water-wells and hand pumps are the primary sources of water in the area. The village does not have access to grid power, and this situation may open new opportunities for utilization of standalone HESs to provide electricity for the area. Similar to most remote rural areas, the residential units of the village require a low electricity supply for electrical appliances and lighting. Figure 3 shows the total daily load profile of the village's households [48]. A 5% random variability is considered for time step to time step and day-to-day analyses to provide better reliability. During the first hours of the day (00:00-06:00), the power consumption is low since the people are asleep. From 06:00-07:00, the load profile shows an increase since most of the people get ready either to leave for schools or their work. Then the load profile decreases again, as most of the family members are outside, and continue until 14:00 when people come back to their homes. Starting from 14:00 the load profile shows a continues increment and the maximum is recorded from 19:00-21:00 since most people are present in their homes; then, the load decreases, which refers to the start of sleep time. A daily total energy demand of 145 kWh/day, a daily average of 6.04 kW, and power peak load of 18.29 kW are found.

Solar Resource and Temperature
Solar radiation and ambient temperature are the two parameters with the most profound effects on the output PV power. In this framework, HOMER software uses the monthly average global horizontal radiation and ambient temperature as input parameters. Subsection 2.4 provides the mathematical expression of the effects of these parameters on the output PV power. The following points explain the solar radiation and ambient temperature data in the selected site, which were obtained from the NASA website [49].

•
The solar radiation and clearance index data for the selected village (33° N latitude and 44° E longitude) are presented in Figure 4. The annual average solar radiation is 5.02 kWh/m 2 /day, maximum solar radiation (7.56 kWh/m 2 /day) is recorded in June, and the minimum solar radiation (2.62 kWh/m 2 /day) is recorded in December. The amount of solar radiation received by the area is relatively high, which indicates that the solar energy system is an attractive power source.

•
The ambient temperature plays a vital role in the performance of PV modules. Therefore,

Solar Resource and Temperature
Solar radiation and ambient temperature are the two parameters with the most profound effects on the output PV power. In this framework, HOMER software uses the monthly average global horizontal radiation and ambient temperature as input parameters. Section 2.4 provides the mathematical expression of the effects of these parameters on the output PV power. The following points explain the solar radiation and ambient temperature data in the selected site, which were obtained from the NASA website [49].

•
The solar radiation and clearance index data for the selected village (33 • N latitude and 44 • E longitude) are presented in Figure 4. The annual average solar radiation is 5.02 kWh/m 2 /day, maximum solar radiation (7.56 kWh/m 2 /day) is recorded in June, and the minimum solar radiation (2.62 kWh/m 2 /day) is recorded in December. The amount of solar radiation received by the area is relatively high, which indicates that the solar energy system is an attractive power source.

•
The ambient temperature plays a vital role in the performance of PV modules. Therefore, accurate measurement of ambient temperature data is essential. The monthly average ambient temperature for the chosen area is illustrated in Figure 5. The summer season shows the highest ambient temperature, at 36.15 • C in July, and the winter season records the lowest ambient temperature, at 9.77 • C in January. In HOMER software, the ambient temperature is taken into consideration when calculating the output PV power.
Sustainability 2018, 10, x FOR PEER REVIEW 6 of 29 temperature, at 9.77 °C in January. In HOMER software, the ambient temperature is taken into consideration when calculating the output PV power.

System Components
In this research, the proposed HES consists of four components, i.e., the PV system, diesel generator, converter, and batteries. A schematic diagram of the proposed HES is illustrated in Figure  6. The techno-economic input parameters for all components in the HES are explained in detail in Table 1. Note that the technical parameters and costs of the components were obtained from several references [28,[50][51][52]. Regarding the capacity, the optimizer lets HOMER find the optimal sizes for system components.  temperature, at 9.77 °C in January. In HOMER software, the ambient temperature is taken into consideration when calculating the output PV power.

System Components
In this research, the proposed HES consists of four components, i.e., the PV system, diesel generator, converter, and batteries. A schematic diagram of the proposed HES is illustrated in Figure  6. The techno-economic input parameters for all components in the HES are explained in detail in Table 1. Note that the technical parameters and costs of the components were obtained from several references [28,[50][51][52]. Regarding the capacity, the optimizer lets HOMER find the optimal sizes for system components.

System Components
In this research, the proposed HES consists of four components, i.e., the PV system, diesel generator, converter, and batteries. A schematic diagram of the proposed HES is illustrated in Figure 6. The techno-economic input parameters for all components in the HES are explained in detail in Table 1. Note that the technical parameters and costs of the components were obtained from several references [28,[50][51][52]. Regarding the capacity, the optimizer lets HOMER find the optimal sizes for system components.  The output PV power is known to be profoundly affected by the amount of the solar radiation available and the temperature. In this respect, the following expression is used in HOMER to compute the output PV power [53,54]:  The output PV power is known to be profoundly affected by the amount of the solar radiation available and the temperature. In this respect, the following expression is used in HOMER to compute the output PV power [53,54]: where Y PV is the PV rated capacity under standard test conditions (kW), f PV is the derating factor of PV, G T is the solar radiation incident on the PV array in the current time step (kW/m 2 ), G T,STC is the incident irradiance at standard test conditions (1 kW/m 2 ), α p is the temperature coefficient of power (%/ • C), T C is the temperature of the PV cell ( • C) in the current time step, and T C,STC is the temperature of the PV cell under standard test conditions (25 • C). The PV cell temperature is calculated using the following expression: where T a is the ambient temperature ( • C), T C,NOCT is the nominal operating cell temperature (NOCT) in ( • C), Ta, NOCT is the ambient temperature at which the NOCT is defined (20 • C), G T,NOCT is the solar radiation at which the NOCT is defined (0.8 kW/m 2 ), η mp,STC is the maximum power point efficiency under standard test conditions (%), τ is the solar transmittance of any cover over the PV array (%), and α is the solar absorptance of the PV array (%).

Economic Model
Considering that the purpose of HOMER is to reduce the costs of system operation and determine the optimum system configuration, economics play a crucial role in this simulation. The optimum combination of the HES components is obtained on the basis of the NPC, which is the sum of all costs and revenues that take place throughout the lifetime of a project. To calculate the total NPC of a system, the following equation is used [55,56]: where C ann,tot is the total annualized cost ($/year), i is the annual real interest rate (%), T P is the project lifetime (year), and CRF is the capital recovery factor, which is given by [55,56]: where n is the number of years. Salvage costs (SC), which are the residual values of the system components by the end of the project lifetime, are taken into consideration in the NPC calculation. The following expression is utilized to find the SC [54]: where C RC is the cost of replacement ($), T rem represents the remaining life of the component (year), and T com refers to the component lifetime (year). COE is the average cost per kWh of producing electricity, given by [53,56]: where E ann,tot is the total electrical load served (kWh/year).

Control Strategy
The two control methods of the hybrid PV/diesel/battery system are the LF and CC dispatch strategies. In this study, these two strategies are presented for PV/diesel/battery HES and compared with the proposed combined strategy. The implementation of these strategies in practice can be done using a suitable controller, such as microcontroller, PLC, FPGA, etc.  Figure 7 shows the flowchart of the LF dispatch strategy for the PV/diesel/battery HES. The system operation of this model can be classified into three cases as follows: The first case is when the output PV power is equal to the load power. Here, the PV power meets the load demand, the batteries do not draw any energy, and the generator stays off. In this case, no excess power exists. The second case takes place when the output PV power is higher than the load power. The PV feeds the load resulting in excess power. In this case, the excess power will be damped if the battery is fully charged. In the case where the battery is not fully charged, the excess PV power is used to charge the battery. The generator also does not work in this case. The last case is when the PV power is lower than the load power. The two possible subcases are as follows: • If SOC = SOC min , the generator works to feed the net load (load minus renewable power).
The generator provides only enough power to satisfy the net load without charging the battery. It is important to mention that if the minimum generator loading output power is higher than the net load, the generator works to feed the load and the excess power from the PV charges the battery.

•
If SOC > SOC min , a cost of discharging the battery is computed and compared with the cost of turning on the generator that operates only to serve the net load. If the battery discharging cost is higher than the cost of turning on a generator, then the battery would not be discharged while the generator runs and produce enough power to meet the load demand without charging the battery. Otherwise, the battery is discharged. The following equations explain the cost of each decision: • The cost of discharging the batteries is calculated using the following equation [16,57]: C batt,wear is the battery wear cost ($/kWh), which is given by [16,57]: where C batt,rep is the battery replacement cost ($), N batt is the number of batteries in the storage bank, Q life is the single battery throughput (kWh), and η rt is the battery round trip efficiency (%).
The cost of turning on the generator ($/kWh), in which the generator operates only to serve the net load, is calculated using the following expression [58]: where F con is the fuel consumption (L/hour), F price is the fuel price ($/L), L served is the total load to be served, G output is the generator output (kW), C gen,rep is the replacement cost of the generator ($/kWh), G lifetime is the generator lifetime, and C gen,O&M is the O&M cost of the generator.

Cycle Charging Strategy
The flowchart of the CC dispatch strategy for the PV/diesel/battery HES is shown in Figure 8. The operating strategy of this system is identical to that of the system utilizing LF dispatch. However, the strategy differs from the LF strategy in that when the generator is switched on, it runs at its maximum rated capacity to supply the net load and charge the battery with excess energy. The following equations explain the cost of each decision: The cost of discharging the batteries is calculated using [16,57]:

Cycle Charging Strategy
The flowchart of the CC dispatch strategy for the PV/diesel/battery HES is shown in Figure 8. The operating strategy of this system is identical to that of the system utilizing LF dispatch. However, the strategy differs from the LF strategy in that when the generator is switched on, it runs at its maximum rated capacity to supply the net load and charge the battery with excess energy. The following equations explain the cost of each decision: The cost of discharging the batteries is calculated using [16,57]: Battery energy cost, C batt,energy ($/kWh) is calculated in time step n using the following expression [57,58]: where C cc,i is the cost of cycle charging in time step i ($), and E cc,i is the quantity of energy put into the batteries in time step i (kWh).
The cost of running the generator at maximum capacity to meet the net load and charge the battery is calculated using the following equation [58]: where C cc here refers to the cost of cycle charge in the current time step, which is calculated using [58]: C gen,marg is the marginal cost of the generator ($/kWh), which is calculated using the following expression [58]: where F slope is the slope of fuel curve (L/kWh).

Combined Dispatch Strategy
The decision of charging the battery by the diesel generator depends mainly on the future net load, which is the difference between the load demand and the output power from renewable sources. As predicting the future net load is challenging, the current net load is used in the CD strategy as a proxy for the future net load to investigate whether to charge the battery from the generator. This strategy tends to use the LF strategy when the net load is high and the CC strategy when the net load is low. During a low net load period, the CC strategy avoids the use of the

Combined Dispatch Strategy
The decision of charging the battery by the diesel generator depends mainly on the future net load, which is the difference between the load demand and the output power from renewable sources. As predicting the future net load is challenging, the current net load is used in the CD strategy as a proxy for the future net load to investigate whether to charge the battery from the generator. This strategy tends to use the LF strategy when the net load is high and the CC strategy when the net load is low. During a low net load period, the CC strategy avoids the use of the generator. On the other hand, the LF strategy ensures continuous usage of the generator during high net load periods. The flexibility of the CD strategy based on high and low loads makes this model capable of producing better performance in the energy access scenarios compared with individual LF or CC strategies. Figure 9 shows the flowchart of the PV/diesel/battery HES with the CD strategy. As shown in the figure, three dispatch decisions are available in this strategy. At every time step, the CD strategy calculates the cost of each possible decision to obtain the least costly choice. This cost includes expenses in the current time step and the expected value of any change in the battery-stored energy, and a decision is made according to the tradeoff between the marginal cost of operating the generator and the battery wear cost. The details of the three cases are as follows: The first decision takes place when the generator provides only enough electricity to satisfy the net load without charging the battery. In the second decision, the generator meets the net load and charges the battery with the excess power. The third decision is feeding the net load by the battery alone.
The system operation of this model can be explained as follows: If the PV power is equal to or higher than the load demand, the power flow is the same for that of LF and CC strategies. If the PV power is less than the load power, the two possible subcases are as follows:

•
If SOC = SOC min , the controller compares the cost of running the generator to produce only enough power to feed the net load without charging the battery with the cost of running the generator at its maximum capacity to serve the net load and charge the battery with the excess electricity. A decision is made based on the least cost dispatch decision.

•
If SOC > SOC min , three decision costs are compared with each other, which are: the cost of turning on the generator that operates only to serve the net load without charging the battery, the cost of running the generator at its maximum capacity to serve the net load and charge the battery, and the cost of discharging the battery. The power flow solution is taken place according to the minimum cost decision.

Results and Discussion
The simulation results are presented and analyzed in this section. The HES was simulated under the three different dispatch strategies. First, the technical feasibility was examined to investigate the ability of the available energy to satisfy electric load demand throughout the year. Then, the economic viability and environmental effects of the proposed systems were investigated. Finally, a sensitivity analysis was performed to determine the impact of some critical parameters on the system performance. The simulation was performed using an annual discount rate of 7.8% and a 20-year project lifetime. Moreover, the system performance was set at a maximum capacity shortage of 1% and a battery minimum SOC of 25%.

Results and Discussion
The simulation results are presented and analyzed in this section. The HES was simulated under the three different dispatch strategies. First, the technical feasibility was examined to investigate the ability of the available energy to satisfy electric load demand throughout the year. Then, the economic viability and environmental effects of the proposed systems were investigated. Finally, a sensitivity analysis was performed to determine the impact of some critical parameters on the system performance. The simulation was performed using an annual discount rate of 7.8% and a 20-year project lifetime. Moreover, the system performance was set at a maximum capacity shortage of 1% and a battery minimum SOC of 25%.

Optimization Results
A feasible system is one that can meet the load demands. In HOMER, the infeasible systems were excluded, while the feasible ones were filtered and presented by their NPC. A comparison of the optimized PV/diesel/battery systems under different dispatch strategies is provided in Table 2.
The results show that best optimal combination of PV/diesel/battery HES under the CD strategy consisted of a 19.4 kW PV, a diesel generator with a 21 kW capacity, 220 batteries, and an 8.05 kW

Optimization Results
A feasible system is one that can meet the load demands. In HOMER, the infeasible systems were excluded, while the feasible ones were filtered and presented by their NPC. A comparison of the optimized PV/diesel/battery systems under different dispatch strategies is provided in Table 2.
The results show that best optimal combination of PV/diesel/battery HES under the CD strategy consisted of a 19.4 kW PV, a diesel generator with a 21 kW capacity, 220 batteries, and an 8.05 kW power converter. The system yielded an NPC of $110,191 and COE of $0.21/kWh, which were 20.6% and 4.8% lower than those of systems utilizing the LF and CC strategies, respectively. These results can be interpreted by the fact that the CD strategy obtained the most economical cost dispatch decision between LF and CC at every time step.
In the LF dispatch strategy, better renewable source utilization could be attained because the diesel generator contributed approximately 40.6% of the total energy production, the lowest compared with that in other strategies. This condition led to greater dependency on renewable components, which was in contrast to the CC dispatch strategy, wherein the generator produced a 73.8% share of the total energy production. The renewable fractions of LF, CC, and CD strategies were 44.7%, 18.4%, and 35.6%, respectively. The monthly average electric production for the system under the three dispatch strategies for one year is presented in Figure 10.
In terms of diesel generator performance, the diesel generator under the CD strategy yielded 2171 working hours; these values were lower than those of the LF and CC strategies, and, hence, the higher generator operation life was obtained under this strategy. The results show that the operating lifespans of LF, CC, and CD strategies were 4.08 years, 4.58 years, and 6.91 years, respectively. Moreover, it was found that the generator under the CD strategy consumed the lowest amount of diesel with 10,574 L/year, which was 1.7% and 23% lower than the system under the LF and CC strategies, respectively. Figure 11 shows the fuel consumption duration curve for the system under the three dispatch strategies for the entire year. It is evident that despite the fact that the generator working hours of the LF strategy were more than those of the CC strategy, the fuel consumption of the LF strategy was lower than that of the CC strategy. This is because the generator under the LF strategy produced only enough power to feed the load, in contrast to the CC strategy, in which the generator operated at its maximum rated capacity to supply the load and charge the battery; hence, more diesel would be consumed.
Battery energy storage is a critical component of standalone HESs because this parameter affects the reliability of meeting loads. Battery throughput (kWh/year) is a performance measure defined as the amount of energy that cycles through the storage bank in one year. Battery throughput affects the battery operational lifetime; the lower the annual battery throughput (lower charge/discharge cycles per year), the higher the battery lifetime [59]. Figure 12 shows the battery input/output energies under the three different strategies. Since the use of the battery in the LF strategy was limited, the LF strategy presented the lowest amount of input/output energy, followed by the CD strategy and the CC strategy, which showed the highest amount of input/output energy. These results show the LF strategy presented the lowest annual battery throughput, which was estimated to be 54.15 kWh, in contrast to the CC strategy, which had a yearly throughput of 79.9 kWh. The annual throughput of CD was calculated to be 70.76 kWh.
Battery autonomy refers to the number of hours a battery can support the critical load without charging during the main failure. Achieving some battery autonomy is necessary, especially during the rainy season when the output PV power cannot meet the load demand [60]. The simulation results indicate that the battery autonomy of the LF strategy was 8.94 h, which was the highest among those of other strategies. This result is due to the high nominal capacity of the system under this strategy. The battery autonomy values of the CC and CD strategies were 4.17 and 6.55 h, respectively.

Economic Analysis of the System under the Three Dispatch Strategies
A cost summary of the system under all dispatch strategies is shown in Figure 13. The following bullets describe the cost analysis for each configuration:

•
The lowest capital cost was achieved by using the CC strategy ($32,537), followed by the CD strategy ($50,042). The system under CC had a capital cost of $64,779, which was the highest among the systems compared, because of the large sizes of renewable components. • Once installed, the PV, converter, and batteries under all strategies were inexpensive to operate and maintain compared with the diesel generator, which contributed most of the total O&M cost. The CD strategy was found to have the lowest O&M cost, which was $18,172, i.e., 37.7% and 21.9% lower than those of LF and CC, respectively.

•
The replacement cost of the LF, CC, and CD strategies were $9005, $8457, and $5135, respectively. The CD strategy had the lowest cost because it depended less on the diesel generator, which led to making this strategy have the highest generator lifetime as compared to other strategies.

•
The fuel cost of the CD strategy was $42,016, which was lower than that of the other strategies, because of the relatively low fuel consumption in this strategy. The fuel costs of the LF and CC strategies were $42,742 and $55,182, respectively.

•
The salvage costs over the project lifetime of the LF, CC, and CD strategies were estimated to be $-6974, $-3727, and $-5174, respectively; these costs originated from the remaining life of the system components.
other strategies.

•
The fuel cost of the CD strategy was $42,016, which was lower than that of the other strategies, because of the relatively low fuel consumption in this strategy. The fuel costs of the LF and CC strategies were $42,742 and $55,182, respectively.

•
The salvage costs over the project lifetime of the LF, CC, and CD strategies were estimated to be $-6974, $-3727, and $-5174, respectively; these costs originated from the remaining life of the system components.

Environmental Assessment
Consumption of diesel has a negative impact on the environment and is harmful to human health, since different kinds of gaseous pollutants are emitted during the process. These emissions include nitrogen oxide (NOx), sulfur dioxide (SO2), particulate matter (PM), unburned hydrocarbon (UHC), carbon monoxide (CO), and carbon dioxide (CO2) [61]. The HESs have positive effects on the environment. Combining PV with the diesel and battery is capable of reducing the emissions significantly [31]. The releasing of annual emissions for the HES under different control strategies has been determined and demonstrated to compare the cases from the environmental standpoint. Cost ($) Figure 13. Cost summary of PV/diesel/battery under different dispatch strategies. O&M is operation and maintenance.

Environmental Assessment
Consumption of diesel has a negative impact on the environment and is harmful to human health, since different kinds of gaseous pollutants are emitted during the process. These emissions include nitrogen oxide (NO x ), sulfur dioxide (SO 2 ), particulate matter (PM), unburned hydrocarbon (UHC), carbon monoxide (CO), and carbon dioxide (CO 2 ) [61]. The HESs have positive effects on the environment. Combining PV with the diesel and battery is capable of reducing the emissions significantly [31]. The releasing of annual emissions for the HES under different control strategies has been determined and demonstrated to compare the cases from the environmental standpoint. Table 3 presents the greenhouse emissions of PV/diesel/battery with LF, CC, and CD strategies. It is obvious that the system with CD was the most environmentally friendly option by having the lowest amount of CO 2 emissions (27,678 kg/year), in contrast to the system with the CC strategy, which had CO 2 emissions of 36,352 kg/year. The CO 2 emissions of the system with the LF strategy were calculated to be 28,157 kg/year. These results were achieved according to the resulting fuel consumption presented in Table 2, which indicates that the diesel generator under the CD strategy yielded a fuel consumption of 10,574 L/year, lower than that of the LF and CC strategies. As a result, minimum greenhouse emissions were obtained under this strategy.

Energy Balance of the Optimized Systems
In order to have a better understanding of the system operation, details of the system's power flow and the battery status during 24 h in April for LF, CC, and CD strategies are provided in this section. The energy flow and the battery status for each strategy are explained in the following points:

•
LF strategy: Figure 14 shows the energy balance and battery SOC of the proposed HES under LF strategy. At the start of the day (00:00-05:30), the battery discharged its power to supply the load alone. At 05:30, the PV array began producing power, but it was not enough to meet the load; therefore, the batteries continued to discharge their power for half an hour. At 06:00, the batteries reached their minimum SOC, so the generator worked to meet the load while the batteries were charged by the excess power from PV until 07:00. For the period between 07:00 and 13:30, PV power was sufficient to fulfill all demand and charge the battery.  Figure 15. For the first few hours (00:00-05:30), the load was served by the battery, similar to the LF strategy. From 05:30 to 07:00, both the PV and battery shared to satisfy the load. From 07:00 to 10:00, the generator produced power so that both the PV and generator could serve the load. Since it was a cycle-charging scheme, the excess power of the generator was used to charge the battery. The load was satisfied by the PV, which also charged the batteries from 10:00 to 12:30. At 12:30, the PV output showed a decrease in its output power; therefore, the batteries discharged their power to compensate for the required power and continued to do so until 15:30. At 15:30, the generator worked with the PV to feed the load and charge the batteries. The PV output fell to zero at 18:30 and the generator continued to feed the load for the remaining time of the day. • CD strategy: Figure 16 presents the energy balance and battery SOC of the proposed HES under CD strategy. As in the LF and CC strategies, the load was served by the battery alone from 00:00 until 05:30. From 05:30 until 15:30, the PV supplied the load and charged the battery during the high solar radiation hours, while the batteries discharged their power to share with the PV in satisfying the load during the low solar radiation hours. Around 15:30, the generator operated at its maximum rated capacity to share in meeting the load with the PV and charged the batteries by the excess power. This case represented the CC strategy, which continued until 18:30. After 18:30, the PV output became zero, and the generator produced only enough power to satisfy the load without charging the battery. This case referred to the LF strategy and continued until 19:30. The CC strategy took place again from 19:30 to 21:30. In the period from 21:30 to 22:00, the generator and the batteries shared to feed the load. At 22:00, the generator turned off, and the load was served by the batteries for the remaining time.
Sustainability 2018, 10, x FOR PEER REVIEW 21 of 29 load without charging the battery. This case referred to the LF strategy and continued until 19:30. The CC strategy took place again from 19:30 to 21:30. In the period from 21:30 to 22:00, the generator and the batteries shared to feed the load. At 22:00, the generator turned off, and the load was served by the batteries for the remaining time.    load without charging the battery. This case referred to the LF strategy and continued until 19:30. The CC strategy took place again from 19:30 to 21:30. In the period from 21:30 to 22:00, the generator and the batteries shared to feed the load. At 22:00, the generator turned off, and the load was served by the batteries for the remaining time.

Sensitivity Analysis
In this part of the study, sensitivity analysis was conducted to investigate the effect of important parameters on the system performance. The parameters considered for sensitivity analysis were battery minimum SOC, time step, solar radiation, diesel price, and load growth.

Battery Minimum SOC
Battery SOCmin is the lowest acceptable battery charge level. The battery level is never drawn below the SOCmin, which is given as a percentage of the total capacity. In this part, the impact of the SOCmin on the system performance was investigated. The variations in SOCmin were set to 15%, 20%, 25%, 30%, 35%, and 40. Figure 17 shows a graph of the total NPC and CO2 emissions cost as a function of SOCmin variation. As can be seen in the Figure, when the SOCmin increased from 15% to 40%, CO2 emissions increased from 25,468 kg/year to 34,159 kg/year. This result indicated that an increase in SOCmin would increase the system's dependence on the diesel generator to supply the load demand and charge the battery, resulting in greater CO2 emissions. Moreover, NPC increased from $107,637 to $114,274. However, researchers have recommended that the SOCmin not be set to an extremely low value to avoid damaging the storage bank by excessive discharge [62][63][64][65].

Sensitivity Analysis
In this part of the study, sensitivity analysis was conducted to investigate the effect of important parameters on the system performance. The parameters considered for sensitivity analysis were battery minimum SOC, time step, solar radiation, diesel price, and load growth.

Battery Minimum SOC
Battery SOC min is the lowest acceptable battery charge level. The battery level is never drawn below the SOC min , which is given as a percentage of the total capacity. In this part, the impact of the SOC min on the system performance was investigated. The variations in SOC min were set to 15%, 20%, 25%, 30%, 35%, and 40. Figure 17 shows a graph of the total NPC and CO 2 emissions cost as a function of SOC min variation. As can be seen in the Figure, when the SOC min increased from 15% to 40%, CO 2 emissions increased from 25,468 kg/year to 34,159 kg/year. This result indicated that an increase in SOC min would increase the system's dependence on the diesel generator to supply the load demand and charge the battery, resulting in greater CO 2 emissions. Moreover, NPC increased from $107,637 to $114,274. However, researchers have recommended that the SOC min not be set to an extremely low value to avoid damaging the storage bank by excessive discharge [62][63][64][65].

Time Step
The system operation was simulated by performing energy balance calculations in every time step for 8760 h in a year. A comparison between the output power of the available energy sources and load demand was conducted at every time step, and the flow of energy from and to every component in the system was investigated. For a system that included a generator and a battery, a decision was made at each time step on the operation of the generator and whether to charge or discharge the battery. Sensitivity analysis was performed in this section to evaluate the effect of time step variations from 5 min to 1 h on the system performance. As shown in Figure 18, the best economic performance was achieved by setting the time step to 5 min, which gave an NPC of $109,982. This can be explained by the fact that reducing the time step led to an increase in the number of times of cost comparison, which led to a minimum possible cost. At the same time, the most environmentally friendly system could also be obtained when the time step was set to 5 min; in such a case, the CO 2 emissions were 26,257 kg/year.

Time Step
The system operation was simulated by performing energy balance calculations in every time step for 8760 hours in a year. A comparison between the output power of the available energy sources and load demand was conducted at every time step, and the flow of energy from and to every component in the system was investigated. For a system that included a generator and a battery, a decision was made at each time step on the operation of the generator and whether to charge or discharge the battery. Sensitivity analysis was performed in this section to evaluate the effect of time step variations from 5 minutes to 1 hour on the system performance. As shown in Figure 18, the best economic performance was achieved by setting the time step to 5 minutes, which gave an NPC of $109,982. This can be explained by the fact that reducing the time step led to an increase in the number of times of cost comparison, which led to a minimum possible cost. At the same time, the most environmentally friendly system could also be obtained when the time step was set to 5 minutes; in such a case, the CO2 emissions were 26,257 kg/year.

Time
Step The system operation was simulated by performing energy balance calculations in every time step for 8760 hours in a year. A comparison between the output power of the available energy sources and load demand was conducted at every time step, and the flow of energy from and to every component in the system was investigated. For a system that included a generator and a battery, a decision was made at each time step on the operation of the generator and whether to charge or discharge the battery. Sensitivity analysis was performed in this section to evaluate the effect of time step variations from 5 minutes to 1 hour on the system performance. As shown in Figure 18, the best economic performance was achieved by setting the time step to 5 minutes, which gave an NPC of $109,982. This can be explained by the fact that reducing the time step led to an increase in the number of times of cost comparison, which led to a minimum possible cost. At the same time, the most environmentally friendly system could also be obtained when the time step was set to 5 minutes; in such a case, the CO2 emissions were 26,257 kg/year.

Solar Radiation
Global solar radiation intensity and the efficiency of the solar panels play a significant role in the harvesting of solar energy in the HESs. The power produced by the PV panels increases when the solar radiation increases and vice-versa; hence, the variation of solar radiation can significantly affect the performance of the system. In this subsection, the annual average global solar radiation was varied between 4 kWh/m 2 /day and 6 kWh/m 2 /day. Figure 19 shows the graph of NPC and CO 2 , with the variation of solar radiation. The NPC and CO 2 of the system decreased from $113,792 to $107,627 and from $35,038/kWh to $26,874/kWh, respectively, when solar radiation increased from 4 kWh/m 2 /day to 6 kWh/m 2 /day. The decrements of NPC and CO 2 occurred because the increase of solar radiation increased the output power of PV; hence, the generator operation hours and fuel consumption were reduced.
Global solar radiation intensity and the efficiency of the solar panels play a significant role in the harvesting of solar energy in the HESs. The power produced by the PV panels increases when the solar radiation increases and vice-versa; hence, the variation of solar radiation can significantly affect the performance of the system. In this subsection, the annual average global solar radiation was varied between 4 kWh/m 2 /day and 6 kWh/m 2 /day. Figure 19 shows the graph of NPC and CO2, with the variation of solar radiation. The NPC and CO2 of the system decreased from $113,792 to $107,627 and from $35,038/kWh to $26,874/kWh, respectively, when solar radiation increased from 4 kWh/m 2 /day to 6 kWh/m 2 /day. The decrements of NPC and CO2 occurred because the increase of solar radiation increased the output power of PV; hence, the generator operation hours and fuel consumption were reduced. Figure 19. Impact of solar radiation on CO2 emissions and NPC.

Diesel Fuel Price
It is well known that the fuel price fluctuates continuously. The fuel price fluctuations encourage the use of renewable energy technologies, which offer stabilization of electricity costs [59]. The current price of diesel in Iraq is about $0.4/L with some variability from time to time. To investigate the effect of diesel fuel variation on the system performance, a sensitivity analysis was done by varying the price between $0.25/L and $0.55/L. The impact of diesel price variation on the NPC and CO2 is depicted in Figure 20. It is obvious that with the rise in diesel fuel price from 0.25/L and $0.55/L, CO2 emissions decreased from 34,683 kg/year to 26,578 kg/year while NPC increased from $91,051 to $126,989. These results can be explained by the fact that a rise in diesel price led to making the utilization of the diesel generator less competitive. Therefore, the generator working hours were reduced, which affected the optimal power flow of the system.  Figure 19. Impact of solar radiation on CO 2 emissions and NPC.

Diesel Fuel Price
It is well known that the fuel price fluctuates continuously. The fuel price fluctuations encourage the use of renewable energy technologies, which offer stabilization of electricity costs [59]. The current price of diesel in Iraq is about $0.4/L with some variability from time to time. To investigate the effect of diesel fuel variation on the system performance, a sensitivity analysis was done by varying the price between $0.25/L and $0.55/L. The impact of diesel price variation on the NPC and CO 2 is depicted in Figure 20. It is obvious that with the rise in diesel fuel price from 0.25/L and $0.55/L, CO 2 emissions decreased from 34,683 kg/year to 26,578 kg/year while NPC increased from $91,051 to $126,989. These results can be explained by the fact that a rise in diesel price led to making the utilization of the diesel generator less competitive. Therefore, the generator working hours were reduced, which affected the optimal power flow of the system.

Load Consumption Growth
The output power of an energy system depends on the load requirements that should be satisfied all the time. If the load consumption increases, the energy production should imperatively be increased. The load demand is usually varied from time to time. In this subsection, different load consumptions (145, 150, 155, 160, 165, 170, 175, and 180 kWh/day) were considered to investigate their impact on the system performance. The effect of load consumption growth on the NPC and CO2

Load Consumption Growth
The output power of an energy system depends on the load requirements that should be satisfied all the time. If the load consumption increases, the energy production should imperatively be increased. The load demand is usually varied from time to time. In this subsection, different load consumptions (145, 150, 155, 160, 165, 170, 175, and 180 kWh/day) were considered to investigate their impact on the system performance. The effect of load consumption growth on the NPC and CO 2 is presented in Figure 21. The results indicate that NPC and CO 2 of the system increased by 22.6% and 52.3%, respectively, when the load consumption increased from 145 kWh/day to 180 kWh/day. The increments of NPC and CO 2 were mainly due to the increase of the required capacity of the different components of the system, including the diesel generator to increase the energy productions of the system.

Load Consumption Growth
The output power of an energy system depends on the load requirements that should be satisfied all the time. If the load consumption increases, the energy production should imperatively be increased. The load demand is usually varied from time to time. In this subsection, different load consumptions (145, 150, 155, 160, 165, 170, 175, and 180 kWh/day) were considered to investigate their impact on the system performance. The effect of load consumption growth on the NPC and CO2 is presented in Figure 21. The results indicate that NPC and CO2 of the system increased by 22.6% and 52.3%, respectively, when the load consumption increased from 145 kWh/day to 180 kWh/day. The increments of NPC and CO2 were mainly due to the increase of the required capacity of the different components of the system, including the diesel generator to increase the energy productions of the system.

Conclusions
Optimization of energy sources is a critical key in the assessment of the feasibility of HESs. This study presents an optimal plan and design by providing a systematic techno-economic and environmental evaluation of a PV/diesel/battery off-grid configuration for a rural area in Iraq. Three different control strategies were proposed in this study, i.e., LF, CC, and CD. HOMER software was used to evaluate the overall analyses, including the optimization and sensitivity. The cost analysis results show that the combination of 19.4 kW PV, a diesel generator with a 21 kW capacity, 220 batteries, and an 8.05 kW power converter with the CD strategy was the optimal solution for this case study by having an NPC of $110,191 and a COE of 0.21 $/kWh, which were 20.6% and 4.8% less expensive than the systems under the LF and CC strategies, respectively. Moreover, minimum fuel consumption made the CD dispatch strategy the most suitable option for the environment, considering its CO 2 emissions of 27,678, which were 1.7% and 23.9% lower than those of the LF and CC strategies, respectively. Furthermore, sensitivity analysis showed that variations in some important parameters, such as battery minimum SOC, time step, solar radiation, diesel price, and load growth, had significant effects on system performance. This study could play a vital role in decision making towards better energy management strategies.