EUROPEAN JOURNAL OF PURE AND APPLIED MATHEMATICS Vol. 13, No. 1, 2020, 96-107 ISSN 1307-5543 – www.ejpam.com Published by New York Business Global Impact Optimization Of Battery Energy Storage System In Microgrid Operation Elvis K. Donkoh1, Bernard Atta Adjei1,∗, Dominic Otoo1, Emmanuel De-Graft Johnson Owusu-Ansah2, Francois Mahama3 1 Mathematics and Statistics, School of Science, University of Energy and Natural Resources, Sunyani, Brong, Ghana 2 Department of Mathematics, Kwame Nkrumah University of Science and Technology, Kumasi, Ashante, Ghana 3 Mathematics and Statistics, Ho Technical University, Ghana Abstract. In microgrid operation, one of the most vital tasks of the system control is to wisely decide between selling excess power to the local grid or charge the Battery Energy Storage System (BESS). Our study uses Mixed-Integer Linear Programming (MILP) to investigate the impact of storage system on the operational cost of a microgrid. The results suggested that, the presence of BESS would relieve the pressure on the utility grid but not the cost of electricity due to the expensive nature of the storage plant. In view of this, it will be more beneficial to sell excess renewable generated power to the utility grid than to invest in a storage system for larger microgrids 2020 Mathematics Subject Classifications: 90C06 Key Words and Phrases: MILP, Storage plant, Microgrid, BESS 1. Introduction In a microgrid operation that involves a storage plant and also connected to the grid, one of the most important tasks of the system control is to decide between feeding the grid with excess power or charge the storage plant. The system control also ensures that, BESS can sustain the demand side during voltage fluctuations [3]. the authors using mixed-integer linear programming discuss the following, • the behaviour of the power dispatch (load profile). • the best time to charge and discharge the BESS. ∗Corresponding author. DOI: https://doi.org/10.29020/nybg.ejpam.v13i1.3590 Email addresses: elvis.donkor@uenr.edu.gh (E. Donkoh), adjei175@gmail.com (B. Adjei),dominic.otoo@uenr.edu.gh (D. Otoo),edjowusu-ansah.cos@knust.edu.gh (E. Owusu Ansah),statisticalmagic@yahoo.com (Francois Mahama) http://www.ejpam.com 96 c© 2020 EJPAM All rights reserved. B. A. Adjei et al. / Eur. J. Pure Appl. Math, 13 (1) (2020), 96-107 97 • the decision made by the system control to either charge or sell excess power to the grid. With the help of optimization, we can investigate how big of a role storage plant plays in microgrids. A larger energy storage system will require a higher investment cost [1]. Regardless of this, storage plants provides numerous benefits in microgrid operations. Op- timization models will be adopted to represent the microgrid operations. These models will represent the objective function and constraints for the optimization. The microgrid will involve photovoltaic modules, storage plants, and the utility grid. The size of the microgrid storage will be proportional to the community it serves [3]. A grid-tie photo- voltaic microgrid will consist of many photovoltaic modules, an inverter for converting DC to AC and vice versa, breakers and a bi-directional electric meter. Although previous research works covers a vast variety of such techniques, this paper will focus on using Mixed-Integer Linear Programming (MILP) to investigate the impact of storage system on the operational cost of a microgrid. Figure 1: A grid-connected microgrid. Figure 1 illustrate a diagrammatic representation of a grid-connected microgrid [4]. 2. Literature Review Implementation and the understanding of Battery Energy Storage System (BESS) in microgrid operation have triggered many studies using various techniques. Talking about studies, some of the previous related works on BESS and microgrid are, [5] who studied on the optimal sizing model of a BESS adapting to scheduling plan to investigate the invest- ment cost of wind farm BESS. The focus of this work was aimed at maximizing the benefit of wind farm storage considering BESS investment cost. The result justified that BESS can be applied to a wind farm with less investment cost. For the concern of the depletion of global conventional energy and the fluctuation in distributed energy, [11] researched on how BESS can mitigate the bad effect of distributed energy generation using optimal B. A. Adjei et al. / Eur. J. Pure Appl. Math, 13 (1) (2020), 96-107 98 scheduling. Using Lagrangian relaxation,[9] recommend an additional method for solving short-term generation scheduling problems. Based on the success of the algorithm, it was concluded that using Lagrangian relaxation offers a fast, robust and efficient computation. For a remote power system, [6] developed a Mixed-Integer Linear Programming (MILP) model in General Algebraic Modeling Systems (GAMS) to optimize the operation of such systems. Due to the nature of the model’s simplicity, it was concluded that MILP has an exceptionally low execution time. Lastly, in order to minimize the emissions and cost of microgrids, the branch-and-cut method was used by [10]. The microgrid in this work by [10] involved photovoltaic and for effective coordination, the Markovian process was used to model their uncertainties. 3. Methods In this study, the models of a grid-connected microgrid involved a storage system, photovoltaics as the renewable energy sources and the utility grid which will serve as the main power supply. The models (objective function and constrained) formed a Mixed- Integer Linear Programming model which was optimized in AMPL using the CPLEX solver. Electricity can travel from the PV modules to the grid but not the reverse as seen from Fig. 2 and electricity from the grid will not be used to charge the BESS. Needless to say, the BESS will be charge with electricity provided by the photovoltaic modules. 4. Optimization Model Determining the problem parameters and variables remain the most essential part of this work. Some of these parameters were estimated and others were researched from lit- eratures. The problem formulation included identifying the appropriate objective function and its constraints. Electricity consumption data from the Northern Electricity Distribu- tion Company (NEDCo, Ghana’s key player in power distribution) was used to determine the parameters of the objective function and constraints, this crucial data includes the prices of electricity and the energy consumed by the community. B. A. Adjei et al. / Eur. J. Pure Appl. Math, 13 (1) (2020), 96-107 99 Battery Plant Charge Controller DC BreakerPV Array DC/AC Inverter AC Breaker LoadFuse boxElectricity meterElectricity grid Figure 2: Schematic Diagram of the flow of energy in a microgrid 4.1. Nomenclature of Variables From Table 1, we find the number of decision variables present in this work. These variables are indexed on a 24-hour time interval. Table 1: Nomenclature of Variable Symbols Description PV t u used PV power PV t s sold PV power gridtu used grid power batttc power used to charge the battery batttd power discharge from the battery battt power in the storage Bstattc the battery charging status B. A. Adjei et al. / Eur. J. Pure Appl. Math, 13 (1) (2020), 96-107 100 Bstattd the battery discharging status 4.2. Nomenclature of Parameters Likewise the model variables, we also have the parameters such as the average amount of consumed electricity by the community. This will be part of the model formation and computation. Table 2: Nomenclature of Parameter Symbols Description PV t m generated PV power gridtm available grid power loadt the load demand priceg the price of a unit purchase of electricity prices the price of a unit sold of electricity payB capital, O&M Cost Bcap the battery maximum capacity. Bcapd daily needed battery capacity T loadd total daily demand. SV battery system voltage. T Time=24 4.3. Cost Minimization The decision to either involve the BESS or not depends on the operational cost. There- fore our objective is to minimize this cost, Minimize F = T∑ t=1 priceg ∗ gridtu + payB − prices ∗ PV t s (1) 4.4. System Power Balance The power balance constraint ensures that there is greater or equals supply of power to meet the need of the community. gridtu + PV t u + batttd − PV t s − batttc ≥ loadt, ∀t ∈ {1, 2, · · · , T} (2) This power balance constraint is very essential because at all times we expect the system to produce enough power to meet the demand of the communities. 4.5. Photovoltaic Maximum Output This constraint ensures that the amount of available photovoltaic power that can be used is not above the maximum amount of power that can be generated by the photovoltaic B. A. Adjei et al. / Eur. J. Pure Appl. Math, 13 (1) (2020), 96-107 101 modules at t ∈ T PV t u ≤ PV t m, ∀t ∈ NT (3) 4.6. Power Available from the Grid It will be assumed that one can purchase any amount of power from the utility grid. gridtu ≤ gridtm, ∀t ∈ NT (4) 4.7. Storage Capacity Storage plant have a maximum capacity of power it can hold. Therefore, battt ≤ Bcap, ∀t ∈ NT (5) 4.8. Battery Charging and Discharging Status The storage plant will not be allowed to charge and discharge at the same time. This reason is to prolong the lifespan of the batteries as most batteries are affected by continuous usage whiles charging [8]. Bstattc +Bstattd ≤ 1, ∀t ∈ {1, 2, · · · , T} Bstattc, Bstat t d ∈ {0, 1} (6) Enq(6) enforce a binary constraint on the batteries to prevent them from discharging and charging at the same time. That is if Bstatc = 0, Bstatd = 0 then 0 + 0 < 1 again, if Bstatc = 0, Bstatd = 1 then 0 + 1 = 1 again, if Bstatc = 1, Bstatd = 0 then 1 + 0 = 1 lastly, if Bstatc = 1, Bstatd = 1 then 1 + 1 � 1 4.9. Discharge Variable Coupled with Discharging Status It has already been stated in constraint e above that the batteries can not charge and discharge at the same time. batttd ≤ Bcap ∗Bstattd, ∀t ∈ {1, 2, · · · , T} (7) Therefore the maximum amount that can be discharge will depend on the discharging status and the capacity of the batteries. So if the discharge status Bstatd = 0 then, the amount of power that can be discharged from the batteries is zero 0 otherwise less than the maximum capacity of the batteries. B. A. Adjei et al. / Eur. J. Pure Appl. Math, 13 (1) (2020), 96-107 102 4.10. Charge Variable Coupled with Charging Status: batttc ≤ Bcap ∗Bstattc, ∀t ∈ {1, 2, · · · , T} (8) Therefore the maximum amount that can charge the batteries will also depend on the charging status and the capacity of the batteries. So if the charge status Bstatc = 1 then, the amount of power that can charged the batteries is less than the maximum capacity of the batteries otherwise zero 0. 4.11. Storage Charging Limit This constraint check the amount of power that can charge the batteries. batttc + battt−1 ≤ Bcap, ∀t ∈ {1, 2, · · · , T} (9) eqn (9) explains that always the sum of the available power in the batteries at the previous hour (t− 1) plus the amount charged at current t should be less or equal to the capacity of the batteries. 4.12. Storage Discharging Limits Since the storage plant can not discharge an amount of power it dose not have, eqn 10 ensure that the amount of power that can be discharge from the microgrid is less or equal to the battery state at period t− 1. λtd ≤ λt−1, ∀t ∈ {1, 2, · · · , T} (10) 4.13. State Balance of Battery Like the power balance, this constraint also ensure that the battery is also balanced. At the long run and at each time period the amount of power stored in the batteries depended on the batteries discharge, the batteries charge and the previous state of charge of the batteries. battt = battt−1 − batttd + batttc ∀t ∈ {1, 2, · · · , T} (11) Therefore the current power in the batteries should be equal to the the sum of previous power in the batteries and the amount of power that charged the plant minus the amount discharged from the plant. 4.14. Minimum Power to Remain in the Battery Deep drain of battery have a negative effect on the battery, for this reason it is impor- tant that the storage work within a safe operation range of about 20% minimum and and maximum of 100% [8]. battt ≥ 0.2 ∗Bcap, ∀t ∈ {1, 2, · · · , T} (12) B. A. Adjei et al. / Eur. J. Pure Appl. Math, 13 (1) (2020), 96-107 103 4.15. Initial State of the Battery Here it is assumed that the storage plant is half charged at the beginning of the computation of the models. batt0 = 0.5 ∗Bcap (13) 4.16. State of the Battery for the Next Day This constraint replenish the initial power for the next day. If the system is not design to store the initial power at the end of the day then, additional unaccounted power have been fed into the system. batt24 ≥ 0.5 ∗Bcap (14) 4.17. Avoid Charging from the Grid This constraint prevents the charge of batteries with energy from the grid. gridtu ≤ loadt, ∀t ∈ {1, 2, · · · , T} (15) 4.18. Non Negativity Constraint The variables in the optimization problem will not be allowed to assume negative values. PV t u , PV t s , grid t u, batt t c, batt t d, batt t, Bstattc, Bstattd ≥ 0 ∀t ∈ {1, 2, · · · , T} (16) 5. Results 5.1. Solar Panels Connected to the Grid and Batteries These microgrid components consist of a storage plant, photovoltaic modules, and the grid. Over a 24-hour horizon, the optimal power scheduling will be investigated to decide whether to sell the excess power to the grid or store the energy. Table 3: Optimization results in MW T PVu battd PVs battc gridu load batt 0 0 0 0 0 0 0 To = 61.08 1 0 4.14 0 0 0 4.14 56.94 2 0 4.02 0 0 0 4.02 52.92 3 0 3.93 0 0 0 3.93 48.99 4 0 3.87 0 0 0 3.87 45.12 5 0 4.02 0 0 0 4.02 4.10 6 0.27 3.92 0 0 0 4.19 37.18 7 2.02 1.66 0 0 0 3.68 35.52 B. A. Adjei et al. / Eur. J. Pure Appl. Math, 13 (1) (2020), 96-107 104 8 5.01 0 0 1.62 0 3.39 37.14 9 8.13 0 0 4.80 0 3.33 41.94 10 11.02 0 0 7.59 0 3.43 49.53 11 13.42 0 0 10.06 0 3.36 59.59 12 14.2 0 0 10.76 0 3.44 70.35 13 13.35 0 0 9.85 0 3.50 80.20 14 11.77 0 0 8.25 0 3.52 88.45 15 8.76 0 0 5.02 0 3.74 93.47 16 5.33 0 0 3.77 2.32 3.88 97.24 17 1.84 2.03 0 0 0 3.87 95.21 18 0.22 3.89 0 0 0 4.11 91.32 19 0 5.31 0 0 0 5.31 86.01 20 0 5.36 0 0 0 5.36 80.65 21 0 5.33 0 0 0 5.33 75.32 22 0 5.14 0 0 0 5.14 70.18 23 0 4.71 0 0 0 4.71 65.47 24 0 4.39 0 0 0 4.39 61.08 Optimizing equation (1) subject to constraints (2)-(16) in AMPL determines the values of the unknown variables (Table. 3) for the optimization problem. The value of these variables are then computed by summing their values over the 24-hour horizon. Knowing the decision variables coefficient, priceg = 801 (unit MW cost of electricity purchased) and prices = 600 (unit MW cost of electricity sold), we can compute the objective function. Given the total power purchased from the grid, 24∑ t=1 gridtu = 2.32 and the total power sold to the utility grid, 24∑ t=1 PV t s = 0, the cost can be computed as; F = T∑ t=1 (priceg × gridtu − prices × PV t s ) + payB = (801× 2.32− 600 ∗ 0) + 264, 657.897 = 1858.32− 0 + 264, 657.897 = 266, 516.21 (17) B. A. Adjei et al. / Eur. J. Pure Appl. Math, 13 (1) (2020), 96-107 105 Figure 3: A graph showing the power scheduling 5.1.1. Sensitivity Analysis At any hour of the day, a unit increase in the demand for electricity from the consumption side will attract a shadow price of GHS801. Once more, a decrease in the demand will reduce the cost function by the equivalent amount. Increasing and decreasing the photo- voltaic maximum output by 1MW affect the cost function by a decrease of GHS801 and an increase of GHS801 respectively at any hour of the day. It is because when demand is not met, a unit increase in the photovoltaic output will spare us GHS801 in purchasing power form the grid. When the battery is sufficiently charged and demand is met, a unit increase in the photovoltaic module output will reduce the cost function by GHS600 since these generated power will be sold to the grid for that amount. Where GHS801 and GHS600 is the price for 1MW of electricity purchased from and sold to utility grid respectively according to the Public Utilities Regulatory Commission [7]. 6. Discussion As stated earlier, the objective of this paper was to optimize a microgrid to investigate the impact of a storage plant. Many factors will contribute to the operational cost of a microgrid. These costs depend on the type of investors or stakeholders involved in the REFERENCES 106 construction of the microgrid. Since the power from the storage plant doesn’t incorporate a cost component in the objective function, what the system does is to discharge the plant in the morning and evening where there is no power supply from the photovoltaic modules as seen from Figure 3. The storage plant then got charged during the day after demand was met. The initial power in the storage plant was 61.08MW and the final power for the next day was 61.08MW. At 4:00 pm the system purchase 2.32MW from the grid to meet the demand of the communities while using the power form the photovoltaic to charge the battery. It cost GHS801 to purchase a unit power from the grid and GHS600 when power is sold to the grid. The system favoured the option of charging the storage plant to selling to the grid because a unit accumulated power can be discharged and save the communities GHS801 than to sell that unit power to the utility grid for GHS600. The presence of the storage plant has relieved the pressure on the utility grid. The microgrid system control will therefore only purchase power from the grid if there is insufficient power from the photovoltaic modules and the storage plant is charging. 7. Conclusion Due to the expansive nature of energy storage [2] it will be advisable not to involve storage system in larger installed microgrid capacity, but their presence in a microgrid will go a long way to save the amount of power purchased from the grid. If the objective is to minimize the pressure on the utility grid, then the implementation of these storage plants will play a vital role in accomplishing the objective. Keeping up with the opera- tional, maintenance, and replacement of storage plant is expensive and for the purpose of minimizing the operational cost, its involvement will have a negative impact on our initial objective. Then again, in the long run there might be enough cost savings to payback the capital and operational cost of the setup. We will be neglecting the possibility of cost savings because from our initial solution, the amount of PV power sold was zero (0). References [1] S. Bahramirad, W. Reder, and A. Khodaei. Reliability-constrained optimal sizing of energy storage system in a microgrid. IEEE Transactions on Smart Grid, 3(4):2056– 2062, 2012. [2] J. P. Barton and D. G. Infield. Energy Storage and Its Use with Intermittent Renew- able Energy. IEEE Transactions on Energy Conversion, 19(2):441–448, 2004. [3] D. R Chandran and A. Master. Microgrid battery energy storage system approach. Journal of Advanced Research in Power Electronics and Power Systems, 5(1, 2):15– 18, 2018. [4] S&c electric company. S&C Electric Company . Accessed: May 8, 2019 at 11:28 am, 2017. REFERENCES 107 [5] X. Jiang, G. Nan, H. Liu, Z. Guo, Q. Zeng, and Y. Jin. Optimization of Battery Energy Storage System Capacity for Wind Farm with Considering Auxiliary Services Compensation . Applied Sciences, 8(10):10718–10735, 2018. [6] H. Morais, K. Peter, P. Faria, Z. A. Vale, and H. M. Khodr. Optimal scheduling of a renewable microgrid in an isolated load area using mixed-integer linear programming . Elsevier, 35(2010):151156, 2009. [7] PURC. Public utilities regulatory commision (ghana). 2018. [8] M. Ruiz-Corts, E. Gonzlez-Romera, R. Amaral-Lopes, J. Martins E. Romero-Cadaval, M. I. Milans-Montero, and F. Barrero-Gonzlez. Optimal Charge/Discharge Schedul- ing of Batteries in Microgrids of Prosumers. IEEE Transactions on Energy Conver- sion, 2018. [9] S. J. Wang, S. M. Shahidehpour, D. S. Kirschen, S. Mokhtari, and G. D. Irisarri. Short-Term Scheduling of Thermal-Electric Generators Using Lagrangian Relaxation . IEEE Transactions on Power Systems, 10(2), 1995. [10] B. Yan, P. B. Luh, G. Warner, and P. Zhang. Operation and Design Optimization of Microgrids With Renewables . IEEE Transactions on Automation Science and Engineering, 14(2), 2017. [11] Y. Yang, W. Zhang, J. Jiang, M. Huang, and L. Niu. Optimal Scheduling of a Battery Energy Storage System with Electric Vehicles Auxiliary for a Distribution Network with Renewable Energy Integration . MDPI, 8, 2018.