1. Introduction
The introduction of distributed energy resources (DER) in the distribution system has brought several benefits to consumers, utilities, and society. These include increasing system reliability and resilience, reducing greenhouse gases, relieving distribution and transmission systems, reducing energy tariffs for consumers who also produce energy (referred to as prosumers in [
1]), and the possibility of forming an energy market in which consumers and prosumers can participate actively. However, it also came with some challenges as the need to readapt distribution systems (infrastructure, automation, protection, control, operating systems, planning) to receive these new resources and to deploy modern energy tariffs to meet the equity criterion [
1], finding a trade-off between encouraging renewable sources while avoiding cross-subsidization between consumers and prosumers. Microgrids (MG), as part of this new active distribution system, experience the same benefits and challenges; however, they have an additional purpose: being economically efficient, producing energy at the lowest possible cost while eliminating or minimizing waste.
A microgrid can contain loads and distributed energy resources such as distributed generators, storage devices, and controllable loads, and must be operated in a controlled way whether or not connected to the main grid [
2]. With such resources, a microgrid can provide ancillary services to the distribution system operator (DSO), perform energy arbitrage (store energy when the price is low to sell it or use it when the price is high), actively participate in energy markets, in addition to participating in distribution systems with multiple microgrids. However, to make these activities feasible, a microgrid must optimize the use of its resources, seeking economic efficiency. Due to the renewable energy sources and load forecasting features, the time horizon for this optimization is the day-ahead. On the other hand, markets whose energy prices can vary hourly may require optimization with an equivalent time horizon. Thus, day-ahead and intra-day optimal schedulings are requirements for microgrids to participate in current and future energy markets.
The optimal scheduling of microgrids with battery energy storage system (BESS), solar and/or wind generation has been studied in [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20]. Although these works address the modeling of solar photovoltaic systems for microgrids, none of them discusses curtailment modeling in day-ahead scheduling. In addition, the costs related to the PV system can be modeled in the objective function by a fixed term, or by a term proportional to the power generated, or by a combination of them, depending on the methodology adopted to address such costs. The authors [
7,
14,
17] model these costs through a term proportional to the power generated. In [
18], these costs are modeled using a fixed term and another proportional to the power. Similar modeling is presented in [
3] with a fixed term and two others which are proportional to the power and the square of the power. However, all of these works do not present a methodology for calculating costs related to the PV system. As a consequence, in the simulations presented in those works, the authors consider such costs as known values.
Regarding the modeling of battery energy storage systems, most authors present simplified modeling that considers only upper and lower limits for charging and discharging power and for the state of charge (SOC), as in [
3,
5,
7,
13,
14]. Others present a recursive equation for the BESS state of charge but without clarifying how to transform such a recursive equation into a constraint of an optimization problem, as in [
4,
5,
6,
10,
16,
20]. The authors in [
19] address the modeling of BESS costs considering the ratio between the cost of capital and the total number of cycles, however without considering the impacts of the depth of discharge and battery degradation. Finally, the authors in [
18] address the modeling of BESS costs considering the cost of battery degradation, for a given depth of discharge, an exponential relationship that depends on a function fitting to the curve provided by the manufacturer. However, they do not address the method for obtaining the curve parameters.
Demand response programs in microgrids have been investigated through modeling of directly controlled loads (DCL) in [
14,
15,
16,
21]. Authors in [
14,
21] use a discrete DCL model with load blocks to analyze the problem of microgrids optimization with demand response, which is equivalent to a model of interruptible loads per block. Authors in [
16] present a similar approach but considering the load to be interrupted as a continuous variable. However, these works do not address the modeling of shiftable loads as an option for DCLs. In [
15], loads are classified as fixed and adjustable (DCL), including shiftable and curtailable (interruptible) loads. Both types of DCL are modeled only by an upper power limit. However, shiftable loads require more complete modeling due to their need for a continuous duty cycle, which was not addressed at that work.
Several studies address the problem of optimal day-ahead scheduling of microgrids by modeling uncertainties in load and generation forecasts. Authors in [
6,
10,
16,
17] divide the optimization problem into levels or stages to deal with uncertainties in load, generation, and price forecast. Thus, an intermediate stage of optimization has the role of finding, in a set of bounded uncertainties, the condition that maximizes the cost of the microgrid (the worst case). Once such a condition has been defined, the next stage seeks to minimize the cost of the microgrid. Authors refer to this technique as robust optimization. In [
18], the authors model the uncertainties probabilistically, and in [
19], the authors propose the interval mathematics technique to solve the same problem. However, considering uncertainties in the optimization problem comes at a price because, in addition to increasing the complexity of the problem, it leads to a sub-optimal solution compared to the deterministic solution. It is what the authors in [
22,
23] call the price of robustness in robust optimization. If on the one hand, there may be a mismatch between the forecasted and realized values as a deterministic solution is used, on the other hand, such a mismatch may even increase in solutions such as robust optimization. That is because in such a technique there is no correlation between the uncertainty considered in the day-ahead problem and that which should actually happen in the intra-day. These are the main reasons why the present study addresses this problem in a deterministic way, which has the advantage of simplicity and low implementation complexity.
Linear programming is the most used technique among the works consulted in the present literature review to solve the problem of day-ahead scheduling optimization for microgrids [
6,
10,
13,
15,
16,
21]. Furthermore, in an extensive literature review carried out in [
24], it was found that mixed-integer linear programming (MILP) is the most appropriate approach for solving the scheduling problem for microgrids and virtual power plants. These works support the choice for linear programming in the present study, without prejudice to the mathematical modeling of the elements here presented.
The optimal dispatch of distributed energy resources in distribution systems and microgrids is of economic interest to the entities that operate these systems. Although there are some works published in the literature on the subject, there also are some gaps in the mathematical modeling that this work seeks to fill. For example, no previous work was found that formulated the day-ahead problem considering scheduled intentional islanding, as defined by the IEEE Std. 1547-2018 [
25]. The same for the modeling of shiftable loads of continuous cycle and solar photovoltaic (PV) generation curtailment. Furthermore, there is no work in the present literature review that model in detail the BESS system and its cost of availability, maintaining the linearity of the problem.
Thus, this work presents detailed modeling of the optimal dispatch of microgrids with the distributed generation resources namely: a battery energy storage system; a PV system with the possibility of curtailment; demand response (DR) through directly controllable loads, such as the shiftable and interruptible ones; and the option of considering scheduled intentional islanding events with the possibility of performing load shedding (LS) when necessary.
The battery storage system is modeled according to the IEEE Std 2030.2.1-2019. Details of this modeling are presented, considering aspects such as the efficiency of the whole BESS, and state of charge as a non-recursive constraint. Furthermore, the ranges of some practical values for the model parameters are presented. In cost modeling, an exponential equation for the battery state of health (SOH) is presented in order to fit a possible BESS manufacturing data curve. The costs of BESS storage, charging, and discharging are then presented as a function of the SOH threshold, rated depth of discharge (DOD), cycle life, and the battery capacity.
In the cost modeling of the PV system, factors such as annual degradation of the photovoltaic panels, the lifespan of PV panels, and the solar generation capacity from the region of installation are considered. The methodology adopted in the modeling gave rise to a problem of mixed-integer linear programming, which was implemented in the MATLAB software. Simulation results seek to validate the mathematical model against all distributed energy resources of the microgrid. In addition, a case study based on the time-of-use tariff from the Brazilian energy market is presented considering actual tariff rates. Such a study examines the conditions for energy arbitrage performed by BESS in a microgrid.
The main contributions of this paper are:
Presenting a practical methodology to compute the BESS availability cost in USD/kWh; modeling of BESS system considering battery, converter, and transformer useful values of efficiencies; modeling the BESS state of charge as a non-recursive constraint to the MILP problem;
Modeling of scheduled intentional islanding in a microgrid with the possibility of curtailment and load shedding;
Modeling of non-interruptible shiftable loads (continuous cycle) as washers and driers when participating in demand response programs;
Presenting a practical methodology to compute the availability cost of PV systems.
The rest of this paper is organized as follows.
Section 2 presents an overview of an energy management system (EMS) for microgrids considering the day-ahead and real-time modules.
Section 3 presents the mathematical model of a microgrid regarding its dynamics of operation and costs. The simulation methodology is presented in
Section 4, and simulation results in
Section 5. A discussion of the main findings is presented in
Section 6, and the main conclusions of the work in
Section 7.
4. Simulation Methodology
All results of the present paper were obtained through the implementation of the MG model, described in
Section 3.1, in the MATLAB
® software. The optimizer function intlinprog() was used to solve the MILP problem from Equation (
31), subject to the constraints from
Table 7. Furthermore, it was used a time resolution
of 1/4 h, and
time slots.
The BESS is a 140 kW/280 kWh LiFePO
system with coupling transformer, where:
(see
Table 6),
,
,
,
,
,
,
, and
. Furthermore, according to the example from
Section 3.2.1,
USD/kWh, and from Equation (36),
and
are
and
USD/kWh respectively.
The solar PV system is the same from
Section 3.2.2, for the city of Curitiba, with:
kWh/year per kW,
years,
%,
USD (market price). The average daily PV generation
was defined according to the daily load
, i.e.,
, where
is the microgrid self-sufficiency, and
is constant and equal to 2400 kWh. Thus, the daily cost of the PV system for the first year of use
, calculated from Equation (
44) and used in the simulations of this work is a function of the
.
USD, for
, was used in the first three simulation cases. Furthermore, the PV generation curve was retrieved from [
41], whose data are from a region in Africa and were collected on a sunny day of summer.
The load curve comes from field measurements of a group of middle-income residential consumers, which were collected during a business day [
42].
The Brazilian time-of-use tariff, named White Tariff, was used to set the prices used in the simulations of this work. In the Brazilian captive energy market, customers can only buy electricity from an agent authorized to do the distribution service, typically the DSO. A regulatory agency (ANEEL) sets the price of energy, and the customer cannot negotiate it. However, the White Tariff allows customers to manage their consumption voluntarily according to the energy price. The regulated ToU time blocks are on-peak, off-peak, and pre and post-peak. Each energy distribution company can set its time blocks according to the load demand in its operation area.
Table 8 shows the time blocks with their respective average periods [
43]. Furthermore, it presents the weighted average of rates charged in Brazil for the conventional and ToU tariff. They were calculated considering data from 11 major energy distributors in Brazil [
43], weighted by the number of customers of each company. In this table, ToU prices and time blocks define
and
(USD/kWh) used in this model. The conventional tariff was used as the reference price
in Equation (
45).
In load shedding simulations, it was adopted ($/kWh) as a penalty for the amount of disconnected load. Furthermore, in directly controllable loads simulations, it was adopted and , with (one hour) and (two hours and a half). All other costs whose values have not been mentioned have been set to zero.
Finally, although the model presented here is prepared to simulate external MGs supplying and acquiring energy from the microgrid, this feature was not explored in any simulation because it does not fit the adopted ToU tariff model.
4.1. Normalized Energy Bill
For results analysis purposes, it may be preferable to handle a normalized energy bill than to work with monetary values. To this end, consider a reference daily MG energy bill
in which all distributed energy resources are turned off, that is,
where
stands for a reference energy price. Therefore, the normalized energy bill is
can represent three distinct regions of operation for an MG:
,
, and
, as
Figure 5 shows. In the first, there was a relative increase in the energy bill; as an example, a microgrid could operate in this region when it is connected to the main grid with generation off, BESS in operation, and the purchase price of energy is constant throughout the day. Naturally, such a region should be avoided. In the second, there was a relative reduction in the energy bill; a microgrid can operate in this region when in the first mode of operation, however with energy prices favoring the practice of energy arbitrage. Finally, a microgrid can operate in the third region when in the previous operating modes, but with enough generation surplus to meet the load and still sell energy.
4.2. Simulation Cases
Energy arbitrage as a result of the Brazilian White Tariff applied to a microgrid;
MG scheduled intentional islanding using the resources of interruptible loads and PV output curtailment; two islanding periods: , from 02:00 to 05:15, and , from 10:30 to 12:30; .
MG scheduled intentional islanding using the resources of interruptible loads, PV output curtailment, load shedding, and shiftable loads; two islanding periods: , from 02:00 to 06:00, and , from 10:30 to 12:30; .
The impact of the microgrid self-sufficiency on the normalized energy bill; limit for energy import and export: kW; curves for , 16, 20, and 30% of .
5. Results
In power system buses with loads and generators connected, there is a convention in which the power generated is positive while the power consumed is negative [
44]. Although in the modeling presented in this work all powers are positive, such a convention of signs was adopted in the figures throughout this section. This minimizes overlapping curves in the figures. Thus, the curves
,
,
, and
are shown with negative values. Furthermore, these quantities are included in parentheses in the legends of the figures.
Figure 6 presents the main findings of simulation 1. The pre and pos-peak, and on-peak time blocks are represented by
e
, respectively.
Figure 6a shows the curves that make up the balance of active powers in the microgrid.
Figure 6b presents the BESS state of charge curve with its upper and lower bounds.
Results show that, before solar generation begins, the microgrid has to import the energy necessary to supply its load. On the other hand, during the period of sunlight, the microgrid exports the PV generation surplus in addition to storing energy to use it during the on-peak period. As expected for the energy arbitrage simulation, the storage system reaches its maximum state of charge during the off-peak period and then performs a complete discharge to the lower limit during the on-peak. At the end of the day, the BESS is recharged to reach its final state of charge. Furthermore, the BESS performs a complete cycle throughout the day and presents an energy loss () of 38 kWh, which is the loss per full cycle of the storage system.
Figure 7 shows the results of simulation 2. Two islanding periods
and
were added to the simulation. The storage system has the role of avoiding load shedding in the first islanding, minimizing curtailment in the second, and performing energy arbitrage during the on-peak period. Although the results show that BESS reaches its maximum state of charge before the first islanding and performs a complete discharge during the same (
Figure 7b), the stored energy is not sufficient to supply 100% of the microgrid load during that period. Thus, the interruptible load resource is required to complete the remaining energy and avoid load shedding, as illustrated in
Figure 7a and expanded in
Figure 7c;
presents four pulses of 15 min long, at 02:45, 03:15, 04:00, and 04:15, during the first islanding, which contributes approximately 10 kWh to the energy balance for that period. In practice, each pulse can represent a temporary power reduction or even shutdown of interruptible load groups, such as air conditioners and water heaters.
According to results, during the second islanding period, the BESS performs a full charge in response to the surplus of solar generation that cannot be injected into the main grid. Even so, a curtailment of kWh in the solar generation is expected for the next day. Besides, according to the optimal solution, all surplus energy produced outside the islanding must be exported to the main grid. Finally, BESS discharges during the on-peak period all energy stored during , performing the energy arbitrage, and then it returns to its initial state of charge.
Figure 8 illustrates the results of simulation 3, in which the first islanding period was increased by 45 min, and the shiftable load resource was added to the simulation. Results illustrated in
Figure 8a show that although MG uses all its storage and interruptible loads resources (respecting the
limit), it will be necessary to perform
kWh of load shedding the next day, during the first islanding period.
However, the use of shiftable loads allowed a drop in curtailment from 223.85 to 127.85 kWh during the second islanding. In the optimal solution, the optimizer reallocated 96 of the 120 kWh of shiftable loads taken from the on-peak period to the islanding period; the remaining 24 kWh were allocated in the half-hour before the second islanding. It is important to emphasize the optimizer performs the reallocation of shiftable loads in compliance with the continuous cycle requirement for this type of load. Finally, on this schedule (and the previous one), there should be a loss of 76 kWh due to the two full cycles to be performed by BESS the next day. In addition, the behavior of the BESS at the on-peak period is similar to simulations 1 and 2.
In the simulation 4, for a daily load of 2400 kWh (the same from previous simulations), the capacity of the PV system and the storage system were gradually increased. The storage system was configured as a percentage of the PV system capacity. Furthermore, the imported and exported energy at the microgrid PCC was limited by setting
kW in the model. A simulation was performed for each setting, and an optimal solution was reached in each case.
Figure 9 shows the curves
obtained from simulations. No directly controllable load resources were used in those simulations.
All the curves start in the increased energy bill area where , because the microgrid does not have sufficient distributed energy resources to make economically attractive the participation in the White Tariff. From onwards, the curves enter the reduced energy expenses area where ; but only the curves of 16%, 20%, and 30% reach the profit or energy credit area (), for greater than or equal to 3.5, 3.3, and 3.1, respectively. In the light blue region (), the optimal use of the distributed energy resources is resulting in an energy export to the main grid whose power is less than the limit of 800 kW. On the other hand, the light green region contains the points for which this limit was reached. In that region, the generation surplus that cannot be exported must be stored by BESS. However, when the storage limit is reached, the curtailment process begins, which can be identified by the turning point of curves of 12%, 16%, and 20%. Similar reasoning can be applied to the MG without BESS curve. From the turning point onwards, the higher the capacity of the PV system, the more energy will be wasted, and by consequence, the more will be the cost of the microgrid, as can be seen in the figure for those curves. The turning point of the 30% curve is not shown in the figure as it must happen for .
Finally, although in this work, the MILP problem has thousands of variables and restrictions, the execution time in all simulations was less than 15 s on a personal computer of general use.
6. Discussion
Simulations presented in this work provide support to evaluate the proposed MG model. In general, results corroborate the consistency of the microgrid mathematical modeling proposed in this work. In practice, the MG used in the simulations can correspond to a medium to large industry, or to a residential area containing more than a hundred houses. Simulation 1 shows the Brazilian White Tariff can be economically attractive for a microgrid with solar generation and energy storage systems. In this example, a savings of 20%
in the energy bill was observed. It is necessary to emphasize the energy arbitrage is directly related to the BESS costs. According to Equation (
38),
should be less than 0.0544 USD/kWh to enable energy arbitrage in the White Tariff; the value used in simulations, whose calculation is based on market data, was
USD/kWh. Furthermore, the microgrid load profile used in this study presents an increase in consumption during peak hours, which helps to reduce the costs of a microgrid with BESS and to perform energy arbitrage.
The results of the second simulation highlight the role of the storage system when the microgrid is disconnected from the main system. In the first islanding, for more than three hours, the BESS can supply the microgrid load without requiring load shedding; in the second, the storage system can reduce the PV curtailment from 450.65 to 223.85 kWh (50.33%) in the next day.
Results also show directly controllable loads can play a complementary role to that of the storage system. In the second simulation, the optimizer algorithm makes use of interruptible loads during the first islanding to avoid load shedding. In the third, although it is not possible to prevent shedding, the results show the optimizer first exhausts the resource of interruptible loads and then uses the load shedding one; the cost to use the former is less than the penalty for using the latter. Regarding shiftable loads, the results of the third simulation show their use can also help to minimize the PV curtailment, which was reduced from 450.65 to 127.85 kWh (71.63%). Thus, even with the penalties of load shedding, the costs in the third simulation are lower than in the second.
Results of simulation 4 show that a BESS system can reduce the energy costs of a microgrid with operational limits (as in practice) at the PCC bus, in addition to the reduction achieved by the PV system. In this model, the energy balance of a full day of operation must be zero when the MG self-sufficiency is unitary, even when there is no BESS. This is because the microgrid uses the main grid as a battery of infinite capacity and power limited by
to exchange energy with the grid both when it generates surplus energy and when it only demands energy. Thus, from
onwards, the region in which there is an energy credit or revenue for the microgrid begins. However, making a profit from the generation of energy requires the revenue must exceed the costs of operating the microgrid. Thus, the results show that in practice reaching the profit region for this microgrid may require self-sufficiency as high as
. Furthermore, the size of the storage system must be adequate for this purpose; otherwise, such a region may not be hit, as illustrated in
Figure 9.
It is necessary to emphasize that in Brazil, the current captive energy market does not allow customers to sell the surplus energy, even in the White Tariff; however, it allows the accumulation of energy credits. In this market, a scenario with may not be economically attractive, since day after day there will be an accumulation of energy credits that cannot be traded. However, the model presented in this work has the purpose of being generic enough to be applied in other types of markets, including a free energy market and future markets that include microgrids and renewable energy resources.
Considering that load and solar generation forecasts can vary considerably over the year in a microgrid, then addressing the day-ahead scheduling problem for a single day may be a limitation of this work. A day-by-day analysis covering the four seasons as well as variations in load and solar generation forecasts could result in a richer set of simulation data. This type of analysis can be considered in future works. Furthermore, although in this work the decision variable for curtailment is continuous (a real number), in practice, it may be necessary to model this variable by ranges due to converter system technology limitations, which would make it an integer in the MILP problem. In addition, although the values used in this work are based on real market values, the results presented here must be interpreted with caution, as they are dependent on market prices for the PV system, the BESS, and the energy tariff.