Open Access
This article is

- freely available
- re-usable

*Energies*
**2019**,
*12*(1),
181;
doi:10.3390/en12010181

Article

Optimal Economic Dispatch in Microgrids with Renewable Energy Sources

^{1}

Postgraduate Department, Polytechnic University of Tulancingo (UPT), Tulancingo 43629, Mexico

^{2}

School Engineering and Business (Postgraduate), Popular Autonomous University of the State of Puebla (UPAEP), Puebla 72410, Mexico

^{3}

Department of Electric Power, National Autonomous University of Mexico (UNAM), CDMX 04510, Mexico

^{*}

Authors to whom correspondence should be addressed.

Received: 23 November 2018 / Accepted: 25 December 2018 / Published: 7 January 2019

## Abstract

**:**

Due to the opening of the energy market and agreements for the reduction of pollution emissions, the use of microgrids attracts more attention in the scientific community, but the management of the distribution of electricity has new challenges. This paper considers different distributed generation systems as a main part to design a microgrid and the resources management is defined in a period through proposed dynamic economic dispatch approach. The inputs are obtained by the model predictive control algorithm considering variations of both pattern of consumption and generation systems capacity, including conventional and renewable energy sources. Furthermore, the proposed approach considers a benefits program to customers involving a demand restriction and the costs of regeneration of the pollutants produced by conventional generation systems. The dispatch strategy through a mathematical programming approach seeks to reduce to the minimum the fuel cost of conventional generators, the energy transactions, the regeneration of polluted emissions and, finally, includes the benefit in electricity demand reduction satisfying all restrictions through mathematical programming strategy. The model is implemented in LINGO 17.0 software (Lindo Systems, 1415 North Dayton Street, Chicago, IL, USA). The results exhibit the proposed approach effectiveness through a study case under different considerations.

Keywords:

microgrid; distributed generation; renewable energies; dynamic economic dispatch; predictive control model; mathematical programming## 1. Introduction

Currently, the opening of the energy sector yields a new form of competition and changes of paradigms in the pattern of electricity generation. Then, distributed generation has attracted a great interest for energy contribution in the whole generation of electric power. Today, the concept of microgrids emerges as a natural alternative to the conventional electric power systems, where big synchronous generators in remote sites could be accompanied with smaller generators and shorter transmission lines near to the loads, which provide an effective and sustainable alternative for the integral use of renewable energies. Generation units in microgrids can be conventional generators in the case of thermal generators or diesel engines, in the same way, Renewable Energy Sources (RES) can be included as wind turbines, photovoltaic systems, fuel cells or Battery Energy Storage Systems (BESS). These new technologies offer a feasible electric power system, but its operation is conditioned to consider the particularities and nature of each generation system, combined to the stochastic profile of the primary energy.

It is very important to consider in RES projects that their operation is subject to randomness and interruptions, which makes difficult to find the best dynamic solution in an economic dispatch problem. Thus, the energy management in microgrids seeks to optimize some desired objective function, that defines the cost behavior, reliability and efficiency of the system, as well as the determination of the optimal energy dispatch (economic dispatch), within physical restrictions of conventional and emerge generation systems. Thereby, RES and BESS could meet with complex tasks of interconnection to large power systems, or as a technical alternative to the management of excess/deficiency of generated energy in smaller grids, considering the load variations.

On the other hand, regarding the incentive program for the Electricity Demand Reduction (EDR), it is necessary to investigate and delimit practical scenarios for the incorporation of economic dispatch process in microgrids to meet real customer benefits. In such a way that the reduction of energy consumption should be more reliable than only the possible reduction of generated energy, besides to find the best possible energy schedule that implies not only reduce fuel costs, but also it improves the pattern of energy consumption for any load. Therefore, new trends of economic dispatch imply many variables that must be included in the problem formulation to achieve a flexible and reliable electric power system, considering diverse topologies and including different penetration levels of renewable energy sources.

This paper presents an application of Model Predictive Control (MPC) [1] to define the input values to the economic dispatch algorithm, considering the management of variations for both loads and RES capacity [2]. In addition, the proposed formulation includes a benefits program based on EDR, where costumers obtain economic benefit by reducing their consumption and are adequately compensated depending of the levels of participation in the dynamic economic dispatch (DED) problem [3]. Finally, the treatment cost of the air pollution produced by DG in the microgrid is incorporated, too.

## 2. Literature Review

In [4] it is considered that the microgrids contemplate the possibility of energy storage by means of devices such as BESS, compressors, accumulation by pumping and can work in the connection mode to the main grid, where the energy transfer can be carried out in the form bidirectional depending on its generation capacity or in isolated mode, where the microgrid is self-sufficient and excess production can be used for storage, in [5] it is described that both cases have advantages to ensure high reliability supply, sustainability, quality of energy and the search to reduce costs due to losses in the electricity, transmission and distribution lines. In [6] it is considered the generating units of the local networks can be of any type. However, recently the Renewable Energy Sources (RES) have become preferred for their use given their environmental benefits in addition to the convenience in generation costs. RES generators can be used individually or grouped in modules in such a way that their efficiency is increased either in acquisition cost or with the optimization approach in operation and control.

In this paper, the Dynamic Economic Dispatch Problem (DED) must meet the operating needs of the system in real time, since it not only looks for the lowest operating cost in a scheduling cycle, but also considers the different distributed generators (DG) during several periods. In [7] various approaches are proposed for microgrids, however the approach proposed in this paper expresses the cost as a function of the power that will supply to the load within the microgrid and includes the costs of regeneration of the gases emitted by the combustion of conventional generators. Since a characteristic of the functioning of some RES is its stochastic nature, in [8] the optimization of costs is studied considering this aspect. A microgrid can include generators that use as primary source; wind, photovoltaic energy, any form of thermal energy generation, various forms of kinetic energy such as hydraulic, with storage in batteries in order to maximize the overall economic benefit of the system and the determination of the optimal conditions of production of the energy sources, while the equilibrium restrictions on the side of the load are satisfied [9]. In [10] a microgrid is analyzed in its dynamic operation and a solution approach is proposed that contains a factor that considers the cost of recovering the pollution from a mathematical model point of view. In [2] it is considered a microgrid formed by wind turbines, photovoltaic modules with batteries, and this system is connected to a main grid, in this case, the analysis is carried out under different market policies and an approach of solution through the heuristic called Particle Swarm Optimization (PSO) [10].

A new dimension is presented in [11] with respect to the temporal correlation of intermittent renewable energy sources in hybrid systems and considers the daily variations of energy consumption in the different seasons of the year for a dispatch strategy with conventional machines; however; in this approach, the costs of regeneration of pollutants produced by conventional generation systems are not considered, nor is the concept of restriction of demand. In paper [12] is presents a distributed method to solve the problem of economic dispatch of combined heat and energy, which formulates a distributed coupled optimization problem that establishes two consensus protocols with feedback parts that satisfies the balance between electrical demand and heat demand, through an iterative method, in this approach are not considered additional aspects such as the regeneration of polluting, nor demand constraints [13,14,15]. In [16] an approach based on the generation of wind energy and photovoltaic generation is presented, here it is considered a new way of operating energy systems in a micro grid, suggesting a new mode of consumption, derived from the growing connection between energy resources and awareness of environmental protection, taking into account the reductions in SO

_{2}and NOx emissions, however the aspect of demand restriction nor is considered in the proposal.This paper considers different distributed generation systems as a main part to design a microgrid and the resources management is defined in a period through proposed dynamic economic dispatch approach. The inputs are obtained by the model predictive control algorithm considering variations of both pattern of consumption and generation systems capacity, including conventional and renewable energy sources. Furthermore, the proposed approach considers a benefits program to customers involving a demand restriction and the costs of regeneration of the pollutants produced by conventional generation systems. The dispatch strategy through a mathematical programming approach seeks to reduce to the minimum the fuel cost of conventional generators, the energy transactions, the regeneration of polluted emissions and, finally, includes the benefit in electricity demand reduction satisfying all restrictions through mathematical programming strategy.

## 3. Economic Dispatch Algorithm

The problem of assigning the load demands of the customers among the available generating units in an economically, safely and reliably way has received considerable attention [11,12]. The problem of the economic dispatch has two different formulations in the literature. The first formulation is called the problem of dynamic economic dispatch and the second problem of static economic dispatch. The problem of dynamic economic dispatch differs from the static economic dispatch problem by the incorporation of generator ramp speed restrictions [16].

Economic dispatch is a centralized approach to determining the optimal scheduling of generators, known as unit commitment. Economic dispatch for micro grids presents a highly constrained non-linear, mixed-integer optimization problem that scales exponentially with the number of systems [17]. There are many different distribution generations as they are shown in the paper [18]. The distribution generations will show different features in the dynamic economic dispatch under different operation modes and scheduling strategies.

This paper considers different distributed generation systems as a main part to design a microgrid and the resources management is defined in a period through proposed dynamic economic dispatch approach. The inputs are obtained by the model predictive control algorithm considering variations of both pattern of consumption and generation systems capacity, including conventional and renewable energy sources. Furthermore, the proposed approach considers a benefits program to customers involving a demand restriction and the costs of regeneration of the pollutants produced by conventional generation systems. The dispatch strategy through a mathematical programming approach seeks to reduce to the minimum the fuel cost of conventional generators, the energy transactions, the regeneration of polluted emissions and, finally, includes the benefit in electricity demand reduction satisfying all restrictions through mathematical programming strategy.

If an assumption is made that Locational Marginal Prices (LMP’s) [19] are used to purchase power between the main grid and microgrid from a specific interface bus (given as $\gamma $), then the total transaction cost for trading transferable power is ${C}_{r}\left({P}_{rt}\right)$ and is given as [3].
where $P{r}_{t}$ is the transferable power between the microgrid and the main grid at time $t$. The objective function in the grid connected mode is thus to minimize the fuel cost of the conventional generators and the transaction costs of the transferable power, given by:
subject to the following constraints:
where $w$ is the power weighting generated and exchanged, ${C}_{r}\left({P}_{rt}\right)$ is the transaction cost for trading transferable power at time $t$; ${C}_{i}\left({P}_{i,t}\right)$ is the fuel cost of conventional generator $i$ at time $t$ function; $P{r}_{max}$ is the maximum power that can be transferred between the main grid and microgrid; $T$ are the total number dispatch interval; $I$ is the total number of the DGs in the microgrid, ${C}_{k}\left({P}_{i,t}\right)$ is the treatment cost of the $k$th class of pollutants, where ${y}_{j,t}$ is the value United States Dollars (USD) of monetary compensation the customer receives at time $t$.

$${C}_{r}\left({P}_{rt}\right)=\{\begin{array}{ccc}{\gamma}_{c}P{r}_{t},& P{r}_{t}>0& \mathrm{Power}\text{}\mathrm{to}\text{}\mathrm{microgrid}\\ 0,& P{r}_{t}=0& \mathrm{Disconect}\\ -{\gamma}_{v}P{r}_{t,\text{}}& P{r}_{t}0& \mathrm{Power}\text{}\mathrm{to}\text{}\mathrm{main}\text{}\mathrm{grid}\end{array}$$

$$min\{\left(w\right)\left[\sum _{t=1}^{T}\sum _{i=1}^{I}{C}_{i}\left({P}_{i,t}\right)+\sum _{t=1}^{T}{C}_{r}\left(P{r}_{t}\right)\right]+\left(1-w\right)\left[\sum _{t=1}^{T}\sum _{j=1}^{J}{C}_{b}\left({x}_{j,t}\right)\right]+\sum _{t=1}^{T}\sum _{i=1}^{I}\sum _{k}{C}_{k}\left({P}_{i,t}\right)\}$$

$$\sum _{i=1}^{I}{P}_{i,t}+P{w}_{t}+P{s}_{t}+P{r}_{t}={D}_{j,t}-\sum _{j=1}^{J}{x}_{j,t}$$

$${P}_{i,min}\le {P}_{i,t}\le {P}_{i,max}$$

$$0\le P{w}_{t}\le {W}_{t}$$

$$0\le P{s}_{t}\le {S}_{t}$$

$$-P{r}_{max}\le P{r}_{t}\le P{r}_{max}$$

$$-D{R}_{i}\le {P}_{i,t+1}-{P}_{i,t}\le U{R}_{i}$$

$${C}_{k}\left({P}_{i,t}\right)={\alpha}_{t}{\beta}_{k}{P}_{i,t}$$

$${C}_{b}\left({x}_{j,t}\right)={y}_{j,t}+{\lambda}_{j,t}{x}_{j,t}$$

The model is subject to the following constraints: constraint (3) is the power balance constraint and ensures that at any time t, the total power generated from the conventional, wind and solar generators and the power transferred from the main grid equals the total demand; constraint (4) is the generation limits constraint for the conventional generators and ensures that the generator limits are not exceeded; the third and fourth constraints are the generation limits constraint for the renewable generators (constraints (5) and (6)). They ensure that the optimal values for the wind and solar generators are less than or equal to the forecast or maximum values; constraint (7) is the limit for the transferable power between the main grid and microgrid. This is dictated by the physical characteristics of the transmission facilities between the main grid and microgrid; and constraint (8) is the conventional generator ramp rate limits constraint and ensures that the generator ramp rate limits are not violated. For the sake of simplicity, the conventional generator fuel cost in Equation (11) is assumed to be a quadratic function of the generators active power output [10] and is given as [3]:

$${C}_{i}\left({P}_{i,t}\right)={a}_{i}{P}_{i,t}^{2}+{b}_{i}{P}_{i,t}$$

The cost function of the client defined in (10) models the participation of this factor in the function to be optimized, which is related to its quadratic behavior of (12) that describes the cost incurred by $\theta $ client that reduces the consumption of energy in x kVA. In this work, it is assumed that the mathematical function is given as [20]:
where ${K}_{1}$ and ${K}_{2}$ are cost co-efficients. $\theta $ is the customer type and is used to categorize the different kinds of customers based on their desire/readiness to curb electric power. $\theta $ is normalized in the interval $0\le \theta \le 1$, thus $\theta $ = 1 for the most willing customer and $\theta $ = 0 for the least willing.

$$C\left(\theta ,x\right)=\left({K}_{1}{x}^{2}+{K}_{2}x-{K}_{2}x\theta \right)$$

## 4. Case Study

The proposed approach is shown in Figure 1 and consists of a micro grid consisting of three conventional diesel-based generators (${P}_{1}$, ${P}_{2}$, ${P}_{3}$), a wind energy conversion system (WECS) and a solar photovoltaic (PV) system. The interconnection to a main grid for energy transfer bidirectional ($Pr$) and three clients (${D}_{1}$, ${D}_{2}$, ${D}_{3}$), are also considered an operating interval of 24 h. Where the decision variables are: ${x}_{j,t}$, ${y}_{j,t}$, $P{w}_{t}$,$P{s}_{t}$, $P{r}_{t}$ and ${P}_{i,t}$. The configuration of the study microgrid is shown in Figure 1. In addition Table 1 shows the coefficients of the fuel cost function, the power output limits and the ramp values of conventional generators.

The bonus cost coefficients for customers, their classification and the maximum capacity for daily interruptability are shown in Table 2 [3].

The values for ${W}_{t}$ and ${S}_{t}$ were estimated based on the wind speed readings with an anemometer installed at a height of 8 m, as well as the stochastic and diffuse global irradiance detected per hour using the simplified inclined plane model at the location in 20°8′3.63″ N, 98°23′4.57″ W at 2181 m altitude above sea level. Table 3 shows the values of input data for each of the 24 periods t in the one-day analysis period, the energy that can be produced by wind origin ${W}_{t}$, that of the photovoltaic plant ${S}_{t}$, the demand total that must be met ${D}_{t}$, the factors ${\lambda}_{j,t}$ of interruptibility for each client in the EDR program and finally the environmental contingency factor ${\alpha}_{t}$ that defines the start or stop of the pollution regeneration system of the machines of the conventional generators. On the other hand, the paper considers the weighting of conventional generation costs and interconnection (w) with a value of 0.5, the cost is United States Dollar ($ USD) of kVA/h transferred with the main grid is asymmetric in such a way that the sale is $ 1 and the purchase costs is $ 2.8. The maximum capacities of the generating plants are ${W}_{t,m\xe1x}$ 25 kVA, ${S}_{t,\text{}m\xe1x}$ 22 kVA and the conditions of contract and installation only allow the maximum transfer of energy with the upper mesh of 14 kVA and the maximum budget bonus in EDR is $ 400.

The case study assumes the following situations:

- The microgrid is synchronized to the main grid.
- Each element of the system has its self-protection devices working properly.
- It is assumed that the microgrid contains instrumentation for monitoring and equipment for all control actions.
- All generating plants operate in the ramp form and consequently contain their control system.
- It has communication interfaces and protocols for proper operation in monitoring and management.
- The load limitation values have been defined by the customer and do not affect the profitability of their operation in such a way that the resulting bonus represents a real benefit in the DR program.
- The microgrid has access to a self-contained pollutant processing system that allows it to comply with the restrictions of the environmental contingency plan.
- For the optimization analysis, a one-day study interval divided into 24 one-hour periods is considered.

## 5. Results

Solution to the problem of finding the minimum cost in the energy dispatch of the micro-grid proposed in Figure 1, which corresponds to the case study and which was based on the Economic dispatch algorithm with the Lingo program solver by means of quadratic regression that gave the results which are shown in Table 4. The source code of lingo is appended in Appendix A of this paper.

Table 4 shows the result of the optimization algorithm that defines the levels to which the energy transfer of each DG installed in the microgrid under study must be adjusted, where EDR indicates the total kVA energy that will be restricted to the demand in each of the lapses, ${x}_{j,t}$ indicates the quantity of demand that will restrict the client $j$. In the same way in Table 5 the results of the process for the EDR program are shown where ${y}_{j,t}$ refers to the USD monetary bonus that the client will receive for the aforementioned action.

Figure 2 exhibits the level of contribution of energy that each generator element must supply in the microgrid. Figure 3 presents the total demand levels according to the predictive control model, as well as the level of restriction of the demand and finally the level of dispatch that will had be in the microgrid that optimizes its operation in cost.

To establish the consistency of the proposed approach, we consider six particular cases. In Table 6 the particularities of each of them are exposed with respect to the base case.

Table 7 shows the results of the sensitivity analysis, in which the base case and six instances are compared.

Figure 4 exhibits the behavior of the energy dispatch comparing the base case and the proposed instances to analyze the behavior of the proposed approach. Figure 5 shows the behavior of the costs in the sensitivity analysis.

From the analysis of the cases we can establish: in the instance (b) to eliminate the asymmetry in the costs of commercialization with the upper grid it is observed that the originating energy increases of $Pr$ of 11.8 to 87.7 kVA with a slight variation in the conventional production and reduction in the total cost of the analysis period. In instance (c), when customers’ interruptability decreased ${\lambda}_{t}$, the restricted energy and its bonus decreased from 309.9 to 83.8 USD with the imminent increase in total costs from 144.6 to 312.7 USD. In instance (d), by eliminating the priority of customers in DR plan, the values are kept with minimum adjustments that can practically be interpreted as unchanged. In instance (e) where the environmental contingency plan ${\alpha}_{t}$ is eliminated, there is a notable increase in conventional production that goes from 427.7 to 574.5 kVA, the DR plan is used and energy is transferred to the main grid with the remarkable reduction of costs. In case (f) by increasing the environmental contingency plan to all the study periods now the conventional production goes from 427.7 to 158.6 kVA and the energy transferred from the main grid increases from 11.8 to 325.6 kVA, the DR plan it is maintained, which causes the total cost to increase greatly, going from 144.6 to 687.5 USD. Finally, in case (g), by increasing the energy transfer capacity with the upper mesh, conventional production is drastically reduced to 30 kVA with the consequent reduction of the total cost to 179.7 USD.

## 6. Conclusions

The improve operation of the analyzed microgrid is achieved due that the proposed problem formulation regards different variables and possible scenarios of loads and renewable energy generation capacity. In addition, electricity demand reduction plan, the air pollution and contingency case are considered to change if it necessary the energy management profile. The obtained results by the proposed algorithm in 24 periods of analysis in the study interval, guarantee that the output adjustment level of each generator of the microgrid can be defined in the best possible value. The use of the total capacity of the wind and photovoltaic systems is evident, since they do not imply any additional cost. Given the asymmetry in the purchase-sale price in the energy transactions with the primary electric power system exists periods when it is convenient to deliver (negative) energy. However, in the periods in which the environmental contingency occurs, it is recorded that conventional production is reduced giving priority to the maximum capacity of the alternative sources, later, the main grid with conventional generators with lowest pollution. The contribution levels are calculated with the proposed economic dispatch algorithm.

## Author Contributions

S.-L.F.D., developed the mathematical model and performed the writing of Section 2 and Section 3. M.-P.H. and A.-M.O. provided technical advice in Section 3 and Section 4 and performed the writing of Section 1. T.-O.R. provided technical advice in Section 4 and support in the performed the writing of this section. Finally, all authors participated in the discussion and writing of Section 5 and Section 6.

## Funding

This research received no external funding.

## Acknowledgments

The support provided by the administration of the Popular Autonomous University of the State of Puebla (UPAEP), the Polytechnic University of Tulancingo (UPT) and CONACyT are appreciated.

## Conflicts of Interest

The authors declare that there is no conflict of interest regarding the publication of this paper.

## Abbreviations

Indices/Sets: | |

I | Set of conventional generators $i$ |

J | Set of customers connected to the micro-grid, client $i$ connected to the micro-grid with EDR program. |

T | Set of periods for study $t$ |

K | Set of pollutants to regenerate $k$ |

Parameters: | |

$D{R}_{i}$ | lower ramp power limit of the conventional generator $i$ |

$U{R}_{i}$ | upper ramp power limit of conventional generator $i$ |

${a}_{i}$ | quadratic coefficient of the cost function of the conventional generator i |

${b}_{i}$ | linear coefficient of the cost function of the conventional generator $i$ |

$D{T}_{t}$ | total demand in the microgrid in the time $t$ |

${\alpha}_{t}$ | binary coefficient activation of the environmental contingency plan during at t time, |

${S}_{t}$ | photovoltaic energy available in the period t |

${W}_{t}$ | wind energy available in the period t |

${K}_{1,j}$ | quadratic coefficient of cost function to the client $j$ |

${K}_{2,j}$ | linear coefficient of the cost function to the client $j$ |

${\theta}_{j}$ | customer classification client $j$ in DR program |

$C{M}_{j}$ | energy restriction of client $j$ in DR program |

${\lambda}_{j,t}$ | interruptibility factor of client $j$ at time $t$ in DR program |

${\gamma}_{c}$ | purchase price of energy (kVA) from the main grid |

${\gamma}_{v}$ | sale price of energy (kVA) from the main grid |

${\beta}_{k}$ | is the coefficient of pollutant emissions in USD Kg/kVA [18] |

Decision variables: | |

${P}_{i,t}$ | conventional generator $i$ power at time $t$ |

$P{S}_{t}$ | power production of the photo voltaic plant at time $t$ |

$P{W}_{t}$ | power output of the wind power plant at time $t$ |

$P{r}_{t}$ | power transferred with the upper main grid at time $t$ |

${x}_{j,t}$ | reduced energy per participating client $j$ at time $t$ |

${y}_{j,t}$ | value of the monetary compensation for the client $j$ at time $t$ |

## Appendix A. Lingo Source Code Program

Model: ! Micro-network model 3 generators and 3 clients;

SETS:

Mc//: Pmin, Pmax, DR, UR, a1, b1;

hr//: DT, S, W, Pr, PW, PS, CPr, Alfa; Cte//: K1, K2, Tetha, CM; TPol//:Beta;

Pot(Mc,hr): P, CC, LRP;

Con(Cte,hr): X, Y, Lambda;

ENDSETS

DATA:

pcg = ;

PrCon = ;

PrVta = ;

PWm = ;

PSm = ;

Prm = ;

Pmin = ;

Pmax = ;

DR = ;

UR = ;

a1 = ;

b1 = ;

K1 = ;

K2 = ;

Tetha = ;

CM = ;

UB = ;

Beta = ;

Alfa = ;

S = ;

W = ;

DT = ;

Lambda = ;

ENDDATA

CALC:

@For( hr(t) : Gamma = @If( Pr(t) #GT# 0 , PrCon , -PrVta ) )

tmax = @Max( hr(t): t );

@For( Pot(i,t) : LRP(i,t) = @If( t #LT# tmax , P(i,t+1) - P(i,t) , P(i,t) ) );

@For( Pot(i,t): CC(i,t) = a1(i)*(P(i,t)^2) + b1(i)*P(i,t) );

@For( hr(t): CPr(t) = Alfa*Gamma*Pr(t) );

ENDCALC

Min = pcg*( @Sum( Pot(i,t): a1(i)*(P(i,t)^2) + b1(i)*P(i,t) ) + @Sum(hr(t): Gamma*Pr(t) ) ) + (1-pcg)* ( @Sum(Con(j,t): Y(j,t)-Lambda(j,t)*X(j,t) ) ) + @Sum(TPol(k): Beta(k)*@sum( Pot(i,t): Alfa(t)*P(i,t) ) ) ;

@For( hr(t) : @Sum( Mc(i) : P(i,t) ) + PS(t) + PW(t) + Pr(t) = DT(t) - @Sum( Cte(j): X(j,t) ) );

@For(Pot(i,t): @BND( Pmin(i) , P(i,t) , Pmax(i) ) );

@For(hr(t): @BND( 0 , PW(t) , W(t) ) );

@For(hr(t): @BND( 0 , PS(t) , S(t) ) );

@For(hr(t): @BND( -Prm , Pr(t) , Prm ) );

@For(Pot(i,t): @BND( -DR(i) , LRP(i,t) , UR(i) ) );

@For(Con(j,t): @Sum( Con(j,t): Y(j,t) − ( K1(j)*X(j,t)^2 + K2(j)*X(j,t) - K2(j)*X(j,t)*Tetha(j) ) ) >=0 ) ;

@For(Con(j,t): @Sum( Con(j,t): Y(j,t) − ( K1(j)*X(j,t)^2 + K2(j)*X(j,t) - K2(j)*X(j,t)*Tetha(j) ) ) >= @If( j #EQ# 1 , 0 ,

@Sum( Con(j,t): Y(j−1,t) - ( K1(j−1)*X(j−1,t)^2 + K2(j−1)*X(j−1,t) - K2(j−1)*X(j−1,t)*Tetha(j−1) ) ) ) );

@For(Con(j,t): @Sum( Con(j,t): Y(j,t) ) <= UB ) ;

@For(Cte(j): @Sum( hr(t): X(j,t) ) <= CM(j) ) ;

## References

- Tazvinga, H.; Xia, X.; Zhu, B. Model Predictive Control for Energy Dispatch of a Photovoltaic-Diesel-Battery Hybrid Power System. In Proceedings of the 19th World Congress the International Federation of Automatic Control, Cape Town, South Africa, 24–29 August 2014. [Google Scholar]
- Zhao, J.; Qian, J.; Han, K. A Novel Robust Tuning Strategy for Model Predictive Control. In Proceedings of the 6th World Congress on Intelligent Control and Automation, Dalian, China, 21–23 June 2006. [Google Scholar]
- Xia, X.; Nwulu, N.I. Optimal dispatch for a microgrid incorporating renewables and demand response. Renew. Energy
**2017**, 101, 16–28. [Google Scholar] - Crijns-Grausa, W.H.J.; Guerrerob, J.M.; Vasquez, J.C.; Soshinskaya, M. Microgrids: Experiences, barriers and success factors. Renew. Sust. Energy Rev.
**2014**, 40, 629–672. [Google Scholar] - Patidar, N.P.; Nema, R.K.; Paliwaln, P. Planning of grid integrated distributed generators: A review of technology, objectives and techniques. Renew. Sustain. Energy Rev.
**2014**, 40, 557–570. [Google Scholar] - Gatsis, N.; Giannakis, G.B.; Zhang, Y. Robust Energy Management for Microgrids with High-Penetration Renewables. IEEE Trans. Sustain. Energy
**2013**, 4, 944–953. [Google Scholar] - Wang, R.; Wang, P.; Xiao, G.; Gong, S. Power demand and supply management in microgrids with uncertainties of renewable energies. Int. J. Electr. Power Energy Syst.
**2014**, 63, 260–269. [Google Scholar] [CrossRef] - Nicolay, P.; Velik, R. A cognitive decision agent architecture for optimal energy management of microgrids. Energy Convers. Manag.
**2014**, 86, 831–847. [Google Scholar] - Zhou, H.; Wu, K. A multi-agent-based energy-coordination control system for grid-connected large-scale wind–photovoltaic energy storage power-generation units. Sol. Energy
**2014**, 107, 245–259. [Google Scholar] - Hosseiman, S.H.; Gharehpetian, G.B.; Mohammadi, M. Optimization of hybrid solar energy sources/wind turbine systems integrated to utility grids as microgrid (MG) under pool/bilateral/hybrid electricity market using PSO. Sol. Energy
**2012**, 86, 112–125. [Google Scholar] - Happ, H.H. Optimal power dispatch—A comprehensive survey. IEEE Trans. Power App. Syst.
**1977**, 96, 841–854. [Google Scholar] [CrossRef] - Rahman, S.; Chowdhury, B.H. A review of recent advances in economic dispatch. IEEE Trans. Power Syst.
**1990**, 5, 1248–1259. [Google Scholar] - Xia, X.; Zhang, J.; Tazvinga, H. Minimum cost solution of photovoltaic diesel battery hybrid systems for remote consumer. Sol. Energy
**2013**, 96, 292–299. [Google Scholar] - Chen, S.; Zhou, Y.; Wang, J.; Cui, Y.; Wang, X. Optimal Dispatch of Microgrid with Combined Heat and Power System Considering Environmental Cost. Energies
**2018**, 11, 2493. [Google Scholar] [CrossRef] - Zhang, H.G.; Huang, B.N.; Teng, F.; Li, Y.S. Distributed Optimal Economic Dispatch Based on Multi-Agent System Framework in Combined Heat and Power Systems. Appl. Sci.
**2016**, 6, 308. [Google Scholar][Green Version] - Elaiw, A.M.; Xia, X. Optimal dynamic economic dispatch of generation: A review. Electr Power Syst. Res.
**2010**, 80, 975–986. [Google Scholar] [CrossRef] - Panossian, D.; Jabbari, N.; Traverso, F.; McLarty, A. Dynamic Economic Dispatch using Complementary Quadratic Programming. Energy
**2019**, 166, 755–764. [Google Scholar] [CrossRef] - Liu, X.; Ding, M.; Wu, H. Dynamic economic dispatch of a microgrid: Mathematical models and solution algorithm. Int. J. Electr. Power Energy Syst.
**2014**, 63, 336–346. [Google Scholar] [CrossRef] - Fahrioglu, M.; Nwulu, N.I. A soft computing approach to projecting locational marginal price. Neural Comput. Appl.
**2013**, 22, 1115–1124. [Google Scholar] - Fahriog, M. Designing Incentive Compatible Contracts for Effective Demand Management. IEEE Trans. Power Syst.
**2000**, 15, 1255–1260. [Google Scholar] [CrossRef]

i | ${\mathit{a}}_{\mathit{i}}$ | ${\mathit{b}}_{\mathit{i}}$ | ${\mathit{P}}_{\mathit{i},\mathit{m}\mathit{i}\mathit{n}}\phantom{\rule{0ex}{0ex}}\left(\mathrm{kVA}\right)$ | ${\mathit{P}}_{\mathit{i},\mathit{m}\mathit{a}\mathit{x}}\phantom{\rule{0ex}{0ex}}\left(\mathrm{kVA}\right)$ | $\mathit{D}{\mathit{R}}_{\mathit{i}}\phantom{\rule{0ex}{0ex}}\left(\mathrm{kVA}\right)$ | $\mathit{U}{\mathit{R}}_{\mathit{i}}\phantom{\rule{0ex}{0ex}}\left(\mathrm{kVA}\right)$ |
---|---|---|---|---|---|---|

1 | 0.06 | 0.5 | 0 | 4 | 1 | 3 |

2 | 0.03 | 0.25 | 0 | 6 | 1 | 5 |

3 | 0.04 | 0.3 | 0 | 9 | 1 | 8 |

j | ${\mathit{K}}_{1\mathit{j}}$ | ${\mathit{K}}_{2\mathit{j}}$ | ${\mathit{\theta}}_{\mathit{j}}$ | ${\mathit{K}}_{\mathit{j}}\text{}(\mathrm{kVA}/h)$ |
---|---|---|---|---|

1 | 1.079 | 1.32 | 0 | 30 |

2 | 1.078 | 1.63 | 0.45 | 35 |

3 | 1.847 | 1.64 | 0.9 | 40 |

$\mathit{t}$ (h) | ${\mathit{W}}_{\mathit{t}}$ (kVA) | ${\mathit{S}}_{\mathit{t}}$ (kVA) | ${\mathit{D}}_{\mathit{t}}$ (kVA) | ${\mathit{\lambda}}_{1,\mathit{t}}$ ($/kVA) | ${\mathit{\lambda}}_{2,\mathit{t}}$ ($/kVA) | ${\mathit{\lambda}}_{3,\mathit{t}}$ ($/kVA) | ${\mathit{\alpha}}_{\mathit{t}}$ |
---|---|---|---|---|---|---|---|

1 | 8.5 | 0 | 35.8 | 1.7 | 3.7 | 2.7 | 0 |

2 | 8.5 | 0 | 36.1 | 1.4 | 2.7 | 1.9 | 0 |

3 | 9 | 0 | 34.7 | 2.2 | 3.2 | 1.8 | 0 |

4 | 7 | 0 | 35.2 | 3.7 | 2.6 | 1.9 | 0 |

5 | 7.5 | 0 | 35.5 | 4.5 | 3.8 | 2.3 | 0 |

6 | 8 | 0 | 34.9 | 4.7 | 1.7 | 0.7 | 0 |

7 | 9 | 0 | 35.1 | 5.1 | 2.3 | 1.4 | 1 |

8 | 11 | 7 | 40.8 | 5.3 | 1.5 | 0.5 | 1 |

9 | 12 | 13 | 47.5 | 6.7 | 4.3 | 2.9 | 1 |

10 | 10 | 18 | 48.3 | 6.6 | 4.6 | 1.6 | 0 |

11 | 10 | 21 | 48.5 | 6.8 | 3.5 | 4.3 | 0 |

12 | 10 | 21.5 | 51.1 | 6.2 | 4.2 | 4.8 | 0 |

13 | 11 | 20.5 | 59.7 | 7.3 | 4.3 | 5.1 | 0 |

14 | 14 | 19.5 | 61.7 | 7.8 | 6.3 | 5.4 | 0 |

15 | 13 | 19 | 58.1 | 0.5 | 3.5 | 5.5 | 0 |

16 | 18 | 19 | 56.6 | 5.2 | 5.3 | 6.1 | 0 |

17 | 20 | 17 | 52.7 | 6.8 | 5.3 | 5.6 | 1 |

18 | 22 | 16 | 50.7 | 5.7 | 6.1 | 6.3 | 1 |

19 | 13 | 7 | 42.6 | 4.8 | 2.6 | 4.5 | 0 |

20 | 12 | 0 | 39.4 | 3.9 | 3.6 | 4.2 | 0 |

21 | 11 | 0 | 34.8 | 3.8 | 4.2 | 3.9 | 0 |

22 | 8.5 | 0 | 34.1 | 3.1 | 3.8 | 3.2 | 0 |

23 | 8 | 0 | 35.2 | 2.5 | 2.3 | 2.8 | 0 |

24 | 8.5 | 0 | 35.6 | 1.9 | 3.8 | 4.2 | 0 |

$\mathit{t}$ | $\mathit{P}{\mathit{W}}_{\mathit{t}}$ | $\mathit{P}{\mathit{S}}_{\mathit{t}}$ | ${\mathit{P}}_{1\mathit{t}}\phantom{\rule{0ex}{0ex}}\left(\mathrm{kW}\right)$ | ${\mathit{P}}_{2\mathit{t}}\phantom{\rule{0ex}{0ex}}\left(\mathrm{kW}\right)$ | ${\mathit{P}}_{3\mathit{t}}\phantom{\rule{0ex}{0ex}}\left(\mathrm{kW}\right)$ | $\mathit{P}{\mathit{r}}_{\mathit{t}}\phantom{\rule{0ex}{0ex}}\left(\mathrm{kW}\right)$ | Total Power | EDR | ${\mathit{x}}_{1,\mathit{t}}$ | ${\mathit{x}}_{2,\mathit{t}}$ | ${\mathit{x}}_{3,\mathit{t}}$ |
---|---|---|---|---|---|---|---|---|---|---|---|

1 | 8.5 | 0.0 | 4.0 | 8.0 | 12.0 | 0.8 | 33.3 | 2.5 | 0.0 | 1.2 | 1.3 |

2 | 8.5 | 0.0 | 4.0 | 8.0 | 12.0 | 1.7 | 34.2 | 1.9 | 0.0 | 0.8 | 1.1 |

3 | 9.0 | 0.0 | 4.0 | 8.0 | 12.0 | −0.4 | 32.6 | 2.1 | 0.0 | 1.0 | 1.1 |

4 | 7.0 | 0.0 | 4.0 | 8.0 | 12.0 | 1.8 | 32.8 | 2.4 | 0.5 | 0.8 | 1.1 |

5 | 7.5 | 0.0 | 4.0 | 8.0 | 12.0 | 0.7 | 32.2 | 3.3 | 0.9 | 1.2 | 1.2 |

6 | 8.0 | 0.0 | 4.0 | 8.0 | 12.0 | 0.7 | 32.7 | 2.2 | 1.0 | 0.5 | 0.8 |

7 | 9.0 | 0.0 | 0.3 | 5.0 | 3.0 | 14.0 | 31.3 | 3.9 | 1.6 | 1.0 | 1.2 |

8 | 11.0 | 7.0 | 0.0 | 3.5 | 1.9 | 14.0 | 37.4 | 3.3 | 1.7 | 0.7 | 1.0 |

9 | 12.0 | 13.0 | 0.0 | 2.1 | 0.9 | 14.0 | 42 | 5.5 | 2.3 | 1.7 | 1.6 |

10 | 10.0 | 18.0 | 4.0 | 8.0 | 12.0 | −8.1 | 43.9 | 4.4 | 1.9 | 1.5 | 1.0 |

11 | 10.0 | 21.0 | 4.0 | 8.0 | 12.0 | −11.3 | 43.7 | 4.8 | 2.0 | 1.1 | 1.7 |

12 | 10.0 | 21.5 | 4.0 | 8.0 | 12.0 | −9.3 | 46.2 | 4.9 | 1.7 | 1.4 | 1.9 |

13 | 11.0 | 20.5 | 4.0 | 8.0 | 12.0 | −1.4 | 54.1 | 5.6 | 2.2 | 1.4 | 2.0 |

14 | 14.0 | 19.5 | 4.0 | 8.0 | 12.0 | −2.4 | 55.1 | 6.6 | 2.4 | 2.1 | 2.0 |

15 | 13.0 | 19.0 | 4.0 | 8.0 | 12.0 | −1.1 | 54.9 | 3.2 | 0.0 | 1.1 | 2.1 |

16 | 18.0 | 19.0 | 4.0 | 8.0 | 12.0 | −9.6 | 51.4 | 5.2 | 1.2 | 1.8 | 2.2 |

17 | 20.0 | 17.0 | 0.0 | 0.0 | 0.0 | 9.9 | 46.9 | 5.8 | 2.0 | 1.8 | 2.1 |

18 | 22.0 | 16.0 | 0.0 | 0.0 | 0.0 | 6.9 | 44.9 | 5.8 | 1.4 | 2.1 | 2.3 |

19 | 13.0 | 7.0 | 4.0 | 8.0 | 12.0 | −5.0 | 39 | 3.6 | 1.0 | 0.8 | 1.8 |

20 | 12.0 | 0.0 | 4.0 | 8.0 | 12.0 | −0.1 | 35.9 | 3.5 | 0.6 | 1.2 | 1.7 |

21 | 11.0 | 0.0 | 4.0 | 8.0 | 12.0 | −3.8 | 31.2 | 3.6 | 0.6 | 1.4 | 1.6 |

22 | 8.5 | 0.0 | 4.0 | 8.0 | 12.0 | −1.3 | 31.2 | 2.9 | 0.2 | 1.2 | 1.4 |

23 | 8.0 | 0.0 | 4.0 | 8.0 | 12.0 | 1.2 | 33.2 | 2.0 | 0.0 | 0.7 | 1.3 |

24 | 8.5 | 0.0 | 4.0 | 8.0 | 12.0 | 0.1 | 32.6 | 3.0 | 0.0 | 1.2 | 1.7 |

$\mathit{t}$ | ${\mathit{y}}_{1,\mathit{t}}$ | ${\mathit{y}}_{2,\mathit{t}}$ | ${\mathit{y}}_{3,\mathit{t}}$ |
---|---|---|---|

(USD) | |||

1 | 0.0 | 3.4 | 4.0 |

2 | 0.0 | 1.9 | 2.9 |

3 | 0.0 | 2.6 | 2.8 |

4 | 1.0 | 1.8 | 2.9 |

5 | 2.0 | 3.5 | 3.5 |

6 | 2.3 | 0.9 | 1.6 |

7 | 4.9 | 2.7 | 3.5 |

8 | 5.2 | 1.5 | 2.3 |

9 | 8.5 | 6.0 | 5.6 |

10 | 6.2 | 5.0 | 2.6 |

11 | 6.7 | 3.1 | 6.8 |

12 | 5.2 | 4.2 | 7.8 |

13 | 8.0 | 4.4 | 8.4 |

14 | 9.5 | 8.8 | 9.0 |

15 | 0.0 | 3.1 | 9.3 |

16 | 3.2 | 6.4 | 10.7 |

17 | 6.7 | 6.4 | 9.5 |

18 | 4.1 | 8.3 | 11.1 |

19 | 2.5 | 1.8 | 7.2 |

20 | 1.2 | 3.2 | 6.6 |

21 | 1.1 | 4.2 | 6.0 |

22 | 0.4 | 3.5 | 4.8 |

23 | 0.0 | 1.5 | 4.2 |

24 | 0.0 | 3.5 | 6.6 |

Case | Considered Characteristics |
---|---|

a (Base case) | All parameters of the initial study are considered. |

b | It is considered a sale price ${\gamma}_{v}$= $1 and purchases ${\gamma}_{c}$ = $1 in the transfer of energy with the main grid. |

c | It is considered ${\lambda}_{t}$ = 0 as the interruptibility coefficient for all customers |

d | It is considered ${\theta}_{j}$ = 0 with the same priority for customers as well ${\lambda}_{t}$ = 0 in the EDR plan |

e | It is considered ${\alpha}_{t}$ = 0 without environmental contingency |

f | It is considered ${\alpha}_{t}$ = 1 in the 24 h with environmental contingency |

g | It is considered ${\gamma}_{v}$ = ${\gamma}_{c}$ = 1, ${\alpha}_{t}$ = 1, 24 h and $P{r}_{m\xe1x}$ = 30 kVA |

Variables | a | b | c | d | e | f | g | Standard Deviation |
---|---|---|---|---|---|---|---|---|

${\mathit{D}}_{\mathit{t}}$(kVA) | 1044.7 | 1044.7 | 1044.7 | 1044.7 | 1044.7 | 1044.7 | 1044.7 | 0.00 |

$\mathit{P}\mathit{W}$(kVA) | 269.5 | 269.5 | 269.5 | 269.5 | 269.5 | 269.5 | 269.5 | 0.00 |

$\mathit{P}\mathit{S}$(kVA) | 198.5 | 198.5 | 198.5 | 198.5 | 198.5 | 198.5 | 198.5 | 0.00 |

${\mathit{P}}_{\mathit{1}}$(kVA) | 76.3 | 76 | 76.6 | 76.7 | 96 | 9.1 | 0 | 37.75 |

${\mathit{P}}_{2}$(kVA) | 162.6 | 160.5 | 164.7 | 165.3 | 192 | 92.7 | 0 | 66.42 |

${\mathit{P}}_{3}$(kVA) | 233.8 | 170.6 | 235.6 | 236.1 | 286.5 | 56.8 | 0 | 106.38 |

$\mathit{P}\mathit{r}$(kVA) | 11.8 | 87.7 | 52.1 | 61.1 | −88.9 | 325.6 | 496.8 | 202.94 |

$\mathit{x}$(kVA) | 92.3 | 82 | 47.8 | 37.5 | 91 | 92.5 | 79.9 | 22.66 |

$\mathit{y}$(USD) | 309.9 | 257.1 | 96.1 | 83.8 | 301.2 | 308.3 | 243.6 | 98.14 |

${\mathit{\alpha}}_{\mathit{t}}$(h) | 5 | 5 | 5 | 5 | 0 | 24 | 24 | 9.93 |

${\mathit{C}}_{\mathit{T}}$(USD) | 144.6 | 123.7 | 312.7 | 321.6 | 12 | 687.5 | 179.7 | 219.46 |

Iterations | 607 | 362 | 174 | 159 | 361 | 274 | 290 | 150.58 |

Seconds | 1.12 | 0.33 | 0.28 | 0.22 | 0.24 | 0.19 | 0.2 | 0.33 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).