Sizing of Energy Storage System for Microgrids S. X. CHEN
H. B. GOOI
School of Electrical & Electronic Engineering Nanyang Technological University, Singapore Email:
[email protected]
School of Electrical & Electronic Engineering Nanyang Technological University, Singapore Email:
[email protected]
used in conjunction with renewable energy resources, i.e., solar and wind, where they provide a means of converting these nondispatchable and highly variables resources into dispatchable ones [2]-[4].
Abstract—This paper presents a new method for optimal sizing of an energy storage system (ESS) in a microgrid (MG) for storing electrical/renewable energy at the time of surplus and for redispatching. The unit commitment problem with spinning reserve for MG is considered in this new method. The total cost function, which includes the cost of ESS, cost of output power and cost of spinning reserve, is introduced. The effectiveness of the approach is validated by a case study where the optimal ESS rating for MG is determined. The quantitative results show that the ESS with an optimal size is not only storing renewable energy and re-dispatching it appropriately, but also saving the the total cost for MG. The main method is formulated as a mixed nonlinear integer problem (MNIP), which is solved in AMPL (A Modeling Language for Mathematical Programming).
This paper focuses on determining the size of ESS for MG. It aims to find the optimal size of ESS for MG in economic dispatch and unit commitment problems. This paper also tries to find the relationship between the size of ESS and the total cost of MG. Considering the daily cycle of the solar and wind pattern in Singapore, ESS will also follow the same charge and discharge cycle everyday. Common results will be obtained based on the case study of a chosen day in this paper.
I. I NTRODUCTION The microgrid (MG) concept assumes a cluster of loads and microsources operating as a single controllable system that provides both power and heat to its local area. This concept provides a new paradigm for defining the operation of distributed generation. The MG study architecture is shown in Fig. 1. It consists of a group of radial feeders, which could be part of a distribution system. There is a single point of connection to the utility called point of common coupling (PCC). The MG also has the microsources consisting of a photovoltaic (PV) system, a wind turbine (WT) system, two microturbines (MT) and an ESS. The fuel input is needed only for the MT as the energy input for the WT and PV comes from wind and sun. To serve the load demand, electrical power can be produced either directly by MT, PV and WT. Furthermore, the central controller is the main interface between the upstream grid and the microgrid. The central controller has the main responsibility for optimizing the microgrid operation, or alternatively, coordinating the actions of local controllers to produce the optimal output. With renewable energy sources connected online, their integration and control pose more challenges to the operation of power systems. How to mitigate renewable power intermittency, load mismatch and negative impacts on MG voltage stability are some key problems to be solved. A potential candidate solution for the identified problems is using ESS to store electrical/renewable energy at the time of surplus and re-dispatch it appropriately [1]. ESS plays an important role in MG, which is desirable to shave peak demand period and store the surplus electrical/renewable energy. Sizing of ESS is to be considered first when considering ESS in the MG. Several research works have been done to address this question. Battery storage is being c 2010 IEEE 978–1–4244–5721–2/10/$26.00
Microgrid Central Control
MT
PCC
MT
Load
WT Load Load
PV ESS Load
Fig. 1.
A simple architecture of microgrid
In section II, system models are introduced. The cost functions of tradition generators and ESS are also presented. The main problem is formulated in section III. The method of choosing the minimum size of ESS is shown in section III.A. The unit commitment problem with renewable energy and an energy storage system in MG is introduced in section III.B. The algorithm developed in this paper which is used to solve the optimal size of ESS is shown in section III.C. A case study and analysis of the results is shown in section IV. The final conclusion is presented in section V. 6
PMAPS 2010
II. S YSTEM M ODELING
I
P
A. Wind Power Generator
PR
Wind power is electrical power generated by wind turbines, which are installed in locations with strong and sustained winds. The wind pushes against the fan blades of a wind turbine, mounted on a tower at an elevation high above and away from ground obstructions and obstacles and where wind currents are strong and consistent. Wind turbines have no control over their energy output and are constrained by their physical limits in their operation and applications. The wind generator power output can be considered as a function of wind velocity [5]. A piecewise function can be used to fit the relationship between output power and wind speed (v). The formulation in (1) is used in this paper. A plot of Pw versus v based on (1) is shown in Fig. 2. ⎧ 0 v ≤ vc ⎪ ⎪ ⎪ ⎨ v k −vck pr ∗ vk −vk vc ≤ v ≤ vr (1) Pw = r c ⎪ p vr ≤ v ≤ vf ⎪ ⎪ ⎩ 0 v ≥ vf
Power Current IR Maximum Power Point(MPPT )
VR
Fig. 3.
C. Traditional Generator Traditional generators have been used for many years. They supplied most of the electrical power and played an important role in the early power system, and they are still very important for power generation now. Generators have several kinds of supply curves, e.g. linear or quadratic functions. Normally, a generator offer file comprises the incremental offer curve and the start-up cost curve is used. Many electric utilities prefer to represent their generator offer price as a singlesegment or multiple-segment linear cost function. With faster computing speed, the quadratic function is more frequently adopted, which is used in this paper. The offer price for each generator can be represented by a quadratic function, while the start-up and no-load costs are spread over the running period. The generator offer price is taken as the sum of the operation cost of the generating set at no-load and the cost for producing the output of the generating set. The formulation is given as follows: (2) C(P ) = a + b ∗ P + c ∗ P 2
kW Rated Power
Fig. 2.
Vrated Wind speed
Vcut_off
V-I characteristic curve and maximum power point of PV
used. Manufacturers of PV modules supply information on the voltage and current of maximum power point at reference temperature and reference irradiance. The output current I can be expressed as a function of the module output voltage V from the equivalent circuit of the PV module. Normally, the power output curve at every hour is used for the power system optimization. In this paper, the forecasting data of PV power output based on the maximum power point tracker is used for implementation of the PV module.
where, Pr is the rated electrical power, Vc is the cut-in wind speed, Vr is the rated wind speed and Vf is the cut-off wind speed.
Vcut_in
V
m/s
Power generated by wind turbine at different wind speed
In Fig. 2, the cut-in wind speed is the minimum speed to start the wind turbine and the cut-off wind speed is the maximum speed to shut down the wind turbine. B. Solar Photovoltaic Power Generator Solar photovoltaic power is a generic term used for electrical power that is generated from sunlight. A solar photovoltaic system converts sunlight into electricity. The fundamental building block of solar photovoltaic power is the solar cell or photovoltaic cell. A solar cell is a self-contained electricityproducing device constructed of semi-conducting materials. Light strikes the semi-conducting material in the solar cell, creating direct current (DC). Fig. 3 shows the voltage and current characteristic curves of photovoltaic (PV). The current will decrease when the voltage increases, which means the power generated by PV is not a constant. It is very easy to find the maximum power point with the help of a power curve in Fig. 3. When the PV works at the maximum power point, the transfer efficiency from sunlight to electrical power is improved. In the calculation of the power output of a PV module, we assume that a maximum power point tracker will be
where a is the no-load cost. D. Energy Storage System In recent years, several forms of energy storage are studied intensely. These include electrochemical battery, supercapacitor, compressed air energy storage, super-conducting magnetic energy storage and flywheel energy storage. Lithium ion (Li-ion) batteries are chosen in this paper. They are currently one of the most popular types of batteries for portable electronics, with one of the best energy-to-weight ratios, no memory effect, and a slow loss of charge when not in use. Mistreatment may cause Li-ion batteries to explode. Li-ion batteries are growing in popularity for defense, automotive, and aerospace applications due to their high energy density. 7
The charge and discharge equation is shown in (3). PtE is the power supplied by the battery bank during the time period t. PtE is positive, which means battery bank is discharged. When PtE is negative, the battery bank is charged up. The battery bank should also satisfy the constraints from (4) to (6). (3) C(t + 1) = C(t) − ΔtPtE Subject to: Output power limits: E Pt ≤ PEmax
cost of generating or importing electricity during the specified peak hours, while the cost of the battery system is largely associated with its energy storage rating (kW h) rather than the power rating (kW ) [4]. Hence a small discharge period is desired if it is possible. Once the peak shaving is established, then the minimum energy supplied by BESS is defined as: T max max min i i i i = (Pload − Pgrid )δt, Pload ≥ Pgrid (9) Edis 0
where T is the end of the time set, which is one day in this report; δt is the time interval, which is one hour in this i i is the system load at time i; Pgrid includes the report; Pload renewable energy power and traditional energy power at time max i is the maximum power supplied by the all i; and Pgrid generators in a smart power system. For a smart power system, renewable energy resources are supposed to supply electric power to the grid as much as they could. This means renewable energy resources are kept on all the time if the conditions permit. When the power supplied by renewable energy resources is more than the load in the system, it has to charge up the BESS. Then the minimum energy charged to BESS is defined as: T min min min i i i i = (Pgrid − Pload )δt, Pgrid ≥ Pload (10) Echarge
(4)
Stored energy limits: Cmin ≤ C(t) ≤ Cmax
(5)
C(0) = CS
(6)
Starting limits: where, PEmax is the maximum charge/discharge rate; C(t) is the energy stored in the battery bank at time t. Δt is the duration time of each interval; and CS is the initial stored energy of the battery bank; Cmin and Cmax are the minimum and maximum energy stored in the battery bank. The cost of ESS includes the one-time ESS cost and maintenance cost. Considering the battery energy storage system (BESS) in this paper, a big battery bank is made by small battery blocks. This means that the one-time ESS cost, F C, which includes the purchase of batteries and their installation is a variable cost proportional to the size of BESS. The maintenance cost per year is also a variable cost proportional to the size of BESS. If BESS’s life time is l years and the maintenance cost is M C($) per year, then the total cost of BESS is CE ∗ (F C + l ∗ M C) ($). CE is the size of BESS. In this paper, the cost of generation is calculated in 24 hours, which is one day. Hence we need to normalize the total cost of BESS in $/day. If the interest rate r for financing the installed BESS is considered, the annualized one-time ESS cost (AOT C) for BESS is shown in (7). AOT C =
r(1 + r)l ∗ F C ∗ CE (1 + r)l − 1
0
min
i represents the minimum power supplied by where Pgrid the renewable energy sources in the smart power system.
E min min min = max dis , ηc ∗ Echarge EBESS ηd
Finally the minimum value of BESS energy storage rating EBESS can be obtained in (11). ηd and ηc are the discharge E min min and ηc ∗Echarge are the rate and charge rate respectively. ηdis d minimum discharge energy and charge energy of the battery bank. At the end of this section, a fuzzy logic is used to implement (11). We get the charge and discharge minimum energy, and take the maximum value of these two as the minimum BESS energy storage rating.
(7)
B. Unit Commitment with Renewable Energy and Energy Storage System
The total cost of BESS can be obtained by adding AOT C and the maintenance cost together. Then the cost per day (T CP D) of BESS installed can be found in (8). 1 ∗ (AOT C + CE ∗ M C) 365 III. P ROBLEM F ORMULATION
T CP D =
(11)
The process of determining an optimal unit commitment schedule is a complex challenging task, especially when renewable energy resources and energy storage system are included. The solution method determines the set of committed generators to meet each hourly forecasted load over a specific study period. The optimal solution is constrained by limits such as the hourly minimum spinning reserves, generator start up/down times, ramp rates and network security [6]. The market must pay the costs of reserve generation capacity maintained online every hour by GenCos during the period under consideration to satisfy the hourly minimum spinning reserve constraint at the request of the independent system operator (ISO). This work assumes that GenCos provide the ISO with start up costs. This must be reckoned with while
(8)
A. Minimum size of Battery Energy Storage System When BESS is installed, one also needs to consider the minimum size for BESS needed by a smart power system. Sizing a suitable battery bank, in terms of its power and energy rating, not only could help in shaving the peak demand, but also for storing the excess renewable energy and supplying the load when the renewable energy is low. The amount of peak power shaving should be associated with the marginal 8
computing an optimal UC solution for payment to the respective GenCos. The formulation is as follows: Minimize the total UC schedule cost (TC),
t n∈CG rn ∗ Rtn + dn ∗ SUtn (12) 2 +Utn ∗ (an + bn ∗ Ptn + cn ∗ Ptn )
Generator status: ∀t, n ∈ CG Utn ∈ 0, 1 ∀t, n ∈ (W G ∪ P V ) Utn ≡ 1 Spinning reserve capacity:
Rtn ≤ min{R10n ∗Utn , Pnmax ∗Utn −Ptn }∀t, n ∈ CG (16)
where CG, W G and P V are sets of conventional, wind and PV generators; t and n are subscripts indicating generator and hour respectively; an , bn and cn are cost coefficients of conventional generators; Utn and SUtn are vectors of binary integers representing unit status and start up status of units; rn and dn are the reserve cost and start up cost respectively; Ptn is the output power of a generator; and Rtn is the online spinning reserve of a conventional generator. TC in (12) includes the conventional generators costs (startup cost, online spinning reserve cost and generating power cost) and renewable energy cost (wind and PV power cost). The models of these cost functions are introduced in section II. Many constraints can be modeled in the UC problem. Spinning reserve is the term used to describe the total amount of generation available from all units synchronized on the system, minus the present load and losses being supplied and plus the energy storage in ESS. The unit commitment problem may involve various classes of scheduled reserves or off-line reserves. As a result of restrictions in the operation of a thermal plant, various constraints arise. They include minimum up time (once the unit is running, it should not be turned off immediately), minimum down time (once the unit is decommitted, there is a minimum time before it can be recommitted) and etc. To solve the problem in (12), one needs to consider the following constraints: Real power balance,
+ n∈W G Ptn
+ n∈P V Ptn n∈CG Ptn
(13) + n∈ES Ptn = i P Dti + P Lt ∀t
where R10n is the 10-min spinning reserve capacity. Capacity of largest online generator: SRt ≥ Pnmax ∗ Utn
≤ Ptn ≤ Utn ∗ Utn ∗ ∀t, n ∈ CG 0 ≤ Ptn ≤ Pnmax ∀t, n ∈ W G Ptn ≤ Utn ∗ Pwtn ∀t, n ∈ P V Ptn ≤ Utn ∗ PPtnv Pnmax
∀t, n ∈ CG
(17)
where SRt is the hourly required spinning reserve capacity for the system. The spinning reserve criteria is shown in the following two constraints in (18)-(19). ESS is considered in these two criteria. Online reserve: Rtn + Cn,t ≥ α ∗ SRt ∀t (18) n∈CG
n
n∈ES
10-min reserve: Rtn + (1 − Utn ) ∗ P 10 + Cn,t ≥ SRt ∀t (19) n∈G10
n∈ES
where P 10 is the capacity of the 10-min quick start units; SRt is the minimum spinning reserve requirement; α is the factor of hourly spinning reserve to be maintained online; and Cn,t is the available energy stored in the ESS n at time period t, which is the total energy stored in ESS minus the minimum capacity limits. Ramp rate: −R60n ≤ Ptn − Pt−1,n ≤ R60n
∀t, n ∈ CG
where R60n is the 60-min ramp up/down limit. Min up time:
min{T,t+U Tn } Usn (Ut+1,n − Utn ) ∗ U Tn − s=t+2 ≤ max{1, U Tn − T + t + 1} ∀t = 1, · · · T − 2, n ∈ CG
ES is a set of energy storage system; P Dti is the power demand at the ith bus in time period t; and P Lt is the power grid loss in time period t. The ESS model is introduced in section II, which is considered as a generator here. When ESS discharges its energy to power grid, it is considered as generating positive real power. When ESS gets energy from power grid, it is considered as generating negative real power. The constraints for ESS in section II are also considered here. Generator output limit: Pnmin
(15)
(20)
(21)
Min down time:
min{T,t+DTn } Usn (Utn − Ut+1,n ) ∗ DTn − s=t+2 ≤ DTn ∀t = 1, · · · T − 2, n ∈ CG
(22)
where U T and DT are vectors of minimum up time and minimum down time of convention generators. The initial conditions are incorporated in (23)-(24). Uptime: If ICn ≥ 0 & U Tn ≥ +ICn , then Utn = 1 ∀n ∈ CG
∀t, n ∈ CG
Downtime: If ICn ≤ 0 & DTn ≥ −ICn , then Utn = 0 ∀n ∈ CG
(14)
where Pnmax is maximum output power of convention generator n; Pwtn , PPtnv are wind power and PV power in the time period t, which can be obtained from section II. For pollutionfree and sustainable energy, the renewable energy are always on which is shown in (15).
(23)
(24)
where ICn is an initial condition denoting the number of hours the conventional generator n has been on/off. Start-up variable: SUtn = max{Utn − Ut−1,n , 0}
9
∀t, n ∈ CG
(25)
C. Solution Algorithm
the details are shown in Table 1. The interest rate r is set at 6%
Fig. 4 shows the algorithm developed in this paper which is used to solve the optimal size of ESS. This algorithm will compute the different costs under different sizes of ESS between CEmin and CEmax . The optimal size will then be found at the minimum cost point.
TABLE I C ONVENTIONAL G ENERATOR DATA Gen #
a ($)
b ($/kW )
c ($/kW 2 )
Pnmin (kW )
Pnmax (kW )
d ($/start)
1 2
200 1000
0.06 0.05
0.000002 0.000003
100 100
2000 2000
30 5
r ($/kW )
UT (hrs)
DT (hrs)
IC (hrs)
P10 (kW )
R10 (kW )
R60 (kW )
0.009 0.030
2 0
2 0
1 -1
0 2000
2000 2000
2000 2000
Start Find minimum size CEmin of ESS with the method in section III.A Set parameters and initial variables
in this case. The cost for BESS of 100 kW h is assumed to be $80,000. The maintenance cost for this BESS is $3,000. The lifetime of BESS is set to three years. The minimum size of
CE = CEmin Solve problem in (12) with capacity CE of ESS
2000
CE = CE + ΔCE
Wind Power PV Power Renewable Power Load
1800 1600 1400
Power (kW)
CE ≥ CEmax
No
1200 1000 800
End
600 400
Fig. 4.
200
Algorithm used to solve the optimal ESS capacity
0
The proposed solution is a mixed-integer nonlinear problem. The constraints in (13)-(25) need to be considered when solving the problem in (12). This algorithm is implemented in AMPL (A Modeling Language for Mathematical Programming) with KNITRO (A Mixed-integer Nonlinear Solver). The detail of this algorithm is as follows: 1) Enter the forecasting renewable power and load. Calculate the minimum capacity CEmin of ESS using the method in section III.A. 2) Set CEmax , ΔCE and the other parameters. Initialize the variables. 3) Solve the UC problem in (12) with CE, which is the size of ESS. 4) If CE < CEmax , update CE with CE = CE + ΔCE and go to step 3. The algorithm will stop when CE ≥ CEmax.
2
Fig. 5.
4
6
8
10
12 14 Time (h)
16
18
20
22
24
Forecasting load, PV power and wind power
BESS can be found with the forecasting data in Fig. 5 based on the formulation prevented in section III.A. If the charge rate and discharge rate are the same and set at 90%, then the minimum size of BESS is 722 kW h. If the size of the base unit for BESS is 100 kW h, then the minimum size can be set at 800 kW h for this case. (a) Cost of traditional generators 4600
($)
4400 4200 4000 3800 800
900
1000
1100
1200 1300 Size of BESS (kWh)
1400
1500
1600
1400
1500
1600
(b) Cost of BESS 1600 1400
IV. C OST-B ENEFIT A NALYSIS - A C ASE S TUDY
($)
1200 1000
This case study attempts to determine the optimal BESS ratings for the microgrid which is shown in Fig. 1. In this paper we only consider the island mode of the MG. Assume that we have the forecast wind speed of a chosen day. The parameters of this wind generator is given as: PR = 1000KW , Vc = 3m/s, VR = 12m/s, VF = 30m/s. Then the output of the wind generator can be obtained by equation (1), which is shown in Fig. 5. The forecasting load and PV power are shown in Fig. 5. The renewable power curve is the total power supported by the PV and wind generator. As we can see from the figure, renewable power is greater than load during hour 11 to hour 13. There are two micro turbines in this microgrid and
800 600 800
Fig. 6.
900
1000
1100
1200 1300 Size of BESS (kWh)
Cost in one day of different size of BESS
The cost of BESS increases with a larger size, as shown in Fig. 6 (a). Meanwhile, the cost of traditional generators (including the output power cost and spinning reserve cost) decreases with a larger size of BESS as shown in Fig .6 (b). The benefit of increasing investment on BESS is to reduce the cost of traditional generators, which is a trade-off in this case. As shown in Fig. 6, the decrement for the cost of traditional 10
generators is getting smaller and smaller when the size of BESS increases. However, the increment for the cost of BESS is a constant, which is $90.2158 per 100 kW h in one day. When the decrement for the cost of tradition generators and the increment for the cost of BESS is the same, the optimal size of BESS can be found. This relationship is shown in Fig. 7. The total cost includes the cost of traditional generators and the cost of BESS. As shown in Fig. 7, the minimum total
that the decrement at the beginning for the cost of traditional generators is due to the reduction of not storing renewable energy. When the renewable energy is fully used, the cost of traditional generators is still decreasing. This is because the ESS can balance the power generated by the traditional generators, which can make the generators work at a stable condition and reduce their cost. Considering Fig. 7 and Fig. 8 together, both of the optimal TC and full use of excess renewable energy can be obtained at the optimal BESS size of 1300 kW h.
5300
V. C ONCLUSION
5250
A complicated problem of solving the optimal BESS size can be solved by the method presented in this paper. This method is tested by the forecasting data over a day in a MG shown in Fig. 1. The case study is also a cost-benefit analysis to estimate the economic feasibility of the ESS for the MG project. Based on the results obtained the following can be concluded. First, the quantitative results of the case study show that ESS for MG could decrease the cost of output power and spinning for the traditional generators. As the size of ESS increases, the cost of tradition generators decreases. However, the speed of the decrement of tradition generators is getting smaller and smaller. Second, the decrement of the cost of traditional generators includes two components. The first component is that ESS can store the surplus renewable energy and re-dispatch it appropriately. This could reduce the power supported by tradition generators and cut down the cost. The second component is that the ESS can balance the power generated by the traditional generators, which could make the generators work at a stable condition and reduce their cost.
($)
5200
5150
5100
5050
5000 800
900
Fig. 7.
1000
1100
1200 1300 Size of BESS (kWh)
1400
1500
1600
Total cost in one day of different size of BESS
cost of $5057.4 is obtained when the size of BESS is 1300 kW h in this microgrid. The decrement for the cost of tradition generators is greater than the increment for the cost of BESS before that point and it is smaller after that point. The total cost is $5790.09 without BESS. The proposed scheme saves $732.69 and does not waste the renewable energy with BESS at an optimal size of 1300 kW h. 400
350
300
ACKNOWLEDGMENT
(kWh)
250
The authors would like to thank the technical staff of the Clean Energy Research Laboratory for the support rendered. This work is also supported in part by the Agency for Science, Technology and Research (A*STAR) under Microgrid Energy Management System Project.
200
150
100
50
0
800
900
1000
1100 1200 1300 Size of ESS (kWh)
1400
1500
1600
R EFERENCES Fig. 8.
Renewable energy Wasted via different size of BESS
[1] Le, H. T., Nguyen, T. Q., “Sizing energy storage systems for wind power firming: An analytical approach and a cost-benefit analysis,” Power and Energy Society General Meeting - Conversion and Delivery of Electrical Energy in the 21st Century, 2008 IEEE, pp. 1-8, 2008. [2] Wang, X. Y., Vilathgamuwa, D. M., Choi, S. S., “Determination of battery storage capacity in energy buffer for wind farm,” IEEE Transactions on Energy Conversion, vol. 23, pp. 868-878, Sept. 2008. [3] Chiang, S. J., Chang, K. T., Yen, C. Y., “Residential photovoltaic energy storage system,” IEEE Transactions on Industrial Electronics, vol. 45, pp. 385-394, Jun. 1998. [4] Venu, C., Yann, R., Seddik, B., Yahia, B., “Battery storage system sizing in distribution feeders with distributed photovoltaic systems,” PowerTech, 2009 IEEE Bucharest, pp. 1-5, Jul. 2009. [5] Borowy, B. S., Salameh, Z. M., “Optimum photovoltaic array size for a hybrid wind/PV system,” IEEE Transactions on Energy Conversion, vol. 9, pp. 482-488, Sep. 1994. [6] Venkatesh, B., Peng, Y., Gooi, H. B., Dechen, C., “Fuzzy MILP unit commitment incorporating wind generators,” IEEE Transactions on Power Systems, vol. 23, pp. 1738-1746, Nov. 2008.
The start point for the size of BESS is the minimum size 800 kW h based on the method presented in the section III.A. Theoretically, the minimum size can ensure that the renewable energy is not wasted without considering the optimization in equation (12). However, the optimal solution of TC in the algorithm shows that 350 kW h renewable energy is wasted at the size of 800 kW h in Fig. 8. It needs dump load to discharge the excess energy in the practice for this situation. One can easily get conclusion that the minimal size of ESS cannot guarantee the optimal TC and full use of excess renewable energy at the same time. The renewable energy wasted is 0 kW h when the size of BESS is 1200 kW h. Meanwhile, the optimal size is obtained at 1300 kW h from Fig. 7. This means 11