Optimal Sizing of Battery Energy Storage for Grid-Connected and Isolated Wind-Penetrated Microgrid

Renewable energy (RE) sources, particularly wind and solar are gaining more popularity due to their inherent benefits, consequently, nations have set ambitious goals to enhance the penetration of RE into their energy-mix. However, the RE sources especially wind and photovoltaic sources are intermittent, uncertain, and unpredictable. Therefore, there is a need to optimize their usage when they are available. Moreover, energy storage system like battery energy storage has much potential to support the RE integration with the power grid. This study, therefore, investigates the sizes of battery energy storage required to support a grid-connected microgrid and a stand-alone microgrid for 12 months considering hourly wind power potential. In this study, we have considered three Scenarios of operations and have determined the BESS sizes and recommend the best based on the cost of operation. Scenarios 1 and 2 are grid-connected configuration while Scenario 3 is a standalone microgrid supported with diesel generators. In each Scenario, the optimization problem is formulated based on the optimal operation cost of the microgrids. The powers consumed from the main grid are reported in Scenarios 1 & 2 and the extra cost spent on the maintenance of diesel generators is reported in Scenario 3. The study evaluates and analyzes the operational environmental effects and costs between the three Scenarios. The formulated problems are solved using the nonlinear optimization method. Simulations results proved the effectiveness of the study.


I. INTRODUCTION
Wind power is gaining more popularity in recent years as many countries are endeavoring to explore the wind power potential in terms of integration into the microgrid. It was reported in [1] that the renewable power capacity of the world increased by 8% in 2018 alone with more than 90 countries have added up to 1GW of renewable power out of which more than 30 had above 10GW. The global renewable power capacity trends is in shown in Figure 1. Besides, the electricity sector seems to be the hottest spot for renewable energy like The associate editor coordinating the review of this manuscript and approving it for publication was Dwarkadas Pralhaddas Kothari. wind power and photovoltaic (PV) to thrive following the growing installation of wind and PV across the world [1].
Moreover, with the growth in electricity demand across the world, there are pressures on the need to find alternative clean sources of electricity to replace or to be added to the existing fossil fuel sources which is currently under the pressure of being faced out due to its popular greenhouse gases' emissions known to be hazardous to our friendly environment. Following the reports of the installation of more renewable generation (including wind and PV) than fossil fuel generation across the world [1], [2], there are corresponding reports that the price of electricity is becoming cheaper and emission of greenhouse gasses due to electricity generation are also decreasing [3]. An important aspect of renewable power generation is its integration with the existing utility system. To achieve this, microgrids are built to form many interconnected systems. the microgrid has good features that make it work efficiently to support a constant varying load. Thanks to ESS like BESS which can be employed to support the microgrid for its smooth operation. However, the grid-connected microgrid relies on the support from the main grid during load variation and fluctuations from the RES at a given time. The microgrid is characterized by some features which makes it very reliable and efficient in its operation. These features include distributed generators like diesel generator or thermal plants, storage systems, and dumped load [4]. Furthermore, these features differentiate microgrids from centralized systems. The centralized systems are made of conventional generators and interconnection of transmission lines. Unlike in microgrid systems, where the cost of operation is extremely minimal because the operation cost is nearly negligible, the centralized system is far more expensive in terms of operation and maintenance. An interconnected system of a future distribution utility grid system is shown in Figure 2.
Also, a key component of the microgrid system is the ESS which provides great support for the microgrid during its operation. For example, the BESS performs the job of load leveling, peak shifting to support the peak demand [5]. Under these conditions, the ESS itself acts as a load. Besides, ESS can store electricity from the grid at times when the price of electricity is low and is sold to the customers at times of high prices. This provides a good economic benefit for the microgrid operators. Different types of storage technologies and their applications have been discussed in [5], [6]. ESS have different features, for example, some of the technologies differ in charging and discharging rates, energy, and power capacity characteristics [7], [8]. Consequently, storage technologies differ in sizes and weights. Figure 5 shows a comparison of the characteristics of different ESS technologies.
It is important to find the optimal size of the ESS during the operation of a microgrid. This is because the ESS especially BESS are expensive in terms of MW and MWh. Besides the overall economic cost of operation of the microgrid include the investment on the ESS. To find the optimal size of BESS, several strategies have been proposed in [10]- [16]. Besides, a critical review of energy management systems in microgrid was presented [17], the study discussed different methods, solutions, and benefits in microgrid management. The authors did an analysis of certain decisions for managing the uncertainty and intermittency that are associated with RE sources and demand. Moreover, the study discussed the implementation of cost-effective based on communication technology for future and real-world problems. In [12], a life cycle planning methodology of BESS in microgrids was presented and the optimal sizes of BESS were obtained under multi-scaled decision parameters to meet the demand growth. The authors in [13] find the optimal values of BESS for an islanded DC microgrid using an incremental cost approach while the authors in [16] used the convex optimization technique for minimization of the unit a unit commitment problem. However, the study in [13] evaluates the feasibility of installing a given battery unit to achieve the minimum running cost. In [14], the authors consider the efficiency of power supply probability and energy cost to size the BESS using the grasshopper optimization algorithm. The study was done under an islanded operated microgrid penetrated with wind, solar PV and diesel generators, and its results were compared with other metaheuristic optimizers.
Authors in [18] have done the optimizing of BESS in hybrid wind and solar for a grid-connected microgrid system. The study carried out source-sizing and battery sizing to maximize reliability and minimize cost. In [19], the authors proposed a power exchange strategy based on a schedule pattern between regions for determining power-sharing between BESS and distributed generators in a wind penetrated islanded microgrid. In [20], a double layer strategy was developed for the sizing of BESS in an energy management strategy for an islanded microgrid. The developed model was divided into an outer and inner loop, the optimization problem is then solved using iterative and dynamic programming method. Authors in [10], [21] considered the battery life of BESS in a wind-ESS penetrated microgrid. In [21], the component sizing of the lithium battery was done by formulating an objective function based on capacity degradation of the BESS and operation cost of the BESS. Simulations done by the rule-based and genetic algorithm showed that the operation cost was well optimized. Besides authors in [10] considers the depth of discharge of the BESS when modeling the real-time battery operation cost. The firefly algorithm used for the simulation shows that the operation cost was well minimized.
Authors in [22]- [25] have discussed the methods of integration of REGs into the distribution systems. In [26], a review of Optimal planning of distributed generation in distribution systems was presented. The study reviewed the effect of operating characteristics and conditions of the DG system such as voltage profile, electric losses, reliability, and stability. Although the sizing of BESS for wind energy has been done in literature, there are only a few studies that compare the cases presented in this paper. Moreover, this study evaluates the effect of monthly variation of wind power from the studied site.
M. F. Zia et al [27] presented a study of operational planning of scalable DC microgrid, the study considered the effect of costs due to battery degradation, demand response and islanding operation of the microgrid. The authors argued that their findings could aid the future implementation of DC microgrids. Although the study computed levelized cost in cold and hot climate regions with special consideration for losses in the systems and nodal voltages, the study neither reports the rated energy and rated power nor the actual months referred to as the cold or hot weather. Furthermore, only a few of the studies reviewed so far have considered the specific scenarios investigated in this study. This paper, therefore, presents the sizing of BESS for a wind penetrated grid-connected microgrid and stand-alone microgrid for 12 calendar months. Optimization was done for 24 hours using the methods of linear programming and nonlinear programming each month under the three Scenarios considered and based on the operation cost of the microgrid. Also, the rated energy capacities, rated power capacities of BESS, and optimal operation costs of the microgrid were computed for all scenarios. Besides, the case study considered in this study has a unique wind profile and has shown characteristics with interesting results.
The uniqueness of the work in this study are summarized as follows: (1) Our study carried out sizing and observation of BESS for 12 calendar months; taking note of the variability that exists within each month in terms of operation cost and BESS investment. (2) The case study considered in this study is unique in that the wind data obtained from the Khafji site shows unusual characteristics when compared with data obtained from other sites. For example, wind power in the month of June and July are so high that we have had to introduce dump loads and the effects of the dump load are observed. (3) Finally, the assumed scenarios in this study differentiate our study from many others seen in the literature. Our findings suggest where future improvement could be examined.
The rest of this paper is organized as follows: Section II presents the problem formulation and the studied Scenarios. Section III discussed the methodology and all assumed constraints are explained in this section. Section IV presents the case study used to test the proposed methodology, Section V shows the simulation results, and Section VI is the conclusion of the paper.

II. PROBLEM FORMULATION
In the formulation of the proposed strategy, a wind power microgrid system of the types shown in Figure 3 is presented The optimal operation cost of the microgrid is computed, leading to optimal sizes of energy capacity, E max b and power capacity, P max b of the BESS. In Scenario 1, the microgrid is grid-connected and the other sources of power apart from the windfarm are the grid and the BESS. The optimal sizes of BESS required to operate the microgrid optimally for 24 hours are computed. The microgrid is operated such that maximum power is consumed from the wind power P w , and also to ensure that grid power, P g imported is minimized as much as possible. In Scenario 2, the microgrid is off-grid but three diesel generators are used as backups for the system. It is desired that the generators operate for minimum times so that power P i , is only consumed from a unit i, this ensures that wind power is efficiently utilized. The BESS is connected to the microgrid at the point of common coupling. Charging and discharging of the BESS takes place through the power converters which allow for proper control during smooth operation, however, the converter topologies and their control are not discussed in this paper. In both Scenarios, the BESS is discharged during hours of high demand P D and or lower P w , and it is charged during the hours of low demand and or higher wind output. However, the BESS power, P b and energy, E b at any time during its operation are maintained between P max b and E max b . In order to prevent over-charging and consequently over-sizing of the BESS during the hours of high generation from the wind farm, the excess power is allowed to dispatch through the dump load, P dump attached to the microgrid in Figure 3. These strategies adopted ensured efficient power management optimal sizing of the BESS within the microgrid. A flowchart showing a brief description of the algorithm used to solve the optimization problems is shown VOLUME 8, 2020 in Figure 4. The adopted strategies in this paper summarized into Scenarios 1, 2 and 3 are as follows: It is assumed that the wind farm can supply substantial power to meet the demand at any point in time, the microgrid is grid-connected and the excess power can be sold to the grid. However, if the wind source is not enough to meet the demand, power can be bought from the grid to meet the supply or to charge the BESS.

2) SCENARIO 2
There is enough power from the wind farm to meet the load, the BESS is fully charged but the grid is not ready to buy power from the microgrid. So the excess power is dispatch through the dump load to prevent overcharging and oversizing of the BESS.

3) SCENARIO 3
The microgrid is off-grid, three diesel generators are connected to support the wind farm and the BESS. The generators start to operate only when the output from the wind farm is low and where the SOC of the BESS is low.

A. HYBRID MICROGRID SYSTEM
A microgrid system having three subsystems: power generation, power distribution, and power demand is called an isolated hybrid microgrid system. If a hybrid microgrid is connected to the main grid, then it is called a grid-connected hybrid microgrid system. In this section, the components of a hybrid microgrid system made up of DER (wind, diesel generators, and energy storage system), grid, load profile (residential, commercial and school & offices), and the microgrid itself are presented. The DER and grid serve as the generation subsystem while the load profile serves as the load subsystem and the microgrid is the distribution subsystem. Furthermore, the cost model of each of the subsystems is discussed.
A typical microgrid showing the components of the mentioned subsystems is shown in 2.

B. THE WIND TURBINE SUBSYSTEM
Wind power, P w is largely dependent on wind speed, v and the relationship between wind power and wind speed is cubical. The wind power PW t , at hour t, is usually calculated from the wind speed [28] as presented (2).
The wind power, expressed in is given by the (1).
where, A f is the swept area by rotor of the wind turbine, ρ is the density of air and K max is the power coefficient.
The daily cost of wind power dissipation, C wt , presented in [10] is given by the product of the initial cost of wind turbine and the power dispatch as in (3).
CRF is the capital recovery factor which can estimate the present value of the wind turbine with consideration given to lifetime of project and interest rate. This is expressed in (4).
However, C WT is given by (5). Where VWC is the value of wind curtailment and Pwc(t) is the wind power generation at time t.

C. DIESEL GENERATOR
A diesel generator in a microgrid acts as a backup source like energy storage when the available wind power cannot meet up with the demand. This way, it can improve the system's reliability and help to smooth the output power from the wind.
In [10], [29], the operation cost of diesel generators in terms of power dispatch is calculated using the equation formulated in (8). This equation includes the fuel cost FC and emission cost, EM . The FC is expressed in (6) where a i , b i and c i are fuel cost coefficients of generator unit i. Furthermore, the emission cost is included as part of the operation cost of the diesel generator [29]. The EM , is given by (7). So that the total operating cost of the diesel generator units becomes (8), d i , e i and f i are emission cost coefficients of generator unit i. The parameters of the diesel generators used in this study are given in Table 1.
where i is the unit index, I is the number of units, t is the hour index, T is the number of hours respectively. The quadratic function has been used to calculate the cost of the function of the generator because of the non-linearity of equation (6) which gives non-approximated results.

D. BATTERY ENERGY STORAGE MODEL
The BESS utilized in this paper is the lithium-ion based. The lithium-ion battery technology has a good power density, high energy density, high efficiency, and longer life cycle when compared with other technologies [30], [31]. Figure 5 shows the characteristics of some battery energy storage technologies. Principally the function of the BESS in a microgrid is to prevent power mismatch. It is known that the cost of ESS increases with an increase in depth of discharge (DOD) since the ESS discharge more powers. Moreover, a decrease in BESS discharge power leads to a decrease in the capacity of the ESS and consequently make the DOD be high. The formulation of the cost function of BESS power charge/discharge at any time t as a function DOD and battery power is presented in [10], [32]. However, the cost function utilized in this paper does not include DOD. The state of charge of the BESS represented by SOC is given by (9). Where η cha BESS and η disch BESS represent the charging and discharging efficiencies of the BESS. t is the incremental time for the optimization and has been taken as 1 hour in this paper.
Equations (10) formulates the BESS investment cost. The unit prices of ESS power and energy are the parameters in this equation. Besides, the required optimal sizes of the BESS are the rated power and energy of the BESS and they represent the decision variables.
where PC BESS is the power cost of the BESS per one MW, P max BESS is the rated power of the BESS, EC ESS is the energy cost of the BESS per megawatt-hour. P max BESS and E max BESS are respectively the rated power and rated energy of the BESS.

E. MAIN GRID
The main grid, interchangeably used as the grid or utility in this paper acts as another source of power to the microgrid apart from the wind farm, BESS, and diesel generator. Power is either bought (imported) from or sold (exported) to the grid. To compute the cost of power exchanged with the main grid, (11) is proposed. We assume a positive convention for power imported from the grid and a negative sign for the power exported from the main grid. The cost of exchanged power, η with the utility is assumed to be $20 per MW in this study. It is noted that the value of the objective function is more when power is imported and less when power is exported.
The P g (t) assumes a positive sign when power flows from the main grid to the microgrid and a negative when the power flows to the main grid from the microgrid.

F. DATA
The demand or load data in Figure 8 used for the formulation of the problem in this study is a real average load data made of residential, commercial, school and offices for the month of July from a city in Easter province of KSA as obtained in [33], besides different categories of demand of Eastern region of Saudi Arabia is reported in [34]. The wind data correspond to the average data of the year 2018 from January to December measured at the Khafji site. Wind speed is measured at height of 50m at an average density of 1.18Kgm −3 and temperature 43 degrees. The wind speed is shown in Figure 6 and the corresponding wind power calculated with a K max of 0.45 is shown in Figure 7 VOLUME 8, 2020

III. PROPOSED METHODOLOGY A. OBJECTIVE FUNCTION
The formulated problem inn each Scenario is based on the overall cost of operation of the microgrid and the objective function is to minimize this cost. The objective function is expressed in (12). The optimization problems are solved using the linear programming and non-linear programming (quadratically constraint optimization) in GAMS software for Scenarios (1 & 2) and Scenario 3 respectively.
Furthermore the associated constraints are listed in the following subsections.

B. SYSTEM CONSTRAINTS 1) BALANCE CONSTRAINT
The balance constraint is formulated as in (13): where P D (t) is the power demand at instant of hour t and dump (t) is the dump load. Pdump(t) is chosen such that P dump (t) < P w (t) − P D (t). Noting that P dump (t) is introduced in Scenario 2 and P i (t) is introduced in Scenario 3.

2) GRID CONSTRAINT
The exchanged power between the main grid and microgrid is limited because of the limit of the transmission line connecting the two systems. A constraint is needed to limit this power and it is dependent on the capacity of the transmission line.
where P max M is the maximum capacity of the transmission line connecting between the microgrid and main grid.

3) DIESEL GENERATOR CONSTRAINTS
The diesel generator output power are limited to the maximum and minimum output power of each of the generator. The constraint is expressed as: where P min i is the minimum power that can be produced by a unit DG i, P max i is the maximum power that can be produced by unit DG i and I is the set of units.

4) ENERGY STORAGE SYSTEM CONSTRAINTS
The BESS charging and discharging power is limited to its maximum power, which is its optimal size. The BESS acts as a load when it charges and acts as a generator when it discharges. Besides, it is assumed that when the BESS is in the charging mode, its power is negative and positive in the discharging mode. This constraint is formulated as: The stored energy in the BESS is limited by its rated energy. Of course, the stored energy is always positive. This constraint is formulated as: where E BESS (t) is the energy stored in the BESS at hour t. The equation to calculate the state of charge which essentially is the stored energy at a specific hour is formulated in (18). The δt is the unit optimization time which is equal to 1 hour in this study.

IV. CASE STUDY
In this study, a microgrid of the different configuration is considered. Sizing of the BESS is done for the different Scenarios as mentioned in section II. The load data are residential loads of a city in Easter Province while the wind data are obtained from the windographer station in Khafji also in the Eastern province of Saudi Arabia. To compute the resulting power using the wind power equation presented in (1). The value of K max is chosen as 0.45, ρ is 1.19 Kgm − 3 and radius of rotor turbine is 31 m. The wind power system is made up of 40 wind turbines with each having a rated capacity of 1MW. The wind speed and power are shown in Figures 6 and 7 respectively.

V. RESULTS AND DISCUSSION
The total operation costs for the three Scenarios together with the respective sizes of BESS are presented in Tables 2, 3 and 4. In Table 2, it is seen that operation cost is reduced  with the availability of more wind power. The highest operation cost is observed in January when the wind speed is low compared to the rest of the months. In June and July, there are enough wind powers to meet the maximum demand at all hours and the excess powers are sold to the grid so the lowest operation costs are negative in these two months resulting to profits of $2971.03 and $528.635 for June and July respectively as seen in Table 6. Besides the months of June and July requires lower BESS sizes when compared to other months since excess power has been sold to the grid, consequently, the abundant available wind power has little effects on the energy rating and the power ratings in these months. Moreover, it can be observed that the investment cost on BESS in June is the least amongst all other months. The investment on BESS in June appears to be larger than expected but this is due to the larger wind power availability that contributes to the sizes of the BESS rating. It can also be observed that January recorded the highest BESS investment cost.
The total operation cost in all Scenarios are presented in Figure 12 while the magnitude of exchanged power with grid for Scenarios 1 and 2 together with the power dispatched  by the DGs in Scenario 3 are shown in Figure 13. Figure 13 shows that powers are sold to the grid in Scenario 1 in the month of June and July only. Moreover lower operation costs are recorded in March and September due to lower exchanged power in the two months.
In Scenario 2, the microgrid does not sell power to the grid but could buy power from the grid. The optimal operation costs, sizes of BESS, investment cost, and power imported from the grid are as shown in Table 3 and Table 6 respectively. Since the power is not exported to the grid, the available wind power is used to supply the load and a part of this load is dispatched through the dump load. However, the operation costs and BESS sizes during the months of June and July are the highest in this case due to the large available wind power   that requires large-rated energies and rated powers as seen in Figures 10 and 11. Table 3 shows that the total operation cost and the total BESS sizes recorded for all months in Scenario 2 are higher than those of Scenario 1 and Scenario 3. The months of June and July contribute significantly to this cost as a result of the higher availability of wind power that surpasses the demand. Furthermore, Table 5 shows the huge amount recorded in Scenario 2 before the introduction of the dump load. When compared, the values from Table 5 and Table 6 showed that up to 59% and 35% savings on investment cost of the BESS are achievable for June and July respectively. Also in Table 6, it is seen that powers are not imported from the grid during the hours of these months. After June and July, higher operation cost is observed in March and February. However, BESS sizes in March and January are higher than in other months as observed in Table 3. Figure 9 compared the exchanged powers with the grid in Scenarios 1 and 2. The figure shows negative plots in June and July which indicates exported power in Scenario1.
It can be observed in Figures 10 and 11 that the rated energies and rated powers are equal in January and December for   all Scenarios. Besides, rated energies, as well as rated powers in April and November, are approximately equal for Scenarios 1 and 2. However, it is observed that rated energies and rated powers of BESS are mostly higher in Scenario 2 than other Scenarios. Table 6 shows the cost of power exchanged with grid and investment cost on the BESS. The Table shows that the total investment cost for BESS in Scenario 2 exceeds that of Scenario 1. Also, the total cost of the exchanged power for Scenario 2 is higher than in Scenario 1. This result shows that Scenario 1 is more economical than Scenario 2.
In Scenario 3, the operation costs and the BESS sizes (Table 4), and the cost of operating the diesel generators, (Table 7) are graphed in Figures 12 and 13 respectively. Generally, Scenario 2 is more expensive than Scenarios (1 and 3) with June and July having the highest. The huge cost in these months results from the high wind power availability of these two months since dump loads are not installed in this Scenario, the lowest fuel and emission costs are recorded in these two months. Although there are sufficient powers in  these two months to cater for the loads without supply from the DGs, the microgrid allows the DGs to run for some time to allow the generators to warm up. Table 7 shows the average amount spent as fuel and emission costs. It is observed that a higher amount is spent on fuel in January, October, May, and December, when compared to other months resorting to higher emission costs but not more than about 8% of the total cost of operation is recorded in each month. However, lower costs of fuel are recorded in June and July as may be expected. The total amount spent on DGs in Scenario 3 is about $1960. This amount is less than 4% of the total amount spent on operation in costs in Scenario 3. The amount shows how less dependent is the microgrid on the DGs, and by extension signifies how friendly the microgrid in Scenario 3 is to the environment. The total amount spent in 24 hour through all months in all Scenarios as observed in Tables 2, 3, and 4

VI. CONCLUSION
In this paper, optimal sizing of BESS for a wind-penetrated, grid-connected microgrid and standalone microgrid has been studied. In the three Scenarios considered, the sizes of BESS energy capacities and power capacities resulting from the minimum operational costs of the microgrid were computed. The optimization was done within 24 hours in every month from January to December. The microgrid in Scenarios 1 and 2 are grid-connected while Scenario 3 is a stand-alone microgrid. Simulations are done using the GAMS optimization software. The study found out that the microgrid of Scenario 1 is cheaper to operate than that of Scenario 2 or 3 and Scenario 2 is the most expensive. In particular, we have determined the minimum BESS investment cost needed for the operation of microgrid of the size proposed. Furthermore, our study revealed that hourly requirements of BESS are different every month in all Scenarios and Scenario 1 is the cheapest in terms of operation cost and investment cost of the BESS. Moreover, the study found that we can potentially save a significant amount in terms of BESS investment cost and the cost of emission of greenhouse gas. Finally, we conclude that the microgrid operation of the type proposed in Scenario 1 is very economical and worth to be considered for efficient dispatch of wind power.