1. Introduction
An electrical microgrid consists of distributed generation systems that can use renewable energies, conventional generation systems (hydroelectric, diesel generators, combined cycle machines, etc.), battery-based storage system (BESS) and customers with the ability to modify their energy consumption. In addition, the customers can operate in the connected mode to the main grid or isolated mode [
1].
When the microgrid operates in the connected mode, customers are interconnected to a main electrical grid; in contrast, when it operates in island mode, the microgrid operates independently of the main grid [
2].
If the microgrid works in conjunction with a main electrical grid, the flow of electrical power can go from the microgrid to the main grid when there is a surplus of energy production and from the main grid to the microgrid when the generation of energy produced and stored by the microgrid is not enough to cover the energy requested by the customers [
3]. In recent years, the use of power generation systems based on renewable energy sources combined with conventional power generation systems is used to meet the customers’ demands for electrical power. They are an important alternative due to the environmental and economic benefits when the operating cost of all elements is optimized [
3].
Energy management of a microgrid is known as the process of optimizing an objective function (minimizing or maximizing costs and reliability, respectively) and establishing the optimal dispatch, as well as the amounts of energy to be delivered by conventional generators, RES and the operation of the battery-based storage system (BESS) [
4].
From this perspective, the costs of buying and selling energy from and to the main network are asymmetric and depend on the schedules and the type of load of energy. From a commercial perspective, a program of economic incentives is used for consumers to incite the reduction in energy consumption in the hours of greatest consumption. Considering that the demand for electrical power must be significantly reduced, encouraging the use and installation of distributed generation systems is desired [
5,
6].
In [
7], an economic load dispatch (ELD) problem is approached through a metaheuristic that is a modified version of the particle swarm optimization (PSO) algorithm, called improved particle swarm optimization (IPSO), in which changing velocity and position are modified; the results shown establish better performance than the algorithms with which the proposal is compared.
In most urban areas, there is a high concentration of pollutants in the air, which is why environmental policies are legislated to take action when environmental contingencies (EC) arise. When these situations occur, the operations of the diesel generators are affected by having to reduce the emission of pollutants or, where appropriate, regenerate the gases emitted, which can be complemented through a program to reduce emissions demand energy (EDR), which has a direct mitigating impact on power generation from the burning of fossil fuels [
8]. The inclusion of an EDR generates more adequate operating options regarding supply and demand of the microgrid [
8]. According to [
9,
10], EDR programs lead to optimization of microgrids costs and an improvement in operations, providing flexibility to the network and helping to mitigate the stochastic effect of the RES [
10].
In [
11], it is established that one of the most important aspects for microgrids to be able to meet their objectives is their proper management through a design and control strategy to optimize the operation of microgrids and maximize their economic and energy management potential; therefore, the economic dispatch approach is useful to achieve this. In [
8], a microgrid proposal was made that considers renewable and conventional energy sources; however, the proposal does not consider EDR and environmental contingency situations and also does not take into account the aspect of the cost of regeneration of contaminants.
In [
5], a multi-objective cooperative optimization approach for the energy management of different microgrids connected to a conventional electrical grid was addressed, and the concept of the independent performance index (IPI) for microgrids was introduced. The IPI is used to reduce the exchange of energy with the main grid; it considers the microgrid as an element of the traditional electricity grid but does not consider concepts such as the regeneration of pollutants or a demand reduction program (EDR).
In [
5], smart management of a distribution grid was proposed through a mathematical programming approach; the proposal integrates resources from distributed generation, a battery system and also demand satisfaction through a response strategy, in which the distribution system operator (DSO) considers the uses and flexibility of energy centers to satisfy the operating requirements. The results show a reduction in the maximum loads of the power center and the distribution network of 29% and 14%, respectively. The fact that operating costs are reduced by 10% and 14% is also highlighted. The paper considered flexible electrical and thermal loads as constraints. There are numerous advantages to the operation of a microgrid when it operates in connected modes such as the reliability of the electrical supply, the quality of the energy, the reduction in costs and minimizing losses in the transmission and distribution lines [
3].
In [
12], an energy management system for a microgrid interconnected to a main grid was presented; in this case, the microgrid uses renewable energy sources and a storage system. The presented approach manages the effect of the irradiation variations on different days and seasons of the year to know its impact on the daily schedule of the microgrid. Due to random conditions in the output power of photovoltaic systems (PV) and wind generation systems (WT), as well as the prediction error of load demand and the changes in the supply to the main grid, these were used to determine the optimal management of the microgrid. However, it did not consider the power exchange with the connected main grid. On the other hand, in [
13], a proposal for a microgrid was presented where energy generation systems based on renewable sources and conventional generation systems were combined, and the costs for the treatment of contaminants generated by conventional sources and operating costs of the microgrid were determined.
A model to analyze the generation and storage of electricity in the microgrid is addressed in [
8]. Additionally, the energy management required to meet load demand with production costs seeking to minimize CO
2 emissions was analyzed. On the other hand, in [
10], an optimization model based on mixed integer nonlinear programming (MINLP) proposed to solve the economic dispatch of cogeneration units contained in a microgrid that considered heat units (heat-only units), wind and photovoltaic systems and an energy storage system. One aspect to highlight is the consideration of uncertainty in renewable energy sources; however, the concept of regeneration of pollutants is not addressed here, nor is an EDR.
In [
14], an approach of modeling uncertainty based on the method of estimation of the two points of Hong T-PEM is approached for the optimal programming of the previous day of an intelligent distribution system (SDS), which seeks to minimize the functional cost of energy and SDS reserve requirements in the presence of wind generators, diesel generators and BESS, considering the uncertainties of wind production and load demand. However, the concept of pollutant regeneration is not considered an EDR.
In [
3,
11], it is determined that due to the randomness of environmental conditions (wind, solar energy), one of the most important disadvantages of microgrids is the reliability that they can satisfy customer demand at all times. This can be achieved through a combination of conventional renewable sources and the inclusion of battery energy storage systems (BESS).
Based on the mathematical programming method in [
15], a fully distributed algorithm is presented, which manages, in an adaptable way, the dynamic economic dispatch (DED) problem for microgrids incorporating storage. From the perspective of the optimal control of a dynamic system in a finite time, in this approach, a dynamic economic dispatch model for microgrids with energy storage in batteries is addressed.
In [
9], a flexible algorithm is presented to addressed the problem of the combined economic dispatch of heat and energy (CHP), which is solved in two levels. The highest level is the optimization of the dual-function substitute for relaxed global restrictions, using the Lagrange multipliers. At the lower levels, sub-problems are treated considering their local limitations. In this proposal, the problem of a microgrid is addressed, which considers only conventional energy sources interconnected to the main electricity grid. Here, it is important to point out that the concept of regeneration of contaminants produced by conventional generators is not addressed.
The approach proposed in this paper considers an analysis of the problem of economic dispatch from a mathematical programming perspective using a microgrid interconnected to the main network. The microgrid proposal includes generation systems that use renewable and non-renewable energy sources such as wind (WT) generation systems, photovoltaic (PV) generation systems, a hydroelectric plant (PH), two diesel-electric generators (DG), a battery-based energy storage system (BESS) and a set of customers (CD) with specific demands. A mathematical model is proposed to establish the optimal management of the microgrid, seeking to minimize an objective function, which is composed of the operating costs of the diesel generators, the operating costs of an EDR and the costs of the exchange of energy between the microgrid and the main network, in addition to satisfying a set of restrictions that establish the operating conditions of the microgrid.
Table 1 summarizes the comparison between the proposal of this work and other articles related to the economic dispatch solution. The main contributions of this paper are described below:
A mathematical programming model is proposed for the management of a microgrid interconnected with the main grid.
The proposed model incorporates a combination of conventional renewable energy sources and energy storage systems.
The variation in load demand by users of renewable energy sources is considered.
The model considers a scheme of benefits of the reduction in demand by customers, and these in turn obtain an economic bonus.
The model incorporates the cost of treating the gases produced by the generation of pollutants during periods of environmental contingency.
The paper is organized as follows:
Section 2 describes the model with a mathematical programming approach.
Section 3 presents the computational experiment.
Section 4 analyzes six test scenarios. Finally, in
Section 5, the results of the proposal are presented.
2. Problem Description
The economic dispatch for microgrids [
12] is primarily approached from two aspects; the first refers to a formulation called the dynamic economic dispatch problem (DED) [
14], and the second is called the static economic dispatch problem (SED), which establishes the sequence of the operation mode of the power generation equipment based on the operating conditions of the microgrid in each period in an independent way. The DED differs from the SED problem by incorporating generator ramp rate constraints [
16]. In the approach to the economic dispatch problem, we seek to determine the optimal scheduling of the generators. In this sense, the economic dispatch of microgrids establishes a constrained, non-linear, mixed-integer optimization problem (MILP), which increases its complexity with the incorporation of energy storage systems, in addition to the inclusion of various power generation alternatives [
12]. Therefore, in the literature, considerable attention is paid to satisfying customers’ load demand among the available generating units in an economical, safe and reliable manner. [
5,
9,
17].
For the proposed problem, the details of the indices, parameters and decision variables are presented in
Table 2.
In the model proposed in
Table 3, the objective function (1) minimizes the total costs. The total cost function is composed of: The fuel cost of conventional generators, presented as a quadratic function of the active power generation represented in (2). The next component of the total cost function is presented in (3), which establishes the energy exchange, which is defined according to the commercial contract with the main grid. The next component of the cost function is (4), which establishes the amount of the discount to each of the EDR customers represented according to their priority, cost factor and reduction in permitted consumption. The final component of the cost function, established in (5), determines the behavior of the cost incurred by a customer of type θ normalized to [0, 1], which decreases the energy consumption x as a function of the reduced power in EDR towards the administrator of the microgrid;
and
are the quadratic and linear coefficients of the cost function of the EDR program. Additionally, a weighting factor
w is introduced with a value between 0 and 1, which defines the weight of energy production costs and the bonus to customers (1
− w).
In (6), the behavior of the regeneration costs of the class of pollutants and the definition of their operation in a situation of environmental contingency is described. In (7), the energy balance on the bus is established and it is ensured that the energy generated is equal to the total demand. From (8) to (13), the operating limits of conventional generators are defined. Set limits for ramp-type diesel generators are described in (14). In (15), it is ensured that the total daily incentive received by the client is equal to or greater than its daily interruption cost. In (16), the reduction in energy for customers is ensured to obtain the greatest benefit. In (17), it is achieved that the total incentive paid for the utility is less than that budgeted for the microgrid. In (17), it is determined that the total daily power limited by each customer is less than its daily interruptible power capacity. In (19) and (20), the dynamic operating performance of the BESS unit is modeled. In (21), the domain of the variables is defined.
3. Computational Experiment
A case study is represented in
Figure 1, which consists of a microgrid with a structure based on an alternating current bus (AC) consisting of two diesel generators (
), a wind conversion system (
), a photovoltaic generation system (
), a hydroelectric plant (
), the interconnection with the conventional electrical energy network for the transfer of energy in a bidirectional way (
) delimited by a commercial agreement, a battery energy storage system (
) and six customers (
). For simulation cases, an operating interval of 24 continuous hours is considered. The general conditions of the case are established per the conditions required within the CONACYT-SENER-Energy Sustainability project. The objective is to optimize (minimize) the total cost of the operation of the microgrid during the study period, complying with all established restrictions.
The input values for are based on wind speed readings with meteorological equipment installed at a height of 12 m. To estimate input values for per hour, the simplified inclined plane model was used in the location at 18°53′33.356″ N, 99°17′21.335″ W at 1570 m on the sea level.
The total energy demand (
) required by users is estimated based on the procedure described in [
18], which assumes a normal distribution with an average of 3,852,083 [kW] and a standard deviation of 432,550, highlighting that the administrator of the microgrid is in charge of managing the electrical system so that the delivery of the established total demand is fulfilled.
The initial and finalization periods of the environmental contingency (EC) are defined by the binary value α
t, which determines the start of the suspension of the
contaminant regeneration system emitted by conventional generators, as established in [
19]. The energy consumption demand reduction coefficient for each customer, programmed
in the EDR program and shown in
Table 4 and
Table 5, shows the amount of pollutant emissions emitted by the main electrical network and diesel generators.
Table 6 shows the cost coefficients and operating limits of conventional generators, as well as the regeneration coefficients
for
, which are: 0.3, 0.5 and 0.8, respectively, according to what is established in [
17].
Table 7 shows the input data of the coefficients of the cost function in the discount of the EDR program, as well as the classification for prioritization of each of the clients.
Therefore, the proposal establishes the weighting of the costs of production and conventional interconnection with the main network
w with a value of 0.5, and this established that both costs have the same weight within the objective function. The cost of consumption is calculated in US dollars (USD) per kW-h transferred from the main network, presenting an asymmetric behavior of the tariffs depending on the time of consumption: low consumption (from 1 to 15 h), average consumption (from 16 to 18 h) and high consumption (from 19 to 22 h) resulted in sales of USD 0.30, USD 0.54 and USD 1.00 and purchase costs of USD 0.79, USD 0.96 and USD 2.80, respectively, according to what is established in [
17]. The maximum capacities of the generating plants are
500 kW and
200 kW, and the generation of the hydro turbine (
) is shown in
Table 8.
It is considered that the microgrid only allows a maximum transfer of energy of 200 kW with the main network and the maximum assumption bond in EDR is USD 600.00. Furthermore, the capacity of the battery bank is 100 Ah with a maximum transfer of power
of 45 kW and an efficiency
of 0.88, according to what has been established [
19]. In
Figure 2, the prediction of power generated by the wind and photovoltaic generation system is shown.
Figure 3 shows the curve of the electric power demand of the microgrid.
4. Case Study
To establish the robustness of the proposal, six different scenarios are proposed, where the operating conditions vary. The summary of the scenarios is presented in
Table 9. Case 1 is considered the baseline.
4.1. Case Study 1; Normal Operating Conditions, without BESS and EDR Program
In case 1, it is considered that the microgrid is working under the following operating conditions: (a) does not have a BESS installed, (b) users of the microgrid suspended the EDR program and (c) the environmental authority issued a contingency from 7:00 a.m. to 9:00 a.m. and from 6:00 to 8:00 p.m. The result of the solution to the economic dispatch problem for case 1 in the microgrid is to use all the production estimated by the RES.
Figure 4 shows the results of the load values of the diesel generators, the powers supplied by the RES and the purchase/sale of electrical energy to the REP to satisfy the demand of the microgrid for case 1.
The results of the mathematical model show that, during the environmental contingency period in the morning, the contribution of the conventional diesel generators is reduced to a minimum to reduce the emission of pollutants, but the diesel generators remain working and connected to the AC bus. The value of the objective function is USD 5018.90, which represents the balance of operating expenses of the analysis cycle to supply a total demand of 14.05 MW, but with the emission of 2.995 tons of pollutants thrown into the environment. It can be noted that in this case, the microgrid can sell electrical energy to the main grid in five periods of time to decrease the costs of the objective function.
4.2. Case Study 2; Normal Operating Conditions, with BESS and EDR Program
In this case, the microgrid is working with the next operating conditions: (a) a BESS installed, (b) users of the microgrid activated the EDR program and (c) declaration of environmental contingency at the same times described in case 1.
Figure 5 shows the impact of the EDR program on the users’ electrical power demand and the power dispatched by the mathematical model.
Figure 6 shows the results of the load values delivered by diesel generators, as well as the power managed by the battery bank, the total power that customers must reduce, the power that provides RES and the exchange of energy between the microgrid and the main grid to supply the demand for case 2. The results of the mathematical model show that, during periods of environmental contingency for case 2, the contribution of conventional diesel generators is minimized to reduce the emission of pollutants, but diesel generators remain working and connected to the bus of AC.
Figure 7 shows the periods of purchase and sale of energy between the main network and the microgrid, but in this case, the microgrid has a single sales period (T = 13). In addition, the results of the scheme show that the battery system charges (mainly in the morning) and discharges in most periods between 16:00 and 24:00 o’clock.
The objective function is USD 4099.75, which represents the balance of operating expenses of the analysis cycle to meet a total demand of 14.05 MW, of which 205.32 kW are managed by the economic dispatch program assigned to the EDR program. The pollutants emitted in this case are 2.8 tons, mainly generated by the main grid. Therefore, when the BESS is included in the microgrid and the EDR program is activated, there are savings of USD 918.25, and 194.00 kg of pollutants are not discharged into the environment, compared to case 1.
4.3. Case Study 3; αt = 0 (All 24 Periods) with BESS and EDR Program
For the simulation of case 3, the conditions of case 2 are considered but with αt = 0 during the 24 periods of simulation time.
Figure 8 shows the results obtained from the solution of the proposed mathematical model for the operating condition described in case 3.
Figure 8 shows the results of the powers that must be provided by the two diesel generators, the power managed by the battery bank, the total power that the customers must reduce, the power supplied by the RES and the purchase/sale of electrical energy to the main network to supply the electrical power demanded by the microgrid for case 3. The results of the mathematical model show that the contribution of conventional diesel generators remains constant because there is no environmental contingency, but increase their output when the main power grid increases energy prices during peak hours.
Figure 9 shows the impact of the EDR program on the users’ electrical power demand for cases 2 and 3; in both cases, the total economic compensation to users does not exceed the maximum amount of the total bonus.
Figure 10 shows the energy contribution of conventional diesel generators for the operating conditions defined in cases 2 and 3. The figure shows that the main differences occur when the environmental contingency is activated in case 2 (
Table 2) and in periods when the costs of electricity sales increase by the supplier company.
In case 3, the value of the objective function reaches a cost of USD 3810.53, which represents savings of USD 1208.497 and USD 289.22 concerning case 1 and case 2, respectively. Regarding the generation and emission of pollutants, case 3 produces 2771.29 kg, which represents 29 kg less than case 2. Therefore, the inclusion of the BESS has a positive impact on the reduction in costs and the emission of pollutants. Therefore, the results of the economic dispatch of the microgrid of case 2 and case 3 compared to those of case 1 show that the operating costs of the microgrid decrease significantly with BESS.
4.4. Case Study 4; Environmental Contingency between 5:00 a.m. and 10:00 p.m.
For the simulation of case 4, the same conditions as in case 2 are considered (BESS and EDR program turned on), but with the authority-activated environmental contingency between 05:00 and 22:00 h (αt = 1).
Figure 11 shows the results of the economic dispatch of the microgrid to satisfy the operating condition of case 4. The figure shows that during the contingency hours, the EDR program requests more significant savings from users, with a decrease in load of 189.45 kW. Between 7:00 p.m. and 8:00 p.m., when the PV system delivers only 12 kW or zero kW, respectively, conventional generators increase their power delivered to the microgrid even with an environmental contingency, and the battery bank delivers its maximum power. The P1t generator delivers 56.85 kW to the microgrid in two hours, P2t generates 42.03 kW, 400 kW are purchased from the main electrical grid and the battery transfers 90 kW to meet total demand.
For case 4, the pollutant emission is 2885.11 kg, with a cost of the objective function of USD 4465.367. Analyzing the cost of the objective function of case 4, which is higher than the previous cases, the increase is mainly due to the purchase of more electrical power from the main electrical network during the environmental contingency.
4.5. Case Study 5; 80% Increase in the Demand for Electrical Power in the Periods from 14 to 19
In addition to an 80% increase in demand in periods 14 to 19, the microgrid has a BESS installed, (b) users of the microgrid activated the EDR program and (c) there are declarations of environmental contingency at the same times described in case 1.
Figure 5 shows the impact of the EDR program on the users’ electrical power demand and the power dispatched by the mathematical model. The output power distribution curve that each distributed generation unit must provide corresponding to the economic dispatch scheme for case 5 is shown in
Figure 12. In the figure, it can be seen that during the first hour of the overload (T = 14), the BESS is in charge mode, but in the following hours (from 3:00 p.m. to 12:00 a.m.), the BESS delivers power to the microgrid. The figure indicates that from 3:00 p.m. to 7:00 p.m., the EDR program manages 167 kW with a bonus of USD 1672.91 to users. To satisfy the excess demand, conventional generators (P1t and P2t) deliver 1360.23 kW, whereas P1t generates 713 kW because its generation costs are cheaper. Due to the above, the cost of the objective function to satisfy the over-demand rises to USD 11,664.15 due to the addition of electrical power that is purchased mainly from the electrical network. However, in the period T = 10, the microgrid can sell energy (10 kW) to the main electricity grid. But when the solar irradiation is at its maximum value (T = 13 with Pst = 190.5 kW), the microgrid does not purchase electrical power but remains connected to the main electrical network. The results of the economic dispatch for case 5 show that all the restrictions and operating rules established in the definition of the mathematical model are met.
4.6. Case Study 6; Failure in the Interconnection of Wind and Photovoltaic Sources between 7:00 and 10:00 a.m.
Figure 13 shows the power contribution of each conventional generation system, renewable energy, BEES and EDR for case 6. For test operating condition number 6 for the microgrid, it is assumed that there is a failure in the interconnection between the
and
systems between 7:00 and 10:00 a.m. In
Figure 13, it can be seen that the power not delivered by the wind system and the photovoltaic system is supplied by conventional diesel generators (916 kW), the battery bank (180 kW) and the main electrical network (800 kW). The model manages, through the EDR program, a decrease of 129 kW in the non-priority load of the customers during the fault. In the same way as in the previous case, at T = 13, the microgrid does not buy electrical power. The microgrid scheduling for case 6 shows that the battery is charging while
> 150 kW and T > 11.
Table 10 compares the results obtained from the sensitivity analysis of the six different cases described in
Table 9.
Figure 14 shows the performance of the energy dispatch comparing case 1 and the proposed examples to analyze the behavior of the proposed methodology.
Figure 15 displays the prices of the objective function vs. monetary compensation for the clients under the six operating conditions.
Based on the data obtained in the sensitivity analysis (
Table 10), a series of results were identified in the operation of the microgrid, which are described below (a). In case 3, when there is no environmental contingency, the conventional diesel generators increase their production from 899.8 kW (case 2) to 1050 kW because there is no penalty for generating contaminants. The battery system manages 506 kW (71.33 kW more than in case 2) and only 2296.7 kW are purchased from the main electrical network because the operation of P
1 and P
2 are more economical. Therefore, in case 3, the lowest cost is obtained in the objective function when compared to the other six cases. (b) In case 4, when the periods of environmental contingency increase, conventional diesel generators decrease their production from 506.43 kW (case 3) to 424.92 kW and decrease by 46% in comparison to case 1 due to the penalty for generating pollutants. To compensate the low production of conventional generators, the main power grid provides 2862.0 kW, resulting in the cost of the objective function being increased by 18% compared to case 3. But the objective function for case 4 is 12% lower compared to case 1 due to BESS management. (c) In case 5, to compensate for the 80% increase in energy demand, the results of the analysis indicate that diesel generators produce 220% more energy compared to case 1 during periods when there is no environmental contingency. In such cases, more energy must be purchased from the main electrical network and the monetary compensation for the client must be increased by 235% compared to case 2 to encourage customers to reduce energy demand, obtaining, as a result, the most expensive objective function and the most pollution compared to the other five cases. (d) Finally, for case 6, the analysis shows that the elements of the microgrid that are dispatchable (
P1,
P2,
BESS,
Pr and
y) contribute similar amounts of electrical power to case 5 due to the connection with the main electrical grid that works as a backup without violating any of the restrictions of the mathematical model, as can be seen in
Table 10. The results show that the mathematical model is very robust in the event of unforeseen circumstances; in addition, consistency between the strategy for reducing polluting emissions and cost reduction is maintained in all cases.
5. Conclusions
In the present work, the problem of economic dispatch is solved through a mathematical programming model of a microgrid to analyze the environmental and economic impact when a battery-based energy storage system (BESS) is installed and when customers are within an energy demand reduction (EDR) program. The mathematical programming model is designed to optimize the costs of all the operating variables with their respective restrictions, which contains all the possible variants known and studied in a microgrid, for example, conventional diesel generators, generation with renewable energy sources, the costs for the regeneration of pollutants and the asymmetric costs of buying and selling with the main electrical network.
The results show that by including a BESS and the EDR program, it is possible to save between 18% and 75% of the costs of the objective function and stop emitting a little more than 195 kg of pollutants into the environment. The analysis of results shows that these savings depend on the operating conditions of the microgrid, the presence of environmental contingencies and the asymmetric purchase/sale costs with the main electrical network. From the sensitivity analysis of the proposed mathematical model, it is established that the proposal is robust and adjusts adequately to different expected and unforeseen operating conditions. Since, for the different operating conditions presented, the proposal adjusts the energy flows, the reduction in costs and the regeneration of pollutants, the objective of the investigation is fulfilled. Therefore, the application of this mathematical tool has a fundamental application in the operation of a microgrid.