Open Access This article is
- freely available
Energies 2018, 11(8), 2167; doi:10.3390/en11082167
Optimal Energy Management within a Microgrid: A Comparative Study
Electrical Engineering Department, Campus Irapuato-Salamanca, University of Guanajuato, Guanajuato 36885, Mexico
Department of Informatics, University of Almería, Agrifood Campus of International Excellence (ceiA3) CIESOL Joint Centre University of Almería-CIEMAT, 04120 Almería, Spain
Author to whom correspondence should be addressed.
Received: 21 June 2018 / Accepted: 16 August 2018 / Published: 19 August 2018
In this work, we focus on optimal energy management within the context of the tertiary control of a microgrid operating in grid-connected mode. Specifically, the optimal energy management problem is solved in a unified way by using the optimal power flow (OPF) and day-ahead concepts. The elements considered in the microgrid are a photovoltaic panel, a wind turbine, electric vehicles, a storage system, and a point of common coupling with the main grid. The aim of this paper consists of optimizing the economic energy dispatch within the microgrid considering known predictions of electricity demand, solar radiation, and wind speed for a given period of time. The OPF is solved using three different algorithms provided by the optimization toolbox of MATLAB® (R2015a, MathWorks®, Natick, MA, USA): the interior point method (IP), a hybrid genetic algorithm with interior point (GA-IP), and a hybrid direct search with interior point (patternsearch-IP). The efficiency and effectiveness of the algorithms to optimize the energy dispatch within the microgrid are verified and analyzed through a case study, where real climatological data of solar irradiance, wind speed in Almería city, photovoltaic system data, and room load from a bioclimatic building were considered.
Keywords:microgrid; optimal power flow; distributed power system; energy management
Nowadays, continuous technological advances have caused a remarkable reduction in prices of electricity generation systems powered by renewable energy resources. This fact and the high level of efficiency achieved in small generating plants, availability of technology for generation from renewable resources, and the release of the electricity market have promoted the integration of Distributed Generation (DG) at the distribution level. Distributed generation sources provide energy directly to the distribution network or supplied directly to a set of consumers . Technological innovation, enabling policies, and the drive to address climate change have placed renewables at the centre of the global energy transformation . Accordingly, renewable energy systems have taken a core position for electric power distributed generation. Due to its fast technological development, the commonly installed distributed generators are photovoltaic and wind turbine systems. The integration of these renewable DG systems refreshes the electric distribution networks and provides new opportunities and benefits. Its integration, however, brings new challenges for the protection, control, and operation of these electric networks . For example, traditional electric distribution networks were designed, controlled, and operated as passive systems, whereas the integration of DG transforms them into active power networks where the energy flow is now bidirectional. One of the main challenges for the integration of renewable DG systems is the intermittent power generation, i.e., their power production depends on weather conditions. The intermittency of these sources produces a power generation that requires a robust control system to fit the profile of the load demand. Moreover, it makes the balance of the network and planning reserves more complex .
The microgrid concept was introduced precisely as a solution for the reliable integration of DG systems . The U.S. Department of Energy (DOE) defines a microgrid as “a group of interconnected loads and distributed energy resources within clearly defined electrical boundaries that acts as a single controllable entity with respect to the grid. A microgrid can connect and disconnect from the grid to enable it to operate in both grid-connected or island mode .” Currently, many other organizations and research groups define microgrids with very similar definitions, including the concept of a system having Points of Common Coupling (PCC), of multiple controllable loads and distributed generation, energy storage, of islanding from the grid, and, recently included, the concept of a power system cell . A microgrid must accomplish certain special needs, such as improving local security, reducing loss connection, supporting local tensions, correcting the voltage drop, or providing uninterruptible power supplies, etc. In addition, the microgrid must have the ability to respond in seconds to the system requirements and final consumers [7,8,9].
According to the aforementioned definition, a microgrid has two operation modes: grid-connected mode, where the microgrid is connected to the main network to a low or medium voltage level through one or more PCC, and island mode, where the microgrid works without connection with the main grid . The operational requirements for each mode of operation as well as the specifications and stability control are different . However, in either mode of operation, controlling the microgrid is performed by a hierarchical control of three levels: primary control, secondary control, and tertiary control systems . This work focuses on the control task of tertiary control for microgrids operating in grid-connected mode.
The tertiary control is the lowest control level in the hierarchical structure of the microgrid control system. The control task of the tertiary control considers the economical concerns in the optimal operation of the microgrid, and manages the power flow between the microgrid and the main grid in grid-connected mode . In order to achieve this control task, the formulation and solution of an optimal power flow (OPF) model is required. In grid-connected mode the power deficit can be supplied by the main grid, and excess power generated in the microgrid can be traded with the main grid and can provide ancillary services . Accordingly, the OPF model in this work considers minimizing the cost of the total energy imported through the PCC for the time span of interest. For this purpose, the energy resources and the power flow within the microgrid are optimized. In this way, the energy management within the microgrid in grid-connected mode is optimized within the context of the tertiary control.
The problem is formulated according to the framework provided by the day-ahead dispatch problem. With the day-ahead dispatch scheme, it is possible to perform the optimum management of energy distribution systems to improve the use of renewable energy ; moreover, this concept is more related with the active energy management. In this approach, optimization of active power flow in this work is approached as a day-ahead dispatch problem in which appropriate predictions of demand and electricity generation to solve the economic power dispatch within the microgrid are considered.
The energy management within a microgrid is a research topic widely dealt with in literature in the last years. In  the proposed algorithm is able to adjust microgrid generation to demand on-line in grid-connected-mode. To this end, the algorithm optimizes both fuel consumption and emissions cost functions through a heuristic approach. The optimal power dispatch is virtually formulated as a lossless power dispatch problem. In this way, the algorithm computational burden and execution time (around 1 ms) are very low, which may allow its implementation on low-cost programmable controllers to perform the optimal power dispatch. It is noted that power losses and network voltages issues are not accounted for in this approach. Several simulation tests are presented to show the goodness of the proposed controller. On the other hand, in  an economic distributed Model-based Predictive Control (MPC) is proposed to manage the energy in several microgrids in a stochastic way. Through the probabilistic forecasts of renewable power generation and microgrid load, the proposed scheme effectively handles the uncertainties in both supply and demand. The proposed scheme was evaluated on ten interconnected microgrids. The results indicated that it successfully reduces the systemwide operating cost, achieves the supply–demand balance in each microgrid, and brings the energy exchange between the distribution network operator and main grid to a predefined trajectory. The originality of this work lies in the coordination of multi-microgrids and the distribution network through a hierarchical, distributed, economic, and stochastic MPC.
Other work which is focused on several microgrids is presented in , where optimization-based scheduling strategies for the coordination of microgrids are commented upon. The main novelty of this work is the simultaneous management of energy production and energy demand within a reactive scheduling approach to deal with the presence of uncertainty associated to production and consumption. A Mixed-Integer Linear Programming (MILP) formulation is presented and used within a rolling horizon scheme that periodically updates input data information. Although the use of rolling horizon strategies for scheduling problems in uncertain scenarios is well known, its application in microgrid scheduling constitutes a challenge in this area. The proposed strategy is tested with a microgrid basic structure formed by photovoltaic panels, wind turbines, and energy storage units. Results can be used as the basis for solving further problems with higher complexity. On the other hand, in  the problem of energy management in microgrids is formulated for real-time operation. The online energy management is modelled as a stochastic optimal power flow problem and an energy management strategy (EMS) based on Lyapunov optimization is proposed. Then, the proposed EMS is applied to a real microgrid system. The simulation tests done show that the performance of the proposed EMS is close to an optimal offline algorithm. In a similar way, an algorithm for EMS based on multilayer ant colony optimization (EMS-MACO) is presented in . Its main aim is to find energy scheduling in a microgrid through the optimal operation of its microsources. By this way, the electricity production cost can be reduced. The performance of the proposed algorithm is compared with modified conventional EMS (MCEMS) and particle swarm optimization (PSO) based on EMS. Analysis of obtained results demonstrates that the system performance is improved and the energy cost reduced. Specifically, the MACO algorithm, due to needing less iterations to converge, can provide a better response than the PSO and, moreover, the application of MACO reaches the lowest energy cost, reducing it by about 5% and 20% when compared with PSO and MCEMS, respectively. A decentralized microgrid energy management system is proposed in ; the controllers are located in each household and built on open code optimizers, and low-cost hardware was developed. In order to minimize the chances of a failure, a solution redundant in the aspects of communication and hot standby control devices was developed. The optimization problem is solved through linear programming (linprog). The microgrid is basically formed by a load, two solar panels, two wind turbines, and an energy storage unit. Microgrid power lines can be made as AC or DC. Besides that, the microgrid can be connected to the power grid and can interact with it. The obtained results show that the proposed solution can be useful for small settlements and farms instead of industrial installations. Finally, the interested reader can find a survey which presents the latest advances in adaptive and intelligent methods to control microgrids in . The motivation of applying intelligent techniques is to enhance the control system performance in the microgrid. Thus, in that work, several control and intelligent techniques, such as Proportional–Integral–Derivative (PID) controller, MPC, PSO, and so on, used to manage the energy in a microgrid are discussed and classified.
At this point, it is important to emphasize the main problem of OPF dealt with in this work: optimal energy management as a part of the tertiary control in a microgrid. It is addressed according to the energy optimization approach for microgrids. The minimization of the cost of energy imported from the main network is the aspect considered to formulate the optimization objective; that is, it is considered an economic aspect. In addition, the determination of reference curves of power generated, stored, and exchanged with the main network throughout the day in advance, i.e., the optimum dispatch of energy, defines the scope of the present work. Thus, the problem has been formulated as a dispatch problem using the concept of day-ahead. The associated optimization model has been formulated as a unified model taking into account distributed generation sources and energy storage units, i.e., batteries. Moreover, different from traditional models, the proposed optimization model has taken into account constraints for the balance equations corresponding to the nodes of the microgrid. By this way, through the model optimization, not only is the best energy management for the microgrid obtained but, at the same time, the generation and voltage levels of all the elements which form the microgrid are fulfilled. Any of the works cited in the previous paragraph use a unified microgrid model which includes a wind turbine, photovoltaic modules, electric vehicle, and so on, and formulate it using the concept of day-ahead. Besides that, unlike the cited works in the previous paragraph, where only one optimization method to solve the energy management problem is used, in this work the optimum dispatch of energy is acquired through three different optimization methods for a unified model of OPF for microgrids. By this way, the optimization methods can be tested and compared in order to improve the computational cost associated with the optimum dispatch of energy. Specifically, the optimization methods are (i) interior point, (ii) hybrid genetic algorithm with interior point, and (iii) hybrid direct search with interior point; all of them provided by the optimization toolbox included in MATLAB®. In order to test the performance of each optimization method, real data from the Solar Energy Research Center (in Spanish: Centro de Investigación en Energía SOLar—CIESOL) bioclimatic building placed in Almería (south-east of Spain) have been used.
The rest of the paper is organized as follows: In Section 2, each component of the microgrid is modelled and described. Then, in Section 3, a generic model of OPF for microgrid is described. Section 4 is devoted to the explicit model of OPC. Finally, the results are presented in Section 5, whereas in Section 6, conclusions are drawn and future work lines are exposed.
2. Model for Microgrid Components
The models for microgrid components presented in this section are considered to explicitly formulate the unified model of OPF for microgrid presented in Section 4.
2.1. Points of Common Coupling
It is considered that the microgrid operates in grid-connected mode, such that it is connected to the main grid via Npcc (Npcc ≥ 1) Points of Common Coupling (PCC). It is assumed that each PCC is electrically robust and is an interface for the unlimited exchange of both active and reactive power between the microgrid and the main grid. In this context, the PCC are modeled as generational sources that operate at voltage levels magnitude and angle within the limits given by Equation (1):
For time tz, the cost of active total power exchanged through the PCC is modeled by Equation (2), where aj, bj, and cj are weight constant coefficients for the jth PCC. The variable denotes the power exchanged through the jth PCC. The decision variables associated with the PCC are () where are the distribution grid variables.
Each feeder is modeled as a line of transmission, as is illustrated in Figure 1, where Ii and Ei are the phasors of the injected electricity and voltage, respectively, on the node i (i = k, m) of the microgrid. R, L, and Bc represent the parameters of resistance series, inductance series, and shunt susceptance, respectively, of the feeder. The relationship electricity–voltage of the equivalent circuit is given by Equation (5) . Admittance matrix elements are evaluated in Equations (4) and (5).
Starting from Figure 1 and Equation (3) it is possible to obtain expressions that model the injection of active and reactive power—Equations (6) and (7), respectively—on the node i (i = k, m) at each moment tT ∈ z  where j = k, m, being j ≠ i. The variables and (n = i, j) represent the magnitude and the angle of the nodal voltage phasor Ei:
The decision variables associated to these feeders correspond to the nodal voltages in its terminals ().
The primary winding is considered an ideal transformer with relation to complex tap Tv:1 and Ti:1 in series with the impedance Zp (refers to Figure 2) where Tv = Ti* = Tv∠φtv, and the symbol * denotes a complex conjugate. The secondary winding is also represented as an ideal transformer with relation to complex tap Uv:1 and Ui:1 in series with the impedance Zs where Uv = Ui* = Uv∠φuv. The relationship between voltage Vp and electricity Ip of the primary winding and the voltage Vs and electricity Is of the secondary one is given by Equation (8) .where
As the feeders, the injections of active and reactive power in the nodes of connection i and j, where i = p, s; j = p, s; i ≠ j are represented by Equations (6) and (7), but considering the conductance and susceptance matrices of Equation (8), it is important to highlight that the decision variables associated to transformers correspond to the nodal voltages in its terminals ().
The batteries are elements that can operate in charge or discharge mode to provide or consume a net amount of active power in their connection node. Then, the jth battery is represented by two sources of active power, as shown in Figure 3 . One of them represents the charge power and the other the discharge power ; the sum of both powers represents the net power provided or consumed by the battery in their connection node.
In addition, the voltage phasor in the connection node is represented by its magnitude and its angle . Thus, the decision variables of the jth battery are () where are the battery variables, while (). Moreover, the State of Charge (SOC) of the jth battery in the time tz () can be approximated by means of Equation (10). In Equation (10), represents the SOC at a given initial time t0, whereas Enom is the energy capacity of the battery, whose efficiencies for charge and discharge operations are given by εcj and εdj, respectively. Lastly, ∆t is a fixed time step length.
It is assumed that the energy provided by the batteries has no cost since it is absorbed and provided in the same node of connection. However, since the optimization algorithm will manage the power, batteries will be charged in periods of low-cost energy and will be discharged in periods of high cost. This fact involves an economic benefit in the operation of the microgrid.
2.5. Wind Turbine
For the aim of the stationary analysis, the wind turbine can be considered a source of noncontrolled active power , depending on its density , wind speed , and the area covered by the blades of the wind turbine .
Since it is considered that the power delivered by the wind turbine is not controllable, this element does not introduce decision variables. However, Equation (12) is required to assess the contribution of the power of the jth wind turbine for a wind speed curve, ; density, , and area, , given. Clearly, the magnitude and angle of the voltage phasor of the connection node are considered decision variables, such that (). Finally, it is assumed that the energy provided by the wind turbine has no cost. In addition, a good forecast for wind speed curves is considered to be available.
2.6. Photovoltaic Modules
Figure 4 shows the schematic model of a photovoltaic module connected to the kth node through a DC/AC converter . The implicit expression showed in Equation (12) models the behavior of the DC current in panel terminals, where Iph, I0, , Rs, ns, and np represent the current of the photovoltaic panel, the current of saturation, the DC voltage in the module terminals, the resistance in series, and the number of cells in series and in parallel, respectively. The term Rs is evaluated from Equation (13), where Voc, Vmp, I, and Imp represent the open circuit voltage, the voltage of the point of maximum power, short circuit electricity, and maximum power point electricity, respectively. Terms Isc and Voc are evaluated through Equations (14) and (15), respectively, where Isc,stc, G, Gstc, ki, T, Tstc, Voc,stc, and kv represent the short circuit electricity standard under conditions of test, irradiance under test, electricity temperature coefficient, temperature of the panel, standard temperature under test, standard low open circuit voltage conditions test, and voltage and temperature coefficient, respectively.
In this work, the photovoltaic module parameters involved in Equations (12)–(15) were taken from the features of the polycrystalline module ATERSA A-222P . Moreover, a good forecast of solar irradiance curves is considered to be available.
According to the model in Figure 4, the injected power in DC terminals (generated by module) can be expressed directly as
Moreover, the balance of power between the AC and DC terminals of the inverter must also be fulfilled. If the losses of the converter are rejected, thenwhere is the active power injected at the terminals of the primary transformer coupling module; and are the magnitude and the angle, respectively, of the voltage phasor for such terminals; and and represent the same but for the secondary terminals. Therefore, in Equation (17) is formulated explicitly by means of Equation (7), but considering the matrix of conductances and susceptances of Equation (9). It is important to mention that, due to being considered a DC/AC converter multipulse with 48 pulses, the following relationship must also hold :
It is important to highlight that the decision variables introduced by the photovoltaic module are (), whereas ().
2.7. Electrical Load
Energy consumption in load nodes of the microgrid is represented by a model of constant power for any interval of time T. The ith complex power consumed in the node is then represented by Equation (19) where and represent the power consumption active on that node at the instant tz.
The model of energy demand does not introduce decision variables to the optimization problem, but the magnitude and angle of the connection node phasor voltage must be considered decision variables, such as (). In addition, it is assumed that a good forecast of the energy demand curves is available ().
2.8. Electric Vehicle
Nowadays, tendencies exist to make energy consumption more efficient to satisfy transportation needs. In this case, it is necessary to consider that an Electric Vehicle (EV) will be connected into a microgrid to charge its battery efficiently. Also, the EV will work as a storage system responsible for energy management and optimization within the microgrid.
The structure of an EV is constituted mainly by an AC engine, a three-phase power rectifier (AC/DC), a storage system (battery), and a three-phase power inverter. This last component injects power from the storage system to the grid (Figure 5). The three-phase power inverter is considered as a Controlled Voltage Source (CVS), which has the ability to control the active and reactive power flow between the EV and the microgrid .
The real power and the reactive power injected are represented through the Equations (6) and (7), respectively. Supposing that power loss does not exist on the CVS, the power storage in the battery and the active power injected by the CVS are the same with an equality constraint, Equation (20).
The State of Charge (SOC) of an EV in a determined time is described by the Equation (21) . The energy consumption for an instant of time t, , is the result of the sum of the energy storage at time t − 1, , the energy consumed at time t, , and the sum of the energy charged and the discharged energy at time t:where is the charge efficiency coefficient of EV, the discharge efficiency coefficient of EV, and the differential of operational time. It is necessary to consider that the charged power is negative and the discharged power is positive , where the sum of these powers represents the total power injected or consumed by the battery of the EV on the grid point.
In addition, the voltage phasor in the connection node is represented by a magnitude and an angle . Thus, the decision variables of the jth battery of the EV are () whereas ().
3. Generic Model of OPF for Microgrid
For electric demand curves, solar radiation, and predicted wind speed for an interval of time T, the general model of OPF is given by Equations (22)–(25). It should be noted that, in this model, it is considered that the period of time T is composed of a set of time stages tz (∀ = 1, ..., end), such that T = [t1, ..., tend].
Taking into account that tz represents the zth time stage, the description of the terms of the model, Equations (22)–(25), is as follows: FT is the objective function to optimize along the interval T; h(y) is a set of equality constraints, which represents the balance equations of active and reactive power on all the nodes in the microgrid, as well as other operating conditions that must be fulfilled unconditionally; g(y) is a set of constraints of inequalities that represents the physical and operating limits of the elements that make up the microgrid; and y is the set of decision variables (to be optimized) composed of subsets yRD, yMF, and yB such y = [yRD, yMF, yB]. As has been pointed out in Section 2, yB, yRD, and yMF represent the battery variables, distribution grid, and photovoltaic modules, respectively. The upper and lower limits, and , of these variables are formulated through the inequality constraints; see Equation (25).
4. Explicit Model of OPF for Microgrid
Models of the microgrid components described in Section 2 are considered in this section to formulate the explicit model of OPF for a grid-connected microgrid. For this purpose, one generic microgrid composed of a number of NbAC nodes in AC, NbCD nodes in DC, NAl feeders, NT transformers, NB battery, NA wind turbines, NMF photovoltaic modules, and NCE electrical loads is considered. Note that the Npcc points of common coupling are a subset of the NbAC nodes in AC. In addition, the nodes in DC represent DC terminals of the photovoltaic modules, such that NbCD = NMF.
4.1. Objective Function
The intention is to minimize Equation (22), which is formulated explicitly taking into account Equation (2), as follows:
Note that Equation (26) denotes that the objective is to minimize the total cost in $/h of the power imported through the PCC during the period of time T to supply the predicted demand curves .
4.2. Equality Constraints
The set of equality constraints h(y) in Equation (23) is expressed explicitly as follows: the constraints of active and reactive power balance corresponding to the nodes of the microgrid in AC are written in the first block of Equation (27) where the lower limit ∀j ∈ i means each element j is connected to the node i. For example, the term denotes the sum of the provided active powers (generated) for all wind turbines connected to the node i. It should be clarified that the term denotes the sum of the active powers injected to the node i through all terminal feeders and transformers connected to that node. Furthermore, the balance equations of reactive power are formulated only for the k nodes in AC that have not been connected to power sources (), that is, not formulated in PCC nodes or nodes where batteries, wind turbines, and photovoltaic modules are connected. From Equation (6), Equations (16) and (17) with the constraints that shape the behavior of the stationary state of each battery and its corresponding DC/AC inverter, as shown in the bottom block of Equation (27), are formulated where represents the term in the second member of Equation (17). Note that Equation (27) is formulated for ().
4.3. Inequality Constraints Functions
According to the element models introduced in Section 2, the only inequality constraints function g(y) in Equation (24) corresponds to the batteries, as follows. The batteries have finite capacity of charge and discharge. With this point in mind, the SOC is modulated over the period of time T through Equation (28) .
4.4. Equality Constraints Variables
It should be taken into account that the decision variables must acquire admissible values; otherwise, the solution provided by the OPF model could not make sense from a practical point of view. For this reason, the decision variables y are limited during the interval of time T by means of the constraints set in Equation (29):where the set of decision variables associated to the distribution network is given by the magnitude and angle of the voltage phasor at each node, as well as the active powers exchanged with the main grid, such as ; and , whereas the decision variables batteries are and . Finally, the photovoltaic module decision variables are ; and .
In this work the IP, GA-IP, and patternsearch-IP methods provided by the MATLAB® optimization solvers are used to solve the microgrid OPF problem given by Equations (26)–(29). Since these methods can directly deal with the whole set of constraints as Equations (27)–(29) [29,30,31], the active and reactive power balance constraints in Equation (27) do not need to be handled and solved by a power flow algorithm external to the optimization solvers. Externally solving these constraints imposes the need of an extra power flow algorithm, which in addition should be substantially upgraded to take into account the new variables and constraints introduced by the models of renewable distributed generation and storage systems. In this way, the use of the three methods provided by the MATLAB® optimization solvers yields a simple approach for solving the optimization problem as Equations (26)–(29) in unified way.
4.5. Interior Point Method
The interior point method is applied in this work through the “fmincon” function, which belongs to the MATLAB® “Optimization Toolbox” (R2015, MathWorks®, Natick, MA, USA) . This method is a deterministic derivative-based tool that can be applied for local search in multivariable, smooth, continuous, differentiable, and nonlinear constrained optimization problems. The method transforms the constrained problem to an unconstrained optimization problem by using penalty barrier functions and slack variables. Based on an initial condition of the decision variables, the method performs an iterative process where the decision variables are actualized until the optimality conditions are satisfied. This deterministic method has been widely adopted to solve optimization problems in the context of OPF; hence, it is adopted in this work. The readers interested in a detailed description of the method are referred to .
4.6. Hybrid Algorithm Composed of Direct Search and Interior Point Methods
The patternsearch method is applied through the function “patternsearch” which belongs to the MATLAB® “Direct Search and Genetic Algorithm Toolbox” (R2015, MathWorks®, Natick, MA, USA) . Contrary to the aforementioned IP method, this method is a derivative-free metaheuristic tool for global search. The method can even deal with multivariable, nonsmooth, noncontinuous, nondifferentiable, and nonlinear constrained optimization problems. For this purpose, the nonlinear constrained optimization problems are formulated as an augmented Lagrangian function where Lagrangian multipliers, penalty parameters, and shift factors are used to combine the objective function and the nonlinear constraint. Then, the pattern search for unconstrained optimization problems is applied to minimize that augmented Lagrangian function for a sequence of Lagrangian multipliers and penalty parameters, until a stopping criterion is satisfied (typically the number of iterations) . When the stopping criterion is met, the approximate solution can be provided as an initial condition to the IP method to speed up the convergence to the optimal solution , as was done in this work. The readers interested in a detailed description of the patternsearch method are referred to .
4.7. Hybrid Algorithm Composed of Genetic Algorithm and Interior Point Methods
This algorithm is applied through the “ga” function which belongs to the MATLAB® “Direct Search and Genetic Algorithm Toolbox” . The method can deal with similar optimization problems to those described in Section 4.6. The techniques for handling nonlinear constraints and to perform the coupling with the IP method are also the ones described in that section . The readers interested in a detailed description of the method are referred to [36,37].
Before discussing the numeric results related to the optimal energy management in microgrids through the optimal power flow (OPF) implemented in this work, it is necessary to describe the microgrid and the hardware used for the simulation of the OPF.
Firstly, the microgrid is called microgrid test (MT), and is composed of an integrated system of a photovoltaic panel (PV), a wind turbine (WT), a storage system (battery, BT), a main grid (MG), electric transformers (ET), a Park of EV (PEV), and a point of load within the system. The MT is selected as a case study to show the results of the optimal energy management obtained from the tools selected. Moreover, the generators in the microgrid use a real irradiance profile, wind speed profile of Almería city, and the electricity demand curve. All previous data were taken from Laboratory 6 of the CIESOL with different climatic variabilities.
Subsequently, an analysis of the computational performance of the interior point method (fmincon), hybrid genetic algorithm with interior point (GA-IP), and direct search hybrid with interior point (patternsearch-IP) is presented, which allows us to identify the most effective methods for solving the model presented in Equations (26)–(29). Finally, all the methods to solve the OPF are executed on a DELL computer, with 8 GB RAM and an Intel i5-4210U CPU@ 2.40 GHz processor (DELL, Mexico city, Mexico). The numerical results are reported in terms of per unit (PU) quantities.
5.1. CIESOL Building
In this paper, several optimization methods are compared at a time to optimize the economic energy dispatch within a microgrid. Besides this, with the aim to evaluate the performance of each optimization method with different scenarios, real climatological data of solar radiation, wind speed, photovoltaic system data, and laboratory load saved during regular operation of the CIESOL building (http://www.ciesol.es) were considered. CIESOL is a solar energy research center placed inside the Campus of the University of Almería in the south-east of Spain; see Figure 6.
More specifically, this building is divided into two different floors with a total surface approximately equal to 1072 m2. In addition, it has been designed to be a Nearly-Zero Energy Building (NZEB), and, thus, it has several bioclimatic criteria such as the use of photovoltaic panels to produce electricity and a Heating, Ventilation, and Air Conditioning system based on solar cooling which is composed of a solar collector field, a hot water storage system, a boiler, and an absorption machine with its refrigeration tower.
Furthermore, the CIESOL building works as a research center which deals with the study of the implemented bioclimatic strategies, the analysis of their influence over energy efficiency, and greenhouse-effect gasses reduction, and, also, the development of optimization techniques to increase the ratio of renewable energies use against conventional ones. For this reason, it uses a wide network of sensors and actuators whose measured data is stored in a database by means of measurement and acquisition software. More specifically, the building has a meteorological station composed of different types of sensors (e.g., temperature, relative humidity, direct and diffuse irradiance, CO2 concentration, etc.) and the building rooms measure air temperature, plane radiant temperature, globe temperature, relative humidity sensors, and power meters in order to measure the energy consumption in each room. In order to use a load profile to compare the different optimization methods, one of the representative rooms of the CIESOL building has been selected as a reference, specifically, Laboratory 6. This room was chosen among the characteristic ones mainly due to its occupancy profile. In more detail, this room works as an office and it is placed in the upper floor of the CIESOL building. In addition, it is characterized by having north orientation, a volume of 76.8 m3, and a window with a total surface of 2.15 × 2.09 m2.
5.2. Microgrid Test
The microgrid test (MT) described previously is shown in Figure 7. The microgrid is connected to the main grid through the single PCC (Node 1). Furthermore, between the Nodes 3–6, 4–7, 5–8, and Nodes 9, 10, there are transformers connected. The elements that have the ability to provide active power are the main grid (PCC), WT, PV, PEV, and the battery. The parameters considered for modeling the components of this MT and the cost coefficients associated with imported energy through the PCC are presented in Table A1 and Table A2 given in Appendix A.
The PEV are composed of four EV, while the forecasting curve of load, the irradiation profile for two different clear days (summer and winter), and the speed of wind corresponding to the city of Almería, Spain, can be observed in Figure 8. All the power within the microgrid is working on per unit (p.u.), where the power base and voltage base were selected to be 10 kW and 100 V, respectively.
The voltage magnitude limits for all nodes in the microgrid are p.u. The SOC limits on the battery are , whilst the initial condition of the battery charge is . Moreover, all the cars in the PEV will be connected to the microgrid at hour 8 and disconnected at hour 18. All the cars have initial SOC as shown in Table 1. To compensate the owners of the EV for the use of the battery, at the end of hour 18, the SOC in the battery will be 100% (SOCPVH ). The SOC limits in the PEV for all the EV are .
The OPF was solved using the interior point method provided by the “fmincon” function developed by MATLAB®, the direct search method with interior point hybrid (GA-IP), and hybrid genetic algorithm with interior point (patternsearch-IP); their results are discussed below.
Figure 9 shows the active power supplied by the battery, PEV, WT, and PV, and the imported power from the main grid. The powers of the PV and WT are for a clear summer day. This figure shows that between the stages 0 and 6 h or 20 and 24 h the power demand by the load is small (35 kW), and the generators (PV, WT) and batteries supply this power to satisfy the load demand. Nevertheless, between 8 and 10 h or 16 and 20 h, the power supplied by the generators and the batteries is not enough to supply the load demand, making it necessary to import power from the main grid to satisfy the load and avoid problems within the microgrid. In addition, the PV have the maximum power supplied between 9 and 17 h, agreeing with the forecasting profile of irradiance shown in Figure 8a; in the same way, the maximum power of WT corresponds to the maximum speed of wind predicted by the forecasting profile of wind speed shown in Figure 8b.
It is noteworthy that the PEV and the battery are working in charge mode when the power supplied by the PV and PW is high. This power storage in the PEV and battery is important to reduce the energy cost when peak load demand exists (8–10 h with PEV and 16–20 h with battery)—in other words, to reduce imported power from the main grid. Figure 10 shows the state of charge of the battery and the PEV, confirming the previous idea.
In Figure 11 it is possible to see the active power supplied by the elements within the microgrid (WT, PV, Battery, PEV, and Main grid) on a clear winter day. It is important to understand that the power supplied by the PV on a clear winter day is less than on a clear summer day. This reduction of power produces an increment in the imported power from the main grid and a gradual decrement in the power supplied by the WT, battery, and the PEV. Those increments and decrements in the power flow inside the microgrid are shown in Figure 12 through a comparison between the power generators on summer and winter days.
Figure 12 shows the active (P) and reactive (Q) power flow exchanged between the main grid and the microgrid through the PCC for the whole time period T of interest (24 h). Also, the active power provided by the electric vehicles, battery, and photovoltaic system is shown in that figure. It is observed that the amount of active and reactive power exchanged with the main grid through the PCC changes along the time period T. This is due to the optimal energy dispatch driven by the proposed approach, which handles the energy storage systems under the variation of the system load demand and the power generated by the renewable generation systems. This optimal energy management also involves low total active power losses and an acceptable voltage profile. For example, for the microgrid operating on a summer day, Figure 13 shows the low total active power losses obtained along the time period T. This fact is expected in this approach because loss reduction involves a decrement in the power imported from the main grid and, hence, in the total cost, which aids to minimize the fitness function. Also, the bus voltage profiles satisfy the specified operating limits (0.95 ≤ V ≤ 1.05) for the whole time period T, which is ensured in this approach because the bus voltage limits are explicitly considered in the proposed models (26)–(29).
The total energy costs of the imported power from the main grid without DG and with DG during winter and summer days are shown in Figure 14 When the microgrid is working without DG, high cost occurs when there is peak load demand. Nevertheless, the main aim of this paper is the optimization when the microgrid works with DG, and we observe in Figure 13 that the aim is being met in full. However, differences exist between the energy cost when the microgrid operates on clear summer and winter days (energy cost is higher when it is a winter day). This is because the irradiation is lower on a winter day, generating less power compared to a sunny summer day, making the import of power more expensive from the main grid when it is a winter day.
5.3. Performance Comparison between Different Methods
This section presents the performance of the IP, GA-IP, and patternsearch-IP methods for solving the optimization problem given by the model in Equations (26)–(29). That performance is presented based on a comparison of the fitness value achieved at the optimal solution of Equations (26)–(29) and the CPU run time spent for three different microgrid setups. The microgrid under study is the one given in Section 5.2. The first and second setups consider the irradiance profiles for a summer day and a winter one and assume that all components of the microgrid illustrated in Figure 7 are online. The third setup considers the irradiance for a summer day, but assumes that the distributed generation (wind and PV) and storage (batteries and electric vehicles) systems of the microgrid are offline. The performance of the three suggested methods obtained for the three microgrid setups is as follows.
Figure 15 provides the value of the fitness Equation (26) achieved by the IP, GA-IP, and patternsearch-IP methods at the optimal solution of the optimization problem in Equations (26)–(29) for the three different microgrid setups. It is clearly observed that for each microgrid setup, the three methods have achieved practically the same value of the fitness function. These results suggest that they perform similarly in terms of effectiveness, i.e., they all obtain the same fitness function value when solving the optimization problem in Equations (26)–(29). On the contrary, their performance in terms of computing time is substantially different, as discussed below.
Figure 16 shows the CPU time spent by the IP, GA-IP, and patternsearch-IP methods for solving the optimization problem in Equations (26)–(29), for each one of the three different microgrid setups. As can be seen, GA-IP is the fastest algorithm for all the cases, followed by the patternsearch-IP algorithm. Please note that the GA-IP method is 57% (20%) faster than the IP method (patternsearch-IP method). Then, the results may suggest that hybrid algorithms are able to obtain solutions of the same quality as the ones provided by the IP method, but consuming less computing time.
However, it is important to point out that the CPU time spent by the hybrid algorithms may importantly depend on the optimization problem size. Then, bearing in mind the aforementioned, the size of the studied microgrid in this work, and the obtained results in this section, it must be concluded that the CPU time performance of hybrid methods shown here might be expected for small-scale microgrids.
This paper has shown a comparison among several optimization methods for the energy dispatch within a microgrid. Specifically, an OPF is solved by three different optimization methods—(i) interior point method, (ii) hybrid genetic algorithm with interior point (GA-IP), and (iii) direct search hybrid with interior point (patternsearch-IP)—all of them programed in the software MATLAB® as part of the tertiary control or energy management system within a microgrid. Solving the OPF by any of these three methods and the use of DG within the microgrid provides an optimal solution to the microgrid, minimizing energy imports from the main grid and using the energy from DG to supply the local load demand at any instant of time. With respect to the optimization problem solution, the three optimization methods get the same value on the fitness function but GA-IP can reach this value faster than the other two methods. Because the results are based on real data provided by CIESOL, the implementation of the optimization methods adopted in this work for the optimal energy management results is feasible for microgrids with similar features to those of the microgrid addressed here.
Conceptualization, L.O.P.V. and J.D.A.H.; Formal analysis, L.O.P.V.; Funding acquisition, A.P.M. and M.P.G.; Investigation, L.O.P.V. and C.A.C.M.; Methodology, C.A.C.M.; Software, J.L.R.; Supervision, A.P.M., J.L.R., M.P.G. and J.D.A.H.; Writing—original draft, L.O.P.V.; Writing—review & editing, J.D.A.H.
This research was funded by the National Council for Science and Technology (CONACYT), Mexico, through the grant with number 397633. and by grants from the Spanish Ministry of Science and Innovation (TIN2015-66680-C2-1-R, ENERPRO DPI2014-56364-C2-1-R and CHROMAE DPI2017-85007-R), Junta de Andalucía (P11-TIC7176 and P12-TIC301).
This work has been possible thanks to the collaboration of CONACYT in conjunction with the University of Guanajuato Mexico and the CIESOL center of the University of Almeria Spain. Luis O. Polanco Vásquez, Cristian A. Carreño Meneses, Alejandro Pizano Martínez are fellows of Universidad de Guanajuato and CONACYT. Juana López Redondo and José Domingo Álvarez Hervás are fellows of the Spanish ‘Ramón y Cajal’ contract program, co-financed by the European Social Fund.
Conflicts of Interest
The authors declare no conflict of interest.
This appendix shows the parameters of the microgrid components. The Table A1 provides the general parameters of the microgrid. Table A2 provides the impedance of the microgrid fedeers.
Table A1. Number of nodes and the microgrid components.
|Node||Lines||Battery||PEV||Loads||WT||PV||Node Slack Grid|
Performance data of the microgrid components:
Cost coefficients of the objective function:
Voltage general bounds:
Table A2. Feeders.
|Node Sent||Node Receiving||R (p.u.)||X (p.u.)||BC (p.u.)|
- Ackermann, T.; Andersson, G.; Söder, L. Distributed generation: A definition. Electr. Power Syst. Res. 2001, 57, 195–204. [Google Scholar] [CrossRef]
- International Renewable Energy Agency. Renewable Power Generation Costs in 2017. Available online: http://www.irena.org/publications/2018/Jan/Renewable-power-generation-costs-in-2017 (accessed on 14 July 2018).
- Wang, J.; Costa, L.M.; Cisse, B.M. From distribution feeder to microgrid: An insight on opportunities and challenges. In Proceedings of the IEEE International Conference on Power System Technology (POWERCON 2016), Wollongong, Australia, 28 September–1 October 2016. [Google Scholar]
- Silva, M.; Morais, H.; Vale, Z. An integrated approach for distributed energy resource short-term scheduling in smart grids considering realistic power system simulation. Energy Conv. Manag. 2012, 64, 273–278. [Google Scholar] [CrossRef]
- Olivares, D.E.; Mehrizi-Sani, A.; Etemadi, A.H.; Cañizares, C.A.; Iravani, R.; Kazerani, M.; Hajimiragha, A.H.; Gomis-Bellmunt, O.; Saeedifard, M.; Palma-Behnke, R.; et al. Trends in Microgrid Control. IEEE Trans. Smart Grid 2014, 5, 1905–1919. [Google Scholar] [CrossRef]
- Smith, M.; Ton, D. Key Connections: The U.S. Department of Energy’s Microgrid Initiative. IEEE Power Energy Mag. 2013, 11, 22–27. [Google Scholar] [CrossRef]
- Chowdhury, S.P.; Crossley, P.; Chowdhury, S. Microgrids and Active Distribution Networks; Institution of Engineering and Technology: London, UK, 2009. [Google Scholar]
- Majumder, R. Microgrid: Stability Analysis and Control: Modeling, Stability Analysis and Control of Microgrid for Improved Power Sharing and Power Flow Management; VDM Verlag: Saarbrücken, Germany, 2010. [Google Scholar]
- Momoh, J. Smart Grid: Fundamentals of Design and Analysis; Wiley-IEEE Press: Jersey, NJ, USA, 2012. [Google Scholar]
- Olivares, D.E.; Cañizares, C.A.; Kazerani, M. A Centralized energy management system for isolated microgrids. IEEE Trans. Smart Grid 2014, 5, 1864–1875. [Google Scholar] [CrossRef]
- Ustun, T.S.; Ozanyoy, C.; Zayegh, A. Recent developments in microgrids and example cases around the world—A review. Renew. Sust. Energy Rev. 2011, 15, 4030–4041. [Google Scholar] [CrossRef]
- Bidram, A.; Davoudi, A. Hierarchical structure of microgrids control system. IEEE Trans. Smart Grid 2012, 3, 1963–1976. [Google Scholar] [CrossRef]
- Chen, C.; Wang, F.; Zhou, B.; Chan, K.; Cao, Y.; Tan, Y. An interval optimization based day-ahead scheduling scheme for renewable energy management in smart distribution systems. Energy Conv. Manag. 2015, 106, 584–586. [Google Scholar] [CrossRef]
- Álvarez, E.; Campos, A.; Arboleya, P.; Gutiérrez, A. Microgrid management with a quick response optimization algorithm for active power dispatch. Int. J. Electr. Power Energy Syst. 2012, 43, 465–473. [Google Scholar] [CrossRef]
- Kou, P.; Liang, D.; Gao, L. Distributed EMPC of multiple microgrids for coordinated stochastic energy management. Appl. Energy 2017, 185, 939–952. [Google Scholar] [CrossRef]
- Silvente, J.; Kopanos, G.M.; Pistikopoulos, E.N.; Espuña, A. A rolling horizon optimization framework for the simultaneous energy supply and demand planning in microgrids. Appl. Energy 2015, 155, 485–501. [Google Scholar] [CrossRef]
- Shi, W.; Li, N.; Chu, C.C.; Gadh, R. Real-Time Energy Management in Microgrids. IEEE Trans. Smart Grid 2017, 8, 228–238. [Google Scholar] [CrossRef]
- Marzband, M.; Yousefnejad, E.; Sumper, A.; Domínguez-García, J. Real time experimental implementation of optimum energy management system in standalone microgrid by using multi-layer ant colony optimization. Int. J. Electr. Power Energy Syst. 2016, 75, 265–274. [Google Scholar] [CrossRef]
- Kowalczyk, A.; Włodarczyk, A.; Tarnawski, J. Microgrid energy management system. In Proceedings of the 21st IEEE International Conference on Methods and Models in Automation and Robotics (MMAR 2016), Międzyzdroje, Poland, 29 August–1 September 2016. [Google Scholar]
- Mahmoud, M.; Alyazidi, N.; Abouheaf, M. Adaptive intelligent techniques for microgrid control systems: A survey. Int. J. Electr. Power Energy Syst. 2017, 90, 292–305. [Google Scholar] [CrossRef]
- Acha, E.; Fuerte, C.R.; Ambriz, H.; Camacho, C. FACTS Modelling and Simulation in Power Network; John Wiley & Sons: Hoboken, NJ, USA, 2005. [Google Scholar]
- Gill, S.; Kockar, I.; Ault, G.W. Dynamic optimal power flow for active distribution networks. IEEE Trans. Power Syst. 2014, 29, 121–131. [Google Scholar] [CrossRef]
- Wang, L.; Yeh, T.; Lee, W.; Zhe, C. Benefit evaluation of wind turbine generators in wind farms using capacity-factor analysis and economic-cost methods. IEEE Trans. Power Syst. 2009, 24, 692–704. [Google Scholar] [CrossRef]
- Bellini, A.; Bifaretti, S.; Iacovone, V.; Cornaro, C. Simplified model of a photovoltaic module. In Proceedings of the International Conference Applied Electronics 2009 (AE 2009), Pilsen, Czech Republic, 9–10 September 2009. [Google Scholar]
- Modulo Fotovoltaico A-222P/A-232/A-238P. Available online: http://www.sfe-solar.com/wp-content/uploads/2011/06/Atersa_A222-238P.pdf (accessed on 20 June 2018).
- Zúñiga Haro, P. Analysis and Control of a Series Compensator. Ph.D. Thesis, CINVESTAV Gdl, Guadalajara, Mexico, May 2006. Available online: http://www.gdl.cinvestav.mx/jramirez/doctos/doctorado/Tesis_pavel2006.pdf (accessed on 20 June 2018). [Google Scholar]
- Jimenez, A.; García, N. Power flow modeling and analysis of voltage source converter-based plug-in electric vehicles. In Proceedings of the 2011 IEEE Power and Energy Society General Meeting, Detroit, MI, USA, 24–29 July 2011. [Google Scholar]
- Sousa, T.; Morais, H.; Vale, Z.; Faria, P.; Soares, J. Intelligent energy resource management considering vehicle-to-grid: A simulated annealing approach. IEEE Trans. Smart Grid 2013, 1, 535–542. [Google Scholar]
- Optimization Toolbox. User’s Guide. Available online: http://www.mathworks.com/help/pdf_doc/optim/optim_tb.pdf (accessed on 20 June 2018).
- Augmented Lagrangian Genetic Algorithm. Available online: https://www.mathworks.com/help/gads/description-of-the-nonlinear-constraint-solver.html#bue48bb (accessed on 16 July 2018).
- Nonlinear Constraint Solver Algorithm. Available online: https://www.mathworks.com/help/gads/description-of-nonlinear-constraint-solver.html (accessed on 16 July 2018).
- Byrd, R.H.; Gilbert, J.C.; Nocedal, J. A Trust Region Method Based on Interior Point Techniques for Nonlinear Programming. Math. Program. 2000, 89, 149–185. [Google Scholar] [CrossRef]
- Global Optimization Toolbox. User’s Guide. Available online: http://www.mathworks.com/help/pdf_doc/gads/gads_tb.pdf (accessed on 20 June 2018).
- Include a Hybrid Function. Available online: https://www.mathworks.com/help/gads/using-a-hybrid-function.html (accessed on 16 July 2018).
- Audet, C.; Dennis, J.E., Jr. Analysis of Generalized Pattern Searches. SIAM J. Optim. 2002, 13, 889–903. [Google Scholar] [CrossRef]
- Xu, W.; Wang, Z.; Zhu, Q.; Geng, Z. A hybrid constraints scattered genetic algorithm with interior point method. In Proceedings of the 2011 International Conference on Mechatronic Science, Electric Engineering and Computer (MEC), Jilin, China, 19–22 August 2011. [Google Scholar]
- Yan, W.; Liu, F.; Chung, C.Y.; Wong, K.P. A hybrid genetic algorithm-interior point method for optimal reactive power flow. IEEE Trans. Power Syst. 2006, 21, 1163–1169. [Google Scholar] [CrossRef]
Figure 1. π circuit for the feeders.
Figure 2. T model for the transformers.
Figure 3. Battery model.
Figure 4. Schematic model of a photovoltaic module.
Figure 5. Electric vehicle scheme.
Figure 6. The CIESOL building.
Figure 7. Microgrid test scheme.
Figure 8. Forecasting curves for the microgrid test. (a) Load forecast curve; (b) wind speed profile for Almería, Spain; (c) irradiation profile for clear days in summer (blue) and winter (red).
Figure 9. Result of the power in generators for a clear summer day.
Figure 10. SOC of battery and Park of EV (PEV) for a clear summer day.
Figure 11. Result of the power in generators for a clear winter day.
Figure 12. Comparison between power generation on summer and winter days. (a) Active and reactive powers exchanged with the main grid.; (b) Active power provided by the battery; (c) Active power provided by the vehicle fleet; (d) Active power provided by the photovoltaic panel.
Figure 13. Total active power losses and bus voltages for a summer day. (a) Active power losses; (b) Bus voltages.
Figure 14. Energy cost of power with and without Distributed Generation (DG) on a summer day and a winter day.
Figure 15. Fitness function values for the proposed methods.
Figure 16. Run times for the proposed methods.
Table 1. Initial State of Charge (SOC) of the electric vehicles.
|Vehicle Number||Initial SOC (%)|
© 2018 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/).