Optimization of Energy Management of a Microgrid Based on Solar-Diesel-Battery Hybrid System

Hybrid systems, which are composed of combinations of diesel generators, battery energy storage system and renewable energy resources such as photovoltaic, are outlined as a recommended approach for off grid power supply options for remote areas applications. Since these systems are not connected to an infinite source of energy, they must be well designed and controlled to satisfy the demand load. This study presents an efficient battery management strategy for the charging and discharging of the batteries in a hybrid renewable energy systems by controlling the energy flow between different components of the system. In order to simulate the developed battery management strategy, the components of the hybrid system are studied and modeled using mathematical models. During modeling of the battery storage system, the effects of aging and capacity degradation were taken into consideration. The simulation of the strategy was based on a case study, where it is validated to be functional. Finally, the optimization of the strategy has been done by working on its critical parameters. Keywords— Hybrid renewable energy systems; energy storage; battery; PV; energy management strategy; optimization.


I. INTRODUCTION
Public interconnected power grids are composed of complex combinations of generation plants, substations, transformers and transmission lines, which supply electricity to cities, businesses and industry. In addition, there are smaller independent power grids that provide power to islands or remote areas, which have limited or no access to public interconnected grids. Traditionally, small stand-alone grids are electrified by diesel generators. However, the renewable energy resources are attractive sources of power, since they can provide sustainable and clean power. Hybrid plants can be an integration of diesel generators with renewable energy resources such as photovoltaic. Because of its intermittent and irregular nature, PV generation makes hybrid system management harder. Consequently, for some authors [1][2], PV production into the grid is considered to be limited [3]. One of the major challenges for PV systems remains in the matching of the intermittent energy production with the dynamic power demand. A solution is to add a storage element to these nonconventional and intermittent power sources [4][5]. In this case, the hybrid system is composed of a PV generator, local loads, electricity storage, and the conventional source (diesel genset) [5]. In addition, integrating a battery energy storage system with the hybrid plant provides significant dynamic operation benefits such as higher stability and reliability of power supply.
More recently, hybrid renewable energy systems (HRESs) are gaining popularity for their environmental friendliness and potential economic benefit. However, HRESs have not yet dominated in the market due mainly to their high price. One of the major factors leading for this high price is the high battery cost. Thus, manufacturers have been focusing on the reduction of battery cost to increase their market share. An effective battery management strategy (BMS) can reduce the required number of battery cells and extend the replacement period, hence reducing the battery cost. As part of our objective of designing such a BMS, we will in this study focus on extending batteries' life with respect to the whole investment life which has significant impact on the battery cost.
Battery life is defined as the duration (measured in the number of cycles or elapsed time) of a rechargeable battery until it degrades irreversibly and cannot hold a useful capacity of the underlying applications [5]. That is, the battery capacity monotonically decreases with time, and will never be recovered. Among the various reasons for battery capacity degradation, the discharge/charge rate is reported to be the most critical. For example, a continuous exposure to high discharge current leads to fast capacity degradation thus shortens the battery's life, which is unavoidable due to sudden changes in the power requirement, such as motor start-up. To extend the battery life, researchers focused on management strategies that use more than one charging/discharging modes.
In this study we will elaborate an advanced battery management strategy that best saves battery life-time respecting some constrains and system conditions. We will take a case study and size the hybrid system, so we can take it as a reference to simulate our strategy.

II. TOPOLOGY OF THE HYBRID SYSTEM
Before focusing on each component in the system, the overall topology must be defined in order to specify these components and define their role. A scheme of the studied system is presented in Figure 1. The different power directions are represented. The sign convention in Figure 1 is used as a reference throughout the whole paper. The main components of the hybrid system are the PV generator, the batteries' energy storage, the user loads and dump load, the diesel generator, and the electronics power converters. The parameters and, respectively, the values of the state of charge and state of health of the batteries, with calculations are detailed in following sections. According to the sign convention, the laws of physics require the power balance in the system described by: With P DIESEL , P PV and P BAT are the power supplied by the diesel and photovoltaic solar power plants and battery energy storage, respectively. P LOAD and P DUMP LOAD are the power absorbed by the main load and the dump load respectively. Figure 1: Power direction and sign convention in the studied system [3] The main concept of this system is to generate electric energy from all possible sources and in any form (AC or DC and in any frequency) and transform them into appropriate voltage by using converters in order to supply storage system or loads. Many other sources could be added (Wind, hydro…) in the same concept to increase the quantity of collected renewable energy, but this would increase the system complexity and makes its study harder.
The battery bank will insure the autonomy of the system. It is equipped with a special DC/DC converter that controls the charging and discharging of the battery. The bidirectional inverter may control other components in the system in order to apply the best battery management strategy.

A. PV system
The method selected to model the PV array, in this study, involves simply using mathematical equations to calculate the current and voltage generated at the specified temperature and irradiance from the power generated at Standard Temperature Conditions (STC) by analyzing the factors concerned and determining how they would affect the power generated. STC is defined as 1000W/m 2 irradiance, temperature of 25C and air mass of 1.5 (corresponds to 48.2 incidence angle). If the charge controller includes a MPPT system, the PV panels always work at the maximum power point of the I = f (V) curve, so the output current of the PV generator is as follows [6]: (2) Where I mp is the operating current at maximum power point and is given in the datasheet of the PV panel. Also the output voltage of the panel with MPPT controller is: Therefore, the resulting output power of the PV system with MPPT is: (4)

B. Diesel generator
In this study we are studying the efficient power flow control and management to realize the best strategy that reduces the operational costs of the hybrid system. Since the diesel generator is an automated complete system that gives the demanded output power with stable voltage and frequency values, the internal function and composition of the system may not be our major interest. The most important issue that we must consider is the fuel consumption of the power generator and its relation with the demand load. Figure 2 shows the diesel fuel consumption of a 15 KVAsingle phase generating set as per manufacturer datasheet [7]. The relation between the hourly fuel consumption and the percentage of nominal load on the generator is nearly linear. Using linear interpolation methods, this graph could be used to model the generator and calculate its fuel consumption over the hours of operation.   [8] The relation between the state of charge (SOC) and the open circuit voltage (Voc) is supposed to be linear as in the following equation [8]: (5) Where U max is open circuit voltage at full battery and U min is the open circuit voltage at empty battery, these values are taken from the battery manufacturer datasheet.
The charging current of the battery can be controlled by the charging voltage on the battery terminals. This current can be calculated as in the following equation [9]: Where a is the coefficient that allows the adjustment of the equation, it can be calculated by substituting experimental values of current and state of charge.
The state of charge must also be modeled so our battery model is complete. The state of charge is changed in two cases, charging and discharging [10].
 During charging: Where η bat is the round-trip efficiency of the battery, it reflects the charging efficiency of the battery, since not all energy injected in the battery can be stored, certainly there will be losses. This factor has values between 0.7 and 0.85 during charging and is equal to 1 during discharging process. t is the charging time and C b is the full battery capacity [10].

b) Cycling and Capacity Degradation
Modeling lifetime of batteries is a very important aspect of hybrid power system simulation because the uncertainty associated with the expected lifetime of the batteries makes the estimates of cost of energy of the projects very uncertain. Since the life cycle cost of the batteries is one of the significant power system expenses it is a major source of uncertainty for potential power system investors.
Many factors affect the life of the batteries, including the depth of the charge -discharge cycles, the current, the cell voltage, the performance of the charge controller (e.g., voltage and state of charge limits and regulation), the length of time that the batteries are in a low state of charge, the time since the last full charge, the temperature, etc.
Many studies have been published about the simulation and optimization of renewable stand-alone systems including batteries. However, the battery lifetime has always been estimated in fixed values based on the experience of many researchers or it has been estimated by calculating the number of equivalent full cycles. In the best cases, it may be estimated using the cycle counting method (CCM).
The CCM assumes that a complete cycle is reached the Ah-throughput is equal to the nominal battery capacity. The estimation of the lifetime consists of adding the charge (Ah throughput) cycled by the battery and calculating the number of full cycles (Z N ) as follows [8]: (9) Where I disch is the absolute value of the discharge current. C N is the nominal battery full capacity. The end of life of the battery is reached when the degradation of the battery capacity reaches 80% of its nominal capacity. This capacity loss by degradation can be calculated from the Schiffer equation [8]: (10) Where Z IEC is the total number of cycles estimated by the manufacturer according the IEC standards. Therefore, the remaining battery capacity is difference between the initial nominal capacity and the capacity loss by degradation: (11) IV. BATTERY MANAGEMENT SYSTEM In order to elaborate, simulate and validate the management strategy, a data base is necessary. For this reason, we recovered the data of solar irradiance, ambient temperature, and of electrical load of the diesel engine on the experimental site situated at Canada (Latitude: +48.83, Longitude: -64.48) [10][11]. These data will be used to sizing the hybrid renewable energy system in order put a strategy compatible with it. Taking into consideration the previously discussed constraints and priorities, and starting from the studied models of the system components, and taking the data of the case study as a reference, we elaborated the control and management strategy of the PV-Diesel-Battery hybrid system. The flow chart in Figure 4 shows the strategy as an infinite loop that reads inputs from an external source each period of time and gives the outputs during this period. After the system parameters are initialized, the inputs must be read, which are the solar irradiation G, the demanded power by load P load and the ambient temperature T a . This data is taken from the case study profile table that gives a sample every 10 minutes. According to the mathematical model of the PV system, the temperature of the panel and the PV system output current and voltage are calculated. Losses in the converters are also taken into consideration. Based on these information, the power flows are correctly dispatched between the different sources (PV, diesel), loads (principal and dump loads) and battery energy storage in order to ensure the minimum cost per kilowatt-hour produced from the hybrid system and a long cycle-life of the batteries.

A. Validation of the energy management strategy
The input data of the load power consumption, the solar irradiation and the ambient temperature used to simulate and validate the management energy strategy, are given in a form of 10 minutes samples. The time samples are reduced to 10 minutes instead of 1 hour to have more accurate results. The strategy was validated on a two days input profile. Figure 5 to Figure 11 illustrate the obtained results. As we see in the Figures 5 and 6, load varies too much with time. The strategy must handle this variation well and satisfy the load. The following is the PV power produced; it seems to be very similar to the solar irradiation. This convergence is due to the absence of the effect of temperature, since this effect is very slight at temperature near 20°C.  Figure 7 shows the variation of the power charged into the batteries over the two days of simulation. As it is clear, the batteries are charging at times high solar irradiation, and the charging current (since the charging is done at constant voltage) decreases after the charging process starts, which is a true character of batteries and agrees with the charging characteristic given by the manufacturer [12]. Figure 8 shows the variation of the state of charge of the batteries. During the charging times, the SOC increases and during the discharging times it decreases. Also it is clear that there is a limitation of the SOC decrease to 0.3 or 30% of battery capacity. Figure 9 shows the evolution of the consumed battery cycles. As the battery model previously described, the cycle counting is done during the discharge of the batteries, and this is clear in the graph. As we see also in Figure 18, the capacity of the battery is slightly decreasing, and this is a result of degradation due to cycling. Figure 10 and Figure 11 show the generator output power and the fuel consumed. They seem to be proportional, and this result was expected from the characteristic given by the manufacturer [7]. As it is clear the generator only turns on at the time where the state of charge reached 0.3 (between 1500 and 2000 minute), which is when the batteries are almost empty and there is no solar irradiation. All the preceding results are very logical and reasonable and this gives a validation of the work. It confirms that the strategy is working well and can be used to control any similar hybrid renewable energy system.

B. Optimization
During the optimization process we will add a new parameter that is to be calculated to evaluate the management strategy well and study it financially, which is the cost per hour of operation and maintenance of the system. The operating costs include the price of fuel consumed, the costs of generator maintenance and cost battery storage system over the total life time of batteries [13][14][15][16][17][18][19]. In order to fair compare strategies we will calculate the hourly operating cost of the system as an average of total life time.
The cost of diesel fuel in Canada is 1.3 USD per liter [13]. The generator oil must be changed every 250 operating hours [13]. The oil capacity of the generator is 10.6 liters; the average price of the liter is 7 US dollars [13], so the oil cost will be 10.6*7/250 = 0.29 USD per operating hours. The other maintenance works can be estimated to be 0.13 USD/hr. Thus, the oil changing and maintenance cost can be totally calculated as 0.29 + 0.13 = 0.42 USD per operating hours.
The batteries have limited life time and must be replaced periodically, so we must include the price of batteries divided on the working hours to calculate the hourly operational costs. The cost of a 200Ah Yuasa lead acid battery is 300 USD [13].
The system contains 56 batteries; their total cost is 16'800 USD.
The following formula lets us evaluate the operating costs of the system under the management strategy: (12) Where is the total cost of batteries, is the cost of fuel per liter, is the consumed volume of diesel, is the cost of generator maintenance per operating hours, is the generator operating hours and is the total operating hours of the system until batteries failure (Battery life time). In this way we can calculate the operating costs of the system per one hour.
The parameter we will work on optimizing is the minimum value of the state of charge reached by the battery storage system . As it is expected, when the minimum allowed state of charge value is increased, this means that the dependence on the batteries decreases and the batteries life time will be extended. On the other hand the dependence on the diesel generators will increase, so the costs of diesel fuel and generator maintenance will increase also. This is shown in the Figure 12 and Figure 13.
The increase of battery life reduces the operation costs per hour, because the price of batteries will be divided on more working hours. The Figure 14 shows the results of simulation.  Figure 14 shows the operational costs of the system per hour as compared with the reference case, which is using only the diesel generator to run the system. It is obviously clear that all cases are less than the reference case, which confirms and validates more the strategy. Another result that we can see from this comparison is that at = 0.8 we have minimum operation costs. This gives us a conclusion that it is not true to discharge the battery completely to get best advantage of it; there is a value between 0 and 1 that gives the best interest. Our calculated optimal is 0.8, this value is subject to the real values of fuel price, battery price and maintenance costs.

VI. CONCLUSION
In this study, an advanced battery management strategy that controls the charging and discharging of the batteries in a hybrid renewable energy system was developed. The hybrid renewable energy system that we have chosen to incorporate our management strategy is a hybrid PV-Diesel-battery offgrid system. The system was explained in details in all its components starting from the PV solar system to battery storage system to the diesel generator reaching the smallest components. The components have been developed into mathematical models. The model of the PV system has given power, voltage and current output from the MPPT controller. The batteries have been associated a model that estimates the consumed charging current, calculates the change of state of charge upon charging or discharging of the battery, counts the consumed life time cycles of the battery and consider the evolution of the battery capacity after degradation with time. The diesel generator model has focused on counting the quantity of consumed diesel fuel during the operation of the system. Before developing the battery management strategy, we have determined the necessary and recommended conditions and constraints that must be respected in the strategy. A case study has been taken and its hybrid system has been sized, thus the management strategy can be simulated on a real base.
We have validated that the developed battery management strategy can control the power flow in a hybrid renewable energy system to charge and discharge the battery in the right way and the right time, taking into consideration the battery protection, life time and capacity degradation. As to optimize the strategy, we worked on optimizing some parameters. A good indication to evaluate the management strategy is the operational cost per hour of the system; this value was used in our comparative optimization. The first parameter that was optimized was the minimal allowed value of state of charge of the batteries. We run our system in same conditions and varied ; the minimal operating cost was at . Another parameter can be studied and presented in another works such as the number of batteries in the system and the number of the diesel generator.
As a final conclusion, we can say that using an efficient battery management strategy in a hybrid renewable energy system can increase the performance of the system and make it more reliable, it can decrease the operational cost of the system by extending the life time of the batteries and can decrease the investment costs by decreasing the number of needed batteries for the same reliability and efficiency.