1. Introduction
As one of the well-recognized approaches to mitigate climate change and restructure the global energy mix, microgrids integrate various types of distributed generation sources, such as photovoltaics (PV) and wind turbines (WT), to supply local loads effectively and economically [
1,
2]. Microgrids can be designed as an AC type or DC type, and operate either in disconnection or connection mode with external grids [
3,
4,
5]. In particular, grid-connected microgrids (GC
μGs) are a common network structure for the industrial zones and residential communities in urban areas regarding the backbone of external grids and the urgent need for renewable energy [
6,
7]. A GC
μG is commonly connected to the external grid via the dedicated transformer (DT) and purchases electricity based on time-of-use (TOU) prices [
8]. However, due to uncertain natures of renewable energy and load demand, it is a challenging task to maintain reliability and power quality for highly-penetrated GC
μGs. Storage devices, such as battery storage systems (BSs), provide a feasible way to store excessive energy produced by renewable sources and supply local loads when needed. Clearly, an optimal sizing of the BS plays a crucial part in utilizing renewable energy efficiently, satisfying load demand economically and ensuring the reliability of GC
μGs.
Generally, the BS sizing problem for microgrids can be formulated as an investment decision problem combined with an energy management optimization problem [
9,
10,
11,
12]. For instance, reference [
13] implements the mixed integer linear programming (MILP) method to optimize the BS capacity of microgrids with the reliability criterion being considered. Researchers use particle swarm optimization to develop the novel frequency control and demand response separately in reference [
14] and reference [
15] to ensure stability of microgrids, which are integrated into the BS capacity optimization model to minimize the total cost of the BS. In reference [
16], the capacity of the vanadium redox battery for microgrids is optimized based on the proposed optimal scheduling analysis and cost-benefit analysis and then the optimization problem is used to solve the optimal energy management problem. A concept of mix mode energy management strategy combined three different types of operating strategies is used to determine the BS capacities for GC
μGs in reference [
17]. A cost-benefit analysis-based BS capacity optimization framework is proposed in reference [
18] which solves the MILP method.
Since the uncertain natures of renewable energy and load demand have significant impacts on the operation of microgrids when optimizing the BS capacities, a common way to characterize these uncertain natures is generating massive stochastic scenarios by sampling or building probability distribution based on historical operational data of renewable energy and load demand [
19,
20,
21,
22]. The accuracy of the optimal results can be boosted with a large number of stochastic scenarios considered. However, increasing the number of stochastic scenarios may also lead to the boom of optimization variables. For instance, in terms of the MILP method, the number of binary variables is often used as an indicator of the computational difficulty [
23]. A BS capacity optimization problem considering over hundreds of stochastic scenarios would have tens of thousands of binary variables to deal with. This condition could spend dozens of hours obtaining the optimal results, or even worse, lead to no feasible solutions due to overburdened memory usage of computing equipment. To tackle this issue, a scenario reduction technique [
24] is used to reduce the number of stochastic scenarios. This technique is conducive to mitigating the efficiency issues, but it could also neglect some low-probability but high-risk scenarios and accordingly, compromise the accuracy of the optimal results.
From the model point of view, it is the energy management optimization problem that needs to consider a large number of stochastic scenarios in order to represent uncertain natures of renewable energy and load demand in microgrids. Therefore, for those algorithms adopting the similar optimization framework, the dilemma of balancing accuracy and efficiency is still an open question to be answered.
To address this problem, instead of solving the BS sizing problem directly via mathematic tools, this paper starts from the perspective of imbalanced power of renewable energy and load demand to study the power exchanging process of the GCμG with the BS and the external grid. Then, we take one of the stochastic scenarios as an example to quantify the power exchanging process with consideration of power limits of the BS and the DT. On this basis, a BS energy management scheme using the forward/backward sweep technique is proposed with consideration of the TOU prices. We solve the BS sizing problem by establishing a heuristic two-level optimization framework using the proposed energy management scheme.
The major contribution of this paper can be summarized as follows.
Based on the imbalanced power of the GCμG, this paper investigates the power exchanging process of the GCμG with the BS and external grid. The dispatching strategies for the BS are derived from the power exchanging process analysis and then are quantified considering the power ratings of the BS and the DT.
Motivated by the dynamics of the BS, a BS energy management scheme using the forward/backward sweep technique is proposed. This energy management scheme is able to obtain the optimal dispatching results of the BS rapidly in the context of the TOU prices.
A heuristic two-level optimization model for sizing BS is developed using the pattern search (PS) algorithm and the proposed energy management scheme. The comparison with the mixed integer linear programming (MILP) method, which is a common approach used to address microgrid planning problems, shows that the proposed method has a similar degree of accuracy and much better computational performance.
The rest of the paper is organized as follows:
Section 2 analyzes the power exchanging process of the GC
μG with the BS and external grid. The optimization model for sizing the BS is summarized in
Section 3.
Section 4 presents the quantification of the possible dispatching strategies for the BS, followed by the forward/backward sweep-based energy management scheme proposed in
Section 5. A two-level optimization framework using the proposed energy management scheme is illustrated in
Section 6. Results of the numerical simulation as well as the comparison with the MILP method are presented in
Section 7. Finally,
Section 8 concludes the paper.
2. Power Exchanging Process of GCμG
Due to the uncertain nature of renewable sources (e.g., PV and WT) and load demand, it could easily result in power imbalance issues, assuming that a microgrid has no BSs installed or no connections with external grids. The imbalanced power caused by such an uncertain nature can be formulated as the net power of renewable sources and load demand, namely
where
is the imbalanced power of the microgrid;
, representing the total power of the PV and WT;
is the load demand;
s and
t denote the indices of stochastic scenarios and time instance, respectively.
In order to completely satisfy
, the GC
μG needs to absorb energy from or transfer energy to the BS or the external grid. The power exchanging process of the GC
μG with the BS and external grid is depicted in
Figure 1.
Clearly, there are three different situations that can be observed from
Figure 1:
Additionally, the BS can exchange energy with the external grid to adjust the remaining energy by operating in charging and discharging modes, i.e., and .
4. Quantification of Power Exchanging Process
From (5) and (9), it can be noted that the power of the GC
μG exchanging with the external grid and BS are limited by the power ratings of the BS and DT, namely
,
and
.
Figure 2 shows the imbalanced power curve of an arbitrary stochastic scenario. If these three capacity parameters are taken into consideration in
Figure 2, the imbalanced power curve can be dissected into several areas.
Due to the limited capacities of the BS and DT, the part of imbalanced power that exceeds the total sum of their capacities cannot be consumed or supplied, which refers to area ① and area ⑧ shown in
Figure 2. The excessive generation in area ① and the excessive load in area ⑧ are the energy inevitably being curtailed or dumped, which can be separately calculated by
where
denotes the maximum value between 0 and the given value and
denotes the minimum value between 0 and the given value.
Since the power in area ③ and area ⑥ is beyond the BS power rating but well within the DT power rating, these two portions of energy can be consumed or supplied by the external grid, which can be separately calculated by
It can be noted that (14) to (17) show no relevance with the dispatching process of the BS.
In terms of the excessive generation in area ②, this part of energy is not allowed to be transferred to the external grid via the DT since it exceeds
. However, the BS power rating can still cover this part of energy which, as a result, should be preferentially consumed by the BS on condition that there is sufficient energy capacity in the BS; or else, it will further increase the amount of renewable energy curtailment. This part of energy is defined as the top-prioritized renewable energy (TR). Due to the similar reasons, the excessive load in area ② cannot be supplied by the external grid but rather by the BS or else, it will further increase the amount of load loss. This part of energy is defined as the top-prioritized load demand (TL). The energy of TR and TL can be separately given by
For clarity and analysis convenience, we use the symbol to express the energy that the BS needs to consume or supply.
The excessive generation in area ④ and excessive load in area ⑤ can be covered by both the power ratings of the BS and DT. From the perspective of economical operation, these two parts of energy should be consumed or supplied by the BS first if the BS has sufficient remaining energy. Hence, the energy in area ④ and ⑤ can be expressed as
Also, the external grid can supply the BS for the charging process, which can be represented by
In (22), the condition of means should subtract the energy the microgrid supply to the BS if any whereas the condition of means should subtract the energy the external grid supplies to the microgrid if any.
Similarly, the BS is allowed to be discharged to send power back to the external grid, which is given by
(23) shows that when
, the BS is only permitted to supply load demand of GC
μG instead of sending power to the external grid.
Additionally, when considering the electricity prices,
plays a significant role in reducing the cost of buying electricity from the external grid while
would increase it. In the context of the TOU electricity prices,
and
can be further formulated as (24) and (25), respectively, according to different time periods.
where
;
off,
mid and
on represent the off-peak, mid-peak and on-peak periods, respectively.
5. Forward/Backward Sweeping-Based BS Energy Management Scheme
Equations (18) to (25) demonstrate the possible power exchanging processes of the BS with the GC
μG and the external grid. Since the TOU electricity price has a vital impact on the operational cost of the GC
μG in different time periods, Equations (18) to (25) can actually be regarded as the BS dispatching approaches with various levels of electricity price. According to the aforementioned discussions in
Section 4,
Table 1 lists these dispatching approaches sorted from high to low by price.
To limit the amount of energy delivered from the BS or the GCμG to the external grid as much as possible, the price of selling electricity should be necessarily lower than buying electricity. As a whole, economically dispatching the BS can lead to a cost-effective operation of the GCμG.
Figure 3 is the schematic of the BS dynamics based on (2), which shows that the remaining energy stored in the BS at any time instance is dependent on both the power output and the remaining energy of the BS at the previous time instance. Due to the initial energy constraint of (6), the BS remaining energy must restore itself to the same initial value either at the beginning or at the end of each day.
Motivated by the BS dynamics mentioned above, a computationally efficient energy management scheme is developed based on the forward/backward sweep technique. Before elaborating on the proposed energy management scheme, we summarize the framework of the forward/backward sweep process in
Figure 4. The forward sweep is conducted to initialize the BS remaining energy to preferentially consume TR or supply TL and on-peak load while the backward sweep is used to check if the BS remaining energy at the end of the day restores to the initial values. Finally, in the correction step, it checks separately whether the GC
μG handles TL and TR completely.
5.1. Forward Sweep
Ideally, the BS is required to absorb the excessive power from renewable sources and supply TL and on-peak load of the GC
μG, according to the BS remaining energy capacity. In this way, the GC
μG can take full advantage of renewable sources and satisfy local load demand with less dependence on the external grid and less cost of purchasing electricity. The maximum energy that the BS needs to absorb or release in this case is given by
Take
into consideration and substitute (26) into (2), then the BS dynamics can be rewritten as
where
i = {I, II, III}; I, II and III denote the forward sweep, backward sweep and correction step, respectively.
In the forward sweep, the remaining energy in the BS at each time instance, namely
, can be obtained as
t gradually increases to
T, as depicted in
Figure 5.
5.2. Backward Sweep
As stated in (6), the remaining energy stored in the BS at the end of the day should restore to the initial value to guarantee sufficient energy for the next day. However, the forward sweep does not contain this initial energy constraint and therefore, the BS remaining energy at time
T calculated in the forward sweep may not be able to restore to the initial value. To measure the difference between the BS remaining energy at time
T and the initial value, i.e.,
and
, an index called remaining energy deviation is defined as follows
If
, it indicates that the BS has over-released energy to supply load demand and hence, it is necessary to increase the amount of generation to consume or decrease the amount of load demand to supply to eliminate the remaining energy deviation. In contrast, the situation when
is less than zero indicates the BS has overconsumed energy generated by renewable sources and hence, for the elimination of the remaining energy deviation, it should consume less renewable energy or supply more load demand. To this end, we implement the backward sweep regarding the dispatching approaches listed in
Table 1, which helps to eliminate
rapidly and have as small an impact on the dispatching results obtained in the forward sweep as possible.
Figure 6 presents the basic process of the backward sweep where with
t decreasing from
T − 1 to 0, the BS remaining energy adds
sequentially and then update the remaining energy from
t to
T. The principle to select
is presented in
Table 2. The maximum energy that the BS needs to absorb or release in the backward sweep is given by
Substitute
into (27) to obtain the remaining energy at
t + 1 time instance and then sequentially update the remaining energy from
t + 2 to
T as well as calculate
. If
flips, which means the value of the
flips from positive to negative and vice versa, (29) should be rewritten as (30) and recalculate the BS remaining energy from
t + 1 to
T. If not, let
t =
t − 1 and repeat the calculation process. If
t = 0, it implies the end of the
kth backward sweep process and then, let
k =
k + 1 and start another backward sweep process with the
. The flowchart of the backward sweep is summarized in
Figure 7. As shown in
Figure 7, the maximum value of
k in the back sweep is set to 5 according to
Table 2.
At the end of each backward sweep process or when
flips, the operational cost of the
kth backward sweep process is given by
where
. Consequently, the operational cost in the backward process can be written as
5.3. Correction Step
The backward sweep regulates the power exchanging process of the BS with the external grid and the GC
μG to satisfy the initial energy constraint shown in (6). However, it cannot yet ensure the GC
μG to sufficiently consume the TR and supply the TL. Let the unhandled parts of the TR and TL be expressed as
where
If or is non-zero, it could further deteriorate energy curtailment or load loss issues of the GCμG. To address these problems, the BS should either consume more generation or supply less load (for the unhandled TR), or supply more load or consume less generation (for the unhandled TL). This process is defined as the correction step.
Similar to the backward sweep, the correction step calculates backward the BS remaining energy from time
T to 0 with a correction of
. The principle to select
is presented in
Table 3. The maximum energy that the BS needs to absorb or release in the backward sweep is given by
Similarly, substitute
into (27) to obtain the remaining energy at
t + 1 time instance and then sequentially update the remaining energy from
t + 2 to
T as well as calculate
. If
is non-zero, (37) should be rewritten as (38) and recalculate the BS remaining energy from
t + 1 to
T. Then let
k =
k + 1 and start another correction process with the
. The flowchart of the correction step is summarized in
Figure 8. As shown in
Figure 8, the maximum value of
k in the correction step is set to 4 according to
Table 3.
At the end of each correction process, the corresponding operational cost is calculated by
where