Please note this is an old version of this entry, which may differ significantly from the current revision.
The rising demand for electricity, the economic benefits, and the environmental pressures related to the use of fossil fuels are driving electricity generation mostly from renewable energy sources. One of the main challenges in renewable energy generation is uncertainties involved in forecasting, because of the intermittent nature of renewable sources. The demand also varies according to the time of day, the season, the location, the climate, and the availability of resources. Microgrids offer a potential solution for the integration of small-scale renewable energy sources and loads along with energy storage systems and other non-renewable sources. However, intermittent generation and varying demand need to be matched to provide stable power to consumers. Therefore, it is crucial to design an energy management system to effectively manage the energy sources and supply loads for reliable and efficient operation.
In the last two decades, the electric power industry strived to increase the electricity generation from renewable energy sources (RES) due to the environmental issues associated with the use of fossil fuels and associated economic benefits. Being proven cost-effective technologies, currently solar PV and wind are the fastest deployed RESs in power generation 
. However, solar PV power generation is impacted by changing weather conditions and passing cloud cover, while the amount of energy generated by wind varies with wind speed. The intermittent nature of renewable energy resources complicates power system operation and control. These uncertainties introduced to the generation of resources, in addition to the varying electric demand, make energy management more challenging.
The microgrid (MG) concept, schematically illustrated in Figure 1
, has become a smart candidate for integrating RESs, as it can be operated as a single controllable system. A microgrid is usually comprised of energy resources, energy storages, and loads and operated within a clearly defined electrical boundary. The energy mix of a microgrid usually includes solar PV and wind as primary sources of renewable energy, and a few non-renewable resources, such as diesel generators, micro turbines, and gas turbines are also used as backup energy resources. Various energy storages, such as batteries, super capacitors, fuel cells, are considered to ensure the availability of power throughout the entire time horizon 
Figure 1. Generalized structure of a microgrid.
A microgrid can be either connected to or isolated from the grid and operate with full controllability. The output power from energy sources must, therefore, meet the requirements of local loads in the islanded mode. In the grid-connected mode, the microgrid shares the energy with the main grid (supply or absorb) via the point of common coupling (PCC). Microgrids can be classified based on voltage, such as AC microgrids, DC microgrids, and hybrid AC/DC microgrids. In AC microgrids, DC generating RES such as solar PV and wind are connected via DC/AC power inverters. The DC microgrid is similar to its AC counterpart, possessing a common DC bus. A hybrid microgrid is a combination of both AC and DC microgrids, offering the best solution for grid integration of RES. Various models and layouts are used to describe the microgrid operations in the literature 
A microgrid control system is responsible for ensuring desired voltages, currents, and frequency through proper management and control, including performing economic dispatch, balancing power supply and demand, demand side management, etc., under all modes of microgrid operation. An energy management system (EMS) is usually designed to optimize power generation to meet the demand at the minimum operational cost while maintaining the integrity of the system. Among the various definitions, the IEC 61970 standard has defined EMS as “a computer system comprising a software platform providing basic support services and a set of applications providing the functionality needed for the effective operation of electrical generation and transmission facilities so as to assure adequate security of energy supply at minimum cost” 
. Microgrid energy management systems (MG EMS) also have the same aforementioned features to provide the required functions to ensure safe and efficient operation. An energy management problem is typically formulated as an optimization problem with the objective of minimizing the total cost of operation over a chosen time horizon (often over 24 h), subjected to operational constraints. The optimization is based on the forecasted load variation. When intermittent generation is involved, a resource forecast is also required to solve the optimization problem. The MG energy management is complicated by forecast uncertainties. The forecast uncertainty, which is the deviation of actual load and renewable generation from their respective forecast values, affects optimum scheduling and raises new challenges in microgrid systems with a high penetration of renewables. Therefore, uncertainty management needs to be incorporated into the energy management problems.
Several comprehensive reviews related to MG EMS can be found in the literature, and they address different aspects of energy management function. The review of microgrid EMS presented in 
is organized based on four categories: (1) the optimization techniques employed, (2) the type of grid taken into consideration, (3) the mode of operation of the microgrid, and (4) the software used as a platform for solving the EMS problems. Two major categories of microgrid energy management strategies are discussed, including classical and intelligent methods for residential applications in 
. A comparative and critical analysis of the literature on decision-making strategies and their solution methods for MG EMSs is presented in 
. A comprehensive description of control and optimization methods to identify the most common and effective methods for MG EMS is highlighted in 
. In 
, the review is conducted in terms of uncertainty modeling approaches, objective functions, constraints, optimization techniques, and simulation and experiment results for EMSs. However, the uncertainty issues are not comprehensively addressed. Recent techniques to model the uncertainties from renewable energy sources and loads in microgrids are reviewed in 
. Methods of uncertainty management, parameter modelling, simulation tools, and test system in unit commitment in power systems are discussed in 
. Methods for uncertainty modelling in power systems, comparison between these methods, strengths, and weaknesses are studied in 
. A standard classification of uncertainty handling methods is proposed in 
, where the models are compared, and their strengths and weaknesses are investigated.
2. Microgrid Energy Management System (MG EMS): The Concept
A microgrid energy management system (MG EMS) performs a variety of functions for the efficient and effective operation of the system. Energy management is an optimization problem with the target of properly scheduling the short-term operation of production by generators, storage, as well as controllable loads, to cover the system demand and minimize the generation costs. The EMS generates a schedule of unit commitment and the optimized output of each source considering the results of the optimization. Figure 2 illustrates the overall outline of the MG EMS.
Figure 2. Energy management system outline.
2.1. Control Systems Used in EMS
The control system associated with MG EMS can be implemented using centralized, decentralized, and hierarchical control methods 
. In centralized control-based EMS, a single central controller that receives all the information, such as RES energy generation, load profile, market price, weather conditions, etc., is used. Based on the inputs, a central controller decides the optimum microgrid energy schedule and then sends these decisions to all local controllers. The basic structure of the centralized control is shown in Figure 3
. However, the failure of the central control could cause the entire system to fail. Unlike centralized control-based EMS, in decentralized control shown in Figure 4
, a few local connections are needed, and only local measurements are used to make control decisions.
Figure 3. Centralized control structure.
Figure 4. Decentralized control structure.
Hierarchical control approaches are used to provide a compromise between totally centralized and decentralized control structures, and they includes primary, secondary, and tertiary controls. The primary control provides local voltage and current control, as well as power sharing control. It generally follows the instructions of higher-level controllers. The secondary control is responsible for the power management of the system. It is also used for microgrid synchronization to the main grid when switching from islanded to grid connected mode. Tertiary control is used to control the power flow. It can also be used for other objectives, such as islanding detection. The hierarchical control approach is the most widely used conventional method, and its objective is to enhance the efficiency and effectiveness of microgrid operation 
. However, hierarchical control is challenging with the consideration of the intermittency of RES. Recent studies have extensively focused on hierarchical control approaches to improve the energy management aspects of microgrid systems. A typical hierarchical control scheme is illustrated in Figure 5
Figure 5. Hierarchical control.
Table 1 summarizes the features, advantages, and disadvantages of implementing EMS based on different control aspects.
Table 1. Comparison of control methods used in EMS.
3. Microgrid Energy Management: Problem Formulation
Microgrid energy management is used to either minimize or maximize an objective or set of objectives while ensuring the constraints of individual units and the system as a whole. These objectives are quantitative in nature and usually include cost reduction, emission reduction, increased renewable energy integration, etc. The associated constraints include power balance, individual unit ratings, charge and discharge rates of ESS, maximum and minimum limits of the state of charge (SOC) of ESS, power import and export limits, and other technical constraints of the microgrid. Most of the existing literature focuses on microgrid cost minimization in a single-objective format. The considered cost factors are related to fuel, start-up, shut-down, maintenance, degradation, utility purchases, etc. When several objectives are optimized, the optimization framework is formulated in a multi-objective framework. In such cases, each objective is assigned a weighting factor. These weighting factors are usually assigned based on the significance of individual objectives in relation to the final objective function.
Various solving techniques, such as mixed integer linear and non-linear programming (MILP and MINLP) methods, heuristic optimization methods, etc. are used to solve the optimization problem, sometimes together with rule-based and fuzzy logic control methods to simplify the problem. These optimization strategies use various optimization time windows (horizon) on different time scales. A suitable selection is used to improve the energy management system. Recently, the rolling horizon is considered to reduce the impact of uncertainties from the renewable energy output and load forecasting.
The design of an EMS for a microgrid includes the task of the mathematical formulation of objective functions and constraints, selection of the optimization time horizon and the time step, as well as choosing an optimization technique to solve the problem.
The typical mathematical representation of the EMS problem is shown below:
Minimize the total cost of the microgrid operation;
Operational cost = fuel cost + maintenance cost + startup cost of the thermal unit + shutdown cost of the thermal unit + cost of buying and selling power to the main grid + load shedding penalty cost + losses cost
Environmental cost = carbon emission + penalties for emissions
Energy storage cost = charging cost + discharging cost + degradation cost
Power balance: load demand at each time must be equal to the summation of power from microgrid resources and receiving/sending power from the main grid.
Emission constraints: emissions caused by each fossil-fueled thermal generators cannot exceed the maximum limits at each time.
Capacity limits: each RESs, ESS, and interconnection has a maximum and minimum capacity during the operating mode.
Limit of ESS: charging and discharging power rates for batteries during operation mode and the operating SOC range must be limited as it may affect battery life time.
Operating reserve: extra storage and generation capacity
Generator start/stop limits: the number of generator starts/stops cannot exceed a certain number.
Ramp rate power limit: the maximum power fluctuation of each unit is defined.
Load profile: the demand forecast varies according to time, geographical location, season, weather, and other factors.
PV and wind sources: the wind and PV power availability depends on wind speed forecasts and solar irradiation forecasts, respectively. Seasonal and local weather impacts these forecasts, and there is always some uncertainty associated with the forecasts.
Electricity price: it is related to the price of the buying/selling power to the main grid. Prices may be time-sensitive.
The energy management problem in a microgrid becomes a mono objective when a single cost function is presented. The problem becomes multiple objectives when it simultaneously presents a solution to the competing technical, economic, and environmental problems. The weighting coefficients of each function must be properly defined when multiple objectives, such as operational cost minimization, emission reduction, and other objectives, are taken into account for the optimization problem. Effectively setting the weighting factors of the objective function is still being researched.
In addition to the typical objectives and constraints, there are other elements that needs to be incorporated into the MG EMS. Some such aspects include real-time or time-varying electricity tariffs and demand response, which add further benefits for both energy providers and consumers. From the consumer perspective, consumer comfort and a profitable electricity bill are important considerations. From the energy providers’ perspective, efficient load profile reshaping is essential. Techniques such as peak clipping, valley filling, and load shifting can be employed to successfully execute the reshaping of the load profile while considering factors such as cost, dependability, control strategies, targeted customers, and supporting infrastructure 
. The impact of electric vehicles (EVs) is an emerging factor because the use of EVs is expected to significantly increase in the next decade, causing a major increase in demand and demand pattern. Energy storage available in EV batteries can be used in the MG EMS with proper infrastructure for EV charging. Consumer comfort maximization can be defined as one of the objective functions in the formulation of the MG energy management problem, which includes demand response and EV energy storage. However, it makes optimization tasks computationally complex. The proposed method in 
ensures customer satisfaction by optimal allocation of demand in a distribution feeder using autonomous decision-making entities.
4. Microgrid Energy Management: Solution Approaches
The selection of EMS methods depends on the microgrid system and the requirements. The solution methods for energy management problems can be classified in various ways. Here, those EMS solution methods are classified as shown in Figure 6.
Figure 6. Classification of microgrid EMS methods.
5. Uncertainties in Microgrid Energy Management
Power generation from the RESs offers an intermittent and uncertain power supply. Solar and wind are the most popular and widely used resources among all the renewable energy resources used in microgrid applications. However, the intermittent nature of solar and wind energy is always a challenge. Solar energy is only available during the day, and it also varies with other factors such as cloud movements and shadow. Wind patterns change according to the weather. Consumer loads connected to the grid are also continuously varying, and these variations can become more complex with the introduction of demand response and EV charging. The high intermittency leads to an uncertain operational environment for microgrids. Therefore, one of the main challenges is to handle the uncertainty of renewable energy generation and power demand.
In this regard, it is important to properly model the uncertainties in the parameters and components. Researchers consider a variety of sources of uncertainty, such as wind power, load demand, electricity prices, PV generation, EV demand, etc. 
. In MG EMS, the uncertainty from renewable energy sources and load demand are important factors. To address uncertainty management, modelling the uncertainty of renewable sources and load becomes the consequential issue. Accurate modelling has a high effect on the operational cost of a microgrid. Modelling uncertainty is always a challenge; hence, several approaches are employed to model these uncertainties with respect to their applications. This section provides an overview of all recent uncertainty modeling approaches used by an EMS.
Monte Carlo Simulation (MCS)
The MCS is used to calculate the probabilities of various outcomes in a process that is difficult to forecast because it contains random variables. This method can accurately handle the uncertainty variable. For each input parameter, a sample is generated using its probability density function (PDF), and the sample generation process is repeated for many iterations. Therefore, the method is computationally complex. Most of the studies are focused on developing uncertainty models for PV, wind power, and load demand 
Worst Case Scenario Method
Even though it is not a new concept, the worst-case scenario approach is frequently used in recent studies. The worst-case scenario approach restricts the range of the random variables to a set of predetermined uncertainty with defined upper and lower boundaries. Prediction intervals (PIs) are calculated to evaluate the measure of prediction uncertainty. Upper and lower limits are used to define PIs 
Point Estimate Method (PEM)
The PEM is one of the approximate methods with a low computation burden. The method focuses the statistical data of a random variable on a specific number (K) of points in order to create a connection between input and output variables. Solar radiation and wind speed are treated as two random variables, and the function is developed using power flow equations in 
. In 
, PEM is used to determine power exchanges between MGs and evaluates the optimal solutions in terms of accuracy and computational effort.
Each uncertain parameter can be assigned a degree of membership based on fuzzy theory by using membership functions. After a suitable fuzzy membership function is applied to each parameter, the defuzzification will be carried out. The fuzzy method is used to model the uncertainty in forecasting day-head demand in 
. Although uncertainty is handled in fuzzy systems, the issue of randomness is not properly accounted for. Approaches, such as probabilistic fuzzy systems, have been introduced for overcoming this issue 
Autoregressive Moving Average
It is another model used in recent days to model uncertainties from load demand and wind power. The autoregressive moving average model is a combination of auto regression and moving average. This method can be used to forecast future estimates of a variable if historical data of the variable with uncertainty is presented by a time series, such as load demand, wind, etc. A significant amount of historical data, as well as data mining and analysis, are required for developing proper autoregressive models, and the predictions with these models are valid only over a short horizon 
Other methods, such as kernel density estimation, hyper-heuristics, and two stage scheduling strategy, are also used to model these uncertainties. Each model has its own advantages and disadvantages that determine its application.
There are various approaches that could be used to deal with different sources of uncertainty. Generally, optimization under uncertainties can be broadly categorized as stochastic programming 
, robust optimization 
, and other methods, such as model predictive control and chance constrained programming. These methods are implemented as either a single-layered or multi-layered framework.
6. Application of Artificial Intelligence and Machine Learning
The use of machine learning and data-driven techniques for MG energy management is becoming increasingly popular due to the recent development of machine learning (ML) and artificial intelligence (AI), as well as the availability of advanced processing in modern control systems. For example, ML has been introduced as a methodology either for energy management in microgrids or for forecasting weather conditions and loads. A hybrid approach of a nonlinear MPC controller integrating machine learning models is presented in 
. A two-layer ensemble machine learning technique is used to construct a data-driven multi-model wind forecasting system 
. Utilizing the statistically different characteristics of each machine learning algorithm is the focus of this two-layer model. Additionally, many of the heuristic optimization techniques used in MG EMSs are considered under the umbrella of AI. The opportunities for ML extend far beyond forecasting, model improvement, and adaption.
This entry is adapted from the peer-reviewed paper 10.3390/en15228525