Keywords

1 Introduction

Distribution networks are facing many different challenges as economic, technical and environmental issues due to demand growth, nowadays. In order to overcome these issues, distributed generation, and consequently microgrids, were developed. The arrival of microgrids have lessen so many issues about the operation of the power systems [1,2,3].

The main feature of the microgrids is the notion of their controllability which makes them different with active distribution networks. One layer of controlling the microgrids is the energy management process. Energy management is a systematic procedure of managing the energy within the microgrid and transactions with the upper grid network in order to satisfy technical, environmental, economic constraints [4]. In the energy management process inside of a microgrid , by optimizing the production and consumption of different types of energy carriers i.e. electricity, etc. the benefits of the owner would be maximized. Accordingly, a unit known as energy management system is required in order to perform this task. The energy management system is the main and most important part of a microgrid. It has the duties of gathering information, controlling various entities such as distributed energy resources (DERs), energy storage devices, performing demand response programs, choosing the best strategies for operation of microgrid according to different circumstances, the forecasting of the generation for renewable energy resources and load consumption. Some of the main responsibilities of the energy management system is as follows:

  • Determining the amount of produced/consumed energy by the generation units/consumers.

  • Ensuring the generation and consumption balance.

  • Ensure compliance and implementation of the rules for connecting the microgrid to the upper distribution system.

  • Optimal utilization of its existing resources.

  • Minimizing the overall operational costs.

  • Separating the microgrid from the upper grid in case of emergencies.

  • Providing convenient control strategy for re-connecting to the upper network after the islanded operation.

Microgrids can be operated in two modes known as islanded and grid-connected operations. In the first mode, the purpose of the energy management procedure, is enhancement of the reliability and in the second mode, it tries to maximize the benefit.

The energy management procedure, can be done as a short term or long term tasks which are called in fact power balancing or energy management, respectively.

In power balancing task, the following goals are pursued:

  • Load control capability.

  • Voltage regulation.

  • Frequency control.

  • Avoiding mismatch between production and consumption .

  • Acceptable dynamic response for the microgrid, voltage recovery and frequency during and after transients.

  • Providing high power quality for the consumers.

  • Resynchronization after transient states in order to retrieve the main network requirements for connecting to the upper grid.

Long-term energy management, follows the below purposes:

  • Scheduling generation and storage units in order to control the power exchange with the network, reducing losses, increasing the production of renewable resources and minimizing the cost of production.

  • Considering the constraints of DERs and environmental impacts.

  • Performing demand response programs and recovering the interrupted loads in executing these programs.

According to the modelling of the energy management problem, it could be solved using deterministic or stochastic approaches. Also according to the modelling of the problem, it can be divided into four subcategories as linear programming (LP), nonlinear programming (NLP), and mixed integer linear or non-linear programming (MILP-MINLP).

It is noteworthy to mention that the energy management process is the most important procedure in the operation of microgrids . The scope of this chapter is to represent an overview of requirements for the energy management system. First different types of energy management approaches would be presented. After that a literature review of the scientific works which have focused on the energy management problem will be reported. Next, the main necessary parts of the energy management system, including communication systems, smart meters, etc. would be introduced. Then a modelling for a centralized energy management problem of a typical grid-connected microgrid would be illustrated. Finally, simulations on a test system would be presented.

2 Centralized and Decentralized Energy Management

In order to coordinately control the DERs, within a microgrid, various approaches, as centralized and decentralized approaches, are presented in the literature review.

In centralized approaches, a central controller better known as microgrid central controller (MGCC) has the main responsibility for the optimization procedure for the microgrid energy management. According to the energy price and energy demands from local consumers and upstream networks, the MGCC determines the reference values for power generation in local generators, and the amount of power that the microgrid should buy/sell from/to the utility grid. In this procedure, flexible and noncritical loads might be shed or shifted to increase the profit.

In decentralized approaches, local controllers (LCs) have the main responsibilities to optimize their operation, in a competitive environment. Decentralized approaches are appropriate in systems with a variety of owners of the utilities of the microgrid. In such systems local controllers should take various decisions, thus, centralized energy managements intensifies the process. Also, in this approach, the privacy of the owners is one of the priorities [5].

Table 10.1 shows the pros and cons about centralized and decentralized energy management approaches [6]. Also, Figs. 10.1 and 10.2 demonstrates these approaches.

Table 10.1 Advantages and disadvantages of centralized and decentralized approaches
Fig. 10.1
figure 1

Centralized energy management system

Fig. 10.2
figure 2

Decentralized energy management system

Clearly, for the entities of the microgrid with the same purpose and cooperative operations, centralized energy management would be appropriate. For instance, in microgrids with a single owner, the MGCC would perform the scheduling of all its units such as energy sources and loads , as a central controller aiming on the maximizing the operational benefit. So the energy management system, faces an optimization problem with numerous operational and even environmental constraints where the costs should be minimized in order to maximize the benefit [7].

A competitive and market environment obliges the microgrids to choose decentralized approaches for the energy management process. In such system, local controller of each entity could independently be responsible for its own actions. However, the MGCC would have the duties of monitoring for system security and upper grid transactions. In such procedure, each entity tries to minimize its own energy cost minimization, even though it might be in conflict with actions of other entities [8].

To sum it up, the centralized energy management system seems convenient for the microgrids with one common purpose and the decentralized energy management systems is suitable for the systems with a variety of goals.

3 Literature Review

As mentioned earlier, energy management system is one of the most essential parts of a microgrid. Various studies have been done by introducing novel and efficient algorithms and optimization models for the energy management process. Authors in [9], have presented an analysis of energy management system of a microgrid using a robust optimization taking the uncertainties of wind power and solar power generations and energy consumption into consideration. The studied structure has been modelled using an agent-based modelling.

Prodan and Zio, have proposed a reliable energy management approach for microgrids. Energy storage scheduling have been performed in order to minimize the operational costs. The proposed algorithm is constructed based on a predictive control framework taking cost values, energy consumption and generation constraints into consideration. Besides, sources of uncertainties such as generation and consumption have been considered [10].

A novel method for energy management in a microgrid containing energy storage devices and renewable energy based DERs in grid-connected microgrids , has been proposed in [11]. The neighboring microgirds in the presented approach, could share the capacity of their DERs and energy storage devices aiming at reducing the operational costs. The energy management process is done by solving a multi-objective optimization problem as lexicographic program.

Authors in [12], have modelled the equivalent CO2 emissions for the fossil-fuel-based DERs . Furthermore, fuel consumption and accordingly, individual emission characteristics of these units have been developed. The proposed models , have been applied within the energy management process of a microgrid. Also, demand response programs as shiftable loads are taken into consideration to evaluate the effect on total system emissions and operational costs of the microgrid.

Authors in [13], have assessed the effect of congestion in the lines of a microgrid on its operational cost. Congestion is a common issue due to load growth in distribution networks. A security constrained energy management process have been proposed for a network of microgrids as a centralized approach. Besides, in the energy management procedure, the influence of the load flow constraints of the network on the scheduling problem has been evaluated. Taking extra limits in an optimization problem increases the operational costs. Thus, the authors have suggested using independent tie lines between microgrids and consequently the microgrids would decide whether trading energy with the upper grid or other microgrids in the vicinity. Moreover, sharing a common goal between the microgrids, leads to more profit than operating as individual enitities.

Marzband et al. [14], have presented an algorithm for energy management system of a microgrid using multi-layer ant colony approach aiming on determining the optimum point of operation for local DERs with least electricity production cost. The presented algorithm has the capability of analyzing the constraints related to technical and economic aspects of the problem. The ant colony based optimization problem, showed much better performance in comparison with particle swarm optimization based energy management . Besides, the authors have investigated the plug and play capability of the algorithm for different scenarios.

Load uncertainty causes power systems to face overwhelming challenges may lead to cause damage for the power systems. Accordingly, authors in [15], have proposed a novel approach for energy management of microgrids considering uncertainties in the amount of demand. The proposed model is nonlinear optimization problem and in order to decrease the computational burden and enhance the customers’ privacy they have applied a distributed approach for solving the problem. A simplification has been assumed on the neglecting power network and its constraints and the problem is decomposed into two subproblems performed by MGCC and LCs.

In [16], a robust energy management procedure for the microgrids has been proposed which may make its economic operation easier. Also, a precise forecasting of renewable based DERs has been suggested in order to make the energy management process more accurate.

Unexpected failure in the branches of a power system as a result of load growth, failures of different entities and also high penetration of DERs (conventional or renewable based), are other issues that system operators are facing with. These outages in the microgrid systems, could have an influence on their optimum energy management and may increase the operational costs. Accordingly, the system operator should confront such problems also better known as contingencies in their energy management process. Authors in [17], have proposed a novel method for energy management known as contingency based energy management for system of microgrids. In this method, the system operator takes the probability of the contingency in the lines of the network into consideration for the energy management procedure. A stochastic optimization has been proposed according to various scenarios of the contingencies. One possible solution to overcome this issue is making the structure of the microgrids, changeable recolonized as reconfiguration. This capability and optimal scheduling of the microgrids are utilized as the tools for handling the contingency issue. It has been shown that the proposed method could effectively prevent the network operator from economic loss.

A fuzzy energy management approach has been proposed in [18] to flatten the power profile of a microgrid containing combined heat and power unit. The mentioned structure of the microgrid, contains electrical and thermal generation units, energy storage systems, loads. The energy management system aims on using the extra electrical power of the microgrid to for storing in electrical energy storage systems and keeping the water temperature of the thermal storage system in a desirable range in order to supply residential houses.

Shi et al. [19], have suggested a distributed energy management approach for the microgrids taking the network and power flow constraints into consideration. The energy management problem has been modelled as an optimal power flow problem, and the local controllers and the MGCC cooperatively perform the energy management process.

In [20], a stochastic multi-layer energy management for grid of microgrids has been presented. In order to make the procedure more realistic, the network constraints such as power flow and voltage limitations have been considered. Furthermore, due to the high ratio of resistance to inductance in distribution networks, the effect of the active power loss on the energy management problem has been assessed. Demand response programs as one of tools to lessen the operational costs have been contemplated in the energy management strategy. Also, emission constraints have been taken into account to consider the environmental issues. In the proposed algorithm, a priority list based approach has been selected which leads to dominance of renewable based generators over conventional generators such as diesel generators .

The performance of the microgrids and supplying a reliable power, strictly is dependent to the interactions between the generators and the loads. Authors in [21], have applied an energy management system based on model predictive approach for a microgrid containing fuel cells, photovoltaic (PV) systems , and an energy storage systems. A bi-level controlling strategy has been selected in order to cope with both low level and high level component management.

4 Energy Management Requirements

In this section, the main requirements of proper application of energy management system would be introduced. The information technologies as one of main infrastructures of energy management system, which could improve the operation of microgrids will be discussed. These technologies could facilitate the monitoring, metering and control capabilities in the microgrid. Data of the microgrid is processed by means of information technologies. These applications include data storage, data analysis, data acquisition, data forecasting, data compression, data optimization, etc. [22].

Another main part of the energy management system, is a communication system. The communication system helps the connection of different entities in both centralized and decentralized energy managements. It transfers the data of metering, monitoring, and management signals and accordingly the energy management process is executed. Figure 10.3, depicts an example of a communication system application in a microgrid, with wired and wireless communication lines. A brief introduction of the communication technologies applied in microgrids, including wireless or wireline communications would be discussed in this subsection.

Fig. 10.3
figure 3

A typical communication system with both wired and wireless connections

4.1 Smart Metering

One of the main tools for the data acquisition from the energy consumers, is the smart metering which is based on advanced metering infrastructure (AMI) [23]. Smart meters log the data for energy consumption of the costumers and transfer the data to the controllers . They have a bidirectional communication with the central controller which and not only send the logged data to the center, but also receive data form the center. This feature of smart meters, could enable the customer-side services such as adjusting the schedule of utilizing electrical appliances based on the electrical energy price and executing demand response programs [22].

4.2 Sensors

Sensors are the first blocks of a measurement system. They transform physical and chemical signals of units into electrical signals. This transformation, must also mirror as closely as possible the involved variables. Sometime, because of noise signals, usage conditions, interference, etc. sensors may generate false signals. In microgrids , sensors are usually used for detecting faults, component failures, malfunctions, sensing environmental conditions, temperature, wind direction, solar irradiance, humidity, etc. A group of sensors which could communicate with wireless technology, is called wireless sensor network (WSN) which have low operational and implementation cost, is widely used in electrical power systems [24].

4.3 Phasor Measurement Units (PMUs)

PMUs are units applied for estimating and measuring phase angles and magnitudes of electrical waves which could be usually encountered as phasors in mathematical form such as voltage, current and apparent power in electrical power systems grid using a common time source for synchronization. A common source is used for synchronization which is done by means of global positioning system (GPS). They could also measure the frequency of the power network. PMUs log the measured data measurements with a very frequency as 30–60 measurement samples in a second which facilitate analyzing dynamic characteristics of the network. The microgrid operators could decide on the site of the installation of the PMUs and the output data of the PMUs are used for determining the status of correct operation of the microgrid. Thus, proper usage of these devices, would enhance the reliability and security of the microgrid.

4.4 Wired Communication

Power line communications (PLC) and fiber-optic communications are widely used and the most important wired communication systems. Power line communication refers to a technology in which the data signals of different parts and the electrical energy are transferred simultaneously sharing the lines of the network. It could cover all the area that the network is supplying. It is economical due to the fact that they do not need installing new lines and wires particularly for the communication purposes. But this economic benefit comes along with many disadvantages i.e. including large noise with the main signal, low capacity, security issues, etc. Figure 10.4 shows the application of PLC in a microgrid .

Fig. 10.4
figure 4

Application of PLCs in a microgrid

Fiber-optic communications are one of the most usual communication systems which have numerous advantages. The technology relies on sending data as pulses of light by means of optical fiber instead of wires. The process of optical fiber communications follows a few steps as creating an optical signal which carries data and is obtained by means of appropriate transmitters, then the signal is relayed along the fiber to avoid its weakening. After that the receiver at the destination receives the optical signal and transforms it into an electrical signal. Due to its optical nature, the transferring data is immune of electromagnetic interference and noises and it can be used for sending signals to the distant places without power loss [25]. Figure 10.5 depicts the operation of fiber-optic communication system.

Fig. 10.5
figure 5

Fiber optic communication system

5 Energy Management Problem Formulation for a Typical Microgrid

In this section energy management problem formulation for a typical grid-connected microgrid in detailed form for different units and its objective function will be presented. Related constraints to each individual would be introduced. The objective function is minimizing the overall operational cost and the output of the energy management is the schedule of each entity for the upcoming 24 h. It would be modelled as a deterministic MINLP problem.

5.1 Structure of a Typical Microgrid

Microgrids are usually accounted as parts of distribution networks. Distribution networks and microgrids are mostly operated in a radial form. In this chapter it is assumed that the microgrid has a radial topology and contains different DERs as diesel generators, PV systems , wind turbines, energy storage systems as batteries, flexible loads and fixed loads. The flexible loads could help the system operator to perform demand response programs. Also, the system structure would be taken into consideration to contemplate the constraints of the network.

5.2 Renewable Based DERs

Wind turbines and PV systems are renewable based DERs. The output of these units is stochastic and involved with uncertainty. Forecasting is an essential tool for the systems with the integration of renewable based DERs. This is due to the fact that the system operator in deregulated markets, needs to participate in day ahead markets and thus it should take decisions beforehand. Also, all the scheduling of the units in the energy management process is done for the next 24-h. In this chapter in order to avoid stochastic modelling of the energy management, we assume that the generated power of these units are forecasted with efficient forecasting tools [26, 27].

5.3 Dispatchable DERs

Generation systems such as microturbines , fuel cells, diesel generators, etc. are considered as dispatchable generation systems. It is due to the fact that these systems have controllable output power and could be dispatched. In this chapter it is assumed that the microgrid contains a diesel generator as a dispatchable unit. The following equations illustrates the related equations of a diesel generator [20, 28].

$$ 0 \le P_{g} (t) \le Y_{g} (t) \cdot P_{g}^{ \hbox{max} } \, ,\quad Y_{g} (t) \in \{ 0,1\} $$
(10.1)
$$ \left| {P_{g} (t) - } \right.\left. {P_{g} (t - 1)} \right| \le {\text{ramp}}_{g} \times P_{g}^{ \hbox{max} } $$
(10.2)
$$ C(P_{g} ,t) = \alpha P_{g}^{2} (t) + \beta P_{g} (t) + \gamma $$
(10.3)
$$ Cst_{start} (t) = X(t) \times C^{S.U.} $$
(10.4)
$$ X(t) = \hbox{max} \{ Y_{g} (t) - Y_{g} (t - 1),0\} $$
(10.5)

Equation (10.1) shows the generation capacity of the diesel generator and Eq. (10.2) stands for the ramp-up rate constraint . Equations (10.3)–(10.5) illustrates the operation and startup costs of the generator relations. In the above equations, \( P_{g}^{ \hbox{max} } \), \( P_{g}^{{}} \), \( C \) and \( C^{S.U.} \) are respective symbols for defining maximum power capacity, value of generation, operational cost and startup cost of the generator. \( Y_{g} \) and \( X \) are ancillary binary variables which indicate on-off status of and starting moment of the generator. \( \alpha \), \( \beta \), \( \gamma \) and \( {\text{ramp}}_{g} \) are the coefficients of operational cost and ramp-up rate of the generator which relies on the characteristics of the diesel generator.

5.4 Energy Storage System

Energy storage systems are indisputable parts of microgrids. They can compensate energy shortage and collect excess energy during operation. They seem to be vital in presence of renewable based DERs due to their stochastic output power. In this chapter it is assumed that the microgrid contains batteries as the energy storage system. Following equations shows the constraints of a battery for its operation [17].

$$ 0 \le P_{bat,ch} (t) \le Y_{ch} (t) \cdot P_{bat,cap} \cdot (1 - SoC(t - 1)) $$
(10.6)
$$ 0 \le P_{bat,disch} (t) \le Y_{bat,disch} (t) \cdot P_{bat,cap} \cdot SoC(t - 1) $$
(10.7)
$$ Y_{bat,ch} (t) + Y_{bat,disch} (t) \le 1 \, ,\quad Y_{bat,ch} (t),Y_{bat,disch} (t) \in \{ 0,1\} $$
(10.8)
$$ SoC(t) = SoC(t - 1) - \frac{1}{{P_{bat,cap} }} \cdot (P_{bat,disch} (t) - P_{bat,ch} (t)) $$
(10.9)
$$ 0 \le SoC(t) \le 1 $$
(10.10)
$$ SoC(t_{0} ) = SoC_{initial} $$
(10.11)
$$ SoC(t_{end} ) = SoC_{final} $$
(10.12)

Equations (10.6) and (10.7) stand for the power capacity constraints of the battery for charging and discharging status. Equation (10.8) keeps the simultaneous occurrence of charging and discharging of the battery. Finally, Eqs. (10.9)–(10.12) are related to the state of charge (SoC) or the level of the stored energy in the battery. In the above equations, \( P_{bat,ch} \), \( P_{bat,disch} \) and \( P_{bat,cap} \) stand in the charging power, discharging power and the maximum available power from the battery, respectively. Also, \( Y_{bat,ch} \) and \( Y_{bat,disch} \) are ancillary binary variables indicating the charging or discharging status of the battery .

5.5 Loads

Two types of loads are assumed in this chapter: (1) critical fixed loads, (2) flexible loads. The latter is capable of participating in the demand response programs. Flexible loads are divided into two subcategories. The first type is sheddable loads and the second one is called shiftable loads. Sheddable loads are cut in some hours by paying a penalty cost to these loads. The energy for shiftable loads should be provided, however the time of this providing could alter during the scheduling horizon. Below equations demonstrate the constraints and costs of providing flexible loads. Equations (10.13) and (10.14) demonstrate the constraints of shiftable loads. Also Eqs. (10.15) and (10.16) represent the cost of performing demand response programs on shiftable and sheddable loads, respectively.

$$ P_{shift}^{ \hbox{min} } \le P_{shift,l} (t) \le P_{shift}^{ \hbox{max} } $$
(10.13)
$$ E_{shift}^{ \hbox{min} } \le \sum\limits_{t = 1}^{24} {P_{shift,l} (t)} \le E_{shift}^{ \hbox{max} } $$
(10.14)
$$ C_{shift,l} (t) = \vartheta \cdot \left[ {E_{shift}^{ \hbox{max} } - \sum\limits_{t = 1}^{24} {P_{shift,l} (t)} } \right] $$
(10.15)
$$ C_{shed,l} = \nu \cdot \left[ {\sum\limits_{t = 1}^{24} {P_{shed,l} (t)} } \right] $$
(10.16)

In the above equations, \( P_{shift}^{ \hbox{min} } \), \( P_{shift}^{ \hbox{max} } \) and \( P_{shift,l} \) are the respective symbols for maximum and minimum of shiftable loads and the amount of shifted loads. Also, \( E_{shift}^{ \hbox{min} } \) and \( E_{shift}^{ \hbox{max} } \) are minimum and maximum energy which is required to supply shiftable loads . \( \vartheta \), \( C_{shift,l} \), \( \nu \) and \( C_{shed,l} \) are representing shifting price, shifting cost, shedding price and shedding cost, respectively.

5.6 Network Constraints

The network of a microgrid could be modeled as a radial network. Bus number 1 is the reference bus that is connected to the upstream network and has a variable power exchange rate and a voltage magnitude of 1 at per unit system.

Each line between the bus bars i and j has the respective resistance and reactance of \( R_{ij} \) and \( X_{ij} \). The voltage of the bus i and the current passing through the line are shown with \( V_{i} \) and \( I_{ij} \), respectively. The net output power of each bus follows the bellow relationships:

$$ S_{i} (t) = S_{i}^{battery} (t) + S_{i}^{load} (t) - S_{i}^{gen} (t) $$
(10.17)
$$ S_{i} (t) = P_{i} (t) + jQ_{i} (t) $$
(10.18)

In the above relations, \( S_{i} \), \( S_{i}^{battery} \), \( S_{i}^{load} \) and \( S_{i}^{gen} \) are the respective representatives of pure power injected power, battery power, load power, and generator power in the ith bus. Also \( P_{i} (t) \) and \( Q_{i} (t) \) are respective symbols for active and reactive powers of the ith bus.

Load flow equations are expressed in the form of the following relations for a radial network:

$$ P_{j}^{net} (t) = P_{ij} (t) - R_{ij} \cdot I_{ij}^{2} - \sum {P_{jq} (t)} $$
(10.19)
$$ Q_{j}^{net} (t) = Q_{ij} (t) - X_{ij} \cdot I_{ij}^{2} - \sum {Q_{jq} (t)} $$
(10.20)
$$ V_{j}^{2} (t) = V_{i}^{2} (t) - 2(R_{ij} \cdot P_{ij} (t) + X_{ij} \cdot Q_{ij} (t)) + (R_{ij}^{2} + X_{ij}^{2} ) \cdot I_{ij}^{2} (t) $$
(10.21)
$$ I_{ij}^{2} (t) = \frac{{S_{ij}^{2} (t)}}{{V_{i}^{2} (t)}} $$
(10.22)
$$ V_{ \hbox{min} }^{{}} \le V_{i}^{{}} (t) \le V_{ \hbox{max} }^{{}} $$
(10.23)
$$ I_{ \hbox{min} }^{{}} \le I_{ij}^{{}} (t) \le I_{ \hbox{max} }^{{}} $$
(10.24)

The microgrid operator, can sell its excess power to the upstream network to gain benefit. Also, it can buy power from the utility grid to compensate its shortage or reduce its operational costs. The power transactions with upper grid, \( P_{trans} (t) \), depends on the price of electricity, \( \rho (t) \).

5.7 Objective Function

The objective function of the microgrid operator, maximizing its benefit which is obtained by minimizing the operational costs. Also, it should provide high quality and reliable energy to the consumers. In other words, the main objective is minimizing operational costs of the dispatchable DERs and power transactions with the upstream grid and the cost of executing demand response programs. Furthermore, the operational constraints of different entities should be taken into account. Thus, the optimization problem for the energy management of a microgrid can be formulated as below:

$$ {\text{O}} . {\text{F}} . { }\sum\limits_{t} {\left[ {\rho (t) \cdot P_{trans} (t) + \sum\limits_{l} {C(P_{g} ,t)} + \sum\limits_{l} {C_{shift,l} (t)} + \sum\limits_{l} {C_{shed,l} (t)} } \right]} $$
(10.25)

Subject to: Eqs. (10.1)–(10.24)

The above problem is an MINLP problem which is solved by the MGCC to obtain the schedules of the entities for the energy management horizon.

6 Simulations

In this section, simulations for the energy management of a test system would be presented. Solver KNITRO in General Algebraic Modeling System (GAMS) software under windows operation system is utilized to solve the energy management problem. The microgrid consists of PV systems , wind turbines, diesel generator, batteries residential loads. Figure 10.6 shows the detailed microgrid structure. It is assumed that the load at bus 5, is a shiftable load and the rest of the loads are sheddable. The maximum capacity of power transactions with upstream network grid is 3 MW and the maximum capacity of the lines are 1 MW. Also, 30% of the load of each bus, is the maximum sheddable power. Penalty factor for cutting off the loads is assumed to be 700 $/MWh. Tables 10.2 and 10.3 demonstrate the characteristics of the entities of the microgrid. Also, Fig. 10.7 shows the energy prices for selling and buying electricity in various hours of the day. The energy management is done for 24-h horizon and the day ahead scheduling of the units would be presented.

Fig. 10.6
figure 6

Structure of the test microgrid system

Table 10.2 Parameters of diesel generators of the microgrid
Table 10.3 Battery characteristics
Fig. 10.7
figure 7

Electricity price during the scheduling horizon

The results of the energy management process are shown in Fig. 10.8. This figure illustrates the output schedules of the diesel generators, load curve, forecasted output powers of wind system and solar system, battery power exchanges and transactions with the upper grid. Obviously, in times with lower energy price, the system operator tries to buy energy from the utility grid and sell its excess energy to the upstream network in hours with higher price. The loads are cut in expensive hours or shifted to the hours with lower price. The battery, absorbs energy in cheap hours and release its energy to the grid in hours with high price of electricity. The operational cost for the microgrid during 24 h becomes 8302.28 $. Also the energy loss in the lines of the microgrid is 1.2 MWh.

Fig. 10.8
figure 8

Energy management result of the test system

7 Conclusion

In this chapter, energy management system of a microgrid was introduced. The energy management system is the main part of controlling a microgrid. It is responsible for executing many tasks i.e. determining the schedule of power generation of its dispatchable DERs , performing demand response programs, ensuring the generation and demand power balance, complying technical constraints , etc. Then required parts for the energy management procedure were represented. Different parts as information technology and communication systems participate in the energy management process. After that, formulation of energy management for a typical microgrid was presented. Detailed relations for different units were introduced. Finally, simulations in a test system as a typical microgrid were done and the output of the energy management process, has been declared. The energy management system, tries to reduce the operational costs by functioning its units in hours with higher price and selling its excess power to the upper grid. For example, around noon, which has the most expensive prices for electricity, energy sold to the utility grid is maximized. Optimal scheduling of the test microgrid system, showed an operational cost of 8302 $ for 24 h of operation. This is the least possible cost which can be obtained from the proper scheduling of the units.