Multi-Input Nonlinear Programming Based Deterministic Optimization Framework for Evaluating Microgrids with Optimal Renewable-Storage Energy Mix

: Integration of renewable energy sources (RES) in a distribution network facilities the establishment of sustainable power systems. Concurrently, the incorporation of energy storage system (ESS) plays a pivotal role to maintain the economical signiﬁcance as well as mitigates the technical liabilities associated with uncontrollable and ﬂuctuating renewable output power. Nevertheless, ESS technologies require additional investments that imposes a techno-economic challenge of selection, allocation and sizing to ensure a reliable power system that is operationally optimized with reduced cost. In this paper, a deterministic cost-optimization framework is presented based on a multi-input nonlinear programming to optimally solve the sizing and allocation problem. The optimization is performed to obviate the demand-generation mismatch, that is violated with the introduction of variable renewable energy sources. The proposed optimization method is tested and validated on an IEEE 24-bus network integrated with solar and wind energy sources. The deterministic approach is solved using GAMS optimization software considering the system data of one year. Based on the optimization framework, the study also presents various different scenarios of renewable energy mix in combination with advanced ESS technologies to outline an technical as well as economical framework for ESS sizing, allocation, and selection. Based on the optimal results obtained, the optimal sizing and allocation were obtained for lead-acid, lithium-ion, nickel-cadmium and sodium-sulfur (NaS) battery energy storage system. While all these storage technologies mitigated the demand-generation mismatch with optimal size and location. However, the NaS storage technology was found to be the best among the given storage technologies for the given system minimum possible cost. Furthermore, it was observed that the cost of hybrid wind-solar mix system results in the lowest overall cost.


Introduction
The concept of smart grid is widely used and accepted in the utility power industry, due to their benefits towards the environment conditions and economic potential as they enable the integration of small generators to the power network. Many governmental bodies are planning to increase the use of renewable resources at the local and regional level of the grid to meet the highest possibility of renewable integration and consequently reduce emission [1]. Smart grid enables the to establish a deregulated system. The interconnection of numerous distributed renewable generators, established as a microgrids at the local or regional level, have the potential to be coordinated and hence perform with an enhanced power quality and reliability [2]. Accordingly, this facilitates a guide to the system operators to plan network expansion in accordance with the load demand increase [3], and maintain the power quality of the power network appropriately with maximum benefits [4].
The utilization of energy storage system (ESS) is among the most widely used technique to facilitate increased renewable penetration [5]. One of ESS features is peak load shaving, which implies power exchange between storage systems and generation units, thus to store the power during off peak periods and discharge it during peak power periods [6,7]. Therefore, the stored power in the ESS can be charged/discharge in accordance with the system requirements which proves to be a source of revenue for private owners. On the other hand, power system planners should ensure power reserve allocation based on a day ahead renewable power predictions that relies heavily on the accuracy on the forecasted values [8]. Utilization of ESS technologies reduces the dependency of RES users and the utility towards the need for state-of-the-art forecasting algorithms and obviate their dependency on the degree of accuracy of the forecasted values, up to a certain extent [9].
An efficient methodology is proposed using spectral analysis of solar resources and wind energy that is linked with the daily load profiles considering an off-grid system [10]. In this study, the calculation of storage is applied for different levels of mean load. In [11], the incremental fluctuations of RES for various residential load scenarios are presented for mitigation. The security constrained unit commitment is achieved using a stochastic approach and solving the problem formulation through benders decomposition. In [12], residential ESS is enabled to mitigate the impact of RES output power fluctuation to facilitate sufficient system flexibility to the owners for commercialized market participation. The study determines the "cost of use" for lithium-ion battery energy storage system. Depending on the characteristics battery usage, that is determined based on the depth of discharge [13], the authors presented a multi-constrained and multi-objective optimization of the entire renewable integrated power grid with optimal allocation and size for RES as well as ESS. This derivation of the "cost of use" can be further implemented for economic optimization of renewable-battery coupled multi-energy [14].
Similarly, the authors in [15], posit a methodology that aims to obviate under-sizing and/or over-sizing of ESS. By searching all the possible solutions in the given search space they considered the forced outage rates of wind-solar hybrid energy system as well as the utilization factor of battery energy storage (BESS), which makes it more realistic scenario for derving the optimal ESS size. The research study in [16], presents an optimization framework that aims to maximise utilization of wind power, while optimally minimizing the operational and investment costs of the power network. The evaluation of microgrid reliability indices are considered as the evaluation parameters. Based on the wind speed modelling technique, this research calculates an optimal size and location of wind generators. Moreover, the study in [16] posits and effective optimization technique based on mixed-integer-nonlinear programming (MINLP) to allocate wind-based DG that can minimize energy losses. Conclusively, in areas that encounter high wind fluctuations the wind output power can be effectively smoothed through utilizing the energy buffering feature of ESS and hence maintain the integrity of the power network in terms of economical and uninterruptible power supply with appropriate power quality standards [17].
Accordingly, the research in [18], proposed a technique based on three-stage planning to optimally identify the size and location of distributed storage units. Firstly, the optimal storage parameters and locations have been determined individually for the entire year. Secondly, the optimal ratings pertaining to the energy and power is determined, and finally, the optimal operation for the ESS is derived to mitigate the congestion. In [19], a framework of DC-OPF for optimization for the storage portfolio is presented for a transmissionconstrained network. This proposition addresses two problems, that is, to achieve optimal ESS allocation and also maintain optimal ESS operation. This is formulated firstly to optimize the network integrity based on the power flow, and secondly, to suitably select the ESS technology and derive their optimal allocation. In this study, the ESS characteristics are optimized based on cost-efficient sizing algorithms.
Using ESS technologies for regulation of renewable power output is highly effective, where the storage system is applied to store renewable power and supply it appropriately to maintain the demand-generation requirement of the electricity flow. Thus, the ESS mitigates the impact of renewable resources integration to achieve a better load-demand mismatch profile and voltage stability [20]. Concurrently, selection of appropriate ESS technology govern their applicability not only towards energy management but also to enhance the power quality of a renewable integrated power network [21,22]. Therefore, the effectiveness of some algorithms as discussed in literature, reveals that the study of ESS allocation have been applied to different aspects which led to their application, in order to have a proper decision for renewable energy design and selection. In [23], methodology used to minimize a battery energy storage system (BESS) capacity, in a distributed configuration of wind power sources. The study in [24], address an analytical technique for power system to size BESSs along with wind farms based on worth analysis and reliability cost.
In this paper, we formulate a cost optimization framework of energy storage system to achieve optimal sizing and allocation based on a deterministic multi-input non linear programming (MINLP) technique that aims to mitigate the demand-generation mismatch. Therefore, based on the network constraints and AC-optimal power flow, a modified IEEE 24 bus reliability test system (RTS) is examined to validate the efficacy of the proposed methodology. Furthermore, a comparative analysis is performed to study the impact of different ESS technologies on the overall system cost. The RTS is evaluated by integrating renewable energy sources such as, solar and wind energy sources with advanced modern ESS technologies, namely, lead-acid, sodium-sulfur (NaS), nickel-cadmium (Ni-Cd) and Lithium-ion (Li-ion) batteries as shown in Figure 1. The contribution of this paper is summarized as follows: 1.
Cost optimization of energy storage system integration using the deterministic approach for optimal allocation and sizing to obviate the demand-generation mismatch.

2.
Evaluate the impact of numerous combination of renewables energy mix and identify its impact on the cost of energy storage requirement.

3.
Identification and selection between various technological mix of energy storage system in order to maximize the economical benefits as well as the technical integrity of the power quality in the system. Therefore, the study is implemented for a combination of four different cases of ESS types combined with four cases of renewable energy integration scenarios over a time period of one year. The study reflects on the importance of selecting the optimal technological ESS type to gain the least cost along with demand satisfaction as well as, ESS supply contribution to the microgrid.
The remainder of this paper is organized as follows. Section 2 illustrates the problem statement and description of the formulation used for identifying the optimal size and location of ESS. Section 3 shows the system constraint. Section 4 shows the simple case study to test the proposed technique for the system and it discusses the simulation and results after solving the optimization problem followed by the conclusion in Section 5.

Problem Formulation
The optimal operational schedule that determines optimal operational availability of the generators, renewable resources, and the storage units that is required to meet the entire load demand is solved using AC optimal power flow (AC-OPF) in GAMS software (CONOPT solver) [25], as shown in Figure 2. The optimal load flow ensures to maintain the system power quality integrity through the physical bounds and system constraints and hence optimizes the cost function on storage system including the power exchanged with network of utility grid. Therefore, the objective of this paper, is to optimally size the storage system to solve OPF problem, where the optimal power flow aims to calculate the power flow through transmission lines and the results are subjected to the constraints of power flow limits in the transmission lines. Moreover, OPF is used to compute the optimal selection of each generator.
Therefore, by aiming the optimal feasible solution of the total cost that includes operational and investment of storage system, the objective function (OF) is formulated as follows: Here, the active power generation by the thermal unit g situated at bus i for time interval t is presented as P g i,t is active power (MW), b g is the line charging susceptance from bus i to bus j. While the cost of investment (IC ESS ) that is required to establish the storage system as computed using the following equation: where, PC ESS is the cost of the required ESS power (MW), P ESS R is the rated power of storage energy, EC ESS is cost of energy (MWh) for the ESS, and E ESS R is energy rating of the required ESS storage system. Accordingly, the power flow (P ij,t ) from bus i to j at time interval t is formulated (3), that outlines the power generated from the conventional/renewable generating units, energy storage systems in accordance in with the load demand.
P S i,t is the real power of storage system for charging and discharging, the active power generation of the wind energy source at bus i time interval t is represented by P w i,t (MW), the active power component of the load demand at bus i for the time instant t is represented by P L i,t , the active power flow at time instant t from bus i to bus j is presented using P ij,t . The active power generated by the solar energy source situated at bus i for the time instant t is depicted as P pv i,t (MW), and the number thermal generation unit situated at bus i is defined using Ω i G , and Ω i depicts the number of buses that are connected to bus i. Furthermore, the charging/discharging of the ESS is emulated using their respective charging/discharging coefficients (η c /η d ) as follows: The reactive power flow is equal to the difference of the reactive power generated and reactive power of the load in the system is computed using the following equation: where, the generated reactive power by the thermal unit g situated at bus i during time interval t is represented using Q g i,t , Q L i,t represent the reactive power component of the load demand at bus i at at a particular time interval t, and the reactive power flow between bus i and j at time interval t is presented using Q ij,t . Similarly, the circuit analysis pertaining to the current flow and voltage profile is procured for analysis based on the following equations: I ij,t , is the current flow of branch connecting bus i to j at time t, V i,t is voltage magnitude (pu) in bus i at time t, δ i,t is voltage angle (rad) in bus i at time t, b represents the total line charging susceptance from bus i to bus j, Z ij is the impedance of the line between bus i to bus j and θ ij is the difference between the phases of voltage and current in buses i and j. Further, apparent power of the system is determined using (7); wherein, I * ij,t indicates the complex conjugate of the current phasor flow from unit i to j at time t, this derives the calculation of the apparent power flow from bus i to bus j at a time interval t, that is formulated as follows: In addition, the determination of the real and reactive power flow of branch connecting bus i to bus j at time t is formulated using (8) and (9) as follows: where, θ ij represents the angle between the real and reactive power at buses ij during time t, and sin(θ ij ) is the angle between the reactive and apparent power of buses ij at time t.

System Configuration and Network Constraints
The system under study consists of a modified IEEE 24 bus reliability test system (RTS) that is evaluated based on the concept of hybrid renewable microgrid (Figure 3). The RTS is integrated with hybrid renewable energy sources consisting of three solar PV and three wind energy sources. The placement and capacity of these renewables technologies are tabulated in Table 1. The system analysis is performed based on the one year data of the generation and the load profile. The load demand and generation (solar and wind) profile are depicted in Figure 4.  Wind 100 Accordingly, to maintain the practical significance and the system integrity numerous system constraints are taken under consideration. Firstly, the power balance constraint, that posits obviation of demand-generation mismatch, that is, the total generated power should always be equal to the load demand (P L i,t ). Moreover, the constraint is modified to consider the operational characteristics of ESS (P S i,t ); representing their charge/discharge operation. This is represented as: The power exchanged between the ESS and the grid is limited and depends on transmission line capacity, which is taken to be negative when the power is discharged from ESS and positive when the power is imported from the grid. This constraints is formulated as: S max ij , the maximum of transmission line capacity that limits import/export of power from the grid. In addition, the power generation is always bounded within the operating limits according to the capacity of unit i at time t that adhered in the computational analysis using (12) and (13).
P min g and Q min g , represents the minimum real and reactive power that can be achieved by unit i respectively, and P max g and Q max g states the maximum real and reactive power output of unit i respectively [26]. In similar terms, each generation unit has a maximum increment and minimum decrement rate during their adjustment to satisfy the load demand at each time interval t. This is respectively defined as the ramp up and ramp down ratings of the generation unit formulated in (14) and (15), wherein RU g and RD g , are the ramp up and down ratings of the generator, respectively. These constraint has to be met and it is formulated as following:  Accordingly, the constraints for the ESS are developed for computational accuracy. Firstly, the total energy (E ESS i ) and power (P ESS i ) capability of the ESS is equal to the rated energy (E ESS R ) of and power (P ESS R ) of the ESS that is emulated using (16) and (17). The calculation of the energy stored (E S i,t ) by ESS unit i at time t with an incremental time interval steps (∆t) in hours, is carried out using (18) [27]. The power and energy constraints of ESS are assigned using (19) and (20), respectively. The stored energy in ESS, is limited by its rated energy and is always taken as positive.

Results and Discussion
The generation and load data sets of the modified IEEE-24 bus system (Figure 1), over a time horizon of one year is analyzed using AC-optimal load flow to maintain the power quality as well the reliability of the power supply. The optimization problem is solved using the proposed non linear programming, where the RTS is examined to optimally size BESS under various DG condition and different technologies of BESS. The optimization problem is solved to outline the efficacy of various scenarios of renewable energy mix, namely, solar energy, wind energy, and hybrid renewable energy system. Moreover, different chemistry mix of the ESS technologies are also calculated to evaluate their cost efficacy with the renewable energy mix and perform a comparative analysis.The parameters of Battery ESS technologies under consideration are tabulated in Table 2, that are based on their power rating cost (PC ESS ), energy rating cost (EC ESS ), and efficiency (η) [28,29]. Firstly, four scenarios of energy mix are evaluated based on the renewable energy integration. The first case consists of RTS system with only ESS integration. Accordingly, RTS integrated with wind, solar and hybrid solar-wind are considered as the following three test scenarios. The optimal size for each ESS technologies are determined using the formulated MINLP technique as depicted in Tables 3 and 4. These results reflect that not only the optimization algorithm derives and effects the optimality of ESS allocation but also, the appropriate selection of ESS combined with the renewable energy mix significantly influences an overall cost minimization in a long run. For instance, considering the conventional case, lead acid type is $1,130,000 which significantly reduces to $961,000 in the hybrid solar-wind RES case. This variation in cost is observed primarily, due the observable difference the power and energy cost between the ESS technologies. In addition, the distinct efficiencies between the respective technologies that signifies towards their operational efficacy also actively contributes towards the variation in cost that is experienced.
Accordingly, the availability of the renewable output power also influences the size of ESS. Based on the results obtained, the availability of individual wind energy throughout the year reduces the overall required size of ESS across each ESS technologies, in comparison to the individual solar energy that is highly dependent on the availability of sunlight. Moreover, peak fluctuations are comparatively less in case of wind energy technology. Nevertheless, these are highly mutable depending of the topographical dominancy of the renewable resource. Therefore, the hybrid solar-wind renewable energy mix is posited to acquire the best cost minimization of optimal ESS size that is required to maintain a reliable and secure power network with appropriate power quality.  Similarly, despite the high cost associated in the investment cost of certain ESS technology. The total estimated cost might be lower. For instance, the investment cost for Lead Acid type in hybrid system is $6617.558, whereas in Li-ion type, the investment cost for hybrid system is observably higher at $22,646.75. However, the total cost of Lead Acid technology was $961,000 and in Li-ion technology was $943,000. Figures 5-8 are simulated to analyse and study the impact of NaS ESS technology on the overall system performance based on power quality and cost. The developed results indicate that ESS minimises the usage of thermal units and in combination with different mix of renewable energy the minimization of thermal unit usage can be further obviated with optimization of the total operating cost according to the running period. Therefore, NaS battery proves to be most cost-efficient solution among the storage technologies in terms of initial investment and operational cost. Definitely the parameters of solar or wind data vary depending on the applied location as well as the seasons, where the system is operated. Furthermore, a comparative stimulative study has been conducted to study the impact of their technological characteristics on the hybrid renewable energy system. The proposed MINLP is implemented for the ESS technologies under consideration to derive their distributed optimal allocation and size. The results obtained are depicted in Table 5.   So, despite a higher cost at the initial stages of capital investment for the Li-ion batteries, it has observably minimized the total cost in comparison to Lead Acid type. Figure 9, reflects the overall cost difference associated based on different renewable energy mix in combination with the impact on the cost minimization with numerous different chemistry mix of ESS technologies considered in the study. Observably, NaS based ESS technology incorporated with hybrid renewable resources proves to be the best option. Cost ($) 10 6 Lead Acid NiCd Li-ion NaS Figure 9. Bar-graph representation of the overall resultant optimized cost obtained for different renewable energy mix with different technological ESS mix.

Conclusions
In this paper, a cost optimization technique using a deterministic approach based on multi-input non linear programming is proposed to optimize the sizing and allocation of energy storage systems. The optimization aims to achieve an optimal allocation as well as sizing of the energy storage system (ESS) to minimize the ESS cost in accordance with the operational dynamics of a power network. This study comprehensively articulates the impact of the renewable energy mix on the cost optimization problem for various energy storage system that is pertinent at planning phase during the initial stages of sustainable energy development in the electricity sector. Numerous renewable generation scenarios are considered in this study and the optimization problem is solved using GAMS software. Furthermore, a meticulous study is presented to outline the impact of the renewable energy mix on the various technologies of energy storage system. A combination of four renewable energy integration scenarios (conventional, wind, solar, hybrid) has been presented across four technologies of energy storage (nickel-cadmium, sodium sulfur, lead-acid, and lithiumion) based on the proposed optimization technique to evaluate and formulate the most cost efficient energy mix to establish a sustainable power network. The test system under consideration is a modified IEEE 24 bus system that is analyzed over a time period of one year. Among the scenarios of renewable energy mix it has been observed that the uniformity in the availability of renewable power significantly governs the storage sizing and implementation cost as the degree as well as the intensity of the generation fluctuations predominantly governs the storage rating. Therefore, hybrid renewable energy system is identified as the most suitable solution. Accordingly, in case of the storage technologies it has been observed that, irrespective of the initial investment cost the overall operational cost based on energy transference and storage efficiency governs its power availability and usage, that inherently justifies its cost effectivity. Based on the results obtained, sodium-sulfur battery proves to facilitate the most cost-efficient solution among other ESS technologies considering load, system dynamics, thermal generation cost, and storage cost.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: